# Cause and Effect: Can Large Language Models Truly Understand Causality?

Swagata Ashwani
Carnegie Mellon University
Nishith Reddy Mannuru
University of North Texas
Kshiteesh Hegde
Rensselaer Polytechnic Institute
Dushyant Singh Sengar
Independent Researcher
Mayank Jindal
Independent Researcher
Krishna Chaitanya Rao Kathala
University of Massachusetts
Dishant Banga
Bridgetree
Vinija Jain
Stanford University
Aman Chadha
Stanford University

###### Abstract

With the rise of Large Language Models (LLMs), it has become crucial to
understand their capabilities and limitations in deciphering and explaining
the complex web of causal relationships that language entails. Current methods
use either explicit or implicit causal reasoning, yet there’s a strong need
for a unified approach combining both to tackle a wide array of causal
relationships more effectively. This research proposes a novel architecture
called Context-Aware Reasoning Enhancement with Counterfactual Analysis (CARE-
CA) framework to enhance causal reasoning and explainability. The proposed
framework incorporates an explicit causal detection module with ConceptNet and
counterfactual statements, as well as implicit causal detection through LLMs.
Our framework goes one step further with a layer of counterfactual
explanations to accentuate LLMs’ understanding of causality. The knowledge
from ConceptNet enhances the performance of multiple causal reasoning tasks
such as causal discovery, causal identification, and counterfactual reasoning.
The counterfactual sentences add explicit knowledge of ‘not caused by’
scenarios. By combining these powerful modules, our model aims to provide a
deeper understanding of causal relationships, enabling enhanced
interpretability. Evaluation of benchmark datasets shows improved performance
across all metrics, such as accuracy, precision, recall, and F1 scores. We
also introduce CausalNet, a new dataset accompanied by our code, to facilitate
further research in this domain.111https://anonymous.4open.science/r/causal-
reasoning-0B6E/

##  1 Introduction

As Large Language Models (LLMs) play an increasingly central role in
technology, their ability to understand and logically navigate causal
relationships becomes essential since they impact the trust users have on
them. [12] This skill is paramount for refining the depth and applicability of
LLMs in complex scenarios, driving advancements that hinge on nuanced
interpretations of cause and effect.

"My body cast a shadow over the grass." "The sun was rising." "The grass was
cut." Correct Hypothesis causenot cause Figure 1: Causal reasoning without
CARE-CA: Given the premise "My body cast a shadow over the grass.", the left
hypothesis, "The sun was rising," should be identified as the cause to arrive
at the correct hypothesis conclusion. "My body cast a shadow over the grass."
"The sun was rising." "The grass was cut." Correct Hypothesis “ConceptNet
Integration: ‘Shadows’ related to ‘light source’.” “Contextual Prompting:
Hypotheses contextualized with time of day.” “Counterfactual Reasoning: ‘What
if no light source?’ scenario.” “Improved Causal Reasoning: Correct hypothesis
identified with context and counterfactuals.” causenot cause Figure 2: Causal
Reasoning Enhanced with CARE-CA: Starting from a premise, causal hypotheses
are evaluated. Integration of external knowledge from ConceptNet enhances
understanding. Contextual prompting adapts hypotheses to the time of day.
Counterfactual reasoning explores alternative scenarios. Improved causal
reasoning is achieved by incorporating context and counterfactuals, leading to
the identification of the correct hypothesis.

Given the growing reliance on AI systems to make consequential, mission-
critical decisions, we need to enhance the causal reasoning capabilities of
LLMs [26, 29] revealed significant limitations in LLMs’ causal reasoning
capacities. While they may mimic causal language, most need a genuine
comprehension of causal mechanisms. This is concerning as it could propagate
misinformation or lead to unreliable predictions. Bridging this causal
reasoning gap is an active area of research.

Enhancing the causal reasoning abilities of LLMs can significantly impact
their reliability and trustworthiness across many applications. A more robust
causal understanding of LLMs could improve healthcare and public policy
decision-making[18]. It also promises to enhance interpretability and
transparency.

However, prevailing approaches need help with flexibility and depth of causal
inference. This paper delves into whether these advanced models, like BERT
[3], RoBERTa [15], XLM-RoBERTa [1], ALBERT [13], DeBERTa [7], Llama 2 [24], T5
[20], Mistral [9], GPT-3.5 [16], and Gemini Pro [23], can truly grasp and
articulate causal relationships, a cornerstone in the journey towards
Artificial General Intelligence (AGI). We explore this through a blend of
theoretical analysis and empirical investigation, focusing on the capability
of LLMs to comprehend and articulate causality in the literal sense.

Building on this foundation, we introduce the CARE-CA framework, a novel
architecture designed to amplify the causal reasoning competence of LLMs. The
CARE-CA framework is distinct in its use of explicit knowledge integration
from resources like ConceptNet [22] and implicit reasoning patterns derived
from models such as BERT. This dual approach bridges the gap between
knowledge-driven and data-driven inference. It enhances the model’s
performance across four critical domains of causal reasoning: Causal
Relationship Identification, Causal Discovery, Causal Explanation, and
Counterfactual Reasoning.

We present a comprehensive suite of evaluation metrics, including Accuracy,
F1, Precision, Recall, and Human Evaluation, to assess and compare the
performance of existing LLMs against our proposed CARE-CA framework.
Furthermore, we introduce a new dataset, CasualNet, which, we experimentally
demonstrate, boosts LLMs’ causal reasoning ability. CasualNet is poised to
serve as a benchmark for future advancements in this field, providing a
rigorous testing ground for emerging AI models.

By uniting explicit and implicit causal modules alongside contextual and
counterfactual enhancements, this research nudges LLMs towards improved causal
reasoning—a pivotal step in unraveling AI’s black box and realizing more
trustworthy, explainable systems.

##  2 Related Work

Various approaches have been explored in the literature to understand and
enhance causal reasoning with LLMs. For example, in this paper [29], the
authors assess the ability of LLMs to answer causal questions while discussing
their strengths and weaknesses. They discuss the potential of integrating
explicit and implicit causal modules to enhance LLMs’ capabilities in causal
reasoning. However, they do not provide a concrete architecture or
implementation.

The causal capabilities of LLMs and their implications in various fields such
as medicine, science, law, and policy have also been explored by [12]. They
dive deep into different types of causal reasoning tasks, presenting how
algorithms based on GPT-3.5 and GPT-4 outperform existing algorithms in tasks
like pairwise causal discovery, counterfactual reasoning, and actual
causality.

We aim to enhance the effectiveness of all four aspects of causal reasoning in
addition to what has been done in [31]. Our method will enhance causal
reasoning by incorporating explicit knowledge from knowledge graphs such as
ConceptNet.

[28] critically examined the capabilities of LLMs in causal reasoning and
inference while [29] argue that although LLMs can mimic causal language, they
lack genuine causal understanding, coining the term “causal parrots”.

Through meta-structural causal models, [14] reveal limitations in LLMs’ causal
reasoning. They find that LLMs trained on code (Code-LLMs) outperform text-
only models in abductive and counterfactual reasoning, highlighting the value
of programming structure for causal abilities.

Other papers have explored integrating LLMs into research workflows. [2] have
proposed an AI assistant using LLMs and causal AI to systematically review
manuscripts and provide feedback to improve causal analysis in epidemiology.
[25] demonstrate that domain-specific fine-tuning enhances LLM performance on
patient safety and pharmacovigilance tasks demanding accuracy.

There has been growing research that examines the symbolic capabilities[27] of
LLMs. [17] challenges criticisms about LLMs’ lack of extended structure and
meaning grounding, arguing more research is needed to understand their
linguistic representations. Ji et al. [8] utilize causal graphs to map complex
pathways between prompts and code generation, improving transparency.

Applications and limitations of LLMs are also analyzed. [5] survey diverse
applications but highlight ethical concerns, biases, and resource demands.
Comparing inductive reasoning between humans and LLMs, [6] find similarities
and differences in specific reasoning areas.

Other work focuses on evaluation and security. [10] developed a benchmark for
assessing LLMs’ causal reasoning through symbolic questions. [30] reveal
overfitting risks from human feedback and neurons disproportionately
influencing outputs, demonstrating LLMs’ attack vulnerabilities. [31]
systematically categorizes LLM evaluations into knowledge, reasoning,
reliability, and safety competencies.

Enhancements to Related Work: The inclusion of “Causal Parrots: Large Language
Models May Talk Causality But Are Not Causal” [28], and subsequent studies
provide a critical foundation for understanding the current state of LLMs in
the realm of causal reasoning. Our framework, CARE-CA, builds on these
insights by offering a concrete architecture and implementation designed to
overcome the highlighted limitations. Specifically, CARE-CA’s novel
integration of explicit and implicit causal modules aims to endow LLMs with a
more profound, genuine capacity for causal understanding and inference.

Furthermore, our methodological advancements are showcased through the
development and utilization of the CausalNet dataset, specifically designed to
benchmark and refine the causal reasoning capabilities of LLMs. By focusing on
the four key aspects of causal reasoning—Causal Relationship Identification,
Counterfactual Reasoning, Causal Discovery, and Causal Explanation—CARE-CA
represents a comprehensive approach to enhancing LLMs’ causal reasoning
faculties.

##  3 Approach

CARE-CA Hybrid Causal LLM Framework: Our approach combines the explicit,
structured causal reasoning of ConceptNet knowledge graphs coupled with
counterfactual sentences to improvise the causal understanding of LLMs. This
novel architecture aims to surpass traditional decoder or encoder-only models
by leveraging the rich semantic knowledge base of ConceptNet with advanced
contextual inference capabilities and ’alternate scenarios’ of the contextual
sentences to further aid the LLMs in understanding the causality of scenarios.

We are proposing a novel approach called CARE-CA, designed to enhance AI
systems’ causal reasoning capabilities. This methodology is particularly adept
at integrating rich contextual information and exploring counterfactual
scenarios to arrive at a more robust understanding of causality in complex
problems.

Critical Components of the CARE-CA Framework:

1\. Contextual Knowledge Integrator (CKI): CKI enriches the AI’s reasoning
process with relevant external knowledge from databases like ConceptNet,
providing a deep contextual backdrop against which causal relationships can be
examined.

2\. Counterfactual Reasoning Enhancer (CRE): CRE introduces hypothetical
‘what-if’ scenarios to test and refine the AI’s causal inferences, ensuring
that identified causal links are robust and not merely correlational.

3\. Context-Aware Prompting Mechanism (CAPM): CAPM crafts tailored prompts
that encapsulate enriched context and counterfactual insights, directing Large
Language Models toward more precise and accurate causal reasoning.

Prompt Example for COPA Dataset: “Shadows are formed when a light source
illuminates an object, creating a dark area on the opposite side. Given that
‘My body cast a shadow over the grass,’ which hypothesis seems more plausible
based on the understanding of shadows?

Counterfactual statement: “If the grass was on fire, my shadow would have been
the least of my concerns.”

‘The sun was rising,’ providing the light that cast the shadow. ‘The grass was
cut,’ which is a condition unrelated to shadow formation.

##  4 Experiments

###  4.1 Data

To develop and evaluate our CARE-CA framework, we employed six distinct
datasets. Each dataset serves a specific function within our research, ranging
from training the model’s causal reasoning capabilities to evaluating its
performance in various causal reasoning tasks. All experiments were performed
with a dataset split of 75%-25% for train test sets, and 3 runs were conducted
for each dataset model combination. Dataset for Causal Reasoning
Identification (CRI):

  * •

CLadder and Com2Sense: Composition: Derived from narrative texts, these
datasets are crafted to pinpoint explicit causal links within a narrative
context.
Purpose: They provide foundational training for the model’s explicit causal
reasoning abilities, allowing it to recognize and understand causal
relationships within complex text structures.

Dataset for Counterfactual Reasoning (CR):

  * •

TimeTravel: Composition: This dataset presents hypothetical scenarios that
challenge the model to reason about events that did not occur.
Purpose: It is crucial for enhancing the model’s counterfactual reasoning,
teaching it to contemplate different possibilities and their implications.

Dataset for Causal Discovery:

  * •

COPA and e-care: Composition: COPA focuses on scenarios that require
understanding potential outcomes and alternate realities, while e-care
contains medical narratives that add domain-specific intricacies.
Purpose: These datasets are utilized to challenge the model in discovering
underlying causal mechanisms within varied and domain-specific contexts.

Each dataset contributes uniquely to the robustness of the CARE-CA framework,
ensuring comprehensive coverage across the spectrum of causal reasoning tasks.

Proposed Dataset: We also propose a new dataset called CausalNet. The
CausalNet dataset is a valuable resource designed to facilitate causal
reasoning and counterfactual analysis research. Comprising 1000 carefully
curated scenarios, this dataset presents a diverse set of causal and
counterfactual questions, allowing researchers to explore the intricacies of
cause-and-effect relationships in various contexts.

Each entry in CausalNet consists of the following components:

Context A detailed narrative context provides the backdrop for each scenario.
These narratives describe situations where multiple events or factors
coincide, potentially influencing outcomes. The contexts are designed to be
realistic and thought-provoking, setting the stage for causal reasoning and
counterfactual exploration.

Causal Questions For each scenario, a set of causal questions is provided to
challenge the models’ abilities in causal reasoning. These questions are
categorized into two main types:

Cause-Effect Questions: These questions prompt models to identify less obvious
factors that may have contributed to observed outcomes. Models must discern
the subtle interplay of various events or conditions in determining the
outcome.

Counterfactual Questions: Counterfactual questions explore how changes in the
scenario’s main cause might impact the outcome. Models are evaluated based on
their capacity to predict the consequences of hypothetical alterations to the
causal factor.

Choices and Answers Each question is accompanied by a set of choices, one
designated as the correct answer. For cause-effect questions, the choices
represent potential influencing factors, while for counterfactual questions,
the choices depict possible outcomes under different circumstances. The
correct answers are carefully labeled to facilitate evaluation.

The CausalNet dataset contributes to advancing natural language understanding
and reasoning capabilities. It enables researchers to explore and enhance
models’ causal reasoning skills, paving the way for more interpretable and
context-aware AI systems.

###  4.2 Experimental Details

Our CARE-CA framework underwent rigorous testing on encoder and decoder
models, targeting four distinct causal reasoning tasks: Causal Relationship
Identification, Counterfactual Reasoning, and Causal Discovery. The
experiments were designed to evaluate the framework’s comprehensive
capabilities in understanding and processing causal information.

4.2.1. Causal Relationship Identification:

Objective: Assess CARE-CA’s proficiency in recognizing explicit causal links
within narrative contexts.

Dataset Used: CLadder[11] and Com2sense[21], chosen for their rich narrative
structures and explicit causal statements.

Procedure: CARE-CA parses narrative texts to pinpoint and articulate the
causal connections between events or actions.

Evaluation Metrics: We measure performance using Accuracy to accurately
capture the model’s effectiveness in accurately identifying causal relations.

4.2.2. Counterfactual Reasoning:

Objective: Examine CARE-CA’s ability to reason with hypothetical scenarios and
their implications for understanding potential outcomes.

Dataset Used: timetravel[19], selected for its counterfactual scenarios that
challenge models to think beyond the actual events.

Procedure: The framework generates counterfactual statements based on given
scenarios, demonstrating its understanding of how different conditions might
alter outcomes.

Evaluation Metrics: Accuracy in counterfactual generation and the Quality of
Counterfactual Statements, assessed by human evaluators for depth and realism.

4.2.3. Causal Discovery:

Objective: Test CARE-CA’s capability to unearth hidden or implicit causal
relationships within complex scenarios.

Dataset Used: COPA and e-care[4] provide diverse contexts for causal
discovery, from abstract reasoning to domain-specific (medical) narratives.

Procedure: CARE-CA analyzes texts to identify underlying causal mechanisms
that are not explicitly mentioned, leveraging both contextual cues and
counterfactual reasoning.

Evaluation Metrics: Discovery Accuracy to evaluate how often CARE-CA correctly
identifies new causal links, and the Novelty of Discoveries to gauge the
uniqueness and insightfulness of the uncovered causal relationships.

Implementation Notes: Across all tasks, CARE-CA integrates explicit knowledge
from ConceptNet and what-if scenarios from counterfactual to enhance
structured causal reasoning abilities. This combination allows CARE-CA to
approach causal reasoning tasks with a level of sophistication and nuance that
mirrors human cognitive processes, setting a new standard for AI in causal
reasoning.

###  4.3 Results

Evaluating our proposed CARE-CA framework and comparing existing LLMs across
different causal reasoning tasks yielded insightful findings. The performance
was quantitatively assessed through mean accuracy, precision, recall, and F1
scores, revealing the nuanced capabilities of each model in handling complex
causal reasoning scenarios.

Causal Discovery: In causal discovery, our method showcased superior accuracy
(76%) on the COPA dataset, emphasizing the framework’s strength in integrating
contextual and counterfactual insights to uncover underlying causal
mechanisms. Interestingly, GPT-3.5 and Gemini Pro also performed well, with
accuracies of 73.3% and 70.1%, respectively, indicating their potential in
learning causal patterns. The lower performance of models like XLM-RoBERTa and
DeBERTa, with accuracies of 53.2% and 51.8%, respectively, could stem from
their less effective handling of the dataset’s counterfactual and causal
scenarios without specific fine-tuning. On the Ecare dataset, our method also
performed well with 85.9% accuracy, compared to the next closest decoder model
performance of T5 at 84%

Causal Relationship Identification: On the Cladder dataset, the CARE-CA model
led with a standout performance, achieving a 63% accuracy, indicating its
strong capability to identify causal relationships. Decoder models like BERT
and RoBERTa also showed commendable efforts, with BERT achieving a 53%
accuracy and RoBERTa at 50.3%, showcasing their utility in parsing complex
narratives for causal reasoning, albeit with varying degrees of success across
metrics. The decoder model T5 highlighted its proficiency with a balanced
performance, showcasing the effectiveness of its decoding capabilities in
causal reasoning tasks.

On the Com2sense dataset, the decoder models encountered diverse challenges,
with CARE-CA again leading at 67.1% accuracy, suggesting its consistent
ability to navigate causal reasoning tasks. Decoder models like T5 and Gemini
Pro demonstrated significant adaptability, achieving accuracies of 65.4% and
65.8%, respectively, underscoring their potential in handling nuanced
reasoning tasks.

On our CausalNet dataset, CARE-CA’s remarkable accuracy of 94.6% sets a high
benchmark, emphasizing the model’s superior causal reasoning capabilities. The
T5 decoder model mirrored this high performance with a 94.2% accuracy,
showcasing the strength of decoder architectures in extracting and
interpreting causal relationships from data.

Counterfactual Reasoning: The time-travel dataset, focused on counterfactual
reasoning, highlighted models’ challenges in understanding hypothetical
scenarios. Roberta achieved the highest performance among the models tested,
with an accuracy of 68.78%, potentially due to its robust contextual
understanding capabilities. The Gemini Pro and Llama models scored 38.4% and
24.2%, respectively, suggesting that despite their extensive training data,
they might struggle with tasks requiring deep counterfactual inference,
underscoring the importance of specialized training or prompting for such
tasks.T5 and GPT 3.5 models performed well with 61.7% and 63.2% respectively.
Our method got a slight jump in accuracy from the best-performing decoders;
however, due to information overload, it could not compete with relatively
more straightforward encoders such as ALBERT with 68% accuracy.

Figure 3: From the experimental results, it is evident that the CARE-CA model consistently outperforms other models across various datasets and tasks in causal reasoning. In causal discovery tasks using the COPA dataset, CARE-CA achieved the highest mean accuracy of 76% compared to other models while in counterfactual reasoning and causal reasoning identification tasks, CARE-CA demonstrated superior performance, achieving mean accuracies of 69.4% and 63%, respectively. Notably, on our CasualNet dataset, CARE-CA achieved exceptional results with a mean accuracy of 94.6%, showcasing its effectiveness in causal reasoning tasks across different contexts. Experiment | Dataset | Model | Mean Accuracy | Mean F1 | Mean Precision | Mean Recall
---|---|---|---|---|---|---
Causal Discovery | COPA | CARE-CA | 76.0 | 82.3 | 1.0 | 78.1
BERT | 69.2 | 66.3 | 70.0 | 68.6
RoBERTa | 57.2 | 56.2 | 58.3 | 61.1
XLM-RoBERTa | 53.2 | 47.0 | 52.1 | 56.2
ALBERT | 62.2 | 63.1 | 64.0 | 66.2
DeBERTa | 51.8 | 0.0 | 0.0 | 0.0
Llama2 | 62.4 | 56.0 | 87.0 | 68.0
T5 | 53.5 | 1.0 | 54.0 | 70.0
Mistral | 67.2 | 67.2 | 1.0 | 87.1
GPT-3.5 | 73.3 | 78 | 1.0 | 87.5
Gemini Pro | 70.1 | 1.0 | 70.1 | 82.4
Ecare | CARE-CA | 85.9 | 88.8 | 84.6 | 82.9
| BERT | 50 | 39.4 | 66 | 47.6
| RoBERTa | 49.7 | 51.5 | 50.8 | 73.1
| XLM-RoBERTa | 48.2 | 58.7 | 46.7 | 84.2
| ALBERT | 47.7 | 41.4 | 50.9 | 57.7
| DeBERTa | 46.6 | 63.6 | 46.6 | 100.0
| Llama2 | 62.2 | 60.0 | 63.8 | 56.7
| T5 | 84 | 84.8 | 80.5 | 89.6
| Mistral | 50 | 49.9 | 50 | 49.9
| GPT-3.5 | 77.8 | 75.9 | 83.3 | 69.7
| Gemini Pro | 67.8 | 63.0 | 74.4 | 54.5
Counterfactual Reasoning | Timetravel | CARE-CA | 69.4 | 40.1 | 20.2 | 13.5
BERT | 56.3 | 6.0 | 11.0 | 5.0
RoBERTa | 68.7 | 3.0 | 9.0 | 2.0
XLM-RoBERTa | 56.9 | 5.0 | 10.0 | 3.0
ALBERT | 68 | 6.0 | 11.2 | 4.0
DeBERTa | 58.1 | 6.0 | 11.0 | 4.0
Llama2 | 24.2 | 1.0 | 1.0 | 5.0
|  | T5 | 63.2 | 19.1 | 12.7 | 38.2
|  | Mistral | 27.5 | 2.0 | 1.0 | 6.0
|  | GPT 3.5 | 61.7 | 8.0 | 5.0 | 14.7
|  | Gemini Pro | 38.4 | 17.4 | 10.2 | 57.3
Causal Reasoning Identification | Cladder | CARE-CA | 63.0 | 62.5 | 61.9 | 62.5
BERT | 53.0 | 48.6 | 52.3 | 52.4
RoBERTa | 50.3 | 65.2 | 50.3 | 100.0
XLM-RoBERTa | 49.5 | 64.3 | 49.5 | 99.3
ALBERT | 49.4 | 46.2 | 40.5 | 68.9
DeBERTa | 49.8 | 22.1 | 18.0 | 33.2
Llama2 | 48.0 | 60.0 | 47.0 | 82.0
T5 | 60.0 | 59.0 | 59.0 | 59.0
Mistral | 51.0 | 59.0 | 52.0 | 70.0
GPT 3.5 | 52.0 | 54.0 | 53.0 | 55.0
|  | Gemini Pro | 59.0 | 65.0 | 57.0 | 76.0
| Com2sense | CARE-CA | 67.1 | 28.6 | 25.7 | 32.3
| BERT | 44.6 | 59.2 | 44.9 | 96.0
| RoBERTa | 45.5 | 1.0 | 3.0 | 1.0
| XLM-RoBERTa | 50.4 | 51.4 | 45.0 | 60.0
| ALBERT | 51.2 | 35.0 | 25.0 | 30.0
| DeBERTa | 45.3 | 60.0 | 45.6 | 96.5
| Llama2 | 50 | 20.0 | 10.0 | 13.3
| T5 | 65.4 | 63.4 | 46.2 | 53.4
| Mistral | 54.3 | 69.1 | 71.7 | 70.4
| GPT 3.5 | 62.8 | 23.2 | 30.4 | 28.0
| Gemini Pro | 65.8 | 25.2 | 31.6 | 28.0
| CasualNet | CARE-CA | 94.6 | 95.4 | 95 | 95.4
| BERT | 39.0 | 21.8 | 15.2 | 39.0
| RoBERTa | 38.0 | 20.9 | 14.4 | 38.0
| XLM-RoBERTa | 37.5 | 20.4 | 14.9 | 37.5
| ALBERT | 33.8 | 19.3 | 27.2 | 33.8
| DeBERTa | 33.5 | 25.8 | 22.0 | 33.5
| Llama2 | 27.3 | 23.8 | 51.3 | 27.3
| T5 | 94.2 | 94.5 | 95.0 | 94.2
| Mistral | 36.8 | 29.2 | 60.9 | 36.8
| GPT 3.5 | 70.3 | 70.9 | 84.6 | 70.3
| Gemini Pro | 79.5 | 80.0 | 83.8 | 79.5
Table 1: The table summarizes performance metrics Accuracy, Precision, Recall
and F1 scores of Encoders - Bert, RoBERTa, ALBERT, DeBERTa, XML-RoBERTa as
well as Decoders- GPT 3.5, Gemini Pro, Mistral, T5 and Llama2 on three
different tasks including Causal Discovery on datasets COPA and ecare,
Counterfactual reasoning on dataset Timetravel and Causal Discovery on dataset
CLadder and Com2sense and CausalNet.

##  5 Analysis

The observed performances underscore the complexity of causal reasoning tasks
and the varying abilities of models to address them. The CARE-CA framework’s
superior performance across several tasks suggests that its hybrid approach,
which leverages explicit causal knowledge and counterfactual reasoning,
significantly enhances causal inference capabilities. Models like BERT and
RoBERTa exhibit strong foundational abilities in causal reasoning, likely
benefiting from their diverse pre-training. However, tasks requiring nuanced
understanding or domain-specific knowledge, such as counterfactual reasoning
and causal explanation, highlight the limitations of general-purpose models
and the value of specialized training or frameworks like CARE-CA.

Integrating human evaluation into our study was pivotal in assessing the
nuanced capabilities of the CARE-CA framework, particularly in tasks where
subjective judgment and a deep understanding of context are crucial. To this
end, we conducted a comprehensive study involving 100 examples spanning our
four critical causal reasoning tasks: Causal Relationship Identification,
Counterfactual Reasoning, and Causal Discovery.

Human Evaluation Methodology:

We also performed human evaluations for the COPA dataset on 100 samples. The
evaluator was presented with examples where the CARE-CA framework and other
leading LLMs (such as BERT, RoBERTa, and GPT-3.5) responded. The evaluators
were tasked with rating the responses based on several criteria:

\- Accuracy: The correctness of the causal relationships identified or
inferred by the models.

\- Coherence: How logically consistent and understandable the responses were.

\- Depth of Reasoning: The extent to which the model’s response demonstrated
an understanding of the underlying causal mechanisms.

\- Relevance: The applicability of the response to the given causal question
or scenario.

Study Findings: The human evaluators consistently rated the CARE-CA framework
higher in coherence and depth of reasoning across all tasks, indicating its
superior ability to generate responses that identified causal relationships
and provided insightful explanations of the ‘why’ and ‘how’ behind them.
Specifically, in the Counterfactual Reasoning and Causal Explanation tasks,
CARE-CA outperformed other models significantly, reflecting its enhanced
capability to deal with complex, hypothetical scenarios and to articulate
detailed causal narratives.

The human evaluation also highlighted areas for improvement. Feedback from
evaluators pointed to occasional challenges in handling highly domain-specific
scenarios, especially in the e-care dataset, suggesting an avenue for further
refining CARE-CA’s domain adaptation capabilities.

##  6 Conclusion & Future Work

In this project, we have designed and implemented a causal reasoning module.
Our system works well under restrictive token constraints.
Future Directions: These results pave the way for further research into hybrid
models that combine the breadth of knowledge from resources like ConceptNet
with the depth of understanding inherent in LLMs. Fine-tuning strategies,
domain-specific model adaptations, and developing more comprehensive
benchmarks like CausalNet are promising areas for future exploration.

##  7 Limitations

In our research on the efficacy of causal reasoning in LLMs through the CARE-
CA framework, we encountered several limitations that highlight areas for
future exploration and improvement. Firstly, we were able to run CARE-CA only
on best performing decoders of each dataset and compare the results. The
comparison of CARE-CA on all decoders as well as on all encoders was a
challenge due to computational resource constraints. Secondly, our focus on
English limits the generalizability of our findings across languages and
cultures; this opens a door for a need for multilingual datasets and cross-
cultural validation. The challenge of applying our general causal reasoning
framework effectively in domain-specific scenarios, such as those presented in
the e-care dataset, indicates an opportunity for refining its adaptability to
specialized fields. Additionally, the significant computational resources
required by the CARE-CA framework may limit accessibility for those with
constrained computational budgets, pointing to a need for optimization
strategies. While CARE-CA enhances interpretability in causal reasoning tasks,
further research is required to improve transparency and explain the model’s
reasoning processes, especially for non-expert users. These limitations
underscore the necessity for ongoing research to enhance the efficacy,
inclusiveness, and applicability of causal reasoning models and invite the
broader research community to address these challenges collaboratively.

##  8 Ethics Statement

Ethical considerations are paramount in research, particularly when LLMs are
involved. We have strived to prevent the propagation of bias within CausalNet,
the dataset we introduced in this work, by carefully curating and filtering
the data to mitigate the inclusion of sensitive or discriminatory content.
Furthermore, we have committed to transparency regarding the dataset’s origins
and potential implications, acknowledging the ethical responsibilities of
conducting research with LLMs.

## References

  * Conneau et al. [2019] Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettlemoyer, and Veselin Stoyanov. 2019.  Unsupervised cross-lingual representation learning at scale.  _arXiv preprint arXiv:1911.02116_.
  * Cox [2024] Louis Anthony Cox. 2024.  An ai assistant to help review and improve causal reasoning in epidemiological documents.  _Global Epidemiology_ , 7:100130.
  * Devlin et al. [2018] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018.  Bert: Pre-training of deep bidirectional transformers for language understanding.  _arXiv preprint arXiv:1810.04805_.
  * Du et al. [2022] Li Du, Xiao Ding, Kai Xiong, Ting Liu, and Bing Qin. 2022.  e-care: a new dataset for exploring explainable causal reasoning.  Submitted on 12 May 2022.
  * Hadi et al. [2023] Muhammad Usman Hadi, Qasem Al-Tashi, Rizwan Qureshi, Abbas Shah, Amgad Muneer, Muhammad Irfan, Anas Zafar, Muhammad Shaikh, Naveed Akhtar, Jia Wu, and Seyedali Mirjalili. 2023.  Large language models: A comprehensive survey of its applications, challenges, limitations, and future prospects.
  * Han et al. [2024] Simon Jerome Han, Keith J. Ransom, Andrew Perfors, and Charles Kemp. 2024.  Inductive reasoning in humans and large language models.  _Cognitive Systems Research_ , 83:101155.
  * He et al. [2020] Pengcheng He, Xiaodong Liu, Jianfeng Gao, and Weizhu Chen. 2020.  Deberta: Decoding-enhanced bert with disentangled attention.  _arXiv preprint arXiv:2006.03654_.
  * Ji et al. [2023] Zhenlan Ji, Pingchuan Ma, Zongjie Li, and Shuai Wang. 2023.  Benchmarking and explaining large language model-based code generation: A causality-centric approach.
  * Jiang et al. [2023] Albert Q Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, et al. 2023.  Mistral 7b.  _arXiv preprint arXiv:2310.06825_.
  * Jin et al. [2024] Zhijing Jin, Yuen Chen, Felix Leeb, Luigi Gresele, Ojasv Kamal, Zhiheng Lyu, Kevin Blin, Fernando Gonzalez Adauto, Max Kleiman-Weiner, Mrinmaya Sachan, and Bernhard Schölkopf. 2024.  Cladder: Assessing causal reasoning in language models.
  * Jin et al. [2023] Zhijing Jin, Yuen Chen, Felix Leeb, Luigi Gresele, Ojasv Kamal, Zhiheng Lyu, Kevin Blin, Fernando Gonzalez Adauto, Max Kleiman-Weiner, Mrinmaya Sachan, and Bernhard Schölkopf. 2023.  Cladder: Assessing causal reasoning in language models.  NeurIPS 2023; updated with CLadder dataset v1.5.
  * Kıçıman et al. [2023] Emre Kıçıman, Robert Ness, Amit Sharma, and Chenhao Tan. 2023.  Causal reasoning and large language models: Opening a new frontier for causality.
  * Lan et al. [2019] Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. 2019.  Albert: A lite bert for self-supervised learning of language representations.  _arXiv preprint arXiv:1909.11942_.
  * Liu et al. [2023] Xiao Liu, Da Yin, Chen Zhang, Yansong Feng, and Dongyan Zhao. 2023.  The magic of if: Investigating causal reasoning abilities in large language models of code.
  * Liu et al. [2019] Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019.  Roberta: A robustly optimized bert pretraining approach.  _arXiv preprint arXiv:1907.11692_.
  * [16] OpenAI.  https://platform.openai.com/docs/introduction.
  * Pavlick [2023] Ellie Pavlick. 2023.  Symbols and grounding in large language models.  _Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences_ , 381.
  * Peña et al. [2023] Alejandro Peña, Aythami Morales, Julian Fierrez, Ignacio Serna, Javier Ortega-Garcia, Iñigo Puente, Jorge Cordova, and Gonzalo Cordova. 2023.  Leveraging large language models for topic classification in the domain of public affairs.  Accepted in ICDAR 2023 Workshop on Automatic Domain-Adapted and Personalized Document Analysis.
  * Qin et al. [2019] Lianhui Qin, Antoine Bosselut, Ari Holtzman, Chandra Bhagavatula, Elizabeth Clark, and Yejin Choi. 2019.  Counterfactual story reasoning and generation.  In _Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)_ , pages 5043–5053, Hong Kong, China. Association for Computational Linguistics.
  * Raffel et al. [2020] Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. 2020.  Exploring the limits of transfer learning with a unified text-to-text transformer.  _The Journal of Machine Learning Research_ , 21(1):5485–5551.
  * Singh et al. [2021] Shikhar Singh, Nuan Wen, Yu Hou, Pegah Alipoormolabashi, Te-Lin Wu, Xuezhe Ma, and Nanyun Peng. 2021.  Com2sense: A commonsense reasoning benchmark with complementary sentences.  In _Findings of the Association for Computational Linguistics: ACL 2021_.  In Proceedings of Findings of the Association for Computational Linguistics: ACL 2021 (ACL-Findings). Contains 16 pages, 14 figures, and 11 tables.
  * Speer et al. [2017] Robyn Speer, Joshua Chin, and Catherine Havasi. 2017.  Conceptnet 5.5: An open multilingual graph of general knowledge.  pages 4444–4451.
  * Team et al. [2023] Gemini Team, Rohan Anil, Sebastian Borgeaud, Yonghui Wu, Jean-Baptiste Alayrac, Jiahui Yu, Radu Soricut, Johan Schalkwyk, Andrew M Dai, Anja Hauth, et al. 2023.  Gemini: a family of highly capable multimodal models.  _arXiv preprint arXiv:2312.11805_.
  * Touvron et al. [2023] Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023.  Llama 2: Open foundation and fine-tuned chat models.  _arXiv preprint arXiv:2307.09288_.
  * Wang et al. [2023] Xingqiao Wang, Xiaowei Xu, Zhichao Liu, and Weida Tong. 2023.  Bidirectional encoder representations from transformers-like large language models in patient safety and pharmacovigilance: A comprehensive assessment of causal inference implications.  _Experimental Biology and Medicine_ , 248(21):1908–1917.  PMID: 38084745.
  * Weng et al. [2023] Yixuan Weng, Minjun Zhu, Fei Xia, Bin Li, Shizhu He, Shengping Liu, Bin Sun, Kang Liu, and Jun Zhao. 2023.  Large language models are better reasoners with self-verification.  In _Findings of the Association for Computational Linguistics: EMNLP 2023_ , pages 2550–2575.
  * Xu [2021] Yang Xu. 2021.  Global divergence and local convergence of utterance semantic representations in dialogue.  In _Proceedings of the Society for Computation in Linguistics 2021_ , pages 116–124, Online. Association for Computational Linguistics.
  * Zečević et al. [2023] Matej Zečević, Moritz Willig, Devendra Singh Dhami, and Kristian Kersting. 2023.  Causal parrots: Large language models may talk causality but are not causal.  _arXiv preprint arXiv:2308.13067_.
  * Zhang et al. [2023] Cheng Zhang, Stefan Bauer, Paul Bennett, Jiangfeng Gao, Wenbo Gong, Agrin Hilmkil, Joel Jennings, Chao Ma, Tom Minka, Nick Pawlowski, and James Vaughan. 2023.  Understanding causality with large language models: Feasibility and opportunities.
  * Zhao et al. [2023] Wei Zhao, Zhe Li, and Jun Sun. 2023.  Causality analysis for evaluating the security of large language models.
  * Zhuang et al. [2023] Ziyu Zhuang, Qiguang Chen, Longxuan Ma, Mingda Li, Yi Han, Yushan Qian, Haopeng Bai, Zixian Feng, Weinan Zhang, and Ting Liu. 2023.  Through the lens of core competency: Survey on evaluation of large language models.

## Frequently Asked Questions (FAQs)

  1. 1.

What were the reason for choosing these specific set of models- encoders and
decoders

We selected the encoders - Bert, RoBERTa, ALBERT, DeBERTa, XML-RoBERTa as well
as Decoders- GPT 3.5, Gemini Pro, Mistral, T5 and Llama2 based on the most
commonly used models in research. We wanted to create a comprehensive study
and analysis on these high performing and widely used models as a baseline for
future enhancement in the area of Causal reasoning.

  2. 2.

What were the reason for choosing these specific set of models- encoders and
decoders

We selected the encoders - Bert, RoBERTa, ALBERT, DeBERTa, XML-RoBERTa as well
as Decoders- GPT 3.5, Gemini Pro, Mistral, T5 and Llama2 based on the most
commonly used models in research. We wanted to create a comprehensive study
and analysis on these high performing and widely used models as a baseline for
future enhancement in the area of Causal reasoning.

  3. 3.

Why did you choose CARE-CA as your approach?

While running experiments with just encoders and decoders, we realized that
these models are not very good at causal reasoning tasks and miss on the
knowledge needed to help them understand the scenario better. Hence we added
knowledge from the Conceptnet knowledge graph. Even after adding the
knowledge, we realized this can be further enhanced, if the LLM’s can leverage
additional what if scenarios using counterfactual statements, that guide them
in rejecting hypothesis that are not causal.

  4. 4.

Why did you just run the CARE-CA approach on decoders?

While our approach can be applied to encoders as well, we will need fine-
tuning due to token limits of encoders. Due to resource constraints, we could
not explore and run experiments on encoders with CARE-CA approach, but hoping
to produce these results that can be used for further research and
enhancement.

  5. 5.

How did you create the dataset CausalNet?

We provide a CausalNet dataset, which can be a benchmark for causal reasoning
tasks for furture research. The idea was to include causal statements that are
currently not supported well by decoders, and have multiple causal reasoning
tasks in one dataset. Our dataset has 1000 rows of scenarios with both Causal
reasoning identification as well as Counterfactual reasoning. We used ChatGPT
to create the dataset.

##  Appendix A Appendix

####  A.0.1 Detailed run on COPA

Table 2: Detailed model Performance on the COPA Dataset with three runs
capturing Accuracy, Precision, Recall, and F1 Score

Model | Run | Metrics
---|---|---
|  | Manual Accuracy | Sklearn Accuracy | F1 | Precision | Recall | Mean Accuracy | Mean F1 | Mean Precision | Mean Recall
BERT-base-uncased | 1 | 0.7400 | 0.7461 | 0.7067 | 0.7385 | 0.7349 | 0.6893 | 0.6927 | 0.6635 | 0.7003
2 | 0.6600 | 0.6562 | 0.6573 | 0.6755 | 0.6886 |  |  |  |
3 | 0.6680 | 0.6758 | 0.6264 | 0.6870 | 0.6348 |  |  |  |
RoBERTa-base | 1 | 0.6640 | 0.6484 | 0.6582 | 0.6876 | 0.6653 | 0.5787 | 0.5729 | 0.5624 | 0.5833
2 | 0.6000 | 0.5977 | 0.5735 | 0.5699 | 0.6580 |  |  |  |
3 | 0.4720 | 0.4727 | 0.4554 | 0.4923 | 0.5116 |  |  |  |
XLM-RoBERTa-base | 1 | 0.5640 | 0.5625 | 0.5376 | 0.5413 | 0.6153 | 0.5373 | 0.5326 | 0.4709 | 0.5210
2 | 0.5000 | 0.5000 | 0.4375 | 0.5413 | 0.6153 |  |  |  |
3 | 0.5480 | 0.5352 | 0.4375 | 0.4804 | 0.4574 |  |  |  |
ALBERT-base-v2 | 1 | 0.6280 | 0.6297 | 0.6382 | 0.6625 | 0.6308 | 0.6240 | 0.6226 | 0.6310 | 0.6406
2 | 0.6560 | 0.6523 | 0.6473 | 0.6550 | 0.6845 |  |  |  |
3 | 0.5880 | 0.5859 | 0.6075 | 0.6044 | 0.6725 |  |  |  |
DeBERTa-base | 1 | 0.5480 | 0.5461 | 0.0000 | 0.0000 | 0.0000 | 0.5200 | 0.5182 | 0.0000 | 0.0000
2 | 0.4920 | 0.4894 | 0.0000 | 0.0000 | 0.0000 |  |  |  |
3 | 0.5200 | 0.5191 | 0.0000 | 0.0000 | 0.0000 |  |  |  |

####  A.0.2 Causal Explanation

We also experimented with Causal Explanation task, which lies at the core of
understanding why things happen. rather than simply observing patterns or
connections, which may not necessarily reveal causality, it delves deeper to
pinpoint the direct cause-and-effect links between variables. This involves
unraveling how certain factors or actions directly produce a specific outcome.
Its significance spans across a wide range of disciplines, such as philosophy,
science, social sciences, medicine, and engineering, as it enables us to grasp
the intricate workings of complex systems and foresee the effects of altering
certain variables.

We used the ecare dataset which has the following example scenario -
cause: "The woman gave birth to a child.
effect: "The child brought psycho-physical phenomena on a new life.
conceptualexplanation: "Birth is the arising of the psycho-physical
phenomena."
We used Rouge and BLEU score to evaluate the performance of the generated
response.


Copyright for this paper by its authors. Use permitted under Creative Commons
License Attribution 4.0 International (CC BY 4.0).

VLDB 2023 PhD Workshop, co-located with the 49th International Conference on
Very Large Data Bases (VLDB 2023), August 28, 2023, Vancouver, Canada

[orcid=0009-0007-6180-364X<EMAIL_ADDRESS>]

# Improving Data Minimization through Decentralized Data Architectures

Ilaria Battiston  supervised by Peter Boncz  Centrum Wiskunde & Informatica,
Amsterdam, The Netherlands

(2023)

###### Abstract

In this research project, we investigate an alternative to the standard cloud-
centralized data architecture. Specifically, we aim to leave part of the
application data under the control of the individual data owners in
decentralized personal data stores. Our primary goal is to increase data
minimization, i. e., enabling more sensitive personal data to be under the
control of its owners while providing a straightforward and efficient
framework to design architectures that allow applications to run and data to
be analyzed. To serve this purpose, the centralized part of the schema
contains aggregating views over this decentralized data. We propose to design
a declarative language that extends SQL, for architects to specify different
kinds of tables and views at the schema level, along with sensitive columns
and their minimum granularity level of their aggregations. Local updates need
to be reflected in the centralized views while ensuring privacy throughout
intermediate calculations; for this we pursue the integration of distributed
materialized view maintenance and multi-party computation (MPC) techniques. We
finally aim to implement this system, where the personal data stores could
either live in mobile devices or encrypted cloud storage, in order to evaluate
its performance properties.

###### keywords:

distributed systems cloud declarative language multiparty computation

##  1 Introduction

Organizations almost invariably adopt a data architecture based on
centralization for their IT systems, retaining information in analytical
stores. Making an organization data-driven, i. e. relying more on data science
and machine learning for decision-making, is a driver for expanding data
architectures, strengthening the trend of widespread collection of personal
data through centralized and typically cloud-based systems. Such systems
facilitate data processing; however, they present concerns pertaining to
security and confidentiality. The organization is in control of all the user
data, causing owners, often private citizens, to lose control over this
sensitive data. Full centralisation of detail-level sensitive data increases
the exposure of the organization to ransomware attacks - as well as the needed
cloud resources.

In the PhD research plan outlined in this paper, we investigate partially
decentralized alternatives to the fully centralized state of affairs, to give
users more control over their personal data and reduce processing costs and
risks for organizations running applications. We thus aim for a generic
infrastructure that pushes the boundaries of data minimization [1], i. e.,
leaving more data under the control of its creators/owners while still
allowing easy construction of centralized applications, leveraging relational
database systems and their declarative properties.

This paper is structured as follows: Sections 2 and 3 motivate the need for
responsible decentralized architectures, along with open questions to be
foreseen based on the proposed system. Section 4 illustrates the research
background and previous approaches. Section 5 describes the envisioned
architecture, and we conclude and discuss the next steps in Section 6.

##  2 Motivation

Data minimization is the principle of limiting the data that an organization
collects to the minimum needed for the purpose [1], and is a crucial concept
in privacy regulations such as the GDPR.

Still, digital services often do need private information, so data
minimization in itself does not avoid sensitive user data being collected.
However, what is necessary for a purely centralized data architecture might
not be needed in the partially decentralized data architectures for which we
aim to develop a generic infrastructure.

A possible use case considers fitness tracker applications, whose popularity
has raised concerns regarding the privacy of collected personal data. For
example, this can include user profile information, activity statistics,
health metrics, and geographical coordinates. We argue that for showing the
top-10 runners in a circuit or the distribution of running times, it is not
necessary to bring all detail data to the central application database. Our
approach allows to decentralize sensitive details - such as health metrics and
the coordinates of runs - in personal data stores, and only transmit
aggregated running data to the central application database. A personal data
store is a personal database purely under the user’s control, e.g., a local
database kept on a personal device, and/or stored in a separate cloud service;
but encrypted with a personal key that only the user holds.

This project aims to reduce sensitive user data storage in central databases
without compromising user privacy, providing future application architects
with a simple solution without impacting their ability to create compelling
applications, while giving end users more control over their personal data.
Our research may also contribute to advances in differential privacy.

We focus on the design of a declarative framework in which information
architects can use SQL (i. e. relational database technology to leverage the
analytical properties of structured data) to split a data management
architecture between a centralized and decentralized part, as well as on a
secure implementation of this framework in a real system, and an evaluation of
its efficiency properties. This concept gives users ownership and
cryptographic security over their personal data stores, allowing an end-user
inspection of the aggregated queries ordered by the central database.

A major research question concerns privacy-preserving mechanisms for
incremental materialized view maintenance [2] in this setting: we want to hide
from the central database what each user’s individual contribution to a
sensitive materialized aggregate is.

As a platform for RDDA prototyping, we choose the open-source novel data
management system DuckDB [3], offering the ability to run analytical queries
efficiently even on low-power devices. However, since our framework strongly
relies on SQL, it will be easily portable.

##  3 Research Questions

The concepts proposed so far raise a number of research questions:

  1. 1.

How can we specify a decentralized data architecture in a declarative language
(e. g. a SQL extension), and what properties or constraints should it contain?

  2. 2.

How can we apply cryptographic techniques to incrementally maintain
materialized views in a manner that does not leak more than understandable
constraints stipulate, controlling the amount of privacy leakage?

  3. 3.

How can we help establish trust from end users, providing insight and control
over personal data and attesting that the service or application implementing
the framework plays by its rules?

##  4 Related Work

The best-known attempt at creating a unified personal data store is Tim
Berners Lee’s SOLID project111https://solidproject.org/, but this does not
envision central analytical queries. We think that giving centralized query
services access to analytics over whole fleets of personal datastores, via
privacy-controlled materialized views, will provide extra value that may help
adoption of the concept of personal data stores, which until now has been
lackluster.

Prior query-oriented decentralized infrastructures are mainly found in
specific applications, such as real-time cellular network analytics systems
exploiting geo-partitioning of input data [4]. Distributed and federated query
processing are also the subject of extensive research. However, these always
assume a free choice in data placement decisions [5, 6], rather than
ascertaining that personal data is kept private and under the control of the
end-user. Federated query processing systems also assume an online mode of
operation. Our assumption that only the end users can access their personal
data stores leads to an approach where updates from the user side must trickle
to a central query-answering facility later, which in turn leads to
incremental view maintenance (IVM). IVM has been studied extensively [7, 8],
and we aim to build on this work. However, an additional complication is that
the incremental maintenance actions may leak information. Therefore, we study
mechanisms concerning data processing and supporting cryptographic methods in
which updates of multiple users are combined to form more coarse-grained
materialized view updates.

A related research field to protect sensitive data is differential privacy
[9], the technique of adding noise to the data to obscure any individual’s
information while maintaining the statistical accuracy of the overall set. We
think that our decentralized data architectures are a potential use case to
build new forms of decentralized differential privacy, and note that research
in this area tends to assume a central database. We also note that state-of-
art differential privacy approaches within database systems such as Pinq [10]
and Google DP222https://github.com/google/differential-privacy work best with
aggregated data, matching our concept of aggregating materialized views.
Finally, there is a relevant time dimension: (i) recency of IVM updates will
be part of our trade-offs against violating privacy constraints, and (ii) data
architects may want to limit the lifetime of data in the materialized views.
Therefore, we plan to incorporate specific stream processing elements in our
framework. The most relevant research we perceive is the Dataflow model [11],
which was the first to clearly separate the concepts of data arrival time and
event time in stream processing. We think these notions will be necessary to
define accuracy metrics of our materialized views.

##  5 Architecture

Figure 1: The proposed architecture. Decentralized views collect deltas
computed from updates, and send aggregated query results to the central
server. Before permanently storing the data, privacy checks are performed to
assess whether anonymity can be granted.

Figure 1 shows our decentralized architecture. The infrastructure includes
three components: in the first (left), multiple users query and update their
personal data stores containing only their private data. The personal data
stores reside in encrypted cloud-based storage, whose key belongs to the
individual user, and updates are reflected there. The second component
(middle) is a secure analytics infrastructure responsible for applying deltas
and checking whether the collected data respects privacy constraints without
leaking information. The third component (right) is a centralized database.

Organizations can host online applications using such central databases (as is
standard now), as well as run analytical workloads, with the difference that
some of this data is stored in materialized views of which the detailed
underlying data stems from personal data stores, left under user control.
Periodically, upserts from aggregate queries are applied to central
materialized views. To maintain privacy guarantees, we establish a minimum
granularity level, checking whether each group contains a sufficient number of
elements. Privacy rules can be user or system defined: how to choose
appropriate bounds is still an open research question. However, this step must
be performed without revealing any content before guaranteeing that
information is privacy-preserving: a possible technique is multi-party
computation [12].

Our infrastructure then relays these results to the central server, where data
analysts can query centralized tables. The framework also periodically
transmits central updates to the replicated tables, and general statistics on
the completeness of the incrementally maintained views are available to the
central database in order to give accuracy bounds on query processing. When
individual users of an application, on the other hand, need query processing
on their personal data stores or the replicated tables, this involves only the
first tier and can be done locally.

All the components will be specified in a declarative manner: application
architects are unlikely to be experts in privacy-conscious decentralized data
management. We, therefore, propose our language to be an extension of SQL,
hoping to expedite the adoption of our framework.

Decentralized tables represent personal data stores and can only implement
references to other local tables. These can be seen as horizontal partitions
(row groups), assigned an implicit identifier at the moment of database
initialization. Operations can therefore be executed concurrently on different
partitions, allowing for improved performance and smaller transaction scope,
similar to the Google Spanner architecture [13] but only requiring explicit
declaration during the table creation process.

Centralized tables, on the other hand, are under the control of the
application architect and formally represent the union of aggregations over
the partitions. Replicated tables can also be defined, containing overviews to
be periodically propagated from the second to the first tier, such as public
dashboards.

We introduce an additional concept of decentralized views, defined over the
tables in the personal data store to identify those pieces of data that may be
exported centrally. This additional abstraction layer is intended to give end
users more insight into what data is centrally readable. Decentralized views
contain the records to be communicated to the central entity, which are then
stored in centralized views.

In addition, centralized views may introduce time windows, either in terms of
logical (event) time from the data or actual update time. Centralized views
can therefore be defined to retain only data from a limited number of such
windows. The purpose is to aid information architects in realizing retention
limits directly through a SQL specification. This feature also broadens our
research question toward incremental streaming view maintenance.

The column specifications in our table and view definitions will allow to e.
g. add randomized noise to facilitate building differential privacy on top of
our framework. They also allow defining sensitive columns, as well as minimum
aggregation granularity, such as a minimum of at least e. g., 100 values for
an aggregate result tuple that involves this sensitive column to be included
in it. We aim to develop declarative rules to identify potentially privacy-
breaking queries, which may necessitate SQL extensions to provide an
additional layer of security.

The previously described design provides an easy way for application
architects to specify the components of our infrastructure, however, it alone
does not guarantee to protect data owners from possible malevolence. Aggregate
data could still contain sensitive information or not have a sufficient level
of granularity, failing to provide anonymization. For example, it would be
easy to recognize individuals belonging to a group with only one element.
However, such calculations cannot be performed until information from multiple
PDS is obtained.

In order to mitigate the potential risk of unauthorized access to database
records, the offloading of computations to a third-party entity can be
considered. Nonetheless, it is crucial to establish a foundation of trust in
these additional service providers. A possible solution is to employ 3-way
multi-party computation (MPC), either with different cloud providers or a
peer-to-peer system, to hide information while it is being processed until it
respects our privacy constraints. The state-of-art system Secrecy[14] allows
secure collaborative analytics through oblivious SQL queries. We plan to
extend this framework with IVM techniques to be able to perform bulk updates
and insertions.

Expensive IVM operations such as joins can be performed locally on PDS in
plain text; results are then applied to decentralized views and sent over a
secure communication channel (TLS) to be ultimately stored in centralized
views. Our MPC servers, therefore, only need to append new rows or update the
aggregated values in single tables, which can be performed through cheap
oblivious arithmetic operations.

Establishing trust in the organization responsible for setting up our
infrastructure, ensuring they fulfill their claims, remains a prerequisite in
this methodology. This can be achieved through various approaches, including
enabling transparency by exposing all server traffic and resource utilization,
conducting audits, and leveraging the use of open source technologies.
However, our exploration of efficient encryption within incremental view
maintenance is ongoing, and we remain open to additional ideas that could
enhance our approach.

##  6 Conclusion and Future Work

In this paper, we outlined a PhD research agenda for the RDDA project, aiming
to design and implement a declarative framework for partially decentralized
data architectures, that pushes the boundaries of data minimization by leaving
data in personal data stores under the control of the end users while still
enabling application architects to perform centralized data analyses on top of
them. We outlined the most important questions that we will research and
provided a short overview of the SQL-defined components of this framework,
along with initial ideas on leveraging MPC to provide privacy-preserving
incremental view maintenance. We aim to release an initial open source
implementation of this framework, based on DuckDB. Furthermore, we plan to
investigate the qualitative and quantitative properties to evaluate our
infrastructure in order to assess its usability and performance.

## References

  * Pfitzmann and Hansen [2009] A. Pfitzmann, M. Hansen, A terminology for talking about privacy by data minimization: Anonymity, unlinkability, undetectability, unobservability, pseudonymity, and identity management, 2009.
  * Gupta and Mumick [1999] A. K. Gupta, I. S. Mumick,  Maintenance of materialized views: Problems, techniques, and applications,  IEEE Data Eng. Bull. 18 (1999) 3–18.
  * Raasveldt and Mühleisen [2019] M. Raasveldt, H. Mühleisen,  Duckdb: an embeddable analytical database,  in: Proceedings of the 2019 International Conference on Management of Data, SIGMOD Conference 2019, Amsterdam, The Netherlands, June 30 - July 5, 2019, ACM, 2019, pp. 1981–1984.
  * et. al. [2015] A. P. I. et. al.,  Celliq : Real-time cellular network analytics at scale,  in: 12th USENIX Symposium on Networked Systems Design and Implementation, NSDI 15, Oakland, CA, USA, May 4-6, 2015, USENIX Association, 2015, pp. 309–322.
  * Raasveldt and Mühleisen [2018] M. Raasveldt, H. Mühleisen,  Monetdblite: An embedded analytical database,  CoRR abs/1805.08520 (2018). URL: http://arxiv.org/abs/1805.08520. arXiv:1805.08520.
  * Mühleisen [2012] H. Mühleisen, Architecture-independent distributed query processing, Ph.D. thesis, Free University of Berlin, 2012\.
  * et. al. [2012] Y. A. et. al., Dbtoaster: Higher-order delta processing for dynamic, frequently fresh views, 2012. arXiv:1207.0137.
  * et. al. [2022] M. B. et. al., Dbsp: Automatic incremental view maintenance for rich query languages, 2022. arXiv:2203.16684.
  * Dwork [2008] C. Dwork,  Differential privacy: A survey of results,  in: Theory and Applications of Models of Computation, 5th International Conference, TAMC 2008, Xi’an, China, April 25-29, 2008. Proceedings, 2008.
  * McSherry [2009] F. McSherry,  Privacy integrated queries,  in: Proceedings of the 2009 ACM SIGMOD International Conference on Management of Data (SIGMOD), Association for Computing Machinery, Inc., 2009\.
  * et. al. [2015] T. A. et. al.,  The dataflow model: A practical approach to balancing correctness, latency, and cost in massive-scale, unbounded, out-of-order data processing,  Proc. VLDB Endow. 8 (2015) 1792–1803.
  * Lindell [2020] Y. Lindell,  Secure multiparty computation,  Commun. ACM 64 (2020) 86–96. URL: https://doi.org/10.1145/3387108. doi:10.1145/3387108.
  * et. al. [2012] J. C. C. et. al.,  Spanner: Google’s globally-distributed database,  in: OSDI, 2012.
  * Liagouris et al. [2021] J. Liagouris, V. Kalavri, M. Faisal, M. Varia,  Secrecy: Secure collaborative analytics on secret-shared data,  CoRR abs/2102.01048 (2021). URL: https://arxiv.org/abs/2102.01048. arXiv:2102.01048.