QueST: Incentivizing LLMs to Generate Difficult Problems

Hanxu Hu, Xingxing Zhang, Jannis Vamvas, Rico Sennrich, Furu Wei · DOI

Abstract

The scaling of reasoning-capable Large Language Models (LLMs) is currently hindered by a scarcity of complex, human-labeled training data. This paper introduces QueST, a novel framework designed to automate the generation of high-difficulty coding challenges. By employing difficulty-aware graph sampling and a rejection fine-tuning process centered on model disagreement, QueST produces a massive synthetic dataset of 100,000 problems. Experimental results demonstrate that an 8B parameter model fine-tuned on this data achieves parity with the 671B DeepSeek-R1 on competitive coding benchmarks, highlighting the potential of "training the teacher" to overcome the data bottleneck.

Introduction

The recent "reasoning revolution" in AI, spearheaded by models like OpenAI’s o1 and DeepSeek-R1, relies heavily on high-quality, complex training data. However, the industry faces a massive data bottleneck: human-labeled competitive coding datasets are tiny, often containing only a few thousand problems. To scale further, synthetic data is essential. The challenge lies in the fact that standard synthetic generation often produces "easy" or repetitive problems. As models become more capable, they require increasingly challenging problems to force better reasoning. QueST addresses this by automating the creation of PhD-level coding challenges at scale.

Methodology: The QueST Framework

QueST is designed to incentivize a generator model to produce harder content through three main pillars:

  1. Difficulty-Aware Graph Construction: The system extracts knowledge points (e.g., Segment Trees, Dynamic Programming) from existing datasets to build a concept graph. Unlike standard methods, QueST weights edges based on the historical difficulty of problems containing those concepts.
  2. Difficulty-Aware Sampling: To create a prompt for a new problem, the model performs a random walk on this graph, intentionally favoring paths that lead to infrequent or historically difficult concept combinations.
  3. Difficulty-Aware Rejection Fine-Tuning (RFT): To measure if a generated problem is actually hard, the authors use model disagreement ($\delta$). Multiple solutions are generated for a new problem; if the solutions vary wildly and fail to reach a consensus (a low majority voting rate), the problem is deemed difficult. The generator is then fine-tuned specifically on these high-difficulty successes.
The QueST framework: from concept extraction to difficulty-aware sampling and fine-tuning.

Datasets and Evaluation

The framework utilized TACO (~25K human-annotated problems) as seed data to build the initial concept graph. This process resulted in QueST-100K, the largest synthetic code reasoning dataset to date, featuring 100,000 difficult problems paired with long Chain-of-Thought (CoT) solutions. Models were evaluated on LiveCodeBench-V5 (real-world competitive coding) and USACO (United States of America Computing Olympiad).

Key Results

The most striking result of the QueST framework is its ability to enable small models to punch significantly above their weight class. A Qwen-based 8B model trained on QueST data (QueST-8B) achieved a score of 65.2 on LiveCodeBench, effectively matching the 65.6 score of the massive DeepSeek-R1-671B.

LiveCodeBench scores vs. Model Parameters: QueST-8B (red star) matches the performance of models nearly 100x its size.

Ablation studies further confirmed that the QueST-trained generator produced problems that led to better downstream performance than problems generated by general-purpose giants like GPT-4o. Additionally, the data proved highly effective for Reinforcement Learning with Verifiable Reward (RLVR), providing a more challenging training ground for improving reasoning traces.

Conclusion and Limitations

QueST demonstrates that training the "teacher" model to generate difficult problems is a viable path toward scaling reasoning capabilities. However, the framework is computationally intensive; calculating the difficulty metric ($\delta$) requires generating numerous solutions and test cases for every candidate problem. Future work may involve training a dedicated Reward Model to predict problem difficulty more efficiently, potentially replacing the expensive majority-voting process.

Summary updated

BibTeX
@misc{hu2025quest,
  author = {Hanxu Hu and Xingxing Zhang and Jannis Vamvas and Rico Sennrich and Furu Wei},
  title = {{QueST: Incentivizing LLMs to Generate Difficult Problems}},
  year = {2025},
  eprint = {2510.17715},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.17715},
}
Figure