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

Aligning AI models with human preferences typically requires expensive manual data annotation or relies on flawed "self-rewarding" techniques that can amplify a model's inherent biases. To solve this, researchers introduce Anyprefer, an automated framework that pairs a target model with a tool-augmented judge model in a cooperative game to synthesize high-quality preference data. By utilizing external tools to ground evaluations and a feedback loop to optimize prompts, Anyprefer significantly boosts model performance across text, vision, medical, and robotics tasks.

The Bottleneck in Preference Learning

To ensure foundation models are safe, helpful, and accurate, researchers rely heavily on preference learning techniques like Reinforcement Learning from Human Feedback (RLHF) or Direct Preference Optimization (DPO). These methods require massive datasets of "preference pairs"—typically one good response and one bad response to the same prompt.

Because human annotation is slow and cost-prohibitive, the field has increasingly turned to automated data generation. A popular recent method is "self-rewarding," where the model being trained generates its own responses and then acts as the judge to score them. However, this creates a dangerous echo chamber: because the judge shares the exact same weights and blind spots as the generator, it often rewards its own hallucinations and biases, leading to low-quality training data.

The Anyprefer Framework

The authors frame preference data synthesis as a two-player cooperative Markov Game between a Target Model and a Judge Model.

Anyprefer Framework Architecture
  1. Response Sampling: The Target Model generates several candidate responses to a given prompt.
  2. Tool-Augmented Rewarding: Instead of relying solely on its own internal knowledge, the Judge Model is given access to external tools (e.g., web search, object detectors like Grounded SAM, or specialized medical models). The Judge uses these tools to gather objective facts, scores the candidates, and selects the best and worst responses to form a preference pair.
  3. Data Quality Evaluation: A separate Reward Model (e.g., GPT-4o) evaluates the quality of the newly created preference pair.
  4. Learning from Feedback (Prompt Optimization): If the preference pair is deemed low-quality, the system uses the Reward Model's feedback to update the system prompts of both the Target and Judge models. This works similarly to gradient descent, but instead of updating model weights, it updates the text prompts to force better collaboration in the next round.
  5. Iterative Fine-Tuning: The high-quality pairs are saved, and the Target Model is fine-tuned on them using DPO. The newly improved model then restarts the cycle to generate even better data.

Key Insights

  • Tools Break the Echo Chamber: Giving the judge model access to external tools grounds the evaluation in reality. For example, using an image segmentation tool allows the judge to mathematically verify if a robot arm successfully grasped an object, drastically reducing the bias seen in standard self-rewarding setups.
  • Prompts as Optimizable Parameters: Treating the text prompts of the models as parameters that can be updated via feedback ("prompt-based gradient ascent") effectively improves the quality of the generated data without the heavy computational cost of updating model weights during the synthesis phase.
  • Viability in Data-Scarce Domains: The framework isn't limited to text chatbots. It successfully synthesizes preference data for highly specialized domains like medical image analysis and visuo-motor control, where human preference data is notoriously scarce and difficult to collect.

Datasets and Key Results

The authors release Anyprefer-V1, a dataset of 58,000 high-quality synthesized preference pairs spanning text, image-text, and image-control sequences. The framework was tested across 21 datasets in 4 distinct domains.

Performance Radar Charts across Domains

The Anyprefer framework achieved massive performance bumps over baseline models and standard self-rewarding methods:

  • Natural Language: +18.55% average improvement (including up to a 10.92% absolute accuracy jump on GSM8K and ARC).
  • Vision-Language: +3.66% average improvement across 9 benchmarks.
  • Medical Image Analysis: +30.05% average improvement, with massive gains in open-ended medical report generation.
  • Visuo-Motor Control: +16.00% average improvement in robotic task success rates.
  • Ablation on the Judge: Adding external tools and the feedback mechanism increased the Judge model's scoring accuracy from 67.2% to 89.6%.

Limitations and Future Work

While highly effective, the framework currently relies heavily on a powerful, proprietary central model (like GPT-4o) to act as the Judge and Reward model, which can be expensive and API-dependent. Additionally, in highly complex domains like medical imaging, current target models are still too weak to generate high-quality "preferred" responses from scratch, forcing the authors to rely on ground-truth data for the positive half of the preference pairs.

Future work will likely focus on reducing reliance on proprietary models, adapting the framework to new modalities like video, and utilizing the newly open-sourced Anyprefer-V1 dataset to push the boundaries of open-source AI alignment.

Summary updated

BibTeX
@inproceedings{zhou2025anyprefer,
  author = {Yiyang Zhou and Zhaoyang Wang and Tianle Wang and Shangyu Xing and Peng Xia and Bo Li and Kaiyuan Zheng and Zijian Zhang and Zhaorun Chen and Wenhao Zheng and Xuchao Zhang and Chetan Bansal and Weitong Zhang and Ying Wei and Mohit Bansal and Huaxiu Yao},
  title = {{Anyprefer: An Agentic Framework for Preference Data Synthesis}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=WpZyPk79Fu},
}
Figure