Hard Negative Sample-Augmented DPO Post-Training for Small Language Models

Haocheng Lu, Minjun Zhu, Henry YuarXiv 2025 · DOI

Abstract

Small language models (SLMs) often struggle with complex mathematical reasoning. Traditional post-training methods rely on binary feedback, which fails to capture subtle logical errors. This paper introduces a three-stage pipeline that utilizes a multi-dimensional "MathVerifier" to identify "hard negative" samples—solutions that are convincing but logically flawed. By applying a weighted Direct Preference Optimization (DPO) objective, the researchers significantly improve the reasoning capabilities of a 1.5B parameter model on GSM8K and MATH benchmarks, demonstrating that the quality and selection of negative samples are critical for effective reasoning alignment.

Introduction

Mathematical reasoning represents a significant challenge for artificial intelligence, particularly for small language models (SLMs) with approximately 1.5 billion parameters. While large-scale models like GPT-4 excel at generating complex chains-of-thought (CoT), smaller models often fail to maintain logical consistency.

The current standard for training these models relies on binary feedback: whether the final answer is correct or incorrect. This approach is a blunt instrument. A model might arrive at the correct answer through flawed logic, or conversely, produce a near-perfect solution marred only by a minor arithmetic slip. Furthermore, using larger models as judges to provide more nuanced feedback is computationally expensive and slow. This research addresses these limitations by proposing a "compute-conscious" method to teach models how they are wrong, focusing on "hard negatives"—solutions that appear plausible but contain subtle logical or algebraic traps.

Methodology

The proposed pipeline consists of three distinct stages designed to iteratively refine the model's reasoning capabilities.

The three-stage pipeline for verifier-guided hard-negative preference optimization.

Stage I: Supervised Fine-Tuning (SFT)

The process begins with a "cold start" phase. A base Qwen2.5-1.5B model is fine-tuned on the MetaMathQA dataset, which contains approximately 395,000 pairs derived from GSM8K and MATH. This stage establishes the model's foundational ability to generate chain-of-thought trajectories.

Stage II: The MathVerifier

The core innovation is the MathVerifier, a lightweight, dual-channel verifier that replaces heavy reward models. It evaluates solutions across six critical dimensions:

  • Semantic Content: Ensuring the response remains on topic.
  • Step Structure: Identifying missing or redundant steps.
  • Step Order: Verifying chronological logical flow.
  • Logical Inference: Using Natural Language Inference (NLI) to check if each step follows from the previous one.
  • Numerical/Symbolic Error: Distinguishing between simple arithmetic slips and fundamental conceptual errors.
  • Final Answer Consistency: Matching the output against the ground truth.

Stage III: Weighted DPO and Hard Negatives

The verifier identifies "hard negatives"—samples where the model was confident but logically "absurd." These are paired with correct solutions to form a preference dataset. Unlike standard Direct Preference Optimization (DPO), which treats all pairs equally, this method assigns an importance weight to each pair based on its "wrongness" and "absurdity" scores. This forces the model to prioritize learning from the most informative and structurally flawed errors during training.

Experimental Results

The researchers evaluated their method using the Qwen2.5-1.5B model family on industry-standard benchmarks. The verifier-guided approach consistently outperformed both the SFT baseline and standard DPO methods.

  • GSM8K (Grade School Math): The model achieved an accuracy of 80.1%, representing a +3.8 point gain over the SFT baseline.
  • MATH (Competition-level Math): The model reached 67.1%, a +1.9 point improvement over SFT.

Notably, the study found that standard "random-uniform" DPO can sometimes degrade performance on harder benchmarks like MATH. The weighted approach reversed this trend, suggesting that the selection of specific preference pairs is more impactful than the sheer volume of training data.

Discussion and Efficiency

Efficiency was a primary goal of the pipeline. By utilizing programmatic checks and small NLI models instead of a massive LLM-as-a-judge, the verifier's evaluation time was reduced from 4.6 seconds to 0.6 seconds per sample. This makes the method viable for iterative research on consumer-grade hardware, such as a single RTX 5090.

However, some limitations remain. The weights for the error dimensions are currently heuristic and require manual tuning. Additionally, the current pipeline is "offline," meaning it operates on a fixed pool of completions. Future work may explore "online" loops where the verifier adapts dynamically as the model improves, potentially yielding even higher performance gains.

Conclusion

This research demonstrates that SLMs can achieve high-level mathematical reasoning by focusing on the quality of negative samples. By distinguishing between general "wrongness" and structural "absurdity," the MathVerifier-guided DPO pipeline provides a scalable, efficient path for aligning small models with complex logical tasks without the need for massive computational overhead.

Summary updated

BibTeX
@misc{lu2025hard,
  author = {Haocheng Lu and Minjun Zhu and Henry Yu},
  title = {{Hard Negative Sample-Augmented DPO Post-Training for Small Language Models}},
  year = {2025},
  eprint = {2512.19728},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.19728},
}
Figure