Efficient Conditionally Invariant Representation Learning

Roman Pogodin, Namrata Deka, Yazhe Li, Danica J. Sutherland, Victor Veitch, Arthur Gretton

Overview

Researchers have developed CIRCE (Conditional Independence Regression CovariancE), a novel method for learning data representations that are "conditionally invariant" to unwanted variables—such as background noise or protected attributes—given a target label. By cleverly reducing a complex conditional independence problem into a simpler marginal one that can be partially solved before training begins, CIRCE offers a significantly more efficient and stable approach to building fair and robust machine learning models.

The Challenge of Conditional Invariance

In many machine learning tasks, the goal is to predict a target $Y$ from an input $X$, while ensuring the model ignores a "distractor" variable $Z$. However, simply enforcing marginal independence from $Z$ is often insufficient or incorrect.

Causal graph illustrating the relationship between target Y, distractor Z, and input X.

Consider Fairness: when predicting if someone will succeed at a job ($Y$) based on their resume ($X$), the prediction should be independent of their race ($Z$) given their actual qualifications. This aligns with the "equalized odds" condition.

Similarly, in Domain Invariance, an image classifier ($Y$) should be robust to the hospital or lighting condition ($Z$) where the image was taken. The primary challenge is that $Z$ and $Y$ are frequently correlated in the training data. Measuring whether a representation $\phi(X)$ is independent of $Z$ given $Y$ is notoriously difficult, particularly when $Y$ and $Z$ are continuous values. Previous methods required complex, "nested" calculations during every single training step, leading to high computational costs and unstable results on small data batches.

The CIRCE Method

The authors introduce CIRCE to address these computational and stability bottlenecks. The core innovation is a mathematical "shortcut" based on a 1980s characterization of independence by Daudin.

  1. The Offline Trick: Instead of calculating conditional independence on the fly, CIRCE performs a single ridge regression from the target $Y$ to the distractor $Z$ before neural network training begins.
  2. Conditionally Centered Features: It uses the residuals (the "leftover" information) from this regression to create a new statistic, $\zeta(Y, Z)$.
  3. Marginal Independence: The paper proves that if the learned representation $\phi(X)$ is marginally independent of these residuals, then it is conditionally independent of $Z$ given $Y$.
  4. Kernel Methods: To handle complex, non-linear relationships, the authors employ kernel methods—specifically the Hilbert-Schmidt Norm—to measure this independence.

Because the heavy lifting of the regression is completed upfront, the actual training process only needs to enforce a simple independence constraint. This makes CIRCE much faster and more reliable than previous approaches like the Hilbert-Schmidt Conditional Independence Criterion (HSCIC) or the Generalized Covariance Measure (GCM).

Key Insights

  • Sidestepping the "Data Split" Problem: Typically, conditioning on a variable $Y$ "splits" data into tiny subsets, making it nearly impossible to estimate independence accurately in a small mini-batch. CIRCE avoids this by using a holdout set to pre-calculate the conditional relationship.
  • Continuous Variables Welcome: Unlike many previous methods that only function if $Y$ is categorical, CIRCE works natively with continuous, real-valued labels and distractors.
  • Theoretical Soundness: The authors provide a proof that CIRCE is zero if and only if true conditional independence is achieved, provided the kernels used are sufficiently rich to capture the data's complexity.

Experimental Evaluation and Results

The authors evaluated CIRCE across several benchmarks, including synthetic Structural Causal Models (SCMs), the dSprites dataset (predicting vertical position while ignoring correlated horizontal position), and Extended Yale-B Faces (estimating camera pose while ignoring illumination angles).

Pareto fronts showing CIRCE achieving a superior trade-off between prediction accuracy and invariance compared to baselines.
  • Superior Pareto Fronts: In multivariate synthetic tests, CIRCE consistently achieved a better trade-off between prediction accuracy (MSE Loss) and invariance (VCF) compared to GCM and HSCIC.
  • Robustness to Non-linearity: On the dSprites task featuring non-linear dependencies, CIRCE significantly outperformed GCM, which struggled to capture higher-order relationships between the variables.
  • Stability: CIRCE proved to be more numerically stable during training, especially on the Yale-B face dataset, where competing methods often suffered from high variance or failed to converge.

Limitations and Future Work

  • Kernel Selection: As with all kernel-based methods, CIRCE's performance hinges on choosing the appropriate kernel (e.g., Gaussian RBF) and its parameters. While automated selection methods are used, it remains a critical step.
  • High-Dimensional Targets: While CIRCE handles moderately high-dimensional $Y$ and $Z$, extremely high-dimensional metadata might still pose a challenge for the initial ridge regression step.
  • Statistical Significance: Future work could adapt CIRCE into a formal statistical test to determine if conditional independence is genuinely present in a given dataset, expanding its utility beyond a training regularizer.

Summary updated

BibTeX
@inproceedings{pogodin2023efficient,
  author = {Roman Pogodin and Namrata Deka and Yazhe Li and Danica J. Sutherland and Victor Veitch and Arthur Gretton},
  title = {{Efficient Conditionally Invariant Representation Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=dJruFeSRym1},
}
Figure