English

ConvexBench: Can LLMs Recognize Convex Functions?

Artificial Intelligence 2026-02-05 v2

Abstract

Convex analysis is a modern branch of mathematics with many applications. As Large Language Models (LLMs) start to automate research-level math and sciences, it is important for LLMs to demonstrate the ability to understand and reason with convexity. We introduce \cb, a scalable and mechanically verifiable benchmark for testing \textit{whether LLMs can identify the convexity of a symbolic objective under deep functional composition.} Experiments on frontier LLMs reveal a sharp compositional reasoning gap: performance degrades rapidly with increasing depth, dropping from an F1-score of 1.01.0 at depth 22 to approximately 0.20.2 at depth 100100. Inspection of models' reasoning traces indicates two failure modes: \textit{parsing failure} and \textit{lazy reasoning}. To address these limitations, we propose an agentic divide-and-conquer framework that (i) offloads parsing to an external tool to construct an abstract syntax tree (AST) and (ii) enforces recursive reasoning over each intermediate sub-expression with focused context. This framework reliably mitigates deep-composition failures, achieving substantial performance improvement at large depths (e.g., F1-Score =1.0= 1.0 at depth 100100).

Keywords

Cite

@article{arxiv.2602.01075,
  title  = {ConvexBench: Can LLMs Recognize Convex Functions?},
  author = {Yepeng Liu and Yu Huang and Yu-Xiang Wang and Yingbin Liang and Yuheng Bu},
  journal= {arXiv preprint arXiv:2602.01075},
  year   = {2026}
}
R2 v1 2026-07-01T09:29:58.139Z