Zyphra's sparse attention method matches dense performance at 256K context
Zyphra's ZHA retrofits frozen language models with a tree-indexed sparse attention mechanism, using 4 billion tokens of distillation to match dense attention on reasoning and 256,000-token retrieval tests.
Zyphra has introduced Zyphra Hierarchical Attention (ZHA), a new attention method the company says lets large language models handle long stretches of text without the usual jump in computing cost. Attention is the mechanism a transformer model uses to weigh how much each word in a text should influence every other word, and in standard, “dense” form its cost grows quadratically, meaning it multiplies far faster than the text itself grows. That makes very long documents or conversations expensive to process. ZHA is built to avoid that scaling problem, which researchers call subquadratic attention: cost that rises more slowly than the square of the input length.
According to Zyphra, ZHA works by organizing a sparse attention pattern into a tree-indexed structure. Sparse attention limits each word to attending to a smaller, selected set of other words instead of every word in the text, and a tree index is a hierarchical lookup structure that helps the model find the most relevant words quickly rather than scanning everything. The company frames this as a path toward “true” subquadratic attention, as opposed to approaches that only partially reduce the quadratic cost.
A notable part of the approach is that it is designed as a retrofit. Rather than training a new model from the ground up with ZHA built in, Zyphra applies it to a frozen model, meaning a model that has already completed its original training and has its parameters locked. The company says adapting such a model to the new attention mechanism takes 4 billion tokens of distillation, a process in which a smaller amount of additional training data teaches the model to reproduce the behavior of its original, dense-attention version while running under the new, sparser mechanism.
Zyphra reports that after this distillation process, ZHA matches the performance of dense attention on reasoning benchmarks, the tests used to measure how well a model handles multi-step logical or problem-solving tasks. The company also says it matches dense attention on retrieval benchmarks at a context length of 256,000 tokens, a measure of how much text a model can hold and search through at once. Matching performance at that context length is notable because sparse attention methods often trade away some accuracy, particularly on tasks that require pulling specific information out of a long passage, in exchange for lower computing cost.
Zyphra is presenting the combination of these results as an efficient scaling path for large language models: a way to extend how much context a model can handle without rebuilding it from scratch or accepting a performance penalty. The 4-billion-token distillation figure also points to a comparatively modest cost for retrofitting existing models, rather than requiring the far larger token counts typically associated with pretraining.
The announcement, reported by MarkTechPost on November 2, does not specify which base models were tested, what hardware or latency gains ZHA produces in practice, or how the method compares against other published sparse attention techniques. Those details were not included in the material Zyphra has made public so far.
Sources
MarkTechPost