Abstract
In the realm of large language models (LLMs), the ability of models to accurately follow instructions is paramount as more agents and applications leverage LLMs for construction, where the complexity of instructions are rapidly increasing. However, on the one hand, there is only a certain amount of complex instruction evaluation data; on the other hand, there are no dedicated algorithms to improve the ability to follow complex instructions. To this end, this paper introduces TRACE, a benchmark for improving and evaluating the complex instruction-following ability, which consists of 120K training data and 1K evaluation data. Furthermore, we propose IOPO (Input-Output Preference Optimization) alignment method which takes both input and output preference pairs into consideration, where LLMs not only rapidly align with response preferences but also meticulously explore the instruction preferences. Extensive experiments on both in-domain and out-of-domain datasets confirm the effectiveness of IOPO, showing 8.15%, 2.18% improvements on in-domain data and 6.29%, 3.13% on out-of-domain data compared to SFT and DPO respectively.
Introduction
As Large Language Models (LLMs) transition from simple chat interfaces to autonomous agents, the complexity of the instructions they receive has increased significantly. Modern prompts often involve multiple constraints—such as specific output formats (JSON), word counts, tonal requirements, and negative constraints (e.g., "do not mention X"). Despite their general capabilities, many LLMs suffer from "constraint neglect," where they fail to satisfy one or more components of a multi-faceted instruction.
This research identifies two primary causes for this failure: a lack of high-quality, diverse training data for complex instructions and the limitations of current alignment algorithms. Standard methods like Direct Preference Optimization (DPO) focus exclusively on output preferences for a single prompt, failing to explicitly model how specific changes in the input instruction should dictate changes in the output.
The TRACE Benchmark
To address data scarcity, the authors introduced TRACE, a comprehensive benchmark designed to improve and evaluate complex instruction-following. TRACE utilizes a taxonomy of five constraint types—Content, Situation, Style, Format, and Example—spanning 26 distinct dimensions.
The benchmark was constructed using an automated pipeline that expands simple instructions into complex, multi-constraint prompts. This process yielded a massive dataset of 120,387 training samples and 1,042 human-verified evaluation cases. On average, each prompt in TRACE contains approximately 4.4 constraints, providing a rigorous testbed for model alignment.
Input-Output Preference Optimization (IOPO)
The core algorithmic contribution is Input-Output Preference Optimization (IOPO). Unlike the standard DPO framework, which compares a winning response ($y_{win}$) and a losing response ($y_{loose}$) for a single input ($x$), IOPO operates on pairs of inputs and outputs.
In IOPO, the model is presented with two different prompts ($x_1, x_2$) and their respective ground-truth responses ($y_1, y_2$). The training objective encourages the model to prefer "matched" pairs (where $y_1$ follows $x_1$) over "mismatched" pairs (where $y_2$ is paired with $x_1$). This approach forces the model to meticulously explore the instruction space, learning the causal relationship between specific prompt constraints and the resulting output behavior. By sensitizing the model to input variations, IOPO ensures that subtle changes in instructions are reflected accurately in the generated text.
Experimental Results
The effectiveness of IOPO was evaluated using Qwen2-7B and Llama-3.1-8B as backbone models. Testing spanned both in-domain (TRACE) and out-of-domain benchmarks, including IFEval, CFBench, and COMPLEXBENCH.
On the TRACE in-domain data, IOPO demonstrated significant gains, outperforming DPO by 3.0% on single-constraint tasks and 1.7% on multi-constraint tasks. The results were even more pronounced on out-of-domain benchmarks like IFEval. For the Qwen2-7B model, IOPO improved strict accuracy by 7.2% over DPO and 7.6% over Supervised Fine-Tuning (SFT). These results suggest that the skills learned through IOPO—specifically the sensitivity to complex constraints—generalize well beyond the specific training distribution.
Conclusion and Future Work
IOPO represents a significant step forward in aligning LLMs with complex, multi-constraint instructions. By shifting the alignment focus from output-only preferences to input-output pairs, the method teaches models to "sweat the small stuff" in prompts. While IOPO requires more memory during training due to the increased number of pairs processed, it maintains identical inference speeds to standard models, making it a practical solution for deploying more capable agents.
Future research will focus on improving the quality of automated training data and integrating deeper reasoning processes to help models navigate abstract or conflicting instructions more effectively.
Summary updated