Synthesizing Post-Training Data for LLMs through Multi-Agent Simulation

Shuo Tang, Xianghe Pang, Zexi Liu, Bohan Tang, Rui Ye, Tian Jin, Xiaowen Dong, Yanfeng Wang, Siheng Chen

To transform a "base" Large Language Model (LLM) into a helpful assistant, it must undergo post-training, typically involving Supervised Fine-Tuning (SFT) and Preference Optimization. This process requires massive amounts of high-quality instruction-response data. While manual annotation is prohibitively expensive, existing automated methods like Self-Instruct often produce "decontextualized" instructions that lack the nuance of actual human needs.

Researchers have developed MATRIX, a multi-agent simulator that creates realistic social scenarios to generate high-quality post-training data. By grounding instructions in these simulated "real-world" contexts, a Llama-3-8B model fine-tuned on just 20,000 synthetic pairs outperformed Meta’s official Llama-3-8B-Instruct model, which was trained on over 10 million samples. This approach aims to bridge the "scenario gap" between training data and real-world user interactions.

The MATRIX Framework

The authors introduce a two-part framework consisting of a simulator and a data factory.

The MATRIX pipeline: from real profiles to post-training data.
  1. MATRIX (The Simulator): A virtual society populated by over 1,000 agents. Agents are initialized using anonymized profiles and "past tweets" to ensure diverse, authentic personalities. Each agent is assigned specific life goals and step-by-step plans, making their behavior proactive. To ensure scalability, the authors employ Homophily-Guided Communication, grouping similar agents together based on text embeddings to mimic human social structures and reduce simulation noise.
  2. MATRIX-Gen (The Data Factory): This component transforms raw text-based scenarios from the simulator into training data. It retrieves relevant scenarios and integrates an agent’s persona and actions into a prompt that asks an LLM to generate a realistic instruction and response.

Scenario Grounding: The "Secret Sauce"

The core insight of the paper is that instructions derived from specific social contexts are significantly more effective for training than "naked" instructions generated in a vacuum.

An example of a grounded instruction generated from a specific persona and scenario.

As shown in the example above, a persona (e.g., an IT Manager) is placed in a specific scenario (tackling a data science course). The resulting synthesized instruction—asking about hyper-parameter adjustment in a Random Forest model for a specific dataset—is far more nuanced and representative of a real user query than a generic prompt.

Experimental Results

The authors evaluated MATRIX across 12 benchmarks covering general ability, math, coding, and safety. Key findings include:

  • State-of-the-Art Performance: On Arena-Hard, the MATRIX-Tuned Llama-3-8B achieved a win rate of 22.7%, surpassing the official Llama-3-8B-Instruct (20.6%).
  • Generalization: The model showed consistent improvements across both Llama-3 and Qwen-2.5 architectures. For Qwen-2.5-7B, MATRIX-Gen-SFT improved the average benchmark score from 41.33 to 54.39.
  • Reasoning & Coding: In reasoning tasks, MATRIX-Gen-Reason outperformed specialized baselines like Numina MATH, achieving a 50.72% average across math and code benchmarks.
  • Safety: The framework successfully generated "red-teaming" scenarios that improved the model's refusal rate of harmful prompts without sacrificing general helpfulness.

Conclusion

The MATRIX framework demonstrates that quality trumps quantity in post-training data. The fact that 20k high-quality, scenario-aware samples can beat 10 million standard samples suggests that current models may be over-trained on mediocre data. Furthermore, the modular nature of the simulation allows researchers to "steer" data generation toward specific domains by adjusting agent profiles.

While the approach is efficient in terms of data volume, it does incur significant computational costs for running thousands of LLM agents. Future work will explore larger simulation scales and deeper simulation steps to yield even more complex and nuanced social dynamics.

Summary updated

BibTeX
@inproceedings{tang2025synthesizing,
  author = {Shuo Tang and Xianghe Pang and Zexi Liu and Bohan Tang and Rui Ye and Tian Jin and Xiaowen Dong and Yanfeng Wang and Siheng Chen},
  title = {{Synthesizing Post-Training Data for LLMs through Multi-Agent Simulation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure