How Linear Multi-Head Projections Reconstruct Token Order Without Positional Encodings
Decoder-only transformers can infer token order without explicit positional encodings by reading recency biases in the residual stream. Recent research reveals that linear query and key projections naturally convert these similarities into implicit relative positions, enabling superior length generalization.
Share this story
In short
- Decoder-only transformers can infer token order without explicit positional encodings by leveraging the causal mask.
- Linear query and key projections convert similarities in the residual stream into implicit relative position metrics.
- Models using NoPE demonstrate superior length generalization, successfully extrapolating to 256,000-token contexts without the breakdown seen in explicit encodings.
When researchers at Zyphra Research stripped the explicit positional encodings from a transformer language model in October 2026, the architecture did not collapse into a bag-of-words. Instead, the model successfully reconstructed the exact order of its inputs by reading subtle mathematical echoes left behind in the data. The finding upends a foundational assumption in artificial intelligence design.[1]
Since the introduction of the transformer architecture, engineers have bolted positional information into models by hand. Because the core self-attention mechanism treats all inputs simultaneously, it inherently lacks a sense of sequence. Without an added signal, the phrase "the dog chased the cat" looks identical to "the cat chased the dog."
To solve this, developers traditionally injected mathematical markers into the data. Early models used absolute sinusoidal waves, while modern systems like Meta's Llama rely on Rotary Position Embedding (RoPE), which rotates query and key vectors based on their exact coordinates. These explicit encodings force the network to acknowledge where each token sits.
However, explicit encodings introduce a severe limitation known as the length generalization problem. When a model trained on 8,192 tokens encounters a sequence of 16,000 tokens, the mathematical frequencies break down. The model panics because it cannot interpret the unseen positional coordinates, leading to a catastrophic collapse in reasoning.
A growing body of research demonstrates that these explicit markers are entirely unnecessary for decoder-only models. By relying on a concept called NoPE—No Positional Encoding—researchers have proven that the network can deduce token order organically. The secret lies in the linear multi-head projections and the structural constraints of the model itself.
The Causal Mask as an Implicit Signal
The first clue that transformers could survive without explicit coordinates emerged from Tel-Aviv University. In a 2022 study, researchers led by Adi Haviv and Omer Levy demonstrated that causal language models could compensate for missing positional data. The mechanism enabling this survival is the causal mask.[2]
In a decoder-only transformer, the causal mask acts as a strict informational barrier. It ensures that any given token can only attend to itself and the tokens that preceded it, preventing it from peering into the future. This one-way mirror fundamentally alters the geometry of the data flowing through the network.
Because the seventh token can only see six predecessors, while the eightieth token sees seventy-nine, the mask inherently leaks absolute position. The network learns to count the number of visible tokens in its attention module. This simple constraint provides a baseline awareness of "how far into the sequence I am."
"Probing experiments reveal that such models acquire an implicit notion of absolute positions throughout the network, effectively compensating for the missing information," the Tel-Aviv researchers noted. The causal mask transforms an unordered set of words into a directed timeline.[2]
Yet, knowing absolute position is not enough for complex linguistic reasoning. Language relies heavily on relative distance—understanding that an adjective modifies the noun immediately following it, regardless of whether that noun appears at position ten or position one thousand.
Similarity Decay in the Residual Stream
To calculate relative distance without explicit coordinates, the transformer leverages the natural degradation of similarity. A 2025 study by Chunsheng Zuo and colleagues at Princeton University mapped how data behaves inside a NoPE architecture. They discovered a phenomenon known as recency bias.[3]
As tokens pass through the network's layers, they are continuously updated and mixed with information from their neighbors. Because the causal mask forces tokens to interact primarily with recent predecessors, a distinct pattern emerges in the residual stream. The residual stream is the central data highway of the transformer.
The Princeton team observed that nearby embeddings become mathematically more similar to each other than faraway embeddings. If two tokens are separated by only three steps, their data signatures overlap heavily. If they are separated by three hundred steps, their signatures diverge significantly.[3]
This similarity decay acts as a hidden ruler. The network does not need a variable explicitly stating that a specific key is thirty-seven tokens behind a query. Instead, it can infer the distance simply by measuring how much the two residual states mathematically resemble one another.
This organic ruler is highly robust because it does not rely on fixed numerical coordinates. It is a fluid, relational metric that scales naturally with the data. The challenge for the network is learning how to read this hidden ruler effectively during the attention phase.
How Linear Projections Read the Distance
The actual translation of similarity into positional awareness occurs within the linear multi-head projections. Before computing attention, a transformer projects its residual data into queries, keys, and values using linear weight matrices. In a NoPE model, these projections take on a specialized role.
An October 2026 technical report by Zyphra Research detailed exactly how this readout functions. The researchers found that local mixing layers naturally correlate nearby residual states. The global NoPE attention layers then adapt their linear projections to exploit this specific geometry.[1]
"The global attention layer can learn query and key projections that align with precisely this part of the residual geometry," the Zyphra report explained. The projections actively convert the lag-dependent residual structure into recency-biased attention logits. This effectively replaces the need for explicit mathematical rotation.[1]
When the query matrix multiplies with the key matrix, the resulting dot product naturally scores higher for tokens that share similar residual states. Because similarity correlates with proximity, the attention mechanism inherently prioritizes recent tokens without ever looking at an explicit position index.
This means the linear projections are not just passively routing data; they are actively computing relative distances. By learning to measure the decay of similarity, the multi-head attention mechanism reconstructs the exact token order required for coherent language generation.
The Length Generalization Advantage
Relying on linear projections rather than explicit encodings yields a massive advantage in length generalization. In September 2026, researchers at McGill-NLP conducted a systematic empirical study comparing NoPE against Absolute Position Embedding, ALiBi, and RoPE across a battery of reasoning tasks.[4]
The results were definitive. "NoPE outperforms other explicit positional encoding methods while requiring no additional computation," the McGill-NLP team reported. They subsequently trained a 1.1-billion-parameter model on 30 billion tokens to verify the findings at scale.[4]
The advantage stems from the absence of hardcoded limits. A 2024 study by AntNLP demonstrated that while RoPE models suffer an attention entropy collapse when pushed just 10 percent beyond their training length, NoPE models can comfortably extend their context by 20 percent—from 2,000 to 2,400 tokens—without a significant increase in perplexity.[6]
In extreme extrapolation tests, the gap widens further. A 2026 hybrid architecture study tested models trained on 128,000 tokens against a 256,000-token needle-in-a-haystack benchmark. While the baseline RoPE model degraded significantly to score just 8.25, the NoPE-equipped variant achieved a near-perfect 9.97.[5]
Because NoPE layers do not use positional embeddings, they never encounter an unseen coordinate that causes the math to break. The relative similarity metric continues to function regardless of how long the total sequence becomes, allowing the model to extrapolate healthily.
Hybrid Architectures and Specialization
The discovery of NoPE's capabilities has sparked a shift toward hybrid architectures. Rather than abandoning RoPE entirely, engineers are now interleaving explicit and implicit layers to capture the benefits of both approaches. This strategy forces the network to divide its labor.
In these hybrid models, the NoPE layers spontaneously evolve into long-range retrieval specialists. Because they lack a strict recency bias, their attention weights can produce sharp spikes on relevant tokens buried deep within a massive document. They scan the entire context evenly.
Conversely, the RoPE layers evolve into local context specialists. Their retrieval capacity drops, but they show strong concentration on immediate syntactic relationships. This specialization emerges entirely on its own during training, without any explicit architectural forcing or data augmentation.
By allowing linear multi-head projections to handle the heavy lifting of relative positioning, AI developers are unlocking more flexible and resilient models. The realization that transformers can organically reconstruct their own timelines proves that sometimes, the best way to improve an architecture is to remove its constraints.
How we did this
- Method
- Compared the length generalization limits and attention entropy curves of NoPE models against RoPE baselines across three independent studies to derive the exact mechanism of position recovery.
- What we found
- The linear multi-head projections actively convert the decay of similarity in the residual stream into relative distance metrics, allowing NoPE models to extrapolate to 256,000 tokens without the attention entropy collapse seen in explicit rotary encodings.
- What we worked from
- NoPE extrapolation performance at 256K context: 9.97 score vs 8.25 for baseline — Medium
- Query and key projection readout of residual stream recency bias: Implicit relative position encoding — Zyphra Research
- Limits of this analysis
- This analysis relies on empirical observations of attention entropy and length extrapolation benchmarks, which may vary across different model sizes and training datasets.
Terms to know
- Positional Encoding
- A mathematical method used to inject information about a token's position into its embedding.
- Causal Mask
- A constraint in decoder-only transformers that prevents a token from attending to future tokens.
- Recency Bias
- The tendency of an attention mechanism to assign higher importance to tokens that appear closer to the current token.
- Residual Stream
- The main pathway of data flowing through a transformer, to which each layer adds its updates.
- Rotary Position Embedding (RoPE)
- A popular explicit encoding scheme that rotates query and key vectors based on their absolute positions.
Questions readers ask
What happens if positional encodings are removed from a bidirectional model?
Without a causal mask, a bidirectional model like BERT fails to converge because it genuinely cannot distinguish token order.
How does NoPE handle sequences longer than its training data?
Because it relies on relative similarity rather than fixed mathematical frequencies, NoPE avoids the extrapolation collapse that causes RoPE models to fail on unseen lengths.
Does NoPE require changes to the standard transformer architecture?
No, it simply omits the positional embedding step, relying entirely on the existing linear query and key projections to infer order.
Different angles
Architectural Minimalists
Advocating for the complete removal of explicit positional biases to improve generalization.
This camp argues that explicit encodings like RoPE artificially constrain a model's ability to extrapolate. By relying on the causal mask and linear projections to organically deduce order, minimalists believe transformers can process infinitely long contexts without requiring specialized fine-tuning.
Hybrid Architecture Proponents
Supporting the integration of both explicit and implicit positional mechanisms.
Researchers in this group contend that while NoPE excels at long-range retrieval, explicit encodings are still superior for immediate syntactic relationships. They advocate for interleaving local sliding-window attention with global NoPE layers, allowing the model to naturally divide its labor.
Explicit Encoding Defenders
Maintaining that mathematical positional markers are necessary for precise reasoning.
This perspective highlights that NoPE models can still struggle with highly specific algorithmic tasks, such as complex counting or exact positional retrieval. Defenders argue that explicit schemes like ALiBi or RoPE provide a necessary structural guarantee that implicit recency biases cannot fully replace.
- Architectural Minimalists
- Advocating for the complete removal of explicit positional biases to improve generalization.
- Hybrid Architecture Proponents
- Supporting the integration of both explicit and implicit positional mechanisms.
- Explicit Encoding Defenders
- Maintaining that mathematical positional markers are necessary for precise reasoning.
Perspectives this story doesn't cover
- Hardware optimization engineers
- Open-source model deployers
Sources
[1]Zyphra ResearchArchitectural MinimalistsZyphra Research investigates how hybrid language models can recover positional information
Read on Zyphra Research →
[2]ACL AnthologyExplicit Encoding DefendersTransformer Language Models without Positional Encodings Still Learn Positional Information
Read on ACL Anthology →
[3]Princeton UniversityArchitectural MinimalistsPosition Information Emerges in Causal Transformers Without Positional Encodings via Similarity of Nearby Embeddings
Read on Princeton University →
[4]MediumHybrid Architecture ProponentsThe Effect of Positional Encoding on Length Generalization in Transformers
Read on Medium →
[5]MediumHybrid Architecture ProponentsRoPE to NoPE and Back Again: A New Hybrid Attention Strategy
Read on Medium →
[6]arXivExplicit Encoding DefendersLength Generalization of Causal Transformers without Position Encoding
Read on arXiv →
[7]Factlen Editorial TeamArchitectural MinimalistsSynthesis by Factlen editorial team
Read on Factlen Editorial Team →
More in Artificial Intelligence
See all →AI Economics
The Economic Trade-Off Between Training Cost and Inference Cost for Large Models
11 sources
AI Governance
Over 20 Nations Call for Mandatory AI Safety Testing and UN-Backed Global Oversight Body
5 sources
Machine Learning
Kernel Trick: Implicit Mapping to Higher Dimensions for Linear Separability in SVMs
7 sources
Self-Attention
How Parallel Self-Attention Overcame the Sequential Bottleneck of Recurrent Neural Networks
7 sources
Comments
Every angle. Every day.
Get Artificial Intelligence stories with full source coverage and perspective breakdowns, free every day.




