One Example Shown, Many Concepts Known! Counterexample-Driven Conceptual Reasoning in Mathematical LLMs

Yinghui Li, Jiayi Kuang, Haojing Huang, Zhikun Xu, Xinnian Liang, Yi Yu, Wenlian Lu, Yangning Li, Xiaoyu Tan, Chao Qu, Ying Shen, Hai-Tao Zheng, Philip S. Yu

TL;DR

Current mathematical Large Language Models (LLMs) often rely on "drill-based" memorization rather than deep conceptual understanding. This paper introduces COUNTERMATH, a university-level benchmark designed to test models through "proof by counterexample." The authors demonstrate that training models on just a few hundred high-quality counterexamples significantly boosts their general reasoning performance across major math benchmarks.

The Problem: Drill-Based vs. Conceptual Learning

In human mathematics education, there is a clear distinction between "drill-based learning"—solving thousands of similar arithmetic problems—and "example-based learning," where a single well-chosen counterexample can illuminate the boundaries of a complex theorem.

Current paradigms often focus on drill-based question generation or formal theorem proving.

The authors argue that current LLMs are stuck in the "drill" phase. While they can generate proofs for statements they have seen during training, they often fail to grasp the subtle nuances of mathematical concepts. If a model cannot identify a specific case where a general statement fails (a counterexample), does it truly understand the theorem? To bridge this gap, the researchers focus on counterexample-driven conceptual reasoning, a creative and concept-intensive skill that remains a major hurdle even for advanced models like OpenAI’s o1.

The counterexample proof paradigm and learning from examples.

Methodology

The researchers attacked the problem from two angles: evaluation and training.

  1. Benchmark Creation (COUNTERMATH): They manually curated a high-quality dataset of 1,216 statement-rationale pairs from university-level textbooks. These cover fields like Topology and Functional Analysis, where "unusual" conditions often lead to counterintuitive results.
  2. Data Engineering Framework: To improve model performance, they developed an automated pipeline to extract training data from existing mathematical corpora (like ProofNet). They used GPT-4o as a "judge" to filter for proofs that specifically utilize counter-reasoning or special cases.
  3. Refinement: Rather than using raw data, the team applied a "refinement prompt" to rewrite long, rambling proofs into concise, explicit rationales. This highlights the counterexample, making the logic easier for the model to learn during Supervised Fine-Tuning (SFT).

Key Insights

  • The "Drill" Ceiling: Models trained on massive amounts of similar problems (like WizardMath) often fail on COUNTERMATH. This suggests that simply providing "more data" is not a substitute for teaching "better reasoning."
  • Topology is the Final Boss: Models performed significantly worse in abstract fields like Topology and Real Analysis compared to Algebra. This is likely due to the highly abstract nature of these subjects and their lower representation in general training sets.
  • Quality Over Quantity: One of the most striking findings is that fine-tuning on a tiny dataset (just ~1,000 samples) of counterexamples provided a massive boost to general mathematical ability. This implies that counterexample reasoning is a "core" cognitive skill that transfers to other types of math.
  • Token Inefficiency: The authors found that "reasoning models" like o1-preview and QwQ use a massive number of tokens but do not always see a linear improvement in conceptual accuracy. Simply "thinking longer" doesn't help if the model lacks the underlying conceptual framework.

Key Results

  • Benchmark Difficulty: Most open-source 7B models struggle significantly on COUNTERMATH, with F1 scores hovering around 30. Even powerful models like DeepSeek-R1 (80.7 F1) and Gemini 2.5 Pro (77.0 F1) show room for improvement in higher-level conceptual reasoning.
  • The Power of SFT: By fine-tuning Qwen-2.5-Math-7B on their small counterexample dataset, the authors improved its score on the prestigious AIME 2024 from 20.0 to 30.0—a 50% relative improvement.
  • Generalization: The fine-tuned model outperformed the much larger 72B-parameter base model on several Out-of-Distribution (OOD) tasks (including MATH, GSM8K, and OlympiadBench), proving that learning to find counterexamples makes a model a better mathematician overall.

Limitations and Future Work

The authors acknowledge that COUNTERMATH is still relatively small (1,216 samples) and that the distribution of "True" vs. "False" statements is imbalanced (87.8% are True). While this reflects the nature of mathematical textbooks, it can lead to models developing a "truth bias."

Future work will likely focus on using Reinforcement Learning (RL) to encourage models to generate their own novel counterexamples, rather than just identifying them. There is also a clear need to expand the dataset into even more specialized areas of higher mathematics where LLMs currently flounder.

Summary updated

BibTeX
@inproceedings{li2025one,
  author = {Yinghui Li and Jiayi Kuang and Haojing Huang and Zhikun Xu and Xinnian Liang and Yi Yu and Wenlian Lu and Yangning Li and Xiaoyu Tan and Chao Qu and Ying Shen and Hai-Tao Zheng and Philip S. Yu},
  title = {{One Example Shown, Many Concepts Known! Counterexample-Driven Conceptual Reasoning in Mathematical LLMs}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=A31Ep22iQ7},
}
Figure