Manuscript Offprint

arXiv:2608.29899

REIGN: Refurbished Embeddings with Integrated Guidance Networks for Efficient Context-Length Scaling

Devrim Çavuşoğlu, Emre Akbaş

Abstract

Dense retrieval over long documents is expensive. Token-level encoders scale quadratically in sequence length, and most long-context embedding models reach 32K tokens only through architectural workarounds or by stretching billion-parameter LLMs. We propose REIGN (Refurbished Embeddings with Integrated Guidance Networks), a contrastively trained bi-encoder that operates on sequences of contextualised chunk embeddings from a frozen Guidance Network (GN) rather than on raw tokens. REIGN targets multi-chunk inputs, primarily for document-to-document retrieval; single-chunk inputs stay with the GN. Decoupling token-level processing from document-level reasoning, and caching the GN embeddings to disk, cuts per-document training cost by roughly four orders of magnitude relative to chunked Transformer fine-tuning. We also release a synthetic long-document retrieval benchmark for contrastive training and evaluation at long context lengths. Across an in-distribution Wikipedia benchmark, the LoCo out-of-distribution suite, and a real-world patent retrieval case study, REIGN matches dense long-context retrievers at smaller parameter budgets in each regime. A paired significance test puts it on par with models 1.6–4.3× larger on the patent task, and it stays within 0.65 nDCG@10 of a 20×-larger model on LoCo. Our code is available at https://github.com/devrimcavusoglu/reign.

1 Introduction

Retrieval-augmented generation, multi-hop question answering, and document-level semantic search all need embeddings for inputs that exceed the context window of a standard Transformer. Efficient-attention variants (Beltagy et al., 2020; Zaheer et al., 2020) and memory-augmented architectures extend the window, but embedding documents that run from tens of thousands to millions of tokens still hits memory and compute walls in practice.

Recent long-context embedding models (e.g., Nomic-Embed, Nussbaum et al., 2025; Jina-Embeddings-v3, Sturua et al., 2025; M2-BERT, Fu et al., 2023) reach 8K–32K tokens via RoPE extensions, sparse attention, or structured sequence mixing. A parallel line instruction-tunes billion-scale LLMs into embedding models (Lee et al., 2025; Choi et al., 2024; Zhang et al., 2025; Meng et al., 2024); these are accurate but computationally heavy, and beyond most groups' training budgets even with parameter-efficient adapters or quantisation. Both lines still take the sub-word token as the base unit of representation.

Data poses a complementary challenge. Existing embedding benchmarks target short passages and lack the semantically aligned long-document pairs and realistic hard negatives required for contrastive learning at scale. We address this with a synthetic long-document retrieval dataset derived from Wikipedia, in which LLM-generated rephrasals plus semantically injected distractors provide positive and graded negative pairs over documents averaging several thousand words (Section 3).

We propose REIGN (Refurbished Embeddings with Integrated Guidance Networks), a contrastively trained bi-encoder for long-document retrieval. REIGN takes ToBERT's chunk-and-aggregate intuition (Pappagari et al., 2019) and combines it with SimCLR-style contrastive training (Chen et al., 2020). The one shift is the chunk encoder, a frozen pretrained text embedder (a Guidance Network, GN; e.g., GTE or E5) whose outputs are cached. REIGN therefore (i) scales to document-level inputs without changing the underlying architecture, and (ii) trains over precomputed chunk embeddings, replacing repeated token-level forward passes with a single small Transformer over a short embedding sequence.

We evaluate REIGN on three retrieval regimes:

the in-distribution synthetic Wikipedia benchmark, the out-of-distribution LoCo long-context suite (Saad-Falcon et al., 2024), and a real-world patent prior-art case study (Ayaou et al., 2025). A 55M-parameter REIGN+GTE-small beats every native long-context dense baseline we test on GoodWiki-Long and the LoCo-paper zero-shot baselines on LoCo, and a 357M REIGN+GTE-large is statistically indistinguishable from dense baselines 1.6–4.3× larger on the patent task.

References (22)