Leveraging Online Olympiad-Level Math Problems for LLMs Training and Contamination-Resistant Evaluation

Mahdavi, Sadegh, Li, Muchen, Liu, Kaiwen, Thrampoulidis, Christos, Sigal, Leonid, Liao, Renjie

arXiv.org Artificial Intelligence 

Advances in Large Language Models (LLMs) have sparked interest in their ability to solve Olympiad-level math problems. However, the training and evaluation of these models are constrained by the limited size and quality of available datasets, as creating large-scale data for such advanced problems requires extensive effort from human experts. In addition, current benchmarks are prone to contamination, leading to unreliable evaluations. In this paper, we present an automated pipeline that leverages the rich resources of the Art of Problem Solving (AoPS) forum, which predominantly features Olympiad-level problems and community-driven solutions. Using open-source LLMs, we develop a method to extract question-answer pairs from the forum, resulting in AoPS-Instruct, a dataset of more than 600,000 high-quality QA pairs. Our experiments demonstrate that fine-tuning LLMs on AoPS-Instruct improves their reasoning abilities across various benchmarks. Moreover, we build an automatic pipeline that introduces LiveAoPSBench, an evolving evaluation set with timestamps, derived from the latest forum data, providing a contamination-resistant benchmark for assessing LLM performance. Notably, we observe a significant decline in LLM performance over time, suggesting their success on older examples may stem from pre-training exposure rather than true reasoning ability. Our work presents a scalable approach to creating and maintaining large-scale, high-quality datasets for advanced math reasoning, offering valuable insights into the capabilities and limitations of LLMs in this domain. Our benchmark and code is available at https://github.com/DSL-Lab/aops. Large language models (LLMs) have shown tremendous success in solving various tasks such as code generation (Li et al., 2022), math reasoning (Shao et al., 2024), and commonsense reasoning (Zellers et al., 2019; Achiam et al., 2023), suggesting that current models may show signs of artificial general intelligence (AGI) (Bubeck et al., 2023). Math reasoning is perhaps one of the most challenging tasks for the LLMs, since mathematics is inherently structured, requiring not just recall of facts but also rigorous logical inference, abstraction, and understanding of formal symbolic systems. As such, there have been grand challenges (Selsam et al., 2019) and million-dollar prizes AIMO (2023) established for a model capable of solving Olympiad-level math problems. On the training side, despite significant progress in certain areas, such as geometry, particularly with the assistance of symbolic methods (Trinh et al., 2024), the performance of LLMs remains limited on Olympiad-level problems (He et al., 2024).