In-context Learning in Presence of Spurious Correlations

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Harutyunyan, Hrayr, Darbinyan, Rafayel, Karapetyan, Samvel, Khachatrian, Hrant
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866915906896003072
author Harutyunyan, Hrayr
Darbinyan, Rafayel
Karapetyan, Samvel
Khachatrian, Hrant
author_facet Harutyunyan, Hrayr
Darbinyan, Rafayel
Karapetyan, Samvel
Khachatrian, Hrant
contents Large language models exhibit a remarkable capacity for in-context learning, where they learn to solve tasks given a few examples. Recent work has shown that transformers can be trained to perform simple regression tasks in-context. This work explores the possibility of training an in-context learner for classification tasks involving spurious features. We find that the conventional approach of training in-context learners is susceptible to spurious features. Moreover, when the meta-training dataset includes instances of only one task, the conventional approach leads to task memorization and fails to produce a model that leverages context for predictions. Based on these observations, we propose a novel technique to train such a learner for a given classification task. Remarkably, this in-context learner matches and sometimes outperforms strong methods like ERM and GroupDRO. However, unlike these algorithms, it does not generalize well to other tasks. We show that it is possible to obtain an in-context learner that generalizes to unseen tasks by training on a diverse dataset of synthetic in-context learning instances.
format Preprint
id arxiv_https___arxiv_org_abs_2410_03140
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle In-context Learning in Presence of Spurious Correlations
Harutyunyan, Hrayr
Darbinyan, Rafayel
Karapetyan, Samvel
Khachatrian, Hrant
Machine Learning
Computation and Language
Large language models exhibit a remarkable capacity for in-context learning, where they learn to solve tasks given a few examples. Recent work has shown that transformers can be trained to perform simple regression tasks in-context. This work explores the possibility of training an in-context learner for classification tasks involving spurious features. We find that the conventional approach of training in-context learners is susceptible to spurious features. Moreover, when the meta-training dataset includes instances of only one task, the conventional approach leads to task memorization and fails to produce a model that leverages context for predictions. Based on these observations, we propose a novel technique to train such a learner for a given classification task. Remarkably, this in-context learner matches and sometimes outperforms strong methods like ERM and GroupDRO. However, unlike these algorithms, it does not generalize well to other tasks. We show that it is possible to obtain an in-context learner that generalizes to unseen tasks by training on a diverse dataset of synthetic in-context learning instances.
title In-context Learning in Presence of Spurious Correlations
topic Machine Learning
Computation and Language
url https://arxiv.org/abs/2410.03140