Causal Discovery Under Hard Selection Bias: A New Robust Score-Matching Approach

Yiwen Qiu, Francesco Montagna, Shimeng Huang, Francesco LocatelloNeurIPS 2026

TL;DR

When trying to uncover cause-and-effect relationships from observational data, selection bias—where certain portions of a population are systematically excluded—usually warps the data beyond recognition. This paper discovers a neat mathematical loophole: under "hard" selection (strict data truncation), the local geometry of the probability distribution remains completely unharmed. By exploiting this untouched curvature, the authors build the first general algorithm that accurately reconstructs causal graphs from truncated observational data without needing to know how the data was filtered.

What Problem Does This Paper Address?

Imagine trying to map how cellular genes regulate one another, except your lab equipment only detects transcripts expressed above a certain threshold. Or picture an epidemiological study that only logs patients sick enough to visit a clinic. This is hard selection bias (or truncation): your dataset is strictly chopped off outside a specific region, leaving zero observations in parts of the true distribution.

In causal discovery—the quest to turn raw data into a Directed Acyclic Graph (DAG) of causes and effects—selection bias is a notorious landmine. Conditioning on a selection criteria creates phantom correlations between completely unrelated variables (a classic headache known as collider bias). Previously, getting around this required training wheels: you either needed active experiments (interventional data), restricted your scope to tiny three- or four-variable Toy graphs, or settled for vague, partial maps. A general tool for purely observational, truncated data across standard Additive Noise Models (ANMs)—where an effect is a function of its causes plus independent random noise—was completely missing.

Summary of identifiability guarantees across ANM assumptions, highlighting CHess as the only method resilient to truncation across all identifiable settings.

Methods

Standard score-matching causal algorithms iteratively peel a causal graph apart from the bottom up. They look for sink nodes (variables at the very end of causal chains with no downstream effects), log them, prune them, and repeat.

To make this work on truncated data, the authors introduce CHess (Conditional Hessian), shifting away from global data properties (like regression residuals, which get hopelessly skewed when data is chopped off) to purely local geometry:

  1. Exploiting the Score and Hessian: The score function ($\nabla \log p(x)$) measures the steepness of the log-probability density at a specific point, and its Jacobian—the Hessian ($\nabla^2 \log p(x)$)—measures the local curvature.
  2. Counting Noise Sources via Matrix Rank: Here is the core intuition: if you condition on all neighbors of a sink node, only one independent random noise source (its own) drives the local fluctuations of its score. For a non-sink node, conditioning on its children cracks open a backdoor path, mixing in the children's noise sources too ($\ge 2$ sources).
Figure 1: In the subgraph, the sink node Xc is only d-connected to its own noise Nc after condition- ing on XPAc, while Xp is d-connected to Np and Nc after conditioning on XPAp ∪XCHp.
  1. The Conditional Rank Test: CHess translates "counting independent noise sources" into linear algebra. It computes the conditional covariance of each node's Hessian row (given its graph neighbors) and checks the rank of that outer-product matrix. Across linear and nonlinear settings, sink nodes consistently exhibit a lower matrix rank than non-sink nodes. CHess simply picks the node with the minimal rank as the sink!
Table 2. In particular, the rank gap between sink and non-sink nodes exists (thus sink nodes are identifiable) in all settings except for the linear Gaussian case, where all nodes have rank 0.
  1. Handling Sharp Boundaries: Truncation creates sharp cliffs at the edges of the dataset where probability suddenly drops to zero, breaking traditional Stein score estimators. To smooth over these boundary effects, the authors pair CHess with a diffusion-model-based score estimator (DiffAN).

Datasets

No brand-new datasets are introduced; instead, the authors stress-test CHess by artificially truncating synthetic and real-world benchmarks (filtering via unknown combinations of all observed variables, keeping as little as 10% or 5% of the data):

  • Synthetic Benchmarks: Erdős–Rényi random graphs (5 and 10 nodes) across three structural regimes: Linear non-Gaussian, Nonlinear Gaussian (MLP mechanisms), and Nonlinear non-Gaussian (Gumbel/log-normal noise).
  • Real-World Data: The Sachs et al. (2005) human immune cell protein-signaling dataset ($7,466$ samples across 11 proteins with a known ground-truth biological DAG).

Key Insights and Ideas

  • Truncation is Invisible to the Score: By Bayes' rule, truncating a dataset just divides the probability density inside the surviving region by a constant normalizing factor: $p(x \mid S=1) = p(x) / P(S=1)$. Take the logarithm, and that division becomes subtraction by a constant. Take the spatial derivative ($\nabla_x$), and the constant vanishes! At every surviving interior data point, the score—and its Hessian—are mathematically identical to the true, unbiased distribution.
  • SCORE Was Secretly Robust All Along: While auditing existing algorithms, the authors uncovered a surprise bonus: the established SCORE algorithm (designed for nonlinear Gaussian models) relies purely on a variance test of the Hessian diagonal, meaning it was already naturally immune to hard selection bias—a superpower its original creators hadn't noticed! However, its non-Gaussian successor (NoGAM) fails because it relies on regression residuals, which depend on global averages distorted by truncation.

Key Results

  • Synthetic Dominance Under Bias: When severe truncation is applied to 5-node linear non-Gaussian graphs (retaining only $\rho = 5\%$ of the distribution), CHess achieves an arrow F1 score of 0.72 (DiffAN) and 0.70 (Stein). Meanwhile, NoGAM plummets from 0.81 (unbiased) to 0.40, and DirectLiNGAM drops from 0.99 to 0.65. On 10-node graphs at $\rho = 5\%$, CHess (DiffAN) leads the pack at 0.64, beating DirectLiNGAM (0.54) and NoGAM (0.45).
  • Real-World Resilience: On the Sachs protein dataset truncated to $\rho = 10\%$ ($n=373$ samples), CHess (DiffAN) achieves the highest arrow F1 score of 0.38, outperforming DirectLiNGAM (0.33), NoGAM (0.30), CAM (0.28), and FCI (0.14). Even without selection bias ($\rho = 1.0$), CHess leads all baselines at 0.42 (Stein) and 0.41 (DiffAN).

Limitations and Future Work

  • Hard vs. Soft Selection: The mathematical magic relies on selection being strictly deterministic (an indicator function whose derivative is zero inside the support). In the real world, selection is often probabilistic or "soft" (e.g., sicker patients are gradually more likely to visit a hospital). Extending score-based methods to soft selection remains an open challenge.
  • Severe Truncation Starves Estimators: While the theory holds regardless of how tiny the surviving data region is, estimating second-order derivatives (Hessians) from finite samples gets noisy fast when truncation is extreme. Developing sturdier Hessian estimators is a key next step.

Summary updated

Abstract

Selection bias is a difficult yet widespread problem in causal discovery, occurring whenever non-random selection processes lead to data that is not representative of the underlying populations. Due to its practical importance, related works have been proposed to address the problem under local [Versteeg et al., 2022] or interventional settings [Dai et al., 2025a], but general algorithms for observational data remain elusive. In this paper, we focus on truncated data (hard selection), and provide a general result for Additive Noise Models (ANM). We show that score-based methods are a surprisingly suitable candidate due to a special property of the score function ($\nabla \log p(x)$): *deterministic truncation preserves both the score* of the joint distribution as well as the Jacobian of the score. While established score-matching algorithms still fail in most settings, we actively leverage this observation to propose a new method for causal discovery that is robust under truncated data with ANMs. Overall, our approach offers a general, robust solution that is agnostic to external information about the selection process and still achieves comparable performance to the state-of-the-art approaches when selection is not present.
BibTeX
@inproceedings{qiu2026causal,
  author = {Yiwen Qiu and Francesco Montagna and Shimeng Huang and Francesco Locatello},
  title = {{Causal Discovery Under Hard Selection Bias: A New Robust Score-Matching Approach}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=Mhcp2GSL1c},
}
Figure