Manuscript Offprint
arXiv:2608.20172Ask Self, Ask Others: Relation Is All You Need
Abstract
Attention dominates token mixing, but it collapses relation formation and flow allocation into a single score-to-flow step. We introduce Relation, which separates them by first organizing pairwise evidence into explicit Self and Exchange relations and deriving information flow afterward. Relation first decides whether a token should rely on itself or draw from its history, and if it draws from history, where to look. This relational organization gives rise to Full Relation, FlashRelation, Linear Relation, and Hybrid Relation. Across matched decoder-only models, Full Relation achieves lower mean final-validation NLL than MHA and reaches the paired MHA final training loss with 4.5–7.3% fewer tokens. Structural diagnostics further show that Relation learns a distinct depth organization: the first layer acts as a current-token anchor and a high-rank router, while later layers shift strongly toward history. In a fixed-context reference benchmark, FlashRelation is faster than the materialized Full Relation implementation. Across scale-matched production workloads, it reaches of PyTorch FlashAttention throughput while executing the exact Full Relation operator. Hybrid Relation demonstrates that Full and Linear Relation layers can be composed within a single decoder. These results support a relation-first view of token mixing: ask Self, ask Others, then let Flow follow Relation.
† These authors contributed equally. ∗ Corresponding author.
Keywords: Relation, Self–Exchange Relation, Token Mixing, Language Modeling, Efficient Sequence Modeling
1 Introduction
In scaled dot-product Attention, each head maps the interaction between two projected token states to a scalar score (Vaswani et al., 2017),
Token interactions in language are heterogeneous, but Attention reduces each pairwise interaction to a single scalar. The scalar carries too much: the same must encode whatever relational structure matters and directly determine information flow. Relation formation and flow allocation are therefore compressed into a single step.
Attention itself was not always primary. It first appeared as an auxiliary mechanism within recurrent encoder–decoder models before becoming the organizing primitive of the Transformer (Bahdanau et al., 2015; Vaswani et al., 2017). Relation-aware Attention places relation in a similarly subordinate position. Shaw et al. (2018) augment self-attention with pairwise relation representations, but relation is still inside Attention. Attention remains primary: it incorporates relation into its own computation and still determines the flow. We reverse this hierarchy: Flow follows Relation.
Figure 1: Overview of Relation.
We begin by partitioning each causal Relation row into two minimal structural roles: Self and Exchange. Self describes a token’s relation with itself, while Exchange describes its relation with other tokens. Pairwise evidence is mapped into these two roles before normalization, and the resulting entries are assembled into a causal Relation matrix . Normalized information flow is derived only afterward. This defines the basic Self–Exchange Relation (SER) operator, which extends naturally to Multi-Head Relation (MHR). This explicit organization also exposes further forms of Relation in practice: Full Relation retains explicit token-wise history, FlashRelation factorizes it for tiled execution, Linear Relation compresses historical Others into a recurrent state, and Hybrid Relation combines Full and Linear layers.
We evaluate Relation in matched decoder-only models at approximately 10M, 30M, and 100M parameters. Full Relation improves mean final-validation NLL at all three scales. Structural ablations examine its behavior, while FlashRelation, Linear Relation, and Hybrid Relation demonstrate practical implementations of the framework (Figure 1). Our main contributions are:
- We introduce Self–Exchange Relation (SER) and Multi-Head Relation (MHR) as Relation operators for token mixing.
- We characterize Self–Exchange flow and derive its exact factorization into Self mass, aggregate Exchange mass, and allocation within historical Exchange. Matched structural diagnostics further show that Relation learns an internal organization distinct from Attention.
- Building on Relation’s distinct relational organization, we develop Relation-specific practical forms, including FlashRelation, Linear Relation, and Hybrid Relation, to make the framework practical across exact fused, recurrent, and hybrid execution.
Beyond Attention, alternative token-mixing operators explore different ways to organize information exchange across a sequence. FNet uses Fourier mixing (Lee-Thorp et al., 2022), PoNet uses multi-granularity pooling (Tan et al., 2022), and HyperMixer constructs token-mixing MLPs (Mai et al., 2023). These approaches organize token interaction through different mixing operators, whereas Relation organizes token mixing around explicit pairwise relations.
A third line changes how token mixing is executed or how history is represented. FlashAttention and FlashAttention-2 provide tiled, IO-aware execution of exact softmax Attention (Dao et al., 2022; Dao, 2024). Linear and recurrent methods replace explicit quadratic token-token interaction with associative or recurrent states (Katharopoulos et al., 2020; Sun et al., 2023; Yang et al., 2024; Yang et al., 2025). KDA further develops recurrent-state token mixing, and Kimi Linear combines recurrent KDA with full-attention MLA layers in a hybrid architecture (Kimi Team et al., 2025). Relation likewise admits efficient and recurrent realizations, while preserving the same principle: Flow follows Relation.
3 Relation
We first introduce Self–Exchange Relation (SER), the basic Relation operator. We then extend SER to Multi-Head Relation (MHR), as illustrated in Figure 2.

Figure 2: Self–Exchange Relation and Multi-Head Relation.
3.1 Self–Exchange Relation
Given an input sequence , we project it into two relation spaces and an information space,
The head-wise and entering use RoPE (Su et al., 2024), while remains unrotated. We use two basic relational roles: Self (ask self), which measures the current token itself, and Exchange (ask others), which measures other tokens. We map pairwise evidence into these roles as
The Self temperature controls the scale and smoothness of the bounded Self mapping. We set in all formal experiments.
Aggregate Exchange evidence grows with the number of historical candidates, even without stronger individual Exchange relations. We therefore apply a learnable layer-wise correction to all historical Exchange entries, following the broader use of logarithmic length corrections in attention mechanisms (Ramapuram et al., 2025).
Normalized information flow is derived only after the Relation has been constructed and is applied to the information states,
3.2 Multi-Head Relation
We extend Relation to heads, each of width . Each head independently constructs its own relation matrix and normalized flow .
However, the projected information state is simply split into head-wise slices . Because each is formed independently while comes from direct slicing, their head-wise correspondence is imposed. We therefore mix adjacent information slices using learnable Givens rotations (Jing et al., 2017). The pairing pattern alternates between successive layers,
4 Why Relation
We now examine what follows from placing Relation before Flow: how Self and Exchange organize Flow, and what determines the resulting allocation.
4.1 Relation Is Constructed Before Flow
Attention normalizes pairwise compatibility scores directly into token-to-token flow. Relation does not. Pairwise evidence is first organized into Self and Exchange and assembled into a role-structured matrix . Flow is derived only afterward. Relation therefore separates relation construction from flow allocation.
Making explicit in the operator does not require materializing the full matrix in memory. Its entries can be constructed and consumed on demand.
4.2 How Relation Forms Self–Exchange Flow
Because Self and Exchange are explicit in , Flow inherits an exact two-level structure. For token , define the historical Exchange log-normalizer , its count-corrected aggregate , and the full row normalizer as
The first level divides Flow between Self and aggregate Exchange,
Thus, and form an exact Self–Exchange split. Conditional on Exchange, the second level allocates the Exchange mass across historical tokens according to
The same two-level structure has a direct interpretation in information space. Define the Exchange aggregate and its displacement from Self as
Here, points from the Self state toward aggregate Exchange, while determines how far the output moves in that direction. As increases from 0 to 1, moves continuously from toward . Since , lies exactly on the segment between them.
The normalized flow therefore has two levels. It first determines how much mass remains with Self and how much enters Exchange. Conditional on Exchange, it then determines how that mass is distributed across historical tokens. Intuitively, Relation first asks whether a token should rely on itself or draw from its history, and if it draws from history, it then decides where to look.
4.3 Inside Relation: How a Token’s Flow Is Determined
For an individual token , the first level is determined by the gap between aggregate Exchange and Self:
A larger shifts Flow toward Exchange, while a smaller shifts it toward Self.
Conditional on Exchange, the second level determines allocation within history. For any two historical positions ,
The row-wise correction cancels in these pairwise differences. It therefore changes the Self–Exchange split without changing allocation within Exchange. That allocation is determined entirely by the Exchange relations .
The same two-level Relation structure also appears in backward credit assignment: gradients first act on the Self–Exchange balance and then on allocation among historical Others. Appendix A.1.7 gives the full derivation.
5 Relation in Practice
The same Self–Exchange organization gives rise to a family of practical Relation forms. We call the explicit token-to-token operator defined in Sec. 3 Full Relation. FlashRelation is its exact fused execution, while Linear Relation represents historical Relation through a recurrent state. Hybrid Relation composes Full and Linear layers within a single decoder.
5.1 Factorized Self–Exchange: FlashRelation
The Relation factorization derived in Sec. 4.2 separates historical Exchange aggregation from the final allocation between Self and Exchange. This factorization leads us to develop FlashRelation, a tiled realization of Full Relation. For token , historical Exchange entries are processed through a causal tiled scan. For each tile , we maintain a running maximum , normalizer , and information accumulator :
After each tile, . Let denote the terminal accumulators after the historical Exchange scan. They yield
where is the aggregate historical Exchange log-normalizer and is the normalized historical information summary. The row is then completed by
Following the online-softmax tiling principle of FlashAttention (Dao et al., 2022), the historical Exchange scan is evaluated tile by tile without materializing the full or .
5.2 Change Exchange: Linear and Hybrid Relation
Linear Relation preserves Self and changes Exchange. Self remains tied to the current token, while Exchange changes from explicit interaction with individual historical tokens to a recurrent relational state. Historical Others are compressed into
The Self relation keeps the construction of Sec. 3.1. Using the same projections, Linear Relation computes together with two normalized relation coordinates as
The recurrent state carries historical Others through an input-dependent channel-wise retention. The same RoPE used in Sec. 3.1 is applied to and before and the normalized coordinates are formed. We parameterize this retention following KDA (Kimi Team et al., 2025) as
With historical Others compressed into a recurrent state, Self remains explicit in both reading history and writing the current token into that state. Linear Relation therefore follows
Unrolling the recurrent state exposes how each historical Other contributes to the current Exchange:
Self therefore remains active on both sides of recurrent Exchange: when a token becomes historical, and when history is read. Linear Relation changes how Exchange is represented while preserving the Self–Exchange organization. The full derivation is given in Appendix A.4.
Exchange remains strictly historical because the retained state is read before the current token is written into it.
Changing Exchange to a recurrent state also changes its computational regime. Table 1 summarizes the resulting token-mixing complexity and decode-state requirements.
Table 1: Complexity refers to the token-mixing core. Linear sequential operations refer to the direct recurrence.
| Layer Type | Token-Mixing Complexity | Sequential Ops. | Decode History State |
|---|---|---|---|
| MHA / FlashAttention | |||
| Full / FlashRelation | |||
| Linear Relation |
Full and Linear Relation occupy complementary execution regimes. Linear Relation scales linearly with sequence length and uses a fixed-size decode state, while Full Relation retains sequential operations. Hybrid Relation combines both within a single decoder by interleaving Linear and Full Relation layers. Following the hybrid layerwise design used in Kimi Linear (Kimi Team et al., 2025), our evaluated configuration uses nine Linear Relation layers and three Full Relation layers.
6 Experiments
We compare MHA and Full Relation under matched decoder geometry, data order, and training budget. Experiments cover approximately 10M, 30M, and 100M parameters and use paired seeds 42, 43, and 44. Scale-specific architectures, datasets, context lengths, and token budgets are summarized in Table 2. Our primary metric is final-checkpoint NLL on the full validation set, and structural ablations use the 10M setting with the same three seeds. We additionally report matched-train-loss token reduction, measuring how many fewer training tokens Relation requires to reach the paired MHA run’s final smoothed training loss. All models use full-head RoPE with base and no positional scaling. Systems benchmarks are conducted separately on an NVIDIA RTX 5090 in BF16 and report tuned steady-state throughput. Full optimization, evaluation, and per-seed details are provided in Appendices B and C.
6.1 Language Modeling and Structural Ablations
Full Relation improves mean final-validation NLL at all three model scales while also reaching the paired MHA final training loss with fewer tokens (Table 2). The corresponding token reductions are 7.3%, 5.7%, and 4.5% at 10M, 30M, and 100M.
Table 2: Main validation results. NLL is mean sample standard deviation over three seeds. Backbone reports layers / / heads / . Token reduction reports fewer Relation training tokens required to reach the paired MHA run’s final smoothed train loss.
| Scale | Backbone | Data/Vocab | Ctx | Tokens | MHA NLL | Relation NLL | Token reduction | |
|---|---|---|---|---|---|---|---|---|
| 10M | 6L/384/848/768 | TinyStories/4K | 1024 | 150M | ||||
| 30M | 10L/512/864/1024 | TinyStories/4K | 2048 | 450M | ||||
| 100M | 20L/640/880/1280 | SmolLM/32K | 4096 | 1.071B |
The Full Relation structure matters. Exchange-only transport and Raw- communication increase NLL by 0.0320 and 0.0366, while removing count calibration or collapsing Relation to a single head produces larger degradations of about 0.051 (Table 3). The exact ablation definitions and per-seed results are provided in Appendix D.
Table 3: Structural ablations on the 10M setting. NLL is mean sample standard deviation over three seeds.
Metric Full Relation Exchange-only transport Raw- communication No count calibration Single head NLL vs Full —
6.2 Is Relation Attention?
Both Relation and Attention ultimately produce normalized token-to-token flow. Their learned organization, however, is not the same. We compare matched checkpoints at 10M, 30M, and 100M across three paired seeds, focusing on two questions: how flow is organized across depth and how historical flow is routed across tokens (Table 4).
Table 4: Internal organization of matched MHA and Relation checkpoints. (a) Depth-wise organization of diagonal/Self flow and routing rank. (b) Conditional historical routing across distance and first-token sink. Values are three-seed means. Metric definitions and sampling protocol are given in Appendix B.4.
Arrows denote MHA Relation.
| (a) Depth organization | ||||
|---|---|---|---|---|
| Scale | L0 diag. / Self flow | L0 Flow EffRank | L1 diag. / Self flow | Rel. L2+ Self / Ex. |
| 10M | ||||
| 30M | ||||
| 100M |
| (b) Historical routing | ||||
|---|---|---|---|---|
| Scale | First-token sink | |||
| 10M | ||||
| 30M | ||||
| 100M |
Relation uses relation. At L0, Relation combines substantially higher Self flow than MHA’s diagonal flow with a 2.34–2.67 higher flow effective rank. At L1, Self flow falls below 1.5% at every scale. From L2 onward, 97.13–98.99% of Relation’s normalized flow is assigned to Exchange. Unlike MHA, Relation uses L0 as a Self anchor and a high-rank router, then rapidly shifts into an Exchange-dominant regime. Historical routing also shifts outward. Conditional historical mass beyond 128, 256, and 512 tokens is higher at every scale, while the first-token sink is lower at every scale.
Relation is not Attention. Across all three scales, it learns a distinct depth organization. In Attention, the normalized token-to-token flow is the Attention itself. In Relation, Flow is only the consequence of a prior Relation. Attention ends at Flow. Relation begins before Flow.
6.3 Efficient Implementations
In a fixed-context reference benchmark, FlashRelation is faster than the materialized Full Relation reference implementation. Across the three scale-matched production workloads, FlashRelation reaches of PyTorch FlashAttention throughput while executing the exact Full Relation operator (Table 5). Linear Relation throughput results are reported in Appendix H.
Table 5: FlashRelation systems results on an RTX 5090 in BF16. (a) Fixed-context () comparison with the materialized Full Relation reference. (b) Scale-matched production throughput against PyTorch FlashAttention.
| (a) Fixed-context | |||
|---|---|---|---|
| Scale | Ref. Full | FlashRelation | Speedup |
| 10M | 128,515 | 679,121 | |
| 30M | 74,376 | 365,766 | |
| 100M | 30,631 | 127,715 |
| (b) Scale-matched production | ||||
|---|---|---|---|---|
| Scale | FlashAttn. | FlashRelation | FR / FA | |
| 10M | 1024 | 841,834 | 755,088 | |
| 30M | 2048 | 361,793 | 334,028 | |
| 100M | 4096 | 107,783 | 100,167 |
Hybrid Relation combines nine Linear and three Full Relation layers in a layout. Under the 30M-class training setting, the 31.97M-parameter model achieves final-validation NLL across three seeds. This demonstrates that Linear and Full Relation layers can be composed in a decoder in which nine of twelve token-mixing layers use Linear Relation.
7 Limitations and Conclusion
Limitations. Our experiments are limited to decoder-only language models up to approximately 100M parameters and 1.071B training tokens. Full Relation is evaluated systematically across scales, while Linear and Hybrid Relation are studied only in the configurations reported here. We also fix , sigmoid for Self, and SiLU for Exchange. Other role-specific mappings may behave differently. Larger models, multimodal settings, and post-training remain unexplored.
Conclusion. We introduced Relation, an alternative token-mixing primitive that organizes pairwise evidence into explicit Self and Exchange relations before deriving information flow. Full Relation retains explicit token-wise history. FlashRelation provides exact factorized execution. Linear Relation compresses historical Others into a recurrent state, and Hybrid Relation combines Full and Linear layers.
Structural diagnostics show a repeatable organization distinct from matched MHA. Relation uses L0 as a Self anchor and a high-rank router, then shifts rapidly into an Exchange-dominant regime. Across three model scales, Full Relation achieves lower final-validation NLL than matched MHA. FlashRelation provides practical execution, while Hybrid Relation retains strong language-modeling quality with 75% Linear Relation layers.
Together, these results support a broader view of token mixing. Token mixing need not be organized directly around information flow: it can begin with Relation.
References
D. Bahdanau, K. Cho, and Y. Bengio Neural machine translation by jointly learning to align and translate. In International Conference on Learning Representations, External Links: Link Cited by: §1.
T. Chi, T. Fan, P. J. Ramadge, and A. Rudnicky KERPLE: kernelized relative positional embedding for length extrapolation. In Advances in Neural Information Processing Systems, Vol. 35, pp. 8386–8399. External Links: Document, Link Cited by: §2.
T. Dao, D. Y. Fu, S. Ermon, A. Rudra, and C. Ré FlashAttention: fast and memory-efficient exact attention with io-awareness. In Advances in Neural Information Processing Systems, Vol. 35, pp. 16344–16359. External Links: Document, 2205.14135, Link Cited by: §2, §5.1.
T. Dao FlashAttention-2: faster attention with better parallelism and work partitioning. In International Conference on Learning Representations, Vol. 2024, pp. 35549–35562. External Links: Link Cited by: §2.
W. Hua, Z. Dai, H. Liu, and Q. Le Transformer quality in linear time. In Proceedings of the 39th International Conference on Machine Learning, Vol. 162, pp. 9099–9117. External Links: Link Cited by: §2.
L. Jing, Y. Shen, T. Dubcek, J. Peurifoy, S. Skirlo, Y. LeCun, M. Tegmark, and M. Soljačić Tunable efficient unitary neural networks (EUNN) and their application to RNNs. In Proceedings of the 34th International Conference on Machine Learning, D. Precup and Y. W. Teh (Eds.), Proceedings of Machine Learning Research, Vol. 70, pp. 1733–1741. External Links: Link Cited by: §3.2.
A. Katharopoulos, A. Vyas, N. Pappas, and F. Fleuret Transformers are rnns: fast autoregressive transformers with linear attention. In Proceedings of the 37th International Conference on Machine Learning, Vol. 119, pp. 5156–5165. External Links: Link Cited by: §2.
Kimi Team, Y. Zhang, Z. Lin, X. Yao, J. Hu, F. Meng, C. Liu, X. Men, S. Yang, Z. Li, W. Li, E. Lu, W. Liu, Y. Chen, W. Xu, L. Yu, Y. Wang, Y. Fan, L. Zhong, E. Yuan, D. Zhang, Y. Zhang, T. Y. Liu, H. Wang, S. Fang, W. He, S. Liu, Y. Li, J. Su, J. Qiu, B. Pang, J. Yan, Z. Jiang, W. Huang, B. Yin, J. You, C. Wei, Z. Wang, C. Hong, Y. Chen, G. Chen, Y. Wang, H. Zheng, F. Wang, Y. Liu, M. Dong, Z. Zhang, S. Pan, W. Wu, Y. Wu, L. Guan, J. Tao, G. Fu, X. Xu, Y. Wang, G. Lai, Y. Wu, X. Zhou, Z. Yang, and Y. Du Kimi linear: an expressive, efficient attention architecture. arXiv preprint arXiv:2510.26692. External Links: 2510.26692, Link Cited by: §2, §5.2, §5.2.
J. Lee-Thorp, J. Ainslie, I. Eckstein, and S. Ontañón FNet: mixing tokens with fourier transforms. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 4296–4313. External Links: Document, Link Cited by: §2.
F. Mai, A. Pannatier, F. Fehr, H. Chen, F. Marelli, F. Fleuret, and J. Henderson HyperMixer: an mlp-based low cost alternative to transformers. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 15632–15654. External Links: Document, Link Cited by: §2.
O. Press, N. Smith, and M. Lewis Train short, test long: attention with linear biases enables input length extrapolation. In International Conference on Learning Representations, External Links: Link Cited by: §2.
C. Raffel, N. Shazeer, A. Roberts, K. Lee, S. Narang, M. Matena, Y. Zhou, W. Li, and P. J. Liu Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research 21 (140), pp. 1–67. External Links: Link Cited by: §2.
J. Ramapuram, F. Danieli, E. G. Dhekane, F. Weers, D. Busbridge, P. Ablin, T. Likhomanenko, J. Digani, Z. Gu, A. Shidani, and R. Webb Theory, analysis, and best practices for sigmoid self-attention. In International Conference on Learning Representations, Vol. 2025, pp. 65464–65519. External Links: Link Cited by: §2, §3.1.
P. Shaw, J. Uszkoreit, and A. Vaswani Self-attention with relative position representations. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pp. 464–468. External Links: Document, Link Cited by: §1, §2.
N. Shazeer, Z. Lan, Y. Cheng, N. Ding, and L. Hou Talking-heads attention. arXiv preprint arXiv:2003.02436. External Links: 2003.02436, Link Cited by: §2.
J. Su, M. Ahmed, Y. Lu, S. Pan, W. Bo, and Y. Liu RoFormer: enhanced transformer with rotary position embedding. Neurocomputing 568, pp. 127063. External Links: Document, Link Cited by: §3.1.
Y. Sun, L. Dong, S. Huang, S. Ma, Y. Xia, J. Xue, J. Wang, and F. Wei Retentive network: a successor to transformer for large language models. arXiv preprint arXiv:2307.08621. External Links: 2307.08621, Link Cited by: §2.
C. Tan, Q. Chen, W. Wang, Q. Zhang, S. Zheng, and Z. Ling PoNet: pooling network for efficient token mixing in long sequences. In International Conference on Learning Representations, External Links: Link Cited by: §2.
A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin Attention is all you need. In Advances in Neural Information Processing Systems, Vol. 30, pp. 5998–6008. External Links: Link Cited by: §1, §1, §2.
S. Yang, J. Kautz, and A. Hatamizadeh Gated delta networks: improving mamba2 with delta rule. In International Conference on Learning Representations, pp. 29687–29707. External Links: Link Cited by: §2.
S. Yang, B. Wang, Y. Shen, R. Panda, and Y. Kim Gated linear attention transformers with hardware-efficient training. In Proceedings of the 41st International Conference on Machine Learning, Vol. 235, pp. 56501–56523. External Links: Link Cited by: §2.
Appendix A Detailed Operator Derivations
This appendix records the operator definitions used throughout the paper. Token indices in the count correction are one-based. A head has width , and the information state after input projection and head mixing is denoted by .
A.1 Self–Exchange Relation
A.1.1 Relation construction
We first write the construction for one head. If the model-wide projection has width , the following quantities are understood after selecting one head subspace of width . Thus
The head-wise and entering use full-head RoPE, whereas remains unrotated. Writing and for rows of these projected states,
The Self and Exchange entries are
Here is the Self temperature used to set the scale and smoothness of the bounded Self mapping. The count-calibration parameter is one unconstrained FP32 scalar per layer, shared across heads and initialized to . Causality is imposed when these role-specific entries are assembled:
A.1.2 Exact row normalizer
The normalized row is . For , its normalizer is
Define the historical Exchange log-normalizer and its count-corrected version by
Then
A.1.3 Self mass and aggregate Exchange mass
The diagonal Self probability is
The total historical Exchange mass is
Consequently,
The Self–Exchange odds are
and therefore
A.1.4 Conditional Exchange allocation
For a historical position , define its conditional Exchange allocation as
Substituting the normalized row and the aggregate Exchange mass gives
The row-level count correction cancels because it is identical for every historical position. Hence
and the original historical flow entries factor as
A.1.5 Count correction
For any two historical positions ,
Equivalently,
Thus is a row-level Exchange translation. It changes the Self–Exchange mass competition through , but it does not change conditional Exchange allocation.
A.1.6 Exact information transport
Define the normalized historical information summary
The original Full Relation transport is
Define the Self-to-Exchange displacement by
Therefore,
Since , this is an exact interpolation between the current Self information state and the conditional Exchange aggregate. Equivalently, specifies the Self-to-Exchange displacement and specifies its magnitude.
A.1.7 Backward credit decomposition
Define:
From
we obtain
Using the Self–Exchange factorization,
Using
define
Since
Moreover,
satisfies
Therefore,
which can be written as
The first term propagates credit through the Self–Exchange amount , while the second propagates credit through the conditional Exchange allocation .
Backward propagation mirrors the same two-stage Relation semantics as the forward pass: first how much flow remains with Self versus enters Exchange, then how that Exchange flow is allocated among historical Others.
For the general Relation transport, let
Then
Because ,
For the role mappings, Self gives
If
then
For
Finally,
where the sum ranges over the valid rows in the layer.
A.1.8 Boundary case
For the first token, the historical set is empty. Define
It follows directly that
A.2 Multi–Head Relation
A.2.1 Headwise construction
Let . After projection and head splitting,
Each head independently applies the Self–Exchange construction of Appendix A.1, yielding
Relation construction is head-local and cross-head interaction is applied only to the information branch.
A.2.2 Givens block
For an adjacent head pair , define
The information states are mixed by
Since
the transformation is orthogonal. Applied to every information channel of the pair,
The same scalar angle acts on the information channels associated with the pair.
A.2.3 Alternating pairing
The formal construction uses an even number of heads, and in all formal experiments, . With one-based head indices, the two pairings are
They alternate across layers:
For ,
There are learnable angles per layer. They are stored in FP32 and initialized to zero.
A.2.4 Multi-head transport
After the role-specific flow is formed for each head,
The head outputs are concatenated and projected:
Thus the Relation construction remains head-local, Givens rotations act on the information branch, and combines the head outputs.
A.3 FlashRelation
A.3.1 Historical Exchange invariant
FlashRelation evaluates the exact factorization of Appendix A.1 without materializing the full matrices. For a fixed query row , let be the historical indices already scanned. The historical Exchange state is defined by the invariant
This scan contains Exchange entries only and Self is not included in . For the empty set,
A.3.2 Adding one tile
Let be the next causal tile and set
The previously scanned terms are rescaled into the new maximum:
Consequently, the updated normalizer is
The same rescaling gives the information accumulator
Together with , these updates preserve the invariant with .
A.3.3 Terminal accumulators
After all historical positions have been scanned,
The terminal log-normalizer is
A.3.4 Historical information summary
The terminal accumulator gives
The common factor cancels. Therefore
A.3.5 Recovering the Full Relation row
The row-level count correction is applied after the historical scan:
The final transport is
Using the identities in Appendix A.1,
So FlashRelation changes the execution of the exact operator.
A.3.6 Materialization and boundary
FlashRelation does not materialize full , , or matrices. The required pairwise evidence and Exchange entries are formed and consumed tile by tile. The historical state is maintained as running statistics.
A.4 Linear Relation
A.4.1 Relation coordinates and retention
In the equations below, and denote the projected relation coordinates after the formal RoPE step. The positional order is
Thus
The retention parameterization is
Because elementwise and ,
Here is the Self Relation, whereas is channel-wise historical retention.
A.4.2 Recurrent step
Let
The recurrent step is
The execution order is
A.4.3 Strict historical support
The read uses , while the current write
is added only after has been formed. Hence depends only on positions , and the current token cannot enter its own historical read through the current write.
A.4.4 Unrolling the recurrent state
Starting from
one expansion gives
With the ordered product
and the empty product equal to the identity,
Thus each token contributes and is subsequently transformed by .
A.4.5 Expanded historical Exchange
The pre-write state is
Substituting this into the read gives
Because each is diagonal, the transpose leaves the ordered product unchanged.
A.4.6 Information write and complexity
The output is
but the state writes
not . Each new state contribution therefore corresponds to the current token’s own information.
For one head, . The principal recurrent operations per token are
with leading cost per token per head. Across heads,
The recurrent state size is
for the decode state. These complexities refer to the recurrent Relation token-mixing core and exclude common FFN and embedding costs.
Appendix B Experimental Setup and Evaluation
B.1 Model Configurations
All models use full-head RoPE with base . The three main scales use paired seeds .
Table 6: Formal decoder-only model configurations. Global tokens per optimizer update are 131,072 for all three scales.
| Scale | Params MHA/Rel. | L/// | Vocab | Data | Train | Micro/GA | |
|---|---|---|---|---|---|---|---|
| 10M | 10,425,216/10,425,246 | 6/384/848/768 | 4K | TinyStories | 1024 | 150M | 32/4 |
| 30M | 28,322,304/28,322,354 | 10/512/864/1024 | 4K | TinyStories | 2048 | 450M | 16/4 |
| 100M | 102,917,760/102,917,860 | 20/640/880/1280 | 32K | SmolLM corpus | 4096 | 1.071B | MHA 2/16; Rel. 4/8 |
B.2 Optimization and Checkpoints
Training uses BF16 and AdamW with betas , weight decay , gradient clipping at , and a WSD80 schedule. Learning rates are , , and for 10M, 30M, and 100M. Warmup tokens are 1.5M, 4.5M, and 10.7114M. Formal NLL is evaluated on the full validation set at the final checkpoint.
B.3 Position Encoding
RoPE covers the full head dimension. The base is . For MHA, RoPE is applied to and after projection and head splitting. For Full Relation and FlashRelation, RoPE is applied to and before pairwise evidence. The information projection and Givens output remain unrotated. Linear Relation applies RoPE to its two relation coordinates before Self and normalized coordinate formation. Hybrid layers use the corresponding Full or Linear path.
B.4 Evaluation Protocol
The primary metric is final-checkpoint NLL. Systems measurements report complete optimizer-step throughput. One-time initialization and JIT, warmup, and terminal partial steps are excluded when present.
For matched-train-loss token efficiency, training loss is smoothed with a trailing token window equal to 1% of the formal training budget. For each paired seed, the target is the MHA run’s final smoothed training loss. We linearly interpolate the earliest Relation crossing between adjacent logged points and report the token reduction as .
Structural diagnostic definitions.
MHARel. reports matched MHA and Relation means. diag. / Self flow compares the MHA diagonal normalized-flow entry with the Relation Self-flow entry; the MHA diagonal is not an explicit Self relation, whereas the Relation entry is induced by the explicit Self relation. L2+ Self / Exchange is reported for Relation only and averages normalized Self and Exchange flow over all layers from L2 onward. Historical-distance and first-token-sink statistics are conditioned on historical flow, with first-token sink denoting the conditional mass assigned to the first sequence token. Flow statistics use the same four fixed sequences of length 1024 across matched checkpoints; flow effective rank uses the same four fixed sequences of length 512.
For a per-head normalized flow matrix , with for MHA and for Relation, let denote singular values computed in float32. The flow effective rank is
For each layer and head, the metric pools the four fixed length-512 rank samples. Within each checkpoint, heads are count-weighted at each layer, and scale-level summaries count-weight layers. We report the mean and sample standard deviation across the three seeds.
The remaining flow-spectrum quantities use squared singular values. With from the float32 SVD, define
The energy dimensions and top singular energy are
The 90% and 95% dimensions are and , respectively. These spectrum statistics use the same per-head flow matrices, fixed rank samples, sample pooling, head aggregation, checkpoint/layer aggregation, and seed aggregation as Effective Rank.
For conditional sink metrics, we sum over zero-indexed source positions for each query row. Rows without historical Exchange mass, including the first token, contribute zero to the reported mean.
B.5 Structural Diagnostic Results
The formal structural diagnostics cover all 18 final checkpoints: three scales, three seeds, and matched MHA/Relation pairs. Flow, distance, and sink statistics use the same four fixed sequences of length 1024 for every checkpoint, while spectrum statistics use the same four fixed sequences of length 512. For MHA, the normalized flow is reconstructed from the checkpoint’s actual and projections with RoPE, causal masking, and Softmax; Relation uses its actual normalized flow .
For Relation, the aggregate normalized Self/Exchange flow from L2 onward is at 10M, at 30M, and at 100M (three-seed means).
Table 7: Layerwise normalized-flow organization in the formal structural diagnostics. MHA diag. is the diagonal normalized-flow entry. Rel. Self is Relation’s explicit Self flow. EffRank is the per-head normalized-flow spectrum metric defined in Appendix B.4. Values are three-seed means.
| Scale | Layer | MHA diag. | Rel. Self | MHA EffRank | Rel. EffRank | Rel./MHA |
|---|---|---|---|---|---|---|
| 10M | L0 | 6.62% | 28.57% | 173.3 | 405.4 | 2.34 |
| 10M | L1 | 7.30% | 1.49% | 244.2 | 216.3 | 0.89 |
| 10M | L2 | 4.29% | 1.87% | 192.2 | 224.5 | 1.17 |
| 10M | L3 | 5.36% | 3.10% | 189.0 | 211.1 | 1.12 |
| 10M | L4 | 5.76% | 3.39% | 173.1 | 211.2 | 1.22 |
| 10M | L5 | 6.59% | 3.13% | 203.7 | 201.2 | 0.99 |
| 30M | L0 | 5.54% | 23.80% | 155.4 | 406.9 | 2.62 |
| 30M | L1 | 6.53% | 0.37% | 242.6 | 240.7 | 0.99 |
| 30M | L2 | 4.83% | 1.34% | 226.3 | 200.2 | 0.88 |
| 30M | L3 | 4.43% | 1.22% | 197.3 | 200.6 | 1.02 |
| 30M | L4 | 4.14% | 1.27% | 181.7 | 180.8 | 1.00 |
| 30M | L5 | 4.11% | 1.69% | 179.2 | 181.5 | 1.01 |
| 30M | L6 | 3.85% | 2.19% | 169.8 | 201.1 | 1.18 |
| 30M | L7 | 4.98% | 1.65% | 186.3 | 182.5 | 0.98 |
| 30M | L8 | 5.04% | 2.34% | 184.3 | 190.4 | 1.03 |
| 30M | L9 | 5.21% | 2.17% | 189.7 | 218.6 | 1.15 |
| 100M | L0 | 13.94% | 43.81% | 176.6 | 470.8 | 2.67 |
| 100M | L1 | 1.86% | 0.39% | 129.7 | 185.0 | 1.43 |
| 100M | L2 | 3.23% | 1.19% | 159.9 | 202.8 | 1.27 |
| 100M | L3 | 3.01% | 1.44% | 166.2 | 192.4 | 1.16 |
| 100M | L4 | 3.76% | 1.36% | 174.3 | 187.0 | 1.07 |
| 100M | L5 | 4.27% | 1.65% | 171.9 | 198.7 | 1.16 |
| 100M | L6 | 3.29% | 2.03% | 175.0 | 195.8 | 1.12 |
| 100M | L7 | 3.08% | 1.48% | 136.6 | 179.7 | 1.32 |
| 100M | L8 | 2.56% | 1.12% | 140.0 | 168.0 | 1.20 |
| 100M | L9 | 2.84% | 2.13% | 147.8 | 159.7 | 1.08 |
| 100M | L10 | 3.52% | 1.22% | 152.1 | 155.6 | 1.02 |
| 100M | L11 | 2.54% | 1.02% | 141.7 | 145.6 | 1.03 |
| 100M | L12 | 2.97% | 0.39% | 124.6 | 152.4 | 1.22 |
| 100M | L13 | 3.43% | 0.23% | 164.3 | 146.5 | 0.89 |
| 100M | L14 | 3.39% | 0.33% | 157.0 | 158.4 | 1.01 |
| 100M | L15 | 3.80% | 0.17% | 145.3 | 142.9 | 0.98 |
| 100M | L16 | 4.37% | 0.27% | 165.3 | 141.3 | 0.85 |
| 100M | L17 | 4.97% | 0.69% | 141.2 | 154.8 | 1.10 |
| 100M | L18 | 7.41% | 0.62% | 172.1 | 152.7 | 0.89 |
| 100M | L19 | 6.06% | 0.82% | 153.4 | 148.4 | 0.97 |
Table 8: Scale-level conditional historical routing in the formal structural diagnostics. Each entry is shown as MHA Relation; distance mass and first-token sink are conditioned on historical flow. Values are three-seed means.
| Scale | First-token sink | |||
|---|---|---|---|---|
| 10M | ||||
| 30M | ||||
| 100M |
Table 9: Conditional early-token sink profile in the formal structural diagnostics. All sink metrics are conditioned on historical flow. First denotes the conditional historical-flow mass assigned to the first sequence positions. Arrows denote MHA Relation; values are three-seed means.
| (a) First 1 / 2 / 4 Scale First 1 First 2 First 4 10M 30M 100M |
|---|
| (b) First 8 / 16 / 32 Scale First 8 First 16 First 32 10M 30M 100M |
The full sink profile shows that Relation’s lower first-token sink does not imply uniformly lower mass over the entire early context; instead, early historical mass is redistributed across a broader prefix.
Table 10: Scale-level aggregate flow-spectrum statistics in the formal structural diagnostics. Each entry is shown as MHA Relation; values are computed from the normalized flow spectra and are three-seed means.
| Scale | Stable rank | Effective rank | 90% dims | 95% dims | Top singular energy |
|---|---|---|---|---|---|
| 10M | |||||
| 30M | |||||
| 100M |
Taken together, the diagnostics show a consistent depth pattern. Relation uses L0 as a Self-emphasizing, high-rank routing layer. Self flow then drops sharply, and later layers become Exchange-dominant. Historical routing also shifts farther back in the sequence, especially at 10M and 30M, while the first-token sink is lower. These results show that Relation and MHA organize normalized flow differently across depth and history.
Appendix C Per-Seed Language-Model Results
C.1 Final Validation NLL
Table 11 reports final validation NLL for all paired seeds. Aggregate rows use the sample standard deviation over three seeds.
Table 11: Final validation NLL for the three paired seeds.
| Scale | Seed | MHA NLL | Full Relation NLL | Full–MHA |
|---|---|---|---|---|
| 10M | 42 | 1.688823 | 1.631738 | -0.057085 |
| 10M | 43 | 1.686405 | 1.643978 | -0.042427 |
| 10M | 44 | 1.680626 | 1.656633 | -0.023993 |
| 10M | Mean SD | 1.685285 0.004212 | 1.644117 0.012448 | -0.041168 |
| 30M | 42 | 1.295263 | 1.300730 | +0.005467 |
| 30M | 43 | 1.303885 | 1.277177 | -0.026708 |
| 30M | 44 | 1.301160 | 1.277225 | -0.023935 |
| 30M | Mean SD | 1.300103 0.004407 | 1.285044 0.013584 | -0.015059 |
| 100M | 42 | 2.945050 | 2.912234 | -0.032816 |
| 100M | 43 | 2.939826 | 2.899965 | -0.039861 |
| 100M | 44 | 2.926899 | 2.906657 | -0.020242 |
| 100M | Mean SD | 2.937258 0.009344 | 2.906285 0.006143 | -0.030973 |
Full Relation wins all three paired comparisons at 10M, two of three at 30M, and all three at 100M, for eight wins out of nine paired comparisons.
C.2 Matched-Train-Loss Token Efficiency
Table 12: Per-seed matched-train-loss token efficiency. The MHA target is the paired run’s final smoothed training loss.
| Scale | Seed | MHA target | Relation crossing tokens | Token reduction |
|---|---|---|---|---|
| 10M | 42 | 1.645060 | 143.62M | 4.25% |
| 10M | 43 | 1.696446 | 133.67M | 10.88% |
| 10M | 44 | 1.680547 | 139.89M | 6.74% |
| 30M | 42 | 1.302310 | 419.67M | 6.74% |
| 30M | 43 | 1.256313 | 448.42M | 0.35% |
| 30M | 44 | 1.303514 | 405.50M | 9.89% |
| 100M | 42 | 2.914568 | 1.00168B | 6.48% |
| 100M | 43 | 2.903508 | 1.00316B | 6.35% |
| 100M | 44 | 2.870894 | 1.06466B | 0.60% |
Across the three paired seeds, the mean token reductions are , , and at 10M, 30M, and 100M, respectively.
Appendix D Structural Ablation Details
D.1 Ablation Definitions
All structural ablations use the 10M setting, the same prepared data, and seeds 42, 43, and 44. Each ablation changes only the named component of Full Relation.
- Exchange-only transport computes the complete Full Relation flow and transports only historical entries: . Historical weights are not renormalized.
- Raw- communication replaces the independent information projection by . Head splitting, Givens mixing, Flow, and remain unchanged.
- No count calibration sets .
- No Givens mixing bypasses adjacent-head rotation, so , while the Relation and transport path remains unchanged.
- Single head uses .
D.2 Per-Seed Ablation Results
Table 13: Per-seed final validation NLL for the structural ablations.
| Ablation | Seed 42 | Seed 43 | Seed 44 | Mean SD | vs Full |
|---|---|---|---|---|---|
| Full Relation | 1.631738 | 1.643978 | 1.656633 | 1.644117 0.012448 | 0.000000 |
| Exchange-only transport | 1.665658 | 1.677815 | 1.684822 | 1.676099 0.009697 | +0.031982 |
| Raw- communication | 1.672332 | 1.686600 | 1.683090 | 1.680674 0.007434 | +0.036557 |
| No count calibration | 1.671373 | 1.704531 | 1.708256 | 1.694720 0.020305 | +0.050604 |
| No Givens mixing | 1.630321 | 1.646350 | 1.665386 | 1.647352 0.017554 | +0.003236 |
| Single head | 1.669349 | 1.707688 | 1.707422 | 1.694820 0.022059 | +0.050703 |
Appendix E Hybrid Relation
E.1 Configuration
Hybrid Relation uses a 12-layer, 480-dimensional decoder with eight heads of width 60 and . Its layout is , with nine Linear Relation layers and three Full Relation layers. The vocabulary has 4,096 entries, context length is 2,048, and training budget is 450M tokens. The model has 31,967,571 parameters and uses micro/GA , BF16, AdamW, and 131,072 global tokens per update. This is a 30M-class configuration and is not geometry-identical to the 30M Full Relation model.
E.2 Per-Seed Results
Table 14: Per-seed Hybrid Relation results.
| Seed | Final NLL |
|---|---|
| 42 | 1.274777 |
| 43 | 1.283791 |
| 44 | 1.275435 |
| Mean SD | 1.278001 0.005025 |
Appendix F Systems Benchmark Protocol
F.1 Hardware and Software
Systems measurements use an NVIDIA RTX 5090 GPU in BF16. The recorded software environment is CUDA 13.0, PyTorch 2.12.1+cu130, and Triton 3.7.1. Each campaign uses its formal prepared data and frozen model geometry.
F.2 Timing and Accounting
One-time initialization and JIT compilation are outside the reported interval. Warmup optimizer steps are excluded. Throughput uses complete optimizer steps, with the terminal partial token step excluded where the campaign reaches a non-integral final update. The denominator is the number of tokens consumed by the complete measured optimizer steps.
F.3 Campaign Settings
The fixed-context Reference–FlashRelation campaign uses for all scales. The scale-matched FlashRelation–FlashAttention campaign uses for 10M, 30M, and 100M. Linear long-context scaling uses micro , 131,072 effective tokens per update, five warmup steps, and ten measured complete steps.
Appendix G FlashRelation Systems Results
G.1 Scale-Matched FlashRelation and FlashAttention
FlashAttention is explicitly forced in these scale-matched production records. FlashRelation uses the final exact production dispatch for each head dimension.
Table 15: Scale-matched production FlashAttention and FlashRelation throughput; memory is allocated/reserved GiB.
| Scale | FlashAttention tok/s | FlashRelation tok/s | FR/FA | FR micro/GA | FA micro/GA | FR alloc./res. | FA alloc./res. | |
|---|---|---|---|---|---|---|---|---|
| 10M | 1024 | 841,833.930 | 755,088.370 | 0.897000 | 32/4 | 32/4 | 5.24/5.70 | 5.38/5.88 |
| 30M | 2048 | 361,793.115 | 334,028.010 | 0.923300 | 16/4 | 16/4 | 9.68/10.04 | 10.03/10.45 |
| 100M | 4096 | 107,783.242 | 100,166.770 | 0.929300 | 4/8 | 4/8 | 17.19/18.21 | 17.71/18.63 |
Appendix H Linear Relation Systems and Long-Context Scaling
H.1 Steady-State Throughput
Table 16: Frozen Linear Relation steady-state throughput.
| Scale | Micro/GA | Steady-state tok/s | Raw mean tok/s | |
|---|---|---|---|---|
| 10M | 1024 | 64/2 | 517,602 | 282,578 |
| 30M | 1024 | 32/4 | 256,034 | 199,875 |
| 100M | 1024 | 16/8 | 90,592 | 87,865 |
H.2 Long-Context Scaling
Long-context runs use the production schedule with chunk 128, block 64, four warps, one stage, and row tile 1. Micro is fixed to 1 and the effective update size is 131,072 tokens. The point is a real OOM.
Table 17: Linear Relation long-context scaling.
| Micro | GA | Status | tok/s | Allocated GiB | |
|---|---|---|---|---|---|
| 1024 | 1 | 128 | PASS | 10,129.47 | 1.140 |
| 2048 | 1 | 64 | PASS | 20,301.39 | 1.640 |
| 4096 | 1 | 32 | PASS | 39,990.24 | 2.648 |
| 8192 | 1 | 16 | PASS | 59,367.95 | 4.819 |
| 16384 | 1 | 8 | PASS | 52,894.96 | 8.827 |
| 32768 | 1 | 4 | PASS | 30,003.56 | 16.815 |
| 65536 | 1 | 2 | OOM | – | – |