Geodesic Momentum Sampling for Masked Discrete Diffusion Language Models
2026-07-11 8 min read
Abstract
Masked discrete diffusion language models generate text through a sequence of categorical denoising transitions. We study an inference-time modification that treats each per-token categorical prediction as a point on the Fisher--Rao statistical manifold. The square-root map embeds the categorical simplex into the positive orthant of a hypersphere, where closed-form spherical interpolation is available. At each reverse step, we recursively continue the great-circle arc from the previous extrapolated prediction through the current model prediction, map the result back to a categorical distribution, and insert it into the original MDLM or SEDD transition. We call the method geodesic momentum sampling.
We give a precise geometric derivation, prove equivalence between the unprojected update and an exponential-map continuation, and show that its small-angle coefficients coincide with the coefficients of variable-step Adams--Bashforth two-step extrapolation. We also delimit this analogy: the method extrapolates prediction distributions rather than tangent vector fields, retains stochastic categorical jumps, and uses a positive-orthant projection. It is therefore not a second-order probability-flow ODE solver, and no second-order convergence claim is made. Archived experiments on OpenWebText checkpoints suggest improved GPT-2 generative perplexity for MDLM at 10--100 reverse steps and for SEDD at 10--50 steps.
Introduction
Discrete diffusion language models offer parallel, bidirectional generation, but accurate sampling often requires many reverse transitions. MDLM simplifies absorbing-state diffusion through a substitution parameterization and provides an cached sampler. SEDD instead learns concrete score ratios and admits an analytic reverse transition. Both models nevertheless operate by repeatedly producing categorical distributions over a vocabulary.
Information geometry supplies a natural geometry for these distributions. The interior of the categorical simplex carries the Fisher--Rao metric; the square-root map identifies it, up to a constant scale, with the positive orthant of a sphere. This construction underlies Fisher-Flow and the continuous Riemannian diffusion language model (RDLM). Those methods learn or simulate continuous flows on the sphere. Our setting is different: we preserve pretrained discrete MDLM and SEDD models and modify only their inference-time categorical predictions.
The main contributions are:
- We formulate recursive geodesic extrapolation of categorical predictions using the exact square-root embedding and spherical linear interpolation (SLERP).
- We show that the unprojected update is an exponential-map continuation and derive its local Adams--Bashforth-like coefficient structure.
- We instantiate the same geometric operator at two different interfaces: the clean-token prediction in MDLM and the analytic transition distribution in SEDD.
- We state invariants and the precise limits of the high-order analogy. In particular, we do not identify the algorithm with an RDLM probability-flow ODE solver.
- We report MDLM and SEDD quality results across six reverse-step counts.
Background
Categorical Fisher--Rao geometry
Let
be the categorical probability simplex. On its interior, a tangent vector satisfies , and the Fisher--Rao metric is
Proposition 1 (Square-root isometry) Define by elementwise, where is the positive orthant of the sphere of radius two. Then is an isometry between the Fisher--Rao metric and the metric induced by the ambient Euclidean space.
Proof. For , we have . Therefore
Moreover, , so lies on the radius-two sphere.
The implementation uses the unit-sphere coordinate
which differs only by the constant factor two. For , their spherical angle is
and the Fisher--Rao distance under the radius-two convention is . This formula extends continuously to the closed simplex and yields its metric completion; boundary points themselves are not smooth points of the Fisher--Rao Riemannian manifold.
Masked discrete diffusion and MDLM
Let denote an absorbing mask state and let be the integrated noise schedule. The probability of having moved to the mask by time is
For a reverse step , MDLM predicts a clean-token distribution whose absorbing-state parameterization satisfies and . When , the baseline implementation samples from the unnormalized weights
Their common normalization is immaterial for categorical sampling. When , the absorbing reverse sampler copies the already unmasked token. The cached sampler reuses until the discrete state changes.
SEDD analytic transitions
SEDD learns a concrete score ratio that approximates . Let denote the learned score vector, let denote the staggered-score transform, and let denote the transported forward kernel. The analytic sampler uses
followed by categorical sampling. Our SEDD variant applies geometry to the normalized version of this transition, not to the score vector itself.
Geodesic Momentum Sampling
A common distribution interface
For each batch element and sequence position, define a categorical distribution at reverse index :
The raw spherical coordinate is . Let be the previous extrapolated coordinate. This recursive choice is important: the method has persistent momentum rather than retaining only two raw predictions.
Exact spherical continuation
For unit vectors with angle , SLERP is
Interpolation uses . We instead choose :
Proposition 2 (Exponential-map representation) For distinct, non-antipodal and ,
Thus the equation exactly continues the great-circle arc from through by an additional fraction before the positivity operation described below.
Proof. The curve is the unique shortest great-circle segment from to for . At , is the forward continuation tangent with norm . Applying to the scaled vector advances by arc length , which is exactly .
At (equivalently, ), we define by continuous extension, and the proposition remains valid.
Positive-orthant projection and probability recovery
Great-circle extrapolation may leave the positive orthant. The archived implementation uses
and recovers
Proposition 3 (Probability validity) Whenever , the recovered vector lies in .
Proof. Each component is a square and is therefore nonnegative. Since has unit norm, .
This projection is a practical domain correction, not part of the exact Fisher--Rao geodesic.
Step coefficient and the AB2 analogy
Let the descending reverse grid be and define positive step magnitudes . The implementation uses
For SEDD, the archived runs use . For MDLM,
Proposition 4 (Local linear form) For fixed and ,
With and , the leading coefficients are , matching the coefficients of variable-step AB2.
Proof. Using gives and .
Instantiation for MDLM and SEDD
For MDLM, replaces ; already unmasked tokens remain fixed. For SEDD, directly replaces the normalized analytic transition. In both cases, the next token state is sampled with Gumbel-max. The algorithm therefore keeps all neural-network inputs discrete.
Theoretical Scope and Non-Claims
The method preserves several exact properties:
- Discrete-state compatibility. The model always receives integer token indices.
- First-step equivalence. Since , the first categorical transition equals the corresponding baseline transition under the same random draw.
- Simplex validity. Subject to the nonzero projection condition, every extrapolated distribution is nonnegative and normalized.
- MDLM absorbing structure. Tokens already unmasked remain fixed, exactly as in the uncached MDLM reverse transition.
However, the sampled sequence changes stochastically, so the sequence is a collection of conditional predictions along a random path, not a deterministic marginal curve . We therefore make no claim of marginal preservation, local truncation error , or global convergence .
Experimental Evaluation
The scripts compare MDLM against its ddpm_cache sampler and SEDD against its analytic sampler.
Both use OpenWebText checkpoints and sequence length 1024. The reverse-step counts
are 10, 20, 50, 100, 256, and 512. The quality metrics are:
- token-weighted perplexity under GPT-2, where lower is better; and
- Jensen--Shannon divergence between generated and reference unigram token histograms, where lower is better.
Quality results
Figure 1: Perplexity results. Left panels show raw GPT-2 perplexity. Right panels show the relative PPL reduction, so positive bars indicate improvement.
At 10, 20, 50, and 100 MDLM steps, the geodesic samples have respectively 26.18%, 18.53%, 13.95%, and 11.42% lower GPT-2 perplexity. At 256 and 512 steps, the difference vanishes and slightly favors the baseline. This pattern is consistent with the method's intended use as a low-step correction.
SEDD shows smaller perplexity reductions at 10--50 steps, degradation at 100--256, and a small improvement at 512.
Conclusion
We presented geodesic momentum sampling, an inference-time modification for MDLM and SEDD that recursively extrapolates categorical predictions on the Fisher--Rao square-root sphere. The update has an exact exponential-map interpretation before positive-orthant projection, and its local coefficients match variable-step AB2 coefficients. The algorithm nevertheless operates on prediction points along a stochastic discrete path, not on parallel-transported vector fields of a probability-flow ODE. Its mathematically accurate characterization is therefore recursive Fisher--Rao spherical extrapolation, not a proven second-order Riemannian solver.
Structural Broadcasting Q-learning: Annealed Kernel Generalization for Tabular Reinforcement Learning
2026-06-21·12 min
안과 겉 - 알베르 카뮈
2026-08-24·20 min
Related Posts
Structural Broadcasting Q-learning: Annealed Kernel Generalization for Tabular Reinforcement Learning
2026-06-21· 12 min
We propose Structural Broadcasting Q-learning, a tabular reinforcement learning method that improves sample efficiency by propagating temporal-difference errors across structurally similar states.
Beyond the Reward
2026-05-22· 23 min
강화학습이 이룩한 실증적 성취와 그 확장 가능성을 넘어, 보상 중심 패러다임이 지능의 본질을 설명하는 데 가지는 한계에 대해 고찰합니다.