Evaluating LLMs’ Mathematical Reasoning in Financial Document Question Answering (2024)

Abstract: Large Language Models (LLMs), excel in natural language understanding, but their capability for complex mathematical reasoning with a hybrid of structured tables and unstructured text remain uncertain. This study explores LLMs’ mathematical reasoning on four financial tabular question-answering datasets: TATQA, FinQA, ConvFinQA, and Multihiertt. Through extensive experiments with various models and prompting techniques, we assess how LLMs adapt to complex tables and mathematical tasks. We focus on sensitivity to table complexity and performance variations with an increasing number of arithmetic reasoning steps. The results provide insights into LLMs’ capabilities and limitations in handling complex mathematical scenarios for semistructured tables. Ultimately, we introduce a novel prompting technique EEDP tailored to semi-structured documents, matching or outperforming baselines performance while providing a nuanced understanding of LLMs abilities.

heading: 1 Introduction
text: In the constantly evolving realm of artificial intelligence, Large Language Models (LLMs) have risen as cutting-edge tools for natural language understanding. They excel in a wide array of NLP tasks, including machine translation (MT), text summarization, question answering, and code generation. One specific area where LLMs’ mathematical reasoning abilities come under scrutiny is the domain of numerical reasoning tasks. Past research has delved into the potential of language models for mathematical reasoning tasks, as seen in studies such as in Amini et al. (2019); Upadhyay and Chang (2017); Patel et al. (2021); Cobbe et al. (2021). These investigations provide a means to evaluate the performance of language models when
∗Work done during internship at Microsoft Research † Primary Mentor and Corresponding Author
it comes to solving mathematical problems, ranging from straightforward math word problems to more complex ones.
However, the problem becomes significantly more challenging when we encounter a hybrid of structured such as semi-structured tables and unstructured text, as shown in example in figure 1. Such tables are common in documents such as invoices, health records, and financial reports in corporate settings. In the financial domain, these tables present numerical data in a structured format, including income statements, balance sheets, cash flow statements, shareholder equity data, and annual reports. The majority of NLP models are primarily trained to handle raw unstructured textual data, which limits their ability to reason over semi-structured data, such as tables, or more intricate hybrids of tables and text, as seen in Chen et al. (2020b); Aly et al. (2021); Chen et al. (2020a, 2021a). Tables, especially these with intricate relationships and dependencies, often necessitate multihop reasoning, connecting information across multiple steps, as shown in Gupta et al. (2020).
NLP models may encounter difficulties in performing such multi-step reasoning, particularly when dealing with complex mathematical opera-
3853
tions involving tables, as highlighted in Li et al. (2022). Previous research such as Chen (2023), exemplified these issues and demonstrated LLM capacity to process and reason with semi-structured tables. However, these studies are somewhat constrained and don’t explicitly explore the models’ mathematical reasoning abilities. This is particularly evident in data/tasks that involve a substantial number of arithmetic reasoning steps, operate on extreme orders of magnitude, or deal with intricate tables where extracting the relevant information for a query becomes challenging.
Moreover, when handling domain-specific documents, such as those in finance, a language model must not only have the necessary domain knowledge to craft the right approach for task-solving but also the capability to manipulate structured data, such as tables. Therefore, in this study, we aim to fill this gap by providing both qualitative and quantitative analyses of LLM’s ability to reason on mathematical content on four finance datasets i.e. FinQA (Chen et al., 2021b), TATQA (Zhu et al., 2021), ConvFinQA (Chen et al., 2022b), and Multihiertt (Zhao et al., 2022). These datasets feature questions demanding intricate numerical reasoning, combining semi-structured tables and text. Each dataset provides pre-annotated executable programs for precise answer retrieval. Our goal is to illustrate how model performance varies as the numerical complexity of the underlying data and the intricacy of the mathematical reasoning steps required to solve a query increase. Building upon these observations, we propose a novel approach termed (Elicit −→ Extract −→ Decompose −→ Predict) EEDP, designed to deconstruct model responses into discrete components. This innovative method offers a deeper, more transparent insight into the numerical limitations of the model when tackling these tasks. Our contributions are as follows:
1. We conduct a comprehensive robust evaluation of state-of-the-art Large Language Models (LLMs) for tabular (hybrid) question answering, with a specific focus on mathematical reasoning tasks, using public financial tabular datasets to establish a thorough performance benchmark.
2. Our analysis is thorough and multifaceted, encompassing both qualitative and quantitative aspects across several dimensions. We aim to provide nuanced insights into the strengths and limitations of LLMs in tabular (hybrid) question answering,
especially in scenarios involving mathematical reasoning.
3. Building upon qualitative analysis, we introduce a novel and improved prompting method called EEDP. Our novel approach not only enhances our understanding of model weaknesses but also substantially enhances model performance compared to existing prompting methods across multiple models types.
Our metadata dataset and source code are available at https://vgupta123.github.io/eedp.

heading: 2 Metadata Annotations
text: We annotated four tabular datasets: FinQA, TATQA, ConvFinQA, and Multihiertt with meta information related to a.) reasoning steps, b.) question category, c.) table length, d.) hierarchical complexity e.) missing information. 1 Below, we provide detailed information about these meta-data annotations:
1. Number of Reasoning Steps: Including the count of arithmetic operations in questions is crucial. More operations reflect increased complexity in reasoning, and their interdependence offers insights into the models’ proficiency. This annotation, applied across all four datasets, reveals their ability in handling intricate arithmetic tasks. Refer to Figure 8 in Appendix A.4 for distribution of questions based on the number of reasoning steps involved.
2. Question Categorization: In numerical reasoning, grasping the evolution from fundamental arithmetic to advanced operations is crucial, marking a shift in cognitive complexity. As questions advance, they typically involve more intricate combinations of operations and linguistic nuances. Our research identify both the capabilities and limitations of LLMs in understanding these concepts.
We establish 12 mathematical concept categories (Table 1) with corresponding definitions, annotating each question. The dataset coverage across these categories is shown in Figure 9 in Appendix A.4. Notably, categories like DIVISION and RATIO share similarities but differ in focus: DIVISION involves the division operator, while RATIO encompasses ratios, fractions, and inverse problems. CHANGE IN RATIO questions add complexity with quantity changes requiring subtraction. Additionally, we omit NEED-IN-DOMAIN-INFO due
1One author annotated the data, and the other checked for accuracy; we took stringent measures to minimize errors.
to domain-specific knowledge focus and TIME questions due to limited sample size.
3. Table Length: Evaluating performance with larger supporting tables is crucial. Larger tables complicate multi-hop reasoning tasks by increasing the amount of information, making it harder to identify relevant evidence. We prioritize these annotations for datasets like FinQA and Multihiertt, where questions mainly use tables as supporting evidence. Therefore, these annotations are confined to these datasets. In Multihiertt, when multiple tables support evidence, we consider the one with the highest row count i.e. maximum table length. The dataset distribution for Multihiertt and FinQA w.r.t table length (number of rows) is shown in Figure 6 in Appendix A.4.
4. Hierarchical Complexity: In hierarchical tables, such as those in Multihiertt, evaluating model performance concerning the growing hierarchical complexity in cells with critical information becomes paramount. To tackle this, we annotate each example in Multihiertt with the hierarchy depth of cells containing relevant information. For table
with multiple relevant cells, we consider the cell with the highest hierarchical depth for our analysis. Our approach to estimating hierarchy depth is illustrated in Figure 10. Figure 7(a) in Appendix A.4 illustrate how we calculate hierarchical complexity for examples with multiple relevant rows at various hierarchical depths.
5. Missing Information: Interpreting a table becomes challenging as the number of empty cells increases. Empty cells indicate missing or undefined information, leading to potential gaps in understanding.
Assessing empty cell proportions is crucial to quantify data ambiguity. More empty cells suggest higher uncertainty, which can hinder models’ ability to derive meaningful insights and impact reasoning accuracy. In Multihiertt, where tables are hierarchical in nature and empty cells occur quite frequently, we annotate examples with the empty cells percentage, contributing to our understanding of data ambiguity. For distribution of missing information (empty cells proportions) across datasets, refer to Figure 7 (b) in Appendix A.4.
Annotation Splits. We prioritized complex numerical questions in our selection criteria, balancing this with resource constraints such as the LLM context length limits. We also took into account tables with deeper hierarchies in Multihiertt and multi-turn conversations in ConvFinQA. For TATQA, we utilized 45% of the development set by filtering out examples involving simple span selection. In the case of Multihiertt, we included 68% of the test set by excluding examples where the table length exceeds 40. For FinQA and ConvFinQA, we employed the complete test and development sets, respectively.

heading: 3 Experimental Results
text: In this study, we choose to experiment with LLMs such as GPT-3.5-Turbo, GPT-4, PaLM-540B, Mistral-7B-Instruct2, Llama-2-13B3 and MAmmoTH-13B4. These LLMs are at the cutting edge for both open-source and closed models applications. Models like MAmmoTH-13B are specifically fine-tuned during pre-training to excel in mathematical reasoning tasks. For more detail about the the model choices refer to Appendix A.2.
2https://huggingface.co/mistralai/Mistral-7B-Instructv0.1
3https://huggingface.co/meta-llama/Llama-2-13b-chat-hf 4https://huggingface.co/TIGER-Lab/MAmmoTH-13B
LLMs Prompting Methods: For an instructiontuned LLM, it’s assumed that we give the model a task-specific instruction I accompanied with a few (usually k ∈ {2, 4}) demonstrations DT of a task T. We experiment with the following prompting techniques:
(a.) Direct: In this setup, we explicitly instruct the models to abstain from providing explanations and just return the final answer to the posed question. For this scenario, DT contains {(pi, qi, ai)}ki=1 where p is the premise (table-text), q is the question, and a is the ground-truth answer.
(b.) CoT: Moving forward, we experiment with the chain-of-thoughts prompting strategy where we instruct the model to output the explanation to the answer derived by it. Here, our DT contains {(pi, qi, ei)}ki=1 where p is the premise which includes the table and the associated text, q is the question and e is the explanation of the answer.
(c.) PoT: In this case, the expected response is a code derivation of the answer. Here, DT contains {(pi, qi, ci)}ki=1 where p is the premise which includes the table and the associated text, q is the question and c is the code-derivation of the answer.
(d.) Decomposers: (Ye et al., 2023) proposed to address the challenge of handling large tables by decomposing them into more manageable subtables. Similarly, complex questions are handled by breaking them down into simpler subquestions. Decomposition proves effective with SQL tables, facilitating the removal of distracting details while retaining all supporting evidence. Questions are first parsed to break them down into simpler, more manageable subquestions. The model then addresses each subquestion independently before composing the answers to arrive at the final solution. In this case, our demonstration set DT contains {(p′i, ⟨q1, q2, ..., qn⟩, ai)}ki=1 where p ′ is the premise obtained by the irrelevant information removal to the question from the original premise p and ⟨q1, q2, ..., qn⟩ are the subquestions whose answers lead to the final answer.
EEDP Prompting Strategy: We propose a novel prompting strategy: Elicit −→ Extract −→ Decompose −→ Predict. Figure 4 show an illustration of our EEDP approach. Below are the detail of each EEDP step:
1. Elicit: We prompt the model explicitly to first elicit relevant domain knowledge for answer-
ing a given query.
2. Extract: Conditioned on the table, question and the elicited domain knowledge, the model extracts supporting evidences to answer a given question.
3. Decompose: We instruct the LLM to break a complex mathematical reasoning task into multiple atomic operations and compose the operations to arrive at the final answer.
4. Predict: The model finally returns the derived answer in the above steps.
Figure 11 shows a example for EEDP strategy with one shot.
Results and Analysis. Table 2 shows a comparison in performance between different prompting strategies. Despite being a single prompt, EEDP demonstrates comparable or superior performance compared to PoT. Notably, we outperform PoT significantly for PaLM-2-540B and LLAMA-2-13B across most datasets. Moreover, while PoT relies on external tools for executing mathematical programs/code to obtain answers, EEDP exclusively utilizes LLM for all tasks, including evidence extraction, operation identification, and execution, ensuring precision throughout the process.
As shown in Table 2, the Decomposers prompting strategy exhibits a much poorer performance compared to other strategies. The reason behind this was statistically found to be the inaccurate formation of subtables from the main table, leading to information loss as described in the previous paragraph. The performance of EEDP either surpasses or matches very closely with that of PoT. The number of shots was adjusted depending on the context length of the model.
We can see that MAmmoTH-13B model, which is fine-tuned on the MathInstruct dataset (Yue et al., 2024) containing Instruction-Response pairs where the responses are a hybrid of CoT and PoT rationales, fails to perform well with the EEDP methodology. We argue that this is due to two potential reasons: (a.) Reduction of the number of shots to adjust the context length as the EEDP response is longer than that of the other methods, and (b.) Finetuning may contribute to suboptimal performance due to its alignment with a particular style and format of responses, potentially limiting the model’s adaptability and generalization to other diverse contexts.
EEDP’s Computational Efficiency EEDP functions as a unified single-prompt method, minimizing computational complexity. Unlike methods like PoT, which rely on external tools, EEDP operates independently. When assessing computational cost, we consider API calls and token generation. Since EEDP uses a single-step prompting approach, only one API call is needed per query, making its computational cost comparable to methods like CoT. For inference with open-source models, we used hardware with an A40 40GB GPU. Processing one dataset per model using the vLLM library took approximately 10 hours.

heading: 4 Where do LLMs fail?
text: Through manual inspection, we rigorously evaluate the EEDP responses against the meta-annotations from section 2 as ground-truth benchmarks for extraction and model reasoning accuracy. The reasoning programs represent sequences of arithmetic operations necessary to derive the final answer, utilizing values extracted from supporting evidence as operands. To assess calculation accuracy, we manually identify the model’s instantiation and precision errors. Our EEDP prompt ensures that the model predominantly outputs responses in the expected format, with exceptions being rare. However, since we manually analyze all outputs, we do not penalize the model for format deviations but rather for
incorrect outputs. Penalties are applied only when the model makes errors in extraction, reasoning, and/or calculation. Below, we categorize the EEDP response errors in detail based on their origins:
1. Incorrect Extraction: This category encompasses errors where the model faces difficulties
in accurately identifying and extracting the pertinent information necessary for effective problemsolving. These errors point to challenges in retrieving precise information. These errors can further be subdivided into two categories
• Missing/Incomplete Evidences (E1): The model fails to extract all the necessary evidences which serve as ingredients to derive the final answer.
• Wrong Evidences (E2): The model extracts wrong values for variables as supporting evidences from the premise.
2. Incorrect Reasoning: Errors in reasoning occur when the model struggles to formulate an appropriate and contextually relevant approach to tackle a given problem. Possible reasons include a lack of domain knowledge or an inaccurate interpretation of the posed question. Consequently, this error type can arise from two sources.
• Deficit in Domain Knowledge (R1): These errors occur when the model attempts to derive an answer to the posed question using a wrong formula for domain-specific measures, for eg. COGS, ROI etc.
• Question Misinterpretation (R2): These errors occur when the model interprets the question differently and provides responses that are not aligned with the intended query. Overall, the model’s outputs lack grounding in the original question posed to it.
3. Incorrect Calculation: This variety of errors include those where the model commits mistakes due to calculation mistakes. This can be of two types as described below.
• Incorrect Instantiation (C1): These include cases if the model extracts the right evidences, uses the right derivation formula but instantiates the variables incorrectly with the values resulting in an incorrect answer.
• Precision Error (C2): Language models employ mathematical algorithms for arithmetic operations, but their results may not always be perfectly accurate due to insufficient data pattern coverage or introduced biases during training. Consequently, they can sometimes generate outputs with slight inaccuracies or deviations from correct results. We show a detailed analysis in A.1.
Analysis: The above categorization provides a nuanced understanding of the diverse challenges and shortcomings exhibited in different facets of mathematical reasoning. We observe that in a lot of cases, the error propagates because of a deficiency in domain knowledge. It is critical for both evidence extraction and reasoning. Despite possessing general domain knowledge owing to the massive amount of data these models have been pre-trained upon, these models may require explicit prompts to elicit the specific domain knowledge needed for a particular question. Furthermore, errors can arise due to the models’ limited proficiency in multi-step reasoning, especially in tackling questions involving multiple arithmetic operations in a sequence.
We give a quantitative measure of each type of errors for each of the 4 datasets we consider for our study in Table 3. We also provide examples corresponding to each error category in figures 12, 13, 14, 15, 16 and 17. Statistically, we find that reasoning errors contribute a significant chunk to the total number of errors. In case of complex hierarchical tables like that in Multihiertt, the model is found to struggle with extracting the right supporting evidences from the premise for a given question. Calculation errors can be taken care of if a thirdparty calculation tool (an external agent) is chained to the language model.

heading: 5 Analysis on Reasoning Annotations
text: We analyse model performance on the basis of finegrained annotations as described in the section 4.

heading: 1. Performance vs Number of Reasoning Steps.
text: We investigate model performance with increasing mathematical reasoning steps, as shown in Figure 2. This analysis provides insights into models’ ability to handle varying task complexities. As expected, performance decreases with more reasoning steps, indicating LLMs’ challenges in retrieving information and reasoning as complexity grows.
Anomalies are observed in ConvFinQA, where accuracy improves after greater than or equal to two reasoning steps, potentially due to questions referring to answers of prior conversation turns. Anomalies like these warrant further investigation beyond this study’s scope.
2. Performance across Question Types. We analyze the performance trends across different question categories, as defined in Table 1, to assess the models’ understanding of various mathematical
and financial concepts. Figure 3 shows that EEDP consistently performs better than or as well as PoT across all datasets. The improvement is particularly pronounced for PaLM-2-540B in all question categories.

heading: 3. Performance across Arithmetic Operations.
text: Figure 5 in Appendix A.1 shows that for relatively simpler arithmetic operations like addition and subtraction, the effect of order of magnitude of the operands is less profound as compared to harder arithmetic operations such as multiplication and division. We observe the trend in the performance accuracy with the growing and diminishing orders of magnitude. We also observe bigger and more capable models such as GPT-4, GPT-3.5-TURBO and PaLM 2-540B perform much better on simpler addition, subtraction task in comparison to multiplication, division task. For more details on refer to the Appendix A.1.

heading: 6 Other Related Works

heading: 6.1 LLMs on Mathematical Reasoning
text: Pre-trained Language Models (PLMs) excel in NLP tasks (Devlin et al., 2019; Zhuang et al., 2021)
by leveraging extensive textual corpora to acquire world knowledge (Guu et al., 2020). Expanding PLMs for math-related tasks has been challenging due to their non-specific training. Recent attempts include MWP-BERT and Minerva (Liang et al., 2022; Lewkowycz et al., 2022), but curating high-quality math data remains difficult. To bridge the gap, researchers fine-tune PLMs for specific math tasks. Notable works, like Bhaskara, Selfsampler, Aristo, FinQANet, TAGOP, MT2Net, and others (Mishra et al., 2022; Ni et al., 2022; Clark et al., 2021; Chen et al., 2021b; Zhu et al., 2021; Zhao et al., 2022; Cao and Xiao, 2022; Welleck et al., 2022), employ PLMs such as GPT-Neo and RoBERTa for math problem-solving.

heading: 6.2 Tabular Question Answering
text: Handling diverse input formats in question answering, including structured tables and visual data, poses challenges for language models. HybridQA (Chen et al., 2020b) introduces questions requiring reasoning over tables and text. MultimodalQA (Talmor et al., 2021) adds visual inference. Our focus is on multi-hop question answering over tables and text. TAPAS (Herzig et al., 2020) tackles table-
TATQA FinQA
based questions without logical forms, while Tapex (Liu et al., 2022) empowers generative models with table reasoning.
Models like FinQANet, TagOP, and MT2Net (Chen et al., 2021b; Zhu et al., 2021; Zhao et al., 2022) employ a retriever module to extract supporting facts from input financial reports, followed by a reasoning module to derive the final answer. Retrieving relevant evidence and conducting reasoning both demand domain-specific knowledge, such as understanding financial transactions, identifying revenue trends, and interpreting complex investment statements. Thus, reliance on an external knowledge base becomes crucial for addressing the challenges of domain-specific multi-hop question answering.

heading: 6.3 Prompt Engineering
text: In-context Learning (ICL) equips Language Models (LLMs) with task examples and queries, enabling them to perform target tasks without updating model parameters (Brown et al., 2020; OpenAI,
2023). They excel in mathematical reasoning with few-shot prompts but struggle with more complex tasks. Methods like chain-of-thoughts (CoT) (Wei et al., 2022) have improved LLM performance by guiding them through intermediate reasoning steps. Enhancing multi-step reasoning involves two main approaches: improving in-context examples and obtaining better reasoning steps. Some focus on stable in-context example selection (Fu et al., 2023; Rubin et al., 2022; Lu et al., 2023). Others adopt a modular approach, using off-the-shelf tools (Schick et al., 2023), program of thoughts (PoT) (Chen et al., 2022a), or decomposition strategies (Zhou et al., 2023; Dua et al., 2022; Khot et al., 2023).
Our task requires complex multi-step reasoning across diverse information sources. LLMs, as demonstrated by (Chen, 2023), can reason over structured tables without explicit encoding. They also serve as versatile decomposers, breaking down extensive evidence and complex questions (Ye et al., 2023).

heading: 7 Key Takeaways
text: Our Contributions. Our study aimed to delve into the mathematical reasoning abilities of LLMs within the context of financial documents where models are tasked with complex hybrid (table-text) question answering. This presents a significant challenge, requiring models not only to provide accurate numerical analysis but also to retrieve right supporting evidence tailored to specific question requirement. Moreover, it necessitates the extraction of necessary knowledge from the model’s pretrained parameters to address queries.
Firstly, we meticulously annotate popular financial datasets, such as FinQA, ConvFinQA, TATQA, and Multihiertt, with detailed meta-information. This includes specifying mathematical operations, types of reasoning involved, table dimensions, question types, and the depth of table hierarchy. Furthermore, we conduct a manual error analysis to quantify error types across multiple LLMs. These detailed annotations are invaluable for analyzing various dimensions where LLM models encounter challenges. This, in turn, aids in the development of better prompting techniques such as EEDP, aimed at enhancing LLMs’ mathematical reasoning abilities. The resulting improvement in performance with EEDP across multiples datasets serves as compelling evidence of the effectiveness of this approach.
What did we learn? Our analysis revealed that LLMs can accurately handle addition and subtraction tasks e.g. modle perform fairly when calculating total expenses or profits, but struggle with multiplication and division e.g. model performs poorly with questions requiring reasoning operations involving proportions, ratios, percentages, and division. Moreover, as the complexity of the data increases either through a higher absolute order scale or more decimal numbers, model performance degrades. Model performance also degrades with increasing number of reasoning steps and lengthy complex hierarchical table structures. e.g. in complex datasets with hierarchical structures such as Multiheirtt, TATQA, incorrect extraction leads to modeling errors. Similarly, on queries involving multiple conversational turns, such as those in ConvFinQA, model perform poorly due to reasoning failures, like misinterpreting multiple queries longer context. Across all models, incorrect reasoning and incorrect extraction consistently
emerge as common sources of errors. For smaller models, even straightforward calculations, result in errors due to imprecise calculations.
EEDP vs other methods
(a.) EEDP vs PoT: PoT enhances LLM inference with the use of variable names for the supporting values extracted from the premise and prompts the LLM to express their thought process in the form of programs. The model output is a program which is executed externally to derive the final answer. EEDP proposes to decompose a complex reasoning task into simple atomic steps whose solutions can be composed to give the final answer. In PoT, they don’t make the language model do the computation while in our case the language model not only outputs the reason but also computes the final answer. This distinction implies that PoT may have an inherent advantage over EEDP.
(b.) EEDP vs Decomposers: The prompting strategy proposed by (Ye et al., 2023) was originally designed for querying SQL tables, they use LLMs to break down evidence and questions for SQL interpreters. In contrast, our approach addresses more complex scenarios involving both tables and text, requiring advanced reasoning skills beyond the capability of standard SQL interpreters. Pruning a non-SQL table using this method can lead to significant information loss from the premise which can be a potential ingredient required to derive the final answer. Additionally, this is an expensive method as it requires 3X API calls as opposed to other prompting methods. Moreover, EEDP is a unified prompting strategy which integrates multiple solver elements into a single unified prompt for elicitation, extraction, decomposition and prediction.

heading: 8 Conclusion
text: In conclusion, our study delved into LLMs’ mathematical reasoning in complex financial scenarios, assessing their adaptability to mixed structured tables and unstructured text. Through rigorous experimentation, we uncovered insights into their performance and limitations, presenting a tailored prompting technique that outperformed other baseline methods. Our findings advance understanding of LLMs’ abilities in tackling intricate mathematical tasks within semi-structured documents, suggesting directions for future research. Please refer to appendix section A.3 for future work details.
Limitations
The scope of this work is limited by the following challenges:
Dataset Scarcity. There are not many datasets dealing with numerical reasoning over semistructured data apart from the ones from financial domain. As a future work, it would be interesting to similar analysis across various domains such as e-commerce, healthcare, sports and scientific tables from research papers, uncovering new challenges and insights. This expansion will enhance the applicability and impact of our research within the NLP community. However, creating tailored datasets for these domains presents a significant challenge.
For now to ensure a comprehensive evaluation of LLMs, we have integrated financial datasets that offer diverse challenges. For instance, Multihiertt evaluates model performance with intricate premise structures, providing insights into handling complex data hierarchies. ConvFinQA delves into the intricate chains of numerical reasoning within conversational question answering contexts, offering a unique perspective on dynamic data interpretation. Moreover, FinQA and TAT-QA encompass a wide array of reasoning types, with a significant portion requiring domain-specific knowledge, thereby broadening the evaluation spectrum.
Factors Isolation. It is essential to acknowledge that there may be multiple factors influencing the performance of large language models while dealing with numerical reasoning over semi-structured data. In our analysis, we have focused on specific factors and trends, but it is important to recognize that the overall performance is affected by a multitude of variables. Marginalizing i.e. observing the trend along one while keeping the rest as constants or isolating a single factor is challenging and cannot be done with real-world data. Additionally, future investigations may benefit from simulating controlled scenarios on synthetic and counterfactual datasets to gain deeper insights into the impact of individual factors on model performance.
Modeling Improvement. We emphasize our analysis on prominent models such as GPT-4, GPT-3.5-TURBO, and PaLM 2-540B due to their substantial size and capabilities. Notably, other open-sourced large language models like LLaMA 2-13B, MAmmoTH-13B and Mistral-7B-Instruct did not exhibit satisfactory performance in numeri-
cal reasoning over semi-structured data. For more detail about the the model choices refer to Appendix A.2. This accentuates the need for exploring computationally feasible and cheaper models that can deliver remarkable performance in tasks involving numerical reasoning over heterogeneous sources of information. Future experiments with ample computational resources may involve exploring larger open-source models like OLMo, Mixtral, and DBRX, which have been recently released.
Ethics Statement
We, the authors of this work, affirm that our work complies with the highest ethical standards in research and publication. In conducting this research, we have considered and addressed various ethical considerations to ensure the responsible and fair use of computational linguistics methodologies. We provide detailed information to facilitate the reproducibility of our results. This includes sharing code, datasets (in our case, we deal with publicly available datasets and comply to the ethical standards mentioned by the authors of the respective works.), and other relevant resources to enable the research community to validate and build upon our work. The claims in the paper match the experimentation results, however, with black-box large language models, a certain degree of stochasticity is expected which we attempt to minimize by keeping a fixed temperature. We describe in the fullest details the annotations, dataset splits, models used and prompting methods tried, ensuring reproducibility of our work.

heading: Acknowledgements
text: Research was sponsored by the Army Research Office and was accomplished under Grant Number W911NF-20-1-0080. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the Army Research Office or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Government purposes notwithstanding any copyright notation herein. This work was partially funded by ONR Contract N00014-19-1-2620. Lastly, we extend our appreciation to the reviewing team for their insightful comments.

heading: A Appendix
text: A.1 How proficient are LLMs in performing simple arithmetic operations?
To assess the effectiveness of Large Language Models in handling fundamental arithmetic tasks (addition (+), subtraction (-), multiplication (*), and
division (/)) across operands of varying magnitudes, we generate a set of 2600 synthetic arithmetic expressions using GPT-4. This set includes 650 problems for each arithmetic operation. Within each operation category, we categorize tasks into groups based on a parameter denoted as τ :
τ = OOM( argmax op
∥OOM(op)∥ )
where, argmax selects the operand op with the greater absolute value of the order of magnitude, and OOM represents the order of magnitude.
This approach is motivated by cognitive challenges commonly faced by humans, as they often encounter difficulties with both high and low orders of magnitude. Essentially, captures the order of magnitude of the operand with the larger absolute value among the two. For each arithmetic operation, we establish groups with τ , ranging from -6 to 6. Within each group, there are 50 arithmetic expressions. This systematic grouping provides a comprehensive assessment across various difficulty levels based on operand magnitudes.
Analysis. Figure 5 illustrates that for simpler arithmetic operations like addition and subtraction, the impact of the order of magnitude of the operands is less significant compared to harder operations like multiplication and division. We observe a trend in performance accuracy with increasing and decreasing orders of magnitude. Larger models such as GPT-4, GPT-3.5-TURBO, and PaLM 2-540B perform significantly better on addition and subtraction tasks as compared to the multiplication and division tasks.
A.2 Model Selection Criteria Our model selection process was guided primarily by resource constraints and the timeframe of our research endeavor. We aimed to identify models that represented the state-of-the-art (SOTA), such as GPT-4, or those with a specific focus on mathematical reasoning, such as MAmmoTH, aligning with the parameters of our project. Here’s a breakdown:
1. Resource and Budget Constraints: Given our limited computing resources and budget, we meticulously selected models that could provide valuable insights within the confines of our project. Incorporating additional models would have been impractical given our resource limitations.
The number of shots, indicated by shots = k, was tailored to the context length of the model.
Specifically, for models with a context length exceeding the input length, we standardized k to 4. For instance, we allocated 2 shots for models like LLaMA and MammoTH due to their constrained context length. However, for other models capable of accommodating larger contexts, we increased the number of shots to 4. Additionally, we used a temperature of 0 and topp = 1 for our experiments.
2. Models with Mathematical Capabilities: We prioritized models renowned for their advanced mathematical prowess, such as MAmmoTH, alongside state-of-the-art Large Language Models (LLMs) like GPT-4. Our goal was to gain deeper insights into the mathematical reasoning capabilities of cuttingedge models within the context of financial documents.
3. Better Prompting Approaches: Rather than focusing solely on model diversity, we concentrated on exploring a variety of prompting methods, particularly those aimed at enhancing mathematical reasoning. We believed this approach would yield more valuable insights into the performance of both LLMs and their associated prompting techniques in real-world financial tasks.
4. Excluding Underperforming Models: While we experimented with various models, such as Falcon-7B-Instruct and MPT-7BInstruct, we found them to underperform significantly compared to models like LLaMA and Mistral. Consequently, we excluded them
from detailed analysis. Future experiments with ample computational resources may involve exploring additional open-source models like OLMo, Mixtral, and DBRX, which have been recently released.
A.3 Other Modeling Techniques Based on our research and the results obtained from our proposed method ’EEDP’, we do have several insights that could guide future model development:
1. Domain-Specific Pre-training: Our method "EEDP" suggests that LLMs could benefit from pre-training that focuses on extracting domain-specific knowledge. In the context of financial documents, for instance, this could involve training models on a corpus of financial texts, thereby enabling them to better understand and reason about financial concepts and terminology.
2. Knowledge Elicitation: The elicitation step in "EEDP" indicates the potential for designing LLMs that can elicit or extract relevant information from a given context more effectively. This could involve developing models that are better at identifying and focusing on key pieces of information in a document, which is crucial for accurately answering questions about the document.
3. Modular Modeling: Our research introduce a novel approach to the reasoning process, wherein it’s broken down into modular steps. In this methodology, Large Language Models
(LLMs) handle different aspects of a task in distinct stages. This division potentially enhances the overall accuracy and efficiency of the model.
For instance, the model might begin by eliciting domain-specific knowledge, then proceed to extract relevant information from the premise. Following this, it engages in reasoning about this information to answer a question and finally derives the answer, using the output from the preceding reasoning steps as a reference point.
By potentially training individual expert models to handle each specific stage, we could optimize performance for each distinct task. This modular approach allows for specialized processing of each step, thereby improving the overall performance and interpretability of the final output.
4. Hierarchical Structure Understanding: Representing the input structure of the table in a better format to the LLM could be beneficial. One can also explore introducing special positional encodings, similar to those used in TAPAS, to serve as row and column IDs for each cell. This approach would differ from traditional positional encodings, which are designed to capture the inherently linear structure of textual data. TThis integration would facilitate the extraction of relvant information from the table correctly, considering its structure more effectively, avoiding information extraction errors. Another idea could be converting the premise containing the complex table and text into a common representation such as a knowledge graph. Furthermore, models specifically tuned to answer to human queries over complex documents in multiple conversational turns (like that in ConvFinQA) should also be considered, as it’s a challenge for language model’s to backtrack to their decisions that were made previously in the conversation.
A.4 Metadata Annotations Dataset Coverage
Figure 6 displays the dataset distribution for Multihiertt and FinQA based on table length (number of rows). Figure 7 (a) shows how we calculate hierarchical complexity for examples with multiple relevant rows at various hierarchical depths. For the distribution of missing information (empty cell
proportions) across datasets, refer to Figure 7 (b). Figure 8 for the distribution of questions by reasoning steps. We define 12 mathematical concept categories, see Table 1) and annotate each question accordingly. The dataset coverage for these categories is shown in Figure 9. Our method for estimating hierarchy depth is shown in Figure 10. Figure 11 shows a example for EEDP strategy with one shot. Figure 11 shows a example for EEDP strategy with one shot.

heading: Future Work
text: Our findings advance understanding of LLMs’ abilities in tackling intricate mathematical tasks within semi-structured documents, suggesting directions for future research. Please refer to appendix section A. 3 for future work details. Limitations
The scope of this work is limited by the following challenges:
Dataset Scarcity. There are not many datasets dealing with numerical reasoning over semistructured data apart from the ones from financial domain. As a future work, it would be interesting to similar analysis across various domains such as e-commerce, healthcare, sports and scientific tables from research papers, uncovering new challenges and insights. This expansion will enhance the applicability and impact of our research within the NLP community. However, creating tailored datasets for these domains presents a significant challenge. For now to ensure a comprehensive evaluation of LLMs, we have integrated financial datasets that offer diverse challenges. For instance, Multihiertt evaluates model performance with intricate premise structures, providing insights into handling complex data hierarchies. ConvFinQA delves into the intricate chains of numerical reasoning within conversational question answering contexts, offering a unique perspective on dynamic data interpretation. Moreover, FinQA and TAT-QA encompass a wide array of reasoning types, with a significant portion requiring domain-specific knowledge, thereby broadening the evaluation spectrum. Factors Isolation. It is essential to acknowledge that there may be multiple factors influencing the performance of large language models while dealing with numerical reasoning over semi-structured data. In our analysis, we have focused on specific factors and trends, but it is important to recognize that the overall performance is affected by a multitude of variables. Marginalizing i. e. observing the trend along one while keeping the rest as constants or isolating a single factor is challenging and cannot be done with real-world data. Additionally, future investigations may benefit from simulating controlled scenarios on synthetic and counterfactual datasets to gain deeper insights into the impact of individual factors on model performance. Modeling Improvement. We emphasize our analysis on prominent models such as GPT-4, GPT-3. 5-TURBO, and PaLM 2-540B due to their substantial size and capabilities. Notably, other open-sourced large language models like LLaMA 2-13B, MAmmoTH-13B and Mistral-7B-Instruct did not exhibit satisfactory performance in numeri-
cal reasoning over semi-structured data. For more detail about the the model choices refer to Appendix A. 2. This accentuates the need for exploring computationally feasible and cheaper models that can deliver remarkable performance in tasks involving numerical reasoning over heterogeneous sources of information. Future experiments with ample computational resources may involve exploring larger open-source models like OLMo, Mixtral, and DBRX, which have been recently released