CycleAlign: Iterative Distillation from Black-box LLM to White-box Models for Better Human Alignment

Jixiang Hong, Quan Tu, Changyu Chen, Gao Xing, Ji Zhang, Rui Yan · DOI

Abstract

Language models trained on large-scale corpus often generate harmful responses that are contrary to human values. A prevalent approach for human alignment is reinforcement learning from human feedback (RLHF), utilizing algorithms such as proximal policy optimization (PPO). However, these methods are often characterized by complexity, instability, and substantial resource consumption. Considering that existing large language models (LLMs) like ChatGPT are already relatively well-aligned and cost-friendly, researchers propose to align the language model with human preferences from AI feedback. Nevertheless, the common practices, that unidirectionally distill the responses, are constrained by the inherent capability of LLMs. To address it, we introduce CycleAlign, a framework that distills alignment capabilities from the parameter-invisible LLMs (black-box) to the parameter-visible models (white-box) in an iterative manner. CycleAlign iteratively improves both the white-box and black-box models by integrating static and dynamic in-context learning and a belief alignment method. Empirical results illustrate that the model fine-tuned by CycleAlign remarkably exceeds existing methods, and achieves the state-of-the-art performance in alignment with human value.

Introduction

Aligning Large Language Models (LLMs) with human values typically relies on Reinforcement Learning from Human Feedback (RLHF). While effective, RLHF (specifically the PPO algorithm) is notoriously unstable, complex to implement, and resource-intensive.

As a workaround, many researchers use "AI Feedback" (RLAIF), where a powerful model like ChatGPT acts as a teacher to rank responses for a smaller "student" model. However, this is usually a unidirectional process: the teacher provides static feedback, and the student learns. The authors argue this creates a bottleneck—the teacher's feedback doesn't adapt to the student's specific progress or failures. CycleAlign addresses this by turning distillation into a two-way, iterative conversation.

Methodology

The core of CycleAlign is a four-stage cyclical process that repeats until the models reach a consensus:

  1. Response Sampling: The white-box model (the student, e.g., LLaMA-7B) generates multiple responses to a given instruction.
  2. Dual Ranking: The white-box model ranks its own responses based on its internal generation probabilities (its "belief"), while the black-box model (the teacher, e.g., ChatGPT) ranks the same responses using In-Context Learning (ICL).
  3. Optimization: The white-box model is updated using ranking-based Supervised Fine-Tuning (specifically RRHF or PRO objectives). This is more stable than traditional RL.
  4. Agreement Feedback: The system identifies "agreement rankings" where both models agree on response quality. These are fed back into the black-box model as dynamic demonstrations.
The four-stage iterative cycle of CycleAlign, showing the interaction between white-box and black-box models.

By seeing where the student is currently succeeding or agreeing with the teacher, the teacher's future prompts are "sharpened" to provide better, more contextually relevant guidance in the next iteration.

Experimental Results and Key Insights

The researchers primarily used the HH-RLHF (Helpful and Harmless) dataset and the BeaverTails safety benchmark for evaluation. CycleAlign achieved state-of-the-art performance compared to standard baselines like PPO, RRHF, and PRO.

  • Reward Scores: When using LLaMA-7B as a backbone, CycleAlign increased the reward score on the Harmless_base subset by 7.03 points over standard RRHF.
  • Human & GPT-4 Evaluation: In head-to-head matchups, humans preferred CycleAlign's responses over the PRO method 69% of the time for harmlessness.
  • Efficiency through Iteration: The "agreement" between the two models improves rapidly. As shown in the training dynamics, the number of iterations needed to reach consensus drops sharply within the first 300 training steps while rewards steadily increase.
Training dynamics showing the decrease in mean iterations to reach consensus (blue) and the increase in rewards (purple) over training steps.

Conclusion and Limitations

CycleAlign demonstrates that an iterative feedback loop between black-box and white-box models significantly outperforms unidirectional distillation. By dynamically updating the teacher's context with the student's "agreement" data, the framework breaks the bottleneck of static supervision.

However, the current implementation processes data serially, leading to slower training times compared to parallelized methods. Future work will focus on developing parallel batch processing to speed up the iterative cycle and exploring performance with even smaller white-box models.

Summary updated

BibTeX
@inproceedings{hong2024cyclealign,
  author = {Jixiang Hong and Quan Tu and Changyu Chen and Gao Xing and Ji Zhang and Rui Yan},
  title = {{CycleAlign: Iterative Distillation from Black-box LLM to White-box Models for Better Human Alignment}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-acl.869},
}
Figure