Block-Wise Differentiable Sinkhorn Attention: Tail-Refinement Gradients with a Gap-Aware Dustbin Bridge
Dylan Forde
NeurIPS page · Open on the map
Category: Efficient LLM Inference & Training › Efficient Attention Mechanisms · Type: new method · Keywords: optimal transport attention, Sinkhorn algorithm, differentiable computation, block-wise scheduling, gap-aware dustbin, TPU acceleration
Areas: LLM Reasoning › Efficient Reasoning › Sparse Attention
Summary
Block-Wise Differentiable Sinkhorn Attention introduces a fixed-depth tail-refinement surrogate for long-context balanced optimal transport attention, enabling exact gradients, block-wise computation, and low memory usage on TPUs.
Explained to a 5-year-old
The researchers wanted a way for computers to look at long lists of things without using too much memory. They created a method that first makes a quick guess about how the items match, then does a tiny extra step to fine-tune that guess. This two-step process lets the computer learn quickly while keeping memory usage low. They tested it on a special computer called a TPU and on protein data, and it ran smoothly for many hours. The result is a faster, simpler way to train models that can handle big amounts of information.
Explained to a 5-year-old, longer
Imagine you have a long line of words and you want to know which words go together best. Doing this perfectly can take a lot of time and memory on a computer. The researchers came up with a trick that first makes a rough guess about the best matches. After that rough guess, they add a small extra step to improve the matching even more. This two-step process is called a surrogate and helps the computer learn faster. They also organized the work into blocks so that each part uses less memory. The method works especially well on a kind of computer used for scientific research. They tested it on synthetic puzzles and real protein data, and it matched exact calculations very closely. The training ran for many hours on a TPU, processing many examples each second. The final model could better reconstruct protein structures and gave slightly better predictions. All of this shows that a clever two-stage approach can make big models easier to train and use less memory.
For a technical reader
The paper presents a block-wise differentiable Sinkhorn attention that uses a stopped-base Sinkhorn solve followed by a short fixed-depth refinement tail, differentiated exactly. It introduces a gap-aware dustbin bridge to handle missing entries and provides theoretical guarantees for the backward pass, including a one-reference-tile schedule and contraction certificates. Experiments on synthetic masked problems and the Pfam protein benchmark demonstrate that the approach matches exact autodiff within tight tolerances and achieves high throughput (~8.5 examples/s) on TPU hardware, improving reconstruction and sparse cross-entropy metrics.
Problem
Scaling optimal transport attention to long sequences while keeping computational cost and memory usage low and ensuring exact gradient propagation is challenging.
Method
The approach uses a stopped-base Sinkhorn iteration followed by a short fixed-depth refinement tail, differentiates that surrogate exactly, and employs a block-wise schedule with a gap-aware dustbin bridge to reduce memory and compute.
Results
The optimized kernel matches exact autodiff within 1e-5-1e-10 on synthetic problems. On TPU v6e-8, a balanced R=2 run processes roughly 8.5 examples per second for three hours, reaching step 1437, and held-out Pfam test shards improve reconstruction from 3.17 to 0.99 and sparse CE from 5.86 to 5.69.
Contributions
Provides exact fixed-depth backward theory for OT attention, a block-wise schedule with gap-aware dustbin bridge, and empirical validation on protein families showing high training throughput and improved reconstruction.
Limitations and assumptions
Assumes strictly positive active blocks for the contraction certificate; results are demonstrated on TPU v6e-8 and rely on fixed head dimension d and band width W, which may limit generalizability.
Practical relevance
Enables efficient, exact-gradient OT attention training on TPUs for large-scale protein family analysis, accelerating research and applications.
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction