TRANSMISSION // 2611.36044v1

When masked tokens still affect an AI model

Source published

A shared scale in MXFP8 attention can let future tokens subtly alter earlier predictions. Researchers propose a causal kernel that avoids this pathway while retaining eight-bit operations.

AI-generated conceptual illustration for When masked tokens still affect an AI model
AI-generated conceptual illustration; not documentary evidence.

Causal masking is meant to ensure that a language model’s predictions depend only on tokens it has seen. But a new study finds that, in one eight-bit attention setup, a future token can still affect an earlier prediction indirectly—by changing how a visible value is rounded. The authors propose a kernel designed to prevent that leak and test its accuracy and speed on Qwen3 models.

How can a masked token still matter?

A language model generates text one token at a time. When it predicts what comes next, it should use the current and earlier tokens—not words that come later. Transformer models enforce this rule with a causal mask: attention scores for future tokens are set so they cannot contribute directly to the current prediction.

But masking is not the only step that matters. Attention systems can use lower-precision arithmetic to speed up calculations. In MXFP8, groups of values share a scale used to represent them. If that scale is chosen using both visible tokens and masked future tokens, a future token can affect how a visible value is rounded. It still has no direct attention weight, but it can change a value the model does use.

Pushkar Patel, Romit Jain and Tejesh Bhalla of Sarvam AI examine this issue in MXFP8 attention. Their paper asks whether standard causal masking is enough to preserve the information boundary when quantization—the conversion of values to a lower-precision format—is also involved. The experiments described in the paper were run on NVIDIA B200 GPUs, part of the Blackwell generation.

A scale shared across tokens

MXFP8 groups values in sets of 32 and represents them using a shared, power-of-two scale. In the attention calculation that combines values, a group can include both tokens a query is allowed to see and tokens that come after it. The researchers show how a future value can increase the group’s scale and cause a smaller, unchanged visible value to round differently, potentially even to zero.

They examine the effect with two tests. First, they change future values while keeping the sequence length and earlier inputs fixed, then check whether earlier model outputs change. Second, they compare predictions from a full-sequence computation with predictions from processing the same prefix alone. The second comparison can reflect not only future dependence but also numerical differences: changing the sequence shape can alter floating-point calculation order and rounding.

The tests use Qwen3-4B-Base and Qwen3-14B-Base checkpoints, English text from the C4 validation set, and B200 GPUs. The authors compare stock MXFP8 attention with BF16 attention and two approaches intended to preserve causality.

A different treatment at the boundary

The proposed kernel handles the value block that straddles the boundary between visible and future tokens differently. Rather than choosing one value scale across tokens in that block, it scales each token’s values separately and folds those scales into the corresponding attention weights. This lets the kernel retain native MXFP8 matrix products. Earlier blocks, which are fully visible to the query, can continue to use shared scales.

The authors also describe a training backward pass that dequantizes saved inputs into BF16 and an inference cache that updates scales as new tokens arrive. These components form part of the proposed recipe. The backward pass is an approximation, not the exact derivative of the rounded forward computation.

In fixed-shape tests, stock MXFP8 changed earlier outputs when future values were altered. BF16 and both causal variants did not show those changes in the tested positions. In full-sequence versus prefix comparisons on released Qwen3 checkpoints, stock MXFP8 produced more next-token top-choice disagreements than the BF16 reference. On Qwen3-4B-Base at 32K context, the paper reports disagreement rates of 0.416% for stock MXFP8, 0.021% for the new kernel and 0.015% for BF16. The new kernel’s disagreement was close to, but not identical to, the BF16 reference. Even causal implementations can show differences between full and prefix runs because of numerical effects.

Gains depend on the workload

In end-to-end Qwen3-4B training at 32K context, the recipe was 4.9% faster than the BF16 setup and used 5.2% less peak memory. For single-request Qwen3-4B decoding at 4K–32K context, it was 3.8–9.9% faster than the tested vLLM setup using FP8 attention and an FP8 cache. Qwen3-14B results were described as broadly comparable. At 4K training context, the proposed recipe was slower than BF16, illustrating that the benefit is not universal.

The work demonstrates a route by which shared-scale quantization can violate prefix invariance, and reports tests in which the proposed kernel removes the measured fixed-shape effect. The results are specific to the tested kernels, models, hardware and configurations. The suffix intervention deliberately amplifies future values to stress scale selection; it does not estimate how often ordinary inputs trigger the same effect. The authors also note that inference prefill and decode paths use different representations and need not produce identical outputs.

This is an arXiv preprint, so its findings should be treated as research claims rather than independently confirmed conclusions. Speed comparisons were made on B200 GPUs under particular training and single-request serving conditions; they do not establish gains on other hardware or workloads. The paper says downstream effects of future-dependent quantization remain for future study.

Reviewed cross-references

These connections were reviewed by a model, not independently fact-checked by a human. Similarity does not imply agreement; consult the original papers and the evidence below.

  • FOSCAR speeds up compressed AI memory by rearranging the maths

    Shared method: Both papers fold quantization scales into attention computations rather than applying them independently to each value: the origin paper folds token-local value scales into attention weights, while FOSCAR folds group scales into another operand or partial results. The methods address different settings—causal MXFP8 attention versus low-bit KV-cache decoding—and FOSCAR’s excerpt does not test the origin paper’s future-token leakage issue.

    Model review: · openai-codex/gpt-6-luna

    Evidence and provenance

    Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.

    • 2611.36044v1 — Original paper

      Excerpt reference: static/papers/2611.36044v1.md:13-39
      Basis: Paper text
      Source file SHA-256: ddbc3a76c7cc59a0ff72a4194733e8aaa86990f061eb1c0070b0347136b251e1

    • 2611.09722v1 — Original paper

      Excerpt reference: static/papers/2611.09722v1.md:70-171
      Basis: Paper text
      Source file SHA-256: 53a951be207377af74558981b51fa179f7e83f98d55bca4e895b1323db634a06

Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.