Importance Weighting Can Help Large Language Models Self-Improve

Chunyang Jiang, Chi-Min Chan, Wei Xue, Qifeng Liu, Yike Guo

Abstract

Large Language Models (LLMs) can self-improve by training on their own generated data, but "hallucinated" or poorly reasoned outputs often degrade performance. This paper introduces IWSI (Importance Weighting-based Self-Improvement), a method that uses a tiny "gold" dataset to filter out self-generated samples that deviate too far from the target distribution. By filtering for both correctness and "distributional fit," IWSI achieves performance gains on par with expensive external reward models without requiring extra overhead.

Introduction

Fine-tuning LLMs on high-quality, human-annotated data is the gold standard for improvement, but it is prohibitively expensive. To bypass this, researchers have turned to self-improvement: letting a model generate its own Chain-of-Thought (CoT) reasoning and then fine-tuning on the "correct" results.

However, current methods primarily filter data based on correctness (usually via "Self-Consistency" or majority voting). Correctness alone is insufficient; even if a model arrives at the right answer, the reasoning path might be redundant, skip essential steps ("jumping"), or use flawed logic that happens to hit the right answer ("spurious"). Training on these "out-of-distribution" samples causes Distribution Shift, which can damage model performance over time. The challenge lies in identifying and filtering these samples without access to the full "true" data distribution.

Methodology: The IWSI Framework

The authors propose IWSI (Importance Weighting-based Self-Improvement), a four-step framework designed to mitigate distribution shift during self-training.

Overview of the IWSI framework, illustrating the pipeline from unsupervised data to filtered self-training.
  1. Generation: The model generates multiple candidate reasoning paths and answers for an unlabeled dataset using CoT prompting.
  2. Consistency Filtering: Majority voting selects the most consistent answer and its corresponding reasoning path.
  3. DS Weight Computation: Inspired by classical Importance Weighting (IW), a tiny "gold" validation set (human-written) is used to calculate a Distribution Shift (DS) weight ($w_i^{DS}$) for every self-generated sample. The weight is derived from the ratio of average loss on the valid set to the loss on the specific training sample.
  4. Filtering & Fine-tuning: Samples are ranked by their DS weight, and the top $k\%$ (those with the highest shift) are discarded. The model is then fine-tuned on the remaining high-quality data.

Experimental Setup

IWSI was evaluated across six datasets in three reasoning domains:

  • Arithmetic Reasoning: gsm8k and SVAMP.
  • Natural Language Inference (NLI): Adversarial NLI subsets (ANLI-A1 and ANLI-A2).
  • Commonsense Reasoning: OpenBookQA and StrategyQA.

Crucially, the "gold" validation sets used for weight calculation were minimal, never exceeding 5% of the training set size.

Results and Analysis

IWSI consistently outperformed standard self-improvement baselines. The base Llama3-8B model's average accuracy improved from 22.1% to 40.4% using IWSI, significantly higher than the 34.0% achieved by standard self-consistency methods (LMSI). Notably, IWSI's performance was virtually identical to a baseline using an external, pre-trained reward model (DeBERTa-v3-large), demonstrating high efficiency without external "teacher" models.

Distributional Alignment

A key insight is that correctness does not equate to quality. The authors identified redundant, jumping, and spurious reasoning as "correct but bad" data. IWSI effectively filters these by aligning the training distribution with the "gold" validation set.

Density of SFT loss for the valid set, base generated data, and IWSI-filtered data, showing improved distributional alignment.

As shown in the loss density plots, the distribution of the IWSI-filtered data (generated-IWSI) much more closely matches the "gold" validation set compared to the raw generated data (generated-base). This reduction in distribution shift is the primary driver of the observed performance gains.

Discussion and Conclusion

While IWSI is highly effective, it still requires a small (5%) human-written "gold" set, which may be a hurdle in zero-resource scenarios. Furthermore, while hard filtering based on weights proved most effective here, future work could explore more sophisticated weighting schemes. Currently focused on reasoning tasks, the applicability of DS weighting to creative or open-ended generation remains an open question.

In summary, IWSI demonstrates that importance weighting is a powerful tool for LLM self-improvement, providing a low-overhead alternative to external reward models by ensuring that self-generated training data remains "in-distribution."

Summary updated

BibTeX
@inproceedings{jiang2025importance,
  author = {Chunyang Jiang and Chi-Min Chan and Wei Xue and Qifeng Liu and Yike Guo},
  title = {{Importance Weighting Can Help Large Language Models Self-Improve}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  url = {https://openreview.net/forum?id=a6lU6qqSjq},
}
Figure