NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

StructTest: Benchmarking LLMs' Reasoning through Compositional Structured Outputs

Hailin Chen, Fangkai Jiao, Mathieu Ravaut, Nawshad Farruque, Xuan-Phi Nguyen, Chengwei Qin, Manan Dey, Bosheng Ding, Caiming Xiong, Shafiq Joty, Yingbo ZhouarXiv 2024 · DOI

Introduction

Evaluating Large Language Models (LLMs) currently faces a significant challenge. Human evaluation, while accurate, is slow and expensive. Model-based evaluation (LLM-as-a-judge) is faster but often biased toward length and stylistic preferences. Furthermore, traditional benchmarks like MMLU or GSM8K are increasingly compromised by data contamination, where models may inadvertently memorize test questions during training.

StructTest addresses these issues by introducing a framework that is cost-effective, unbiased, and difficult to cheat. It measures reasoning through a model's ability to handle compositional instructions—tasks requiring the simultaneous management of multiple, often nested, constraints while maintaining the semantic quality of the output.

Methodology

StructTest shifts the evaluation paradigm from simple binary answers to rule-based verification of structured outputs. A task is defined as a pair: ⟨Domain Task, Format Rules⟩.

The StructTest pipeline: from task design and document collection to synthesis and validation against rule hacking.

Key methodological innovations include:

  • Compositionality: Tasks require juggling multiple constraints, such as generating a summary with specific bullet counts and nested sub-bullets.
  • Deterministic Evaluators: Instead of using LLM judges, the framework employs Python scripts, AST parsers, and HTML parsers to ensure 100% objective and reproducible evaluation.
  • Difficulty Scaling: Tasks are categorized into "Easy" (basic formatting) and "Hard" (complex nesting and multiple constraints).
  • Contamination Resistance: The benchmark can be applied to any underlying text or code snippet, allowing for the generation of "unseen" test cases on the fly.

Benchmark Domains

The StructTest benchmark spans four primary domains designed to test different facets of instruction following:

  1. Summarization: Focuses on length control, bullet point formatting, and hierarchical structures.
  2. Code: Includes tasks like variable renaming and adding specific print statements during variable initialization.
  3. HTML Generation: Requires generating specific counts of nested tags (e.g., generating 2 divs, each containing specific h1 and p tags).
  4. Math Reasoning: Uses GSM8K as a base but mandates outputting the Chain-of-Thought (CoT) in randomized, structured formats like JSON or specific Markdown headers.

Results and Analysis

Evaluation of 17 popular LLMs reveals a significant "Hard" wall. While many models master basic formatting, most open-source models saw an average 70% drop in accuracy when moving to Hard tasks, suggesting that instruction following is often brittle under complexity.

Performance of various LLMs across different domains and difficulty levels in the StructTest benchmark.

Key Insights

  • DeepSeek's Dominance: DeepSeek-R1 emerged as the top performer with a 74.76% overall score, surpassing GPT-4o (73.16%). Its internal "thinking" process appears to provide a significant advantage in maintaining long-range constraints.
  • Format Overfitting: Models that score high on standard math benchmarks often saw their scores plummet when asked to provide the same logic in a novel format. This indicates that models may be over-optimized for specific output styles rather than possessing generalized reasoning.
  • Human Correlation: Despite being entirely rule-based, StructTest scores show a 92.5% correlation with Chatbot Arena ELO, proving that structural rule-following is a strong proxy for perceived intelligence.

Limitations and Future Work

While robust, StructTest currently relies on a set of manually crafted rules. Future work involves encouraging community contributions to expand the set of evaluation rules and further automating dynamic task generation to ensure the benchmark remains future-proof against model evolution and potential rule-hacking.

Summary updated

BibTeX
@misc{chen2024structtest,
  author = {Hailin Chen and Fangkai Jiao and Mathieu Ravaut and Nawshad Farruque and Xuan-Phi Nguyen and Chengwei Qin and Manan Dey and Bosheng Ding and Caiming Xiong and Shafiq Joty and Yingbo Zhou},
  title = {{StructTest: Benchmarking LLMs' Reasoning through Compositional Structured Outputs}},
  year = {2024},
  eprint = {2412.18011},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.18011},
}
Figure