Straight-Through Credit Assignment for Hard Multi-Hop Retrieval

Answering "In what city was the director of Inception born?" takes two lookups. The system has to find the page that names Christopher Nolan, and only then can it search for his birthplace. Systems that do this well either run the language model many times, writing a new search query at each step, or learn retrieval from human labels saying which document each hop should find. Both are costly. The first adds latency; the second needs labels most corpora don't have. There is an obvious third option: train the whole chain from the final answer alone, so a wrong second-hop answer teaches the system which first-hop document it should have picked. It is hard because picking one document out of many is a discrete choice with no gradient.

We propose to bridge that choice with a straight-through estimator. This is a trick from quantized and discrete networks: the forward pass makes the real hard choice, and the backward pass pretends it was smooth. The system picks exactly one passage per hop, forms the next hop's query from the model's own hidden state, and answers. The answer loss is then pushed back through every hop's selection, including earlier ones. The core claim is specific. With answer-only supervision, straight-through training of hard multi-hop selection should approach retrievers trained on gold supporting-document labels. Its advantage should grow on 3–4 hop questions, where assigning credit across hops matters most. It should also do this at one reader pass per hop, rather than the $K^n$ passes that marginalizing over candidates would need.

What exists and what is missing

The motivating gap comes from iterative retrieval-augmented generation (RAG, where an LLM answers from retrieved text). IRCoT alternates one chain-of-thought sentence with one retrieval call. ITER-RETGEN re-retrieves from whole draft answers. Both work, but both pay a heavy latency cost. L-RAG measures IterRetGen at over 20 seconds per 2WikiMultiHopQA question.

L-RAG is the closest work and the method we build on. It shows that middle-layer hidden states already encode the next hop's intent. It maps them with a small network, called a projector, into a dense retriever's embedding space, reaching about 2.8 seconds per query and 0.352 on MuSiQue. Its projector, however, is trained on its own with a contrastive loss against gold passages. It takes one extra hop and never sees the answer loss. We keep L-RAG's hidden-state queries, extend them to a variable number of hops, and replace gold-passage supervision with gradients from the answer.

DrKIT is the other near miss. It is fully differentiable multi-hop traversal over a text-derived entity graph. It uses soft probability mixtures at every hop, keeps mention embeddings frozen, and depends on an entity linker. We make hard selections instead, and we need no linker.

Gradient methods for discrete choices are covered by a separate line of work. VQ-VAE copies gradients straight through a nearest-codebook lookup. Bengio's stochastic neurons give the unbiased but high-variance score-function alternative, along with its baseline-subtraction fix. Two papers constrain our design. Yin et al. show the plain identity surrogate can push parameters out of good minima: it gets 54.16% versus 91.24% for a clipped surrogate on 4-bit ResNet-20. ReinMax shows that plain straight-through is a first-order Euler step. It derives a second-order correction that reaches 68.07% versus 66.26% on ListOps, and advises temperatures $\tau \ge 1$ for straight-through variants. We treat these as the menu of estimators to compare, not as settled choices.

CrossQ trains retrieval codebooks directly on a ranking objective rather than a reconstruction proxy. Our argument has the same shape, but CrossQ is single-hop and compression-focused. No paper in the file backpropagates an answer loss through hard, chained document selections.

Mechanism

For a question, a frozen dense retriever returns the top-$K$ candidate passages for the current hop. $K = 16$ is our planned setting. Each candidate $i$ carries a small precomputed set of continuous "memory vectors" $c_i$: a compressed embedding of the passage that the reader can take as extra input tokens. A trainable projector reads a middle-layer hidden state and produces a query $u_t$ at hop $t$. It scores candidates as $s_{t,i} = u_t^\top e_i$, where $e_i$ is the retriever embedding of passage $i$.

In the forward pass, the argmax passage $i^*$ is selected. Its text and its memory vectors are placed in the reader's context. The reader's hidden state after reading that passage produces $u_{t+1}$, and this repeats for up to four hops. A learned stop gate, handled with the same estimator, decides when to answer.

Writing the selection as a one-hot vector $h_t$, the reader's continuous input from hop $t$ is

$$z_t = \sum_{i=1}^{K} h_{t,i}\, c_i .$$

This form makes the backward pass meaningful. The surrogate gradient for candidate $i$, $\partial L / \partial h_{t,i} = (\partial L / \partial z_t)^\top c_i$, is a first-order estimate of how the answer loss $L$ would change if passage $i$ replaced the chosen one. It is passed to the scores $s_t$ through a softmax at temperature $\tau$, as in straight-through Gumbel or ReinMax.

Because $u_{t+1}$ depends on $z_t$, the hop-2 error flows back into the hop-1 projector. This cross-hop path is the ingredient no current method has.

The passage text itself contributes no surrogate gradient, which is a deliberate bias. One ablation removes the memory vectors at test time to check that the model does not come to rely on them. A second ablation compares against a reader given text only.

Research Program

We fine-tune the projector, the stop gate, and low-rank adapters on the reader. The retriever index and the passage compressor stay frozen, so the index never has to be rebuilt. The reader is a 7–8B open model, which matches the Llama-class backbones used by DRAGIN and GRAT.

Training uses answers only from HotpotQA, 2WikiMultiHopQA, and MuSiQue. The gold supporting-paragraph labels are held out entirely. We use them only to score retrieval recall and to train the supervised competitor.

The analysis has two parts. The first tracks how well the surrogate gradient matches reality. On a subsample, we compute the true change in loss from swapping in each candidate by brute force, and report its cosine similarity with the estimator's prediction per hop, as ReinMax does for variational autoencoders. The second checks whether identity straight-through shows the instability Yin et al. predict when initialized from a converged solution.

Baselines

The naive reference points are one-shot retrieval with the original question and the same reader, and the frozen reader with no retrieval at all. GRAT reports that removing retrieval costs over 20 points on 2WikiMultiHopQA, which bounds what retrieval can add.

The strongest competitor is L-RAG-style training with gold labels. It uses the identical projector and multi-hop loop, but trains the projector contrastively on gold supporting paragraphs at every hop. It gets the same data, steps, and tuning sweep as our method. L-RAG reports 0.352 accuracy on MuSiQue. We rerun it under our reader so the comparison is like-for-like rather than quoting across setups.

We also compare against inference-time iterative systems, IRCoT and ITER-RETGEN, and against DRAGIN. DRAGIN reports 0.3931 F1 on 2WikiMultiHopQA with LLaMA2-13B, against FLARE's 0.3076. We report both accuracy and wall-clock latency for all of these.

For gradient methods, we compare against a score-function (REINFORCE) estimator in Bengio's form with a moving-average baseline, and against exact marginalization over top-$K'$ candidates per hop with $K' = 4$. Marginalization costs $K'^n$ reader passes, so it is feasible only for two hops. Both use the same reader-pass budget as our method, except marginalization, whose extra cost we report.

The ablations are chosen to isolate one ingredient each. Identity versus clipped straight-through versus straight-through Gumbel versus ReinMax isolates the choice of estimator. Stopping the gradient between hops, so each hop learns only from its own local signal, isolates cross-hop credit assignment.

Beating the supervised L-RAG baseline outright is not required. Our method succeeds if it comes within 2 points of it on 2-hop questions without labels, exceeds it on MuSiQue 3–4 hop questions, and beats REINFORCE at equal compute.

Why not just…?

Why not just train on the gold supporting paragraphs, which these datasets already provide? This is the real threat, and on HotpotQA it may win. Our case rests on two things. First, gold labels do not exist for most corpora; Bamboogle and new domains have none. Second, the paragraph a human marks as support is not necessarily the one the reader benefits from most. The experiment settles this. If answer-only straight-through trails gold supervision everywhere, including 3–4 hop MuSiQue, the contribution narrows to the label-free setting. We would then report it that way, along with a variant that combines both losses.

Why not just use REINFORCE or preference optimization over retrieval actions? EVO-RAG shows this can work, with gains of up to 4.6 EM. It needs a seven-part reward and a multi-head reward model to stay stable, and score-function estimators are known to be high-variance. The equal-compute REINFORCE baseline tests directly whether the biased but low-variance straight-through signal learns faster and more stably. If it does not, the proposal fails on its central premise.

Why not just marginalize softly over the top few documents, as DrKIT or classic RAG training does? Marginalization is unbiased with respect to the candidate set, but it costs $K^n$ reader passes over $n$ hops. It also spreads probability over wrong documents, which is the diffusion DrKIT suffers at depth. The two-hop marginalization baseline measures how much accuracy the hard estimator gives up in exchange for linear cost.

Why not just prompt a strong model to iterate? That requires no training and works. The objection is its latency cost, over 20 seconds per question for IterRetGen according to L-RAG. We report accuracy against latency jointly, so the reader can see whether a trained single-pass-per-hop system closes the gap.

Decisive Checks

The first check is the cross-hop ablation. If stopping the gradient between hops matches full training on MuSiQue 3–4 hop questions, the central mechanism contributes nothing.

The second is surrogate fidelity. If the estimator's predicted swap effects correlate poorly with brute-force swaps, and ReinMax does not raise that correlation, any gains come from something other than credit assignment.

The third is transfer: we train on HotpotQA answers and evaluate zero-shot on 2WikiMultiHopQA and Bamboogle, the regime EVO-RAG uses. This tests whether answer-trained retrieval generalizes better than label-trained retrieval.