Preserving Data Privacy in Learning Causal Structure with Fully Homomorphic Encryption

Jian Yang, Yuan Tong, Qinbin Li, Zeyi Wen, Xiaofang ZhouarXiv 2026

TL;DR

This paper introduces a privacy-preserving framework for distributed causal structure learning using Fully Homomorphic Encryption (FHE). By mathematically restructuring statistical tests and leveraging polynomial approximations for non-linear operations, the authors successfully execute complex conditional independence tests directly on encrypted data in tens of minutes instead of hours or days.

What Problem Does This Paper Address?

Causal structure learning aims to uncover directed acyclic graphs (DAGs) that represent probabilistic dependencies between variables—crucial for fields like autonomous driving and smart city traffic prediction. However, when data is distributed across multiple organizations or machines, aggregating this information to perform Conditional Independence (CI) tests risks leaking highly sensitive data.

While Fully Homomorphic Encryption (FHE) allows computation on encrypted data (ciphertexts) without decryption, it natively only supports addition and multiplication. Standard CI tests (like the $\chi^2$ and $G^2$ tests) rely heavily on division and logarithms. Implementing these non-linear operations directly in FHE typically results in massive, deep arithmetic circuits that are too computationally expensive to be practical.

Methods

The authors design a privacy-preserving distributed pipeline based on the popular PC-stable causal learning algorithm and the CKKS FHE scheme, which supports approximate floating-point arithmetic.

The core technical contributions center on making FHE mathematically viable for CI tests:

  1. Equation Simplification: Standard $\chi^2$ and $G^2$ tests require multiple division (reciprocal) steps. The authors mathematically refactored the equations to reduce the fraction terms, ensuring that each test circuit requires only a single reciprocal operation.
  2. Polynomial Approximations:
  3. Division ($1/x$): Approximated using the iterative Newton-Raphson method ($r_{t+1} = r_t(2 - xr_t)$), which converges quadratically using only multiplications and subtractions.
  4. Logarithm ($\log(x)$): Approximated via a 3-term Taylor series expansion centered at $x_0 = 1$, exploiting the fact that the ratio of observed to expected frequencies in the $G^2$ test hovers close to 1.
  5. SIMD Batching: Utilizing the batching capabilities of the CKKS scheme, the framework packs up to $2^{15}$ independent CI tests into a single ciphertext vector, executing them concurrently to achieve massive parallel speedups.

The overall workflow distributes frequency counting to local machines, while the coordinator aggregates and evaluates the CI tests entirely within the encrypted domain.

Fig. 2: The pipeline of our proposed privacy-preserving dis- tributed causal structure learning method.

Datasets

The method was evaluated using six standard, discrete benchmark datasets from the causal learning literature:

  • child (20 nodes, 25 edges)
  • insurance (27 nodes, 52 edges)
  • water (32 nodes, 66 edges)
  • alarm (37 nodes, 46 edges)
  • hepar2 (70 nodes, 123 edges)
  • win95pts (76 nodes, 112 edges)

Each dataset contained 5,000 samples with varying numbers of variable states (ranging from 2 to 6 states).

Key Insights and Ideas

  • Algorithmic Refactoring Beats Brute-Force Crypto: The biggest performance leap didn't come from optimizing the cryptography itself, but from rewriting the underlying statistical formulas (Figures 5 and 6) to minimize multiplicative depth. Reducing the circuit to a single reciprocal operation made FHE viable.
  • State Count, Not Graph Size, Dictates Cost: Counter-intuitively, the execution time and memory footprint are not driven by the number of nodes or edges in the causal graph, but by the number of states per variable. Because contingency tables grow exponentially with state configurations, a small graph with many states (like child) is slower to process than a massive graph with fewer states (like win95pts).
  • The "Free" Parallelism of SIMD: Due to FHE's vector batching nature, computing $2^{15}$ CI tests simultaneously incurs the exact same computational overhead as computing a single test, yielding a theoretical speedup of $2^{14}\times$.
Fig. 5: The χ2 Calculation Circuit.

Key Results

  • High Structural Fidelity: The FHE-based framework achieved an average CI test consistency of ~85% compared to the plaintext baseline, climbing above 90% for specific datasets like alarm and child. The Structural Hamming Distance (SHD) ratios confirmed that the final causal graphs were highly accurate.
  • Practical Execution Times: While the plaintext algorithm executes in seconds, the FHE version completed full causal graph learning in 6 to 30 minutes across all benchmarks (e.g., 366 seconds for win95pts and 1,845 seconds for insurance). Given that causal learning is typically an offline process, this is highly practical.
  • Profiling Breakdown: Profiling revealed that 84% of the execution time is spent on FHE ciphertext computation, 10–15% on encryption/decryption, and less than 1% on network communication.

Limitations and Future Work

The primary limitation of this work is its scalability regarding variable states; as the number of states per discrete variable increases, the size of the FHE circuits expands exponentially. Additionally, the current implementation is tailored strictly to discrete variables using $\chi^2$ and $G^2$ tests. Future work could extend this methodology to continuous variables by designing homomorphic circuits for Fisher's Z-tests or kernel-based independence tests.

Summary updated

Abstract

Preserving data privacy is an important topic in structural data management and data mining. However, the issue of privacy leakage in distributed causal structure learning is a persistent challenge, especially in cases where data transmission and computation are required. In this paper, we propose a method based on fully homomorphic encryption (FHE) that performs calculations on ciphertexts, keeping data encrypted in transition and computation. Nevertheless, adopting FHE to causal structure learning is challenging due to the high computation cost and limited support on division as well as logarithm operations in FHE. To tackle this challenge, we propose a series of novel techniques including (i) circuit simplification for better efficiency, (ii) approximation of division and logarithm through Newton-Raphson Reciprocal and Taylor expansion, and (iii) a batching technique with SIMD-acceleration to enhance the whole learning process. Additionally, our method can be easily extended beyond FHE by demonstration of its portability to support differential privacy. Empirical results show that our method achieves high consistency and comparable causal structure with the plaintext version in the datasets tested. Last, our method is efficient and practical to complete learning causal structures in tens of minutes even under the privacy protection of FHE.
BibTeX
@misc{yang2026preserving,
  author = {Jian Yang and Yuan Tong and Qinbin Li and Zeyi Wen and Xiaofang Zhou},
  title = {{Preserving Data Privacy in Learning Causal Structure with Fully Homomorphic Encryption}},
  year = {2026},
  eprint = {2606.05129},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.05129},
}
Figure