Explainable Reinforcement Learning from Human Feedback to Improve Alignment

Shicheng Liu, Siyuan Xu, Wenjie Qiu, Hangfan Zhang, Minghui Zhu

Abstract

Standard Reinforcement Learning from Human Feedback (RLHF) often fails due to noisy or misleading training data, resulting in models that produce harmful or inaccurate responses. This paper introduces XRLHF, a framework that identifies the specific training examples responsible for a model's failure and "unlearns" them through a surgical fine-tuning process. This approach significantly improves alignment without the need for expensive retraining from scratch.

Introduction

Aligning Large Language Models (LLMs) with human values typically relies on RLHF: training a reward model on human preferences and using reinforcement learning to steer the LLM toward high-reward outputs. However, this process is brittle. Because preference data is often collected from diverse, noisy sources, models can "learn" the wrong lessons—resulting in responses that are redundant, inaccurate, or even harmful.

When a model fails today, the common solution is to add more data or retrain from scratch. Both are "blunt force" instruments. XRLHF addresses this gap by providing a way to explain why a specific prompt triggered a bad response and a precise way to "fix" that specific cause without degrading the model's performance on other tasks.

Methods: The XRLHF Framework

The authors propose a two-part framework called Explainable RLHF (XRLHF), which operates as a post-training enhancement to the standard RLHF pipeline.

The XRLHF framework consists of a post-hoc explanation phase followed by a two-phase improvement process involving reward unlearning and policy fine-tuning.

1. Post-hoc Explanation (The Detective)

When the model produces an unsatisfactory response, the system identifies which training data points "caused" it. This is formulated as a constrained combinatorial optimization problem, looking for a subset of training data whose features most closely match the features of the bad prompt-response pair. To handle the computational complexity, the authors developed an efficient iterative data selection algorithm that runs in polynomial time.

2. Improvement via Unlearning (The Surgeon)

Once the "guilty" training data is identified, the model undergoes a two-phase repair:

  • Reward Unlearning: Negative gradient updates are applied to the reward model using only the identified "bad" data, teaching the reward model that these specific patterns are undesirable.
  • Policy Fine-tuning: The LLM is fine-tuned to maximize this new "unlearned" reward. A KL-divergence constraint is used to ensure the model maintains its original successful behaviors on "good" prompts.

Key Results

The researchers evaluated XRLHF on dialogue generation (using the full-hh-rlhf dataset) and summarization (using the TL;DR dataset) across architectures including OPT-1.3B, Pythia-2.8B, and Llama-2-7B.

Win rate comparisons show that XRLHF consistently improves the performance of PPO and ReMax baselines across different model sizes.
  • Win Rates: In dialogue tasks, models augmented with XRLHF (e.g., ReMax+XRLHF) saw win rate improvements of ~7-10% over the base models when evaluated by GPT-4 and open-source reward models.
  • Fidelity: The "explanations" provided by the algorithm were high-fidelity; when the identified data was unlearned, the model's performance on those specific problematic prompts improved substantially, often exceeding a 75% win rate compared to the original version.
  • Efficiency: The unlearning process only required touching a tiny fraction of the data (roughly 2-3% of the original training set), making it far faster than full retraining.

Discussion and Future Work

XRLHF treats alignment failures as specific "bugs" caused by specific data points, offering a surgical alternative to global retraining. While highly effective, the method currently operates post-hoc. Future research may explore "test-time" versions where the model retrieves and unlearns misleading data dynamically. Additionally, the authors note that while XRLHF improves safety, a malicious actor could theoretically use similar techniques to "unlearn" safe data, highlighting the need for robust security measures in model alignment frameworks.

Summary updated

BibTeX
@inproceedings{liu2025explainable,
  author = {Shicheng Liu and Siyuan Xu and Wenjie Qiu and Hangfan Zhang and Minghui Zhu},
  title = {{Explainable Reinforcement Learning from Human Feedback to Improve Alignment}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=k2wzVFXZmC},
}
Figure