Abstract
While Large Language Models (LLMs) have mastered the nuances of human conversation, their ability to reason through raw, structured data remains a significant hurdle. This paper introduces StrucText-Eval, a comprehensive benchmark covering 8 structured languages and 29 reasoning tasks. The study reveals a massive performance gap between humans and even the most advanced models as structural complexity increases, suggesting that current LLMs rely more on pattern recognition than true structural logic.
Introduction
In modern corporate and scientific environments, data is rarely just "text." It exists in structured formats such as JSON, YAML, XML, LaTeX, and Markdown. As we move toward autonomous agents capable of interacting with databases and codebases, a critical question arises: Can LLMs interpret and reason over structured data directly in its raw form?
Existing benchmarks often focus narrowly on tables or graphs and rely on manual annotation, which limits scalability and risks data contamination. StrucText-Eval addresses these gaps by providing a framework that automatically generates complex, multi-layered structural reasoning problems with controllable difficulty across a wide array of formats.
Methodology: The StrucText-Eval Pipeline
The researchers developed an automatic data generation pipeline designed to isolate structural reasoning from semantic understanding. The process follows a systematic flow from abstract representation to language-specific samples.
- Abstract Structure Generation: The system constructs an "Abstract Structure Tree" with adjustable parameters for depth (nesting levels) and width (elements per level).
- Multi-Language Translation: This abstract tree is translated into eight distinct formats: JSON, YAML, XML, CSV, Tree (custom), Markdown, LaTeX, and ORG.
- Task Diversity: The benchmark includes 29 tasks across eight categories, such as syntax error detection, hierarchical navigation (PathWalk/PathCompose), logical operations (Statistics/Join), and tree metrics (calculating node heights).
- Evaluation Strategies: Models were tested using "Naive" prompts, Chain-of-Thought (CoT), and a novel "With Hint" method, which provides the model with the specific algorithm required to solve the structural problem.
Benchmark Datasets
The StrucText-Eval benchmark consists of 5,800 samples categorized into three specialized suites:
- Test Suite (3,712 samples): Rule-based data designed to evaluate basic structural proficiency.
- Real-Test Suite (928 samples): Human-rewritten versions of the test suite using real-world scenarios (e.g., sports statistics, financial records) to ensure synthetic results translate to reality.
- Test-Hard Suite (2,088 samples): High-complexity samples featuring deep nesting and long sequences, with some contexts exceeding 100,000 characters.
Key Insights and Results
The evaluation yielded several critical findings regarding the current state of LLM reasoning:
The "Complexity Wall"
LLM performance is highly sensitive to structural depth. While models may handle simple objects perfectly, their accuracy drops precipitously as nesting depth or width increases. This "complexity wall" suggests that models struggle to maintain internal state when navigating deep hierarchies.
Training Bias and Pattern Matching
Models performed significantly better on JSON than on formats like YAML or ORG. This disparity indicates that LLMs are not necessarily learning the underlying logic of data structures but are instead relying on high-frequency patterns encountered during pre-training on web data.
The CoT Paradox
Interestingly, Chain-of-Thought (CoT) prompting—usually a boon for logical tasks—often degraded performance in complex structural tasks. Models tended to "hallucinate" intermediate structural states, leading to cascading errors that derailed the final answer.
Performance Gap
- Human vs. Model: On the "Hard" dataset, humans achieved 92.6% accuracy, while the best open-source model (Llama-3.1-70B) reached only 45.8%.
- Top Performers: GPT-4o led among closed-source models with 51.1% base accuracy on the Hard suite, improving to 69.5% with 3-shot demonstrations.
- Knowledge vs. Execution: Performance jumped significantly when models were given a "Hint" (the parsing algorithm). This suggests models possess the latent capability to understand structure but fail to autonomously plan the navigation of complex syntax.
Conclusion and Future Work
StrucText-Eval highlights a significant gap in the structural reasoning capabilities of current LLMs. While these models are proficient at semantic tasks, they lack the robustness required for complex, raw data manipulation. Future research should focus on "structural pre-training" or the development of structure-aware attention mechanisms to bridge the gap between model performance and human-level data interpretation.
Summary updated