Abstract
The ability of large language models (LLMs) to execute complex instructions is essential for their real-world applications. However, several recent studies indicate that LLMs struggle with challenging instructions. In this paper, we propose Evolutionary Contrastive Distillation (ECD), a novel method for generating high-quality synthetic preference data designed to enhance the complex instruction-following capability of language models. ECD generates data that specifically illustrates the difference between a response that successfully follows a set of complex instructions and a response that is high-quality, but nevertheless makes some subtle mistakes. This is done by prompting LLMs to progressively evolve simple instructions to more complex instructions. When the complexity of an instruction is increased, the original successful response to the original instruction becomes a “hard negative” response for the new instruction, mostly meeting requirements of the new instruction, but barely missing one or two. By pairing a good response with such a hard negative response, and employing contrastive learning algorithms such as DPO, we improve language models’ ability to follow complex instructions. Empirically, we observe that our method yields a 7B model that exceeds the complex instruction-following performance of current SOTA 7B models and is competitive even with open-source 70B models.
Introduction
While Large Language Models (LLMs) have demonstrated remarkable capabilities, they often struggle when prompts contain multiple, interdependent constraints—such as specific word counts, formatting requirements, or stylistic tones. While proprietary models like GPT-4 handle these complexities well, open-source models often fail to satisfy every constraint simultaneously.
The standard approach to improving instruction following is Supervised Fine-Tuning (SFT). However, SFT treats all tokens in a response with equal weight, failing to emphasize the "critical tokens" that satisfy specific constraints. We argue that models require Preference Fine-Tuning (PFT) to learn the causality of instruction following by observing the fine-grained differences between a perfect response and a high-quality "near-miss."
Methodology
The core of our approach is the Evolutionary Contrastive Distillation (ECD) pipeline. This method generates synthetic preference pairs—a "chosen" and a "rejected" response—without requiring human intervention.
The process follows four key steps:
- Evolution: A teacher LLM (e.g., Claude 2) takes a simple seed instruction and evolves it into a more complex version by adding constraints based on a hierarchical taxonomy of 22 operations (Content, Style, Format, Reasoning, and Breadth).
- Adaptation: The teacher generates a new, successful response for this evolved, complex instruction.
- Contrastive Generation: We create a preference pair for the complex instruction. The new response is the "chosen" one. Crucially, the original response—which was perfect for the simple prompt but now fails the new constraint—serves as the "rejected" response (a "hard negative").
- Optimization: The model is trained using Direct Policy Optimization (DPO) on these pairs, forcing the model to distinguish exactly why one response is superior to another.
Experimental Results
We applied ECD to a Mistral-7B base model using 30,000 generated preference pairs. We evaluated the resulting model across several rigorous benchmarks, including IFEval (verifiable constraints), FollowBench (fine-grained satisfaction), and InfoBench.
As shown in the results table, the ECD-7B model achieved state-of-the-art performance among 7B-parameter models. Notably, on the IFEval benchmark, it reached a loose prompt accuracy of 69.8%, representing a 7-percentage-point improvement over the previous SOTA (Conifer-7B-DPO). Furthermore, the model proved competitive with significantly larger models, such as LLaMa-2-70B-Chat, despite having ten times fewer parameters.
Ablation studies confirmed that ECD's "hard negatives" are more effective than standard synthetic data methods like RLAIF or RLCD. By focusing on the subtle differences between success and failure, the model learns to "sweat the small stuff" in complex instructions.
Conclusion and Future Work
Evolutionary Contrastive Distillation provides a scalable, automated way to teach language models the nuances of complex instruction following. By leveraging a model's own previous successes as negative examples for more difficult tasks, we bypass the difficulty of prompting models to generate intentionally "bad" data. Future work will explore self-improvement cycles where the student model acts as its own teacher and investigate the application of ECD to specialized domains like mathematical reasoning and code generation.
Summary updated