CGLearn: Consistent Gradient-Based Learning for Out-of-Distribution Generalization

Jawad Chowdhury, Gabriel Terejanu

2025

Abstract

Improving generalization and achieving highly predictive, robust machine learning models necessitates learning the underlying causal structure of the variables of interest. A prominent and effective method for this is learning invariant predictors across multiple environments. In this work, we introduce a simple yet powerful approach, CGLearn, which relies on the agreement of gradients across various environments. This agreement serves as a powerful indication of reliable features, while disagreement suggests less reliability due to potential differences in underlying causal mechanisms. Our proposed method demonstrates superior performance compared to state-of-the-art methods in both linear and nonlinear settings across various regression and classification tasks. CGLearn shows robust applicability even in the absence of separate environments by exploiting invariance across different subsamples of observational data. Comprehensive experiments on both synthetic and real-world datasets highlight its effectiveness in diverse scenarios. Our findings underscore the importance of leveraging gradient agreement for learning causal invariance, providing a significant step forward in the field of robust machine learning. The source code of the linear and nonlinear implementation of CGLearn is open-source and available at: https://github.com/hasanjawad001/CGLearn.

Download


Paper Citation


in Harvard Style

Chowdhury J. and Terejanu G. (2025). CGLearn: Consistent Gradient-Based Learning for Out-of-Distribution Generalization. In Proceedings of the 14th International Conference on Pattern Recognition Applications and Methods - Volume 1: ICPRAM; ISBN 978-989-758-730-6, SciTePress, pages 103-112. DOI: 10.5220/0013260400003905


in Bibtex Style

@conference{icpram25,
author={Jawad Chowdhury and Gabriel Terejanu},
title={CGLearn: Consistent Gradient-Based Learning for Out-of-Distribution Generalization},
booktitle={Proceedings of the 14th International Conference on Pattern Recognition Applications and Methods - Volume 1: ICPRAM},
year={2025},
pages={103-112},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0013260400003905},
isbn={978-989-758-730-6},
}


in EndNote Style

TY - CONF

JO - Proceedings of the 14th International Conference on Pattern Recognition Applications and Methods - Volume 1: ICPRAM
TI - CGLearn: Consistent Gradient-Based Learning for Out-of-Distribution Generalization
SN - 978-989-758-730-6
AU - Chowdhury J.
AU - Terejanu G.
PY - 2025
SP - 103
EP - 112
DO - 10.5220/0013260400003905
PB - SciTePress