Hacking Task Confounder in Meta-Learning

Jingyao Wang, Yi Ren, Zeen Song, Jianqi Zhang, Changwen Zheng, Wenwen Qiang

Abstract: Meta-learning enables rapid generalization to new tasks by learning knowledge from various tasks. It is intuitively assumed that as the training progresses, a model will acquire richer knowledge, leading to better generalization performance. However, our experiments reveal an unexpected result: there is negative knowledge transfer between tasks, affecting generalization performance. To explain this phenomenon, we conduct Structural Causal Models (SCMs) for causal analysis. Our investigation uncovers the presence of spurious correlations between task-specific causal factors and labels in meta-learning. Furthermore, the confounding factors differ across different batches. We refer to these confounding factors as "Task Confounders". Based on these findings, we propose a plug-and-play Meta-learning Causal Representation Learner (MetaCRL) to eliminate task confounders. It encodes decoupled generating factors from multiple tasks and utilizes an invariant-based bi-level optimization mechanism to ensure their causality for meta-learning. Extensive experiments on various benchmark datasets demonstrate that our work achieves state-of-the-art (SOTA) performance.

The Myth of "More is Better" in Meta-Learning

Meta-learning, or "learning to learn," is designed to create models that can adapt to new tasks with minimal data. A common assumption in the field is that increasing the number of training tasks will naturally lead to a richer knowledge base and superior generalization. However, empirical evidence suggests a more complex reality: negative knowledge transfer.

As training progresses, information learned from one task can actually degrade performance on another. This phenomenon is visualized through "transference" metrics, which measure how training on one task affects the loss on a test task. As shown in Figure 1, the distribution of loss ratios shifts as iterations increase, revealing that not all knowledge transfer is positive.

Visualizing the phenomenon of negative knowledge transfer across different training iterations and task sets.

Identifying Task Confounders

Through causal analysis using Structural Causal Models (SCMs), the researchers identified the root cause of negative transfer: Task Confounders. These are non-shared, task-specific factors—such as a unique background color or camera angle—that a model mistakenly correlates with labels during joint training across multiple tasks.

In a standard meta-learning process, the model often fails to distinguish between these spurious correlations and the true causal factors that determine a label. Because these confounding factors vary across different batches of tasks, they prevent the model from learning a truly invariant representation that generalizes well to unseen data.

Structural Causal Models (SCMs) illustrating (a) the underlying data generation mechanism and (b) the meta-learning process where task confounders emerge as spurious correlations.

MetaCRL: A Causal Representation Learner

To address this, the authors propose MetaCRL (Meta-learning Causal Representation Learner). MetaCRL is a modular, plug-and-play framework that can be integrated into existing meta-learning backbones like MAML or MetaSGD. It operates through two primary modules:

  1. Disentangling Module: This module separates high-dimensional features into distinct "generating factors." To ensure these factors are clean and interpretable, the module enforces orthogonality (keeping factors distinct), sparsity (ensuring tasks use only relevant factors), and diversity (preventing factor collapse).
  2. Causal Module: This module filters out non-causal factors using a bi-level optimization mechanism inspired by Invariant Risk Minimization. It verifies if a factor's relationship with the label remains invariant across both the support set (training) and query set (validation) of a task. If the relationship is inconsistent, the factor is identified as a confounder and discarded.

Experimental Results

MetaCRL was evaluated across diverse benchmarks, including sinusoid regression, image classification (miniImageNet, Omniglot), drug activity prediction (pQSAR), and pose prediction.

  • State-of-the-Art Performance: On the miniImageNet 1-shot challenge, MetaCRL improved MAML's accuracy from 33.16% to 41.55%.
  • Task Confounder (TC) Dataset: On a specialized dataset designed to highlight negative transfer, MetaCRL achieved a +6.19 improvement over the MetaSGD baseline, demonstrating its specific ability to mitigate confounding noise.
  • Causal Factor Separation: Similarity matrix visualizations confirmed that MetaCRL successfully produces decoupled causal factors with minimal inter-correlation.

Conclusion and Future Work

MetaCRL challenges the "more data is better" paradigm by showing that task-specific noise can actively harm meta-learning. By treating generalization as a causal inference problem, MetaCRL provides a robust way to filter out spurious correlations. Future research may focus on reducing the computational overhead of the bi-level optimization process and extending the framework to handle more complex, non-linear causal structures in real-world data.

Summary updated

BibTeX
@inproceedings{wang2024hacking,
  author = {Jingyao Wang and Yi Ren and Zeen Song and Jianqi Zhang and Changwen Zheng and Wenwen Qiang},
  title = {{Hacking Task Confounder in Meta-Learning}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2024},
  url = {https://openreview.net/forum?id=oEjJdkyK4o},
}
Figure