Can Large Language Models do Analytical Reasoning?

Yebowen Hu, Kaiqiang Song, Sangwoo Cho, Xiaoyang Wang, Hassan Foroosh, Dong Yu, Fei LiuarXiv 2024 · DOI

Introduction

Large Language Models (LLMs) have demonstrated remarkable proficiency in solving standardized mathematical benchmarks like GSM8k. However, these benchmarks often consist of short, self-contained word problems that do not fully capture the complexity of real-world analytical reasoning. This paper investigates whether state-of-the-art LLMs can maintain a consistent "mental state" over long sequences of information by tasking them with a practical challenge: calculating team scores from NBA and NFL play-by-play (PBP) data.

Analytical reasoning in this context requires more than simple arithmetic. It demands the ability to process lengthy contexts, filter out irrelevant noise, and identify specific scoring events (such as a 3-point shot versus a missed free throw) while performing continuous operations. The study reveals a significant performance gap between sports with different information densities and highlights the effectiveness of specialized prompting strategies.

Methodology

The researchers evaluated five leading models: GPT-4, GPT-3.5, Claude-2.1, Gemini-Pro, and Llama-2-70b. To assess their reasoning capabilities, four distinct prompting approaches were utilized:

  1. Natural Instructions (NI): A direct prompt asking the model to provide the final score based on the input text.
  2. NI + JSON: A requirement for the model to output the final answer in a structured JSON format to facilitate automated parsing.
  3. NI + Chain of Thought (CoT): An instruction encouraging the model to "think step-by-step," breaking down the scoring process.
  4. Divide-and-Conquer (D&C): A novel programmatic approach where the PBP data is segmented into smaller "clips" (e.g., 3 plays at a time). The LLM calculates the score for each clip, and an external script aggregates these partial results into a final score.
Overview of the Divide-and-Conquer (D&C) workflow for processing play-by-play data.

Data Characteristics

The study utilized the SportsMetrics dataset, sourced from ESPN, focusing on two sports with vastly different profiles:

  • NBA Data: Characterized by high information density. A typical quarter contains approximately 116 plays and 29 scoring events, requiring frequent state updates.
  • NFL Data: Characterized by low information density. A typical quarter involves roughly 43 plays but only 2 scoring events on average.

The researchers sampled 100 games from each sport to ensure a robust evaluation of the models' ability to handle varying levels of task complexity.

Analysis of LLM Performance

The Density Difficulty

The most striking finding was the impact of information density on accuracy. Models performed significantly better in the NFL than in the NBA. In the NBA, the high frequency of scoring events provides more opportunities for the model to lose track of the score, suggesting that task complexity is driven by the ratio of relevant events to total context.

The Divide-and-Conquer Advantage

Breaking the task into smaller chunks proved to be the most effective strategy. For GPT-4 in the NBA, a step size of $n=3$ (processing three plays at a time) yielded the best results. Chunks that were too small ($n=1$) caused the model to lose necessary context, while chunks that were too large ($n=30$) overwhelmed the model's reasoning capacity.

Context Length and Hallucinations

Performance dropped across all models as context length increased from 2-minute intervals to full games. This indicates that even "long-context" LLMs struggle with precise reasoning when the window is fully utilized. Furthermore, open-source models like Llama-2-70b frequently exhibited "over-counting" hallucinations, predicting scores that were physically impossible for the given segment length.

Key Results

The evaluation showed that without specialized strategies, even top-tier models struggle with high-density data. In NBA quarters, GPT-4's baseline accuracy was a mere 11%. However, with the Divide-and-Conquer ($n=3$) method, its accuracy surged to 60.14%. In contrast, the lower density of the NFL allowed GPT-4 to reach 98.75% accuracy using D&C ($n=10$).

Accuracy degradation for Claude-2.1 and GPT-4 across various game lengths and prompting strategies.

While Chain of Thought (CoT) provided a boost for GPT-4 and Claude-2.1, it had negligible or even detrimental effects on GPT-3.5 and Gemini-Pro, suggesting that CoT's effectiveness is highly model-dependent for this specific analytical task.

Conclusion

While LLMs show promise, they are not yet reliable enough for autonomous, high-precision sports analysis. The success of the Divide-and-Conquer method suggests that future research should focus on hybrid systems where LLMs act as intelligent parsers that identify events, while external symbolic tools (like code interpreters) handle the precise arithmetic. Enhancing training data with long-form, step-by-step analytical reasoning will also be crucial for closing the gap in complex real-world tasks.

Summary updated

BibTeX
@misc{hu2024can,
  author = {Yebowen Hu and Kaiqiang Song and Sangwoo Cho and Xiaoyang Wang and Hassan Foroosh and Dong Yu and Fei Liu},
  title = {{Can Large Language Models do Analytical Reasoning?}},
  year = {2024},
  eprint = {2403.04031},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.04031},
}
Figure