FLA's KDA safe_gate fast path leaks future gates into prefix outputs; fix coming

YouJiacheng · x · 2026-09-22

A causal-interference bug was reported in flash-linear-attention (5.8k stars): on the current main branch, the CUDA/Triton KDA chunk path with usegateinkernel=True and safegate=True breaks prefix causal non-interference — inputs identical through prefix position i produce different prefix outputs, prefix-only loss, and gradients when only a later raw gate changes, even without altering the prefix. Runs are bitwise identical, ruling out ordinary nondeterminism.

DrissP wrote up an analysis of the bug, and maintainers confirmed the fix will land in the next FLA release.

Original post →

More from Research

Research channel →