Unverified 2026

Okada Non-Crossing Routing Attention

Implementation & benchmark of arXiv:2609.01440 — Diagrammatic Okada monoid and cellularity of the Okada algebra

Usefulness4/10
Difficulty6/10
Novelty7/10

Source paper: Diagrammatic Okada monoid and cellularity of the Okada algebra arXiv:2609.01440 · analyzed Sep 2, 2026

AI-generated research hypothesis, automatically tested. Not peer-reviewed.

Idea description

Replace dense token-to-token attention with a learned composition of adjacent routing operators whose connectivity is stored as a non-crossing labelled arc diagram. Canonicalize the composed routing program using the Okada relations, then execute only the surviving sparse token paths.

Formulas

$$\mathsf{E}_{i}^{2}=x_{i}\mathsf{E}_{i},\qquad \mathsf{E}_{i}\mathsf{E}_{j}=\mathsf{E}_{j}\mathsf{E}_{i}\quad (|i-j|\geq 2),\qquad \mathsf{E}_{i+1}\mathsf{E}_{i}\mathsf{E}_{i+1}=y_{i}\mathsf{E}_{i+1}.$$
$$x_i=y_i=1\quad\Longrightarrow\quad \mathsf{e}_i^2=\mathsf{e}_i,\qquad \mathsf{e}_{i+1}\mathsf{e}_i\mathsf{e}_{i+1}=\mathsf{e}_{i+1}.$$
$$[\mathcal{D}_{1}]\boldsymbol{\cdot}[\mathcal{D}_{2}]\coloneq[\mathcal{D}_{1}\circ\mathcal{D}_{2}],$$
$$M_D[a,b]=\mathbf{1}\{\text{$D$ contains a propagating path }b\to a\},\qquad R_D=\sum_{(a,b)\in D}\alpha_{ab}e_ae_b^\top.$$

Mathematical statement

The Okada algebra is generated by $\mathsf{E}_1,\ldots,\mathsf{E}_{N-1}$ with parameters $x_i,y_i$ and relations $\mathsf{E}_i^2=x_i\mathsf{E}_i$, $\mathsf{E}_i\mathsf{E}_j=\mathsf{E}_j\mathsf{E}_i$ for $|i-j|\ge 2$, and $\mathsf{E}_{i+1}\mathsf{E}_i\mathsf{E}_{i+1}=y_i\mathsf{E}_{i+1}$. At the monoid specialization $x_i=y_i=1$, each generator is idempotent and the triple pattern contracts. A labelled non-crossing arc diagram consists of vertices in $[N]\cup\overline{[N]}$, non-crossing arcs between vertices, and a positive integer label on every arc. Diagram composition stacks two diagrams, connects the lower boundary of the first to the upper boundary of the second, traces the resulting paths, removes closed loops, and retains the propagating paths. For a final diagram $D$, define $M_D[a,b]=\mathbf{1}\{D$ contains a propagating path from input token $b$ to output token $a\}$. The neural routing operator is $R_D=\sum_{(a,b)\in D}\alpha_{ab}e_ae_b^\top$, where $e_a$ and $e_b$ are standard basis vectors and $\alpha_{ab}$ is a learned edge weight. The algebraic relations eliminate duplicate local operations and make the route representation compact; non-crossing diagrams impose an interval-compatible sparse topology.

Implementation notes

(1) Integrate the module into a Transformer encoder by replacing one or two dense self-attention blocks. Given hidden states $H\in\mathbb{R}^{B\times N\times d}$, define generator $e_i$ as a learned two-token mixing operation acting only on positions $i$ and $i+1$. A routing program is a word $w=(i_1,\ldots,i_T)$ of adjacent generator indices. (2) Pseudocode: initialize an empty diagram $D$; for each $i_t$, compose $D\leftarrow D\circ e_{i_t}$; repeatedly scan the word for $e_i e_i$ and replace it by $e_i$ using idempotence; commute generators with $|i-j|\ge2$ into a deterministic index order; replace every $e_{i+1}e_i e_{i+1}$ by $e_{i+1}$; then compose the retained local diagrams by tracing paths through intermediate vertices and deleting closed loops. Convert the final propagating arcs into sparse COO pairs $(a,b)$. Compute $H'_a=\sum_{b:(a,b)\in D}\alpha_{ab}W_vH_b$, with $\alpha_{ab}$ produced by a scaled dot product or a small edge MLP only on those pairs, followed by output projection and a residual connection. (3) The mathematical computation is the rewrite and diagram-composition procedure. Estimate generator scores using a router MLP on each adjacent pair $(H_i,H_{i+1})$; choose top-$k$ generators while enforcing a non-crossing pattern, or use a fixed alternating pattern initially. Estimate $\alpha_{ab}$ empirically from the surviving edges. (4) First experiment: use a 6-layer, 256-dimensional encoder on ListOps and Dyck-language prediction, with CIFAR-10 patch classification as a non-hierarchical control. Compare dense attention, local-window attention, and this method at sequence lengths 128, 512, and 2048. Record validation accuracy, peak activation memory, wall-clock time, number of surviving arcs, and loss per training FLOP. The method is promising if it achieves at least 2x lower attention memory and near-linear scaling while remaining within one percentage point of dense attention on hierarchical tasks; failure on CIFAR-10 but success on ListOps or Dyck would indicate that the non-crossing bias is useful specifically for nested dependencies.

Verification

This idea has not been verified yet.

Verification happens in two stages: Stage 1 — a mechanism check on a toy system confirms the claimed mathematical phenomenon reproduces; Stage 2 — a benchmark implements the idea on a real (small) neural network task and compares it against a tuned baseline over 8 paired seeds with a permutation test.

Artifacts

Artifacts unavailable.