PairCFR: Enhancing Model Training on Paired Counterfactually Augmented Data through Contrastive Learning

Xiaoqi Qiu, Yongjie Wang, Xu Guo, Zhiwei Zeng, Yue Yu +2 more
6/9/2024
cs.LG

No official code found. Best implementation: Siki-cloud/PairCFR (8 stars, last commit 2024-07-05).

Abstract

Counterfactually Augmented Data (CAD) involves creating new data samples by applying minimal yet sufficient modifications to flip the label of existing data samples to other classes. Training with CAD enhances model robustness against spurious features that happen to correlate with labels by spreading the casual relationships across different classes. Yet, recent research reveals that training with CAD may lead models to overly focus on modified features while ignoring other important contextual information, inadvertently introducing biases that may impair performance on out-ofdistribution (OOD) datasets. To mitigate this issue, we employ contrastive learning to promote global feature alignment in addition to learning counterfactual clues. We theoretically prove that contrastive loss can encourage models to leverage a broader range of features beyond those modified ones. Comprehensive experiments on two human-edited CAD datasets demonstrate that our proposed method outperforms the state-of-the-art on OOD datasets.

View on arXivView PDF

Code Implementations(1)

Siki-cloud/PairCFRCommunity100%

PairCFR code

81PythonMay 20, 20242 years ago

Similar Papers

Cite this paper

@article{qiu2024paircfr,
  title  = {PairCFR: Enhancing Model Training on Paired Counterfactually Augmented Data through Contrastive Learning},
  author = {Xiaoqi Qiu and Yongjie Wang and Xu Guo and Zhiwei Zeng and Yue Yu and Yuhong Feng and Chunyan Miao},
  year   = {2024},
  eprint = {2406.06633},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.06633v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2406.06633.svg)](https://codeofpaper.com/paper/2406.06633)

Discussion