Anyprefer: An Agentic Framework for Preference Data Synthesis
Yiyang Zhou, Zhaoyang Wang, Tianle Wang, Shangyu Xing, Peng Xia, Bo Li, Kaiyuan Zheng, Zijian Zhang, Zhaorun Chen, Wenhao Zheng, Xuchao Zhang, Chetan Bansal, Weitong Zhang, Ying Wei, Mohit Bansal, Huaxiu Yao
TL;DR
The paper addresses the challenge of producing high-quality preference data for aligning foundation models with human values, noting biases and scalability issues in self-rewarding approaches. It introduces Anyprefer, a framework that casts preference data synthesis as a cooperative two-player Markov game between a Target Model and a Judge Model, augmented with external tools and a reward model, plus a feedback loop and iterative Direct Preference Optimization. The key contributions are the tool-augmented judge mechanism, the reward-guided data quality evaluation, the feedback-driven prompt optimization, and the Anyprefer-V1 dataset containing 58K high-quality preference pairs across four domains with strong empirical gains on 21 datasets. This work demonstrates scalable, cross-domain preference data synthesis that improves model alignment in natural language generation, vision-language understanding, medical image analysis, and visuo-motor control, offering practical benefits for alignment research and open-source data resources.
Abstract
High-quality preference data is essential for aligning foundation models with human values through preference learning. However, manual annotation of such data is often time-consuming and costly. Recent methods often adopt a self-rewarding approach, where the target model generates and annotates its own preference data, but this can lead to inaccuracies since the reward model shares weights with the target model, thereby amplifying inherent biases. To address these issues, we propose Anyprefer, a framework designed to synthesize high-quality preference data for aligning the target model. Anyprefer frames the data synthesis process as a cooperative two-player Markov Game, where the target model and the judge model collaborate together. Here, a series of external tools are introduced to assist the judge model in accurately rewarding the target model's responses, mitigating biases in the rewarding process. In addition, a feedback mechanism is introduced to optimize prompts for both models, enhancing collaboration and improving data quality. The synthesized data is compiled into a new preference dataset, Anyprefer-V1, consisting of 58K high-quality preference pairs. Extensive experiments show that Anyprefer significantly improves model alignment performance across four main applications, covering 21 datasets, achieving average improvements of 18.55% in five natural language generation datasets, 3.66% in nine vision-language understanding datasets, 30.05% in three medical image analysis datasets, and 16.00% in four visuo-motor control tasks.
