Batch Calibration: Rethinking Calibration for In-Context Learning and Prompt Engineering

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Zhou, Han, Wan, Xingchen, Proleev, Lev, Mincu, Diana, Chen, Jilin, Heller, Katherine, Roy, Subhrajit
Format: Preprint
Veröffentlicht: 2023
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866910721272446976
author Zhou, Han
Wan, Xingchen
Proleev, Lev
Mincu, Diana
Chen, Jilin
Heller, Katherine
Roy, Subhrajit
author_facet Zhou, Han
Wan, Xingchen
Proleev, Lev
Mincu, Diana
Chen, Jilin
Heller, Katherine
Roy, Subhrajit
contents Prompting and in-context learning (ICL) have become efficient learning paradigms for large language models (LLMs). However, LLMs suffer from prompt brittleness and various bias factors in the prompt, including but not limited to the formatting, the choice verbalizers, and the ICL examples. To address this problem that results in unexpected performance degradation, calibration methods have been developed to mitigate the effects of these biases while recovering LLM performance. In this work, we first conduct a systematic analysis of the existing calibration methods, where we both provide a unified view and reveal the failure cases. Inspired by these analyses, we propose Batch Calibration (BC), a simple yet intuitive method that controls the contextual bias from the batched input, unifies various prior approaches, and effectively addresses the aforementioned issues. BC is zero-shot, inference-only, and incurs negligible additional costs. In the few-shot setup, we further extend BC to allow it to learn the contextual bias from labeled data. We validate the effectiveness of BC with PaLM 2-(S, M, L) and CLIP models and demonstrate state-of-the-art performance over previous calibration baselines across more than 10 natural language understanding and image classification tasks.
format Preprint
id arxiv_https___arxiv_org_abs_2309_17249
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Batch Calibration: Rethinking Calibration for In-Context Learning and Prompt Engineering
Zhou, Han
Wan, Xingchen
Proleev, Lev
Mincu, Diana
Chen, Jilin
Heller, Katherine
Roy, Subhrajit
Computation and Language
Artificial Intelligence
Machine Learning
Prompting and in-context learning (ICL) have become efficient learning paradigms for large language models (LLMs). However, LLMs suffer from prompt brittleness and various bias factors in the prompt, including but not limited to the formatting, the choice verbalizers, and the ICL examples. To address this problem that results in unexpected performance degradation, calibration methods have been developed to mitigate the effects of these biases while recovering LLM performance. In this work, we first conduct a systematic analysis of the existing calibration methods, where we both provide a unified view and reveal the failure cases. Inspired by these analyses, we propose Batch Calibration (BC), a simple yet intuitive method that controls the contextual bias from the batched input, unifies various prior approaches, and effectively addresses the aforementioned issues. BC is zero-shot, inference-only, and incurs negligible additional costs. In the few-shot setup, we further extend BC to allow it to learn the contextual bias from labeled data. We validate the effectiveness of BC with PaLM 2-(S, M, L) and CLIP models and demonstrate state-of-the-art performance over previous calibration baselines across more than 10 natural language understanding and image classification tasks.
title Batch Calibration: Rethinking Calibration for In-Context Learning and Prompt Engineering
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2309.17249