Reproduce “Benchmarking and Building Long-Context Retrieval Models with LoCo and M2-BERT” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Jon Saad-Falcon, Daniel Y. Fu, Simran Arora, Neel Guha, Christopher Ré

Stanford University researchers developed LoCoV1, a new benchmark, and M2-BERT, the first state-space model-based retrieval encoder, to enable efficient and accurate retrieval over exceptionally long documents up to 32,000 tokens. M2-BERT demonstrated superior retrieval performance on long-context tasks, outperforming Transformer-based models and commercial APIs, while also being substantially more computationally efficient for embedding generation.

Key insights

  • Developing effective long-context retrieval requires a specialized benchmark, LoCoV1, that truly tests synthesis across entire documents, distinguishing it from short-context or trivial truncation approaches.
  • State-space models (SSMs) like Monarch Mixer can be successfully adapted for retrieval, providing substantial efficiency gains (sub-quadratic scaling) over Transformers for very long contexts.
  • Effective pretraining for long-context models necessitates a mixed data approach, combining short and long sequences, and warm-starting for the longest contexts to ensure convergence and performance.
  • Orthogonal Projection Loss (OPL) provides a viable finetuning strategy for retrieval models when large batch sizes are infeasible due to extreme sequence lengths and GPU memory constraints.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.