Summary (Overview)
- FreeSolo introduces a native sparse attention mechanism designed for zero-shot length extrapolation, combining a short-range sliding window with a long-range sparse branch that selects keypoint cells for direct token attention.
- Two main variants are developed: FS-L (linear-time, ) which prunes the prefix before query-dependent selection through short continued pretraining (CPT), and FS-B (subquadratic, ) which searches balanced trees over a growing archive.
- Both variants demonstrate superior zero-shot extrapolation: at 800M parameters, RULER mean decreases only from 32.0 to 22.3 (FS-L) and 37.7 to 30.4 (FS-B) when extrapolating from 4k to 16k training length.
- Both models retrieve single needles at 256k context length—64× the training length—without any long-context fine-tuning.
- FS-B achieves the highest RULER mean in the superlinear group at 4k and beyond, while FS-L leads the linear group at every reported length.
Introduction and Theoretical Foundation
Background and Motivation
Long-context language modeling requires both efficient attention and reliable retrieval beyond training length. Traditional approaches face fundamental trade-offs:
- Full attention (Vaswani et al., 2017) has quadratic sequence cost .
- Recurrent models (Katharopoulos et al., 2020; Gu and Dao, 2023) compress history into fixed-size states, limiting how much information can be stored.
- Hybrid architectures that add full attention for better recall incur quadratic cost.
- Native Sparse Attention (NSA) (Yuan et al., 2025) and Mixture of Block Attention (MoBA) (Lu et al., 2025) preserve token access but score growing sets of blocks.
Neither compression nor sparsity alone ensures length extrapolation. Continued pretraining (CPT) on longer sequences can extend retrieval but at additional training cost.
Theoretical Foundation
The core insight of FreeSolo is that memory summaries need only locate evidence; the evidence can remain in original token values. The model learns token keys whose simple statistics make memory searchable, prunable, and hierarchically summarizable:
- Mean keys give a simple chunk representation for routing and hierarchical search.
- Maximum token-key norms provide pruning priorities.
Key architectural principle: RoPE (Su et al., 2021) stays within a fixed local window, while long-range routing and readout use unrotated queries and keys, avoiding unseen rotary offsets that cause extrapolation failures.
Methodology
3.1 Range Separation
FreeSolo combines local window attention with sparse long-range attention in each head. The local branch applies RoPE within a fixed window; the long-range branch selects top-K cells and applies NoPE attention to their tokens.
The outputs are combined as:
where is a learned per-head scalar.
3.2 Local Branch
The local branch uses RoPE within a fixed look-back radius :
with the readout:
3.3 Long-Range Branch
Cells are groups of consecutive token key/value pairs with summaries:
Cell scoring combines mean-key content routing with a norm-weighted relative position bias:
where , , and .
Query-independent pruning (FS-L) retains the most recent cells and the cells with largest norm priorities:
Token readout applies NoPE attention over selected cells:
3.4 Balanced Tree Search (FS-B)
FS-B uses two causal forests per head with admitted sets:
with beam search ranking nodes by:
Token-level reranking rescues individual useful tokens hidden by mean keys:
Retrieval-weighted CPT uses a weighted next-token loss:
3.5 Computational Cost
| Variant | Complexity |
|---|---|
| FS | |
| FS-L | |
| FS-B | (including radix-sort construction) |
Empirical Validation / Results
RULER Extrapolation Results (Table 1, Key Results)
At 800M scale, 16k context (4× training length):
| Model | Complexity | S-NIAH-1 | S-NIAH-2 | S-NIAH-3 | Mean |
|---|---|---|---|---|---|
| FS-B | 100 | 88 | 84 | 30.4 | |
| FS-L | 84 | 81 | 40 | 22.3 | |
| FS | 95 | 72 | 34 | 23.1 | |
| Raven | 100 | 26 | 0 | 12.8 | |
| NAtS-L | 21 | 3 | 0 | 2.8 | |
| GDN | 56 | 13 | 5 | 10.4 |
At 340M scale, 16k context:
| Model | S-NIAH-1 | S-NIAH-2 | S-NIAH-3 | Mean |
|---|---|---|---|---|
| FS-B | 99 | 60 | 27 | 20.2 |
| FS-L | 87 | 20 | 1 | 10.7 |
| FS | 100 | 17 | 0 | 11.8 |
| Raven | 81 | 3 | 0 | 8.5 |
Key Findings
- Single-needle retrieval at 256k: FS and FS-L score 96/85 at 800M, compared to zero for NAtS-L; Raven scores 92.
- FS-L trades some S-NIAH-1 recall for higher S-NIAH-2/3 scores at 16k–64k relative to base FS.
- FS-B's two-forest search significantly improves retrieval: at 800M/16k scores 100/88/84 on S-NIAH-1/2/3.
- On MK-NIAH-1, FS-L scores 23 vs. 3 for both linear baselines; on MV-NIAH, 17 vs. 9/0.5.
Short-Context Quality (Table 2)
At 340M, FS averages 51.9 and FS-L 51.0, compared with 51.8 for TF++ and 51.4 for Raven. At 800M, FS reaches 56.5 (close to TF++'s 56.8), while FS-L reaches 55.2. Both FS-L checkpoints retain similar short-context quality after CPT.
Empirical Scaling
- FS-L's attention buffers remain constant: 766 MiB (340M model) and 1149 MiB (800M model) from 4k to 256k context.
- CUDA-graph decoding runs at ~89 and ~75 tokens/s respectively.
- Prefill throughput stays near 2.1–2.2K tokens/s, with processing time growing approximately linearly.
Theoretical and Practical Implications
Information-Bottleneck View
The paper analyzes length generalization through an information-bottleneck perspective:
- FS routes through cell summaries: The router identifies useful cells from mean keys and maximum key norms; token attention then reads the selected cells' original keys and values.
- FS-L adds a second bottleneck: Cells are discarded before queries arrive, which works when useful information remains concentrated in the retained state but fails for dense, independently queryable facts.
- CPT adapts the model to restricted access: At 340M/4k, CPT recovers S-NIAH-1 from 62 (immediate pruning) to 76–90 across runs.
Position Independence
The design avoids positional extrapolation failures:
- RoPE only within trained local offsets
- NoPE for long-range token attention
- The erf prior depends only on relative offsets, so shifting tokens, cells, and query blocks together preserves the operator
Practical Implications
- Separates memory capacity from read bandwidth: FS-L's pruning rule (high-norm cells + recent cells) decouples how much can be stored from how much a query reads.
- Short CPT suffices: Only ~5% of pretraining tokens are needed for CPT (0.73B/1.57B at 340M/800M), all at 4k context—no long-context training required.
- Bounded memory: FS-L's streaming cache keeps token state per head, independent of sequence length.
Conclusion
Main Takeaways
FreeSolo's central thesis is that memory summaries need only locate evidence; the evidence can remain in original token values. Mean summaries of learned token keys support hierarchical search, maximum token-key norms support pruning, and local-only RoPE keeps distant retrieval free of unseen rotary offsets.
The two variants demonstrate how this representation supports different memory regimes:
- FS-L: bounded memory with linear-time attention after short CPT
- FS-B: growing archive with subquadratic search using balanced trees
Both achieve zero-shot retrieval at 16k and single-needle recall at 256k from 4k training, separating the problem of learning useful memory keys from choosing capacity, search effort, and read bandwidth.
Limitations and Future Directions
- Experiments stop at 800M scale; larger-scale validation is needed.
- FS-L's fixed retention budget can discard evidence before a query arrives; finding a CPT objective that improves the suite mean within the memory budget remains open.
- FS-B trails Raven-full on 800M multi-query and multi-value retrieval tasks.
- Learning the search policy (rather than using a fixed inference algorithm) is a promising direction.
- Faster kernels for pruning, gathering, and sparse readout are future work—training at 340M/4k is slower than full attention (98.4K vs. 303K tokens/s across eight GPUs).
Related papers
- How Model Growth, Recursion, and Boundary Operators Influence Scaling Exponents
Architectural interventions like model growth and boundary operators improve scaling exponents, with grown models matching GPT-3 13B using roughly 20x less compute.
- Input-Conditioned Search for Efficient Test-Time Scaling of Recursive Reasoners
Input-Conditioned Search scales frozen recursive reasoners by injecting hypotheses and restatements, achieving state-of-the-art accuracy across six reasoning tasks with up to 195x fewer FLOPs and no retraining.
- AutoCompact: Learning When to Compact Context in Long-Horizon Coding Agents
AutoCompact trains coding agents to decide when and how to compact context, improving SWE-bench Verified pass rates by 9.2% over the base model.