[Paper Review] RECKONING: Reasoning through Dynamic Knowledge Encoding
This paper proposes Reckoning, a bi-level optimization method that enables transformer-based language models to reason robustly over dynamic contextual knowledge by encoding it into model parameters via gradient updates during inference. By learning to rapidly adapt its weights to memorize relevant facts, Reckoning improves reasoning performance by up to 4.5% over in-context reasoning, especially under distractor-rich or long-chain reasoning settings.
Recent studies on transformer-based language models show that they can answer questions by reasoning over knowledge provided as part of the context (i.e., in-context reasoning). However, since the available knowledge is often not filtered for a particular question, in-context reasoning can be sensitive to distractor facts, additional content that is irrelevant to a question but that may be relevant for a different question (i.e., not necessarily random noise). In these situations, the model fails to distinguish the knowledge that is necessary to answer the question, leading to spurious reasoning and degraded performance. This reasoning failure contrasts with the model's apparent ability to distinguish its contextual knowledge from all the knowledge it has memorized during pre-training. Following this observation, we propose teaching the model to reason more robustly by folding the provided contextual knowledge into the model's parameters before presenting it with a question. Our method, RECKONING, is a bi-level learning algorithm that teaches language models to reason by updating their parametric knowledge through back-propagation, allowing them to then answer questions using the updated parameters. During training, the inner loop rapidly adapts a copy of the model weights to encode contextual knowledge into its parameters. In the outer loop, the model learns to use the updated weights to reproduce and answer reasoning questions about the memorized knowledge. Our experiments on two multi-hop reasoning datasets show that RECKONING's performance improves over the in-context reasoning baseline (by up to 4.5%). We also find that compared to in-context reasoning, RECKONING generalizes better to longer reasoning chains unseen during training, is more robust to distractors in the context, and is more computationally efficient when multiple questions are asked about the same knowledge.
Motivation & Objective
- To address the sensitivity of in-context reasoning to distractor facts in contextual knowledge.
- To improve reasoning robustness by teaching models to distinguish relevant from irrelevant contextual facts.
- To enable language models to encode external knowledge into their parameters during inference, mimicking parametric knowledge.
- To develop a meta-learning framework that optimizes model parameters for effective dynamic knowledge encoding and reasoning.
- To enhance generalization to longer reasoning chains and reduce computational cost when answering multiple questions on the same knowledge.
Proposed method
- Reckoning uses a bi-level optimization framework: an inner loop performs fast weight updates to encode contextual knowledge into model parameters via language modeling loss.
- The outer loop optimizes initial meta-parameters so that the adapted model can correctly answer reasoning questions based on the encoded knowledge.
- Inner loop updates use a dynamic learning rate per layer and step, learned via gradient descent to improve adaptation efficiency.
- The method trains on multi-hop reasoning datasets, jointly optimizing for both knowledge memorization and downstream reasoning accuracy.
- At inference, the model performs a few gradient steps to encode new facts into its weights before answering the question.
- The framework is trained end-to-end using a total loss combining language modeling on knowledge and reasoning accuracy on questions.

Experimental results
Research questions
- RQ1Can language models be trained to reason more robustly over contextual knowledge by encoding it into their parameters rather than relying on in-context prompting?
- RQ2Does dynamic parameter adaptation during inference improve performance compared to standard in-context reasoning, especially under distractor conditions?
- RQ3Can the model generalize better to longer reasoning chains when knowledge is encoded parametrically rather than contextually?
- RQ4How does the use of dynamic learning rates in the inner loop affect the overall reasoning performance of the model?
- RQ5Is the proposed method computationally more efficient than in-context reasoning when multiple questions are asked about the same knowledge?
Key findings
- Reckoning improves reasoning accuracy by up to 4.5% over in-context reasoning baselines on three multi-hop reasoning datasets.
- On the CLUTRR-SG dataset, Reckoning achieves 98.3% accuracy on 4-hop reasoning chains and 94.8% on 6-hop chains, significantly outperforming zero-shot GPT-3.5.
- With distractors present, Reckoning maintains high performance (e.g., 84.0% on 5-hop ProofWriter with distractors), while GPT-3.5 drops to 45.3%.
- The use of dynamic learning rates in the inner loop reduces performance drop by 34.2% compared to fixed learning rates, with even larger gains on longer chains (45.5% drop for 4-hop).
- Reckoning generalizes better to unseen reasoning chain lengths and is more computationally efficient when answering multiple questions on the same knowledge.
- Reckoning outperforms both fine-tuned in-context reasoning and zero-shot/few-shot prompting with GPT-3.5, especially in adversarial settings with distractors.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.