CodeComplex: Dataset for Worst-Case Time Complexity Prediction
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
Reasoning ability of Large Language Models (LLMs) is a crucial ability, especially in complex decision-making tasks. One significant task to show LLMs' reasoning capability is code time complexity prediction, which involves various intricate factors such as the input range of variables and conditional loops. Current benchmarks fall short of providing a rigorous assessment due to limited data, language constraints, and insufficient labeling. They do not consider time complexity based on input representation and merely evaluate whether predictions fall into the same class, lacking a measure of how close incorrect predictions are to the correct ones. To address these dependencies, we introduce CodeComplex, the first robust and extensive dataset designed to evaluate LLMs' reasoning abilities in predicting code time complexity. CodeComplex comprises 4,900 Java codes and an equivalent number of Python codes, overcoming language and labeling constraints, carefully annotated with complexity labels based on input characteristics by a panel of algorithmic experts. Additionally, we propose specialized evaluation metrics for the reasoning of complexity prediction tasks, offering a more precise and reliable assessment of LLMs' reasoning capabilities. We release our dataset (https://github.com/sybaik1/CodeComplex-Data) and baseline models (https://github.com/sybaik1/CodeComplex-Models) publicly to encourage the relevant (NLP, SE, and PL) communities to utilize and participate in this research.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. First posted on arXiv 16 Jan 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 1; 2026: 2.
3 papers.
Similar, not cited
Close in wording, no citation either way
- 2025Evaluating Code Reasoning Abilities of Large Language Models Under Real-World Settings
- 2025BigO(Bench): Can LLMs Generate Code with Controlled Time and Space Complexity?
- 2025rStar-Coder: Scaling Competitive Code Reasoning with a Large-Scale Verified Dataset
- 2026CodeEval: A pedagogical approach for targeted evaluation of code-trained Large Language Models
- 2026Evaluating LLMs Code Reasoning Under Real-World Context
- 2025LeetCodeDataset: A Temporal Dataset for Robust Evaluation and Efficient Training of Code LLMs
- 2025Are Large Language Models Robust in Understanding Code Against Semantics-Preserving Mutations?
- 2025On Code-Induced Reasoning in LLMs