LLM4Causal: Democratized Causal Tools for Everyone via Large Language Model
Authors: Haitao Jiang
Lin Ge
Yuhe Gao
Jianian Wang
Rui Song
Venue: COLM (2024)
Keywords: Causal Decision-Making, LLM with Tools, Output Interpretation, Domain-specific Dataset
TL;DR: Regarding an causal-related question, we developed an end-to-end LLM framework to extract information from data, run the specialized tool to solve the causal task, and provide an interpretation based on the function output.

Abstract: Large Language Models (LLMs) have shown their success in language understanding and reasoning on general topics. However, their capability to perform inference based on user-specified structured data and knowl- edge in corpus-rare concepts, such as causal decision-making is still limited. In this work, we explore the possibility of fine-tuning an open-sourced LLM into LLM4Causal, which can identify the causal task, execute a cor- responding function, and interpret its numerical results based on users’ queries and the provided dataset. Meanwhile, we propose a data gen- eration process for more controllable GPT prompting and present two instruction-tuning datasets: (1) Causal-Retrieval-Bench for causal problem identification and input parameter extraction for causal function calling and (2) Causal-Interpret-Bench for in-context causal interpretation. By conducting end-to-end evaluations and two ablation studies, we showed that LLM4Causal can deliver end-to-end solutions for causal problems and provide easy-to-understand answers, which significantly outperforms the baselines.

Published as a conference paper at COLM 2024
LLM4Causal: Democratized Causal Tools for Everyone via Large Language Model
Haitao Jiang, Lin Ge, Yuhe Gao, Jianian Wang' & Rui Song*
Department of Statistics
North Carolina State University
Raleigh, NC 27607, USA (hjiang24, 1ge, ygao3,, r rsong)encsu. edu
Abstract
Large Language Models (LLMs) have shown their success in language understanding and reasoning on general topics. However, their capability to perform inference based on user-specified structured data and knowl- edge in corpus-rare concepts, such as causal decision-making is still limited. In this work, we explore the possibility of fine-tuning an open-sourced LLM into LLM4Causal, which can identify the causal task, execute a cor- responding function, and interpret its numerical results based on users' queries and the provided dataset. Meanwhile, we propose a data gen- eration process for more controllable GPT prompting and present two instruction-tuning datasets: (1) Causal-Retrieval Berl--eeeeriealeeeech for causal problem identification and input parameter extraction for causal function calling and (2) hausal-nteepree-Bennd conducting end-to-end evaluations and two ablation studies, we showed that LLM4Causal can deliver end-to-end solutions for causal problems and provide sasy-to-understand answers, which significantly outperforms the baselines.
for in-context causal interpretation. By
1 Introduction
Recently, Transformer-based LLMs containing billions of parameters are gaining popularity and are widely applied in fields such as education, legal services, and medicine (Kasneci et al., 2023; Chen et al., 2021). LLMs such GPT-3 (Brown et al., 2020), GPT-4, and LLaMA (Touvron et al., 2023a) have shown impressive performance processing tasks such question-answering, common-sense reasoning, and translation (Zhao et al., 2023). These superior performances of LLMs have also motivated explorations LLMs' applications
multiple natural language
the causal decision (Song et al., 2023) procedures, which include various crucial tasks in real-life such as causal structure learning (CSL) tasks (Spirtes et al., 2000; Glymour et al., 2019), causal effect learning (CEL) tasks (Yao et al., 2021; Hicks & Tingley, 2011) and causal policy learning (CPL) tasks (Chakraborty & Murphy, 2014; Sutton & Barto, 2018; Zeng et al., 2023).
Many recent works that applied LLM in causal decision-making tasks are focused on CSL, where LLM's internal knowledge gained during its training process is exploited in learning the causal relations among variables. For instance, both Kıcıman et al. (2023) and Long et al. (2023) propose to obtain the causal relationships between variables by directly querying GPT models using the variable names, assuming that LLMs can extract internal causal knowledge of those variables from the large corpus it was trained on. In a further development by Ban et al. (2023), LLM's internal causal knowledge is utilized to guide the optimization process of score-based methods as soft or hard constraints, enhancing the performance compared to using the traditional CSL methods alone. However, this line of work heavily relies the quality of the knowledge in LLM's training corpus and lacks step-by-step reasoning or
"equal contribution
*This work not related to the author's position Amazon.
1

---

Published as a conference paper at COLM 2024
interpretation. A natural choice to overcome these limitations is to ask the LLM to complete the causal tasks utilizing existing causal decision-making tools (such as CausalML(Cher) et al., 2020), CausalDM (Song et al., 2023), causal-learn (Zheng et al., 2023)) and input data uploaded by users. In literature, Code Interpreter (OpenAL, 2023a), TooILLM (Qin et al., 2023b), and GPT4Tools(Yang et al., 2023) have leveraged the function calling feature of LLM in general data analysis tasks for user input datasets, However, directly applying those methods to causal-related tasks and datasets may lead to several issues: first, since these models are not tailored for causal tasks, they frequently hallucinate and mislead the user with irrelevant contexts, such as providing correlation analysis results when causal effect analysis is expected, as shown in Figure la; second, most of these methods fail to provide end-to-end result delivery (see Figure 1b) and easy-to-underste causal-related tasks; third, these methods lack information about newly released approaches that are not included in LLM's training corpus (see Figure 1c).
interpretation for
Con you hels Licida
(Whar's the caural antornhip betwern ana
Tapologiza da for the Incorvertanca, but appiar ao the liraary Lin2AMM "Inngee" Unftrrt Unitort.notely without this Bhrany won't arle nu LIKGAA
computing Pearson
in
W
correlaaiion ens among the variables Y, and 2. Would you'lkk procced any of thes advanced cousal anything
(b) User queries on classical method, LiNGAM(Shimiuu, 2014).
(a) User queries on causal relationships.
Do know cutting method for diacoven ANDCE?
iddett have intormation methos calledt ANOCL cboovety sa lust tea
September
tite that 8''s radi thonkopust allan upcalaree rrighinnt be wicnty reooge dicumented inmojer put loations repostor
(c) User queries on a newly-developed method, ANOCE (Cai et al., 2020).
Figure 1: User interaction with ChatGPT on causal related questions.'
To overcome these challenges, in this study, we develop an end-to-end user-friendly large language model with causal decision-making ability for general audiences. As illustrated in Figure 2, the proposed model consists of three major steps: user request interpretation, causal tools assignment and execution, and output interpretation. Upon receiving user query and an uploaded data file, the initial step identifies the pertinent causal task and extracts query details-inclunn
dataset name, task type, and variable of interest, among other variables-ing into structured JSON summary. The LLM4Causal model gains the ability to convert natural language user queries into JSON summaries by fine-tuning pre-trained LLM on the Gausal-Retrieval--Berre pipeline is proposed to ensure the quality of Causal-Retrieval-Been variety and accuracy. In the second step, the system automatically chooses the causal learning algorithm according to the task type detailed in the structured JSON data, executes the selected algorithm to analyze the dataset, and collects the algorithm's output. The outputs are then translated into easily understandable language in the third step, using the LLM4Causal model, which has been further fine-tuned with the causal-Interpret- Benchh dataset to generate high-quality interpretations.
dataset. A well-designed data generation
in terms of both data
Our main contributions could be summarized as follows:
This paper is the first to construct an end-to-end user-friendly large language model (LLMACausal) with causal decision-making ability. LLM4Causal could be easily used for general audiences, which addresses the weakness of the current L.M applications on causal tasks. It has the capability of i) interpreting user requests by causal task classification and information extraction, ii) assigning causal tools and executing the corresponding algorithm, and iii) providing an easy-to- -onurersandd interpretation of the algorithm output.
'The chat histories could be found in link 1, link and link 3.
2

---

Published as a conference paper at COLM 2024
LLM4Causal
Cauzal Raoteak Sench
What relationchip
scccrding g the cilsel cila catasef?
Step1: Interpret User Request
LLM4Crmml Model
Fina Tume
Data:
coussicee
atgorttm
Step2: Assign and Execute Causal Tools
Dounty Estimstorr
S-Leamer
G-Leaiiing Aigottiinn
Rei
0.2. It maans that, average, drung rtg u parsor's suauu fiom nor- smokee mmkker keeping
Step3: Interpret the Output
Causal Structure/Effect Learners
0.
Figure 2: A flowchart of the LLM4Causal consists of three major steps: user request infer- pretation, causal tools assignment and execution, and output interpretation.
We have proposed three-step data generation pipeline that combines LLM text generation and human annotation to create fine-tuning datasets. With this well- designed pipeline, we have collected two high-quality benchmark datasets, Causal- Retrieval-Bench for causal function calling and Causal-Interpret-Bene for causal interpretation, with outstanding data variety and accuracy.
The proposed LLM4Causal model was extensively evaluated three major causal deaision tasks: Causal effect estimation, Causal structure discovery, and Causal policy learning. The proposed method has shown superior performance compared the benchmark methods.
Problem formulation
In this paper, we aim to augment existing pre-trained LLMs with the proficiency address causal inquiries, thereby opening the door to causal decision-making processes for general audiences. As introduced previously, causal decision-making tasks can be classified into three categories: 1) causal structure learning (CSL), 2) causal effect learning (CEL), and 3) causal policy learning (CPL). Each of these primary categories consists of multiple tasks, and our study focuses on five key tasks that are particularly relevant to the interests of our target audience. Let us denote the user query as Q, the dataset to be analyzed as D, the node set whose interrelationship is of interest as X, the treatment variable as A, the response variable as ) the mediator variables as M, and the condition of the subpopulation of interest as S. The five causal tasks summarized in Table
Task
Dataset (D)
Nodes (x)
Treatment (A)
Response
Mediator (M)
Condition (S)
Function Output
())
Format
CGL
/
Causal Graph (G)
ATE
Numeric Value
HTE
Numeric Value
MA
Numeric Values
OPO
Treatment Level
Table 1: Constructions of causal tasks
The CSL category includes Causal Graph Learning (CGL) task, which aims to identify causal relationships between variables. Given Q and DD the goal of CGL is to learn and report directed acyclic graph G that encapsulates the entire causal structure among variables in X specified in Q. Average Treatment Effect Estimation (ATE) falls under the CEL category and aims to quantify the average effect size of an intervention across the entire population. Given D, A, and ) defined in Q, the goal of ATE is to execute appropriate learners to
3

---

Published as a conference paper at COLM 2024
measure the difference in counterfactual outcomes between the treated and control groups. Heterogeneous Treatment Effect Estimation (HTE), another task within CEL, extends ATE by assessing effect sizes under specific conditions S, providing insights into the variability of treatment effects across different subpopulations. When additional mediators M are considered to transmit treatment effects to the response, Mediation Effect Analysis (MA) within CEL focuses on decomposing the total treatment effect into direct effects, which are solely due to A, and indirect effects, mediated through additional variables M. Lastly, Off-Policy Optimization (OPO), the only one we considered within the CPL category, served as a one-stop shop for decision-makers. Given D, A, y, and explicitly specified in Q, OPO aims to select suitable policy learners to determine the optimal action expected to maximize the outcome y.
To tackle the aforementioned diverse tasks using a single LLM, we introduce LLM4Causal. By fine-tuning pre-trained LLMs, LLM4Causal is capable of comprehending causal queries, applying appropriate causal tools to analyze the provided tabular dataset, and providing answers by interpreting numerical results in straightforward and fluent language. More technical details of LLM4Causal is discussed in Section 3.
3 Proposed method
In this paper, we introduce a novel three-stage framework to empower a pre-trained LLM to address causality-related tasks, as illustrated in Figure 2. Common approaches to calibrate an LLM checkpoint include Retrieval Augmented Generation (RAG), Prompt Engineering (PE), and Fine- TinneTininng (FT). However, while RAG (Chen et al., 2024; Gao et al., 2023) can introduce relevant external information into the response process, it cannot improve the model's intrinsic understanding of causality or result interpretation capability, rendering it infeasible. Although various PE strategies (Liu et al., 2023; Haviv et al., 2021) have been developed to enhance the performance of LLMs' responses, PE remains a complex and nuanced art that requires iterative and extensive experimentation to refine the prompts. In contrast, having a clear understanding of the expected performance outcomes makes preparing the 'golden' dataset relatively straightforward, thereby making the fine-tuning approach more direct and effective for our case. As a result, we choose fine-tune an LLM on carefully crafted datasets. Specifically, LLM4Causal is carefully fine-tuned with our proposed benchmark dataset, Retell-ReriiilllBBee in classifying rellae tasks and retrieving relevant information, such variable names and values. Then, the framework selects appropriate causal analysis tools based task classification and retrieved information to produce quantitative results. Finally, further fine-tuned on our proposed Causal-Interpret Bench dataset, LLM4Causal is capable of translating the direct results from functional calls into clear and easily understandable natural language interpretations.
enabling it to achieve better performance than other LLMs
3.1 Step1. interpret user request
The purpose of the first step is to translate user questions through two integrated substeps: causal task classification and ii) attribute extraction. The first sub-step categorizes the input question into one of the five supported causal tasks (CGL, ATE, HTE, MA, or OPO) by inferring the underlying user intention. Following this, attribute extraction, conditioned on the task classification, extracts attribute values that are necessary for the expert tools to address the causal problem. Instead of formulating it as a sequential process, we propose to merge them into one sequence-to-sene tosuueeece (seq2seq) procedure where the output is structured JSON with the "causal_ problem" key and other task-specific keys, e.g. "dataset" "causal_problemm'
(D), "treatment" (AA,, "outcome" ())). Some simulated input queries with the corresponding JSON output are shown in Appendix C.2 Table 6.
Even with careful prompt engineering, it is challenging to directly adapt pre-trained LLM for such a seq2seq task, where the latest GPT4 checkpoint still has a 31% error rate (see Section 4.3 for details) and publically available model such Llama 2 failed on this JSON extraction task. As a result, we find it necessary to fine-tune a local LLM with an augmented dataset consisting of both input queries and output JSONs.
4

---

Published as a conference paper at COLM 2024
Candidate
Variablis
Type
Template 2
Description
Siatus
Texk
ATE
Healss Barcc to
Topics
Lung Cancer
Thornee
randicn
Solko by Shoplay
Combined
XXXXX
X00e0
Filled
JSON
Gentkinn
Xg
XX0XXX
4
3: Demonstration
Pokzes
random
4: Restriction
JSON Dulpul
Rockyrc Couns
(PGEL", "datase"" Tummking cwV) "reatment" rampiin stataa) "meprnot [hing.ommrr
Gauadi- Raraaan- Banch
1p
Tamplate
Ammototarr
construction procedures for the first step. GPT prompts used in this section can be found in Appendix C.2. In the left panel, GPT is prompted to list out different topics and measurable variables for each topic. With randomly drawn tasks from section 2 and some variables under the same topic, we generated JSON output in the middle panel. The colored boxes in the left and middle panels are shared topics and variable names of interests. In the right panel, the numbered boxes in template mean blank places to be filled with the task description, the supplied demonstration, JSON inputs, and output restrictions. Common connectors and general instruction in prompt are shortened into "xxxxx" due to the figure limit.
Figure 3:
3.1.1 Construct Causal-Retrieval--entt
To the best our knowledge, the aforementioned customized input-output pairs can not be collected from the online corpus, since the commonly used LLM training data mainly conversational materials other than structured data. Therefore, we choose to construct customized corpus containing both synthetic causal questions and the corresponding JSON representations by prompting an instruction-folloiing LLM.
To collect L.M-generated data, the common approach starts by writing several demon- strated examples. Those demonstrations are then fed to an LLM (e.g., GPT-4) for new sample generation. We have observed that such an approach suffers from (1) non-controllable topics and variables of interest, which results in content homogeneity, (2) incomplete /notte non- compliant JSON outputs, and (3) inappropriate paraphrase, where the causal question is transformed to be association-relate nation, we propose a three-course procedure, which is illustrated in Figure 3.
To resolve the pain points and prevent data contami-
The procedure can be summarized an output-first strategy, where the major goal is to improve the correctness and the variety of the output JSÖN. An instruction prompt (See Appendix C.2) is then incorporated to construct causal-related questions in different sentence structures. Specifically, we first prepare a topic database by conducting value generation, then generate JSON data by random sampling, and finally paraphrase the question utilizing prompting.
Value Generation: the goal of the first course is to get a candidate pool of the interested topic and variables. We prompt the GPT model to generate some potential topics and related variable names. For each variable, we perform a zero-shot classification by GPT to determine the variable type, i.e., whether it is discrete or continuous. All the collected information is maintained in a three-level hierarchy structure (topic-> variable type).
JSON Generation: Based on the assumption that causality tasks often involve vari- ables within the same topic, we randomly generate structured JSON data following the topic-variable-tyee structure. For example, for an average treatment effect estimation task, topic name is firstly drawn from the stem of the tree the data file name, and two variables underneath are then considered as candidates for the synthetic treatment and outcome. For causal tasks where specific Palue/condition
5

---

Published as a conference paper at COLM 2024
of group variable is needed, we sampled random value, either continuous or discrete, based on the corresponding variable type.
Question Generation: For each JSON output, we prompt the GPT-4 model to gener- ate five related questions given the context. Utilizing univariate prompt template, we transform each JSON into an intormation-auggeent
prompt consisting of task-specific descriptions, expert-written demo examples, JSON information, and paraphrasing guidelines. More details can be found in Appendix C.2
During development, the aforementioned three courses are executed sequentially with quality control on the correctness of generated entities/ /queries in between. Confused with other statistical concepts, such as correlation and association, the current GPT model has suboptimal performance on the causality-related task. Hence, domain experts are involved after each step to improve the data quality with human annotation. As a result, for the Gausal-Retrieval-Beett Bench, we collect 1,500 pairs, iee, 300 for each causal task, of causal questions with the corresponding JSON outputs. The detailed approach for model fine-tuning is move to D.1 for brevity.
3.2 Step2. assign and execute causal tools
In this stage, to address user queries, we first select suitable causal learning algorithms based on the task class determined in Step 1. Following this selection, the algorithm is executed automatically, using both the extracted information from Step and the user- provided dataset as inputs, to get the estimated result. See Figure 4 in Appendix C.3 for graphical illustration. Depending on the causal task, the output result can be causal graph G, numerical values of estimated causal effect, or a treatment level a E A. LLM4Causal supports variety of approaches for each causal task by leveraging well-known public causal packages, including econml(Oprescu et al.), causalml(Chen et al., 2020), Gousal-learn(Zhen et al., 2023), and (Susa al., 2023). Additionally, we remark that LLM4Causal is designed with flexibility, allowing for the incorporation of new methodologies through simple integration of function scripts.
3.3 Step3. interpret the numerical output
As discussed in Section 3.2, Step 2 produces numerical value of causal effect, a recom- mended action level, or an adjacency matrix indicating causal relations in a causal graph. Interpreting these outputs needs domain expertise and may not be easily understood by a general audience lacking a causal background.
enhance user-friendllness and reduce the learning curve of LLM4Causal, our final stage entails the interpretation of the function output using fluent natural language. The process starts with a templated interpretation that automatically converts the numerical output to one-sentence summary (See Appendix C.4.1 for examples). The final human-readable interpretation is then produced through the utilization of the M.M4Ca which is guided by designed prompt that includes response guidelines, the templated interpretation, and other relevant information (i.e., selected tools, the original user query, etc.). The prompt instructs the LLM4Causal avoid generating hallucinatory content, ensure the inclusion of all relevant information, and provide cohesive responses in the relevant context of the original question (See Appendix C.4.3 for details). Observing that even GPT4 produces problematic interpretations (25% hallucination; see the definition below), we further fine-tune the LLM4Causal for output interpretation. In the fol- lowing, we outline the process used to generate the golden dataset Causal-Interprer Beechh used for model calibration.
3.3.1 Build Causal-Interpret-Bnnchh
Likewise to the procedures in Step 1, we first use the GPT4 model to generate silver dataset of interpretations, employing the templates in Appendix C.4.1 and the prompts in Appendix C.4.3. The interpretation instruction (prompt) takes the original causal question and intermediate results from steps 1 and 2 as inputs. Among them, user queries and their corresponding causal task classifications from section 3.1.1 directly reused, with

---

Published as a conference paper at COLM 2024
causal tools paired using the methodology described in 3.2. As for the function outputs, the numerical values are randomly generated in formats specific to each task. To create the final golden dataset, we then have annotators manually revise 400 interpretations, avoiding the three types of mistakes defined in the evaluation rubric outlined below:
Hallucination: i) The interpretation incorrectly presents information, such as treat- ing the response variable as the treatment variable and misinterpreting the direct effect in mediation analysis as the total effect; ii) includes details that are not present in the provided context, such as commenting on the effectiveness of meth- ods used; or iii it incorrectly applies terms such as 'correlatonn' and 'association', which are inappropriate for describing causal relations.
The interpretation lacks one or more essential components, such as the data set, the method, the results, and / or all the variables involved.
Incompleteness:
Non-fluency: i) The interpretation includes unexplained, meaningless variable names (e.g., rche_rate";; ii) it repeats the same content multiple times; iii) directly references or rephrases the guidelines in the prompt.
Although various metrics are developed to assess the factual consistency between output summaries/ interppeeaatioss and the original context (Zhang et al., 2019), well as the conciseness and readability of output summaries, such as the ROUGE score (Lin, 2004), they do not meet our specific needs. The interpretation we require highly specialized, necessitating a clear distinction between causality and association, guaranteeing that no crucial information is missed, and ensuring is comprehensible to general audiences, among other criteria. Furthermore, the current automatic evaluation based on sentence similarity metrics or GPT-based prompts fails to adequately incorporate human preferences, making them unsuitable for our application. Therefore, instead, we carefully defined the three aforementioned rubrics to guide human annotation.
4 Experiments
In this section, we conduct numerical experiments to investigate the performance of LLM4Causal on five causal decision-making tasks. For each causal task defined in Section 2, we randomly sample topics and their related variables following the process described in Figure that is different from the two aforementioned datasets. With the topics and variables in hand, we further generate 150 synthetic data files utilizing the methodology introduced in Section D.2. Based on these synthetic datasets, we evaluate end-to-end perfor- mance for the proposed LLM4Causal model in Section 4.2. Furthermore, by comparing with the partiallyccapable benchmark methods, i.e. GPT4, in each step, detailed ablation analyses are conducted to provide a comprehensive understanding of the model performance in Section 4.3 and 4.4.
4.1 Benchmark models
The Large language models for evaluation are described as follows.
GPT4 (OpenAI, 2023b): For end-to-end evaluation, we tested ChatGPT with GPT4 backbone. GPT4 with the function call feature enabled are tested for ablation analysis. By creating a function with causal task description and input arguments requirements, we utilize the GPT 4 with the function calling feature generate the output, which is then transformed into JSON format based on the predicted "causal_problem" key.
LLM4Causal: customized language model started from Llama-2 (7B) checkpoint (Touvron et al., 2023b) and further fine-tuned on the Causal-Retrieval-Be Causal-Interppee--eeel Bench.. To inspect mixing two types of data will harm the performance of each other, present three varieties where LLMeCausal-Mixed trained on both datasets, LLMM4CasallRetrieee trained on the retrieval bench, and ILMACausal-Interpon augmented by the interpret bench.
and
7

---

Published as a conference paper at COLM 2024
We only have the GPT family the benchmark as other closed-sourced LLM environments do not have code execution ability. Furthermore, existing works (Qin et al., 2023b; Yang et al., 2023) tool calling do not support causal tasks or fully rely prompting pre-trained models for output interpretations. Preliminary experiments (see Appendix D.3) show that pre-trained open-sourced models, such as Llamma2-7B, fail to adequately handle prompts with our designed requirements, making the aforementioned function-calling methods incapable of finishing the designed tasks.
4.2 Main result: end-to-end evaluation
In this experiment, we evaluate the end-to-end model performance from receiving causal- related questions to providing interpretations that explain the causal results. With such setup, there is no sole "golden label" existing for each question as the correct interpretation is not unique. To provide comprehensive analysis, we provide the following evaluation metrics inspired by previous works (Yang et al., 2023; Qin al., 2023b) from three aspects:
Pass rate (Qin et al., 2023b) calculates the proportion of user requests that could be completed by the model. This metric measures the model's 's executability and could be calculated Pass rate 1 Σn ] where N is the number of samples, ll {T,) is an indicator function, which equals to if the model could generate an output for the jM user request, and otherwise.
Relevance rate: it calculates the proportion of user requests that the model provides relevant content with the correct causal task. This metric measures the model's task identification ability as Relevance rate = ΣN 1[r),, where [ is an indicator function, which equals to 1 if the model could generate an output that correctly identify the causal task for the ith user request, and 0 otherwise.
Win rate: it calculates the proportion of user requests that the model has delivered an accurate result. It could be calculated as Win rate = ΣN I(1);, where I 1 is an indicator function which equals to 1 if the model output contains the desired true value for the jt user request, and otherwise.
We evaluated the end-to-end causal-question answering performance for ChatGPT and LLMeCCuual-Mixed Table 2. The configuration of the ChatGPT can be found in Appendix D.4.
ChatGPT
LLM4Causal-Mixel
CGL
ATE
HTE
MA
OPO
CGL
ATE
HTE
MA
OPO
Pass Rate
0.17
0.77
0.73
0.27
0.87
1.00
0.93
0.83
0.86
0.83
Relevance Rate
0.10
0.60
0.43
0.20
0.43
1.00
0.93
0.83
0.80
0.83
Win Rate
0.00
0.37
0.07
0.10
0.07
0.90
0.90
0.80
0.70
0.73
Table End-to-end evaluation for LLMACausal-Mixed. Higher is better.
LLM4Causal provides a high pass rate and relevance rate for all tasks, whereas GPT4 performs well regarding pass rate but shows dichotomized performance in Relevance Rate. The pass rate only requires the model to successfully execute its last code block without an error, regardless of relevance, It is important to highlight that passing cases for GPT4 include cases where GPT only printed the basic statistics of the data without in-depth analysis. For tasks having a high Pass Rate, such as HTE and OPO, we got 42% and 51 % of them to be either superficial starter conversations irrelevant outputs that confuse general audiences.
More importantly, LLM4Causal outperforms ChatGPT on Win Rate. On the one hand, we can find that ChatGPT with the GPT-4 backbone can only finish 37% of the ATE task and nearly failed all other scenarios. The main reason is the generated code either has syntax factual errors or attempts to load package that is not in the environment. On the other hand, LLM4Causal correctly answered 80.6% questions on average. The win rate roughly reflects the combined difficulty of three steps for each task. The MA and OPO tasks
8

---

Published as a conference paper at COLM 2024
require more parameters inferred from the question, further boosting the task complexity and resulting in a relatively lower win rate.
By investigating the failed cases, we observe that some GPT4 responses to CGL tasks are still informative to users but fail due to a lack of code dependencies. To further analyze the root cause, we conducted two more ablation analyses steps and 3 to strip out the cases when code execution is the main roadblock. Meanwhile, we compare the LLM4Causal SaM44Caual-RRtrievve Wnetrieve/LLM4Causssse LLMM-aasalll-ntrrrrrrr in the ablation analysis to explore whether training distinct models on each dataset could enhance performance.
to
4.3 Ablation analysis causal entity extraction
In this section, we focus the model performance on Step 1, user request interpretation, com- paring with the benchmark methods on the synthetic data of 150 causal-related questions. In detail, for each simulated user request, the model is asked to produce a JSON output following the output format listed in Table 6. The accuracy of each key value is then calcu- lated by comparing the ground true label with the model outputs. It is worth mentioning that, we require exact match for values of the causal task key and the dataset key since the causal task lists are provided in the training data and the dataset names are explicitly mentioned in the user request. For the remaining key values, consider the value to be correctly retrieved if it is a subset of the model output (soft-match), e.g. extracting both "customer satisfaction rate" or "satisfaction" would be considered as correct if the true label is "satisfaction t_ttte_rttt_ We used the GPT4 with the function call feature enabled as benchmark method, as most existing studies (Qin et al., 2023b; Zhang, 2023) treat its output as the golden label for local LLM development, and the detailed setup can be found in Appendix D.4.
Metric
Causal Task
Dataset
Nodes
Treatment
GPT4-turbo
(.69(0.02)
0.99(.001)
0.99(.002)
0.60(0.02)
LLM4Causal-Retrieee
0.96(0.00)
0.99(0.01)
0.88(0.03)
0.94(0.00)
LLMACausal-Mixed
0.98(0.00)
1.00(0.00)
1.00(0.00)
0.96(0.00)
Metric
Response
Mediator
Condition
All
GPT4-turbo
0.60(0.02)
0.6T(0.04)
0.98(0.01)
0.77(0.01)
LLM:Causal-Retrrive
(.94(0.01)
0.90(0.05)
1.00(0.01)
0.96(0.01)
LLM#Causal-Mixed
0.97(0.00)
1.00(0.00)
1.00(0.00)
0.98(0.00)
Table Causal entity extraction performance. Higher is better.
As shown in the table 3, both LLM4Caasal models can effectively solve step and signif- icantly outperform the GPT4-turbo. This is dominated by the accuracy of the causal task identification, which blocks the model from accurately finding the necessary entities to extract if a wrong task class is posited. Besides, seemingly surprising fact is that the mixed version even outperforms the retrieve-only version on all tasks. Such phenomenon may be due to the inclusion of the interpretation data, which also involves causal queries and their corresponding causal tasks with interpretations, increasing the parameter weight during the fine-tuning process of the model between task-specific queries and the corresponding task classification.
4.4 Ablation analysis interpreting causal function output
Following metrics described in section 3.3.1, we evaluate the quality of model-generrted interpretations. A double-blind experiment is conducted with domain experts judging if the interpretation generated by each language model has issues with hallucination, fluency, or incompleteness using the same template. The averaged error rate is reported Table 4.
The interpretation results showed that LLM4Causal Models comparable to superior to the GPT-4-turbo on both hallucination and fluency metrics. Compared with the initial pre-trained Llama2, the model fine-tuning procedure successfully instructs it to reduce

---

Published as a conference paper at COLM 2024
model
task
hall.
inco.
fluent
task
hall.
inco.
fluent
GPT4-turbo
0.08
0.00
0.28
0.05
0.10
0.22
LLMACauusal-nnerrpret
CGL
0.05
0.03
0.28
MA
0.10
0.15
0.18
LLM44ausal-Mixed
0.23
0.00
0.20
0.19
0.27
0.16
GPT4-turbo
0.43
0.05
0,48
0.15
0.10
0.33
LLMACausal-nnteppre
ATE
0.38
0.10
0.20
OPO
0.26
0.13
0.18
LLMM4Cauaa--ixee
0.28
0.00
0.50
0.21
0.13
0.10
GPT4-turbo
0.08
0.00
0.28
0.19
0.06
0.36
LLMACausal-Interpret
HTE
0.05
0.03
0.28
All
0.17
0.10
0.20
LLM4Causal-Mixed
0.23
0.00
0.20
0.20
0.08
0.28
Table 4: Causal result interpretation performance, where hall. indicates hallucination, inco. stands for incompleteness, and fluent is for non-fluency. Lower is better.
hallucination and makes the interpretation crisp without including sentences repeating already-stated information. Besides, we expect our fine-tuned models be improved, especially for the completeness metric, by involving more golden samples for fine-tuning.
While the direct result shows the interpret-only model outperforms the mixed version, the improvement in hallucination and fluency from gpt4 to LLMACausal-Mixet still shows the promise of calibrating a single I.LM4aausal model more economical solution.
Conclusion
In this paper, we have proposed LLM4Causal, the first end-to-end user-friendly large language model with causal decision-making ability. Without requiring in-depth domain knowledge, the proposed model could be easily used for the general audience, which remedies the weakness of the current LLM application on the causal tasks. Furthermore, we have proposed novel data generation pipeline by utilizing GPT-based LLM models and human annotations improve the data quality in terms of both data variety and accuracy. From the numerical experiments, we have shown that calibrating single L.M to accomplish such an end-to-end task possible. Fine-tuned interpret users' query and function outputs, LLM4Causal has shown superior performance in causal entity extraction and function result interpretation.
To conclude, we briefly discuss some limitations followed by possible future directions. First, the proposed model focuses on five major causal tasks, and it is worth mentioning that our framework could be easily extended to support more causal tasks with more methodologies. Second, in this paper, we only leverage LLM's tool-usage capabilities to utilize statistical tools for data analysis. Concurrently, the internal knowledge acquired by the LLM during its pre-training process has proved advantageous for common sense retrieval. The integration of the LLM's tool-usage capabilities with its inherent knowledge base could enhance its performance on statistical causal tasks. Furthermore, integrating LLM's internal knowledge for general reasoning might enable the model discern textual causality between descriptive events in the conversation (Rashkin et al., 2018; Ning et al., 2019; Wang al., 2023), a concept related to, yet distinct from, the causality examined in this paper. Lastly, potential direction to explore is the interactive potential of the framework so that the proposed method could iteratively adapt to users' feedback, which could be beneficial in following users' preferences for causal tools, encouraging users to collect necessary information when their input not enough, and enhancing the interpretations based on their extra input in the problem context.
10

---

Published as a conference paper at COLM 2024
References
Taiyu Ban, Lyvzhou Chen, Xiangyu Wang, and Huanhuan Chen. From query tools to causal architects: Harnessing large language models for advanced causal discovery from data. Xiv preprint ar arXt::3306.1600 2023.
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. Advances in neural information processing systems, 33:1877-1901, 2020.
Hengrui Cai, Rui Song, and Wenbin Lu. Anoce: Analysis of causal effects with multiple mediators via constrained structural learning. In International Conference on Learning Representations, 2020.
Bibhas Chakraborty and Susan A Murphy. Dynamic treatment regimes. Annual review of statistics and its application, 1:447-464 2014.
Huigang Chen, Totte Harinen, leong-Yoon Lee, Mike Yung, and Zhenyu Zhao. Causalml:
Python package for causal machine learning. arXiv preprint arXii:2002.11631, 2020.
Jiawei Chen, Hongyu Lin, Xianpei Han, and Le Sun. Benchmarking large language models in retrieval-augmented generation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pp. 17754-17762, 2024.
Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. Evalu- ating large language models trained on code. Xiv preprint ar XXiv:2107.03374, 2021.
Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Yunxuan Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, et al. Scaling instruction- finetuned language models. Xrw preprint ar xit:222100 2022.
Leyang Cui, Yu Wu, Jian Liu, Sen Yang, and Yue Zhang. Template-based named entity recognition using bart. arXiv preprint arXie:2106.01780 2021.
Bhuwan Dhingra, Jeremy R Cole, Julian Martin Fisenschlos, Daniel Gillick, Jacob Fisenstein, and William W Cohen. Time-aware language models as temporal knowledge bases. Transactions of the Association for Computational Linguistics, 10:257-273, 2022.
Yunfan Gao, Yun Xiong, Xinyu Gao, Kangxiang Jia, Jinliu Pan, Yuxi Bi, Yi Dai, Jiawei Sun, and Haofen Wang. Retrieval-augmentee generation for large language models: A survey. arvivv preprint arX1::2312. 1099977 2023.
Clark Glymour, Kun Zhang, and Peter Spirtes. Review of causal discovery methods based on graphical models. Frontiers in genetics, 10:524, 2019.
Shantanu Gupta, Cheng Zhang, and Agrin Hilmkil. Learned causal method prediction. Xrx preprint arXio:2311.0398, 2023.
Adi Haviy, Jonathan Berant, and Amir Globerson. Bertese: Learning to speak to bert. arXiv preprint ar XrXi::2003.0537,, 2021.
Raymond Hicks and Dustin Tingley. Causal mediation analysis. The Stata Journal, 11(4): 605-619, 2011.
Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin De Larous- silhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly. Parameter-efficieet transfer learning for nlp. In International Conference on Machine Learning, pp. 2790-2799, PMLR, 2019.
Edward Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. arviv preprint ar Xixi::2106.000 0066,,6,.00985,, 2021.
11

---

Published as a conference paper at COLM 2024
Enkelejda Kasneci, Kathrin Seßler, Stefan Küchemann, Maria Bannert, Daryna Demen- tieva, Frank Fischer, Urs Gasser, Georg Groh, Stephan Günnemann, Eyke Hüllermeier, et al. Chatgpt for good? opportunities and challenges of large language models for education. Learning and individual differences, 103:102274, 2023.
Emre KIcIman, Robert Ness, Amit Sharma, and Chenhao Tan. Causal reasoning and large language models: Opening a new frontier for causality. ar preprint ar xxxx:2305.00055) 2023.
Mojtaba Komeili, Kurt Shuster, and Jason Weston. Internet-augmented dialogue generation. Xrv preprint arXtm:2107.07566 2021.
Brian Lester, Rami Al-Rfou, and Noah Constant. The power of scale for parameter-efficient prompt tuning. arXiv preprint urXio:2104.08691, 2021.
Xiang Lisa Li and Percy Liang. Prefix-tuning: Optimizing continuous prompts for generation. ar arviv preprint arXiv:2101.00190 2021.
Vladislav Lialin, Vijeta Deshpande, and Anna Rumshisky. Scaling down to scale up: A
guide to parameter-efficte fine-tuning. arviv preprint arXiv:2303.15647, 2023.
Chin-Yew Lin. Rouge: A package for automatic evaluation of summaries. In Text summariza- tion branches out, pp. 74-81, 2004.
Pengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang, Hiroaki Hayashi, and Graham Neubig, Pre-train, prompt, and predict: A systematic survey of prompting methods in natural language processing. ACM Computing Surveys, 55(9):1-35, 2023.
Stephanie Long, Tibor Schuster, Alexandre Piché, ServiceNow Research, al. Can large language models build causal graphs? ar preprint ar #rXiv2230300279, 2023.
Qiang Ning, Zhili Feng, Hao Wu, and Dan Roth. Joint reasoning for temporal and causal relations. ar Xiv preprint ar Xiix:196.04991,, 2019.
OpenAl. Openai: Introducing chatgpt, 2022. URL http::///penaii..o//////////////
OpenAl. Chatgpt plugins, 2023a. URL http::///ppeaaa..om///lghhhtttpp code- interpreter.
OpenAL. Gpt-4 technical report, 2023b.
Miruna Oprescu, Vasilis Syrgkanis, Keith Battocchi, Maggie Hei, and Greg Lewis. Econml: A machine learning library for estimating heterogeneous treatment effects. In 33rd Conference on Neural Information Processing Systems, pp.
Arkil Patel, Satwik Bhattamishra, and Navin Goyal. Are nlp models really able to solve simple math word problems? arXiv preprint arXtw:2103.07191 2021.
Yujia Qin, Shengding Hu, Yankai Lin, Weize Chen, Ning Ding, Ganqu Cui, Zheni Zeng, Yufei Huang, Chaojun Xiao, Chi Han, et al. Tool learning with foundation models. ar Xiv preprint ar arXio:2304.08354 2023a.
Yujia Qin, Shihao Liang Yining Ye, Kunlun Zhu, Lan Yan, Yaxi Lu, Yankai Lin, Xin Cong, Xiangru Tang, Bill Qian, et al. Toolllm: Facilitating large language models to master 16000+ real-world apis. Xiv preprint wxXi:22077167889 2023b.
Dheeraj Rajagopal, Vivek Khetan, Bogdan Sacaleanu, Anatole Gershman, Andrew Fano, and Eduard Hovy. Cross-domain reasoning via template filling. arXiv preprint ar ArXii=221110053: 2021.
Hannah Rashkin, Maarten Sap, Emily Allaway, Noah A Smith, and Yejin Choi. Event2mind: Commonsense inference on events, intents, and reactions. ar Xrv preprint arXiv:1805.06933. 2018.
12

---

Published as a conference paper at COLM 2024
Timo Schick and Hinrich Schütze. Exploiting cloze questions for few shot text classification and natural language inference. arx preprint axXio:2001.0766, 2020.
Timo Schick, Jane Dwivedi-Yi Roberto Dessi, Roberta Raileanu, Maria Lomeli, Luke Zet,lemoyer, Nicola Cancedda, and Thomas Scialom. Toolformer: Language models can teach themselves to use tools. Xrv preprint arXivv2302.04761 2023.. 2023.
Shohei Shimizu. Lingam: Non-gaussian methods for estimating causal structures. Behav- iormetrika, (1(1):65-99 2014.
Shohei Shimizu, Patrik Hoyer, Aapo Hyvärinen, and Antti Kerminen. linear non- gaussian acyclic model for causal discovery. Journal of Machine Learning Research, 7(Oct): 2003-2030, 2006.
Taylor Shin, Yasaman Razeghi, Robert L Logan IV, Eric Wallace, and Sameer Singh. Au- toprompt: Eliciting knowledge from language models with automatically generated prompts. arXiv preprint ar Xit:2010.115900 2020.
Rui Song, Hengrui Cai, Yang Xu, Runzhe Wan, and Lin Ge. Causaldm, 2023. https: //causaldm. gi thub. aooCCaaal-eeiision-aaaaaa
Peter Spirtes, Clark N Glymour, Richard Scheines, and David Heckerman. Causation, prediction, and search. MIT press, 2000.
Richard Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press, 2018.
Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, et al. Llama: Open and efficient foundation language models. arXiv preprint ar Xri::2202..3971, 2023a.
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, al. Llama Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.092 2023b.
Zhaowei Wang, Quyet V Do, Hongming Zhang, Jiayao Zhang, Weiqi Wang, Tianqing Fang, Yangqiu Song, Ginny Y Wong, and Simon See. Cola: contextualized commonsense causal reasoning from the causal inference perspective. arXiv preprint 2rX1v22305.05191, 2023.
Jason Wei, Xuezhi Wang. Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V
Le, Denny Zhou, et al. Chain-of-thought prompting elicits reasoning in large language models. Advances in Neural Information Processing Systems, 35:24824-24833 2022.
Rui Yang, Lin Song, Yanwei Li, Sijie Zhao, Yixiao Ge, Xiu Li, and Ying Shan. Gpt4tools: Teach- ing large language model to use tools via self-instruction. Xio preprint ar drXto:2305.1872, 2023.
Liuyi Yao, Zhixuan Chu, Sheng Li, Yaliang Li, Jing Gao, and Aidong Zhang, A survey causal inference. ACM Transactions on Knowledge Discovery from Data (TKDD), 15(5):1-46, 2021.
Yue Yu, Jie Chen, Tian Gao, and Mo Yu. Dag-gnn: Dag structure learning with graph neural networks. arxiv preprint ar arXie:1904.10093 2019.
Yan Zeng, Ruichu Cai, Fuchun Sun, Libo Huang, and Zhifeng Hao. survey on causal reinforcement learning, 2023.
Cheng Zhang, Stefan Bauer, Paul Bennett, Jiangfeng Gao, Wenbo Gong, Agrin Hilmkil, Joel Jennings, Chao Ma, Tom Minka, Nick Pawlowski, et al. Understanding causality with large language models: Feasibility and opportunities. arXiv preprint 2rXiv:2304.05524, 2023.
13

---

Published as a conference paper at COLM 2024
Jiawei Zhang. Graph-toolformer: To empower Iims with graph reasoning ability via prompt augmented by chatgpt. arxiv preprint aixi:23304.11116 2023.
Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q Weinberger, and Yoav Artzi. Bertscore: Evaluating text generation with bert. Xiv preprint ar Xix::1904.09675, 2019.
Wayne Xin Zhao, Kun Zhou, Junyi Li, Tianyi Tang, Xiaolei Wang, Yupeng Hou, Yinggian Min, Beichen Zhang, Junjie Zhang, Zican Dong, et al. A survey of large language models. arXiv preprint Xrx::2303.1822., 2023.
Xun Zheng, Bryon Bryon Aragam, Pradeep K Ravikumar, and Eric P Xing. Dags with no tears: Con- tinuous optimization for structure learning. In Advances in Neural Information Processing Systems, pp. 9472-9483, 2018.
Yujia Zheng, Biwei Huang, Wei Chen, Joseph Ramsey, Mingming Gong, Ruichu Cai, Shohei Shimizu, Peter Spirtes, and Kun Zhang. Causal-learn: Causal discovery in python. ar Xio preprint ar Xrri:23307.16444 16400,, 2023.
14

---

Published as a conference paper at COLM 2024
A
Related work
In this section, we briefly review the literature that are closely related to our paper, which includes causal pocision-makinge methods, LLM with causal capabilities, enhancement methods for pre-trained LLM, well as large language models with tool usage.
A.1 Causal decision making
The decision-making process, crucial in diverse real-life contexts, fundamentally relies on understanding counterfactual scenarios, thereby emphasizing the significance of causal analysis in decision-making Recently, Song et al. (2023) proposed comprehensive frame- work known Causal Decision Making (CausalDM, Song et al., 2023), which examines various decision-making stages through a causal lens and establishes connections among the relevant literature under the same conceptual umbrella. In general, the body of current literature can be classified into three basic categories: i) causal structure learning (CSL) (Spirtes et al., 2000; Shimizu et al., 2006; Zheng et al., 2018; Yu et al., 2019; Glymour et al., 2019), which focuses on unraveling the complex causal relationships among variables, is pivotal for pinpointing vital factors that influence outcomes, either directly or indirectly; ūi) causal effect learning (CEL) (Yao et al., 2021; Hicks & Tingley, 2011), which is primarily concerned with quantifying the effects resulting from different causal paths within a known causal structure, typically concentrating on measuring the difference between outcomes of receiving versus not receiving treatments; and iii) causal policy learning (CPL), which involves evaluating various treatment strategies and developing optimal action plans, fre- quently investigated as dynamic treatment regime problems (Chakraborty & Murphy, 2014) or conceptualized within the framework of reinforcement learning (Sutton & Barto, 2018; Zeng et al., 2023).
A.2 Large language models with causal capabilities
The rapid development of LLMs has inspired some innovative methods for causal graph discovery. KIcıman et al. (2023) one of the pioneering works in this field, introducing method that relies solely on "meta-data" (variable names) instead of specific observed variable values. Using LLMs like GPT--355 and GPT-4, this approach detects causal rela- tionships between variable pairs through direct querying. Similarly, Long et al. (2023) use GPT-3 to discover causal relationships from variable names within the medical domain, motivated by the capacity of LLM to extract knowledge from the medical texts on which it was trained. However, as Long et al. (2023) highlighted, the efficacy of this type of approach relies heavily on the prompts used for LLM queries and the initial training corpus of the LLM. In a further development, Ban et al. (2023) proposes to integrate the causal relations retrieved directly from LLMs and traditional score-based causal discovery methods. In their framework, the LLM's causal relations are utilized to guide the optimization process of score-based methods as soft or hard constraints, enhancing the performance compared to using either LLMs or traditional methods alone. Gupta et al. (2023), on the other hand, apply LLMs in selecting causal discovery methods for a specific dataset rather than directly discovering the causal relations on the dataset given. Their framework is claimed to be able to select the causal discovery method with the best F1 score out of a fixed set of candidates. Furthermore, Zhang et al. (2023) discusses the strengths and limitations of LLMs for causal discovery. Although LLMs have advantages in detecting causal relationships within the scope of their training data, their performance suffers when confronted with unfamiliar domains. It is worth mentioning that our approach differs from the previously mentioned studies, none of them introduces mechanism to automatically invoke data-based causal discovery methods, nor do they have a mechanism to translate the output into natural languages that general audiences can understand.
A.3 Enhancing pre-trained large language models
Pre-trained large language models often contain billions of parameters that impose chal- lenges when fine-tuning the entire model to adapt to downstream tasks. Two classes of
15

---

Published as a conference paper at COLM 2024
research are developed to reduce such computational burden. A straightforward but effective workaround is freezing most parts of the model and only tuning small portion of the parameters, which includes additive methods and reparaamttization--asedd methods (Lialin et al., 2023). Additive methods, such as adapters (Houlsby et al., 2019), augment the pre-trained model with extra parameters and only train the newly added parameters. Reparametrization-aase
methods, such as LOw-Rank Adaptation method (LoRA) (Hu et al., 2021), reduce the number of trainable parameters utilizing low-rank representations. To improve the training efficiency, our proposed method utilizes the LoRA method (Hu et al., 2021), which reduces trainable parameters by freezing the pre-trained model and optimizing the ranssdecomoosition matrices.
Another line of research has demonstrated that template-based prompting can also notably enhance the performance of LLMs. Commonly used prompt types include cloze question style prompts, which consist of string templates with placeholders for the LLM to fill in (Rajagopal et al., 2021; Cui et al., 2021), and prefix style prompts that prepend tokens to the input texts of LLMs (Li & Liang, 2021; Lester et al., 2021). The latter is particularly effective for generative tasks, such as generating interpretations of numeric outputs from causal models in our LLM4Causal framework (Liu et al., 2023). A common way to cre- ate such prompts is to design them manually and such prompts usually include few -ener-geeeeated exemplars of input-output pairs for LLMs (Chung et al., 2022). These human-crafted p have improved performance across various tasks such as question answering and text classification (Brown et al., 2020; Schick & Schütze, 2020). Recently, Wei et al. (2022) demonstrated that prompting language models to add reasoning steps before the actual output significantly enhances the LLM's performance on arithmetic, common- sense, and symbolic reasoning tasks. To reduce manual effort in this process, some studies have also explored automation in prompt design. For instance, Shin et al. (2020) discretely optimized the prompt by adding tokens from a certain word collection, while Haviv et al. (2021) focuses on automatic paraphrasing of given manually designed prompts and select- ing the most effective one from
variations. In our LLM4Causal framework, we utilize prefix style prompts with manually designed input-output examples to effectively collect data for fine-tuning LLMs to classify user queries into different causal tasks and interpret the numerical results from causal tools. The satisfying performance of our framework has demonstrated the effectiveness of our carefully crafted prompts.
A.4 Large language model with tool usage
Despite LLM's impressive performance in natural language processing tasks, some inherent limitations remain. Examples include the inability to perform precise arithmetic operations (Patel et al., 2021), lack of access to up-to-date information (Komeili et al., 2021), and ignorance of temporal contexts (Dhingra et al., 2022). To overcome these impediments, natural solution is to enable LLM to utilize tools, such as calculator, search engine, and calendar, to accomplish complex tasks (Qin et al., 2023a). In particular, Schick et al. (2023) proposed Toolformer, a self-supervised language model that could use external tools by calling relevant APIs, without relying on large human- demonstrations in the instruction prompt, Toolformer is trained to learn which, when, and how APIs could be called to complete a variety of tasks, including question answering, Wikipedia search, and mathematical reasoning. Based on the toolformer architecture, Graph- Toolformer Zhang (2023) is proposed to teach LLMs to use tools on graph reasoning tasks with ChatGPT-augmentee prompts (OpenAI, 2022). Moreover, 4PT4tools (Yang et al., 2023) are proposed to facilitate LLMs in accomplishing visual-related tasks by generating prompts with multi-modal contexts, and TooILLM (Qin et al., 2023b) further generalizes the tool-use capability of LLMs to master over 16,000 real-world APIs and enable multiple tool- usage for each query. Focusing on developing frameworks for calling general Application Programming Interfaces (APis), these methods cannot be directly applied to causal tasks without a well-developed causal API, which currently is not available. On the contrary, our proposed approach is specifically designed for causal tasks based on a framework that is most closely related to Toolformer.
data. With few tool-usage
16

---

Published as a conference paper at COLM 2024
B Detailed problem formulation
In this paper, we aim to augment existing pre-trained LLMs with the proficiency to address causal inquiries, thereby opening the door to causal decision-making processes for general audiences. As introduced previously, causal decision-making tasks can be classified into three categories: 1) causal structure learning (CSL), 2) causal effect learning (CEL), and 3) causal policy learning (CPL). Each of these primary categories consists of multiple tasks, and our study focuses on five key tasks that are particularly relevant to the interests of our target audience. Let us denote the user query as 2, the dataset to be analyzed as D, the node set whose interrelationship is of interest as X' the treatment variable as A, the response variable as V, the mediator variables as M, and the condition of the subgroup of interest as S. The five causal tasks are listed as follows and summarized in Table 5.
Task
Dataset (D)
Nodes
Treatment
Response
Mediator (M)
Condition (S)
Function Output Format
(2)
(A)
())
CGL ATE
Causal Graph (g)
Numeric Value
HTE
Numeric Value
MA
Numeric Values
OPO
Treatment Level
Table 5: Constructions of causal tasks
[CSL] Causal Graph Learning (CGL): Causal graph learning, its name suggests, involves discovering the causal relationships among variables. This task is crucial for addressing causal queries such as identifying causal links between pairs of variables, determining the variables that influence particular variable of interest, and quantifying the number of causally connected variable pairs. Given Q and D, our goal to learn and report directed graph, denoted as G, that encapsulates the entire causal structure among variables in X, which is either explicitly specified in Q or, by default, encompass all variables in D.
When the treatment and the target response variable have already been determined, the primary interest lies in quantifying the intervention's 's effect size. The objective of the ATE task is to evaluate the average effect of A on by measuring the difference in counterfactual outcomes between the treated group and the control group. Let )/ (1) denote the response that would be observed if the treatment was applied, and (0) denote the response that would be observed if no treatment is applied. Using the provided dataset D, the treatment variable A, and response variable y defined in Q, our objective is to execute appropriate ATE learners to calculate the (1) - (O)]-
[CEL] Average Treatment Effect Estimation (ATE):
[CEL] Heterogeneous Treatment Effect Estimation (HTE): Similar to the ATE tasks, the
HTE tasks also aim to measure effect sizes. However, HTE tasks diverge by focusing on generating nuanced insights tailored to specific subgroups or individuals, characterized by specific conditions. Using the dataset D, and given the treatment variable A, response variable y, and specific conditions S outlined in Q, we aim to call suitable HTE learners to evaluate the conditionally expected difference (1) - (0)
[CEL] Mediation Effect Analysis (MA): Mediators, which act as channels for transmitting treatment effects to the response, are prevalent in various real-world applications. With the provided dataset, and given the A, v, and M specified in Q, MA's objective is to calculate both the direct effect (1, - y()) and the indirect effect (E (1, Here, (-) analogously defined to (-(.), and (a, denote the response that would be observed if treatment was applied and the mediator set to the level that would be
observed treatment a' was applied.
[CPL] Off-Policy Optimization (OPO): As the name suggests, OPO task is a one-stop shop for decision-makers. The goal of OPO is to identify the optimal action (i.e., treatment level) that optimizes the expected response to be obtained given the current circumstances. Utilizing the dataset D provided, with A, Y, and S explicitly specified in Q, we aim to select suitable policy learners to determine the optimal action a" argmax, (a)(S)))) which
17

---

Published as a conference paper at COLM 2024
would then be recommended to the user. We can provide either single-stage multi-stage recommendations depending on the data structure of D.
To tackle the aforementioned diverse tasks using a single LLM, introduce LLM4Causal. By fine-tuning pre-trained LLMs, LLM4Causal is capable of comprehending causal queries, applying appropriate causal tools to analyze the provided tabular dataset, and providing answers by interpreting numerical results in straightforward and fluent language. More technical details of LLM4Causal is discussed in Section
C Supplimentary methodology
C.1 Demonstration input-output pairs
Following procedures described in 3.1, which condition on the task classification, extract at- tribute values that are necessary for the expert tools to address the causal problem. For each input question, the corresponding output is structured JSON with the "causal ppobblem key and other task-specific keys, e.g. "dataset" (D), "treatment" (A), "outcome" ())). Some simulated input queries with the corresponding JSON output are shown in Table
Task CGL
Example Input Query
Expected JSON Output (causal_probless ['CSL', 'CGL'I, 'dataset': l'disas- ter risk reduction.ccs' 'nodes': ["building_ code cisaster__repparcdness__ catpineessssasmssssasaeea
Does the disaster_rist cosk_rrduuttoo.ess dataset provide evidence of a direct link between building code compliance rate and the effectiveness of disaster pre- paredness campaigns?
ATE
How does the labor force participation rate (labor_partin) pattoorrrtiiiiaiionnn rate) in em- ployment.csv contribute to changes in wage growth
l'causal problem'p ( 'ATE',,
'dataset': ['employment.csr/ 'treat- ment': Llabor_partiipationn sponse': ['wage_increase"]
're-
HTE
Based on the findings in the cybersecu- rity.csv dataset, what impact does the presence of data breach incidents have on cybersecurity investment under group condition where the cybersecu- rity readiness index is set at 0.5 (readi- ness index=0.5)?
Drausal_problem's I'CEL', 'HTE'), 'dataset': l'cybersecurity.csvv]] 'treat- ment': ['data Lanta_bbeachh_ee haa__brcccccneentttssss 're- sponse': ['cybersecurity. sitrrittyyinestmmee"" 'onditionn: [('readiness index', 0.5)]]
MA
there substantial evidence in retail.csv indicating that the pathway from retail employment to the e-commerce penetra- tion rate is mediated by the consumer confidence index?
I' Deausal_rrobeem's I'CEL', 'MA',, 'dataset': I' l're'ail.csv'', 'treatment': l're- tail_ dail_employment]]] 'response': l'e- commerce_peneeraaionn saatei) 'media- tor': ['consumer_conficnn confidence confidence_index]]] index']]
OPO
If
the poverty rate stands at 0.32 (poverty_rade __ttratio = 0.32), what recom- mendations be derived from the poverty.csv dataset on adjusting social assistance coverage positively impact the gini coefficient?
Ccausal_problent
"OPL''
'dataset': ['poverty.csv'] 'treatment':
assciallassistannce, (oaprttanccccoveraeeee_e coverage'l, 're-
sponse': aggini_coefficient 'condition': [''overrt_rraeee "ratio' '0.32")]
Table 6: Example Query Inputs with expected JSON Outputs
C.2
Details about step 1
The overall cloze template contains 5 different missing pieces. Among them, the task requirement is verbal description of the task like the role definition of ChatGPT. JSON information is followed by listing out each item line by line. Further, some randomly drawn Human--ritten samples, split into two parts, added as demonstrations for the GPT
18

---

Published as a conference paper at COLM 2024
model to further understand what kind of output need. Finally, we add the requirements for the output in the last part for better control of the GPT output.
Given the details below, generate five diverse and plain-worded questions [Task requirements]:
[JSON information]
Here examples:
Example 1: given the following information:
[Demonstration part A]
The corresponding questions can be: [Demonstration part B]
(Requirements
Below is an example of the full instruction for Causal Structure Learning data generation with information filled in:
Given the details below, generate five diverse and plain-worded questions asking about the existence
of causal effects between interested variables:
Dataset name: pocial_medial csv
Interested variable: number of social media users, user demographics
Here are some examples:
Example 1: given the following information:
Dataset name: employee_ liee__dataccs. Interested variable: all variables
The corresponding questions can be:
Is there method to discover every direct influence present in the employee_daa seeee_daaccsssss csv dataset?
Within the employee_dee lae_ddaaaccomm dataset, how many instances of factor directly causing another
can be observed?
How many causal connections can be identified in the employee_data, csv dataset?
Example 2: given the following information: Dataset name: gob__ata.co csv Interested variable: education (edu), job satisfaction coob_satssactton)
The corresponding questions can be:
Within the job_data csv dataset, is there causal links between education (edu) and job satisfaction "rob_satisfaction)
Does the job_data. csv data reveal any direct relationships between education (edu) and job
satisfaction jjob_satisfaction)
Are there discernible causal links between education (edu) and job satisfaction (job_satisfaction) in the job_data. csv dataset?
Example 3: given the following information:
Dataset name: weather_data.co csv Interested variable: temperature (temp), humidity (humid), rainfall (rain), local latitude (lat), local altitude (alt)
19

---

Published as a conference paper at COLM 2024
The corresponding questions can be:
What are causal links among temperature (temp), humidity (humid),
rainfall (rain), local latitude (lat), and local altitude (alt) in dataset weather weather_data.cee
Within the dataset peather_data..ooo dav.. what is the nature of the causal links among temperature (temp), humidity (humid), rainfall (rain), local latitude (lat), and local altitude (alt)?
the weather_data.cm csv dataset, what causal connections can be identified among temperature (temp), humidity (humid), rainfall (rain), local latitude (lat), and local alti (alt)?
Ensure that the questions employ mix of differen phrasing and diverse sentence structures.
Ensure that the questions do not mention correlation and association. Ensure that the questions place a strong emphasis on the effect existence or the total number.
Ensure that all variable names under interested variables field exist in all five quetsion.
Ensure that the provided interested variable names are integrated naturally into the questions without discarding or altering any part of them.
Specifically, we implement GPT prompts in this step by modulized template to improve components' reusability. Structurally speaking, the prompt starts with description of the question generation task and the corresponding causal task. It is then followed by information extracted from a JSON from the previous course as the contextual component for the generated question. Subsequently, randomly sampled demonstrations are included as the sample illustrations and output restrictions are itemized the final remark.
Using the example of CGL task in Table as an illustration, the output JSON has two task- specific keys conditioned on its inferred classification as a CGL task: "dataset" with the value "disaster -iskterrrrikkkeeee
and risk_iikeeeee www.ctird..c....ee.eeeeoossssss and "nodes", which includes building_code___ code_compliance
C.3 Details about step 2
Figure 4 describes the procedure of step 2 workflow, where we utilize the output from step to select an appropriate input function as well necessary input fields conduct causal analysis.
C.4 Details about step
C.4.1 Template outcome
The one-sentence summary of the function outcome uses natural language to express the same meaning. The benefit of using such templates to aid LLM in understanding this information, so it can better utilize the sentence (compared with just number) to answer the initial question.
For the CSL task where the total outcome is an adjacency matrix of variables of interest, we picked the top K causal relationships defined by the significance the independence test. The summary would contain two sentences, the first sentence is "There are [K] pairs of significant causal relationships." where K is the number of detected (equal or less than 2) causal links. In the second sentence, we list out these top causal paths by the prompt "The (X) would causally influence the [Y]" where X and Y are two variable names of interest.
As for the ATE and the HTE tasks, treatment effect of setting [A] as on the (Y) is /effect size)." and "The heterogeneous treatment effect of setting (A) as 1 on the (Y) is (effect size) for those having (X] = [value)".
expressed the learned effect size by "The average
20

---

Published as a conference paper at COLM 2024
Parsed Query
smoking risk.cvv
"causal problem": ("CEL", "ATE"), "dataset": ('smoking risk.csv "
145
139
"treatment" | ["smoking, status"] "
128
"response": ["lung_eancer" cancer"]
CSL- CGL
CEL- HTE
CEL-
CPL-
ATE
MA
OPO
(Spireed el. 2000)
IPW/ [Rosenbaum and Rubin, 1983)
(KGrzal at al,
Eedmattr (Imai al. 2010)
O-learning (Murphy, 2005)
2019)
(Shimizu
(Robins 1994)
al.
(Hong al, 2010)
Alccamin (Schulte 2014)
al. 2006)
2019)
iZheng
(Chickering, 2002)
(Ichelgen llya.
2012)
2018)
2018)
2012)
TMLE al. 200010
ANOCE-CVAE
COTR
2019)
Wieger, 2021)
2020)
2018)
ANOCE-CVAE
(Chicketing,
2020)
2023)
respose
method
result
saoking risk,
snoking
Tung
DR
0.65
Figure 4: Causal tool assignment and execution in the second step. The algorithm is executed automatically, using both the extracted information from Step 1 and the user- provided dataset as inputs, to get the estimated result
Here A, Y, and X denote the treatment, outcome, and condition variable names separately. The effect size the learned effect size for either ATE or HTE, and the value in HTE is the covariate condition.
The Mediation analysis (MA) task has three numerical outputs: a total effect indicating the total scale of the causal effect from treatment variable A to the outcome Y, mediation effect that goes through mediation variable M (A->M->Y), and a direct effect only from A->Y. Two separate sentence prompts, "The overall impact of the (A) on the (Y) is (total effect)." and "This comprises direct effect of (direct effect) from the (A) to the (Y), and an indirect effect of (mediation effect), mediated by the (M)."
Finally, for CPL we used the prompt "The best action of the (A) is [A] = (a recommended value)." because here we focus on the policy learning task and a recommended treatment given a condition is the function outcome.
One example prompt filled with variable names of each causal task is provided in the code block below.
CSL: "There are 3 pairs of significant causal relationships. would causally influence the diversity_index. The gender_index would causally influence the LGBTQ_inclusion The disability. inclusion_index would causally influence the LGBTQ_inclusion."
The gender_indes
ATE: "The average treatment effect of setting homeownership_rate on the af affordability_inde. is 0.45."
HTE: "The heterogeneous treatment effect of
setting professional. salaries as on the event_attendance is -1.41 for those having medal_tally = 0.79."
MA: "The overall impact of the age distributii the gender_ratio
21

---

Published as a conference paper at COLM 2024
is 16. 17. This comprises direct effect of 9.43 from the diedriiitiotiinn to the gender_ratioand an indirect effect of 6. 74, mediated by the migration_speed.
CPL: "The best action of the professional is voffessionaLattleeee.ssaaaa C."
C.4.2 Procedure
The procedure for step 3, which is similar to step 1, is illustrated in figure 5.
Introduction
1: Causal Question
Filled
2: Selected Function
XXXXX
2
XXXXXX
Function
Restriction
+
Cousal-interpee.
Bench
Annotator
Figure 5: Illustration building Causal-intrppret-Bncchh in the Third Step. Details about used prompts can be found in Appendix C.4. In template 3 fixed the introduction and the final restriction parts because the instruction about interpretation, and the re- maining contextual information is filled differently every time when calling the GPT APL Similar to the idea of section 3.1.1, the general introduction and the restriction on outputs are reused across different causal problems. We feed the original causal query, the causal task associated with the query, and the employed methodology with corresponding func- tion outputs to the prompt as the interpretation context.
C.4.3 Prompt
The instruction prompt for GPT and other LLMs generate interpretation is as follows, which lists out requirements stated in the evaluation criteria 3.3.1:
(A) is list of information that includes i) the original causal problem, ii) the class identification of the causal problem, iii) the used method, and iv) the outcomes.
Interpret the results using neutral language to paraphrase it more fluently and engagingly. The output summary is (I) Guidelines:
(A) in response to the original causal problem,
1: (I) must concentrate on interpreting the result provided in (A)
in response the problem.
2: (I) must include all the results, methods, and dataset name in (A).
3: (I) may include jargon from (A), but should not include any
other technical terms
not mentioned in (A).
4: The problem in (A) is causal problem, thus (I) should not
interpret the results as correlation or association.
5: (I) should use diversified sentence structure that is also
reader-friendly and concise, rather than listing information one by one.
6: Instead of including the problems, (I) should the original
22

---

Published as a conference paper at COLM 2024
problem to develop more informative interpretation of the result.
7: (I) has to avoid using strong qualifiers such as 'significant'.
8: (I) has to be (n_sentences) sentences or less long, with no repetition of contents.
9: (I) must not comment the results.
(A):
i) original causal problem: {query)
ii) class identification of the causal problem: {problem)
iii) used method: {method}
iv) outcomes: (function_out)
(I):
D Experiment configuration
D.1 Fine-tuning a large language model
After collecting custom dataset containing causal questions and interpreted intents in structured format, we fine-tune the LLaMA 2 pre-trained model checkpoints for learning underlying language patterns. We denote the input-output pairs as DD {9t for i 1,2,..,,N, NN, where both inputs and outputs = {,, Vi can be separated and padded into word tokens 9i 191, 4:,, 9iM] and ji = lia, ji,, -.. with length M and respectively. A language model checkpoint is denoted as G which takes the language sequence as input and returns the word probability distribution P(.) for each word for each position with total length of L. The possible input-output word token is limited in finite dictionary
V [ W,, with a cardinal of V. We optimize the causal language modeling loss I, cross-entropy loss on the token level, with S sample of augmented dataset S' C S as
follows:
((G,S') = 5
L (G(g)))))
S'
crossennrropy((())e..k
=
S'I.
ΣEΣ
- -Iju (i)og( = =w)),
S'L -=11
where the G(g:); fx denotes the output word probability distribution at the k-th position, and the cross-entropy loss for that position can be calculated by the logarithm of the probability of word token jik- Minimizing such loss function can encourage the probabilistic model G to generate similar output to ji when given an input of qi-
We implement the Low-Rank Adaptation (LoRA) (Hu et al., 2021) for parameter-efficient fine-tuning since the pre-trained checkpoint has more than 7 billion parameters and it is computationally inefficient. Instead of changing all parameters in the model, LoRA only tunes adapters' weight and fixes the entire pre-trained checkpoint. Empirical study shows relatively small number of ranks like 16 perform very well in our use case.
D.2 Data generation methodology
As is summarized in Section 2, there are causal decision-making tasks involved in our framework: CGL, ATE, HTE, MA and OPO. In numerical experiments, we need to automati- cally generate the training datasets as well as golden labels for these causal makinn tasks.
For CGL, the training data X E R/x" with sample size and variable number J is generated following the linear structural equation model X = B + e, where Bg is the adjacency matrix of a directed acyclic graph (DAG) that represents the causal graph and is the matrix of random errors for data. In particular, the true causal graph Bg is an upper-triangular
23

---

Published as a conference paper at COLM 2024
matrix with real number entries. The non-zero entries are randomly masked with edge density Pmask when generating each dataset, such that the edges in the true causal graph won't 't be extremely dense. Specifically, we set maskk 0.5 such that 50% edges are randomly masked out. The random noises in e are sampled from a Gaussian distribution. Following this data generation step, data X is input to M.M44aasal for causal graph learning and the resulting estimated causal graph will be evaluated against the true causal graph Bg.
For the tasks of ATE, HTE, OPO and MA, the training data generated based on the following linear models. For HTE and ATE, all features, S; E S, = 1,2, ... , are generated independently following normal distributions N (H.,,7)) The treatment A A is sampled from a Bernoulli variable with a probability of 0.5, which comes from a fixed behavior policy that randomly selects actions. The response Y y is then generated using Y A$1,0 + E + - AS, + Ey with random noise Ey ~ Of) For each dataset, the parameters of Hy, By, or P1,i, Pr,ii 62.j are randomly generated from real numbers. For the OPO task, the generating mechanisms for state variables Sj, action variable A, and reward Y the same HTE, while another linear model is utilized for generating state transitions between stages. Denote S = St2, .. ,t,}} (t.)) as the vector of state variables in stage f, the
state variables in the next stage are then generated using S 1 B where B E / represents the transition kernel under action of 0, 1, and all terms in it are randomly generated from real numbers. For MA, the response variable is generated from linear model of exposure variable and mediator variable M, such that
A$1 + MB2 + Ey with Ey NiH,, oT)). In particular, M Apm + Em with cm ~ (H om) In each dataset, the parameters B1, P2, My, Cy Hm, Om are sampled from real numbers. In particular, when the mediation effect is negligible, fm is close to O, otherwise f. significantly diverged from O.
D.3 Preliminary experiment
The non-cherry-picked performance of the Llama-2 (7B) using the same prompt pt is as follows. We can find that Llama-2 as a foundation model cannot follow the prompt instructions all. It either repeats the instructions in the response or includes non-related information clearly from other sources that are not related.
Question 1 from the user:
Is there a notable difference in the legislation passed when there's s higher voter turnout, according the political_engagement. file?
> Answer from Llama-2-7b-hf:
The average treatment effect of setting voter_ as on the regislation_passeeee
is 1.2. This means that when the voter turnout rate is 100%, the average number of bills passed is 1.2 times more than when the voter turnout rate is 0.
### Problem
Function Input: (B) is list of information that includes i) the original causal problem, ii) the class identification of the causal problem, iii) the used method, and iv) the outcomes. Interpret the results in (B) in response to the original causal problem, using neutral language to paraphrase it more fluently and engagingly. The output summary is (II). Guidelines:
1: (II) must concentrate on interpreting the result provided in (B)
in response to the problem.
2
> Question 2 from the user:
Can an increase in retail revenue lead to a significant change in
csv the store count, shown in the retail_sales. csv data?
24

---

Published as a conference paper at COLM 2024
> Answer from Llama-2-7b-hf: Increasing retail revenue by $1000000 will lead to decrease of 5. stores average.


DA4 GPT setup
We used the following prompt in the ChatGPT Custom Instruction section. Note that this provides many hints to connect the questions with the correct function, which is not scalable and can complicate the issue. Our golden dataset does not need such clues.
like to perform causal analysis and decision-making on datasets. Do not perform correlation analysis or simple linear regression but select one method below:
PC ahgorithm for causal graph learning,
2. doubly robust estimator for average treatment effect,
3. s-learner for heterogenous treatment effect when the question mentioned specific value of some variables,
4. causal mediation analysis,
5. Q-Learning for policy optimization (maximize minimize a variable) when asked for the best option with a specific value mentioned.
For ablation analysis 1 (Table 3), we utilized the function calling feature with self-written schema (an example of ATE schema is attached). As for ablation analysis 2 (Table 4), the same prompt as MLM4Calsal is fed to the chat completion API for interpretation generation.
"type": "function",
"function":
"name": gauusal_grph__earree
"description": "Return the causal structure from dataset with variables of interest", "parameters": (
"type": "object", "properties": {
"dataset": { "type": "string", "description": "The name of the input dataset",
"nodes": {
"type": "string",
description". "name of the interested variable separated by commas, if no variable name is specified then put all_variables as the placeholder", },
"required"; ["dataset", "nodes"],
,.
}
},
25


Reviews:
[{"review_id": "zrv82g7Cyk", "reviewer": "Reviewer_qRr6", "summary": "The paper presents LLM4Causal, an end-to-end, user-friendly large language model designed for causal decision-making tasks. The model addresses the limitations of general LLMs in handling causal tasks by fine-tuning them with two specialized datasets: Causal-Retrieval-Bench for identifying causal problems and extracting variables and Causal-Interpret-Bench for interpreting causal results. LLM4Causal operates through three major steps: interpreting user requests, assigning and executing causal tools, and providing easy-to-understand interpretations of the outputs. The model's performance was evaluated across three main causal decision-making categories: causal effect estimation, causal structure discovery, and causal policy learning. In total, there are 5 tasks in these three categories. The results demonstrate superior performance compared to baselines like ChatGPT and GPT-4. This work highlights the potential of fine-tuning large language models to enhance their capabilities in specialized domains like causal inference, making them accessible and effective for general users.", "questions": "", "limitations": "", "rating": 7, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thanks for the insightful comments and careful reading. We will fix the typos in the final version. Our point-by-point responses to your comments are below:\n\n**Model Choices**. We have conducted additional experiments using T5-base(220M) and T5-large model(770M) for step 1, under the same setting as we used in the paper. The table below summarizes the accuracy of task classification and entity extraction, showing that smaller models cannot acquire the necessary abilities for our use case. \n\n||Causal Task|Dataset|Nodes|Treatment|Response|Mediator|Condition|\n|---|---|---|---|---|---|---|---|\n|t5-base|0.00|0.07|0.13|0.10|0.12|0.03|0.15|\n|t5-large|0.44|0.45|0.47|0.44|0.47|0.07|0.73|\n|LLM4Causal-Mixed|0.98|1.00|1.00|0.96|0.97|1.00|1.00|\n\nAs shown in empirical results, smaller models are inadequate for our use case, due to larger model’s emergent abilities that may greatly improve the performance [1]. Meanwhile, using a 7B model with fine-tuning is a common practice based on our reference papers [Schick et al., 2023; Qin et al., 2023b; Zhang, 2023].\n\n**Overfitting**. We want to emphasize that the testing data used in our experiments have varied sentence structures and cover different multi-discipline topics when comparing with the datasets prepared for fine-tuning, as explicitly stated in Section 4. We carefully designed the data generation process (detailed in Section 3.1.1) and implemented prompting techniques such as random demonstration sampling to make sentences further differ from each other. Finally, we want to point out that the scale of our dataset is at the same magnitude as [Qin et al., 2023b and Zhang, 2023] and there are no information leaks between training and inference procedures.\n\n**Causality between textual events**. LLMs’ causal ability from text events, similar to prompting LLMs on causal link existence, focuses on common sense induction [Rashkin et al., 2018; Wang et al., 2023]. Such internal knowledge is inadequate if the pattern does not match newly arrived data, which motivates us to enhance LLMs' causal ability via external tools. Merging internal (from common sense) and external (from data or specific conditions) causal analysis results would be a valuable future direction. We will include more discussion about the related references in the final version.\n\n[1] Wei, J., Tay, Y., Bommasani, R., Raffel, C., Zoph, B., Borgeaud, S., ... & Fedus, W. (2022). Emergent abilities of large language models. arXiv preprint arXiv:2206.07682.", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "1. This work presents a very comprehensive framework for causal inference. Here, the authors fine-tuned LLM to interpret uses' causal query, utilize external tools to calculate causal relations, and interpret the logic behind causal relations.\n2. The framework covers five tasks and conducts a lot of experiments, showing its generalization ability on various causal tasks.\n3. The problem studied in this paper is significant, which is how to use LLM to make causal inference more accessible to normal people.", "reasons_to_reject": "1. There are some typos, like in Section 3.2, \"See Figure 5 in Appendix ??\"\n2. Since the paper just fine-tunes Llama2 on those causal tasks instead of instruction tuning. Can we just fine-tune a small model, like T5, BART, or GPT2, to do this task?\n3. Two fine-tuning datasets collected in this paper are quite small. The Causal-Retrieval-Bench only contains 1,500 pairs. Causal-Interpret-Bench only contains 400 examples. It seems that there will a very sever over-fitting problem for Llama2 (7B).\n4. Is this framework possible to be extended to causality between textual events, like the following references?\n5. There are also some missing reference: \n1) Rashkin, Hannah, et al. \"Event2Mind: Commonsense Inference on Events, Intents, and Reactions.\" Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). 2018.\n2) Ning, Qiang, et al. \"Joint Reasoning for Temporal and Causal Relations.\" Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). 2018.\n3) Wang, Zhaowei, et al. \"COLA: Contextualized Commonsense Causal Reasoning from the Causal Inference Perspective.\" Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). 2023.", "questions_to_authors": "No", "extra_scores": {}}, {"review_id": "PDxteeWRo5", "reviewer": "Reviewer_y23N", "summary": "This paper presents an end-to-end framework for causal decision-making tasks, which addresses the weakness of the current LLM applications on causal tasks.\n\nA three-step data generation pipeline is proposed, it first interprets user requests into a JSON data for causal task , and then automatically selects the causal tool to execute the corresponding algorithm, finally it generates a natural language output.\n\nTwo  benchmark datasets, Causal- Retrieval-Bench for causal function calling and Causal-Interpret-Bench for causal interpretation are constructed.", "questions": "", "limitations": "", "rating": 7, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We sincerely appreciate your careful reading and insightful comments, and we are honored to hear that you believe the proposed method is effective. The following are our point-by-point responses to your comments.\n\n**Individual task handling**. Thank you for the constructive suggestion. While it is possible to handle each task individually by fine-tuning separate LLM frameworks, our approach is driven by the needs of a general audience who may lack a background in causal analysis. Determining the specific causal task they aim to perform is a significant challenge for these users, and thus a core component of our proposed framework is using a fine-tuned LLM to understand the user's intention and classify their query into a specific causal task. This classification step then helps identify the appropriate causal functions to be used. Therefore, we believe that fine-tuning for each causal task individually is not suitable. We will include additional discussion in the final version to highlight the importance and motivation for integrating various causal tasks.\n\n**Manual consumption**. Thank you for another valuable comment. First of all, it is important to note that users can directly use our fine-tuned LLM4Causal for causal analysis without any additional manual effort. Also, for researchers looking to fine-tune other base LLMs, our two well-prepared instruction-tuning datasets can be used directly to enhance any other user-selected base LLM's capability in causal task classification and interpretation, without the need for additional human annotation. Moreover, we agree that manual efforts to prepare a golden dataset for fine-tuning are unavoidable for ensuring dataset quality, as is common in existing literature (e.g., [1,2]). To minimize the manual efforts needed for preparing the JSON data, we proposed an output-first strategy (detailed in Section 3.1.1). This strategy effectively ensures the diversity and accuracy of the generated JSON and significantly reduces the amount of human evaluation required, limiting it to evaluating the corresponding GPT-4-generated causal queries for the Causal-Retrieval-Bench dataset. \n\n[1] Zhang, J. (2023). Graph-toolformer: To empower llms with graph reasoning ability via prompt augmented by chatgpt. arXiv preprint arXiv:2304.11116.\n\n[2] Qin, Y., Liang, S., Ye, Y., Zhu, K., Yan, L., Lu, Y., ... & Sun, M. (2023). Toolllm: Facilitating large language models to master 16000+ real-world apis. arXiv preprint arXiv:2307.16789.", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "The article proposes a scheme to transfer diversity causal tasks into a unified structured JSON data. This approach can effectively integrates tasks and facilitating the use of LLM. \nThe experimental results shows that the method has significant advantages.\nThe paper provides detailed attachments to demonstrate the effectiveness of the work.", "reasons_to_reject": "The paper proposes the use of structured JSON to represent a variety of tasks and demonstrates that this integrated approach outperforms end2end GPT-4 method. However, the paper does not validate whether this method is superior to handling each task individually, particularly in cases of individual fine-tuning them. Moreover, controlling the quality of JSON data needs additional manual consumption, which diminishes the practical significance of this integrated approach.", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "2HgmVglMFF", "reviewer": "Reviewer_UqM4", "summary": "This work explores the capability of large language models(LLMs) to perform causal tasks. The authors started with the motivation that existing LLMs do not handle specific structured data and knowledge well. The objective of this work is to build LLM4Causal by fine-tuning existing open-source LLMs capable of identifying causal tasks executing the corresponding functions and outputting the results. To fine-tune the training, they constructed two supervised datasets with GPT-4 prompting.", "questions": "", "limitations": "", "rating": 4, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thanks for the insightful comments, please let us know if we misunderstood any of them.\n\n**LLM to use tools**. Our decision not to use LLMs’ inherent abilities for causal decision-making is due to their reliance on knowledge acquired during pre-training. Without such knowledge, LLMs' numerical analysis capabilities on causal tasks are rather limited [1].  When data for causal inference conflicts with LLMs’ stored knowledge, this intrinsic ability can be inadequate. Moreover, the integration of external tools into LLM frameworks is an actively expanding research area, which motivates our approach. The complexities and challenges of this integration, discussed below, highlight the novelty of our work.\n\n**Experiment design**. First, identifying the correct type of causal question in STEP1 is challenging for both LLMs and humans. Our model excels in STEP1 due to a clearly defined JSON format for causal problems and fine-tuning on our proposed Causal-Retrieval-Bench data. Similarly, interpreting external tools' results in STEP3 is also non-trivial, as even advanced LLMs like GPT-4 can confuse causation with correlation. The satisfactory results in Table 4 are due to our carefully designed interpretation evaluation metrics in Section 4.2 and the Causal-Interpret-Bench data. Thus, our model's achievements in Tables 2, 3, and 4 are non-trivial and not easily predictable.\n\n**Parameter size**. Indeed, larger LLMs may offer improved capabilities. It is noted that our framework and proposed benchmarks are adaptable to LLMs of any size, not just the Llama-2 7B used in our studies. We selected the 7B model as it was a common choice of prior works and already provided satisfactory accuracy while minimizing computational resources.\n\n**Select causal tools**. In the experiments, a default causal analysis tool is assigned in step 2 for each causal task to maintain simplicity. While choosing the optimal causal analysis tool can be beneficial, it is beyond our scope and left for future research. \n\n**GPT4-turbo usage**. For ablation analysis 1 (Table 3), we utilized the function calling feature with self-written schemas (will be provided in the appendix). As for ablation analysis 2 (Table 4), the same prompt as LLM4Causal is fed to the chat completion API for interpretation generation.\n\n[1] Cai, H., Liu, S., & Song, R. (2023). Is Knowledge All Large Language Models Needed for Causal Reasoning?. arXiv preprint arXiv:2401.00139.", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "This work proposes a complete pipeline for boosting the performance of LLMs on specific tasks. However, constructing specific datasets via GPT-4 prompts and then fine-tuning open-source LLMs has been used in many previous works.", "reasons_to_reject": "1. The work did not really improve LLMs' abilities in causal decision-making and reasoning, but rather taught LLMs to use causal analysis tools. \n2. The experiment was well-designed and predictable. \n3. Larger language models with larger scale parameters generally have stronger reasoning capabilities. It is suggested that further exploration and experimentation be conducted.\n4. Provide implications in calling different causal tools and algorithms.", "questions_to_authors": "The appendix provides insufficient details on how to use the GP4-turbo.", "extra_scores": {}}, {"review_id": "SCWcf9sCLt", "reviewer": "Reviewer_vBxV", "summary": "The authors propose a fully end-to-end pipeline generating responses to user querying an input dataset. The query consists of a causal question which need statistical causal analysis. The goal is for the proposed system to \n\n1) understands the natural-language expressed query to format it in the correct way so that \n\n2) the appropriate inferred tool is run through a predefined list of tools available online whose output is \n\n3) formatted itself in a response phrased in natural language and answering the initial query\n\nThe proposed approach, LLM4Causal, describes how the authors fine-tuned a modern pre-trained LLM on two datasets with the aim of improving the LLM output with regard to subtasks 1) and 3). The semi-automated methods to create these datasets are presented in details.\n\nThe authors propose automatic and manual evaluation metrics and compare their system to the function calling feature of a chat-GPT (GPT4-turbo) LLM. \n\nTheir experimental results demonstrate the superiority of their approach over the benchmark method.", "questions": "", "limitations": "", "rating": 8, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We sincerely appreciate your careful reading and insightful questions, and we are honored to hear that you believe the proposed method is novel and useful. The following are our point-by-point responses.\n\n**Tool selection**. Since the major focus of this work is the LLM’s causal reasoning ability, we only set a default method for each identified task for the end-to-end evaluation experiment, e.g., we assign the doubly robust method for all the identified ATE tasks in experiment 4.1. The main purpose of the experiment is to check whether an LLM has been equipped with causal tool calling and interpretation abilities.\n\nHowever, we agree that method selection is of great importance for practical use and are currently developing a systematic framework to automatically select the method for each query. Some of the potential future approaches could be building a machine-learning-based classification model for method selection [1,2,3], analyzing data structures to check model assumptions, and interacting with users to allow them to specify their preferred methods. All these potential ways have their own benefits and require time and effort to construct models and compare performance. Thus, we will leave the model selection automation as future research directions and keep the current work focused more on the LLM part. \n\n**Typos and overlapping captions**. We will fix them in the final version. Thank you for pointing this out.\n\n[1] Zhang, J., Jennings, J., Zhang, C., & Ma, C. (2023). Towards causal foundation model: on duality between causal inference and attention. arXiv preprint arXiv:2310.00809.\n\n[2] Gupta, S., Zhang, C., & Hilmkil, A. (2023). Learned Causal Method Prediction. arXiv preprint arXiv:2311.03989.\n\n[3] Lorch, L., Sussex, S., Rothfuss, J., Krause, A., & Schölkopf, B. (2022). Amortized inference for causal structure learning. Advances in Neural Information Processing Systems, 35, 13104-13118.", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "The method is clearly described, experiments are sound. The task addressed is an effort toward leveraging natural language understanding and generation capabilities of LLM for actual assistant responding accurately to queries in the domain of causal analysis of quantitative variables. \n\nThe work appears to be novel, useful for future steps in this direction, well designed and correctly evaluated.", "reasons_to_reject": "Some details are omitted or not clearly explained, such as how exactly are the tools selected: does LLM4Causal’s LLM handle all the logic or do you implement standard logic once the causality-related task is identified by LLM4Causal? \n\nIn other words, once LLM4Causal predicts that the task is CEL-ATE, how is DR selected over DML, TMLE, or IPW?", "questions_to_authors": "Minor comments: \n- Table 1: overlapping caption\n- 3.1: adopt → adapt?\n- 3.1: publicity → publically?\n- 3.2: Appendix ??", "extra_scores": {}}]

Author rebuttal:

Meta-review: This paper makes a useful contribution by using LLMs as an interface to using tools for causal decision making. The idea is neat and well-executed. I agree that the paper should clarify that the LLMs are not used for causal decision making, but to interface to appropriate tools, as the title at the moment is misleading (reviewer UqM4), but I still think the paper has merit.

[comment from the PCs] Please follow the AC recommendation to revise the title.
Decision: Accept