New THOT method solves long-context retrieval dilution
Dylan Forde introduces Topology Hub Optimal Transport (THOT) to prevent information loss in long-context AI models. Learn how it maintains high recall.
Source: Grafy Research LabResearchers have developed a new mechanism called Topology Hub Optimal Transport (THOT) designed to prevent the degradation of information retrieval in long-context large language models. As context windows expand to hundreds of thousands of tokens, traditional models often suffer from "context dilution," where relevant facts are lost among vast amounts of distracting information. According to the paper by Dylan Forde, THOT addresses this by restructuring how the model manages attention mass.
How does context dilution affect long-context models?
In standard long-context models, attention mechanisms often use sparse or structured patterns to manage the massive computational cost of processing long sequences. However, as the sequence length increases, the "normalization mass"—the mathematical weight assigned to tokens—tends to disperse. According to the research, this dispersion makes it difficult for a model to isolate and retrieve a small set of specific, relevant facts when they are embedded within hundreds of thousands of irrelevant tokens. This leads to a significant drop in the model's ability to recall specific information accurately.
What is the THOT architecture?
To combat this dilution, the THOT method replaces the standard, computationally expensive dense attention matrix with a more efficient structure. The architecture utilizes a hub-and-spoke optimal transport (OT) approach. This system creates a linear-size graph composed of local windows connected to shared hubs. These hubs are balanced using Sinkhorn scaling to ensure stable information flow.
According to Forde, the method incorporates several technical components to optimize performance:
- Bounded-support capacity gating: This uses either simplex sparsemax with a complexity of or a sorting-free token-local thresholded ReLU with complexity. This process drives the mass of irrelevant distractors toward zero.
- Annealed Sinkhorn schedule: A three-sweep schedule that helps damp bipartite residuals.
- One-Reference-Tile adjoint: An exact rank- adjoint implemented in batched split-factor Triton kernels.
- Causal variant: A chunked exclusive-prefix version that ensures no future information leaks into the past during processing.
How effective is THOT at retrieving information?
Experimental results indicate that THOT significantly outperforms existing methods in high-pressure retrieval tasks. When tested on an NVIDIA L4 GPU, the sparsemax version of THOT achieved a 97.40% zero-shot recall of fixed bindings at a context length of under pure task loss (). When the parameter was set to 0.05, recall reached 98.83% using the thresholded ReLU method.
In contrast, the research notes that standard softmax-gated hub OT dropped to a mere 3.52% recall under similar conditions. Furthermore, in zero-shot WikiText-103 multi-needle retrieval tests, THOT achieved 100.00% accuracy (128/128 queries) at a length of , whereas a short-trained RoPE FlashAttention model managed only 0.78%.
Is the THOT method faster than current standards?
Beyond accuracy, the method shows promise in computational efficiency. In bidirectional operator microbenchmarks, the THOT kernel runs the forward and VJP (vector-Jacobian product) operations in 100.1 ms for a configuration where , , and . The paper states this is 2.2x faster than latent softmax and produces 4.0x smaller compiler temporaries.
When compared to cuDNN FlashAttention at a much smaller scale of , THOT's kernel ran in 1.34 ms, compared to 4.37 ms for FlashAttention. While the study notes that multi-layer language model runs currently use the unfused path, the microbenchmarks suggest a significant potential for speedups in large-scale deployments.
How can researchers apply these findings?
For researchers working with massive datasets or long-form documents, the ability to maintain high recall without quadratic computational costs is critical. The mathematical framework provided by THOT offers a blueprint for building models that can "read" entire books or codebases without losing the thread of specific details.
If you are currently analyzing long-form research papers or complex technical documentation, you can explore how current state-of-the-art models handle high-density information using Reader. While THOT is a structural architectural proposal, using specialized tools to query large PDFs can help you identify where current models might struggle with the very dilution issues Forde describes.
Frequently asked questions
What is context dilution in AI models?
Context dilution occurs when the attention weight of a model is spread too thinly across a very long sequence of tokens. As the number of tokens increases, the mathematical signal of a specific, relevant piece of information becomes harder for the model to distinguish from the surrounding "noise" or irrelevant data, leading to lower retrieval accuracy.
How does THOT improve retrieval accuracy?
THOT improves accuracy by using a hub-and-spoke optimal transport mechanism that concentrates attention mass on relevant tokens. By using bounded-support capacity gating, the system effectively pushes the mathematical weight of distracting tokens toward zero, allowing the model to maintain high recall even when the context length reaches hundreds of thousands of tokens.
Is THOT more efficient than FlashAttention?
In specific microbenchmarks, THOT demonstrated higher efficiency than FlashAttention. For instance, at a context length of 4,096, the THOT kernel completed operations in 1.34 ms, which was significantly faster than the 4.37 ms recorded for cuDNN FlashAttention. Additionally, it produced much smaller compiler temporaries during execution.
Source: Dylan Forde, arXiv:2611.27951


