Distributed mediation analysis with communication efficiency

Shaomin LiNeurIPS 2025

Introduction

Mediation analysis is a statistical method used to understand how or why an exposure affects an outcome by looking at an intermediate variable, known as a mediator. For example, researchers might ask: does a new teaching method improve test scores because it increases student engagement? Classic methods to test these effects include Sobel's test and the MaxP test.

In modern research, however, data is frequently distributed across multiple institutions (like different hospitals or schools) due to privacy regulations or storage limitations. Pooling all raw data into a single central database to run a "global" test is often impossible. Existing distributed approaches usually rely on running the full test locally at each site and then averaging the final $p$-values or test statistics. Unfortunately, as the number of data silos ($K$) increases, this naive averaging approach drastically loses statistical power, leading to missed discoveries.

This paper introduces a communication-efficient, distributed framework for mediation analysis that achieves the exact same statistical power as if all the data were pooled together in one place.

The Distributed Mediation Framework

The authors propose distributed versions of the classic Sobel's test ($T_{Sobel}^{Dis}$) and MaxP test ($T_{MaxP}^{Dis}$) that solve the power-loss problem.

Distributed computing architecture for mediation analysis

Instead of computing the final test statistic locally, the method works as follows:

  1. Local Computation: Each worker machine fits standard linear regression models to its local data and extracts two intermediate $t$-statistics ($T_\beta$ and $T_\gamma$). These represent the estimated effect of the exposure on the mediator, and the mediator on the outcome, respectively.
  2. Communication: Each machine sends only these two scalar values and its local sample size to a central server.
  3. Global Aggregation: The central server computes a specifically weighted average of these intermediate $t$-statistics. It then uses these aggregated values to calculate the final distributed Sobel and MaxP test statistics.

This approach is highly communication-efficient (transmitting just two numbers per site) and completely avoids sharing raw, privacy-sensitive data.

Key Insights

  • Order of Operations Matters: The secret to this method's success is aggregating the intermediate linear statistics rather than the final non-linear test statistics or $p$-values. Because the intermediate $t$-statistics have an approximately linear form, they don't suffer from the mathematical degeneracy that ruins other distributed tests.
  • Asymptotic Equivalence: The authors mathematically prove that as long as the number of machines ($K$) is relatively small compared to the total sample size ($K = o(\sqrt{N})$), their distributed test is just as powerful as a theoretical "global" test that pools all raw data.
  • Privacy for Free: Because the method only requires sites to share two summary scalars, it is inherently privacy-preserving. This makes it a perfect fit for federated learning setups in sensitive domains.

Results

The authors validated their approach using both extensive synthetic datasets and real-world educational data.

Empirical sizes of Sobel and MaxP tests across different numbers of machines
  • Simulation Performance: Across thousands of simulation runs, the distributed tests successfully controlled the Type I error rate. More importantly, while the statistical power of naive averaging methods dropped to near zero as the number of machines increased, the proposed distributed tests matched the power of the global pooled test perfectly (tested up to $K=32$ machines).
  • Real-World Rescue: In an educational study investigating whether college Calculus grades mediate the effect of high school math scores on college Statistics grades, local tests on individual classes failed to detect any mediation effect (p-values > 0.05). However, by combining the summary statistics from all three classes using the proposed distributed MaxP test, the authors successfully detected a highly significant mediation effect (p-value = 0.0007). The distributed method successfully rescued findings that would have been invisible to underpowered local studies.

Limitations and Future Work

  • Inherently Conservative Baselines: The framework is built on Sobel's and MaxP tests, which are notoriously conservative and underpowered for composite null hypotheses. However, newer, enhanced mediation tests derived from these classics can be easily adapted into this distributed framework in the future.
  • Continuous Outcomes Only: The current mathematical guarantees assume continuous outcomes modeled via linear regression. Adapting this to binary outcomes (using logistic regression) is flagged for future work, as non-linear local estimations might be more sensitive to data fragmentation.
  • Machine Limits: The theoretical guarantee holds when $K < \sqrt{N}/2$. If a dataset is fragmented across too many tiny silos (e.g., hundreds of sites with only a few samples each), the test's power may still degrade.

Summary updated

BibTeX
@inproceedings{li2025distributed,
  author = {Shaomin Li},
  title = {{Distributed mediation analysis with communication efficiency}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=fqsxfizLpk},
}
Figure