Paragraph Boundaries Are Not White Space:Compression Depth as the Signature of Hierarchical Structure
AuthorsShuyang Xiang
Resources
The study finds that real paragraph structure is revealed not merely by where attention concentrates, but by how deeply that compression develops across model layers.
Key results
Exact-distance residualized-attention depth U* for the Python Code corpus.
Exact-distance residualized-attention depth U* for WikiText-2.
Exact-distance residualized-attention depth U* for OpenWebText.
Normalized fake-split response relative to the average genuine paragraph-boundary effect.
Training duration shared by the positional-encoding variants.
What the paper found
This study tests whether paragraph structure changes Transformer attention beyond ordinary token distance. It introduces hierarchical rotary positional encoding, or hRoPE, with independent paragraph, sentence, and token coordinates, then changes only the paragraph coordinate p1 while keeping tokens and reading order identical. Using 8-layer, 8-head models with dmodel 512, context length 1024, GPT-2 byte-pair encoding, and 5000 training steps, experiments cover WikiText-2, OpenWebText, and Python Code. An exact-distance residualized-attention estimator, retaining cells with at least 2000 token pairs and token distances up to 1024, finds compression near paragraph boundaries in all three corpora. However, a density-matched random p1 channel also causes compression, so the location of the minimum is not diagnostic; the signature is compression depth. The measured depths are −0.772 for Code, −0.481 for WikiText-2, and −0.305 for OpenWebText. Causal fake-merge and fake-split interventions produce opposite attention changes, while flat RoPE and sentence-only controls show no paragraph-coordinate effect. For Code, a fabricated boundary generated a normalized response of 1.522 times the average genuine-boundary effect. Across eight corpus-only measures spanning lexical persistence, paragraph length, and embedding coherence, none reproduces the cross-corpus depth ordering, although embedding coherence comes closest. The result supports hierarchical, coordinate-dependent attention rather than a complete geometric theory, and leaves the cause of corpus-dependent compression depth unresolved.
Original abstract
Standard positional encodings represent position as a one-dimensional reading-order coordinate, but reading order alone does not determine hierarchical textual structure. We use a hierarchical rotary positional encoding (hRoPE) that represents paragraph, sentence, and token indices as separate channels, hold the token sequence fixed, intervene on the paragraph coordinate p1, and measure cross-paragraph attention with a token-distance-exact estimator. Attention is compressed relative to a token-distance-matched baseline in every corpus, but compression alone is not diagnostic of true structure: an architecturally identical channel with density-matched random labels is compressed too, more shallowly. What distinguishes real structure is the depth of compression, which is greater and corpus-dependent while the control's is not. Comparing eight corpus-only quantities across three constructs (lexical persistence, paragraph length, embedding-based coherence), none fully reproduces the cross-corpus ordering of depth, though embedding-based coherence comes closest. Compression depth, not its location, is the reproducible signature of genuine paragraph structure in our setting.
Read the original paperMore in Attention Mechanisms
Browse all 27 papers →Hard Sample-Conditioned Decorrelated Attention for Robust Face Recognition
Tahar Chettaoui, Guray Ozgur, Eduarda Caldeira, Naser Damer, Fadi Boutros
ViT-HarDis encourages attention heads to specialize more on difficult face samples, improving recognition without extra inference cost.
Muir: Linear Attention with Sensitivity-Allocated Gating and Matched-Filter Readout
Tushaar Gangavarapu, Gil Tabak, Clemens JS Schaefer
Muir redesigns linear attention’s gates and readout to improve language-model quality and long-context retrieval while preserving efficient training and inference.
Training Vision Transformers to Focus: Emergence of Spatial Attention Head Specialization
Yuji Nozawa, Yu-Chieh Lin, Youyang Ng
The method encourages Vision Transformers to develop distinct, spatially focused attention heads without image annotations.