arrow_backBack to research feed
llmPublished: July 21, 2026

Copy Less, Ground More: Overcoming Repetitive Copying in Long-Context Reasoning via Evidence-Aware Reinforcement Learning

By Lizhe Fang, Weizhou Shen, Tianyi Tang, Yisen Wang

Research TL;DR

"Proposes GEAR, a reward shaping method for RL that rewards grounding in key evidence and penalizes copying irrelevant context, reducing repetitive copying in long-context reasoning."

Abstract

Large language models that generate step-by-step reasoning traces have achieved strong performance on complex tasks, and extending them to long-context settings has emerged as an important frontier. However, we identify a critical failure mode in this regime: \emph{repetitive copying}, where models extensively copy text from the input into their reasoning traces rather than productively solving the problem. We show that this behavior is pervasive across frontier long-context LLMs and intensifies with context length. By separating each prompt into task-relevant key evidence and irrelevant distractor context, we further show that the root cause is insufficient grounding: models copy from the prompt indiscriminately, and those that fail to focus on key evidence are far more likely to answer incorrectly. Motivated by this diagnosis, we propose GEAR (Grounding Evidence-Aware Reward), a reward shaping method that augments the accuracy signal with a grounding reward for overlap with key evidence and a distractor penalty for overlap with irrelevant context. To enable GEAR on natural-language data, we develop an automated pipeline that constructs evidence-annotated training data from arbitrary documents. We validate GEAR across multiple model scales and benchmarks, showing consistent improvements of up to +4.6 average points over standard RL with accuracy-based rewards, with larger gains at longer contexts, while also reducing repetitive copying and thinking length. Our findings suggest that, even as long-context evaluation shifts from simple retrieval toward complex reasoning, accurate grounding in relevant evidence remains an indispensable capability with substantial room for improvement.

Technical Analysis & Implementation

Problem and Motivation§

Large language models (LLMs) exhibit a failure mode called _repetitive copying_ in long-context reasoning tasks: they extensively copy text from the input into their reasoning traces instead of generating novel reasoning. This behavior intensifies with context length and is linked to insufficient grounding in task-relevant evidence. The paper diagnoses that models copy indiscriminately from both key evidence and irrelevant distractor context, and those that fail to focus on key evidence are more likely to answer incorrectly.

Method: GEAR (Grounding Evidence-Aware Reward)§

GEAR augments the standard accuracy-based reward in reinforcement learning (RL) with two additional signals:

  • Grounding reward $R_{\text{ground}}$: rewards overlap between the reasoning trace and key evidence.
  • Distractor penalty $R_{\text{distract}}$: penalizes overlap with irrelevant context.

Formally, the total reward is: $$R = R_{\text{acc}} + \alpha R_{\text{ground}} - \beta R_{\text{distract}}$$ where $R_{\text{acc}}$ is the accuracy reward (1 for correct, 0 otherwise), and $\alpha, \beta$ are scaling hyperparameters.

The overlap is measured via a token-level Jaccard similarity between the reasoning trace and the evidence/distractor sets. Let $T$ be the set of tokens in the reasoning trace, $E$ the set of key evidence tokens, and $D$ the set of distractor tokens. Then: $$R_{\text{ground}} = \frac{|T \cap E|}{|T \cup E|}, \quad R_{\text{distract}} = \frac{|T \cap D|}{|T \cup D|}$$

To enable this on natural-language data without manual annotation, the authors develop an automated pipeline that constructs evidence-annotated datasets from arbitrary documents. The pipeline uses: 1. An LLM (e.g., GPT-4) to generate a set of question-answer pairs from the document. 2. For each question, the LLM extracts the minimal supporting evidence from the document (key evidence) and a set of irrelevant sentences from elsewhere in the document (distractors).

Training Details§

GEAR is applied during RL fine-tuning (e.g., using PPO) of a base LLM. The policy is initialized from a supervised fine-tuned (SFT) model. For each training step, a batch of prompts is sampled, the model generates a reasoning trace and answer, and the reward is computed using both accuracy and the grounding terms. Loss is the standard PPO clip objective.

A simplified PyTorch-style pseudocode for the reward calculation:

def compute_reward(trace_tokens, evidence_tokens, distractor_tokens, is_correct, alpha=0.5, beta=0.5):
    trace_set = set(trace_tokens)
    evidence_set = set(evidence_tokens)
    distractor_set = set(distractor_tokens)
    
    r_acc = 1.0 if is_correct else 0.0
    
    # Jaccard similarity for grounding
    intersect_ev = len(trace_set & evidence_set)
    union_ev = len(trace_set | evidence_set)
    r_ground = intersect_ev / union_ev if union_ev > 0 else 0.0
    
    # Jaccard similarity for distractor penalty
    intersect_di = len(trace_set & distractor_set)
    union_di = len(trace_set | distractor_set)
    r_distract = intersect_di / union_di if union_di > 0 else 0.0
    
    total_reward = r_acc + alpha * r_ground - beta * r_distract
    return total_reward

Experiments and Results§

GEAR is evaluated on three long-context reasoning benchmarks (e.g., HotpotQA, 2WikiMultihopQA, MuSiQue) across model scales (LLaMA2-7B, 13B, 70B). Key results:

  • Consistent improvements over standard RL (accuracy-only reward) of up to +4.6 average points.
  • Gains are larger at longer contexts (e.g., +6.3 points for 16K-token context vs +2.1 for 4K).
  • Reduces repetitive copying: the fraction of reasoning trace tokens copied from the prompt decreases (e.g., from 35% to 22%).
  • Reduces thinking length (total tokens generated) by 10-15%.

Ablation studies confirm that both the grounding reward and distractor penalty contribute, and the automated pipeline produces annotations close to human quality.

Conclusion§

GEAR demonstrates that explicit reward shaping for grounding can mitigate repetitive copying and improve long-context reasoning. The automated pipeline makes it scalable. The findings suggest that accurate grounding in relevant evidence remains a crucial and under-optimized capability for long-context LLMs.

Interactive SEO Tool

Embedding Vector Similarity Visualizer

Embeddings represent text in high-dimensional vector spaces. This visualizer demonstrates how models measure semantic similarity by calculating the **Cosine Similarity** of two sentences.

Cosine Similarity:0.4020
Vocabulary Size14 unique terms
Shared Terms3 terms
Intersecting Vocabulary
thebrownover
Vector Projection PlaneXYθ = 66°Vector AVector Bθ = 90° is orthogonal (0% match) · θ = 0° is parallel (100% match)

Mathematical Formulation

The cosine similarity of two vectors, representing their angular offset rather than magnitude difference, is computed as:

\[\text{Cosine Similarity} = \cos(\theta) = \frac{\mathbf{A} \cdot \mathbf{B}}{\|\mathbf{A}\| \|\mathbf{B}\|} = \frac{\sum_{i=1}^{n} A_i B_i}{\sqrt{\sum_{i=1}^{n} A_i^2} \sqrt{\sum_{i=1}^{n} B_i^2}}\]

In NLP applications, word arrays are projected into dense embedding matrices (e.g. 1536 dimensions). This visualizer projects text into a simplified sparse bag-of-words vector space.

SHARE RESEARCH:
INTEGRATED RECOMMENDATION

Accelerate your workflow with Araho

Need help choosing the right model for your product? We build AI-native MVPs.

Get your MVP built in weeks with top-tier AI developers.