Reproduce “PairCFR: Enhancing Model Training on Paired Counterfactually Augmented Data through Contrastive Learning” on OpenResearch
Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Xiaoqi Qiu, Yongjie Wang, Xu Guo, Zhiwei Zeng, Yue Yu, Yuhong Feng, Chunyan Miao
Researchers from Shenzhen University and Nanyang Technological University introduce PairCFR, a framework that combines contrastive learning with counterfactually augmented data to prevent models from overfitting to local edits. This method consistently improves out-of-distribution generalization and model robustness across various NLP tasks and transformer architectures.
Key insights
- Standard cross-entropy loss, when applied to CAD, can inherently lead to models over-relying on modified features, thereby hindering true OOD generalization.
- Contrastive learning offers a mechanism to force models to consider a broader set of features, including unperturbed contextual information, when distinguishing between samples in a counterfactual pair.
- Explicitly structuring batches to include original samples alongside their counterfactuals is crucial for the synergistic effect of CAD and contrastive learning, maximizing the leverage of embedded causal relationships.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.