TL;DR
This paper introduces DOCMATH-EVAL, a new benchmark designed to test Large Language Models (LLMs) on their ability to perform numerical reasoning within long, specialized financial documents. Current LLMs, even top performers like GPT-4o, still significantly lag behind human experts on these complex tasks, highlighting a critical gap in their real-world applicability.
What Problem Does This Paper Address?
While LLMs have shown impressive performance on standard math word problems, their ability to handle real-world, domain-specific numerical reasoning remains largely unexplored. This is particularly true in fields like finance, where professionals must interpret lengthy documents containing both text and tables to make critical decisions. Existing benchmarks often focus on simpler problems or shorter contexts, failing to capture the complexity of real-world financial analysis. DOCMATH-EVAL aims to bridge this gap by providing a challenging evaluation suite that mimics these real-world scenarios.
Methods
The authors developed DOCMATH-EVAL, a benchmark comprising four evaluation sets with varying difficulty levels. The core innovation lies in its focus on long and specialized documents, requiring LLMs to not only understand complex text and tables but also apply numerical reasoning within a specific domain (finance). They evaluated 48 LLMs using two prompting techniques: Chain-of-Thought (CoT) and Program-of-Thought (PoT). PoT, which generates executable Python code for solutions, was found to be particularly effective for numerical tasks. For extremely long documents, they employed a Retrieval-Augmented Generation (RAG) approach to manage context length.
Datasets
DOCMATH-EVAL consists of four evaluation sets:
- DMCompLong: A newly constructed, challenging set designed from scratch to evaluate complex numerical reasoning over extremely long documents with multiple tables.
- DMSimpShort: Adapted from TAT-QA and FinQA, focusing on simple numerical reasoning over short documents with one table.
- DMSimpLong: Adapted from MultiHiertt, focusing on simple numerical reasoning over long documents with multiple tables.
- DMCompShort: Adapted from TAT-HQA, focusing on complex numerical reasoning over short documents with one table.
The benchmark includes a total of 4,000 questions with high-quality annotations.
Key Insights and Ideas
- The "Real-World" Gap is Significant: Even the most advanced LLMs struggle with complex numerical reasoning in long, specialized documents, falling far short of human expert performance. This suggests that current LLMs are not yet ready for critical, high-stakes financial analysis without significant human oversight.
- Program-of-Thought Shines for Math: Generating executable code (PoT) proved more effective than just generating reasoning steps (CoT) for numerical tasks, likely because it forces a more structured and verifiable computation process.
- Long Context is a Major Hurdle: The DMCompLong set, with its extended document lengths, is where LLMs show the most significant performance degradation, underscoring the challenge of processing and reasoning over extensive information.
- Retrieval is Crucial for Long Documents: For very long documents, effective retrieval mechanisms (like OpenAI Embedding 3 Large) are essential to provide LLMs with the relevant context, significantly boosting performance.
Key Results
- Human Performance Benchmark: Human experts achieve an accuracy of 76% on the challenging DMCompLong set.
- GPT-4o Performance: The best-performing LLM, GPT-4o, achieved an accuracy of 41.0% on DMCompLong using PoT, significantly below human levels.
- Claude-3.5-Sonnet: Outperformed other LLMs on DMCompLong with CoT, reaching 40.0% accuracy.
- Open-Source vs. Proprietary: While proprietary LLMs generally lead, some open-source models like DeepSeek-V2 are closing the gap, with DeepSeek-V2 even outperforming GPT-4o on DMCompLong.
- Error Analysis: Common failure modes for LLMs include inaccurate evidence retrieval, calculation errors, table misunderstandings, and exceeding context length.
Limitations and Future Work
The authors acknowledge that their answer extraction method is not flawless, potentially leading to an underestimation of LLM accuracy. They suggest future work could involve training LLMs on finance-specific data to improve performance. Additionally, developing more advanced information retrieval techniques for long documents and exploring better methods for encoding tabular data are identified as important research directions. The paper also highlights the need for continued advancements in LLMs' numerical reasoning and document understanding capabilities for real-world applications.
Summary updated