Hypothesizing Missing Causal Variables with LLMs
Ivaxi Sheth Sahar Abdelnabi Mario Fritz




A Software Visualization Approach for 

Multiple Visual Output Devices

    Malte Hansen
Department of Computer Science 

Kiel University

Kiel, Germany 

malte.hansen@email.uni-kiel.de
Heiko Bielfeldt
Department of Computer Science 

Kiel University

Kiel, Germany 

heikobielfeldt@gmail.com
Armin Bernstetter

GEOMAR Helmholtz Centre for Ocean Research Kiel

Kiel, Germany 

abernstetter@geomar.de
Tom Kwasnitschka

GEOMAR Helmholtz Centre for Ocean Research Kiel

Kiel, Germany 

tkwasnitschka@geomar.de
Wilhelm Hasselbring
Department of Computer Science 

Kiel University

Kiel, Germany 

        hasselbring@email.uni-kiel.de

    September 9, 2024
===============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================




§ ABSTRACT 
Scientific discovery is a catalyst for human intellectual advances, driven by the cycle of hypothesis generation, experimental design, data evaluation, and iterative assumption refinement. This process, while crucial, is expensive and heavily dependent on the domain knowledge of scientists to generate hypotheses and navigate the scientific cycle. Central to this is causality, the ability to establish the relationship between the cause and the effect. Motivated by the scientific discovery process, in this work, we formulate a novel task where the input is a partial causal graph with missing variables, and the output is a hypothesis about the missing variables to complete the partial graph. We design a benchmark with varying difficulty levels and knowledge assumptions about the causal graph. With the growing interest in using Large Language Models (LLMs) to assist in scientific discovery, we benchmark open-source and closed models on our testbed. We show the strong ability of LLMs to hypothesize the mediation variables between a cause and its effect. In contrast, they underperform in hypothesizing the cause and effect variables themselves. We also observe surprising results where some of the open-source models outperform the closed GPT-4 model[<https://github.com/ivaxi0s/hypothesizing-causal-variable-llm>]. 




§ INTRODUCTION


Scientific discovery has been key to humankind's advances. It is a dynamic process revolving around inquiry and constant refinements driven by new observations. Scientists adhere to a structured process that involves formulating a hypothesis and then collecting pertinent data <cit.>. They then draw inferences from experiments and the collected data, modify the hypothesis, formulate sub-questions, and repeat the process until the research question is answered <cit.>. 

Causality empowers scientists to assess the hypotheses and interpret the collected data beyond mere correlations and associations. Tools such as Randomised Control Trials (RCTs) <cit.> allow for establishing causal relationships between variables. 
Naturally, the process of causal discovery heavily relies on human experts to guide the hypothesis formation and experimental design <cit.>. Expert domain knowledge is crucial to narrow the search space of hypotheses, especially when it is expensive to collect data or when systematic exploration is infeasible. However, a possible impediment is that domain knowledge can be difficult to formulate and collect <cit.>.

With the recent advancement of Large Language Models (LLMs) <cit.>, there has been a growing interest in using them for scientific discovery <cit.>. Beyond natural language processing, LLMs have shown exceptional performance in a wide array of tasks, such as reasoning problems <cit.>.  

Their potential is now studied in domains such as 
natural sciences <cit.>. Despite these promising results, LLMs have many well-known limitations, such as confabulation or hallucination, which would require human supervision when adopting them <cit.>. Previous work also proposed using LLMs as creative solution proposers with task-specific means of verifying said solutions <cit.>.

r0.45
    

    
    < g r a p h i c s >

    Scientific discovery is an iterative process to generate new hypotheses from initial assumptions relying on human expertise. We leverage LLMs as proxy domain experts to propose new hypotheses in causal DAGs.
    
    



Given the importance of causality in the scientific discovery process, we focus on how LLMs can assist with causal reasoning. LLMs have achieved state-of-the-art results for causal tasks such as determining pairwise causal relationships by considering variable names <cit.>, combined with causal discovery algorithms <cit.> for refinement. 
This step, however, comes after hypothesizing the variables of interest (which require domain knowledge), forming experiments, and potentially costly data collection.



In our work, we extend the application of LLMs in causal reasoning to assist in steps essential before causal discovery. We harness LLMs to identify and hypothesize missing variables in a partially known causal graph, simulating a realistic scientific discovery process of incremental hypotheses formation and testing. Our approach is complementary to existing causal methods and taps into LLMs' capabilities induced by their large-scale training to propose memorized or inferred variables based on their general and even domain knowledge. We do not require LLMs to determine pairwise causal relations or perform numerical calculations, sidestepping their limitations in these tasks <cit.>.

In summary, our main contributions are: 

    
  * We introduce a new task of LLM-assisted causal variable identification and hypothesizing.
    
  * We propose a benchmark for hypothesizing missing variables based on a diverse set of existing causal graph datasets.
    
  * We design experimental tests with different difficulty levels and knowledge assumptions, such as open-world and closed-world settings, the number of missing variables, etc and gather insights on LLM's capabilities and weaknesses.
    
  * We benchmark several SoTA models and analyze their performance w.r.t. variable types. 




§ RELATED WORK


Our work is based on the framework of causality as proposed by <cit.>. The intersection of language and causality is explored in <cit.> to extract causal relationships from a large corpus of text. With the advancements in LLMs and their ability to process large contexts, there has been an interest in using them for causal reasoning <cit.>. Some works have focused on commonsense causality <cit.> and temporal causal reasoning <cit.>. More recently  <cit.> introduced a method to discover causal structures by prompting LLMs with variable names. <cit.> extended this work by introducing ancestral constraints to refine the causal structures derived from LLMs.  <cit.> combined data-based deep structural causal models, such as <cit.>, with LLMs generated causal structure. Beyond using the ingested information for causal tasks, <cit.> focused on pure causal inference using LLMs. Recent work attempted to train causal transformers <cit.>, however, in this work we aimed to test the hypothesizing abilities of generalist LLMs. In contrast to previous work, we focus on the novel task of identifying and hypothesizing missing variables, a task that comes before data collection and evaluation, with LLMs as assistants. 
Additionally, existing works tested inductive hypothesis generation with  LLMs <cit.>, although, we look at causal hypothesis generation.






§ PRELIMINARIES: CAUSAL GRAPH



A causal relationship can be modeled via a Directed Acyclic Graph (DAG). A causal DAG represents relationships between a set of N variables defined by 𝐕 = { V_1,...,V_N }. The variables are encoded in a graph 𝒢 = (𝐕, 𝐄) where 𝐄 is a set of directed edges between the nodes ∈𝐕 such that no cycle is formed. Mathematically it can be expressed as:


 
    𝒢 = (𝐕, 𝐄),  𝐄 = {e_i,j| v_i, v_j ∈𝐕 , i ≠ j } and  v_i → v_j

Each edge e_i,j∈𝐄 denotes causal relationship between v_i and v_j, v_i  v_j, emphasizing the influence from v_i to v_j. Beyond visualization, causal DAGs allow for the mathematical characterization of different node types for a causal model to understand the influences and dependencies.

We define 𝐝(v) as the degree of a node v, representing the total number of edges connected to v. 
𝐝_𝐢𝐧(v) is the in-degree, representing the number of incoming edges to v. 
𝐝_𝐨𝐮𝐭(v) is the out-degree, representing the number of outgoing edges from v.

Sources are variables v_s with no incoming edges. Mathematically sources are d_in(v_s) = 0 where d_in is the in-degree of the graph. 

Sinks are variables v_k with no outgoing edges. Sinks are d_out(v_k) = 0 where d_out is the out-degree of the graph. 

Treatment are variables v_t, characterized as nodes d_in(v_t) = 0 that are being intervened upon. 

Outcome are variables v_y, characterized as the nodes d_out(v_y) = 0 that are observed for interventions from the treatments. 

Mediator are variables v_m that have both incoming and outgoing edges (d_in(v_m) > 0 and d_out(v_m) > 0), acting as intermediaries in the causal pathways between treatment and outcome. Hence v_k is a mediator if it is both a child of v_i and a parent of v_j.

Confounder are variables v_k that influence both treatment and outcome, exhibiting edges directed towards the treatment and outcome nodes (d_out(v_k) ≥ 2. Hence v_k is a confounder if it is a parent of both v_i and v_j.

Collider are variables v_l that have two edges meeting, and have an in-degree greater than one d_in(v_l) > 1. Hence v_k is a collider if it is a child of both v_i and v_j. 






  
Mediation Analysis.
Mediation analysis quantifies the treatment's effect on the outcome through a mediator variable. This effect is decomposed into the Natural Direct Effect (NDE) and the Natural Indirect Effect (NIE). The NDE represents the treatment's effect on the outcome without mediation, while the NIE represents the effect mediated by the mediator variable. Futher explanation can be found in Appendix <ref>.

    NDE   = 𝔼[v_t=1,v_m=0 - v_t=0,v_m=0] 
    NIE   = 𝔼[v_t=0,v_m=1 - v_t=0,v_m=0]





§ LLMS FOR IDENTIFYING AND HYPOTHESIZING CAUSAL VARIABLES


In this work, we aim to leverage language models to identify and hypothesize variables in a causal DAG. Motivated by the process of hypothesizing a causal graph from a partially known structure <cit.>, this paper proceeds under the assumption that some elements of the graph are already known. The aim is to find additional variables that can be incorporated into the existing causal structure to enhance the underlying causal mechanism. 

We assume the presence of a partially known causal DAG, defined as 𝒢^* = (V^*, 𝐄), where V^* ⊆𝐕. The objective is to identify the set of missing variables V^* = 𝐕∖V_missing thereby expanding 𝒢^* to 𝒢. This implies that
all causal relationships (edges) among variables in V^* are known and correctly represented in 𝒢^*; i.e., E is fully specified. 

Our methodology, structured around progressively challenging scenarios, explores the ability of LLMs to identify and hypothesize causal variables. This starts from a restrictive and controlled exploration to an open-ended one. Initially, we restrict the exploration by providing the language models with a partially known causal DAG and a set of multiple choices for the missing variables. The complexity of the task is gradually increased by removing more than one node from the graph. Finally, we move to an open-ended scenario where the ground truth is not known. In this setting, LLM is required to hypothesize the missing variables of the causal DAG without any explicit hints. 

We evaluate the causal reasoning capability of LLMs through prompting. Given LLMs' limitation to textual input, we represent the graph 𝒢^* using a prompt template P_LLM(·) which enables LLMs to parse the causal relationships embedded within the DAG.





 §.§ Task 1: Out-of-Context Controlled Variable Identification





This task (depicted in <ref>) evaluates LLMs' ability to identify missing variables in a causal graph from a list of multiple choices, thereby reconstructing the original graph.
The partial DAG 𝒢^* is created by removing one variable from the original DAG 𝒢. Let us denote the removed node as v_x.  
Along with the partial graphs, we operate in the multiple-choice question answering (MCQA) paradigm. 
The role of the LLM is to select a variable from the multiple choices, MCQ_v_x, that can be used to complete the graph.
  
The multiple choices include the missing variable v_x and out-of-context distractors. The out-of-context distractors are carefully chosen to be irrelevant to the given DAG and its context. Let v_x^* represent the variable selected by the LLM to complete 𝒢^*.
 
    v_x^* = P_LLM(𝒢^*, MCQ_v_x)    ∀  v_x ∈V



 §.§ Task 2: In-Context Controlled Variable Identification

In practical applications, such as healthcare <cit.> and finance <cit.>, dealing with missing data and unobserved latent variables is a major challenge <cit.>. Therefore, identifying the missing variables and their underlying causal mechanism is an important task. To simulate this, a more challenging task is introduced (see <ref>). Here, instead of removing one node from the ground truth DAG 𝒢, two nodes, v_x_1 and v_x_2, are now removed to create the partial graph, 𝒢^*.

    𝒢^* = 𝒢∖{v_x_1, v_x_2}  for   v_x_1, v_x_2∈𝐕


We use the MCQA paradigm to provide multiple choices that include the missing variables v_x_1 and v_x_2. The task for the LLM here is to select the correct variable v_x_1 only, given an in-context choice v_x_2 and out-of-context choices. 
We introduce the non-parental constrain for v_x_1 and v_x_2. This prevents the removal of both a parent node and its immediate child node in 𝒢^*.

    v_x_1^*   = P_LLM(𝒢^*, MCQ_v_x_1, v_x_2)     ∀  v_x_1, v_x_2∈𝐕  and  v_x_1↛v_x_2,    v_x_2↛v_x_1




 §.§ Task 3: Hypothesizing in Open World

So far, we have described the testbeds for variable identification in a partial DAG given the controlled world knowledge in the form of distractors. This assumption allows for the evaluation of the language model's ability to select the correct answer from a set of options. However, in the open-world setting, we increase the complexity to provide no choices, as shown in <ref>. Hence the task is to predict the missing node v_x given the partial graph 𝒢^* to complete the ground truth graph 𝒢. Here, the model returns a set of potential hypotheses, {v_x,1^*,..., v_x,k^*} where k is the number of hypotheses.
   
    {v_x,1^*, v_x,2^*, ..., v_x,k^*} =P_LLM(𝒢^*)  ∀  v_x∈𝐕




 §.§ Task 4: Iteratively Hypothesizing in Open World

  
In addition to the search space relaxation, we further relax the number of missing variables. The partial DAG here, is obtained for one or more missing node variables. 𝒢^* = 𝒢∖{v_x_1... v_x_M}. The fine-grained results from the open-world setting reveal that language models exhibit a particularly strong performance in identifying mediator variables. 


Thus, the LLM is used here to iteratively hypothesize mediator variables in a causal DAG given a treatment and an effect. The task (shown in <ref>) is set up as follows: given a partial graph 𝒢^*, which includes observed treatment and outcome variables, we aim to hypothesize a set of mediators, denoted as M = {v_m_1, v_m_2, ..., v_m_H}, that mediates the treatment v_t to the outcome v_y. Here, H represents the number of direct, and indirect mediators. A pair of treatments and outcomes are considered iteratively across the causal DAG. In the first iteration, the LLM generates a hypothesis for the mediator v_m_1. The hypothesized mediator, v_m_1 is then added to the graph, updating 𝒢^* →𝒢^* ∪{v_m_1}. The partial graph that now also includes v_m_1^* can be used to identify the second mediator v_m_2^* and so on. Therefore, in each subsequent iteration i, the LLM is tasked to generate a hypothesis for the next missing mediator v_m_i given the updated graph 𝒢^* ∪{v_m_1^*, ..., v_m_i-1^*}. 

    v_m_i^* = P_LLM(𝒢^* ∪{v_m_1^*, ..., v_m_i-1^*})  for  i = 1, ..., H

The sequence of mediators M = {v_m_1, v_m_2, ..., v_m_H} is chosen at random.
But to formally study the influence of the order of the hypothesized mediator, we borrow concepts from the mediation analysis literature, specifically the Natural Direct Effect (NDE) and the Natural Indirect Effect (NIE). The NDE measures the effect of the treatment on the outcome that is not mediated by a particular mediator, while the NIE measures the effect of the treatment that is mediated by the mediator. We introduce a metric called Mediation Influence Score (MIS) that quantifies the influence of each mediator between a treatment and an effect. MIS is the ratio of the NIE to the NDE. This metric quantifies the relative importance of the indirect effect (through the mediator) compared to the direct effect. MIS  (v_m_i) = NIE(v_m_i)/NDE(v_m_i)  for   i = 1, ..., H.
The mediators are then generated according to these MIS scores, prioritizing mediators with higher scores.



§ EVALUATION AND RESULTS




 §.§ Experimental setup

We evaluate a variety of causal datasets spanning diverse domains. We use the semi-synthetic datasets from BNLearn repository - Cancer:𝒢(5,4) <cit.>, Survey:𝒢(6,6) <cit.>, Asia:𝒢(8,8) <cit.>, Child:𝒢(20,25) <cit.>, Insurance:𝒢(27,52) <cit.>, and Alarm:𝒢(37,46) <cit.>. We also evaluate our approach on a realistic Alzheimer's Disease dataset:𝒢(9,16)  <cit.>, developed by five domain experts. 

We evaluate our setups across different open-source and closed models. The models we use are GPT-3.5 <cit.>, GPT-4 <cit.>, LLama2-chat-7b <cit.>, Mistral-7B-Instruct-v0.2 <cit.>, Mixtral-7B-Instruct-v0.1 <cit.>, Zephyr-7b-Beta <cit.> and Neural-chat-7b-v3-1 <cit.>. 






 §.§ Task 1: Out-of-Context Controlled Variable Identification
 


Our first experiment is designed to assess the most straightforward setting as a baseline to understand the fundamental abilities of language models in handling causal reasoning tasks given a partial causal graph. 

Here, the input to the LLM is the ground truth variable name in addition to out-of-context multiple choices for the missing variable v_x and the partial DAG 𝒢^*. We then calculate the models' accuracy in correctly predicting v_x. 


 
    Accuracy = 1/N∑_i=1^N1(v_x^* = v_x^i)



  



  
Results.
In Figure <ref>, we report the accuracy of different LLMs in identifying the missing variable. 

GPT-4, followed by Mixtral, consistently performs well, achieving perfect accuracy on most of the datasets. GPT-3.5 also shows overall strong performance, apart from the Insurance and Alarm datasets. The other models, including Mistral, Llama-70, and Zephyr, demonstrate varying degrees of success. Insurance is the most challenging dataset, which could potentially be due to the high number of edges present in the DAG. It is noteworthy that all models significantly outperform the random baseline. 
However, we may conjecture that the high performance could be attributed to the simplicity of the task. The models might be primarily inferring from the context of the dataset domain, rather than performing actual causal reasoning among multiple plausible choices. To further investigate this, we introduce an in-domain choice in the multiple choices in the next experiment. This can assess LLMs' ability to choose a causal variable for a partial DAG beyond the highly evident correlations. 



 §.§ Task 2: In-Context Controlled Variable Identification



We introduce a more complex setting to further challenge the causal reasoning capabilities of the language models for causal identification. Recall that the partial graph consists of two missing nodes here. In addition to the out-of-context choices and the ground truth variable, the multiple choices also include the other missing node from the partial graph as an in-context distractor. Here the language model should essentially reason about indirect causal relationships. 

To evaluate models' performance, we present two metrics: accuracy and false node accuracy. The false node accuracy, measuring the confusion of LLMs in picking the in-context variable instead of the ground truth choice, is defined as:



    False Node Accuracy (FNA)↓  = 1/N∑_i=1^N1(v_x_1^* = v_x_2)





  
Results.In Figure <ref>, we plot both Accuracy and False Node Accuracy across different datasets. Ideally, accuracy should be 1.0, and the FNA should be 0.0. Since there were 5 multiple choices, the random chance is 0.2. We observe that most of the models for larger datasets achieve much higher accuracy than random chance. GPT-3.5 and GPT-4 consistently perform well across all datasets, with high accuracy and low FNA. This suggests that these models are capable of reasoning causally by identifying the missing nodes in the causal graph and are less likely to be confused by the in-context node variable. 
On the other hand, open-source models like Mistral, Zephyr, and Mixtral show varying performance across different datasets. For instance, Mistral performs well on the easy Cancer dataset but struggles with the more complex Alarm dataset. 




 §.§ Task 3: Hypothesizing in Open World




In a realistic scenario, a user or a scientist would provide the partial graph as input without multiple choices and expect the language model to complete the causal DAG. Hence in this test-bed, we aim to leverage LLMs to hypothesize the causal variables. The language model is prompted for k=5 suggestions for the missing node v_x.

We then compare the suggestions against the ground truth. We suspect that traditional semantic similarity metrics may not fully capture the performance of models, given that suggestions need to be evaluated within the context of the entire graph. 
Hence, for a robust evaluation of this experiment, we use two metrics, semantic similarity, and LLM-as-Judge that incorporate contextual information. 


  
Semantic Similarity: measures the cosine similarity between the embeddings (of another pretrained sentence embedding model) of each suggestion of the model's predictions, v_x_1:5^* and the ground truth v_x.
The distances of the most similar suggestion are averaged across all nodes v_x ∈V. For a detailed explanation of this process, please refer to Appendix <ref>. 


  
LLM-as-Judge: This metric evaluates the quality of the model's suggestions using a two-step process inspired by <cit.>. In particular, LLM-as-Judge compares against ground truth variables to measure contextual semantic similarity beyond semi-exact matching like in semantic similarity metric. In the first step, the language model is prompted to determine which suggestion best fits the partial graph, given the ground truth and the suggestions, v_x_1:5^*. In the second step, the language model is again prompted to rate the selected suggestion on a scale of 1 to 10 in terms of similarity. This is repeated for all nodes, and the ratings are averaged to provide an overall quality measure. Implementation details can be found in  <ref>.

Results.
We report model performances using both semantic similarity and LLM-as-judge metrics in Table  <ref>. For brevity, we provided the variances in Appendix <ref>. 
To further develop an intuition of LLMs' performance, we provide a detailed analysis of each metric across different types of node variables (defined in Section  <ref>). We specifically look at sources, sinks, colliders, and mediators for each causal DAG. The results, fine-grained by node type, are given in Figure <ref> that shows each model's average performance across datasets. For a detailed performance per each dataset individually, see <ref>.
 
















GPT-4 and Mistral generally achieve higher semantic similarity and LLM-as-Judge scores across most datasets (<ref>). GPT-3.5 also shows good average performance. We observe that semantic similarity is a stricter metric than LLM-as-judge since it cannot encode contextual information about the causal DAG (see example in <ref>). Despite different scales, semantic similarity and LLM-as-judge metrics both seem to be fairly correlated. 
In Figure <ref>, 
we observe that models display stronger performance for colliders and mediators on average. This suggests that these models are relatively proficient at reasoning about common causes and indirect causal relationships. 

Sink nodes represent the effects in a causal graph, and the lower performance on these nodes indicates that the models find it challenging to reason about the potential outcomes of the causal graphs. 

Source nodes represent the causes in a causal graph, and lower performance on these nodes might indicate difficulties in reasoning about the potential treatments from the partial graph. For datasets such as Survey and Alzheimers, the different LLMs struggle with sources and sink variables at varying levels. 

In Figure <ref>, we observe that the model performance increases with k, i.e., with a higher number of suggestions. From Figure <ref>, it is also evident that the performance is proportional to the number of total edges, d_in + d_out (more context about the node). In summary, LLMs show impressive performance across some of the nodes and can be particularly useful to hypothesize mediators and colliders in a partial causal DAG. It is, hence, potentially beneficial to use LLMs in the real world because, in practice, treatment and outcomes are usually known. 
























 §.§ Task 4: Iteratively Hypothesizing in Open World



In the previous open-world experiment, we observed that LLMs excel at identifying mediators when the treatments and outcomes are given. This observation could be particularly relevant in medical settings, where understanding the mediators can provide insights into causal mechanisms through which a treatment affects a patient's outcome. 

For unordered mediator evaluation, we consider the random order of the mediators to hypothesize iteratively. The evaluation is similar to the open-world evaluation, where the final semantic similarity is averaged across all mediators. For ordered mediator evaluation according to MIS  (v_m_i), we introduce a new metric Δ. We hypothesize that the order of a mediator realization may influence the model predictions for the subsequent mediators. In each step, the previously hypothesized mediator may influence the search space of the current step. Therefore, to evaluate this, we prompt the LLM in two different orders: in ascending and descending orders of significance, as indicated by the MIS score. Δ is defined as the rate of change of semantic similarity from prompting in descending to ascending order. This procedure is repeated across all nodes. Given that some datasets only contain a single mediator, we here selected the Asia, Child, Insurance, and Alarm datasets, as they offer a wider range of mediators, ranging from 1 to 10 for the Alarm dataset. 






  
Results.
The results of this experiment are in <ref>. Results with variances are provided in Appendix <ref>. In a highly complex environment with more than one node missing and with open-world search space, we observe that LLMs can still maintain their performance. 
Unlike the overall consistent performance of GPT-4 across all of the datasets from the open-world setting, the model showed superior performance in Insurance and Alarm datasets only. As the complexity of the dataset increases, we observe larger differences in hypothesizing the mediators according to the MIS order. Positive Δ values suggest that prompting the LLM based on the MIS metric leads to higher semantic similarity between the mediator hypotheses and the ground truth variables. In summary, we observe that LLMs can be highly effective in iteratively hypothesizing multiple mediators in a DAG, and if present, 
some domain knowledge about the significance of the mediator can boost the performance.




 §.§ Hypothesizing Confounder



R5cm


       Sachs     Alarm    Ins 
 

Zephyr     ± 0.010.10     ± 0.050.45     ± 0.060.53 
 
Mixtral     ± 0.100.95     ± 0.090.85     ± 0.070.63 

Neural     ± 0.030.30     ± 0.050.45     ± 0.060.61 

LLama     ± 0.020.20     ± 0.050.47     ± 0.060.63 

Mistral     ± 0.020.20     ± 0.090.85     ± 0.060.61 

GPT-3.5     ± 0.040.40     ± 0.050.49     ± 0.070.67 
  
GPT-4     ± 0.100.95     ± 0.070.73     ± 0.080.78 
 

    
    
    Evaluating Confounders.
    


In causal inference, backdoor paths are alternative causal pathways that confound the estimation of causal effects. They introduce bias when estimating causal effects if not appropriately addressed. Hence hypothesizing and controlling for confounders is an important task in causal inference. We extract confounder subgraphs from Sachs <cit.>, Alarm and Insurance graphs. From Table <ref> with detailed results in Appendix  <ref>, we observe that while some confounders were easily hypothesized by LLMs, achieving perfect accuracy, the genomic domain of the SACHS posed challenges for models with potentially less domain-specific knowledge. Similar to the mediator analysis, a large model: GPT-4, does not always perform best across all datasets. This highlights the need for a diverse set of benchmarks, like ours, to fully assess their performance. Considering the importance of backdoor paths, we have now considered benchmarking LLM performance for confounders in addition to colliders. LLM typically performs well when hypothesizing a collider, however, the results for confounders are varied. 








§ CONCLUSION


Most causality literature assumes that the necessary data has been collected, and it aims to answer the question of how to establish causal relationships between variables. Generating hypotheses regarding which variables to observe is, however, mostly done by human experts. LLMs, having been trained on large-scale datasets, can be harnessed to act as expert proxies. We establish the novel task of generating hypotheses about missing variables in a causal graph. We formalize the problem by instantiating test procedures that vary in difficulty and knowledge level about the ground truth causal graph. We benchmark various models in identifying missing variables from a list of in-context and out-of-context distractors and hypothesizing missing variables in an open-world setting. We further evaluate an iterative setup to populate a graph with up to 10 missing mediator nodes. Our work shows that LLMs can be a promising tool to generate hypotheses, especially for mediators, which in practice are less known apriori than treatments and outcomes. 



§ LIMITATIONS AND FUTURE WORK

Given the non-disclosed datasets of models, it is difficult to confirm with absolute certainty that the datasets are not ingested by models during training. However, one of the datasets we used was released recently <cit.> after the announced cut-off date of models. Additionally, our task itself is novel, including the way we verbalize the graphs and prompt the models. Such textual descriptions are not part of the original datasets. Finally, we did not observe verbatim reconstruction of graphs that would have suggested that they are memorized. 

We envision our setup as a human-LLM collaboration under expert supervision. We do not automatically find the most plausible answer out of all models' suggestions. Our metrics compare against the ground truth for evaluation. Also, LLMs show limitations in expressing confidence about their responses <cit.>. Future work could thus investigate other mechanisms to filter out suggestions, in addition to improving models' performance on cause and effect (i.e., sources and sinks) nodes. Another promising direction is using retrieval-augmented models <cit.>.



§ ACKNOWLEDGEMENTS

This work was partially funded by ELSA – European Lighthouse on Secure and Safe AI funded by the European Union under grant agreement No. 101070617 and the German Federal Ministry of Education and Research (BMBF) under the grant AIgenCY (16KIS2012). Views and opinions expressed are however those of the authors only and do not necessarily reflect those of the European Union or European Commission. Neither the European Union nor the European Commission can be held responsible for them. 






plainnat




§ IMPLEMENTATION




 §.§ Datasets


We use 7 real-world based datasets. These datasets span across different domain knowledge topics. These datasets have ground truth graphs along with their observational data. The simplest dataset used is the cancer dataset with 4 edges and 5 node variables. In addition to the semi-synthetic datasets from the BNLearn library, we also evaluate our approach on a realistic Alzheimer's Disease dataset <cit.>, which was developed by five domain experts. Given that each expert created a different causal graph, the final causal DAG comprises only those edges that were agreed upon by consensus.





 §.§ Reproducibility


For reproducibility, we used temperature 0 and top-p value as 1 across all of the models. We also mentioned the snapshot of the model used. We have also included the prompts and examples below. Our code can be anonymously found here - <https://github.com/ivaxi0s/hypothesizing-causal-variable-llm.git>. The datasets are under CC BY-SA 3.0 which allows us to freely modify the datasets for benchmarking. Our benchmark will be released under the CC BY-SA License. 

GPT-3.5 GPT-4 were accessed via API. Rest of the models were run on 1 A100 GPU. Since we used off-the-shelf LLM, there was no training to be performed. Since many of the models were run by API, it is difficult to calculate the entire compute, however, all of the experiments for each model took ≈ 6 hours. 




 §.§ Controlled Variable Identification

For variable identification, we generate multiple choices that remain consistent across all missing nodes and all of the datasets. The words were randomly chosen to be far enough from the nodes. The options chosen were weather, book sales, and movie ratings. We wanted to make sure that the options were not from one specific domain such that the LLM could do the process of elimination. 





 §.§ Semantic Similarity


Given the task of hypothesizing missing nodes in a partial graph 𝒢^* in the absence of  multiple-choices, we evaluate the semantic similarity between the model's predictions and the ground truth node variable. We leverage an open model namely 'all-mpnet-base-v2' to transform the textual representations of the model's predictions and the ground truth into high-dimensional vector space embeddings. Post transforming textual representations into embeddings and normalizing them, we calculate the cosine similarity. Scores closer to 1 indicate a high semantic similarity, suggesting the model's predictions align well with the ground truth. This metric gives a score of similarity without the contextual knowledge of the causal graph. We perform our experiments to consider every node of the ground truth as a missing node iteratively. For all the suggestions for a node variable, we calculate the semantic similarity. The average similarity reported is the highest semantic similarity for each of the variable suggestions.










 §.§ LLM-as-Judge


To capture the domain knowledge of the expert that selects the most relevant causal variable, we use LLM-as-Judge as a proxy expert. This also allows for evaluation based on contextual DAG knowledge as well. Given the impressive results of GPT-4 in  <cit.>, we use GPT-4 as a judge for all of the experiments. 






  
Shortcomings of LLM-as-judge.
LLM-as-judge uses GPT-4 as a judge model which could be biased towards some data. Since the training datasets are not public for this model, it would be hard to judge how these biases might affect the final score. Hence for robust evaluation we also evaluate using the semantic similarity.




 §.§ Iteratively Hypothesizing in Open World

For each order, the algorithm prompts the LLM to generate mediator suggestions, selects the suggestion with the highest semantic similarity to the context, and iteratively updates the partial graph with these mediators. Δ, quantifies the impact of mediator ordering by comparing the average highest semantic similarity scores obtained from both descending and ascending orders. This methodical evaluation sheds light on how the sequence in which mediators are considered might affect the LLM's ability to generate contextually relevant and accurate predictions.






 

§ CONFOUNDERS


























 



§ FURTHER RESULTS




 §.§ Variances



For brevity we didnt add variance in the main text, the following results have variances:






 §.§ Analysis of difference across tasks


Since the metrics are different to evaluate each task, it is not meaningful or straightforward to compare the raw results. It must also be noted that the tasks are not linear. To address this, we rank the model performances across all models and datasets and present these rankings in Figure <ref>.  This allows us to compare the relative performance of the models across different tasks.

As we observe from the graph, GPT-4 model shows consistently top performances in Tasks 1-3, however, it has one of the lowest performances for Task 4. GPT-3.5 shows a strong performance in Task 2 and 4, ranking 2nd, but drops in Tasks 1 and 3. We observe that Zephyr, Neural and Mistral show consistently average performances. These observations motivate the significance of the tasks proposed in our benchmark. They highlight the variability in model performance across different tasks and emphasize the need for comprehensive and diverse benchmarks to fully assess the capabilities of these models.



 §.§ Breaking down the performance





 §.§ Fine grained model performance










 §.§ Effect of context

We observed notable differences in the accuracy of LLM predictions for missing nodes within causal graphs when context was provided versus when it was absent. Specifically, the inclusion of contextual information about the causal graph significantly enhanced the LMs' ability to generate accurate and relevant predictions. In realistic settings, when this setup is being used by a scientist, they would provide the context of the task along with the partial graph. When context was not provided, the models often struggled to identify the most appropriate variables, leading to a decrease in prediction accuracy, especially for smaller models. Unsurprisingly, providing context was more important for smaller graphs than larger graphs. LLMs were able to understand the context of the graph via multiple other nodes in the graph for larger graphs. 








 §.§ Using explanations

While using LLMs for hypothesizing the missing nodes withing the causal graph for the open world setting, introduced an additional question to prompt the model to provide explanations for each of their predictions. This was motivated by the fact that incorporating a rationale behind each prediction might enhance the model's semantic similarity. We present the results in the Table below: We observe that evaluating semantic similarity with explanations leads to a decrease in performance as compared to the earlier setting where the language model returned phrases. This is because semantic similarity, as a metric, evaluates the closeness of the model's predictions to the ground truth in a high-dimensional vector space, focusing on the semantic content encapsulated within the embeddings. It is a metric that leaves little room for interpretative flexibility, focusing strictly on the degree of semantic congruence between the predicted and actual variables. The introduction of explanations, while enriching the model's outputs with contextual insights, did not translate into improved semantic alignment with the ground truth.


 


  
Ambiguous predictions which semantically represent the same variable. 
An important linguistic concern that could be missed by semantic similarity is ambiguous hypothesis by the LLM that may have same semantics, which again breaks the semantic similarity metric. This further motivates LLM-judge metric whose input is - the context of the causal graph, the partial causal graph, the ground truth variable, and the model predictions. Given the rich context of the LLM-judge metric we suspect it would be able to overcome the ambiguity. We prompted the model to justify its hypothesis variables using explanations. We observe that evaluating semantic similarity with explanations leads to a decrease in performance as compared to the earlier setting where the language model returned just phrases. In Table  <ref> we observed a drop in performance for semantic similarity. In contrast, we observe a similar or slight improvement in the LLM-judge metric when the explanation of the model hypothesis is given. 



 §.§ Chain of thought

In recent times, Chain-of-Thought prompting has gained popularity due to its impressive performance in proving the quality of LLMs' output <cit.> also in metadata-based causal reasoning <cit.>. We also incorporated COT prompting for our prompts. We perform ablation studies in Table. We observe that COT particularly improves the performance of the identification experiments. 




 §.§ Iterative mediator search vs all at once

For Task 4, we iteratively hypothesize the missing variables (mediators). Our choice was primarily driven by the complexity of Task 4, which involves predicting multiple missing mediators, ranging from 1 to 10. For a Task with 10 missing mediators, the model would have to predict 50 suggestions at once. We initially hypothesized that LLMs might struggle with making multiple predictions across different variables simultaneously. This was indeed reflected in our results and GPT-4 outputs from Table X. The iterative approach allows the model's prediction to narrow the search space, which would not be possible in a non-iterative approach. This method is more aligned with the scientific discovery process, where hypotheses are often refined iteratively based on new findings.
Furthermore, our approach simulates a human-in-the-loop scenario, where the most plausible answer is selected and used to guide the next prediction.





§ FINETUNING

we aim to assess the LLM’s causal reasoning via prompting. Following are the reasons why fine-tuning is not the most practical solution:

    
  * Pretrained models come with a wealth of general knowledge, which we aim to leverage. Fine-tuning these models could potentially limit their ability to draw on this broad knowledge base. We aim to understand the utility of pretrained models, as fine-tuning large models like GPT-4 is not always feasible.
    
  * The training dataset is too small for fine-tuning. Despite considering a large 52-edged graph: Insurance, we would have just 27 datapoints or Alarm with 37 datapoint. Additionally:



    
  * Using the same graph as part of train and test would unfortunately lead to training data leakage.
    
  * If we consider different graphs for train and test, there would exist a domain shift in the two graphs and the model may be overfitted to the domain of the train graph.


However, to illustrate our hypothesis and alleviate the reviewer's concern, we performed Supervised Fine-Tuning using QLoRA on the Mistral-7b-Instruct model for hypothesizing in the open world task.
The train set here is all of the graphs minus the respective graph it was tested on. We tested on Survey, Insurance and Alzheimers graphs. The model was trained to give one best-fit suggestion for the missing variable.


From the above results, it is evident that finetuning does not significantly improve over the prompting results. This is because during training the LLM gets biased towards the domains of training datasets which are contextually distant from the test domain, given the diversity of datasets chosen. One may think that training might help the LLM to understand the task, but from prompt-based model output, it was evident that the LLM can instruction-follow. In summary, we were able to extract the LLM knowledge via prompting and domain-specific fine-tuning could be closely looked at in the future works.





§ CAUSAL GRAPHS

























§ PROMPT TEMPLATE


    
    
    Hello. You will be given a causal graph. The context of the graph [CONTEXT]. Please understand the causal relationships between the variables - [VERBALISED DAG]. 
    
    Base prompt to describe the causal graph
    





 
    
    
     Hello. You will be given a causal graph. The context of the graph is hypothetical patient monitoring system in an intensive care unit (ICU). Please understand the causal relationships between the variables - < anaphylaxis > causes < total peripheral resistance >. < arterial co2 > causes < expelled co2 >. < arterial co2 > causes < catecholamine >. < catecholamine > causes < heart rate >. < cardiac output > causes < blood pressure >. < disconnection > causes < breathing tube >. < error cauter > causes < heart rate displayed on ekg monitor >. < error cauter > causes < oxygen saturation >. < error low output > causes < heart rate blood pressure >. < high concentration of oxygen in the gas mixture  > causes < pulmonary artery oxygen saturation >. < heart rate > causes < heart rate blood pressure >. < heart rate > causes < heart rate displayed on ekg monitor >. < heart rate > causes < oxygen saturation >. < heart rate > causes < cardiac output >. < hypovolemia > causes < left ventricular end-diastolic volume >. < hypovolemia > causes < stroke volume  >. < insufficient anesthesia  > causes < catecholamine >. < intubation > causes < lung ventilation >. < intubation > causes < minute volume  >. < intubation > causes < alveolar ventilation >. < intubation > causes < shunt - normal and high >. < intubation > causes < breathing pressure >. < kinked chest tube > causes < lung ventilation >. < kinked chest tube > causes < breathing pressure >. < left ventricular end-diastolic volume > causes < central venous pressure >. < left ventricular end-diastolic volume > causes < pulmonary capillary wedge pressure >. < left ventricular failure > causes < previous medical history >. < left ventricular failure > causes < left ventricular end-diastolic volume >. < left ventricular failure > causes < stroke volume  >. < the amount of time using a breathing machine > causes < the intensity level of a breathing machine >. < sudden blockage in the pulmonary arteries > causes < shunt - normal and high >. < sudden blockage in the pulmonary arteries > causes < pulmonary artery pressure  >. < pulmonary artery oxygen saturation > causes < oxygen saturation >. < oxygen saturation > causes < catecholamine >. < shunt - normal and high > causes < oxygen saturation >. < stroke volume  > causes < cardiac output >. < total peripheral resistance > causes < catecholamine >. < total peripheral resistance > causes < blood pressure >. < alveolar ventilation > causes < arterial co2 >. < alveolar ventilation > causes < pulmonary artery oxygen saturation >. < lung ventilation > causes < expelled co2 >. < lung ventilation > causes < minute volume  >. < lung ventilation > causes < alveolar ventilation >. < the intensity level of a breathing machine > causes < breathing tube >. < breathing tube > causes < lung ventilation >. < breathing tube > causes < breathing pressure >. 
    
    
An example of the base prompt for Alarm dataset. Each relationship is enclosed in pointed brackets,<> followed by a full stop. 






 
    
    
    Prompt: Hello. You will be given a causal graph. The context of the graph is different aspects of a patient's health related to lung diseases. Please understand the causal relationships between the variables - < x > causes < tuberculosis >. < bronchitis > causes < dyspnoea-laboured breathing >. < individual has either tuberculosis or lung cancer > causes < positive xray >. < individual has either tuberculosis or lung cancer > causes < dyspnoea-laboured breathing >. < lung cancer > causes < individual has either tuberculosis or lung cancer >. < smoking cigarettes > causes < lung cancer >. < smoking cigarettes > causes < bronchitis >. < tuberculosis > causes < individual has either tuberculosis or lung cancer >.Based on your understanding and analytical skills, please identify what the variable X could most likely be from the given multiple choices. It's important to note that you MUST select an option from the provided choices, as one of them is the correct answer. The choices are: [ visited Asia; weather; book sales; movie rating ]. Please think step by step. Your answer should be formatted as follows - Answer: X = choice. The choice must be one of the provided options, and it should be formatted exactly as it appears in the choices. Generating your own options is not allowed in this task.




    Answer: X = visited Asia.My thought process is as follows:The causal graph suggests that X causes tuberculosis, and tuberculosis is related to lung diseases. Visiting Asia is a possible explanation for why an individual may have been exposed to tuberculosis, as the disease is more prevalent in some Asian countries. Therefore, visited Asia is the most likely option for X.

Out-of-context controlled variable identification, Ground truth variable: visited Asia 







 
    
    
    Prompt: Hello. You will be given a causal graph. The context of the graph is different aspects of a patient's health related to lung diseases Please understand the causal relationships between the variables - < x > causes < tuberculosis >. < bronchitis > causes < dyspnoea-laboured breathing >. < individual has either tuberculosis or lung cancer > causes < y >. < individual has either tuberculosis or lung cancer > causes < dyspnoea-laboured breathing >. < lung cancer > causes < individual has either tuberculosis or lung cancer >. < smoking cigarettes > causes < lung cancer >. < smoking cigarettes > causes < bronchitis >. < tuberculosis > causes < individual has either tuberculosis or lung cancer >. Based on your understanding and analytical skills, please identify what the variable X could most likely be from the given multiple choices. It's important to note that you MUST select an option from the provided choices, as one of them is the correct answer. The choices are: [ weather; book sales; movie rating; positive xray; visited Asia ]. Please think step by step. Your answer should be formatted as follows - Answer: X = choice. The choice must be one of the provided options, and it should be formatted exactly as it appears in the choices. Generating your own options is not allowed in this task.




    Answer: Answer: X = visited Asia. My thought process is as follows:1. The graph shows that X causes tuberculosis, which suggests that X is a variable related to healthcare or medicine. 2. The graph also shows that bronchitis causes dyspnoea-laboured breathing, which further supports the idea that X is a variable related to healthcare or medicine. 3. The graph shows that individual has either tuberculosis or lung cancer causes y, which suggests that X could be a variable related to diagnosing or treating lung diseases. 4. The graph shows that smoking cigarettes causes lung cancer and bronchitis, which suggests that X could be a variable related to smoking or lung health. 5. Based on the above observations, it seems unlikely that X would be weather, book sales, or movie rating.6. Visited Asia is a variable that could potentially relate to healthcare or medicine, particularly if the patient has traveled to a region with a high prevalence of tuberculosis or other lung diseases.7. Therefore, based on the information provided in the graph, it seems most likely that X = visited Asia.

In-context controlled variable identification, Ground truth variable: visited asia 





 
    
    
    Prompt: Hello. You will be given a causal graph. The context of the graph is different aspects of a patient's health related to lung diseases. Please understand the causal relationships between the variables - < x > causes < tuberculosis >. < bronchitis > causes < dyspnoea-laboured breathing >. < individual has either tuberculosis or lung cancer > causes < positive xray >. < individual has either tuberculosis or lung cancer > causes < dyspnoea-laboured breathing >. < lung cancer > causes < individual has either tuberculosis or lung cancer >. < smoking cigarettes > causes < lung cancer >. < smoking cigarettes > causes < bronchitis >. < tuberculosis > causes < individual has either tuberculosis or lung cancer >. Using your causal knowledge, can you suggest what variable X most likely? Give 5 suggestions for what variable X could be. Give reason for your suggestions. Finally, return your answer (without reasoning) in the following format: <Answer> [first suggestion, second suggestion, third suggestion .. and so on] </Answer> No explanations, no reasoning, just answers as a list as described earlier. For example, if the suggestions are A,B,C,D,E then - <Answer> [A, B, C, D, E] </Answer>





    Answer: <Answer> [HIV/AIDS, Chronic respiratory conditions, Pneumonia, Exposure to asbestos, Silicosis] </Answer> 
    
    Reasons: 
    
    1. HIV/AIDS: It is known to weaken the immune system, making the individual more susceptible to infections like tuberculosis.
    
    2. Chronic respiratory conditions: These can make an individual more susceptible to lung diseases like tuberculosis.
    
    3. Pneumonia: It is a lung infection that can lead to serious conditions like tuberculosis if not treated properly.
    
    4. Exposure to asbestos: Long-term exposure to asbestos can lead to lung diseases including lung cancer and tuberculosis.
    
    5. Silicosis: It is a lung disease caused by inhalation of silica dust, leading to inflammation and scarring of the lung tissue, making the individual more susceptible to tuberculosis.

Hypothesizing missing variable in open world, Ground truth variable: Visted Asia 




 
    
    
    Prompt: Hello. You will be given a causal graph. The context of the graph is different aspects of a patient's health related to lung diseases. Please understand the causal relationships between the variables - < visited asia > causes < tuberculosis >. < bronchitis > causes < dyspnoea-laboured breathing >. < individual has either tuberculosis or lung cancer > causes < positive xray >. < individual has either tuberculosis or lung cancer > causes < dyspnoea-laboured breathing >. < x > causes < individual has either tuberculosis or lung cancer >. < smoking cigarettes > causes < x >. < smoking cigarettes > causes < bronchitis >. < tuberculosis > causes < individual has either tuberculosis or lung cancer >. Using your causal knowledge, can you suggest what variable X most likely? Give 5 suggestions for what variable X could be. Give reason for your suggestions. Finally, return your answer (without reasoning) in the following format: <Answer> [first suggestion, second suggestion, third suggestion .. and so on] </Answer> No explanations, no reasoning, just answers as a list as described earlier. For example, if the suggestions are A,B,C,D,E then - <Answer> [A, B, C, D, E] </Answer>





    Answer: <Answer> [Lung Cancer, Chronic Obstructive Pulmonary Disease, Emphysema, Pneumonia, Asthma] </Answer> 
    
    Reasons: 
    
    1. Lung Cancer: Smoking is a major cause of lung cancer and lung cancer can lead to tuberculosis or other lung diseases.
    
    2. Chronic Obstructive Pulmonary Disease: Smoking is a leading cause of COPD and it can lead to other lung diseases including tuberculosis and lung cancer.
    
    3. Emphysema: It is a type of COPD often caused by smoking and can lead to other lung diseases.
    
    4. Pneumonia: Smoking increases the risk of pneumonia and pneumonia can lead to other lung diseases.
    
    5. Asthma: Smoking can trigger asthma attacks and severe asthma can lead to other lung diseases.

Hypothesizing missing variable in open world, Ground truth variable: Lung cancer 





 
    
    
    Prompt: 
    Hello. You will be given a causal graph. The context of the graph is hypothetical patient monitoring system in an intensive care unit (ICU) Please understand the causal relationships between the variables - < anaphylaxis > causes < total peripheral resistance >. < x > causes < expelled co2 >. < x > causes < x3 >. < x3 > causes < x2 >. < x1 > causes < blood pressure >. < disconnection > causes < x7 >. < error cauter > causes < heart rate displayed on ekg monitor >. < error cauter > causes < oxygen saturation >. < error low output > causes < heart rate blood pressure >. < high concentration of oxygen in the gas mixture  > causes < x9 >. < x2 > causes < heart rate blood pressure >. < x2 > causes < heart rate displayed on ekg monitor >. < x2 > causes < oxygen saturation >. < x2 > causes < x1 >. < hypovolemia > causes < left ventricular end-diastolic volume >. < hypovolemia > causes < stroke volume  >. < insufficient anesthesia  > causes < x3 >. < intubation > causes < x5 >. < intubation > causes < minute volume  >. < intubation > causes < x4 >. < intubation > causes < shunt - normal and high >. < intubation > causes < breathing pressure >. < kinked chest tube > causes < x5 >. < kinked chest tube > causes < breathing pressure >. < left ventricular end-diastolic volume > causes < central venous pressure >. < left ventricular end-diastolic volume > causes < pulmonary capillary wedge pressure >. < left ventricular failure > causes < previous medical history >. < left ventricular failure > causes < left ventricular end-diastolic volume >. < left ventricular failure > causes < stroke volume  >. < the amount of time using a breathing machine > causes < x6 >. < sudden blockage in the pulmonary arteries > causes < shunt - normal and high >. < sudden blockage in the pulmonary arteries > causes < pulmonary artery pressure  >. < x9 > causes < x8 >. < x8 > causes < x3 >. < shunt - normal and high > causes < x8 >. < stroke volume  > causes < x1 >. < total peripheral resistance > causes < x3 >. < total peripheral resistance > causes < blood pressure >. < x4 > causes < x >. < x4 > causes < x9 >. < x5 > causes < expelled co2 >. < x5 > causes < minute volume  >. < x5 > causes < x4 >. < x6 > causes < x7 >. < x7 > causes < x5 >. < x7 > causes < breathing pressure >.  Using your causal knowledge, can you suggest what variable X most likely? Give 5 suggestions for what variable X could be. Give reason for your suggestions. Finally, return your answer (without reasoning) in the following format: <Answer> [first suggestion, second suggestion, third suggestion .. and so on] </Answer> No explanations, no reasoning, just answers as a list as described earlier. For example, if the suggestions are A,B,C,D,E then - <Answer> [A, B, C, D, E] </Answer>






    Answer: <Answer> [ventilation rate, respiratory effort, airway resistance, lung compliance, alveolar gas exchange] </Answer>

Reasons for the answer:

1. **Ventilation Rate**: The variable X causes both expelled CO2 and another variable (X3), which indirectly influences heart rate, blood pressure, and oxygen saturation. The rate of ventilation directly affects the amount of CO2 expelled from the body, making it a plausible candidate for X.

2. **Respiratory Effort**: This suggestion is based on the relationship between X and expelled CO2, as well as the influence of X on another variable (X3) that affects cardiovascular and respiratory parameters. Respiratory effort, which encompasses the work of breathing, could affect CO2 expulsion and have downstream effects on the cardiovascular system.

3. **Airway Resistance**: Airway resistance could be a candidate for X because it directly influences the amount of CO2 that can be expelled (a function of airflow) and could also affect other physiological variables through its impact on ventilation efficiency.

4. **Lung Compliance**: Lung compliance, or the ease with which the lungs can expand, directly affects ventilation and, consequently, the expulsion of CO2. It could also indirectly influence other variables in the graph through its impact on gas exchange efficiency.

5. **Alveolar Gas Exchange**: This process directly determines the amount of CO2 expelled and could influence the variable X3, affecting cardiovascular parameters. Efficient gas exchange is crucial for maintaining appropriate oxygen and CO2 levels in the blood, impacting heart rate, blood pressure, and oxygen saturation.

These suggestions are not explicitly mentioned in the input graph but are closely related to the physiological processes and outcomes described. They offer plausible explanations for the causal relationships involving the variable X, considering the context of patient monitoring in an ICU setting.





    

Hypothesizing missing variable in open world #1 Ground truth variable: arterial CO2 




 
    
    
    Prompt: 
    Strictly follow the format mentioned otherwise you will be disqualified.', 'ello. You will be given a causal graph. The context of the graph is hypothetical patient monitoring system in an intensive care unit (ICU) Please understand the causal relationships between the variables - < anaphylaxis > causes < total peripheral resistance >. < Alveolar Gas Exchange > causes < expelled co2 >. < Alveolar Gas Exchange > causes < x2 >. < x2 > causes < x1 >. < x > causes < blood pressure >. < disconnection > causes < x6 >. < error cauter > causes < heart rate displayed on ekg monitor >. < error cauter > causes < oxygen saturation >. < error low output > causes < heart rate blood pressure >. < high concentration of oxygen in the gas mixture  > causes < x8 >. < x1 > causes < heart rate blood pressure >. < x1 > causes < heart rate displayed on ekg monitor >. < x1 > causes < oxygen saturation >. < x1 > causes < x >. < hypovolemia > causes < left ventricular end-diastolic volume >. < hypovolemia > causes < stroke volume  >. < insufficient anesthesia  > causes < x2 >. < intubation > causes < x4 >. < intubation > causes < minute volume  >. < intubation > causes < x3 >. < intubation > causes < shunt - normal and high >. < intubation > causes < breathing pressure >. < kinked chest tube > causes < x4 >. < kinked chest tube > causes < breathing pressure >. < left ventricular end-diastolic volume > causes < central venous pressure >. < left ventricular end-diastolic volume > causes < pulmonary capillary wedge pressure >. < left ventricular failure > causes < previous medical history >. < left ventricular failure > causes < left ventricular end-diastolic volume >. < left ventricular failure > causes < stroke volume  >. < the amount of time using a breathing machine > causes < x5 >. < sudden blockage in the pulmonary arteries > causes < shunt - normal and high >. < sudden blockage in the pulmonary arteries > causes < pulmonary artery pressure  >. < x8 > causes < x7 >. < x7 > causes < x2 >. < shunt - normal and high > causes < x7 >. < stroke volume  > causes < x >. < total peripheral resistance > causes < x2 >. < total peripheral resistance > causes < blood pressure >. < x3 > causes < Alveolar Gas Exchange >. < x3 > causes < x8 >. < x4 > causes < expelled co2 >. < x4 > causes < minute volume  >. < x4 > causes < x3 >. < x5 > causes < x6 >. < x6 > causes < x4 >. < x6 > causes < breathing pressure >.  Using your causal knowledge, can you suggest what variable X most likely? Give 5 suggestions for what variable X could be. Give reason for your suggestions. Finally, return your answer (without reasoning) in the following format: <Answer> [first suggestion, second suggestion, third suggestion .. and so on] </Answer> No explanations, no reasoning, just answers as a list as described earlier. For example, if the suggestions are A,B,C,D,E then - <Answer> [A, B, C, D, E] </Answer>






    Answer: <Answer> [cardiac output, heart function, blood flow, vascular resistance, cardiac cycle] </Answer>

Reasons for the answer:

1. **Cardiac Output**: The variable X causes blood pressure and is caused by stroke volume. In physiological terms, cardiac output is a primary factor influencing blood pressure, as it represents the volume of blood the heart pumps per minute. Since stroke volume (the amount of blood pumped by the left ventricle of the heart in one contraction) contributes to cardiac output, it's logical to suggest "cardiac output" as a potential identity for X.

2. **Heart Function**: Given that X is related to blood pressure and influenced by stroke volume, it's reasonable to infer that X pertains to the overall function of the heart. Heart function encompasses various aspects of how the heart works, including pumping efficiency, which directly affects blood pressure.

3. **Blood Flow**: Since X has a direct relationship with blood pressure and an indirect relationship with factors affecting the heart's pumping ability, "blood flow" could be a plausible suggestion. Blood flow is crucial for maintaining blood pressure and is inherently linked to the heart's ability to pump blood effectively.

4. **Vascular Resistance**: X's impact on blood pressure and its connection to total peripheral resistance suggest that it might involve vascular resistance. Vascular resistance is the resistance that must be overcome to push blood through the circulatory system and is a key determinant of blood pressure.

5. **Cardiac Cycle**: The cardiac cycle involves all the events related to the flow of blood through the heart during one complete heartbeat, including systole (contraction) and diastole (relaxation). Given X's influence on blood pressure and its relationship with stroke volume, considering the cardiac cycle as a potential identity for X makes sense, as it encompasses the mechanisms affecting blood pressure regulation.





    

Hypothesizing missing variable in open world #2 Ground truth variable: cardiac output 




 
    
    
    Prompt: 
    Hello. You will be given a causal graph. The context of the graph is hypothetical patient monitoring system in an intensive care unit (ICU) Please understand the causal relationships between the variables - < anaphylaxis > causes < total peripheral resistance >. < < Alveolar Gas Exchange > causes < expelled co2 >. < < Alveolar Gas Exchange > causes < x1 >. < x1 > causes < x >. < Cardiac Output  > causes < blood pressure >. < disconnection > causes < x5 >. < error cauter > causes < heart rate displayed on ekg monitor >. < error cauter > causes < oxygen saturation >. < error low output > causes < heart rate blood pressure >. < high concentration of oxygen in the gas mixture  > causes < x7 >. < x > causes < heart rate blood pressure >. < x > causes < heart rate displayed on ekg monitor >. < x > causes < oxygen saturation >. < x > causes < Cardiac Output >. < hypovolemia > causes < left ventricular end-diastolic volume >. < hypovolemia > causes < stroke volume  >. < insufficient anesthesia  > causes < x1 >. < intubation > causes < x3 >. < intubation > causes < minute volume  >. < intubation > causes < x2 >. < intubation > causes < shunt - normal and high >. < intubation > causes < breathing pressure >. < kinked chest tube > causes < x3 >. < kinked chest tube > causes < breathing pressure >. < left ventricular end-diastolic volume > causes < central venous pressure >. < left ventricular end-diastolic volume > causes < pulmonary capillary wedge pressure >. < left ventricular failure > causes < previous medical history >. < left ventricular failure > causes < left ventricular end-diastolic volume >. < left ventricular failure > causes < stroke volume  >. < the amount of time using a breathing machine > causes < x4 >. < sudden blockage in the pulmonary arteries > causes < shunt - normal and high >. < sudden blockage in the pulmonary arteries > causes < pulmonary artery pressure  >. < x7 > causes < x6 >. < x6 > causes < x1 >. < shunt - normal and high > causes < x6 >. < stroke volume  > causes < Cardiac Output >. < total peripheral resistance > causes < x1 >. < total peripheral resistance > causes < blood pressure >. < x2 > causes < < Alveolar Gas Exchange >. < x2 > causes < x7 >. < x3 > causes < expelled co2 >. < x3 > causes < minute volume  >. < x3 > causes < x2 >. < x4 > causes < x5 >. < x5 > causes < x3 >. < x5 > causes < breathing pressure >  Using your causal knowledge, can you suggest what variable X most likely? Give 5 suggestions for what variable X could be. Give reason for your suggestions. Finally, return your answer (without reasoning) in the following format: <Answer> [first suggestion, second suggestion, third suggestion .. and so on] </Answer> No explanations, no reasoning, just answers as a list as described earlier. For example, if the suggestions are A,B,C,D,E then - <Answer> [A, B, C, D, E] </Answer>






    Answer: <Answer> [patient anxiety level, patient consciousness level, patient pain level, patient respiratory rate, patient skin temperature] </Answer>

Reasons for the answer:

1. **Patient Anxiety Level**: The variable X influences heart rate, blood pressure, oxygen saturation, and cardiac output, which are all physiological parameters that can be affected by a patient's psychological state, such as anxiety. Anxiety can lead to increased heart rate and blood pressure, changes in oxygen saturation, and alterations in cardiac output due to the body's stress response.

2. **Patient Consciousness Level**: Consciousness level can impact heart rate, blood pressure, and oxygen saturation due to the brain's control over these vital signs. Changes in consciousness level, such as becoming more alert or lapsing into unconsciousness, can significantly affect these parameters, which are all influenced by variable X.

3. **Patient Pain Level**: Pain can cause physiological responses that include increased heart rate, elevated blood pressure, changes in oxygen saturation due to hyperventilation or altered breathing patterns, and potentially affect cardiac output as the body reacts to the stress of pain.

4. **Patient Respiratory Rate**: Given that X influences expelled CO2 and is affected by alveolar gas exchange, it's plausible that X could relate to the patient's respiratory rate. Respiratory rate directly impacts alveolar gas exchange, which in turn affects expelled CO2 levels, oxygen saturation, and indirectly influences heart rate and blood pressure through changes in blood chemistry.

5. **Patient Skin Temperature**: While not directly related to the cardiovascular or respiratory systems, skin temperature can be an indirect indicator of changes in these systems. For example, changes in cardiac output and peripheral resistance can affect blood flow to the skin, thereby influencing skin temperature. Variable X's impact on cardiac output and blood pressure suggests it could also indirectly affect skin temperature.

These suggestions are based on the understanding that variable X has a broad impact on both cardiovascular and respiratory parameters, indicating it could be a factor that influences or reflects the overall physiological state of the patient.




    

Hypothesizing missing variable in open world #3 Ground truth variable: Heart rate 




 
    
    
    Prompt: 
    Hello. You will be given a causal graph. The context of the graph is hypothetical patient monitoring system in an intensive care unit (ICU) Please understand the causal relationships between the variables - < anaphylaxis > causes < total peripheral resistance >. < < Alveolar Gas Exchange > causes < expelled co2 >. < < Alveolar Gas Exchange > causes < x >. < x > causes <Patient Respiratory Rate>. < Cardiac Output  > causes < blood pressure >. < disconnection > causes < x4 >. < error cauter > causes < heart rate displayed on ekg monitor >. < error cauter > causes < oxygen saturation >. < error low output > causes < heart rate blood pressure >. < high concentration of oxygen in the gas mixture  > causes < x6 >. <Patient Respiratory Rate> causes < heart rate blood pressure >. <Patient Respiratory Rate> causes < heart rate displayed on ekg monitor >. <Patient Respiratory Rate> causes < oxygen saturation >. <Patient Respiratory Rate> causes < Cardiac Output >. < hypovolemia > causes < left ventricular end-diastolic volume >. < hypovolemia > causes < stroke volume  >. < insufficient anesthesia  > causes < x >. < intubation > causes < x2 >. < intubation > causes < minute volume  >. < intubation > causes < x1 >. < intubation > causes < shunt - normal and high >. < intubation > causes < breathing pressure >. < kinked chest tube > causes < x2 >. < kinked chest tube > causes < breathing pressure >. < left ventricular end-diastolic volume > causes < central venous pressure >. < left ventricular end-diastolic volume > causes < pulmonary capillary wedge pressure >. < left ventricular failure > causes < previous medical history >. < left ventricular failure > causes < left ventricular end-diastolic volume >. < left ventricular failure > causes < stroke volume  >. < the amount of time using a breathing machine > causes < x3 >. < sudden blockage in the pulmonary arteries > causes < shunt - normal and high >. < sudden blockage in the pulmonary arteries > causes < pulmonary artery pressure  >. < x6 > causes < x5 >. < x5 > causes < x >. < shunt - normal and high > causes < x5 >. < stroke volume  > causes < Cardiac Output >. < total peripheral resistance > causes < x >. < total peripheral resistance > causes < blood pressure >. < x1 > causes < < Alveolar Gas Exchange >. < x2 > causes < x6 >. < x3 > causes < expelled co2 >. < x3 > causes < minute volume  >. < x3 > causes < x1 >. < x3 > causes < x4 >. < x4 > causes < x3 >. < x4 > causes < breathing pressure >  Using your causal knowledge, can you suggest what variable X most likely? Give 5 suggestions for what variable X could be. Give reason for your suggestions. Finally, return your answer (without reasoning) in the following format: <Answer> [first suggestion, second suggestion, third suggestion .. and so on] </Answer> No explanations, no reasoning, just answers as a list as described earlier. For example, if the suggestions are A,B,C,D,E then - <Answer> [A, B, C, D, E] </Answer>






    Answer: <Answer> [oxygen delivery, arterial blood gas, lung compliance, blood oxygen level, respiratory efficiency] </Answer>

Reasons for the answer:

1. **Oxygen Delivery**: Given that "alveolar gas exchange" causes "X" and "X" in turn affects "patient respiratory rate," it's logical to infer that "X" could be related to how effectively oxygen is being delivered throughout the body. Oxygen delivery is a critical aspect of respiratory function and would directly impact respiratory rate.

2. **Arterial Blood Gas (ABG)**: ABG tests measure the levels of oxygen and carbon dioxide in the blood and can indicate how well oxygen is being transported and carbon dioxide is being expelled, which are functions influenced by alveolar gas exchange. Since "X" is caused by "alveolar gas exchange" and affects "patient respiratory rate," it's plausible that "X" could involve the measurement or state of arterial blood gases.

3. **Lung Compliance**: This refers to the elasticity or flexibility of the lungs, which directly impacts alveolar gas exchange and, consequently, the respiratory rate. Since "X" is linked to both "alveolar gas exchange" and "patient respiratory rate," it could suggest a relationship with the mechanical properties of the lung, such as compliance.

4. **Blood Oxygen Level**: This is a direct outcome of effective alveolar gas exchange and would naturally influence the patient's respiratory rate as the body adjusts to maintain adequate oxygenation. Given the causal links mentioned, "X" could very well represent the level of oxygen present in the blood.

5. **Respiratory Efficiency**: This encompasses how effectively the respiratory system can supply oxygen to and remove carbon dioxide from the body. It's influenced by alveolar gas exchange and directly affects the respiratory rate, making it a plausible candidate for "X." 

These suggestions are not explicitly mentioned in the input graph but are logically inferred based on the described causal relationships and a basic understanding of respiratory physiology.




    

Hypothesizing missing variable in open world #4 Ground truth variable: catecholamine. This repeats until all of the mediators are hypothesized. 






§ ASSUMPTIONS

The causal sufficiency of 𝒢, by definition, implies that for every pair of variables within 𝐕, all common causes are also included within 𝐕. Extending this assumption to 𝒢^*, we assume that the partial graph inherits causal sufficiency for its given that all edges among these variables are preserved as in 𝒢. This preservation ensures that the observed relationships within V^* are not confounded by omitted common causes. Since the faithfulness of 𝒢 ensures that the observed conditional independencies among variables in 𝐕 are accurately reflected by the causal structure represented by 𝐄. By maintaining the same set of edges 𝐄 in 𝒢^* for the subset V^*, we uphold the faithfulness assumption within the partial graph. 



§ NDE AND NIE


Average Treatment Effect (ATE) quantifies the expected change in the outcome v_y caused by the unit change of the treatment v_t. ATE is part of the causal do-calculus introduced by <cit.>. We consider binary causal DAGs, i.e., each variable can either take 0 or 1 as values.

    ATE = 𝔼[v_y|do(v_t=1)] - 𝔼[v_y|do(v_t=0)]

where the do(·) operator, represents an intervention. The E[v_y|do(v_t=1)] represents the expected value of the outcome variable v_y when we intervene to set the treatment variable v_t to 1 (i.e., apply the treatment), and E[v_y|do(v_t=0)] represents the expected value of v_y when we set v_t to 0 (i.e., do not apply the treatment).




 §.§ Mediation Analysis

Mediation analysis is implemented to quantify the effect of a treatment on the outcome via a third variable, the mediator. The total mediation effect can be decomposed into the Natural Direct Effect (NDE) and the Natural Indirect Effect (NIE). The Natural Direct Effect (NDE) is the effect of the treatment on the outcome variable when not mediated by the mediator variable. The Natural Indirect Effect (NIE) is the effect of the treatment variable on the outcome variable when mediated by the mediator variable.

    NDE   = 𝔼[v_t=1,v_m=0 - v_t=0,v_m=0]

Here, NDE is calculated by comparing the expected outcome when the treatment variable is set to 1 and the mediator is fixed at the level it would take under the control treatment v_t=0, with the expected outcome when both the treatment and the mediator are set to the control level.

    NIE   = 𝔼[v_t=0,v_m=1 - v_t=0,v_m=0]

Here, NIE is calculated by comparing the expected outcome when the treatment variable is set to 1 and the mediator is allowed to change as it would under the treatment, with the expected outcome when the treatment variable is set to 1 but the mediator is fixed at the control level.







