Model Releases
LogicIF: Towards Complex Logic Instruction Following
arXiv:2508.09125v4 Announce Type: replace Abstract: Instruction following has catalyzed the recent era of Large Language Models (LLMs) and is the foundational skill underpinning more advanced capabili
arXiv:2508.09125v4 Announce Type: replace Abstract: Instruction following has catalyzed the recent era of Large Language Models (LLMs) and is the foundational skill underpinning more advanced capabilities such as reasoning and agentic behaviors. As tasks grow more challenging, the logic structures embedded in natural language instructions becomes increasingly intricate. However, how well LLMs perform on such logic-intensive instructions remains under-explored. We propose Logic Instruction Following (LogicIF), a task requiring models to precisely follow and simulate every logic step within complex instructions. To generate these instructions, we construct LogicIFGen, a scalable, automated framework for generating verifiable instructions from code functions, which can naturally express rich logic such as conditions, loops, nesting, and function calls. Using this framework, we curate a collection of complex code functions to construct LogicIFEval, a benchmark comprising 426 verifiable, human-examined, logic-rich instructions. Our experiments demonstrate that current state-of-the-art LLMs still struggle to correctly follow the instructions in LogicIFEval. Most LLMs can only follow fewer than 60% of the instructions, revealing significant deficiencies in their capacity to handle instructions that involve complex logic structures. To further demonstrate the efficacy of our framework, we collect an extensive set of code functions across a wide range of logic difficulties to generate LogicIFTrain, a fully synthesized training set featuring 27,324 verifiable instructions. Our results show that a model trained on LogicIFTrain using reinforcement learning significantly outperforms the base model on both in-domain and out-of-domain benchmarks. All the data, codes and models are released at https://github.com/mianzhang/LogicIF.
Source: arXiv cs.CL | 2026-08-11