Multi-step retrieval over long contexts is a key capability for retrieval-augmented generation, but strong existing approaches are costly and complex to train. Supervised retrievers are far simpler and cheaper, yet they fall well behind in this setting. We show that this gap stems not from supervised training itself, but from three misalignments between training and inference: easy training negatives, noisy retrieval prefixes, and position-agnostic scoring. Guided by this analysis, we introduce S2LMR, a simple yet effective supervised sequential retriever that models multi-step retrieval as the evolution of an explicit textual state encoded by a single shared Transformer. On long-context reasoning, multi-hop QA, and needle-in-a-haystack benchmarks with context lengths ranging from 4K to 10M tokens, S2LMR achieves performance comparable to state-of-the-art methods, substantially outperforming prior supervised retrievers. Notably, it requires only ∼2 hours of training on a single A6000 for contexts of up to 10M tokens, while remaining robust across a wide range of hyperparameter settings.
Figures & tables
Figure 1: Overview of S 2 LMR, which performs sequential multi-hop retrieval with a shared bi-encoder. The initial state s0 contains the query q , and all chunks of the long context are embedded and cached at the start. At each hop t , S 2 LMR embeds the current state st , re-rotates cached chunk embeddings according to the retrieval history, and scores candidate chunks by their inner products with the state embedding. During training (blue), gold chunks provide per-hop supervision; during inference (orange), S 2 LMR greedily selects and appends the highest-scoring chunk.
Figure 2: Evidence for Issues 1 and 2. ( 2(a) ) Hop-1 cosine distributions under MDR-style training: gold vs. same-context and in-batch negatives. ( 2(b) ) Distribution of the hop-1 gold-vs-distractor cosine gap at ns =6.4 k. ( 2(c) ) Hop-1 failure rate as the candidate pool grows to ∼ 10M tokens.
Metric
hop-1
hop-2
hop-3
K=3
P(margin≤0)
0.66
0.53
0.80
—
Per-hop pick success
0.34
0.47
0.20
8.5%
Table 1: Per-hop retrieval failure of a fine-tuned chunk-position-agnostic bi-encoder on BabiLong QA3 at N=100 . margint=cos(qt,gold)max−cos(qt,distractor)max . See Appendix C.3 .
Figure 3: Verification of the three S 2 LMR designs on BabiLong QA3, measured by Fact EM: (a) negative sampling with varying fractions of in-batch negatives; (b) teacher-forced versus beam-expanded per-hop supervision ( B=2 ); and (c) re-anchored, static absolute, and no chunk-axis positional encoding. Vertical dashed lines indicate the training context length (2K).
Figure 4: Comparison of answer accuracy on the long-context benchmark BabiLong. Solid lines denote methods fine-tuned on the BabiLong, while dashed lines denote zero-shot methods. a) Average performance across tasks Q1–QA5. b) Performance on the hardest task, QA3, which requires the longest reasoning chain and temporal awareness.
S
MK
MV
MQ
NIAH
QA
Len
Methods
1-st
2-nd
3-rd
1-st
2-nd
3-rd
Avg.
SH
MH
4K
∘ Titans
98.4
99.8
89.4
n/a
n/a
n/a
n/a
n/a
n/a
n/a
n/a
∘ Atlas
99.2
100
90.6
n/a
n/a
n/a
n/a
n/a
n/a
n/a
n/a
∘ Mamba2-Hybrid
100
100
95.7
89.5
95.5
96
97.9
97.6
96.5
56.5
48.8
∘ LongRoPE2-8B
100
100
99
100
100
97
99.7
100
99.7
79
60
✓ Beam-Retriever
100
98
98
98
98
97
98
99
98.5
29.0
39.0
Table 2: Results on the RULER benchmark, evaluating long-context retrieval performance across various context lengths. S (Single-needle): Find one value for one key. MK (Multi-keys): Find one value for one key among many. MV (Multi-values): Find all values for one key. MQ (Multi-query): Answer multiple questions over the context. MH QA : open domain multi-hop question answering. SH QA : single-hop question answering.
HotPotQA
MuSiQue
Avg
Methods
Fact F1
Fact EM
Ans F1
Ans EM
Fact F1
Fact EM
Ans F1
Ans EM
Ans F1
Ans EM
Finetuned
✓ Q-RAG
0.92
0.87
0.76
0.59
0.78
0.57
0.55
0.41
0.66
0.50
∘ Beam-Retriever
0.97
0.94
0.77
0.61
0.86
0.69
0.59
0.43
0.68
0.52
∘ Search-R1
0.81
0.66
0.65
0.52
–
–
–
–
–
–
∘ RAG-RL
0.82
–
0.69
–
–
–
–
–
–
–
Table 3: Comparison on HotPotQA (1–2K tokens) and MuSiQue (2–3K tokens). Bold/underline mark best/2nd.
Figure 5: Hyperparameter robustness on BabiLong QA3. Shaded regions indicate the stable training range; black × marks Q-function collapse.
Figure 6: Training stability on BabiLong QA3. ( 6(a) ) Peak EM vs. training time. ( 6(b) ) S 2 LMR training loss across learning rates. ( 6(c) ) Q-RAG Q-function loss across learning rates.
Method
Train (h)
Infer. (s/sample)
1K
32K
128K
1M
10M
Retrieval-only (+0.44s Qwen3-4B)
S 2 LMR
2.25
0.20
1.00
3.20
27.8
279
Q-RAG
54.4
0.20
1.10
3.42
29.0
318
Beam Retriever
∼ 450
1.2
39
155
∼ 1200
∼ 12000
End-to-end fine-tuned
Table 4: Time cost on BabiLong QA3.
Table 11
Appendix figures & tables13 assets
Supplementary material from the paper’s appendix.
Appendix
Property
S 2 LMR
Q-RAG limiting case
Learning signal
Fixed per-hop supervision
Sampled trajectory outcome
Objective
InfoNCE
Binary MSE
Positive signal
Ground-truth supporting passage
Action on successful trajectory
Negative signal
All in-context candidates
Sampled actions on failed trajectories
Bootstrapping
None
None ( λ=1 )
Exploration
None
None in the limit ( α→0 )
Appendix
Table 7: Comparison between S 2 LMR and the limiting form of Q-RAG.
Checkpoint
sim(gold)
sim(sc-neg)
sim(ib-neg)
margin sc
margin ib
Contriever (zero-shot)
0.29
0.23
0.23
+0.06
+0.06
MDR-repro (in-batch trained)
0.45
0.36
0.34
+0.09
+0.11
S 2 LMR (same-context trained)
0.67
0.46
0.54
+0.21
+0.13
Appendix
Table 8: Hop-1 median cosine similarities on 128 BabiLong QA3 samples (RoPE-rotated). marginsc=sim(gold)−sim(sc-neg) ; marginib=sim(gold)−sim(ib-neg) . MDR training widens the in-batch margin more than the same-context margin (its own objective converges on the wrong distribution). S 2 LMR training widens the same-context margin most, matching what inference requires. All three checkpoints use identical encoder/tokenizer/RoPE.
Figure 7: Distractor-distribution mismatch on 128 BabiLong QA3 samples. Top row: distributions of cosine similarity between the query state and (i) the gold chunk, (ii) 31 same-document distractors, (iii) 31 in-batch negatives. Bottom row: distributions of softmax p(gold) at τ=0.02 under the in-batch pool (MDR training pool, 32 candidates) and the same-context pool (inference pool, 32 candidates). Columns: Contriever (zero-shot), MDR-style checkpoint trained with in-batch negatives, and S 2 LMR trained with same-context negatives.
∣δ2∣/N
∣δ3∣/N
P(∣δt∣/N
N
median
IQR
90th pct
median
IQR
90th pct
≤0.10)
Uniform
0.333
0.500
0.900
0.333
0.500
0.900
0.190
100
0.060
0.090
0.200
0.050
0.070
0.210
0.70–0.79
800
0.056
0.092
0.218
0.048
0.089
0.182
0.69–0.73
6400
0.055
0.088
0.214
0.049
0.087
0.193
0.71–0.73
Appendix
Table 9: Concentration of next-gold document-position offsets in BabiLong QA3 , computed on 500 samples per N . The last column reports the fraction of samples with ∣δt∣/N≤0.10 (range across the two hop transitions). The distribution is scale-invariant in N and far tighter than the uniform baseline, giving any position-aware retriever a substantial candidate-pool reduction.
N
10
20
50
100
800
6400
gold_max_cos (median)
0.962
0.962
0.962
0.962
0.962
0.962
best_noise_cos (median)
0.963
0.963
0.963
0.963
0.963
0.963
margin (median)
− 0.001
− 0.001
− 0.001
− 0.001
− 0.001
− 0.001
P(margin≤0)
0.670
0.670
0.670
0.670
0.670
0.655
Appendix
Table 10: Hop-1 semantic margin of a fine-tuned chunk-position-agnostic bi-encoder is scale-invariant in N . Aggregated over 200 samples per N . The margin is ≈0 regardless of context size.
N
Hop 1
Hop 2
Hop 3
100
0.670
0.530
0.795
800
0.670
0.520
0.795
6400
0.660
0.485
0.795
Appendix
Table 11: Per-hop P(margin≤0) under oracle previous picks. The failure rate is stable at every hop across N . Hop 3 is the hardest, hop 2 marginally easier due to the injected gold-prev-context.
Protocol
Method
Fact F1
Fact EM
Ans F1
Ans EM
K=∣gold∣
Q-RAG
0.78
0.57
0.55
0.41
S 2 LMR
0.83
0.67
0.56
0.42
≤ 4 steps, stop when all gold found
Q-RAG
0.81
0.72
0.60
0.45
S 2 LMR
0.86
0.77
0.62
0.47
Appendix
Table 12: MuSiQue (full dev) under two retrieval protocols. Q-RAG: released checkpoint. S 2 LMR: Fact is the mean of two seeds; Ans is seed 42. Answers by QwQ-32B.
Setting
Method
SH
MH
Code ( T=1 / 3 )
Q-RAG
55/53/52/50/50
64/60/63/61/56
S 2 LMR
56/51/50/47/46
64/62/63/62/59
Paper ( T=4 )
Q-RAG
61/59/59/57/53
62/60/58/60/57
S 2 LMR
63/57/57/55/45
65/61/63/63/61
Published
Q-RAG
62/59/59/55/52
67/64/65/65/61
Appendix
Table 13: RULER QA (EM) at 4K/16K/32K/128K/1M. Both methods are trained on HotpotQA+MuSiQue with gte-multilingual-base and use the Qwen3-4B reader (no thinking), as in Q-RAG’s Appendix G.
Figure 8: Fact EM vs (a) softmax temperature τ , (b) CCR strength λCCR , (c) label smoothing αLS . Stars denote per-task best.
Figure 9: Fact EM vs (a) softmax temperature τ , (b) CCR strength λCCR , (c) label smoothing αLS . Stars denote per-task best. S 2 LMR maintains Fact EM >0.94 (QA2) and >0.97 (QA3) across a 10× range of each hyperparameter, degrading only at extreme values ( τ=0.2 or αLS≥0.05 ).