mlsanityData to 7 Oct 2026

QAQ: Bidirectional Semantic Coherence for Selecting High-Quality Synthetic Code Instructions

arXiv 2603.12165 ↗First posted 12 Mar 2026cs.CLcited by 0

Not on the map. Why?

Abstract (arXiv)

Synthetic data has become essential for training code generation models, yet it introduces significant noise and hallucinations that are difficult to detect with current metrics. Existing data selection methods like Instruction-Following Difficulty (IFD) typically assess how hard a model generates an answer given a query (A|Q). However, this metric is ambiguous on noisy synthetic data, where low probability can distinguish between intrinsic task complexity and model-generated hallucinations. Here, we propose QAQ, a novel data selection framework that evaluates data quality from the reverse direction: how well can the answer predict the query (Q|A)? We define Reverse Mutual Information (RMI) to quantify the information gain about the query conditioned on the answer. Our analyses reveal that both extremes of RMI signal quality issues: low RMI indicates semantic misalignment, while excessively high RMI may contain defect patterns that LLMs easily recognize. Furthermore, we introduce a selection strategy based on the disagreement between strong and weak models to identify samples that are valid yet challenging. Experiments across three datasets spanning code generation (WarriorCoder, Magpie-Qwen2.5-Coder-Pro-300K) and math reasoning (OpenR1-Math-220k) demonstrate that selecting just 25% of data using stratified RMI matches full-data performance while being consistently competitive with or better than existing data selection methods. Our approach highlights the importance of bidirectional semantic coherence in synthetic data curation, offering a scalable pathway to reduce computational costs without sacrificing model capability. Code is available at https://github.com/XXSg559/QAQ.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 25 of its 36 references that are in the map. First posted on arXiv 12 Mar 2026.

Builds on

25 of 36 references.

References · 25

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  2. 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,203
  3. 2023Let's Verify Step by Stepcited by 3,598
  4. 2021Program Synthesis with Large Language Modelscited by 3,509
  5. 2019The Curious Case of Neural Text Degenerationcited by 2,881
  6. 2023GPQA: A Graduate-Level Google-Proof Q&A Benchmarkcited by 2,748
  7. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  8. 2024LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Modelscited by 1,442
  9. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  10. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  11. 2024Qwen2.5-Math Technical Report: Toward Mathematical Expert Model via Self-Improvementcited by 1,057
  12. 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
13 more
  1. 2024LESS: Selecting Influential Data for Targeted Instruction Tuningcited by 514
  2. 2024Magpie: Alignment Data Synthesis from Scratch by Prompting Aligned LLMs with Nothingcited by 341
  3. 2023From Quantity to Quality: Boosting LLM Performance with Self-Guided Data Selection for Instruction Tuningcited by 301
  4. 2023Magicoder: Empowering Code Generation with OSS-Instructcited by 251
  5. 2020A Theory of Usable Information Under Computational Constraintscited by 153
  6. 2024Superfiltering: Weak-to-Strong Data Filtering for Fast Instruction-Tuningcited by 134
  7. 2024Rho-1: Not All Tokens Are What You Needcited by 132
  8. 2019Answers Unite! Unsupervised Metrics for Reinforced Summarization Modelscited by 92
  9. 2025Large-Scale Data Selection for Instruction Tuningcited by 34
  10. 2025D3: Diversity, Difficulty, and Dependability-Aware Data Selection for Sample-Efficient LLM Instruction Tuningcited by 21
  11. 2025Token Weighting for Long-Range Language Modelingcited by 14
  12. 2025T-SHIRT: Token-Selective Hierarchical Data Selection for Instruction Tuningcited by 12
  13. 2025ProDS: Preference-oriented Data Selection for Instruction Tuningcited by 1

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2025Synthetic Data Generation Using Large Language Models: Advances in Text and Code
  2. 2024CodecLM: Aligning Language Models with Tailored Synthetic Data
  3. 2025PACIFIC: a framework for generating benchmarks to check Precise Automatically Checked Instruction Following In Code
  4. 2026CodeAlchemy: Synthetic Code Rewriting at Scale
  5. 2026Steerable Instruction Following Coding Data Synthesis with Actor-Parametric Schema Co-Evolution
  6. 2025Infinite-Instruct: Synthesizing Scaling Code instruction Data with Bidirectional Synthesis and Static Verification
  7. 2024Towards a Theoretical Understanding of Synthetic Data in LLM Post-Training: A Reverse-Bottleneck Perspective
  8. 2026Code Is More Than Text: Uncertainty Estimation for Code Generation