DSR-Bench: Evaluating the Structural Reasoning Abilities of LLMs via Data Structures
Existing benchmarks lack fine-grained evaluation of large language models’ (LLMs) structural reasoning capabilities at the data structure level. To address this, we propose DSR-Bench—the first automated, data-structure-centric benchmark—comprising 20 data structures, 35 operation types, and 4,140 synthetically generated questions. It establishes a hierarchical, fully automated, and subjectivity-free evaluation paradigm grounded in data structures. Leveraging structured prompt engineering, deterministic programmatic assessment, and multidimensional capability decomposition, we evaluate nine state-of-the-art models. Our analysis uncovers fundamental limitations in multi-attribute, multi-hop, and hybrid-structure reasoning: instruction-tuned models exhibit weak foundational structural reasoning; inference-optimized models achieve at most 47% accuracy on challenging subsets; and performance degrades significantly on tasks involving multidimensional data and natural-language descriptions.