On the Noise Robustness of In-Context Learning for Text Generation

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Gao, Hongfu, Zhang, Feipeng, Jiang, Wenyu, Shu, Jun, Zheng, Feng, Wei, Hongxin
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866912083888570368
author Gao, Hongfu
Zhang, Feipeng
Jiang, Wenyu
Shu, Jun
Zheng, Feng
Wei, Hongxin
author_facet Gao, Hongfu
Zhang, Feipeng
Jiang, Wenyu
Shu, Jun
Zheng, Feng
Wei, Hongxin
contents Large language models (LLMs) have shown impressive performance on downstream tasks by in-context learning (ICL), which heavily relies on the quality of demonstrations selected from a large set of annotated examples. Recent works claim that in-context learning is robust to noisy demonstrations in text classification. In this work, we show that, on text generation tasks, noisy annotations significantly hurt the performance of in-context learning. To circumvent the issue, we propose a simple and effective approach called Local Perplexity Ranking (LPR), which replaces the "noisy" candidates with their nearest neighbors that are more likely to be clean. Our method is motivated by analyzing the perplexity deviation caused by noisy labels and decomposing perplexity into inherent perplexity and matching perplexity. Our key idea behind LPR is thus to decouple the matching perplexity by performing the ranking among the neighbors in semantic space. Our approach can prevent the selected demonstrations from including mismatched input-label pairs while preserving the effectiveness of the original selection methods. Extensive experiments demonstrate the effectiveness of LPR, improving the EM score by up to 18.75 on common benchmarks with noisy annotations. Our code is available at https://github.com/ml-stat-Sustech/Local-Perplexity-Ranking.
format Preprint
id arxiv_https___arxiv_org_abs_2405_17264
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle On the Noise Robustness of In-Context Learning for Text Generation
Gao, Hongfu
Zhang, Feipeng
Jiang, Wenyu
Shu, Jun
Zheng, Feng
Wei, Hongxin
Computation and Language
Machine Learning
Large language models (LLMs) have shown impressive performance on downstream tasks by in-context learning (ICL), which heavily relies on the quality of demonstrations selected from a large set of annotated examples. Recent works claim that in-context learning is robust to noisy demonstrations in text classification. In this work, we show that, on text generation tasks, noisy annotations significantly hurt the performance of in-context learning. To circumvent the issue, we propose a simple and effective approach called Local Perplexity Ranking (LPR), which replaces the "noisy" candidates with their nearest neighbors that are more likely to be clean. Our method is motivated by analyzing the perplexity deviation caused by noisy labels and decomposing perplexity into inherent perplexity and matching perplexity. Our key idea behind LPR is thus to decouple the matching perplexity by performing the ranking among the neighbors in semantic space. Our approach can prevent the selected demonstrations from including mismatched input-label pairs while preserving the effectiveness of the original selection methods. Extensive experiments demonstrate the effectiveness of LPR, improving the EM score by up to 18.75 on common benchmarks with noisy annotations. Our code is available at https://github.com/ml-stat-Sustech/Local-Perplexity-Ranking.
title On the Noise Robustness of In-Context Learning for Text Generation
topic Computation and Language
Machine Learning
url https://arxiv.org/abs/2405.17264