Proceedings

AlgoSimBench: Identifying Algorithmically Similar Problems for Competitive Programming

Download BibTeX Cite

Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence. Main Track. Pages 5793-5801.

https://doi.org/10.24963/ijcai.2026/645

Abstract

Recent reasoning-enhanced Large Language Models (LLMs) have achieved promising results in solving complex competitive programming problems. However, it remains unclear whether these reasoning abilities generalize to relevant tasks, like identifying algorithmically similar problems (ASPs). We introduce AlgoSimBench, a benchmark of 402 multiple-choice questions curated in an adversarial setting: each given reference problem is paired with one algorithmically similar problem and three distractors that are semantically close but algorithmically dissimilar. This design forces models to rely on algorithmic reasoning rather than superficial textual cues. Our evaluation shows that LLMs consistently struggle under this setting. To address this gap, we propose Attempted Solution Matching (ASM), which leverages LLM-generated solution attempts to assess similarity, yielding an average accuracy improvement of 9% across models. Beyond LLM evaluation, AlgoSimBench also probes code retrieval methods; when combined with BM25, ASM achieves an additional 11.8% gain over state-of-the-art embedding models. AlgoSimBench offers a challenging testbed that facilitates future studies on LLMs and retrieval methods.

  1. ASM-NL ASM-PL BM25 Bart GCB CR CS Jina SFR BM25 Bart GCB CR CS Jina SFR BM25 Bart GCB CR CS Jina SFR GPT-4o-mini 25.6 23.4 20.6 20.1 19.9 20.6 28.4 35.3 29.1 22.4 23.6 22.9 24.9 26.1 34.8 26.1 32.8 30.3 24.4 29.4 30.1 GPT-4o 25.8 24.6 26.1 24.9 19.2 21.6 28.9 42.5 30.1 32.1 28.4 28.1 31.1 34.6 35.6 28.8 29.1 29.4 21.9 26.6 26.6 o3-mini-medium 39.3 32.6 31.3 29.1 29.9 30.6 34.1 49.0 35.6 38.3 40.8 40.3 40.8 39.3 48.8 28.4 39.3 37.3 35.6 46.3 35.1 Deepseek-V3 29.9 26.1 22.4 24.4 24.1 32.1 33.1 46.0 33.1 32.1 33.8 37.6 36.8 36.3 45.5 32.3 35.1 38.6 31.1 40.8 37.8 Deepseek-R1 30.1 24.1 25.9 30.1 28.4 30.8 35.1 52.2 32.8 31.1 45.8 41.3 43.3 40.0 45.0 32.8 35.9 44.0 38.8 49.8 40.0 Gemini-2.0-Flash 27.1 24.4 18.6 24.4 21.9 23.1 28.4 41.0 34.3 26.6 33.6 34.1 33.1 36.8 38.0 36.8 35.6 33.8 29.9 36.1 33.3 Claude-Sonnet-3.5 29.4 25.1 25.4 26.1 25.4 29.1 32.3 39.6 28.1 28.6 32.6 31.6 36.3 34.6 35.0 29.1 29.9 29.4 26.4 30.8 33.6 Avg 29.6 25.8 24.3 24.0 22.1 25.3 30.2 43.7 31.9 30.2 30.4 30.8 32.4 33.7 40.4 30.6 34.0 32.3 26.7 32.7 32.3
  2. [Austin et al., 2021] Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, et al. Program synthesis with large language models. arXiv preprint arXiv:2108.07732, 2021.
  3. [Calais et al., 2025] Pedro Calais, Gabriel Franco, Zilu Tang, Themistoklis Nikas, Wagner Meira Jr, Evimaria Terzi, and Mark Crovella. Disentangling text and math in word prob- lems: Evidence for the bidimensional structure of large language models' reasoning. In Findings of the Association for Computational Linguistics: ACL 2025, pages 12671- 12688, 2025.
  4. [Chen et al., 2021] Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021.
  5. [DeepSeek-AI et al., 2025a] DeepSeek-AI, Daya Guo, De- jian Yang, Haowei Zhang, Junxiao Song, Ruoyu Zhang, Runxin Xu, Qihao Zhu, Shirong Ma, Peiyi Wang, Xiao Bi, Xiaokang Zhang, Xingkai Yu, Yu Wu, Z. F. Wu, Zhibin Gou, Zhihong Shao, Zhuoshu Li, Ziyi Gao, Aixin Liu, Bing Xue, Bingxuan Wang, Bochao Wu, Bei Feng, et al. Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning, 2025.
  6. [DeepSeek-AI et al., 2025b] DeepSeek-AI, Aixin Liu, Bei Feng, Bing Xue, Bingxuan Wang, Bochao Wu, Chengda Lu, Chenggang Zhao, Chengqi Deng, Chenyu Zhang, Chong Ruan, Damai Dai, Daya Guo, Dejian Yang, Deli Chen, Dongjie Ji, Erhang Li, Fangyun Lin, Fucong Dai, Fuli Luo, et al. Deepseek-v3 technical report, 2025. Feng et al., 2020] Zhangyin Feng, Daya Guo, Duyu Tang, Nan Duan, Xiaocheng Feng, Ming Gong, Linjun Shou, Bing Qin, Ting Liu, Daxin Jiang, and Ming Zhou. Code- BERT: A pre-trained model for programming and natu- ral languages. In Findings of the Association for Com- putational Linguistics: EMNLP 2020, pages 1536-1547, Online, November 2020. Association for Computational Linguistics.
  7. [Gao et al., 2023] Luyu Gao, Xueguang Ma, Jimmy Lin, and Jamie Callan. Precise zero-shot dense retrieval without relevance labels. In Anna Rogers, Jordan Boyd-Graber, and Naoaki Okazaki, editors, Proceedings of the 61st An- nual Meeting of the Association for Computational Linguis- tics (Volume 1: Long Papers), pages 1762-1777, Toronto, Canada, July 2023. Association for Computational Linguis- tics.
  8. [Gu et al., 2018] Xiaodong Gu, Hongyu Zhang, and Sunghun Kim. Deep code search. In Proceedings of the 40th interna- tional conference on software engineering, pages 933-944, 2018.
  9. [Gu et al., 2024] Alex Gu, Baptiste Rozière, Hugh Leather, Armando Solar-Lezama, Gabriel Synnaeve, and Sida I. Wang. Cruxeval: A benchmark for code reasoning, under- standing and execution. arXiv preprint arXiv:2401.03065, 2024.
  10. [Guo et al., 2021] Daya Guo, Shuo Ren, Suyu Lu, Junjie Feng, Duyu Tang, Nan Duan, Ming Zhou, and Sining Liu. Graphcodebert: Pre-training code representations with data flow. arXiv preprint arXiv:2009.08366, 2021.
  11. [Guo et al., 2024] Daya Guo, Qihao Zhu, Dejian Yang, Zhenda Xie, Kai Dong, Wentao Zhang, Guanting Chen, Xiao Bi, Y. Wu, Y. K. Li, Fuli Luo, Yingfei Xiong, and Wenfeng Liang. Deepseek-coder: When the large language model meets programming -the rise of code intelligence, 2024.
  12. [Günther et al., 2024] Michael Günther, Jackmin Ong, Is- abelle Mohr, Alaeddine Abdessalem, Tanguy Abel, and Mohammad Kalim Akram others. Jina embeddings 2: 8192- token general-purpose text embeddings for long documents, 2024.
  13. [Hua et al., 2024] Wenyue Hua, Kaijie Zhu, Lingyao Li, Lizhou Fan, Shuhang Lin, Mingyu Jin, Haochen Xue, Ze- long Li, JinDong Wang, and Yongfeng Zhang. Disentan- gling logic: The role of context in large language model reasoning capabilities, 2024.
  14. [Huang et al., 2024] Yiming Huang, Zhenghao Lin, Xiao Liu, Yeyun Gong, Shuai Lu, Fangyu Lei, Yaobo Liang, Yelong Shen, Chen Lin, Nan Duan, and Weizhu Chen. Competition-level problems are effective llm evaluators, 2024.
  15. [Hui et al., 2024] Binyuan Hui, Jian Yang, Zeyu Cui, Jiaxi Yang, Dayiheng Liu, Lei Zhang, Tianyu Liu, Jiajun Zhang, and Bowen Yu others. Qwen2.5-coder technical report, 2024.
  16. [Islam et al., 2024] Md Ashraful Islam, Mohammed Eunus Ali, and Md Rizwan Parvez. Mapcoder: Multi-agent code generation for competitive problem solving. arXiv preprint arXiv:2405.11403, 2024.
  17. [Izacard et al., 2022] Gautier Izacard, Mathilde Caron, Lu- cas Hosseini, Sebastian Riedel, Piotr Bojanowski, Armand Joulin, and Edouard Grave. Unsupervised dense informa- tion retrieval with contrastive learning, 2022.
  18. [Jain et al., 2021] Paras Jain, Ajay Jain, Tianjun Zhang, Pieter Abbeel, Joseph Gonzalez, and Ion Stoica. Con- trastive code representation learning. In Proceedings of the 2021 Conference on Empirical Methods in Natural Lan- guage Processing, pages 5954-5971, Online and Punta Cana, Dominican Republic, November 2021. Association for Computational Linguistics.
  19. [Jimenez et al., 2024] Carlos E Jimenez, John Yang, Alexan- der Wettig, Shunyu Yao, Kexin Pei, Ofir Press, and Karthik R Narasimhan. SWE-bench: Can language models resolve real-world github issues? In The Twelfth Interna- tional Conference on Learning Representations, 2024.
  20. [Levesque et al., 2011] Hector J. Levesque, Ernest Davis, and L. Morgenstern. The winograd schema challenge. In AAAI Spring Symposium: Logical Formalizations of Common- sense Reasoning, 2011.
  21. [Lewis et al., 2020] Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. Bart: De- noising sequence-to-sequence pre-training for natural lan- guage generation, translation, and comprehension. arXiv preprint arXiv:1910.13461, 2020.
  22. [Li et al., 2022] Yujia Li, David Choi, Junyoung Chung, Nate Kushman, Julian Schrittwieser, Rémi Leblond, Tom Eccles, James Keeling, Felix Gimeno, Agustin Dal Lago, et al. Competition-level code generation with alphacode. arXiv preprint arXiv:2203.07814, 2022.
  23. [Li et al., 2023] Mingjie Li, Yuan-Gen Wang, Peng Zhang, Hanpin Wang, Lisheng Fan, Enxia Li, and Wei Wang. Deep learning for approximate nearest neighbour search: A sur- vey and future directions. IEEE Transactions on Knowledge and Data Engineering, 35(9):8997-9018, 2023.
  24. [Li et al., 2025] Jierui Li, Hung Le, Yingbo Zhou, Caiming Xiong, Silvio Savarese, and Doyen Sahoo. CodeTree: Agent-guided tree search for code generation with large lan- guage models. In Luis Chiruzzo, Alan Ritter, and Lu Wang, editors, Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computa- tional Linguistics (Volume 1: Long Papers), pages 3711- 3726, Albuquerque, New Mexico, April 2025. Association for Computational Linguistics.
  25. [Liu et al., 2023] Jiawei Liu, Chunqiu Steven Xia, Yuyao Wang, and Lingming Zhang. Is your code generated by chat- GPT really correct? rigorous evaluation of large language models for code generation. In Thirty-seventh Conference on Neural Information Processing Systems, 2023.
  26. [Liu et al., 2024] Ye Liu, Rui Meng, Shafiq Joty, Silvio Savarese, Caiming Xiong, Yingbo Zhou, and Semih Yavuz. Codexembed: A generalist embedding model family for multiligual and multi-task code retrieval, 2024.
  27. [Patel et al., 2024] Arkil Patel, Siva Reddy, Dzmitry Bah- danau, and Pradeep Dasigi. Evaluating in-context learning of libraries for code generation, 2024.
  28. [Robertson et al., 1995] Stephen E. Robertson, Susan Walker, S. Jones, Micheline M. Hancock-Beaulieu, and Mike Gat- ford. Okapi at trec-3: Retrieving via probabilistic retrieval. NIST Special Publication, 500-225:109-123, 1995.
  29. [Rozière et al., 2024] Baptiste Rozière, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Xiaoqing Ellen Tan, Yossi Adi, Jingyu Liu, Romain Sauvestre, Tal Remez, et al. Code llama: Open foundation models for code, 2024.
  30. [Sakaguchi et al., 2019] Keisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. Winogrande: An adversarial winograd schema challenge at scale, 2019.
  31. [Schleimer et al., 2003] Saul Schleimer, Daniel S Wilkerson, and Alex Aiken. Winnowing: local algorithms for doc- ument fingerprinting. In Proceedings of the 2003 ACM SIGMOD international conference on Management of data, pages 76-85, 2003.
  32. [Shi et al., 2022] Freda Shi, Daniel Fried, Marjan Ghazvininejad, Luke Zettlemoyer, and Sida I. Wang. Natural language to code translation with execution. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 3533-3546, Abu Dhabi, United Arab Emirates, December 2022. Association for Computational Linguistics.
  33. [Shi et al., 2024] Ben Shi, Michael Tang, Karthik R Narasimhan, and Shunyu Yao. Can language models solve olympiad programming? In First Conference on Language Modeling, 2024.
  34. [Suresh et al., 2025] Tarun Suresh, Revanth Gangi Reddy, Yifei Xu, Zach Nussbaum, Andriy Mulyar, Brandon Dud- erstadt, and Heng Ji. Cornstack: High-quality contrastive data for better code retrieval and reranking, 2025.
  35. [Tang et al., 2023] Ruixiang Tang, Dehan Kong, Longtao Huang, and Hui Xue. Large language models can be lazy learners: Analyze shortcuts in in-context learning. In Find- ings of the Association for Computational Linguistics: ACL 2023. Association for Computational Linguistics, 2023.
  36. [Valentino et al., 2024] Marco Valentino, Leonardo Ranaldi, Giulia Pucci, Federico Ranaldi, and Andre Freitas. Semeval-2026 task 11: Disentangling content and formal reasoning in language models, 2024.
  37. [Wang et al., 2025] Zora Zhiruo Wang, Akari Asai, Xinyan Velocity Yu, Frank F. Xu, Yiqing Xie, Graham Neubig, and Daniel Fried. Coderag-bench: Can retrieval augment code generation?, 2025.
  38. [Wei et al., 2025] Anjiang Wei, Jiannan Cao, Ran Li, Hongyu Chen, Yuhui Zhang, Ziheng Wang, Yaofeng Sun, Yuan Liu, Thiago S. F. X. Teixeira, Diyi Yang, Ke Wang, and Alex Aiken. Equibench: Benchmarking code reasoning capabil- ities of large language models via equivalence checking, 2025.
  39. [Xiong et al., 2026] Jing Xiong, Zixuan Li, Chuanyang Zheng, Zhijiang Guo, Yichun Yin, Enze Xie, Zhicheng Yang, Qingxing Cao, Haiming Wang, Xiongwei Han, Jing Tang, Chengming Li, and Xiaodan Liang. Dq-lore: Dual queries with low rank approximation re-ranking for in- context learning, 2026.
  40. [Zakeri-Nasrabadi et al., 2023] Morteza Zakeri-Nasrabadi, Saeed Parsa, Mohammad Ramezani, Chanchal Roy, and Masoud Ekhtiarzadeh. A systematic literature review on source code similarity measurement and clone detection: Techniques, applications, and challenges. Journal of Sys- tems and Software, 204:111796, 2023.
  41. [Zhang et al., 2024] Dejiao Zhang, Wasi Uddin Ahmad, Ming Tan, Hantian Ding, Ramesh Nallapati, Dan Roth, Xiaofei Ma, and Bing Xiang. CODE REPRESENTATION LEARNING AT SCALE. In The Twelfth International Conference on Learning Representations, 2024.
  42. [Zhong et al., 2023] Wanjun Zhong, Tingting Ma, Jiahai Wang, Jian Yin, Tiejun Zhao, Chin-Yew Lin, and Nan Duan. Disentangling reasoning capabilities from language models with compositional reasoning transformers. In Findings of the Association for Computational Linguistics: ACL 2023, pages 7587-7600, 2023.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards