cs.LGAug 24, 2026

The Mask Is Not the Model: Auditing Prefix Invariance in Attention, State-Space, and Hybrid Sequence Models

Authors: Taebong Kim, Youngsik Hong, Minsik Kim, Sunyoung Choi, Jaewon Jang, Minseo Kim

Organizations: VIDRAFT AI Research · QuantumOS, Seoul, Republic of Korea

Abstract

Hybrid sequence models must satisfy prefix invariance: representations at position t must not depend on future inputs, yet this is rarely verified. We formalize prefix invariance and give a lightweight audit, two forward passes, no training or gradients, yielding a per-layer score localizing where causality breaks. Attention-mask inspection, the field's default check, is incomplete: causality is a graph-level property, and leaks can occur via scans, aggregations, or normalization despite correct masks. Across 192 injected-fault trials on eight checkpoints, mask inspection detected none, while our audit localized all 192/192 to the exact layer. Static/dynamic analysis of chunked-scan code in transformers found the same defect in Zamba2 and Nemotron-H, an inter-chunk axis error fixed via the reference implementation. The method fits on one page and runs in seconds.

Figures & tables

Explore similar work

CardsList
  1. A Compositional Theory of Causally Masked Transformers

    Jul 29, 2026Franz Nowak, Ryan Cotterell, Reda BoumasmoudTransformer ArchitecturesExpressivity

  2. Mask-Based Priors Are More Persistent than Query-Key Initializations

    Aug 1, 2026Mingze Ma, Hemanth Saratchandran, Cameron Gordon +1Transformer ArchitecturesMask2Former