Understanding the Reversal Curse Mitigation in Masked Diffusion Models through Attention and Training Dynamics
Sangwoo Shin, BumJun Kim, Kyelim Lee, Moongyu Jeon, Albert No
TL;DR
This work addresses the reversal curse observed in autoregressive language models, where learning a forward relation $A$ is $B$ does not guarantee the inverse $B$ is $A$. It demonstrates that masked diffusion models (MDMs) mitigate this failure via a Transformer encoder architecture with full attention and a random masking objective, enabling bidirectional conditioning. The authors show that the mitigation cannot be explained by the objective alone; they prove a structural coupling of attention under RoPE and a gradient-alignment mechanism that makes forward-loss updates also reduce reverse loss. Large-scale experiments on 7–8B parameter models corroborate the theory, showing robust reverse-inference performance for MDMs where ARMs fail, and toy-scale analyses validate the proposed mechanism. Overall, the study highlights how architecture and optimization dynamics jointly enable bidirectional reasoning in diffusion-based approaches, with implications for designing more robust, reversible language systems.
Abstract
Autoregressive language models (ARMs) suffer from the reversal curse: after learning that "$A$ is $B$", they often fail on the reverse query "$B$ is $A$". Masked diffusion-based language models (MDMs) exhibit this failure in a much weaker form, but the underlying reason has remained unclear. A common explanation attributes this mitigation to the any-order training objective. However, observing "[MASK] is $B$" during training does not necessarily teach the model to handle the reverse prompt "$B$ is [MASK]". We show that the mitigation arises from architectural structure and its interaction with training. In a one-layer Transformer encoder, weight sharing couples the two directions by making forward and reverse attention scores positively correlated. In the same setting, we further show that the corresponding gradients are aligned, so minimizing the forward loss also reduces the reverse loss. Experiments on both controlled toy tasks and large-scale diffusion language models support these mechanisms, explaining why MDMs partially overcome a failure mode that persists in strong ARMs.
