Language models compress attention across paragraph boundaries depending on text depth
Text comprehension across long documents relies on recognizing structural divisions, and new research indicates that neural networks compress cross-boundary attention more deeply when encountering authentic prose.

When a person reads a book or an article, a break between paragraphs signals a natural shift in thought. The blank space on the page invites a brief pause, marks a transition between ideas, and resets how subsequent words connect with earlier sentences. Readers do not experience text as a relentless, single-file string of vocabulary. Instead, written human thought organizes itself in nested layers, where words combine into sentences, sentences form paragraphs, and paragraphs build a broader narrative.
Standard artificial intelligence language models do not naturally process language through this hierarchical lens. Instead, standard transformer systems treat text as a flat sequence of individual elements called tokens, measuring distance purely by counting how many words separate them along a linear track. Two words that sit 10 steps apart in the same sentence are treated by positional mechanisms with the same spatial distance as two words separated by a paragraph break. Because a sequence of words can be grouped into distinct paragraphs in a vast number of valid configurations, tracking word order alone leaves out the structural architecture of the document.1
Understanding whether computational networks can genuinely distinguish structural boundaries from arbitrary breaks has direct implications for machine comprehension. If language models treat paragraph breaks as nothing more than cosmetic white space, they risk muddling the relationships between arguments that belong to different topical units. Conversely, if a system can register the distinct influence of hierarchical boundaries, automated software can better track context across extended documents, synthesize multi-page reports, and avoid confusing local details with overarching topics.
Before evaluating how computational attention behaves across these boundaries, consider the chain of events that must take place for a model to process structured writing. First, incoming text must be converted into numerical units and tagged with coordinates indicating where each piece sits. Next, as the network computes relationships between words, it calculates attention weights that govern how strongly each word should influence every other word. Words located close to one another in the reading order normally receive stronger mutual attention, while distant words receive less. Finally, if paragraph organization exerts a real influence, the connection between words spanning a boundary should weaken more than their physical separation alone would suggest.
In a preprint posted to the arXiv server on September 20, 2026 (v1) and revised September 27, 2026 (v2) as arXiv:2609.23551v2, which has not yet undergone formal peer review, researcher Shuyang Xiang investigated this phenomenon. Xiang reported that attention between tokens is systematically compressed across paragraph boundaries relative to a distance-matched baseline.12 However, Xiang discovered that this compression occurs even when boundaries are placed at random intervals throughout a passage.1 What distinguishes genuine textual structure from an artificial boundary is not the presence of compression, but rather its depth, which is significantly deeper and varies across different styles of writing.12
Why does reading order fail to capture written structure?
A strictly linear sequence cannot distinguish between different hierarchical groupings of identical words. Xiang proved that an arbitrary sequence of length n tokens admits two raised to the power of n minus one potential paragraph segmentations.1 A single, fixed reading order can therefore correspond to an exponential variety of valid hierarchical organizations, making linear position an incomplete metric for document structure.1
To isolate how paragraph position affects internal processing, Xiang created an experimental framework using a coordinate system composed of three values. In this representation, the first coordinate tracks the paragraph index, the second records the sentence index within the paragraph, and the third marks the token index within the sentence.1 By separating these three levels into independent coordinate channels, the design allows researchers to alter the assigned paragraph identity of a passage while keeping the exact wording and linear token order unchanged.1
The underlying technical mechanism builds upon rotary positional embeddings, a widespread mathematical method that encodes token position through rotational angles applied to vectors. Xiang structured this implementation, designated as hierarchical rotary positional encoding, by dividing the available vector channels into three independent groups that operate concurrently without merging coordinates into a single scalar value.1 Each channel group calibrates its base frequency from corpus statistics, applying a safety margin above one to ensure that the lowest-frequency channel remains monotonic and does not wrap across typical document lengths.

Xiang evaluated the framework across four primary models of identical size, alongside a periodic mirror control, to verify that any observed differences stemmed from structural information rather than channel capacity. The primary configurations included a flat baseline with standard linear rotary encoding, an axial model with sentence and token coordinates, a full three-coordinate hierarchical model, and a random axial control that substituted true paragraph positions with resampled random labels matched to boundary density.1 The periodic mirror control assigned paragraph indices based on a deterministic division of token distance, allowing Xiang to separate genuine boundary tracking from arbitrary periodic patterns.1
How do artificial boundaries alter the focus of a model?
Counterfactual interventions demonstrate that swapping paragraph coordinates directly alters the strength of internal attention between tokens. Xiang tested this causal effect by applying two complementary manipulations to documents while holding their underlying text completely static. In the artificial-merge condition, two adjacent, authentic paragraphs were assigned the same paragraph coordinate, effectively removing the structural boundary.1 In the artificial-split condition, an artificial boundary was inserted inside a single paragraph by incrementing the paragraph index halfway through.1
To evaluate these shifts without interference from linear distance, Xiang developed a token-distance-exact estimator that calculates an effective attention metric. The estimator averages attention scores across all network layers and attention heads, then fits a linear trend to the logarithmic scores as a function of token distance. Subtracting this fitted linear trend removes the dominant exponential decay caused by simple physical separation, leaving a residual score that captures variations attributable to structural coordinates.
Xiang measured the impact of these interventions against two natural baselines: the baseline attention level between token pairs within the same paragraph, normalized to zero, and the natural attention drop across authentic boundaries, normalized to one.1 Under the artificial-merge manipulation, the effective attention between tokens spanning the erased boundary increased, shifting downward from the boundary baseline toward the within-paragraph baseline.1 Under the artificial-split manipulation, introducing a fake boundary immediately suppressed attention between the separated tokens, producing a measurable drop in attention even though no words were changed.
The drop in attention caused by the artificial-split intervention occurred in all three corpora examined in the study.1 These datasets included narrative prose from WikiText-2, diverse web articles from OpenWebText, and Python computer programs from a dedicated source code repository.1 When testing the flat baseline and the model lacking a paragraph channel, falsifying paragraph assignments produced zero change in effective attention, confirming that the observed suppression was a direct causal consequence of the paragraph coordinate.1
What separates genuine paragraph breaks from random divisions?
Genuine paragraph structure produces a much deeper compression of attention than a random label matched for boundary frequency. When Xiang evaluated the random axial control model, which contained an architecturally identical paragraph channel fed with random boundary labels, that system also compressed attention across its assigned boundaries.1 The existence of compression alone is therefore insufficient to prove that a model recognizes authentic textual organization.
The accidental discovery that random boundaries also compressed attention altered the direction of the study. Shuyang told Primary that the random control was added merely as a baseline check: "Honestly, I didn't see it coming. The random control wasn't even in my original plan. I added it later, just as a sanity check. I figured it would come back flat and that'd be that." When random labels also triggered compression, Shuyang investigated whether rotational mathematics was causing an artifact, explaining, "Random labels got compressed too. That was a real "wait, what?" moment. So of course I started wondering if the whole thing was just a RoPE artifact. Give paragraphs their own rotation channel and the phase shifts, real boundary or not."
That realization redirected the inquiry toward measuring the depth of the compression rather than its mere presence. Shuyang said, "That's what pushed me to compare depth. Everything compressed, so the question became how much. And that's where they split. Random stayed shallow and pretty much the same everywhere. Real paragraphs went deeper, and how deep depended on the corpus." Across natural language collections, authentic boundaries often produced deeper compression than the random control, but the real-versus-random depth gap was resolvable in two of three corpora and not in the third. Furthermore, the depth of compression under authentic boundaries varied across different writing domains, whereas the random control exhibited a shallow, uniform response regardless of the material.

Previous reporting had suggested that unmanipulated sentence boundaries in Python source code provoked a strong drop in attention due to rigid programming syntax.1 Shuyang disputed that characterization in response to questions from Primary, stating, "Just to clarify: we didn't study sentence structure on its own. Sentence boundaries only come in as the starting point for the fake-split test. And actually, in Code those pairs don't show a drop. They sit on the other side of the within-paragraph baseline. So I wouldn't read it as code "cutting off" attention at sentences." Shuyang added that individual attention heads were never inspected, meaning the data cannot confirm how programming scope splits computational attention across lines of code.
To investigate whether this varying compression depth could be explained by surface statistics of the text, Xiang evaluated eight corpus properties spanning three conceptual categories: lexical persistence, paragraph length, and embedding-based coherence.1 Lexical persistence tracks how frequently specific vocabulary repeats across sequential blocks, paragraph length measures the physical scale of text segments, and embedding coherence evaluates semantic consistency using vector representations. None of these independent corpus metrics fully reproduced the cross-corpus ordering of compression depth, although embedding-based coherence aligned most closely with the observed behavior.1
Addressing why authentic boundaries trigger deeper compression, Shuyang emphasized that the underlying reason remains an open question. "Honestly, I'd push back on the question a little. The paper shows that real boundaries get deeper compression. It doesn't really show why," Shuyang said in response to questions from Primary. Suggesting an intuitive hypothesis, Shuyang added, "Real boundaries actually tell the model something. Stuff in the same paragraph is usually more useful for predicting the next word, so the model learns to lean on that. Random labels don't tell it anything, so it doesn't bother."
What limits the reach of these findings?
Experimental evaluations carry several technical boundaries that qualify how broadly the findings apply to real-world systems. The residual attention metric relies on a first-order linear fit to remove the dominant effect of token distance, leaving a known limitation that nonlinear distance interactions may still influence the calculated residuals.1 Shuyang confirmed to Primary that while exact distance matching eliminates residual curvature when comparing pairs at identical distances, uncontrolled curvature could still affect the unnormalized fake-merge and fake-split scores.
Furthermore, the experimental evaluations were conducted on compact models configured with eight layers, eight attention heads, a hidden dimension of 512, and a context window of 1024 tokens trained for 5000 steps.1 Shuyang explained to Primary that this scale was dictated by computational resources on a single machine, noting that training curves had fully flattened and early stopping had engaged. Although preliminary trials on slightly larger configurations yielded matching trends, whether the same dynamics hold in multi-billion parameter production architectures remains unverified.
Finally, the analysis focused exclusively on manipulating the paragraph coordinate while keeping sentence and token coordinates fixed, leaving the causal dynamics of finer-grained sentence divisions untested.1 The paper is an academic preprint and has not yet completed peer review, meaning its claims represent an initial contribution to positional modeling rather than settled consensus.
What questions remain open for machine comprehension?
The discovery that compression depth serves as an authentic signature of hierarchy suggests that language models can be equipped with explicit structural axes without abandoning the benefits of relative positional encodings. Earlier engineering efforts in long-document processing, such as the HiRoPE framework developed by Kechi Zhang and colleagues at Peking University in March 2024, showed that dividing rotary dimensions into multi-level hierarchical formats could improve length extrapolation in code models. Xiang's analysis approaches hierarchical coordinates from an analytical direction, showing that internal attention maps respond in systematic, measurable ways to higher-level textual divisions.
Several concrete tests could establish whether this boundary sensitivity represents genuine structural understanding or an unidentified statistical artifact. Shuyang identified three experimental controls that could challenge the finding: fake boundaries matching the exact length distribution of authentic paragraphs, content shuffling where sentences are scrambled across paragraphs while keeping boundary tags fixed, and tests on massive scale. "If I placed fake boundaries with the same length distribution as the real ones and the gap vanished, that'd mean it was about lengths, not structure," Shuyang told Primary.
Determining what actually drives compression depth across different genres will require testing how models utilize cross-boundary context during next-token prediction. Shuyang suggested that corpus-level metrics may be inadequate because they do not reflect operational utility during inference: "All eight metrics we tested are things you can compute from the corpus alone. But the model doesn't care about lexical overlap or length as such. It cares about whether looking back across the boundary helps it predict the next word." Measuring how prediction accuracy degrades when previous paragraphs are removed could finally reveal why neural attention respects the architecture of human writing.
The record
58 sentences trace to 2 sources and 1 contributor.
- 1 Paragraph Boundaries Are Not White Space:Compression Depth as the Signature of Hierarchical Structure Preprint · may not have been peer reviewed See the source
- 2 Paragraph Boundaries Are Not White Space:Compression Depth as the Signature of Hierarchical Structure Preprint · may not have been peer reviewed See the source
- 3 Contribution — Shuyang Xiang 12 statements added to this article
Other consulted pages1 page
ar5iv.labs.arxiv.org1 page
Article history
-
Published 30 Nov 2026, 15:19Assembled by the Primary desk from 2 sources · 1 contributor · 58 cited sentences
-
Shuyang Xiang
- Go to the sentence: Shuyang told Primary that the random control was added merely as a baseline check: "Honestly, I didn't see it coming. The random control wasn't even in my original plan. I added it later, just as a sanity check. I figured it would come back flat and that'd be that."
- Go to the sentence: When random labels also triggered compression, Shuyang investigated whether rotational mathematics was causing an artifact, explaining, "Random labels got compressed too. That was a real "wait, what?" moment. So of course I started wondering if the whole thing was just a RoPE artifact. Give paragraphs their own rotation channel and the phase shifts, real boundary or not."
- Go to the sentence: Shuyang said, "That's what pushed me to compare depth. Everything compressed, so the question became how much. And that's where they split. Random stayed shallow and pretty much the same everywhere. Real paragraphs went deeper, and how deep depended on the corpus."
- Go to the sentence: Shuyang disputed that characterization in response to questions from Primary, stating, "Just to clarify: we didn't study sentence structure on its own. Sentence boundaries only come in as the starting point for the fake-split test. And actually, in Code those pairs don't show a drop. They sit on the other side of the within-paragraph baseline. So I wouldn't read it as code "cutting off" attention at sentences."
- Go to the sentence: Shuyang added that individual attention heads were never inspected, meaning the data cannot confirm how programming scope splits computational attention across lines of code.
- Go to the sentence: Addressing why authentic boundaries trigger deeper compression, Shuyang emphasized that the underlying reason remains an open question.
- Go to the sentence: "Honestly, I'd push back on the question a little. The paper shows that real boundaries get deeper compression. It doesn't really show why," Shuyang said in response to questions from Primary.
- Go to the sentence: Suggesting an intuitive hypothesis, Shuyang added, "Real boundaries actually tell the model something. Stuff in the same paragraph is usually more useful for predicting the next word, so the model learns to lean on that. Random labels don't tell it anything, so it doesn't bother."
- Go to the sentence: Shuyang confirmed to Primary that while exact distance matching eliminates residual curvature when comparing pairs at identical distances, uncontrolled curvature could still affect the unnormalized fake-merge and fake-split scores.
- Go to the sentence: Shuyang explained to Primary that this scale was dictated by computational resources on a single machine, noting that training curves had fully flattened and early stopping had engaged.
- Go to the sentence: "If I placed fake boundaries with the same length distribution as the real ones and the gap vanished, that'd mean it was about lengths, not structure," Shuyang told Primary.
- Go to the sentence: Shuyang suggested that corpus-level metrics may be inadequate because they do not reflect operational utility during inference: "All eight metrics we tested are things you can compute from the corpus alone. But the model doesn't care about lexical overlap or length as such. It cares about whether looking back across the boundary helps it predict the next word."
