Double-Take: Improving Capacity, Binding, and Selectivity In Long-Context Within Bidirectional Memory
Organizations: Department of Mathematics and Computer Science, Rutgers University, Newark, NJ, USA · Embodied Robotics and Automation Lab, University of South Florida, Tampa, FL, USA
Abstract
Processing a long sequence does not guarantee that distant information remains usable. As context grows, a fixed-size memory must retain many associations, connect information across positions, and preserve relevant structure without being overwhelmed by everything it observes. These are distinct requirements: a memory may store more information without representing the relationships needed for retrieval, and it may transport those relationships without preserving the ones that matter. Thus, the challenge is not simply extending context length, but constructing a memory that remains usable as context grows. We study this problem in large-chunk test-time training (TTT) and identify two basic failures: single-step writes accumulate interference, limiting capacity, while self-associative writes cannot form cross-position bindings. We introduce Double-Take (DT), which repairs these failures with multi-step unpinned updates and cross-position mixing, and adds bidirectional change-sensitive writes for selective retention. Capacity alone leaves end-to-end recall at the chance floor; adding binding raises it to . Trained only on genomic contexts, DT reaches AUROC at and near , while transferring zero-shot from human to mouse. Together, these results identify capacity, binding, and selectivity as three requirements for usable long-range memory.
Figures & tables
| Model | CCF | WB | Thy | SNSE | SSEL | Musc | Nerv | Art | Adip | Avg |
|---|---|---|---|---|---|---|---|---|---|---|
| Task-specific expert | ||||||||||
| CNN | ||||||||||
| HyenaDNA (fine-tuned) | ||||||||||
| Caduceus-Ph (fine-tuned) | ||||||||||
| Caduceus-PS (fine-tuned) | ||||||||||
| DT (ours, frozen) |
| Encoder | 2k | 8k | 32k | 131k | 262k | 524k | 1M | |
|---|---|---|---|---|---|---|---|---|
| Human | DT, memory on | .693 | .760 | .847 | .927 | .903 | .870 | .856 |
| Same encoder, memory off | .640 | .641 | .617 | .623 | .658 | .625 | .610 | |
| Caduceus-PS | .668 | .739 | .782 | .827 | cap | cap | cap | |
| HyenaDNA-1m | .633 | .701 | .640 | .660 | .776 | .712 | .784 | |
| Mouse | DT, memory on | .677 | .699 | .786 | .785 | .761 | .783 | .796 |
| Same encoder, memory off | .653 | .583 | .602 | .639 | .630 | .648 | .713 |
| Human | Chimp | Macaque | Mouse | Chicken | |
|---|---|---|---|---|---|
| Frozen | |||||
| Adapted |
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
| Component | Configuration |
|---|---|
| Parameters | M |
| Blocks | pre-LN blocks |
| Embedding width | |
| Attention heads | |
| Memory heads | |
| Attention window | nt per block |
| Configuration | MS | FR | LM | CP | Role |
|---|---|---|---|---|---|
| Stock memory | Matched control | ||||
| Capacity repair | ✓ | ✓ | Capacity test | ||
| Capacity + binding | ✓ | ✓ | ✓ | Binding test | |
| DT, no gain | ✓ | ✓ | ✓ | No readout gain | |
| DT + gain 4 | ✓ | ✓ | ✓ | memory gain at inference | |
| Selective DT | ✓ | ✓ | ✓ | ✓ | Selectivity experiments |
| Model | Params. | Context | Protocol | Purpose |
|---|---|---|---|---|
| DT | M | kb | frozen | Full repaired fast-weight memory. |
| Stock memory | M | kb | frozen | Architecture-matched memory control. |
| Stock + distal | M | kb | frozen | Tests distal supervision alone. |
| Stock + span | M | kb | frozen | Tests span masking alone. |
| HyenaDNA-medium | M | kb | public | Long-context convolutional reference. |
| HyenaDNA-large | M | Mb | public | Megabase-context reference. |
| Experiment | Encoder | Readout | Metric |
|---|---|---|---|
| Associative capacity | isolated memory | direct retrieval | recall |
| Cross-position binding | isolated memory | direct retrieval | recall |
| TAD boundary | frozen | pooled logistic probe | AUROC |
| eQTL variant effect | frozen | logistic / linear adapter | AUROC |
| Enhancer–target gene | frozen | matched frozen adapter | AUROC |
| Structural perturbation | frozen | boundary readout | probability change |
| Method | |||||||
|---|---|---|---|---|---|---|---|
| Stock | 1.00 | .60 | .50 | .23 | .09 | .04 | .02 |
| 5-step + renorm | 1.00 | 1.00 | 1.00 | .82 | .34 | .07 | .03 |
| DT | 1.00 | 1.00 | 1.00 | 1.00 | .99 | .93 | .74 |
| Configuration | Recall |
|---|---|
| Stock | .10 |
| Capacity only | .10 |
| Capacity + Binding | .92 |
| Method | Near | Far |
|---|---|---|
| DT | .859 | .827 |
| Sliding-window attention | .142 | .019 |
| Encoder | 2k | 8k | 32k | 65k | 131k | 262k | 524k | 999k |
|---|---|---|---|---|---|---|---|---|
| Repaired memory | ||||||||
| DT + gain 4 | .693 | .760 | .847 | .897 | .927 | .903 | .870 | .856 |
| DT, no gain | .723 | .771 | .788 | .802 | .834 | .830 | .846 | .722 |
| Matched architecture / objective controls | ||||||||
| Stock memory | .716 | .758 | .721 | .749 | .742 | .752 | .750 | .741 |
| Span objective | .680 | .618 | .703 | .725 | .721 | .762 | .740 | .715 |
| Distance | 16 kb | 32 kb | 65 kb |
|---|---|---|---|
| Boundary / random | .99 | 1.07 | 1.07 |
| Write | Controlled | gnomAD-SV |
|---|---|---|
| Associative | 1.06 | 1.01 |
| Change-point | 1.15 | 1.09 |
| Write | |
|---|---|
| Associative | .42 |
| Change-point | .67 |
| Encoder | 2k | 8k | 32k | 131k | 262k | 524k | 1M | |
|---|---|---|---|---|---|---|---|---|
| Human | DT, memory on | .693 | .760 | .847 | .927 | .903 | .870 | .856 |
| Same encoder, memory off | .640 | .641 | .617 | .623 | .658 | .625 | .610 | |
| Caduceus-PS | .668 | .739 | .782 | .827 | cap | cap | cap | |
| HyenaDNA-1m | .633 | .701 | .640 | .660 | .776 | .712 | .784 | |
| Mouse | DT, memory on | .677 | .699 | .786 | .785 | .761 | .783 | .796 |
| Same encoder, memory off | .653 | .583 | .602 | .639 | .630 | .648 | .713 |
Long-Context Modeling
Long-context modeling studies how AI systems process, retrieve, and reason over sequences that exceed ordinary context windows.
See all 133 papers