Prompt-Based Bias Calibration for Better Zero/Few-Shot Learning of Language Models (2024)

Kang He  Yinghan Long  Kaushik Roy
Electrical and Computer Engineering, Purdue University
{he603, long273, kaushik}@purdue.edu

Abstract

Prompt-based learning is susceptible to intrinsic bias present in pre-trained language models (LMs), leading to sub-optimal performance in prompt-based zero/few-shot settings. In this work, we propose a null-input prompting method to calibrate intrinsic bias encoded in pre-trained LMs. Different from prior efforts that address intrinsic bias primarily for social fairness and often involve excessive computational cost, our objective is to explore enhancing LMs’ performance in downstream zero/few-shot learning while emphasizing the efficiency of intrinsic bias calibration. Specifically, we leverage a diverse set of auto-selected null-meaning inputs generated from GPT-4 to probe intrinsic bias of pre-trained LMs. Utilizing the bias-reflected probability distribution, we formulate a distribution disparity loss for bias calibration, where we exclusively update bias parameters (0.1%percent0.10.1\%0.1 % of total parameters) of LMs towards equal probability distribution. Experimental results show that the calibration promotes an equitable starting point for LMs while preserving language modeling abilities. Across a wide range of datasets, including sentiment analysis and topic classification, our method significantly improves zero/few-shot learning performance of LMs for both in-context learning and prompt-based fine-tuning (on average 9%percent99\%9 % and 2%percent22\%2 %, respectively).111Our code is available at https://github.com/kang-ml/prompt_based_bias_calibration.

Prompt-Based Bias Calibration for Better Zero/Few-Shot Learning of Language Models


Kang He  Yinghan Long  Kaushik RoyElectrical and Computer Engineering, Purdue University{he603, long273, kaushik}@purdue.edu


1 Introduction

The advent of GPT models Radford etal. (2019); Brown etal. (2020) has catalyzed the transformative prompt-based learning paradigm. The innovative approach of "pre-train, prompt, and predict" Schick and Schütze (2021a); Liu etal. (2023) facilitates fast adaptation of pre-trained language models (LMs) in learning various tasks and empowers LMs’ strong zero/few-shot learning abilities Schick and Schütze (2021b); Gao etal. (2021).

Due to the susceptibility to bias ingrained in pre-trained LMs, prompt-based learning tends to make biased predictions toward some specific answers,thereby impacting performance in prompt-based zero/few-shot settings Zhao etal. (2021); Han etal. (2023).To mitigate this issue and improve LM performance, Zhao etal. (2021) and Holtzman etal. (2022) propose to reweigh LM output probabilities. Han etal. (2023) explores calibrating decision boundaries. While these research has demonstrated substantial improvements, they are primarily designed for in-context learning with frozen pre-trained LMs, leading to two main limitations: (1) They may be not effective in task-specific fine-tuning scenario Jian etal. (2022). Note, however, prompt-based fine-tuning has shown performance improvements over in-context learning Gao etal. (2021); LoganIV etal. (2022). It is particularly important for relatively small-sized LMs. (2) The intrinsic bias encoded in pre-trained LMs persists since these research focuses on output calibration and does not modify LMs.

Prompt-Based Bias Calibration for Better Zero/Few-Shot Learning of Language Models (1)

To address these limitations, we investigate the potential for enhancing the performance of LMs as zero/few-shot learners in classification tasks by calibrating intrinsic bias of pre-trained LMs. This exploration extends to various prompt-based learning scenarios: in-context learning and prompt-based fine-tuning.Prior approaches to mitigate intrinsic bias primarily focus on achieving social fairness, and often require laborious corpora augmentation and costly re-training Huang etal. (2020); Kaneko and Bollegala (2021); Solaiman and Dennison (2021); Li etal. (2023a). To improve efficiency in both data generation and model updates,we propose leveraging auto-generated null-meaning inputs to prompt pre-trained LMs for intrinsic bias probing, and subsequently updating only bias parameters BLM of LMs for bias calibration. Null-meaning inputs are essentially normal text devoid of meaningful content or sentiment. Unlike numerical-zero inputs, they maintain the contextual framework of prompts, ensuring the proper functioning of contextual LMs.Our motivation stems from the expectation that bias-calibrated models should produce uniform probabilities across all categories if the input in a prompt delivers null information Zhao etal. (2021). BLM functions as offsets in neural networks, and strategically updating only BLM could potentially counteract intrinsic bias of pre-trained models, achieving higher efficiency (updating 0.1%similar-toabsentpercent0.1\sim 0.1\%∼ 0.1 % parameters of entire LM). The approach promotes an equitable starting point, and we expect that the light model updates preserve pre-trained models’ language modeling abilities while maintaining the focus on bias calibration, ultimately making LMs better zero/few-shot learners.

The pipeline of our calibration method is illustrated in Figure1. We use Masked LMs (RoBERTa Liu etal., 2019) for zero/few-shot learning since they generally produce competitive performance in classification tasks and their moderate size facilitates combining prompting with fine-tuning Gao etal. (2021); Liu etal. (2023).First, we utilize GPT-4 API to automatically generate diverse null-meaning inputs 𝒳nullsubscript𝒳null\mathcal{X}_{\text{null}}caligraphic_X start_POSTSUBSCRIPT null end_POSTSUBSCRIPT including symbols, words, phrases, and sentences. This generation process is downstream task-agnostic.By concatenating each null-meaning input xnullsubscript𝑥nullx_{\text{null}}italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT with an answer format ans aligned with the downstream task, we construct null-input prompts (similar to Zhao etal., 2021), e.g., "An empty sentence. It is about <mask>.".For better cohesive integration of the "null" information into the prompts, we additionally devise a filtering strategy to select xnullsubscript𝑥nullx_{\text{null}}italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT, to which the answer format ans exhibits relatively strong Next Sentence Prediction (NSP) correlation Devlin etal. (2019). Next, we update BLM with null-input prompts to calibrate intrinsic bias. Given the absence of task-relevant information in these prompts, the anticipated outcome in the parameter updating process is a convergence towards equal output probabilities for each label word. We formulate a customized Kullback–Leibler (KL) divergence loss for gradient descent on BLM to minimize the distribution disparity. Finally, bias-calibrated LMs are applied in downstream prompt-based zero/few-shot learning following Gao etal. (2021).

The main contributions of our work are:

  • We introduce a null-input prompting method for calibrating intrinsic bias of pre-trained Masked LMs, aiming for better prompt-based zero/few-shot classification performance.

  • Our method integrates two key aspects for efficient bias calibration: auto-construction of null-input prompts and updating only bias parameters of LMs.The calibration promotes a fair starting point for LMs while preserving language modeling abilities.

  • Extensive experiments on eight classification datasetswith four prompt-based learning approaches show that our method significantly improves LMs’ zero/few-shot performance, and outperforms output-calibration methods.

2 Related Work

Impact of intrinsic bias on downstream LM performance.Intrinsic bias in pre-trained LMs stems from imbalances present in extensive pre-training corpora. Higher frequency of specific terms in those corpora could lead to common token bias Zhao etal. (2021). Additionally, frequent co-occurrence of certain terms with specific sentiment in pre-training could introduce association bias Cao etal. (2022).Because of those intrinsic bias, prompt-based predictions by pre-trained LMs are prone to bias towards some specific answers, resulting in sub-optimal performance in downstream tasks Zhao etal. (2021); Han etal. (2023).

Mitigating strategies. Research has focused on counteracting the bias solely at the output prediction stage, without modifying pre-trained LMs. For example, Zhao etal. (2021) introduces contextual calibration and Holtzman etal. (2022) presents Domain Conditional Pointwise Mutual Information to reweigh answer scores. Min etal. (2022) explores computing the probability of the input conditioned on the label. Han etal. (2023) proposes to calibrate decision boundaries. However, these studies mainly demonstrate their effectiveness for in-context learning using frozen pre-trained LMs, without addressing the intrinsic bias encoded in the LMs.Other research on mitigating intrinsic bias primarily targets removing social bias Dinan etal. (2020); Huang etal. (2020); Cheng etal. (2021); Zhou etal. (2023), often employing costly data augmentation and re-training, and as a by-product, degrades language modeling abilities Meade etal. (2022).

Efficiently calibrating intrinsic bias in pre-trained LMs for enhancing downstream zero/few-shot learning performance is an open research problem. We introduce a parameter-efficient intrinsic-bias calibration method leveraging automatically constructed null-input prompts, which significantly improves zero/few-shot learning of LMs.

Parameter-efficient fine-tuning (PEFT) for downstream tasks. It has been demonstrated that fine-tuning a very small portion of model parameters can achieve performance on par with fine-tuning the entire set of parameters. People propose integrating small, trainable adapter modules between model layers Bapna and Firat (2019); Houlsby etal. (2019), coupled with further optimization using low-rank adaptations (LoRA) Hu etal. (2021). Some other research focuses on prompt tuning Lester etal. (2021); Li and Liang (2021); Gu etal. (2022); Guo etal. (2022) which only tunes continuous prompt embeddings for efficiently adapting pre-trained LMs to downstream tasks.

Our method provides a unique perspective of enhancing LM performance on downstream tasks through efficient intrinsic-bias calibration. We update only bias parameters of pre-trained LMs with null-input prompts in calibration. Contrary to adapters and LoRA which would need sufficient labeled data to learn new matrices, we do not introduce new matrices to pre-trained LMs, preserving LMs’ few-shot learning capabilities.Moreover, our approach does not necessarily require target-domain data (whether labeled or unlabeled), enabling fully unsupervised deployment, particularly advantageous for zero-shot setting.

3 Null-Input Prompting for Intrinsic Bias Calibration

3.1 Task Formulation

Let 𝓛𝓜𝓛𝓜\bm{\mathcal{LM}}bold_caligraphic_L bold_caligraphic_M be a pre-trained Masked LM. Verbalizer V()𝑉V(\cdot)italic_V ( ⋅ ) maps label y𝑦yitalic_y to vocabulary token. Prompt function fp()subscript𝑓pf_{\textit{p}}(\cdot)italic_f start_POSTSUBSCRIPT p end_POSTSUBSCRIPT ( ⋅ ) modifies original input xinsubscript𝑥inx_{\text{in}}italic_x start_POSTSUBSCRIPT in end_POSTSUBSCRIPT into cloze-style prompt containing one <mask> token to be predicted.The output representation 𝐡<mask>subscript𝐡<mask>\mathbf{h}_{\text{<mask>}}bold_h start_POSTSUBSCRIPT <mask> end_POSTSUBSCRIPT of the <mask> token is acquired from the last encoder layer after forwarding the prompt to the LM. Following Gao etal. (2021), the probability prediction of each class y𝒴𝑦𝒴y\in\mathcal{Y}italic_y ∈ caligraphic_Y is formulated as:

P(y|xin,𝓛𝓜)=P(V(y)|fp(xin),𝓛𝓜)=exp(indexV(y)(𝐖lm_head𝐡<mask>))j=1|𝒴|exp(indexV(yj)(𝐖lm_head𝐡<mask>)),𝑃conditional𝑦subscript𝑥in𝓛𝓜𝑃conditional𝑉𝑦subscript𝑓psubscript𝑥in𝓛𝓜subscriptindex𝑉𝑦subscript𝐖lm_headsubscript𝐡<mask>superscriptsubscript𝑗1𝒴subscriptindex𝑉subscript𝑦jsubscript𝐖lm_headsubscript𝐡<mask>P(y\,|\,x_{\text{in}},\bm{\mathcal{LM}})=P(V(y)\,|\,f_{\textit{p}}(x_{\text{in%}}),\bm{\mathcal{LM}})=\\\frac{\exp\left(\textit{index}_{V(y)}(\mathbf{W}_{\text{lm\_head}}\cdot\mathbf%{h}_{\text{<mask>}})\right)}{\sum_{j=1}^{|\mathcal{Y}|}\exp\left(\textit{index%}_{V(y_{\text{j}})}(\mathbf{W}_{\text{lm\_head}}\cdot\mathbf{h}_{\text{<mask>}%})\right)},start_ROW start_CELL italic_P ( italic_y | italic_x start_POSTSUBSCRIPT in end_POSTSUBSCRIPT , bold_caligraphic_L bold_caligraphic_M ) = italic_P ( italic_V ( italic_y ) | italic_f start_POSTSUBSCRIPT p end_POSTSUBSCRIPT ( italic_x start_POSTSUBSCRIPT in end_POSTSUBSCRIPT ) , bold_caligraphic_L bold_caligraphic_M ) = end_CELL end_ROW start_ROW start_CELL divide start_ARG roman_exp ( index start_POSTSUBSCRIPT italic_V ( italic_y ) end_POSTSUBSCRIPT ( bold_W start_POSTSUBSCRIPT lm_head end_POSTSUBSCRIPT ⋅ bold_h start_POSTSUBSCRIPT <mask> end_POSTSUBSCRIPT ) ) end_ARG start_ARG ∑ start_POSTSUBSCRIPT italic_j = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT | caligraphic_Y | end_POSTSUPERSCRIPT roman_exp ( index start_POSTSUBSCRIPT italic_V ( italic_y start_POSTSUBSCRIPT j end_POSTSUBSCRIPT ) end_POSTSUBSCRIPT ( bold_W start_POSTSUBSCRIPT lm_head end_POSTSUBSCRIPT ⋅ bold_h start_POSTSUBSCRIPT <mask> end_POSTSUBSCRIPT ) ) end_ARG , end_CELL end_ROW(1)

where 𝐖lm_headsubscript𝐖lm_head\mathbf{W}_{\text{lm\_head}}bold_W start_POSTSUBSCRIPT lm_head end_POSTSUBSCRIPT is the pre-trained masked language modeling head weight matrix, and indexV(y)subscriptindex𝑉𝑦\textit{index}_{V(y)}index start_POSTSUBSCRIPT italic_V ( italic_y ) end_POSTSUBSCRIPT selects the logits corresponding to the label words based on their index in LM token list.

One can probe intrinsic bias encoded in pre-trained LM by replacing xinsubscript𝑥inx_{\text{in}}italic_x start_POSTSUBSCRIPT in end_POSTSUBSCRIPT with null-meaning input xnull𝒳nullsubscript𝑥nullsubscript𝒳nullx_{\text{null}}\in\mathcal{X}_{\text{null}}italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT ∈ caligraphic_X start_POSTSUBSCRIPT null end_POSTSUBSCRIPT Zhao etal. (2021). 𝒳nullsubscript𝒳null\mathcal{X}_{\text{null}}caligraphic_X start_POSTSUBSCRIPT null end_POSTSUBSCRIPT represents a set of xnullsubscript𝑥nullx_{\text{null}}italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT and we will elaborate their generation and selection in §4.As shown by the blue bars in the upper part of Figure1, while null-meaning inputs essentially provide no task-relevant prior information, the mean output probability associated with different labels P¯𝒳null(y|xnull,𝓛𝓜)subscript¯𝑃subscript𝒳nullconditional𝑦subscript𝑥null𝓛𝓜\bar{P}_{\mathcal{X}_{\text{null}}}(y\,|\,x_{\text{null}},\bm{\mathcal{LM}})over¯ start_ARG italic_P end_ARG start_POSTSUBSCRIPT caligraphic_X start_POSTSUBSCRIPT null end_POSTSUBSCRIPT end_POSTSUBSCRIPT ( italic_y | italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT , bold_caligraphic_L bold_caligraphic_M ) may exhibit significant difference attributed to model’s intrinsic bias. Ideally, for bias-calibrated LM 𝓛𝓜calib𝓛subscript𝓜calib\bm{\mathcal{LM}_{\textit{calib}}}bold_caligraphic_L bold_caligraphic_M start_POSTSUBSCRIPT calib end_POSTSUBSCRIPT, the expectation of output distribution conditioned on null-meaning inputs should be uniform across all label words, i.e.,

𝔼𝒳null[P(y|xnull,𝓛𝓜calib;y𝒴)]=1|𝒴|.subscript𝔼subscript𝒳nulldelimited-[]𝑃conditional𝑦subscript𝑥null𝓛subscript𝓜calibfor-all𝑦𝒴1𝒴\mathbb{E}_{\mathcal{X}_{\text{null}}}\left[P(y\,|\,x_{\text{null}},\bm{%\mathcal{LM}_{\textit{calib}}};\forall y\in\mathcal{Y})\right]=\frac{1}{\lvert%\mathcal{Y}\rvert}.blackboard_E start_POSTSUBSCRIPT caligraphic_X start_POSTSUBSCRIPT null end_POSTSUBSCRIPT end_POSTSUBSCRIPT [ italic_P ( italic_y | italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT , bold_caligraphic_L bold_caligraphic_M start_POSTSUBSCRIPT calib end_POSTSUBSCRIPT ; ∀ italic_y ∈ caligraphic_Y ) ] = divide start_ARG 1 end_ARG start_ARG | caligraphic_Y | end_ARG .(2)

We aim to calibrate intrinsic bias by updating LM to minimize this distribution disparity which we quantify using differentiable KL divergence as:

D𝒦(U(𝒴)||P¯𝒳null(𝒴))\displaystyle D_{\mathcal{KL}}\left(U(\mathcal{Y})\,||\,\bar{P}_{\mathcal{X}_{%\text{null}}}(\mathcal{Y})\right)italic_D start_POSTSUBSCRIPT caligraphic_K caligraphic_L end_POSTSUBSCRIPT ( italic_U ( caligraphic_Y ) | | over¯ start_ARG italic_P end_ARG start_POSTSUBSCRIPT caligraphic_X start_POSTSUBSCRIPT null end_POSTSUBSCRIPT end_POSTSUBSCRIPT ( caligraphic_Y ) )
=y𝒴(1/|𝒴|log1/|𝒴|P¯𝒳null(y))absentsubscript𝑦𝒴1𝒴1𝒴subscript¯𝑃subscript𝒳null𝑦\displaystyle=\sum_{y\in\mathcal{Y}}\left(1/\lvert\mathcal{Y}\rvert\cdot\log%\frac{1/\lvert\mathcal{Y}\rvert}{\bar{P}_{\mathcal{X}_{\text{null}}}(y)}\right)= ∑ start_POSTSUBSCRIPT italic_y ∈ caligraphic_Y end_POSTSUBSCRIPT ( 1 / | caligraphic_Y | ⋅ roman_log divide start_ARG 1 / | caligraphic_Y | end_ARG start_ARG over¯ start_ARG italic_P end_ARG start_POSTSUBSCRIPT caligraphic_X start_POSTSUBSCRIPT null end_POSTSUBSCRIPT end_POSTSUBSCRIPT ( italic_y ) end_ARG )
=log(1/|𝒴|)(1/|𝒴|)y𝒴logP¯𝒳null(y),absent1𝒴1𝒴subscript𝑦𝒴subscript¯𝑃subscript𝒳null𝑦\displaystyle=\log(1/\lvert\mathcal{Y}\rvert)-(1/\lvert\mathcal{Y}\rvert)\cdot%\sum_{y\in\mathcal{Y}}\log\bar{P}_{\mathcal{X}_{\text{null}}}(y),= roman_log ( 1 / | caligraphic_Y | ) - ( 1 / | caligraphic_Y | ) ⋅ ∑ start_POSTSUBSCRIPT italic_y ∈ caligraphic_Y end_POSTSUBSCRIPT roman_log over¯ start_ARG italic_P end_ARG start_POSTSUBSCRIPT caligraphic_X start_POSTSUBSCRIPT null end_POSTSUBSCRIPT end_POSTSUBSCRIPT ( italic_y ) ,(3)

where U(𝒴)𝑈𝒴U(\mathcal{Y})italic_U ( caligraphic_Y ) denotes uniform probability distribution and P¯𝒳null(y)subscript¯𝑃subscript𝒳null𝑦\bar{P}_{\mathcal{X}_{\text{null}}}(y)over¯ start_ARG italic_P end_ARG start_POSTSUBSCRIPT caligraphic_X start_POSTSUBSCRIPT null end_POSTSUBSCRIPT end_POSTSUBSCRIPT ( italic_y ) represents the simplified form of P¯𝒳null(y|xnull,𝓛𝓜)subscript¯𝑃subscript𝒳nullconditional𝑦subscript𝑥null𝓛𝓜\bar{P}_{\mathcal{X}_{\text{null}}}(y\,|\,x_{\text{null}},\bm{\mathcal{LM}})over¯ start_ARG italic_P end_ARG start_POSTSUBSCRIPT caligraphic_X start_POSTSUBSCRIPT null end_POSTSUBSCRIPT end_POSTSUBSCRIPT ( italic_y | italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT , bold_caligraphic_L bold_caligraphic_M ).

3.2 Update Only Bias Parameters

While intrinsic bias may be encoded across various parts of pre-trained LMs, one question arises: is it essential to update the entire model, or is there a more efficient alternative that can achieve comparable effectiveness in intrinsic bias calibration? We propose to only update bias parameters BLM, with the following rationale: (i) BLM constitutes less than 0.1%percent0.10.1\%0.1 % of total LM parameters, offering significant memory and computation cost saving compared to updating entire LM. (ii) Weight parameters WLM222WLM also includes embedding parameters in our context. may carry crucial pre-existing knowledge for language modeling, which risks impairment with a full model update Meade etal. (2022). BLM, often overlooked in LM research, serves as offsets in neural network layers. Strategic updates may counteract intrinsic bias while potentially preserving language modeling abilities. (iii) Empirical research on efficient fine-tuning has demonstrated the important role of bias parameters in LMs BenZaken etal. (2022); LoganIV etal. (2022).

We update BLM using gradient descent to minimize the dissimilarity between output probability distribution from the LM conditioned on null-meaning inputs and uniform probability distribution U(𝒴)𝑈𝒴U(\mathcal{Y})italic_U ( caligraphic_Y ). We formulate a customized KL divergence loss \mathcal{L}caligraphic_L, including both divergence of individual null-input’s output distribution Pi(𝒴)subscript𝑃𝑖𝒴P_{i}(\mathcal{Y})italic_P start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ( caligraphic_Y ) with respect to U(𝒴)𝑈𝒴U(\mathcal{Y})italic_U ( caligraphic_Y ), and batch-averaged distribution P¯N(𝒴)subscript¯𝑃𝑁𝒴\bar{P}_{N}(\mathcal{Y})over¯ start_ARG italic_P end_ARG start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT ( caligraphic_Y ) with respect to U(𝒴)𝑈𝒴U(\mathcal{Y})italic_U ( caligraphic_Y ), as:

=absent\displaystyle\mathcal{L}=caligraphic_L =1Ni=1ND𝒦(U(𝒴)||Pi(𝒴))\displaystyle\frac{1}{N}\sum_{i=1}^{N}D_{\mathcal{KL}}\bigl{(}U(\mathcal{Y})\,%||\,P_{i}(\mathcal{Y})\bigr{)}divide start_ARG 1 end_ARG start_ARG italic_N end_ARG ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N end_POSTSUPERSCRIPT italic_D start_POSTSUBSCRIPT caligraphic_K caligraphic_L end_POSTSUBSCRIPT ( italic_U ( caligraphic_Y ) | | italic_P start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ( caligraphic_Y ) )
+D𝒦(U(𝒴)||P¯N(𝒴)),\displaystyle+D_{\mathcal{KL}}\bigl{(}U(\mathcal{Y})\,||\,\bar{P}_{N}(\mathcal%{Y})\bigr{)},+ italic_D start_POSTSUBSCRIPT caligraphic_K caligraphic_L end_POSTSUBSCRIPT ( italic_U ( caligraphic_Y ) | | over¯ start_ARG italic_P end_ARG start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT ( caligraphic_Y ) ) ,(4)

where N𝑁Nitalic_N is the batch size of null-meaning inputs. Incorporating the second term in the loss function promotes calibration stability and aligns with the objective of Equation2.

3.3 Early Stopping of Calibration

We aim to obtain LM with improved zero/few-shot performance at the calibration stopping point. An overly calibrated model may simply produce uniform probability predictions regardless of input information. To avoid this, we develop specialized early stopping strategies depending on whether the downstream task is zero-shot or few-shot.

For zero-shot downstream tasks.Determining the calibration stopping point for optimal zero-shot learning performance is challenging due to the absence of labeled data for validation during calibration. To discern the patterns of a good stopping point, we first conduct empirical experiments by validating LM zero-shot performance on the entire test dataset after each calibration batch (consisting of N𝑁Nitalic_N null-meaning inputs) across different calibration learning rates (Figure7 in AppendixA).As shown in Figure2, with optimal calibration learning rate, model performance exhibits significant improvements in the first one/few calibration batches with low variance, and then starts to degrade and becomes unstable. The low performance and instability at the calibration tail confirm our assumption on the detrimental effects of excessive calibration on LM’s modeling abilities. Notably, calibration with only one batch of null inputs (indicated by the red vertical line in Figure2) delivers consistent and significant improvement compared to the original LM (although might not be the best improvement). Therefore, for enhancing LM zero-shot performance, we directly adopt the One-batch Calibration as the early stopping criterion.

Prompt-Based Bias Calibration for Better Zero/Few-Shot Learning of Language Models (2)

For few-shot downstream tasks.With the acquisition of a few labeled downstream data, the previous challenge of lacking validation for determining the stopping point in the calibration process is alleviated. We utilize the small amount of labeled data as validation dataset 𝒟valcalibsuperscriptsubscript𝒟valcalib\mathcal{D}_{\text{val}}^{\text{calib}}caligraphic_D start_POSTSUBSCRIPT val end_POSTSUBSCRIPT start_POSTSUPERSCRIPT calib end_POSTSUPERSCRIPT to set a stopping criterion for calibration. Additionally, we take into account above-mentioned empirical findings that, for some tasks, stopping at one batch of calibration yields optimal LM performance. Relying on the limited size of 𝒟valcalibsuperscriptsubscript𝒟valcalib\mathcal{D}_{\text{val}}^{\text{calib}}caligraphic_D start_POSTSUBSCRIPT val end_POSTSUBSCRIPT start_POSTSUPERSCRIPT calib end_POSTSUPERSCRIPT might fail to identify such stopping points. To this effect, we store both LMcalibone_batch𝐿superscriptsubscript𝑀calibone_batchLM_{\text{calib}}^{\text{one\_batch}}italic_L italic_M start_POSTSUBSCRIPT calib end_POSTSUBSCRIPT start_POSTSUPERSCRIPT one_batch end_POSTSUPERSCRIPT (obtained from one-batch stopping) and LMcalibval𝐿superscriptsubscript𝑀calibvalLM_{\text{calib}}^{\text{val}}italic_L italic_M start_POSTSUBSCRIPT calib end_POSTSUBSCRIPT start_POSTSUPERSCRIPT val end_POSTSUPERSCRIPT (obtained from validation-based stopping) for downstream few-shot leaning tasks. Since LMcalibone_batch𝐿superscriptsubscript𝑀calibone_batchLM_{\text{calib}}^{\text{one\_batch}}italic_L italic_M start_POSTSUBSCRIPT calib end_POSTSUBSCRIPT start_POSTSUPERSCRIPT one_batch end_POSTSUPERSCRIPT is stored in the process of obtaining LMcalibval𝐿superscriptsubscript𝑀calibvalLM_{\text{calib}}^{\text{val}}italic_L italic_M start_POSTSUBSCRIPT calib end_POSTSUBSCRIPT start_POSTSUPERSCRIPT val end_POSTSUPERSCRIPT, this will not result in additional computation overhead. Memory overhead is minimal, as it only requires storing an additional set of updated bias parameters.

We summarize our method for intrinsic bias calibration in Algorithm1 (AppendixA).

4 Auto-Construct Null-Input Prompt

4.1 Generate Null-Meaning Input

We employ null-meaning inputs to probe the intrinsic bias of pre-trained LMs, and then use those bias-reflected outputs to calibrate the LMs. Crafting a diverse set of null-meaning inputs 𝒳nullsubscript𝒳null\mathcal{X}_{\text{null}}caligraphic_X start_POSTSUBSCRIPT null end_POSTSUBSCRIPT for an averaged output helps prevent overfitting to sub-optimal instances, thereby contributing to the effectiveness of calibration.To enable cost-effective acquisition of various null-meaning data, we utilize GPT-4 API for automatic generation with instructions such as "Please generate null meaning symbols, words, phrases, and sentences, in total <Number>.". This process is task-agnostic, generating data that contains null information with respect to any downstream task. Note that null information is not equivalent to neutral sentiment, as it carries no inherent meaning or contextual sentiment implications. We further validate this through t-SNE vander Maaten and Hinton (2008) visualization in AppendixA Figure6.

Generated null-meaning input xnullsubscript𝑥nullx_{\text{null}}italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPTPnsp(xnull,ans)subscript𝑃nspsubscript𝑥nullansP_{\textit{nsp}}(x_{\text{null}},\textit{ans})italic_P start_POSTSUBSCRIPT nsp end_POSTSUBSCRIPT ( italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT , ans )
This is an example sentence.0.9996
A message without purpose.0.9979
Words without message.0.9809
123abc0.0267
​@#$%^&*()-_=+[]{}0.0145
////////////////////0.0008

4.2 Select xnullsubscript𝑥nullx_{\text{null}}italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT and Build Null-Input Prompt

We construct null-input prompt fp(xnull)subscript𝑓psubscript𝑥nullf_{\textit{p}}(x_{\text{null}})italic_f start_POSTSUBSCRIPT p end_POSTSUBSCRIPT ( italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT )by concatenating the generated null-meaning input with an answer format ans. For consistency, the answer format (e.g., "It is <mask>.") is the same as the one intended for use in the downstream task. Some examples are shown in the upper part of Figure1.

In-context lrn no demoIn-context lrn with demoPrompt FT no demoPrompt FT with demo
NoCalOutCalIntrCalNoCalOutCalIntrCalNoCalOutCalIntrCalNoCalOutCalIntrCal
AGNews47.00.0subscript47.00.047.0_{\text{0.0}}47.0 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT54.31.0subscript54.31.054.3_{\text{1.0}}54.3 start_POSTSUBSCRIPT 1.0 end_POSTSUBSCRIPT54.50.6subscript54.50.6\textbf{54.5}_{\text{0.6}}54.5 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT79.70.8subscript79.70.879.7_{\text{0.8}}79.7 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT78.83.3subscript78.83.378.8_{\text{3.3}}78.8 start_POSTSUBSCRIPT 3.3 end_POSTSUBSCRIPT82.40.9subscript82.40.9\textbf{82.4}_{\text{0.9}}82.4 start_POSTSUBSCRIPT 0.9 end_POSTSUBSCRIPT89.10.9subscript89.10.9\textbf{89.1}_{\text{0.9}}89.1 start_POSTSUBSCRIPT 0.9 end_POSTSUBSCRIPT86.31.6subscript86.31.686.3_{\text{1.6}}86.3 start_POSTSUBSCRIPT 1.6 end_POSTSUBSCRIPT89.00.8subscript89.00.889.0_{\text{0.8}}89.0 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT86.92.8subscript86.92.886.9_{\text{2.8}}86.9 start_POSTSUBSCRIPT 2.8 end_POSTSUBSCRIPT87.51.3subscript87.51.387.5_{\text{1.3}}87.5 start_POSTSUBSCRIPT 1.3 end_POSTSUBSCRIPT89.30.9subscript89.30.9\textbf{89.3}_{\text{0.9}}89.3 start_POSTSUBSCRIPT 0.9 end_POSTSUBSCRIPT
DBPedia58.20.0subscript58.20.058.2_{\text{0.0}}58.2 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT54.11.9subscript54.11.954.1_{\text{1.9}}54.1 start_POSTSUBSCRIPT 1.9 end_POSTSUBSCRIPT61.80.6subscript61.80.6\textbf{61.8}_{\text{0.6}}61.8 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT92.60.6subscript92.60.692.6_{\text{0.6}}92.6 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT94.00.9subscript94.00.994.0_{\text{0.9}}94.0 start_POSTSUBSCRIPT 0.9 end_POSTSUBSCRIPT94.80.7subscript94.80.7\textbf{94.8}_{\text{0.7}}94.8 start_POSTSUBSCRIPT 0.7 end_POSTSUBSCRIPT98.21.3subscript98.21.398.2_{\text{1.3}}98.2 start_POSTSUBSCRIPT 1.3 end_POSTSUBSCRIPT99.00.5subscript99.00.599.0_{\text{0.5}}99.0 start_POSTSUBSCRIPT 0.5 end_POSTSUBSCRIPT99.00.1subscript99.00.1\textbf{99.0}_{\text{0.1}}99.0 start_POSTSUBSCRIPT 0.1 end_POSTSUBSCRIPT98.60.3subscript98.60.398.6_{\text{0.3}}98.6 start_POSTSUBSCRIPT 0.3 end_POSTSUBSCRIPT98.50.2subscript98.50.298.5_{\text{0.2}}98.5 start_POSTSUBSCRIPT 0.2 end_POSTSUBSCRIPT98.90.3subscript98.90.3\textbf{98.9}_{\text{0.3}}98.9 start_POSTSUBSCRIPT 0.3 end_POSTSUBSCRIPT
TREC24.00.0subscript24.00.024.0_{\text{0.0}}24.0 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT29.42.1subscript29.42.129.4_{\text{2.1}}29.4 start_POSTSUBSCRIPT 2.1 end_POSTSUBSCRIPT31.10.5subscript31.10.5\textbf{31.1}_{\text{0.5}}31.1 start_POSTSUBSCRIPT 0.5 end_POSTSUBSCRIPT48.31.4subscript48.31.448.3_{\text{1.4}}48.3 start_POSTSUBSCRIPT 1.4 end_POSTSUBSCRIPT42.53.4subscript42.53.442.5_{\text{3.4}}42.5 start_POSTSUBSCRIPT 3.4 end_POSTSUBSCRIPT48.62.2subscript48.62.2\textbf{48.6}_{\text{2.2}}48.6 start_POSTSUBSCRIPT 2.2 end_POSTSUBSCRIPT85.07.4subscript85.07.485.0_{\text{7.4}}85.0 start_POSTSUBSCRIPT 7.4 end_POSTSUBSCRIPT82.22.0subscript82.22.082.2_{\text{2.0}}82.2 start_POSTSUBSCRIPT 2.0 end_POSTSUBSCRIPT89.34.5subscript89.34.5\textbf{89.3}_{\text{4.5}}89.3 start_POSTSUBSCRIPT 4.5 end_POSTSUBSCRIPT87.62.5subscript87.62.587.6_{\text{2.5}}87.6 start_POSTSUBSCRIPT 2.5 end_POSTSUBSCRIPT74.24.0subscript74.24.074.2_{\text{4.0}}74.2 start_POSTSUBSCRIPT 4.0 end_POSTSUBSCRIPT89.71.0subscript89.71.0\textbf{89.7}_{\text{1.0}}89.7 start_POSTSUBSCRIPT 1.0 end_POSTSUBSCRIPT
Subj50.80.0subscript50.80.050.8_{\text{0.0}}50.8 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT64.02.7subscript64.02.7\textbf{64.0}_{\text{2.7}}64.0 start_POSTSUBSCRIPT 2.7 end_POSTSUBSCRIPT62.70.8subscript62.70.862.7_{\text{0.8}}62.7 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT47.20.2subscript47.20.247.2_{\text{0.2}}47.2 start_POSTSUBSCRIPT 0.2 end_POSTSUBSCRIPT55.01.3subscript55.01.355.0_{\text{1.3}}55.0 start_POSTSUBSCRIPT 1.3 end_POSTSUBSCRIPT63.52.3subscript63.52.3\textbf{63.5}_{\text{2.3}}63.5 start_POSTSUBSCRIPT 2.3 end_POSTSUBSCRIPT91.20.9subscript91.20.991.2_{\text{0.9}}91.2 start_POSTSUBSCRIPT 0.9 end_POSTSUBSCRIPT88.22.5subscript88.22.588.2_{\text{2.5}}88.2 start_POSTSUBSCRIPT 2.5 end_POSTSUBSCRIPT93.21.2subscript93.21.2\textbf{93.2}_{\text{1.2}}93.2 start_POSTSUBSCRIPT 1.2 end_POSTSUBSCRIPT91.43.3subscript91.43.391.4_{\text{3.3}}91.4 start_POSTSUBSCRIPT 3.3 end_POSTSUBSCRIPT93.00.8subscript93.00.893.0_{\text{0.8}}93.0 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT94.30.2subscript94.30.2\textbf{94.3}_{\text{0.2}}94.3 start_POSTSUBSCRIPT 0.2 end_POSTSUBSCRIPT
SST-531.50.0subscript31.50.031.5_{\text{0.0}}31.5 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT33.02.1subscript33.02.133.0_{\text{2.1}}33.0 start_POSTSUBSCRIPT 2.1 end_POSTSUBSCRIPT37.50.4subscript37.50.4\textbf{37.5}_{\text{0.4}}37.5 start_POSTSUBSCRIPT 0.4 end_POSTSUBSCRIPT34.41.7subscript34.41.734.4_{\text{1.7}}34.4 start_POSTSUBSCRIPT 1.7 end_POSTSUBSCRIPT31.22.6subscript31.22.631.2_{\text{2.6}}31.2 start_POSTSUBSCRIPT 2.6 end_POSTSUBSCRIPT36.61.0subscript36.61.0\textbf{36.6}_{\text{1.0}}36.6 start_POSTSUBSCRIPT 1.0 end_POSTSUBSCRIPT47.84.6subscript47.84.647.8_{\text{4.6}}47.8 start_POSTSUBSCRIPT 4.6 end_POSTSUBSCRIPT45.32.8subscript45.32.845.3_{\text{2.8}}45.3 start_POSTSUBSCRIPT 2.8 end_POSTSUBSCRIPT49.92.7subscript49.92.7\textbf{49.9}_{\text{2.7}}49.9 start_POSTSUBSCRIPT 2.7 end_POSTSUBSCRIPT47.11.9subscript47.11.947.1_{\text{1.9}}47.1 start_POSTSUBSCRIPT 1.9 end_POSTSUBSCRIPT42.64.0subscript42.64.042.6_{\text{4.0}}42.6 start_POSTSUBSCRIPT 4.0 end_POSTSUBSCRIPT50.01.7subscript50.01.7\textbf{50.0}_{\text{1.7}}50.0 start_POSTSUBSCRIPT 1.7 end_POSTSUBSCRIPT
Laptop54.60.0subscript54.60.054.6_{\text{0.0}}54.6 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT58.32.5subscript58.32.558.3_{\text{2.5}}58.3 start_POSTSUBSCRIPT 2.5 end_POSTSUBSCRIPT59.61.9subscript59.61.9\textbf{59.6}_{\text{1.9}}59.6 start_POSTSUBSCRIPT 1.9 end_POSTSUBSCRIPT50.81.0subscript50.81.050.8_{\text{1.0}}50.8 start_POSTSUBSCRIPT 1.0 end_POSTSUBSCRIPT65.12.7subscript65.12.765.1_{\text{2.7}}65.1 start_POSTSUBSCRIPT 2.7 end_POSTSUBSCRIPT67.41.7subscript67.41.7\textbf{67.4}_{\text{1.7}}67.4 start_POSTSUBSCRIPT 1.7 end_POSTSUBSCRIPT74.31.4subscript74.31.474.3_{\text{1.4}}74.3 start_POSTSUBSCRIPT 1.4 end_POSTSUBSCRIPT74.31.6subscript74.31.674.3_{\text{1.6}}74.3 start_POSTSUBSCRIPT 1.6 end_POSTSUBSCRIPT74.92.9subscript74.92.9\textbf{74.9}_{\text{2.9}}74.9 start_POSTSUBSCRIPT 2.9 end_POSTSUBSCRIPT76.81.0subscript76.81.076.8_{\text{1.0}}76.8 start_POSTSUBSCRIPT 1.0 end_POSTSUBSCRIPT75.61.4subscript75.61.475.6_{\text{1.4}}75.6 start_POSTSUBSCRIPT 1.4 end_POSTSUBSCRIPT78.71.4subscript78.71.4\textbf{78.7}_{\text{1.4}}78.7 start_POSTSUBSCRIPT 1.4 end_POSTSUBSCRIPT
Restaurant68.60.0subscript68.60.068.6_{\text{0.0}}68.6 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT72.04.9subscript72.04.972.0_{\text{4.9}}72.0 start_POSTSUBSCRIPT 4.9 end_POSTSUBSCRIPT72.81.6subscript72.81.6\textbf{72.8}_{\text{1.6}}72.8 start_POSTSUBSCRIPT 1.6 end_POSTSUBSCRIPT69.81.1subscript69.81.169.8_{\text{1.1}}69.8 start_POSTSUBSCRIPT 1.1 end_POSTSUBSCRIPT74.31.6subscript74.31.6\textbf{74.3}_{\text{1.6}}74.3 start_POSTSUBSCRIPT 1.6 end_POSTSUBSCRIPT74.01.0subscript74.01.074.0_{\text{1.0}}74.0 start_POSTSUBSCRIPT 1.0 end_POSTSUBSCRIPT79.72.2subscript79.72.279.7_{\text{2.2}}79.7 start_POSTSUBSCRIPT 2.2 end_POSTSUBSCRIPT79.01.0subscript79.01.079.0_{\text{1.0}}79.0 start_POSTSUBSCRIPT 1.0 end_POSTSUBSCRIPT82.00.9subscript82.00.9\textbf{82.0}_{\text{0.9}}82.0 start_POSTSUBSCRIPT 0.9 end_POSTSUBSCRIPT78.44.9subscript78.44.978.4_{\text{4.9}}78.4 start_POSTSUBSCRIPT 4.9 end_POSTSUBSCRIPT79.05.5subscript79.05.579.0_{\text{5.5}}79.0 start_POSTSUBSCRIPT 5.5 end_POSTSUBSCRIPT79.84.5subscript79.84.5\textbf{79.8}_{\text{4.5}}79.8 start_POSTSUBSCRIPT 4.5 end_POSTSUBSCRIPT
Twitter19.70.0subscript19.70.019.7_{\text{0.0}}19.7 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT43.44.1subscript43.44.143.4_{\text{4.1}}43.4 start_POSTSUBSCRIPT 4.1 end_POSTSUBSCRIPT51.70.4subscript51.70.4\textbf{51.7}_{\text{0.4}}51.7 start_POSTSUBSCRIPT 0.4 end_POSTSUBSCRIPT21.00.5subscript21.00.521.0_{\text{0.5}}21.0 start_POSTSUBSCRIPT 0.5 end_POSTSUBSCRIPT40.75.4subscript40.75.440.7_{\text{5.4}}40.7 start_POSTSUBSCRIPT 5.4 end_POSTSUBSCRIPT49.42.7subscript49.42.7\textbf{49.4}_{\text{2.7}}49.4 start_POSTSUBSCRIPT 2.7 end_POSTSUBSCRIPT51.72.9subscript51.72.951.7_{\text{2.9}}51.7 start_POSTSUBSCRIPT 2.9 end_POSTSUBSCRIPT44.13.9subscript44.13.944.1_{\text{3.9}}44.1 start_POSTSUBSCRIPT 3.9 end_POSTSUBSCRIPT57.04.2subscript57.04.2\textbf{57.0}_{\text{4.2}}57.0 start_POSTSUBSCRIPT 4.2 end_POSTSUBSCRIPT57.72.8subscript57.72.857.7_{\text{2.8}}57.7 start_POSTSUBSCRIPT 2.8 end_POSTSUBSCRIPT50.34.2subscript50.34.250.3_{\text{4.2}}50.3 start_POSTSUBSCRIPT 4.2 end_POSTSUBSCRIPT59.32.3subscript59.32.3\textbf{59.3}_{\text{2.3}}59.3 start_POSTSUBSCRIPT 2.3 end_POSTSUBSCRIPT
Average44.344.344.344.351.151.151.151.154.055.555.555.555.560.260.260.260.264.677.177.177.177.174.874.874.874.879.378.178.178.178.175.175.175.175.180.0

To pursue better cohesive integration of the "null" information into the prompts, we prioritize the null-meaning inputs, with which the answer format exhibits higher Next Sentence Prediction (NSP) probability Devlin etal. (2019). Specifically, after we generate a large set of null-meaning inputs {xnull_1,xnull_2,,xnull_k}subscript𝑥null_1subscript𝑥null_2subscript𝑥null_k\{x_{\text{null\_1}},x_{\text{null\_2}},\ldots,x_{\text{null\_k}}\}{ italic_x start_POSTSUBSCRIPT null_1 end_POSTSUBSCRIPT , italic_x start_POSTSUBSCRIPT null_2 end_POSTSUBSCRIPT , … , italic_x start_POSTSUBSCRIPT null_k end_POSTSUBSCRIPT } and the answer format ans is selected, we employ BERT-large model Devlin etal. (2019) to predict NSP Pnsp(xnull,ans)subscript𝑃nspsubscript𝑥nullansP_{\textit{nsp}}(x_{\text{null}},\textit{ans})italic_P start_POSTSUBSCRIPT nsp end_POSTSUBSCRIPT ( italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT , ans ) and sort null-meaning inputs by their probabilities. Table1 shows some generated xnullsubscript𝑥nullx_{\text{null}}italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT, with which a specific answer format presents high/low NSP scores. After the sorting, we retain the top 80%percent8080\%80 % xnullsubscript𝑥nullx_{\text{null}}italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT instances (800 in total), which maintains the diversity among the selected samples. We observe that null inputs with low NSP scores are typically randomly-combined alphabet letters and symbols. These samples may have minimal occurrences in pre-training corpora. The low NSP scores can be attributed to RoBERTa’s lack of comprehension of their meanings in context. Their representations extracted by LM might have high variance, which might impact the stability and effectiveness of calibration. We show calibration with the xnullsubscript𝑥nullx_{\text{null}}italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT selection strategy further improves LM performance in §5.2 Table3.

5 Experiments

We conduct extensive experiments on 8 English datasets, including sentiment analysis and topic classification.333 We mainly focus on single-sentence tasks, which aligns with the use of single-sentence null inputs for calibration. The alignment may enhance calibration effectiveness. We also experiment on sentence-pair tasks in AppendixB.3 Table18 and demonstrate better performance after calibration.They consist of 5 sentence-level datasets potentially impacted by common token bias: AGNews Zhang etal. (2015), DBPedia Lehmann etal. (2015), TREC Voorhees and Tice (2000), Subj Pang and Lee (2004), SST-5 Socher etal. (2013) and 3 aspect-level sentiment analysis datasets likely subject to association bias: Restaurant and Laptop reviews from SemEval 2014 Task Pontiki etal. (2014), Twitter Dong etal. (2014).For aspect-level datasets, the task is to predict sentiments associated with the marked aspects in each sentence. More details are in AppendixA Table7.

5.1 Evaluation Protocol

We evaluate the effectiveness of our intrinsic-bias calibration method on enhancing Masked LMs zero/few-shot learning performance with 4 prompt-based learning methods: in-context learning and prompt-based fine-tuning, both with and without demonstration. We follow the prompt-based fine-tuning and demonstration method of Gao etal. (2021). Besides Masked LMs, we also validate the effectiveness of our method on two decoder LMs: GPT-2 XL (1.5B) Radford etal. (2019) and Llama-2 (7B) Touvron etal. (2023) in AppendixB.2.

We conduct calibration with 5 different seeds, and for the few-shot setting, we randomly sample 5 different groups of training and validation sets (K𝐾Kitalic_K samples per class). We report the mean and standard deviation of LM performance. For the 5 sentence-level classification tasks, we use accuracy as the metric. For the 3 aspect-level classification tasks, because of the imbalance in test set, we use weighted F1 for a balanced evaluation. Details of calibration and prompt-based learning are in AppendixA.

We present our main results using RoBERTa-large, and K=16𝐾16K=16italic_K = 16 for few-shot setting. Results of using RoBERTa-base, K={2,4,8}𝐾248K=\{2,4,8\}italic_K = { 2 , 4 , 8 }, and different prompt templates are in AppendixB.3 (Table14, Table15 and Figure8).

5.2 Main Results

In Table2, we compare our results of IntrCal (intrinsic bias calibration) with reproduced results of:

(1) NoCal: No calibration. Use LM-BFF Gao etal. (2021) to compute P(y|xin)𝑃conditional𝑦subscript𝑥inP(y\,|\,x_{\text{in}})italic_P ( italic_y | italic_x start_POSTSUBSCRIPT in end_POSTSUBSCRIPT ) for predictions.

(2) OutCal: Output calibration. OutCal computes P(y|xin)P(y|xdomain)𝑃conditional𝑦subscript𝑥in𝑃conditional𝑦subscript𝑥domain\frac{P(y\,|\,x_{\text{in}})}{P(y\,|\,x_{\text{domain}})}divide start_ARG italic_P ( italic_y | italic_x start_POSTSUBSCRIPT in end_POSTSUBSCRIPT ) end_ARG start_ARG italic_P ( italic_y | italic_x start_POSTSUBSCRIPT domain end_POSTSUBSCRIPT ) end_ARG instead of P(y|xin)𝑃conditional𝑦subscript𝑥inP(y\,|\,x_{\text{in}})italic_P ( italic_y | italic_x start_POSTSUBSCRIPT in end_POSTSUBSCRIPT ) to counteract surface form competition and bias Zhao etal. (2021); Holtzman etal. (2022). Note that OutCal was originally demonstrated for in-context learning with GPT models, while here, we apply the method in Masked LMs for fair comparisons.

In addition to NoCal and OutCal, we compare our results with those reproduced from NoisyTune Wu etal. (2022), NSP-BERT Sun etal. (2022) and Perplection Lu etal. (2023), as detailed in AppendixB.1 (Table8, 9). The superior performance further validates the effectiveness of our method.

In-context learning results. OutCal has significantly improved LM zero/few-shot performance compared to NoCal. Our method (IntrCal) further outperforms OutCal by a large margin: 2.9%percent2.92.9\%2.9 % and 8.3%percent8.38.3\%8.3 % absolute in zero-shot learning & 4.4%percent4.44.4\%4.4 % and 8.7%percent8.78.7\%8.7 % absolute in few-shot learning, in terms of average and best-case improvement. This demonstrates the advantages of intrinsic bias calibration over attempting to counteract bias solely at the output. Moreover, OutCal exhibits higher variance in performance due to its sensitivity to human-crafted domain-relevant strings xdomainsubscript𝑥domainx_{\text{domain}}italic_x start_POSTSUBSCRIPT domain end_POSTSUBSCRIPT. Using certain xdomainsubscript𝑥domainx_{\text{domain}}italic_x start_POSTSUBSCRIPT domain end_POSTSUBSCRIPT instances may not accurately capture the bias of LMs, resulting in under-calibration or over-calibration and leading to the high variance. In our approach, we use a large set of auto-generated and selected xnullsubscript𝑥nullx_{\text{null}}italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT as the training set for bias calibration. This mitigates the impact of sub-optimal samples and enhances calibration robustness, contributing to more stable and reliable performance.

Prompt-based fine-tuning results.This method fine-tunes all LM parameters utilizing limited labeled data by minimizing the cross-entropy loss based on Equation1.It greatly raises LM performance compared to in-context learning and sets up a strong baseline (i.e., NoCal). OutCal fails to surpass NoCal. We speculate that OutCal’s limitation lies in its exclusive focus on offsetting bias at the output and lack of interaction with the interior of LM. This appears to impede OutCal from adapting effectively to the intricate dynamics of LM after prompt-based fine-tuning, leading to some counterproductive calibrations. In contrast, IntrCal (ours) with the aim of intrinsic bias calibration achieves superior performance with absolute gains of maximum 5.3%percent5.35.3\%5.3 % and average 2%percent22\%2 % compared to NoCal.

In-context lrn no demoPrompt FT no demo
UnSel. xnullsubscript𝑥nullx_{\text{null}}italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPTSel. xnullsubscript𝑥nullx_{\text{null}}italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPTUnSel. xnullsubscript𝑥nullx_{\text{null}}italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPTSel. xnullsubscript𝑥nullx_{\text{null}}italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT
AGNews53.10.6subscript53.10.653.1_{\text{0.6}}53.1 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT54.50.6subscript54.50.6\textbf{54.5}_{\text{0.6}}54.5 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT87.81.7subscript87.81.787.8_{\text{1.7}}87.8 start_POSTSUBSCRIPT 1.7 end_POSTSUBSCRIPT89.00.8subscript89.00.8\textbf{89.0}_{\text{0.8}}89.0 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT
DBPedia62.11.2subscript62.11.2\textbf{62.1}_{\text{1.2}}62.1 start_POSTSUBSCRIPT 1.2 end_POSTSUBSCRIPT61.80.6subscript61.80.661.8_{\text{0.6}}61.8 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT98.70.2subscript98.70.298.7_{\text{0.2}}98.7 start_POSTSUBSCRIPT 0.2 end_POSTSUBSCRIPT99.00.1subscript99.00.1\textbf{99.0}_{\text{0.1}}99.0 start_POSTSUBSCRIPT 0.1 end_POSTSUBSCRIPT
TREC30.90.6subscript30.90.630.9_{\text{0.6}}30.9 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT31.10.5subscript31.10.5\textbf{31.1}_{\text{0.5}}31.1 start_POSTSUBSCRIPT 0.5 end_POSTSUBSCRIPT88.53.5subscript88.53.588.5_{\text{3.5}}88.5 start_POSTSUBSCRIPT 3.5 end_POSTSUBSCRIPT89.34.5subscript89.34.5\textbf{89.3}_{\text{4.5}}89.3 start_POSTSUBSCRIPT 4.5 end_POSTSUBSCRIPT
Subj60.53.2subscript60.53.260.5_{\text{3.2}}60.5 start_POSTSUBSCRIPT 3.2 end_POSTSUBSCRIPT62.70.8subscript62.70.8\textbf{62.7}_{\text{0.8}}62.7 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT92.81.6subscript92.81.692.8_{\text{1.6}}92.8 start_POSTSUBSCRIPT 1.6 end_POSTSUBSCRIPT93.21.2subscript93.21.2\textbf{93.2}_{\text{1.2}}93.2 start_POSTSUBSCRIPT 1.2 end_POSTSUBSCRIPT
SST-535.51.7subscript35.51.735.5_{\text{1.7}}35.5 start_POSTSUBSCRIPT 1.7 end_POSTSUBSCRIPT37.50.4subscript37.50.4\textbf{37.5}_{\text{0.4}}37.5 start_POSTSUBSCRIPT 0.4 end_POSTSUBSCRIPT48.74.2subscript48.74.248.7_{\text{4.2}}48.7 start_POSTSUBSCRIPT 4.2 end_POSTSUBSCRIPT49.92.7subscript49.92.7\textbf{49.9}_{\text{2.7}}49.9 start_POSTSUBSCRIPT 2.7 end_POSTSUBSCRIPT
Prompt-Based Bias Calibration for Better Zero/Few-Shot Learning of Language Models (3)

The output representations of <mask> token for label word predictions are visualized by t-SNE in Figure3. On the left, samples from the two categories are almost mixed together, indicating that the original LM tends to bias toward one class prediction. In contrast, the right visualization demonstrates improved separability after One-batch Calibration3.3), which explains the significant performance enhancement achieved by our intrinsic-bias calibration method.

5.3 Update Entire LM vs. Only Bias Parameters in Calibration

In Table4, we evaluate the impact of updating entire LM (WLM + BLM) during calibrationon downstream task performance, as compared to only updating bias parameters (BLM).The optimal learning rate for updating entire LM is smaller (AppendixA Table6). For in-context learning, the LM with only BLM updates in calibration achieves better overall performance compared to the LM with entire parameter updates, most likely attributed to better preserved language modeling abilities (AppendixB.3 Table16).For prompt-based fine-tuning, two differently calibrated LMs demonstrate comparable performance, as the impact of entire-parameter calibration on the modeling ability is mitigated through task-specific fine-tuning. Considering the significant saving in memory and computation, we recommend only updating BLM in calibration.

In-context lrn no demoPrompt FT no demo
WLM + BLMBLMWLM + BLMBLM
AGNews53.50.8subscript53.50.853.5_{\text{0.8}}53.5 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT54.50.6subscript54.50.6\textbf{54.5}_{\text{0.6}}54.5 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT89.30.8subscript89.30.8\textbf{89.3}_{\text{0.8}}89.3 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT89.00.8subscript89.00.889.0_{\text{0.8}}89.0 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT
DBPedia63.20.9subscript63.20.9\textbf{63.2}_{\text{0.9}}63.2 start_POSTSUBSCRIPT 0.9 end_POSTSUBSCRIPT61.80.6subscript61.80.661.8_{\text{0.6}}61.8 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT99.00.5subscript99.00.599.0_{\text{0.5}}99.0 start_POSTSUBSCRIPT 0.5 end_POSTSUBSCRIPT99.00.1subscript99.00.1\textbf{99.0}_{\text{0.1}}99.0 start_POSTSUBSCRIPT 0.1 end_POSTSUBSCRIPT
TREC31.30.8subscript31.30.8\textbf{31.3}_{\text{0.8}}31.3 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT31.10.5subscript31.10.531.1_{\text{0.5}}31.1 start_POSTSUBSCRIPT 0.5 end_POSTSUBSCRIPT87.62.8subscript87.62.887.6_{\text{2.8}}87.6 start_POSTSUBSCRIPT 2.8 end_POSTSUBSCRIPT89.34.5subscript89.34.5\textbf{89.3}_{\text{4.5}}89.3 start_POSTSUBSCRIPT 4.5 end_POSTSUBSCRIPT
Subj53.30.6subscript53.30.653.3_{\text{0.6}}53.3 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT62.70.8subscript62.70.8\textbf{62.7}_{\text{0.8}}62.7 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT93.70.6subscript93.70.6\textbf{93.7}_{\text{0.6}}93.7 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT93.21.2subscript93.21.293.2_{\text{1.2}}93.2 start_POSTSUBSCRIPT 1.2 end_POSTSUBSCRIPT
SST-533.50.4subscript33.50.433.5_{\text{0.4}}33.5 start_POSTSUBSCRIPT 0.4 end_POSTSUBSCRIPT37.50.4subscript37.50.4\textbf{37.5}_{\text{0.4}}37.5 start_POSTSUBSCRIPT 0.4 end_POSTSUBSCRIPT49.40.7subscript49.40.749.4_{\text{0.7}}49.4 start_POSTSUBSCRIPT 0.7 end_POSTSUBSCRIPT49.92.7subscript49.92.7\textbf{49.9}_{\text{2.7}}49.9 start_POSTSUBSCRIPT 2.7 end_POSTSUBSCRIPT
Laptop58.20.8subscript58.20.858.2_{\text{0.8}}58.2 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT59.61.9subscript59.61.9\textbf{59.6}_{\text{1.9}}59.6 start_POSTSUBSCRIPT 1.9 end_POSTSUBSCRIPT78.11.3subscript78.11.3\textbf{78.1}_{\text{1.3}}78.1 start_POSTSUBSCRIPT 1.3 end_POSTSUBSCRIPT74.92.9subscript74.92.974.9_{\text{2.9}}74.9 start_POSTSUBSCRIPT 2.9 end_POSTSUBSCRIPT
Restaurant70.71.8subscript70.71.870.7_{\text{1.8}}70.7 start_POSTSUBSCRIPT 1.8 end_POSTSUBSCRIPT72.81.6subscript72.81.6\textbf{72.8}_{\text{1.6}}72.8 start_POSTSUBSCRIPT 1.6 end_POSTSUBSCRIPT81.31.0subscript81.31.081.3_{\text{1.0}}81.3 start_POSTSUBSCRIPT 1.0 end_POSTSUBSCRIPT82.00.9subscript82.00.9\textbf{82.0}_{\text{0.9}}82.0 start_POSTSUBSCRIPT 0.9 end_POSTSUBSCRIPT
Twitter51.80.7subscript51.80.7\textbf{51.8}_{\text{0.7}}51.8 start_POSTSUBSCRIPT 0.7 end_POSTSUBSCRIPT51.70.4subscript51.70.451.7_{\text{0.4}}51.7 start_POSTSUBSCRIPT 0.4 end_POSTSUBSCRIPT55.72.3subscript55.72.355.7_{\text{2.3}}55.7 start_POSTSUBSCRIPT 2.3 end_POSTSUBSCRIPT57.04.2subscript57.04.2\textbf{57.0}_{\text{4.2}}57.0 start_POSTSUBSCRIPT 4.2 end_POSTSUBSCRIPT
Average51.951.951.951.954.079.379.379.379.379.379.379.379.3

5.4 Analysis

How does intrinsic bias calibration impact downstream tasks?Our method calibrates the intrinsic bias associated with a set of task-specific label words.In this section, we explore the impact of updating LM for task-specific bias calibration on other downstream task performance.Specifically, we take the LM calibrated for one task and evaluate its performance on the other tasks as shown in Figure4.In general, intrinsic bias calibration for one task has a minimal adverse effect on other tasks’ performance (no more than 2% degradation) because of the light model updates, while remarkably enhancing LM performance on that specific task. Notably, there is consistent performance increase at bottom right, as these tasks are all sentiment classification sharing or including same label words.444For aspect-level datasets, better improvement is on the diagonals (task-specific calibration), indicating our method mitigates the impact of association bias (AppendixA).

Prompt-Based Bias Calibration for Better Zero/Few-Shot Learning of Language Models (4)

How does intrinsic bias calibration impact language modeling abilities? We employ pseudo-perplexity Salazar etal. (2020) to evaluate language modeling for Masked LM. Following each task-specific intrinsic bias calibration, we measure pseudo-perplexity and compare the results with original RoBERTa on WikiText-2, WikiText-103 Merity etal. (2017), and LAMBADA dataset Paperno etal. (2016). As shown in Table5, language modeling abilities are largely preserved after calibration due to the minimal updates to the model.

WT-2WT-103LAMBADA
Original RoBERTa6.1896.1896.1896.1897.0087.0087.0087.00824.5224.5224.5224.52
+ calibration
       for_AGNews 6.2066.2066.2066.206 7.0377.0377.0377.037 24.5424.5424.5424.54
       for_DBPedia 6.1976.1976.1976.197 7.0107.0107.0107.010 24.3024.3024.3024.30
       for_TREC 6.1626.1626.1626.162 6.9666.9666.9666.966 24.2524.2524.2524.25
       for_Subj 6.1686.1686.1686.168 6.9786.9786.9786.978 24.6024.6024.6024.60
       for_SST-5 6.1586.1586.1586.158 6.9696.9696.9696.969 24.3424.3424.3424.34
       for_Laptop 6.2006.2006.2006.200 7.0107.0107.0107.010 24.5124.5124.5124.51
       for_Restaurant 6.2446.2446.2446.244 7.0827.0827.0827.082 24.6524.6524.6524.65
       for_Twitter 6.1606.1606.1606.160 6.9716.9716.9716.971 24.5724.5724.5724.57

6 Conclusion

In this work, we propose a null-input prompting method to calibrate the intrinsic bias of pre-trained Masked LMs, aiming to enhance zero/few-shot learning performance in classification tasks. Our method incorporates two key features for efficiency: (1) auto-construction of null-input prompts for bias probing, leveraging a diverse set of selected null-meaning inputs easily crafted from generative Large LM; (2) updating only bias parameters for bias calibration.Experimental results show that bias-calibrated LMs demonstrate significant performance improvement for both in-context learning and prompt-based fine-tuning, with average gains of 9%percent99\%9 % and 2%percent22\%2 %, respectively.Moreover, our method outperforms output-calibration approaches, highlighting the advantage of intrinsic bias calibration. We believe this work presents a new perspective of making LMs better zero/few-shot learners via intrinsic bias calibration. Additionally, the demonstrated significance of bias parameters could provide insights for future bias-related research.

Limitations

While our method has achieved substantial improvement in prompt-based zero/few-shot learning, it comes with limitations that could open avenues for future research.

First, calibration is fully unsupervised in the scenario where no labeled data is available (zero-shot downstream tasks in §3.3). Based on empirical experimental results, we adopt the conservative One-batch Calibration strategy to ensure a safe and consistent performance enhancement.In the future, we aim to explore more rigorous approaches to determine optimal stopping points in this scenario.

Second, we utilize RoBERTa (encoder) models for classification tasks, as encoder models may more effectively encode task-specific patterns for discriminative taskscompared to some generative LMs Gao etal. (2021); Li etal. (2023b), as shown in Table12. However, the relatively small size of those Masked LMs (355M parameters for RoBERTa-large) could be the ultimate limitation to their capabilities.Given the proliferation of large-scale generative (decoder) LMs and their accomplishments in tackling more challenging tasks Thoppilan etal. (2022); Chowdhery etal. (2023); Touvron etal. (2023), we anticipate extending our method to large decoder models and validating the applicability of our findings. Furthermore, we expect to expand the scope of tasks to include regression problems (e.g., sentiment score prediction) leveraging KL divergence to measure disparities in continuous probability distributions, aiming to address bias-related challenges across diverse scenarios.

Ethics Statement and Broader Impact

Our work is conformant to the Code of Ethics. We appropriately cite relevant methods, models, and datasets that we use. We affirm that all datasets in our experiments are public, and no private or sensitive information is incorporated in our research. Our use of datasets and pre-trained models is consistent with their intended use. For broader impacts, our method, extending beyond calibrating common token bias and association bias, might inspire prospective research in mitigating social bias and improving the fairness of pre-trained LMs.

Acknowledgments

This work was supported in part by the Center for Co-Design of Cognitive Systems (CoCoSys), a Semiconductor Research Corporation (SRC) and DARPA-sponsored JUMP 2.0 center.

References

  • Bapna and Firat (2019)Ankur Bapna and Orhan Firat. 2019.Simple, scalable adaptation for neural machine translation.In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 1538–1548, Hong Kong, China. Association for Computational Linguistics.
  • BenZaken etal. (2022)Elad BenZaken, Yoav Goldberg, and Shauli Ravfogel. 2022.BitFit: Simple parameter-efficient fine-tuning for transformer-based masked language-models.In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 1–9, Dublin, Ireland. Association for Computational Linguistics.
  • Bowman etal. (2015)SamuelR. Bowman, Gabor Angeli, Christopher Potts, and ChristopherD. Manning. 2015.A large annotated corpus for learning natural language inference.In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 632–642, Lisbon, Portugal. Association for Computational Linguistics.
  • Brown etal. (2020)Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, JaredD Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, etal. 2020.Language models are few-shot learners.Advances in neural information processing systems, 33:1877–1901.
  • Cao etal. (2022)Jiahao Cao, Rui Liu, Huailiang Peng, Lei Jiang, and XuBai. 2022.Aspect is not you need: No-aspect differential sentiment framework for aspect-based sentiment analysis.In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1599–1609.
  • Cheng etal. (2021)Pengyu Cheng, Weituo Hao, Siyang Yuan, Shijing Si, and Lawrence Carin. 2021.Fairfil: Contrastive neural debiasing method for pretrained text encoders.arXiv preprint arXiv:2103.06413.
  • Chowdhery etal. (2023)Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, HyungWon Chung, Charles Sutton, Sebastian Gehrmann, etal. 2023.Palm: Scaling language modeling with pathways.Journal of Machine Learning Research, 24(240):1–113.
  • Devlin etal. (2019)Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019.BERT: Pre-training of deep bidirectional transformers for language understanding.In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171–4186, Minneapolis, Minnesota. Association for Computational Linguistics.
  • Dinan etal. (2020)Emily Dinan, Angela Fan, Adina Williams, Jack Urbanek, Douwe Kiela, and Jason Weston. 2020.Queens are powerful too: Mitigating gender bias in dialogue generation.In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 8173–8188, Online. Association for Computational Linguistics.
  • Dolan and Brockett (2005)WilliamB. Dolan and Chris Brockett. 2005.Automatically constructing a corpus of sentential paraphrases.In Proceedings of the Third International Workshop on Paraphrasing (IWP2005).
  • Dong etal. (2014)LiDong, Furu Wei, Chuanqi Tan, Duyu Tang, Ming Zhou, and KeXu. 2014.Adaptive recursive neural network for target-dependent Twitter sentiment classification.In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 49–54, Baltimore, Maryland. Association for Computational Linguistics.
  • Gao etal. (2021)Tianyu Gao, Adam Fisch, and Danqi Chen. 2021.Making pre-trained language models better few-shot learners.In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 3816–3830, Online. Association for Computational Linguistics.
  • Gu etal. (2022)Yuxian Gu, XuHan, Zhiyuan Liu, and Minlie Huang. 2022.PPT: Pre-trained prompt tuning for few-shot learning.In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8410–8423, Dublin, Ireland. Association for Computational Linguistics.
  • Guo etal. (2022)XuGuo, Boyang Li, and Han Yu. 2022.Improving the sample efficiency of prompt tuning with domain adaptation.arXiv preprint arXiv:2210.02952.
  • Han etal. (2023)Zhixiong Han, Yaru Hao, LiDong, Yutao Sun, and Furu Wei. 2023.Prototypical calibration for few-shot learning of language models.In The Eleventh International Conference on Learning Representations.
  • Holtzman etal. (2022)Ari Holtzman, Peter West, Vered Shwartz, Yejin Choi, and Luke Zettlemoyer. 2022.Surface form competition: Why the highest probability answer isn’t always right.arXiv preprint arXiv:2104.08315.
  • Houlsby etal. (2019)Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin DeLaroussilhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly. 2019.Parameter-efficient transfer learning for nlp.In International conference on machine learning, pages 2790–2799. PMLR.
  • Hu etal. (2021)EdwardJ Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, LuWang, and Weizhu Chen. 2021.Lora: Low-rank adaptation of large language models.arXiv preprint arXiv:2106.09685.
  • Huang etal. (2020)Po-Sen Huang, Huan Zhang, Ray Jiang, Robert Stanforth, Johannes Welbl, Jack Rae, Vishal Maini, Dani Yogatama, and Pushmeet Kohli. 2020.Reducing sentiment bias in language models via counterfactual evaluation.In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 65–83, Online. Association for Computational Linguistics.
  • Jian etal. (2022)Yiren Jian, Chongyang Gao, and Soroush Vosoughi. 2022.Contrastive learning for prompt-based few-shot language learners.In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5577–5587, Seattle, United States. Association for Computational Linguistics.
  • Kaneko and Bollegala (2021)Masahiro Kaneko and Danushka Bollegala. 2021.Debiasing pre-trained contextualised embeddings.arXiv preprint arXiv:2101.09523.
  • Lehmann etal. (2015)Jens Lehmann, Robert Isele, Max Jakob, Anja Jentzsch, Dimitris Kontokostas, PabloN Mendes, Sebastian Hellmann, Mohamed Morsey, Patrick VanKleef, Sören Auer, etal. 2015.Dbpedia–a large-scale, multilingual knowledge base extracted from wikipedia.Semantic web, 6(2):167–195.
  • Lester etal. (2021)Brian Lester, Rami Al-Rfou, and Noah Constant. 2021.The power of scale for parameter-efficient prompt tuning.In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 3045–3059, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
  • Li and Liang (2021)XiangLisa Li and Percy Liang. 2021.Prefix-tuning: Optimizing continuous prompts for generation.In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 4582–4597, Online. Association for Computational Linguistics.
  • Li etal. (2023a)Yingji Li, Mengnan Du, Rui Song, Xin Wang, and Ying Wang. 2023a.A survey on fairness in large language models.arXiv preprint arXiv:2308.10149.
  • Li etal. (2023b)Zongxi Li, Xianming Li, Yuzhang Liu, Haoran Xie, Jing Li, Fu-lee Wang, Qing Li, and Xiaoqin Zhong. 2023b.Label supervised llama finetuning.arXiv preprint arXiv:2310.01208.
  • Liu etal. (2023)Pengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang, Hiroaki Hayashi, and Graham Neubig. 2023.Pre-train, prompt, and predict: A systematic survey of prompting methods in natural language processing.ACM Computing Surveys, 55(9):1–35.
  • Liu etal. (2019)Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019.Roberta: A robustly optimized bert pretraining approach.arXiv preprint arXiv:1907.11692.
  • LoganIV etal. (2022)Robert LoganIV, Ivana Balazevic, Eric Wallace, Fabio Petroni, Sameer Singh, and Sebastian Riedel. 2022.Cutting down on prompts and parameters: Simple few-shot learning with language models.In Findings of the Association for Computational Linguistics: ACL 2022, pages 2824–2835, Dublin, Ireland. Association for Computational Linguistics.
  • Loureiro etal. (2022)Daniel Loureiro, Francesco Barbieri, Leonardo Neves, Luis EspinosaAnke, and Jose Camacho-collados. 2022.TimeLMs: Diachronic language models from Twitter.In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics: System Demonstrations, pages 251–260, Dublin, Ireland. Association for Computational Linguistics.
  • Lu etal. (2023)Jinghui Lu, Dongsheng Zhu, Weidong Han, Rui Zhao, Brian MacNamee, and Fei Tan. 2023.What makes pre-trained language models better zero-shot learners?In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2288–2303, Toronto, Canada. Association for Computational Linguistics.
  • Meade etal. (2022)Nicholas Meade, Elinor Poole-Dayan, and Siva Reddy. 2022.An empirical survey of the effectiveness of debiasing techniques for pre-trained language models.In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1878–1898, Dublin, Ireland. Association for Computational Linguistics.
  • Merity etal. (2017)Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. 2017.Pointer sentinel mixture models.In International Conference on Learning Representations.
  • Min etal. (2022)Sewon Min, Mike Lewis, Hannaneh Hajishirzi, and Luke Zettlemoyer. 2022.Noisy channel language model prompting for few-shot text classification.In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 5316–5330, Dublin, Ireland. Association for Computational Linguistics.
  • Pang and Lee (2004)BoPang and Lillian Lee. 2004.A sentimental education: Sentiment analysis using subjectivity summarization based on minimum cuts.arXiv preprint cs/0409058.
  • Paperno etal. (2016)Denis Paperno, Germán Kruszewski, Angeliki Lazaridou, NgocQuan Pham, Raffaella Bernardi, Sandro Pezzelle, Marco Baroni, Gemma Boleda, and Raquel Fernández. 2016.The LAMBADA dataset: Word prediction requiring a broad discourse context.In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1525–1534, Berlin, Germany. Association for Computational Linguistics.
  • Paszke etal. (2019)Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, etal. 2019.Pytorch: An imperative style, high-performance deep learning library.Advances in neural information processing systems, 32.
  • Pontiki etal. (2014)Maria Pontiki, Dimitris Galanis, John Pavlopoulos, Harris Papageorgiou, Ion Androutsopoulos, and Suresh Manandhar. 2014.SemEval-2014 task 4: Aspect based sentiment analysis.In Proceedings of the 8th International Workshop on Semantic Evaluation (SemEval 2014), pages 27–35, Dublin, Ireland. Association for Computational Linguistics.
  • Radford etal. (2019)Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, etal. 2019.Language models are unsupervised multitask learners.OpenAI blog, 1(8):9.
  • Salazar etal. (2020)Julian Salazar, Davis Liang, ToanQ. Nguyen, and Katrin Kirchhoff. 2020.Masked language model scoring.In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 2699–2712, Online. Association for Computational Linguistics.
  • Schick and Schütze (2021a)Timo Schick and Hinrich Schütze. 2021a.Exploiting cloze-questions for few-shot text classification and natural language inference.In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 255–269, Online. Association for Computational Linguistics.
  • Schick and Schütze (2021b)Timo Schick and Hinrich Schütze. 2021b.It’s not just size that matters: Small language models are also few-shot learners.In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2339–2352, Online. Association for Computational Linguistics.
  • Socher etal. (2013)Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, ChristopherD Manning, AndrewY Ng, and Christopher Potts. 2013.Recursive deep models for semantic compositionality over a sentiment treebank.In Proceedings of the 2013 conference on empirical methods in natural language processing, pages 1631–1642.
  • Solaiman and Dennison (2021)Irene Solaiman and Christy Dennison. 2021.Process for adapting language models to society (palms) with values-targeted datasets.Advances in Neural Information Processing Systems, 34:5861–5873.
  • Sun etal. (2022)YiSun, YuZheng, Chao Hao, and Hangping Qiu. 2022.NSP-BERT: A prompt-based few-shot learner through an original pre-training task —— next sentence prediction.In Proceedings of the 29th International Conference on Computational Linguistics, pages 3233–3250, Gyeongju, Republic of Korea. International Committee on Computational Linguistics.
  • Thoppilan etal. (2022)Romal Thoppilan, Daniel DeFreitas, Jamie Hall, Noam Shazeer, Apoorv Kulshreshtha, Heng-Tze Cheng, Alicia Jin, Taylor Bos, Leslie Baker, YuDu, etal. 2022.Lamda: Language models for dialog applications.arXiv preprint arXiv:2201.08239.
  • Touvron etal. (2023)Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, etal. 2023.Llama: Open and efficient foundation language models.arXiv preprint arXiv:2302.13971.
  • vander Maaten and Hinton (2008)Laurens vander Maaten and Geoffrey Hinton. 2008.Visualizing data using t-sne.Journal of Machine Learning Research, 9(86):2579–2605.
  • Voorhees and Tice (2000)EllenM Voorhees and DawnM Tice. 2000.Building a question answering test collection.In Proceedings of the 23rd annual international ACM SIGIR conference on Research and development in information retrieval, pages 200–207.
  • Wang etal. (2018)Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2018.GLUE: A multi-task benchmark and analysis platform for natural language understanding.In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 353–355, Brussels, Belgium. Association for Computational Linguistics.
  • Williams etal. (2018)Adina Williams, Nikita Nangia, and Samuel Bowman. 2018.A broad-coverage challenge corpus for sentence understanding through inference.In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 1112–1122, New Orleans, Louisiana. Association for Computational Linguistics.
  • Wolf etal. (2020)Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Remi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven LeScao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander Rush. 2020.Transformers: State-of-the-art natural language processing.In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 38–45, Online. Association for Computational Linguistics.
  • Wu etal. (2022)Chuhan Wu, Fangzhao Wu, Tao Qi, and Yongfeng Huang. 2022.NoisyTune: A little noise can help you finetune pretrained language models better.In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 680–685, Dublin, Ireland. Association for Computational Linguistics.
  • Zhang etal. (2015)Xiang Zhang, Junbo Zhao, and Yann LeCun. 2015.Character-level convolutional networks for text classification.Advances in neural information processing systems, 28.
  • Zhao etal. (2021)Zihao Zhao, Eric Wallace, Shi Feng, Dan Klein, and Sameer Singh. 2021.Calibrate before use: Improving few-shot performance of language models.In International Conference on Machine Learning, pages 12697–12706. PMLR.
  • Zhou etal. (2023)Fan Zhou, Yuzhou Mao, Liu Yu, YiYang, and Ting Zhong. 2023.Causal-debias: Unifying debiasing in pretrained language models and fine-tuning via causal invariant learning.In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 4227–4241.

Appendix A Experimental Details

Prompts with or without demonstrations. Table7 shows the prompt templates and label words of each dataset we use for main experiments.

For downstream tasks, in few-shot setting, task-specific example-label pairs (i.e., demonstrations) can be incorporated in the context to enhance the LM’s comprehension. While in zero-shot setting, no labeled data is available and thereby no demonstrations.

For calibration, demonstrations are either absent from or added to null-input prompts, consistent with their exclusion from or inclusion in prompts for downstream tasks. An example of a null-input prompt without demonstration is:

<s> An empty sentence. It is <mask>. </s>

<s> and </s> respectively denote <cls> token and <sep> token in RoBERTa. In the other case, we incorporate demonstrations retrieved from the small training set into the null-input prompt such as:

<s> An empty sentence. It is <mask>. </s>
Compellingly watchable.It is great. </s>
The film is strictly routine. It is terrible. </s>

Association-bias calibration for aspect-level task.For aspect-level sentiment analysis, e.g., "Wonderful food but poor service. Service was <mask>.", the answer contains the aspect word "service". Because the model makes sentiment predictions for specific aspect words, the task is likely subject to association bias2). For association-bias calibration, the only difference is that we incorporate various aspect words in the answer format (e.g., "<aspect words> was <mask>.") when constructing null-input prompts. One can either leverage GPT-4 to generate in-domain aspect words (e.g., for restaurant reviews, the generated aspect words could be menu, food, etc.), or simply employ the aspect words in the original training dataset. In this work, we choose the latter option. Due to the variability of <aspect words> in the answer format, sorting null-meaning inputs by NSP score can yield different results. To this effect, we do not apply xnullsubscript𝑥nullx_{\text{null}}italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT selection strategy (§4.2) for aspect-level task, and instead keep all the generated xnullsubscript𝑥nullx_{\text{null}}italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT.

Null-meaning inputs generation with GPT-4. The version of GPT-4 used in our experiment is gpt-4-0613. We observe that GPT-4 could generate repetitive null-meaning inputs. To avoid overrepresentation of certain null inputs which might impact the diversity and introduce bias to the null-input set, we adopt an iterative approach. In each iteration, GPT-4 generates 500 null-meaning inputs, and duplicates are removed. This process continues until we obtain 1000 distinct null-meaning inputs, which takes 3 iterations in our experiment.

Null-meaning inputs for One-batch Calibration. For zero-shot downstream tasks, since only one batch of null-meaning inputs is required for calibration in our early-stopping criterion (§3.3), we select the Top-N{Pnsp(xnull,ans)}𝑇𝑜𝑝-𝑁subscript𝑃nspsubscript𝑥nullansTop\text{-}N\{P_{\textit{nsp}}(x_{\text{null}},\textit{ans})\}italic_T italic_o italic_p - italic_N { italic_P start_POSTSUBSCRIPT nsp end_POSTSUBSCRIPT ( italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT , ans ) } xnullsubscript𝑥nullx_{\text{null}}italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT from 𝒳nullsubscript𝒳null\mathcal{X}_{\text{null}}caligraphic_X start_POSTSUBSCRIPT null end_POSTSUBSCRIPT, where N𝑁Nitalic_N is batch size. We prioritize these samples as our observations show that null-meaning inputs with higher Pnsp(xnull,ans)subscript𝑃nspsubscript𝑥nullansP_{\textit{nsp}}(x_{\text{null}},\textit{ans})italic_P start_POSTSUBSCRIPT nsp end_POSTSUBSCRIPT ( italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT , ans ) exhibit higher attention scores between the null input and <mask>, as demonstrated in Figure5.This indicates more effective conveyance of the "null" information to the placeholder <mask>, which could facilitate LM deciphering the "null" patterns of the prompts and benefit calibration.

Prompt-Based Bias Calibration for Better Zero/Few-Shot Learning of Language Models (5)

Hyper-parameters. In calibration stage, we shuffle the null-input prompts and conduct gradient descent on BLM (or WLM + BLM as comparative experiment) with 5 different seeds to account for calibration variance. There are two main hyper-parameters for calibration: (1) xnullsubscript𝑥nullx_{\text{null}}italic_x start_POSTSUBSCRIPT null end_POSTSUBSCRIPT batch size N𝑁Nitalic_N; (2) calibration learning rate lrcalib𝑙subscript𝑟𝑐𝑎𝑙𝑖𝑏lr_{calib}italic_l italic_r start_POSTSUBSCRIPT italic_c italic_a italic_l italic_i italic_b end_POSTSUBSCRIPT. We conduct grid search on N={8,16,32}𝑁81632N=\{8,16,32\}italic_N = { 8 , 16 , 32 } and lrcalib𝑙subscript𝑟𝑐𝑎𝑙𝑖𝑏lr_{calib}italic_l italic_r start_POSTSUBSCRIPT italic_c italic_a italic_l italic_i italic_b end_POSTSUBSCRIPT from 1e61𝑒61e-61 italic_e - 6 to 5e35𝑒35e-35 italic_e - 3, and obtain the best settings: N=32𝑁32N=32italic_N = 32 and lrcalib𝑙subscript𝑟𝑐𝑎𝑙𝑖𝑏lr_{calib}italic_l italic_r start_POSTSUBSCRIPT italic_c italic_a italic_l italic_i italic_b end_POSTSUBSCRIPT as shown in Table6.

Calibrated LMs are applied in downstream tasks with prompt-based learning methods. We use the same hyper-parameters as Gao etal. (2021) for prompt-based learning. We evaluate on each task’s original test set, except for AGNews and DBPedia, where we randomly sample 800 test examples.

We use PyTorch Paszke etal. (2019) and public HuggingFace Transformers library Wolf etal. (2020). RoBERTa related experiments are conducted on a single NVIDIA V100 GPU, while GPT-2 and Llama-2 experiments are conducted on one A100 GPU in Google Colab.

Calibration (lrcalib𝑙subscript𝑟𝑐𝑎𝑙𝑖𝑏lr_{calib}italic_l italic_r start_POSTSUBSCRIPT italic_c italic_a italic_l italic_i italic_b end_POSTSUBSCRIPT) Prompt FT(downstream)
WLM + BLMBLM
No demo1e51𝑒51e-51 italic_e - 51e31𝑒31e-31 italic_e - 31e51𝑒51e-51 italic_e - 5
With demo1e61𝑒61e-61 italic_e - 61e41𝑒41e-41 italic_e - 41e51𝑒51e-51 italic_e - 5
DatasetTask TypePrompt TemplateLabel Words
AGNewsNews topic classification{Sentence} It is about <mask>.World / Sports / Business / Technology
DBPediaOntology classification{Sentence} It is about <mask>.Company / Artist / Building / Nature
TRECQuestion classification{Sentence} It is about <mask>. Number / Location / Person/ Description / Entity / Expression
SubjSubjectivity classification{Sentence} This is <mask>.objective / subjective
SST-5Movie sentiment analysis{Sentence} The movie was <mask>.terrible / bad / okay / good / great
LaptopAspect level sentiment analysis{Sentence} {Aspect words} was <mask>.terrible / okay / great
RestaurantAspect level sentiment analysis{Sentence} {Aspect words} was <mask>.terrible / okay / great
TwitterAspect level sentiment analysis{Sentence} {Aspect words} was <mask>.terrible / okay / great

1:Inputs:

2:Downstream task: zero_shot or few_shot

3:Null-input prompts: {Nprompt}subscript𝑁prompt\{N_{\text{prompt}}\}{ italic_N start_POSTSUBSCRIPT prompt end_POSTSUBSCRIPT }

4:(Val. data in Calibration: 𝒟valcalib𝒟traindownstrm)\mathcal{D}_{\text{val}}^{\text{calib}}\leftarrow\mathcal{D}_{\text{train}}^{%\text{downstrm}})caligraphic_D start_POSTSUBSCRIPT val end_POSTSUBSCRIPT start_POSTSUPERSCRIPT calib end_POSTSUPERSCRIPT ← caligraphic_D start_POSTSUBSCRIPT train end_POSTSUBSCRIPT start_POSTSUPERSCRIPT downstrm end_POSTSUPERSCRIPT )\triangleright Only when downstream task is few_shot.    \triangleright Downstream training dataset 𝒟traindownstrmsuperscriptsubscript𝒟traindownstrm\mathcal{D}_{\text{train}}^{\text{downstrm}}caligraphic_D start_POSTSUBSCRIPT train end_POSTSUBSCRIPT start_POSTSUPERSCRIPT downstrm end_POSTSUPERSCRIPT constitutes K𝐾Kitalic_K samples per class.

5:Output:

6:LMcalibone_batch𝐿superscriptsubscript𝑀calibone_batchLM_{\text{calib}}^{\text{one\_batch}}italic_L italic_M start_POSTSUBSCRIPT calib end_POSTSUBSCRIPT start_POSTSUPERSCRIPT one_batch end_POSTSUPERSCRIPT for zero_shot

7:LMcalibone_batch𝐿superscriptsubscript𝑀calibone_batchLM_{\text{calib}}^{\text{one\_batch}}italic_L italic_M start_POSTSUBSCRIPT calib end_POSTSUBSCRIPT start_POSTSUPERSCRIPT one_batch end_POSTSUPERSCRIPT & LMcalibval𝐿superscriptsubscript𝑀calibvalLM_{\text{calib}}^{\text{val}}italic_L italic_M start_POSTSUBSCRIPT calib end_POSTSUBSCRIPT start_POSTSUPERSCRIPT val end_POSTSUPERSCRIPT for few_shot

8:forbatch𝑏𝑎𝑡𝑐batchitalic_b italic_a italic_t italic_c italic_h in {Nprompt}subscript𝑁prompt\{N_{\text{prompt}}\}{ italic_N start_POSTSUBSCRIPT prompt end_POSTSUBSCRIPT }do

9:P𝑃Pitalic_P = \mathcal{LM}caligraphic_L caligraphic_M(batch𝑏𝑎𝑡𝑐batchitalic_b italic_a italic_t italic_c italic_h) \triangleright Null input prompting

10:\mathcal{L}caligraphic_L = D𝒦(U||P)D_{\mathcal{KL}}(U\,||\,P)italic_D start_POSTSUBSCRIPT caligraphic_K caligraphic_L end_POSTSUBSCRIPT ( italic_U | | italic_P ) \triangleright Unif. distribution U𝑈Uitalic_U

11:BLMBLMlrcalibBLMBLMBLM𝑙subscript𝑟𝑐𝑎𝑙𝑖𝑏BLM\textbf{{B\textsubscript{LM}}}\leftarrow\textbf{{B\textsubscript{LM}}}-lr_{%calib}\cdot\frac{\partial\mathcal{L}}{\partial\textbf{{B\textsubscript{LM}}}}B ← B - italic_l italic_r start_POSTSUBSCRIPT italic_c italic_a italic_l italic_i italic_b end_POSTSUBSCRIPT ⋅ divide start_ARG ∂ caligraphic_L end_ARG start_ARG ∂ B end_ARG

12:iffirstbatch𝑓𝑖𝑟𝑠𝑡𝑏𝑎𝑡𝑐first\ batchitalic_f italic_i italic_r italic_s italic_t italic_b italic_a italic_t italic_c italic_hthen

13:Save LMcalibone_batch𝐿superscriptsubscript𝑀calibone_batchLM_{\text{calib}}^{\text{one\_batch}}italic_L italic_M start_POSTSUBSCRIPT calib end_POSTSUBSCRIPT start_POSTSUPERSCRIPT one_batch end_POSTSUPERSCRIPT

14:endif

15:ifdownstream is zero_shotthenbreak

16:endif

17:ifbetter Compute_Metric𝐶𝑜𝑚𝑝𝑢𝑡𝑒_𝑀𝑒𝑡𝑟𝑖𝑐Compute\_Metricitalic_C italic_o italic_m italic_p italic_u italic_t italic_e _ italic_M italic_e italic_t italic_r italic_i italic_c(𝒟valcalibsuperscriptsubscript𝒟valcalib\mathcal{D}_{\text{val}}^{\text{calib}}caligraphic_D start_POSTSUBSCRIPT val end_POSTSUBSCRIPT start_POSTSUPERSCRIPT calib end_POSTSUPERSCRIPT)then

18:Save LMcalibval𝐿superscriptsubscript𝑀calibvalLM_{\text{calib}}^{\text{val}}italic_L italic_M start_POSTSUBSCRIPT calib end_POSTSUBSCRIPT start_POSTSUPERSCRIPT val end_POSTSUPERSCRIPT

19:endif

20:endfor

Prompt-Based Bias Calibration for Better Zero/Few-Shot Learning of Language Models (6)
Prompt-Based Bias Calibration for Better Zero/Few-Shot Learning of Language Models (7)

Appendix B Additional Results

B.1 Performance Comparison with NSP-BERT, Perplection and NoisyTune

We additionally choose NSP-BERT Sun etal. (2022) and Perplection Lu etal. (2023) as in-context learning comparison baselines and NoisyTune Wu etal. (2022) as prompt-base fine-tuning comparison baseline. NSP-BERT constructs potential answers using each label word and predict Next Sentence Prediction (NSP) probability between the input and each answer. Perplection proposes perplexity-based selection method for prompt-based zero-shot learning. NoisyTune demonstrates that adding noise to pre-trained LMs benefits fine-tuning on downstream tasks. We re-implement their methods with the same settings as ours for fair comparisons. As shown in Table8 and Table9, our method achieves superior results in almost all datasets.

Furthermore, our method consistently outperforms NoisyTune, demonstrating that the gains in prompt-based fine-tuning with our method are not solely a result of perturbing LM parameters. This confirms the efficacy of intrinsic bias calibration in enhancing LM performance.

Zero-shot in-context learning
NSP-BERTPerplectionIntrCal
AGNews52.452.452.452.449.349.349.349.354.5
DBPedia58.458.458.458.459.659.659.659.661.8
TREC32.430.830.830.830.831.131.131.131.1
Subj60.360.360.360.359.959.959.959.962.7
SST-530.230.230.230.231.031.031.031.037.5
Laptop57.357.357.357.358.258.258.258.259.6
Restaurant50.450.450.450.466.566.566.566.572.8
Twitter35.335.335.335.331.531.531.531.551.7
Average47.147.147.147.148.448.448.448.454.0
Prompt FT no demoPrompt FT with demo
NoisyTuneIntrCalNoisyTuneIntrCal
AGNews89.01.8subscript89.01.889.0_{\text{1.8}}89.0 start_POSTSUBSCRIPT 1.8 end_POSTSUBSCRIPT89.00.8subscript89.00.8\textbf{89.0}_{\text{0.8}}89.0 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT88.41.5subscript88.41.588.4_{\text{1.5}}88.4 start_POSTSUBSCRIPT 1.5 end_POSTSUBSCRIPT89.30.9subscript89.30.9\textbf{89.3}_{\text{0.9}}89.3 start_POSTSUBSCRIPT 0.9 end_POSTSUBSCRIPT
DBPedia98.00.8subscript98.00.898.0_{\text{0.8}}98.0 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT99.00.1subscript99.00.1\textbf{99.0}_{\text{0.1}}99.0 start_POSTSUBSCRIPT 0.1 end_POSTSUBSCRIPT98.60.9subscript98.60.998.6_{\text{0.9}}98.6 start_POSTSUBSCRIPT 0.9 end_POSTSUBSCRIPT98.90.3subscript98.90.3\textbf{98.9}_{\text{0.3}}98.9 start_POSTSUBSCRIPT 0.3 end_POSTSUBSCRIPT
TREC86.24.3subscript86.24.386.2_{\text{4.3}}86.2 start_POSTSUBSCRIPT 4.3 end_POSTSUBSCRIPT89.34.5subscript89.34.5\textbf{89.3}_{\text{4.5}}89.3 start_POSTSUBSCRIPT 4.5 end_POSTSUBSCRIPT87.24.6subscript87.24.687.2_{\text{4.6}}87.2 start_POSTSUBSCRIPT 4.6 end_POSTSUBSCRIPT89.71.0subscript89.71.0\textbf{89.7}_{\text{1.0}}89.7 start_POSTSUBSCRIPT 1.0 end_POSTSUBSCRIPT
Subj93.01.2subscript93.01.293.0_{\text{1.2}}93.0 start_POSTSUBSCRIPT 1.2 end_POSTSUBSCRIPT93.21.2subscript93.21.2\textbf{93.2}_{\text{1.2}}93.2 start_POSTSUBSCRIPT 1.2 end_POSTSUBSCRIPT92.91.2subscript92.91.292.9_{\text{1.2}}92.9 start_POSTSUBSCRIPT 1.2 end_POSTSUBSCRIPT94.30.2subscript94.30.2\textbf{94.3}_{\text{0.2}}94.3 start_POSTSUBSCRIPT 0.2 end_POSTSUBSCRIPT
SST-549.41.1subscript49.41.149.4_{\text{1.1}}49.4 start_POSTSUBSCRIPT 1.1 end_POSTSUBSCRIPT49.92.7subscript49.92.7\textbf{49.9}_{\text{2.7}}49.9 start_POSTSUBSCRIPT 2.7 end_POSTSUBSCRIPT47.53.5subscript47.53.547.5_{\text{3.5}}47.5 start_POSTSUBSCRIPT 3.5 end_POSTSUBSCRIPT50.01.7subscript50.01.7\textbf{50.0}_{\text{1.7}}50.0 start_POSTSUBSCRIPT 1.7 end_POSTSUBSCRIPT
Laptop73.83.2subscript73.83.273.8_{\text{3.2}}73.8 start_POSTSUBSCRIPT 3.2 end_POSTSUBSCRIPT74.92.9subscript74.92.9\textbf{74.9}_{\text{2.9}}74.9 start_POSTSUBSCRIPT 2.9 end_POSTSUBSCRIPT75.53.2subscript75.53.275.5_{\text{3.2}}75.5 start_POSTSUBSCRIPT 3.2 end_POSTSUBSCRIPT78.71.4subscript78.71.4\textbf{78.7}_{\text{1.4}}78.7 start_POSTSUBSCRIPT 1.4 end_POSTSUBSCRIPT
Restaurant79.92.7subscript79.92.779.9_{\text{2.7}}79.9 start_POSTSUBSCRIPT 2.7 end_POSTSUBSCRIPT82.00.9subscript82.00.9\textbf{82.0}_{\text{0.9}}82.0 start_POSTSUBSCRIPT 0.9 end_POSTSUBSCRIPT78.32.6subscript78.32.678.3_{\text{2.6}}78.3 start_POSTSUBSCRIPT 2.6 end_POSTSUBSCRIPT79.84.5subscript79.84.5\textbf{79.8}_{\text{4.5}}79.8 start_POSTSUBSCRIPT 4.5 end_POSTSUBSCRIPT
Twitter51.85.8subscript51.85.851.8_{\text{5.8}}51.8 start_POSTSUBSCRIPT 5.8 end_POSTSUBSCRIPT57.04.2subscript57.04.2\textbf{57.0}_{\text{4.2}}57.0 start_POSTSUBSCRIPT 4.2 end_POSTSUBSCRIPT59.01.9subscript59.01.959.0_{\text{1.9}}59.0 start_POSTSUBSCRIPT 1.9 end_POSTSUBSCRIPT59.32.3subscript59.32.3\textbf{59.3}_{\text{2.3}}59.3 start_POSTSUBSCRIPT 2.3 end_POSTSUBSCRIPT
Average77.677.677.677.679.378.478.478.478.480.0

B.2 Effectiveness on Decoder LMs

We validate the effectiveness of intrinsic bias calibration in enhancing prompt-based learning performance on GPT-2 XL (1.5B) and Llama-2 (7B). The same hyper-parameters from AppendixA and prompt templates from Table7 are used for bias calibration. For GPT-2, we only update the bias parameters during calibration, whereas for Llama-2, we update the entire model since it does not have bias parameters. We conduct zero-shot and two-shot in-context learning experiments across the eight classification datasets, comparing original (Orig.) LM and calibrated (Calib.) LM. The performance comparisons are shown in Table10 (GPT-2) and Table11 (Llama-2). Calibrated LMs demonstrate significant performance improvement compared to original pre-trained LMs.

Zero-shotTwo-shot
Orig. LMCalib. LMOrig. LMCalib. LM
AGNews31.50.0subscript31.50.031.5_{\text{0.0}}31.5 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT41.81.8subscript41.81.8\textbf{41.8}_{\text{1.8}}41.8 start_POSTSUBSCRIPT 1.8 end_POSTSUBSCRIPT74.42.6subscript74.42.674.4_{\text{2.6}}74.4 start_POSTSUBSCRIPT 2.6 end_POSTSUBSCRIPT76.62.5subscript76.62.5\textbf{76.6}_{\text{2.5}}76.6 start_POSTSUBSCRIPT 2.5 end_POSTSUBSCRIPT
DBPedia37.60.0subscript37.60.037.6_{\text{0.0}}37.6 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT42.11.2subscript42.11.2\textbf{42.1}_{\text{1.2}}42.1 start_POSTSUBSCRIPT 1.2 end_POSTSUBSCRIPT66.81.8subscript66.81.866.8_{\text{1.8}}66.8 start_POSTSUBSCRIPT 1.8 end_POSTSUBSCRIPT70.92.2subscript70.92.2\textbf{70.9}_{\text{2.2}}70.9 start_POSTSUBSCRIPT 2.2 end_POSTSUBSCRIPT
TREC37.00.0subscript37.00.037.0_{\text{0.0}}37.0 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT40.30.4subscript40.30.4\textbf{40.3}_{\text{0.4}}40.3 start_POSTSUBSCRIPT 0.4 end_POSTSUBSCRIPT42.83.1subscript42.83.142.8_{\text{3.1}}42.8 start_POSTSUBSCRIPT 3.1 end_POSTSUBSCRIPT48.20.6subscript48.20.6\textbf{48.2}_{\text{0.6}}48.2 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT
Subj50.10.0subscript50.10.050.1_{\text{0.0}}50.1 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT55.00.1subscript55.00.1\textbf{55.0}_{\text{0.1}}55.0 start_POSTSUBSCRIPT 0.1 end_POSTSUBSCRIPT71.43.6subscript71.43.671.4_{\text{3.6}}71.4 start_POSTSUBSCRIPT 3.6 end_POSTSUBSCRIPT73.02.4subscript73.02.4\textbf{73.0}_{\text{2.4}}73.0 start_POSTSUBSCRIPT 2.4 end_POSTSUBSCRIPT
SST-533.20.0subscript33.20.033.2_{\text{0.0}}33.2 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT38.90.4subscript38.90.4\textbf{38.9}_{\text{0.4}}38.9 start_POSTSUBSCRIPT 0.4 end_POSTSUBSCRIPT29.30.7subscript29.30.729.3_{\text{0.7}}29.3 start_POSTSUBSCRIPT 0.7 end_POSTSUBSCRIPT31.10.4subscript31.10.4\textbf{31.1}_{\text{0.4}}31.1 start_POSTSUBSCRIPT 0.4 end_POSTSUBSCRIPT
Laptop39.60.0subscript39.60.039.6_{\text{0.0}}39.6 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT45.70.4subscript45.70.4\textbf{45.7}_{\text{0.4}}45.7 start_POSTSUBSCRIPT 0.4 end_POSTSUBSCRIPT46.24.2subscript46.24.246.2_{\text{4.2}}46.2 start_POSTSUBSCRIPT 4.2 end_POSTSUBSCRIPT53.12.2subscript53.12.2\textbf{53.1}_{\text{2.2}}53.1 start_POSTSUBSCRIPT 2.2 end_POSTSUBSCRIPT
Restaurant56.60.0subscript56.60.056.6_{\text{0.0}}56.6 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT63.70.5subscript63.70.5\textbf{63.7}_{\text{0.5}}63.7 start_POSTSUBSCRIPT 0.5 end_POSTSUBSCRIPT66.80.9subscript66.80.966.8_{\text{0.9}}66.8 start_POSTSUBSCRIPT 0.9 end_POSTSUBSCRIPT68.90.6subscript68.90.6\textbf{68.9}_{\text{0.6}}68.9 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT
Twitter22.70.0subscript22.70.022.7_{\text{0.0}}22.7 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT38.40.5subscript38.40.5\textbf{38.4}_{\text{0.5}}38.4 start_POSTSUBSCRIPT 0.5 end_POSTSUBSCRIPT29.45.4subscript29.45.429.4_{\text{5.4}}29.4 start_POSTSUBSCRIPT 5.4 end_POSTSUBSCRIPT46.83.2subscript46.83.2\textbf{46.8}_{\text{3.2}}46.8 start_POSTSUBSCRIPT 3.2 end_POSTSUBSCRIPT
Average38.538.538.538.545.753.453.453.453.458.6
Zero-shotTwo-shot
Orig. LMCalib. LMOrig. LMCalib. LM
AGNews44.10.0subscript44.10.044.1_{\text{0.0}}44.1 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT50.61.5subscript50.61.5\textbf{50.6}_{\text{1.5}}50.6 start_POSTSUBSCRIPT 1.5 end_POSTSUBSCRIPT80.83.4subscript80.83.480.8_{\text{3.4}}80.8 start_POSTSUBSCRIPT 3.4 end_POSTSUBSCRIPT83.42.4subscript83.42.4\textbf{83.4}_{\text{2.4}}83.4 start_POSTSUBSCRIPT 2.4 end_POSTSUBSCRIPT
DBPedia47.10.0subscript47.10.047.1_{\text{0.0}}47.1 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT51.20.6subscript51.20.6\textbf{51.2}_{\text{0.6}}51.2 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT88.55.1subscript88.55.188.5_{\text{5.1}}88.5 start_POSTSUBSCRIPT 5.1 end_POSTSUBSCRIPT93.81.6subscript93.81.6\textbf{93.8}_{\text{1.6}}93.8 start_POSTSUBSCRIPT 1.6 end_POSTSUBSCRIPT
TREC42.00.0subscript42.00.042.0_{\text{0.0}}42.0 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT44.41.4subscript44.41.4\textbf{44.4}_{\text{1.4}}44.4 start_POSTSUBSCRIPT 1.4 end_POSTSUBSCRIPT51.01.2subscript51.01.251.0_{\text{1.2}}51.0 start_POSTSUBSCRIPT 1.2 end_POSTSUBSCRIPT54.30.5subscript54.30.5\textbf{54.3}_{\text{0.5}}54.3 start_POSTSUBSCRIPT 0.5 end_POSTSUBSCRIPT
Subj49.80.0subscript49.80.049.8_{\text{0.0}}49.8 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT60.10.3subscript60.10.3\textbf{60.1}_{\text{0.3}}60.1 start_POSTSUBSCRIPT 0.3 end_POSTSUBSCRIPT49.56.3subscript49.56.349.5_{\text{6.3}}49.5 start_POSTSUBSCRIPT 6.3 end_POSTSUBSCRIPT58.42.1subscript58.42.1\textbf{58.4}_{\text{2.1}}58.4 start_POSTSUBSCRIPT 2.1 end_POSTSUBSCRIPT
SST-529.30.0subscript29.30.029.3_{\text{0.0}}29.3 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT33.51.2subscript33.51.2\textbf{33.5}_{\text{1.2}}33.5 start_POSTSUBSCRIPT 1.2 end_POSTSUBSCRIPT26.14.2subscript26.14.226.1_{\text{4.2}}26.1 start_POSTSUBSCRIPT 4.2 end_POSTSUBSCRIPT36.43.2subscript36.43.2\textbf{36.4}_{\text{3.2}}36.4 start_POSTSUBSCRIPT 3.2 end_POSTSUBSCRIPT
Laptop48.50.0subscript48.50.048.5_{\text{0.0}}48.5 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT52.42.3subscript52.42.3\textbf{52.4}_{\text{2.3}}52.4 start_POSTSUBSCRIPT 2.3 end_POSTSUBSCRIPT54.23.0subscript54.23.054.2_{\text{3.0}}54.2 start_POSTSUBSCRIPT 3.0 end_POSTSUBSCRIPT56.11.5subscript56.11.5\textbf{56.1}_{\text{1.5}}56.1 start_POSTSUBSCRIPT 1.5 end_POSTSUBSCRIPT
Restaurant65.40.0subscript65.40.065.4_{\text{0.0}}65.4 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT70.00.8subscript70.00.8\textbf{70.0}_{\text{0.8}}70.0 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT59.24.1subscript59.24.159.2_{\text{4.1}}59.2 start_POSTSUBSCRIPT 4.1 end_POSTSUBSCRIPT68.70.8subscript68.70.8\textbf{68.7}_{\text{0.8}}68.7 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT
Twitter25.50.0subscript25.50.025.5_{\text{0.0}}25.5 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT42.63.2subscript42.63.2\textbf{42.6}_{\text{3.2}}42.6 start_POSTSUBSCRIPT 3.2 end_POSTSUBSCRIPT27.11.4subscript27.11.427.1_{\text{1.4}}27.1 start_POSTSUBSCRIPT 1.4 end_POSTSUBSCRIPT44.81.9subscript44.81.9\textbf{44.8}_{\text{1.9}}44.8 start_POSTSUBSCRIPT 1.9 end_POSTSUBSCRIPT
Average44.044.044.044.050.654.654.654.654.662.0

In Table12, we compare the performance of RoBERTa-large (355M) with GPT-2 XL (1.5B) and Llama-2 (7B) in zero-shot learning on classification tasks, using their original pre-trained models. RoBERTa outperforms the other models on more datasets, and achieves better computing efficiency due to its smaller model size. Encoder LMs could be more effective and efficient for classification tasks for several reasons:(i) The bidirectional architecture of encoder LMs enables them to capture task-specific patterns more effectively by attending to both left and right context, compared to the unidirectional nature of decoder LMs. (ii) Classification tasks prioritize accurate label prediction over the generation of diverse and human-like text. Besides, the label spaces in classification are significantly more constrained than the whole vocabulary used in generative applications, which may restrict the effectiveness of decoder LMs Li etal. (2023b). (iii) The relative small size of encoder models facilitates efficiently combining prompting with label-supervised fine-tuning for classification tasks Liu etal. (2023), which further enhances performance, as demonstrated in Table2.

B.3 Other Experiments

We briefly summarize the contents of each table and figure below that presents other additional results.

Figure8 contains results for performance using different prompt templates (Table13).

Table14 contains results for performance using RoBERTa-base model.

Table15 contains results for performance of K={2,4,8}𝐾248K=\{2,4,8\}italic_K = { 2 , 4 , 8 } few-shot learning.

Table16 contains results for pseudo-perplexity comparisons between updating entire LM and only updating bias parameters in calibration.

Table17 contains results for performance comparisons between updating entire LM and only updating bias parameters in calibration.

Table18 contains results for performance of sentence-pair datasets.

Table19 contains results for variance of probability distribution across labels before and after calibration.

RoBERTa-largeGPT-2 XLLlama-2
(355M)(1.5B)(7B)
AGNews47.031.531.531.531.544.144.144.144.1
DBPedia58.237.637.637.637.647.147.147.147.1
TREC24.024.024.024.037.037.037.037.042.0
Subj50.850.150.150.150.149.849.849.849.8
SST-531.531.531.531.533.229.329.329.329.3
Laptop54.639.639.639.639.648.548.548.548.5
Restaurant68.656.656.656.656.665.465.465.465.4
Twitter19.719.719.719.722.722.722.722.725.5
Average44.338.538.538.538.544.044.044.044.0
Prompt-Based Bias Calibration for Better Zero/Few-Shot Learning of Language Models (8)
TaskPrompt Templates
AGNews {Sentence} It is about <mask>.{Sentence} This is about <mask>.{Sentence} This is on <mask>.{Sentence} It pertains to <mask>.{Sentence} In relation to <mask>.
TREC {Sentence} It is about <mask>.{Sentence} Concerning <mask>.{Sentence} This is about <mask>.{Sentence} In relation to <mask>.{Sentence} This is on <mask>.
In-context lrn no demoIn-context lrn with demoPrompt FT no demoPrompt FT with demo
NoCalOutCalIntrCalNoCalOutCalIntrCalNoCalOutCalIntrCalNoCalOutCalIntrCal
AGNews37.80.0subscript37.80.037.8_{\text{0.0}}37.8 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT36.24.6subscript36.24.636.2_{\text{4.6}}36.2 start_POSTSUBSCRIPT 4.6 end_POSTSUBSCRIPT49.00.9subscript49.00.9\textbf{49.0}_{\text{0.9}}49.0 start_POSTSUBSCRIPT 0.9 end_POSTSUBSCRIPT68.40.4subscript68.40.468.4_{\text{0.4}}68.4 start_POSTSUBSCRIPT 0.4 end_POSTSUBSCRIPT69.74.3subscript69.74.369.7_{\text{4.3}}69.7 start_POSTSUBSCRIPT 4.3 end_POSTSUBSCRIPT73.70.3subscript73.70.3\textbf{73.7}_{\text{0.3}}73.7 start_POSTSUBSCRIPT 0.3 end_POSTSUBSCRIPT88.20.3subscript88.20.388.2_{\text{0.3}}88.2 start_POSTSUBSCRIPT 0.3 end_POSTSUBSCRIPT87.80.6subscript87.80.687.8_{\text{0.6}}87.8 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT88.91.0subscript88.91.0\textbf{88.9}_{\text{1.0}}88.9 start_POSTSUBSCRIPT 1.0 end_POSTSUBSCRIPT86.70.1subscript86.70.186.7_{\text{0.1}}86.7 start_POSTSUBSCRIPT 0.1 end_POSTSUBSCRIPT74.24.1subscript74.24.174.2_{\text{4.1}}74.2 start_POSTSUBSCRIPT 4.1 end_POSTSUBSCRIPT87.20.1subscript87.20.1\textbf{87.2}_{\text{0.1}}87.2 start_POSTSUBSCRIPT 0.1 end_POSTSUBSCRIPT
DBPedia57.20.0subscript57.20.0\textbf{57.2}_{\text{0.0}}57.2 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT50.57.1subscript50.57.150.5_{\text{7.1}}50.5 start_POSTSUBSCRIPT 7.1 end_POSTSUBSCRIPT54.90.1subscript54.90.154.9_{\text{0.1}}54.9 start_POSTSUBSCRIPT 0.1 end_POSTSUBSCRIPT56.53.4subscript56.53.456.5_{\text{3.4}}56.5 start_POSTSUBSCRIPT 3.4 end_POSTSUBSCRIPT78.74.4subscript78.74.478.7_{\text{4.4}}78.7 start_POSTSUBSCRIPT 4.4 end_POSTSUBSCRIPT83.90.4subscript83.90.4\textbf{83.9}_{\text{0.4}}83.9 start_POSTSUBSCRIPT 0.4 end_POSTSUBSCRIPT95.22.1subscript95.22.195.2_{\text{2.1}}95.2 start_POSTSUBSCRIPT 2.1 end_POSTSUBSCRIPT93.55.0subscript93.55.093.5_{\text{5.0}}93.5 start_POSTSUBSCRIPT 5.0 end_POSTSUBSCRIPT99.00.4subscript99.00.4\textbf{99.0}_{\text{0.4}}99.0 start_POSTSUBSCRIPT 0.4 end_POSTSUBSCRIPT97.80.9subscript97.80.997.8_{\text{0.9}}97.8 start_POSTSUBSCRIPT 0.9 end_POSTSUBSCRIPT96.70.8subscript96.70.896.7_{\text{0.8}}96.7 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT98.60.1subscript98.60.1\textbf{98.6}_{\text{0.1}}98.6 start_POSTSUBSCRIPT 0.1 end_POSTSUBSCRIPT
TREC28.20.0subscript28.20.028.2_{\text{0.0}}28.2 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT25.44.4subscript25.44.425.4_{\text{4.4}}25.4 start_POSTSUBSCRIPT 4.4 end_POSTSUBSCRIPT30.20.1subscript30.20.1\textbf{30.2}_{\text{0.1}}30.2 start_POSTSUBSCRIPT 0.1 end_POSTSUBSCRIPT41.20.3subscript41.20.341.2_{\text{0.3}}41.2 start_POSTSUBSCRIPT 0.3 end_POSTSUBSCRIPT39.93.8subscript39.93.839.9_{\text{3.8}}39.9 start_POSTSUBSCRIPT 3.8 end_POSTSUBSCRIPT42.51.0subscript42.51.0\textbf{42.5}_{\text{1.0}}42.5 start_POSTSUBSCRIPT 1.0 end_POSTSUBSCRIPT82.510.9subscript82.510.982.5_{\text{10.9}}82.5 start_POSTSUBSCRIPT 10.9 end_POSTSUBSCRIPT70.32.3subscript70.32.370.3_{\text{2.3}}70.3 start_POSTSUBSCRIPT 2.3 end_POSTSUBSCRIPT86.46.5subscript86.46.5\textbf{86.4}_{\text{6.5}}86.4 start_POSTSUBSCRIPT 6.5 end_POSTSUBSCRIPT85.71.8subscript85.71.885.7_{\text{1.8}}85.7 start_POSTSUBSCRIPT 1.8 end_POSTSUBSCRIPT80.65.0subscript80.65.080.6_{\text{5.0}}80.6 start_POSTSUBSCRIPT 5.0 end_POSTSUBSCRIPT91.20.6subscript91.20.6\textbf{91.2}_{\text{0.6}}91.2 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT
Subj53.60.0subscript53.60.053.6_{\text{0.0}}53.6 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT63.61.9subscript63.61.963.6_{\text{1.9}}63.6 start_POSTSUBSCRIPT 1.9 end_POSTSUBSCRIPT66.41.8subscript66.41.8\textbf{66.4}_{\text{1.8}}66.4 start_POSTSUBSCRIPT 1.8 end_POSTSUBSCRIPT50.80.2subscript50.80.250.8_{\text{0.2}}50.8 start_POSTSUBSCRIPT 0.2 end_POSTSUBSCRIPT67.01.7subscript67.01.767.0_{\text{1.7}}67.0 start_POSTSUBSCRIPT 1.7 end_POSTSUBSCRIPT69.60.4subscript69.60.4\textbf{69.6}_{\text{0.4}}69.6 start_POSTSUBSCRIPT 0.4 end_POSTSUBSCRIPT92.51.3subscript92.51.3\textbf{92.5}_{\text{1.3}}92.5 start_POSTSUBSCRIPT 1.3 end_POSTSUBSCRIPT91.10.4subscript91.10.491.1_{\text{0.4}}91.1 start_POSTSUBSCRIPT 0.4 end_POSTSUBSCRIPT91.91.7subscript91.91.791.9_{\text{1.7}}91.9 start_POSTSUBSCRIPT 1.7 end_POSTSUBSCRIPT90.42.1subscript90.42.190.4_{\text{2.1}}90.4 start_POSTSUBSCRIPT 2.1 end_POSTSUBSCRIPT92.00.2subscript92.00.292.0_{\text{0.2}}92.0 start_POSTSUBSCRIPT 0.2 end_POSTSUBSCRIPT92.30.1subscript92.30.1\textbf{92.3}_{\text{0.1}}92.3 start_POSTSUBSCRIPT 0.1 end_POSTSUBSCRIPT
SST-531.90.0subscript31.90.031.9_{\text{0.0}}31.9 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT30.83.4subscript30.83.430.8_{\text{3.4}}30.8 start_POSTSUBSCRIPT 3.4 end_POSTSUBSCRIPT32.20.2subscript32.20.2\textbf{32.2}_{\text{0.2}}32.2 start_POSTSUBSCRIPT 0.2 end_POSTSUBSCRIPT25.34.3subscript25.34.325.3_{\text{4.3}}25.3 start_POSTSUBSCRIPT 4.3 end_POSTSUBSCRIPT28.63.4subscript28.63.428.6_{\text{3.4}}28.6 start_POSTSUBSCRIPT 3.4 end_POSTSUBSCRIPT29.81.7subscript29.81.7\textbf{29.8}_{\text{1.7}}29.8 start_POSTSUBSCRIPT 1.7 end_POSTSUBSCRIPT45.93.3subscript45.93.345.9_{\text{3.3}}45.9 start_POSTSUBSCRIPT 3.3 end_POSTSUBSCRIPT42.92.3subscript42.92.342.9_{\text{2.3}}42.9 start_POSTSUBSCRIPT 2.3 end_POSTSUBSCRIPT48.11.8subscript48.11.8\textbf{48.1}_{\text{1.8}}48.1 start_POSTSUBSCRIPT 1.8 end_POSTSUBSCRIPT44.35.2subscript44.35.244.3_{\text{5.2}}44.3 start_POSTSUBSCRIPT 5.2 end_POSTSUBSCRIPT40.72.5subscript40.72.540.7_{\text{2.5}}40.7 start_POSTSUBSCRIPT 2.5 end_POSTSUBSCRIPT45.82.6subscript45.82.6\textbf{45.8}_{\text{2.6}}45.8 start_POSTSUBSCRIPT 2.6 end_POSTSUBSCRIPT
Laptop56.10.0subscript56.10.056.1_{\text{0.0}}56.1 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT56.73.8subscript56.73.856.7_{\text{3.8}}56.7 start_POSTSUBSCRIPT 3.8 end_POSTSUBSCRIPT60.00.1subscript60.00.1\textbf{60.0}_{\text{0.1}}60.0 start_POSTSUBSCRIPT 0.1 end_POSTSUBSCRIPT49.20.9subscript49.20.949.2_{\text{0.9}}49.2 start_POSTSUBSCRIPT 0.9 end_POSTSUBSCRIPT61.52.8subscript61.52.861.5_{\text{2.8}}61.5 start_POSTSUBSCRIPT 2.8 end_POSTSUBSCRIPT64.00.6subscript64.00.6\textbf{64.0}_{\text{0.6}}64.0 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT75.83.4subscript75.83.475.8_{\text{3.4}}75.8 start_POSTSUBSCRIPT 3.4 end_POSTSUBSCRIPT73.01.3subscript73.01.373.0_{\text{1.3}}73.0 start_POSTSUBSCRIPT 1.3 end_POSTSUBSCRIPT76.31.8subscript76.31.8\textbf{76.3}_{\text{1.8}}76.3 start_POSTSUBSCRIPT 1.8 end_POSTSUBSCRIPT74.80.1subscript74.80.174.8_{\text{0.1}}74.8 start_POSTSUBSCRIPT 0.1 end_POSTSUBSCRIPT76.00.6subscript76.00.676.0_{\text{0.6}}76.0 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT76.30.5subscript76.30.5\textbf{76.3}_{\text{0.5}}76.3 start_POSTSUBSCRIPT 0.5 end_POSTSUBSCRIPT
Restaurant69.80.0subscript69.80.069.8_{\text{0.0}}69.8 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT72.02.9subscript72.02.9\textbf{72.0}_{\text{2.9}}72.0 start_POSTSUBSCRIPT 2.9 end_POSTSUBSCRIPT69.50.5subscript69.50.569.5_{\text{0.5}}69.5 start_POSTSUBSCRIPT 0.5 end_POSTSUBSCRIPT67.60.7subscript67.60.767.6_{\text{0.7}}67.6 start_POSTSUBSCRIPT 0.7 end_POSTSUBSCRIPT70.52.4subscript70.52.470.5_{\text{2.4}}70.5 start_POSTSUBSCRIPT 2.4 end_POSTSUBSCRIPT73.20.7subscript73.20.7\textbf{73.2}_{\text{0.7}}73.2 start_POSTSUBSCRIPT 0.7 end_POSTSUBSCRIPT75.56.6subscript75.56.675.5_{\text{6.6}}75.5 start_POSTSUBSCRIPT 6.6 end_POSTSUBSCRIPT77.33.4subscript77.33.4\textbf{77.3}_{\text{3.4}}77.3 start_POSTSUBSCRIPT 3.4 end_POSTSUBSCRIPT77.21.1subscript77.21.177.2_{\text{1.1}}77.2 start_POSTSUBSCRIPT 1.1 end_POSTSUBSCRIPT74.83.3subscript74.83.374.8_{\text{3.3}}74.8 start_POSTSUBSCRIPT 3.3 end_POSTSUBSCRIPT75.20.7subscript75.20.775.2_{\text{0.7}}75.2 start_POSTSUBSCRIPT 0.7 end_POSTSUBSCRIPT76.13.9subscript76.13.9\textbf{76.1}_{\text{3.9}}76.1 start_POSTSUBSCRIPT 3.9 end_POSTSUBSCRIPT
Twitter22.00.0subscript22.00.022.0_{\text{0.0}}22.0 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT48.65.1subscript48.65.148.6_{\text{5.1}}48.6 start_POSTSUBSCRIPT 5.1 end_POSTSUBSCRIPT52.30.6subscript52.30.6\textbf{52.3}_{\text{0.6}}52.3 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT17.60.4subscript17.60.417.6_{\text{0.4}}17.6 start_POSTSUBSCRIPT 0.4 end_POSTSUBSCRIPT41.85.4subscript41.85.441.8_{\text{5.4}}41.8 start_POSTSUBSCRIPT 5.4 end_POSTSUBSCRIPT48.40.5subscript48.40.5\textbf{48.4}_{\text{0.5}}48.4 start_POSTSUBSCRIPT 0.5 end_POSTSUBSCRIPT54.51.1subscript54.51.154.5_{\text{1.1}}54.5 start_POSTSUBSCRIPT 1.1 end_POSTSUBSCRIPT47.73.8subscript47.73.847.7_{\text{3.8}}47.7 start_POSTSUBSCRIPT 3.8 end_POSTSUBSCRIPT57.91.3subscript57.91.3\textbf{57.9}_{\text{1.3}}57.9 start_POSTSUBSCRIPT 1.3 end_POSTSUBSCRIPT50.64.6subscript50.64.650.6_{\text{4.6}}50.6 start_POSTSUBSCRIPT 4.6 end_POSTSUBSCRIPT51.82.1subscript51.82.151.8_{\text{2.1}}51.8 start_POSTSUBSCRIPT 2.1 end_POSTSUBSCRIPT56.04.9subscript56.04.9\textbf{56.0}_{\text{4.9}}56.0 start_POSTSUBSCRIPT 4.9 end_POSTSUBSCRIPT
Average44.644.644.644.648.048.048.048.051.847.147.147.147.157.257.257.257.260.676.376.376.376.373.073.073.073.078.275.675.675.675.673.473.473.473.477.9
In-context lrn with demoPrompt FT no demoPrompt FT with demo
NoCalIntrCalNoCalIntrCalNoCalIntrCal
2-shotAGNews 70.46.7subscript70.46.770.4_{\text{6.7}}70.4 start_POSTSUBSCRIPT 6.7 end_POSTSUBSCRIPT76.33.6subscript76.33.6\textbf{76.3}_{\text{3.6}}76.3 start_POSTSUBSCRIPT 3.6 end_POSTSUBSCRIPT 76.45.4subscript76.45.476.4_{\text{5.4}}76.4 start_POSTSUBSCRIPT 5.4 end_POSTSUBSCRIPT80.28.0subscript80.28.0\textbf{80.2}_{\text{8.0}}80.2 start_POSTSUBSCRIPT 8.0 end_POSTSUBSCRIPT 78.21.3subscript78.21.378.2_{\text{1.3}}78.2 start_POSTSUBSCRIPT 1.3 end_POSTSUBSCRIPT83.21.1subscript83.21.1\textbf{83.2}_{\text{1.1}}83.2 start_POSTSUBSCRIPT 1.1 end_POSTSUBSCRIPT
DBPedia 92.90.9subscript92.90.992.9_{\text{0.9}}92.9 start_POSTSUBSCRIPT 0.9 end_POSTSUBSCRIPT94.01.0subscript94.01.0\textbf{94.0}_{\text{1.0}}94.0 start_POSTSUBSCRIPT 1.0 end_POSTSUBSCRIPT 97.01.6subscript97.01.697.0_{\text{1.6}}97.0 start_POSTSUBSCRIPT 1.6 end_POSTSUBSCRIPT98.40.9subscript98.40.9\textbf{98.4}_{\text{0.9}}98.4 start_POSTSUBSCRIPT 0.9 end_POSTSUBSCRIPT 97.41.0subscript97.41.097.4_{\text{1.0}}97.4 start_POSTSUBSCRIPT 1.0 end_POSTSUBSCRIPT97.81.1subscript97.81.1\textbf{97.8}_{\text{1.1}}97.8 start_POSTSUBSCRIPT 1.1 end_POSTSUBSCRIPT
TREC 49.84.2subscript49.84.249.8_{\text{4.2}}49.8 start_POSTSUBSCRIPT 4.2 end_POSTSUBSCRIPT50.54.0subscript50.54.0\textbf{50.5}_{\text{4.0}}50.5 start_POSTSUBSCRIPT 4.0 end_POSTSUBSCRIPT 49.122.6subscript49.122.649.1_{\text{22.6}}49.1 start_POSTSUBSCRIPT 22.6 end_POSTSUBSCRIPT60.39.6subscript60.39.6\textbf{60.3}_{\text{9.6}}60.3 start_POSTSUBSCRIPT 9.6 end_POSTSUBSCRIPT 65.29.3subscript65.29.365.2_{\text{9.3}}65.2 start_POSTSUBSCRIPT 9.3 end_POSTSUBSCRIPT66.19.3subscript66.19.3\textbf{66.1}_{\text{9.3}}66.1 start_POSTSUBSCRIPT 9.3 end_POSTSUBSCRIPT
Subj 49.41.1subscript49.41.149.4_{\text{1.1}}49.4 start_POSTSUBSCRIPT 1.1 end_POSTSUBSCRIPT56.23.9subscript56.23.9\textbf{56.2}_{\text{3.9}}56.2 start_POSTSUBSCRIPT 3.9 end_POSTSUBSCRIPT 66.45.4subscript66.45.466.4_{\text{5.4}}66.4 start_POSTSUBSCRIPT 5.4 end_POSTSUBSCRIPT82.25.9subscript82.25.9\textbf{82.2}_{\text{5.9}}82.2 start_POSTSUBSCRIPT 5.9 end_POSTSUBSCRIPT 72.313.9subscript72.313.972.3_{\text{13.9}}72.3 start_POSTSUBSCRIPT 13.9 end_POSTSUBSCRIPT81.513.2subscript81.513.2\textbf{81.5}_{\text{13.2}}81.5 start_POSTSUBSCRIPT 13.2 end_POSTSUBSCRIPT
4-shotAGNews 75.73.9subscript75.73.975.7_{\text{3.9}}75.7 start_POSTSUBSCRIPT 3.9 end_POSTSUBSCRIPT80.31.7subscript80.31.7\textbf{80.3}_{\text{1.7}}80.3 start_POSTSUBSCRIPT 1.7 end_POSTSUBSCRIPT 85.42.7subscript85.42.785.4_{\text{2.7}}85.4 start_POSTSUBSCRIPT 2.7 end_POSTSUBSCRIPT87.31.3subscript87.31.3\textbf{87.3}_{\text{1.3}}87.3 start_POSTSUBSCRIPT 1.3 end_POSTSUBSCRIPT 76.713.1subscript76.713.176.7_{\text{13.1}}76.7 start_POSTSUBSCRIPT 13.1 end_POSTSUBSCRIPT85.91.9subscript85.91.9\textbf{85.9}_{\text{1.9}}85.9 start_POSTSUBSCRIPT 1.9 end_POSTSUBSCRIPT
DBPedia 93.00.4subscript93.00.493.0_{\text{0.4}}93.0 start_POSTSUBSCRIPT 0.4 end_POSTSUBSCRIPT93.90.4subscript93.90.4\textbf{93.9}_{\text{0.4}}93.9 start_POSTSUBSCRIPT 0.4 end_POSTSUBSCRIPT 97.20.8subscript97.20.897.2_{\text{0.8}}97.2 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT97.91.1subscript97.91.1\textbf{97.9}_{\text{1.1}}97.9 start_POSTSUBSCRIPT 1.1 end_POSTSUBSCRIPT 96.41.5subscript96.41.596.4_{\text{1.5}}96.4 start_POSTSUBSCRIPT 1.5 end_POSTSUBSCRIPT98.60.6subscript98.60.6\textbf{98.6}_{\text{0.6}}98.6 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT
TREC 51.92.6subscript51.92.651.9_{\text{2.6}}51.9 start_POSTSUBSCRIPT 2.6 end_POSTSUBSCRIPT53.22.5subscript53.22.5\textbf{53.2}_{\text{2.5}}53.2 start_POSTSUBSCRIPT 2.5 end_POSTSUBSCRIPT 64.57.1subscript64.57.164.5_{\text{7.1}}64.5 start_POSTSUBSCRIPT 7.1 end_POSTSUBSCRIPT67.66.7subscript67.66.7\textbf{67.6}_{\text{6.7}}67.6 start_POSTSUBSCRIPT 6.7 end_POSTSUBSCRIPT 73.68.5subscript73.68.573.6_{\text{8.5}}73.6 start_POSTSUBSCRIPT 8.5 end_POSTSUBSCRIPT78.29.7subscript78.29.7\textbf{78.2}_{\text{9.7}}78.2 start_POSTSUBSCRIPT 9.7 end_POSTSUBSCRIPT
Subj 48.82.2subscript48.82.248.8_{\text{2.2}}48.8 start_POSTSUBSCRIPT 2.2 end_POSTSUBSCRIPT59.43.1subscript59.43.1\textbf{59.4}_{\text{3.1}}59.4 start_POSTSUBSCRIPT 3.1 end_POSTSUBSCRIPT 81.43.9subscript81.43.981.4_{\text{3.9}}81.4 start_POSTSUBSCRIPT 3.9 end_POSTSUBSCRIPT88.53.2subscript88.53.2\textbf{88.5}_{\text{3.2}}88.5 start_POSTSUBSCRIPT 3.2 end_POSTSUBSCRIPT 78.99.3subscript78.99.378.9_{\text{9.3}}78.9 start_POSTSUBSCRIPT 9.3 end_POSTSUBSCRIPT83.67.8subscript83.67.8\textbf{83.6}_{\text{7.8}}83.6 start_POSTSUBSCRIPT 7.8 end_POSTSUBSCRIPT
8-shotAGNews 79.61.0subscript79.61.079.6_{\text{1.0}}79.6 start_POSTSUBSCRIPT 1.0 end_POSTSUBSCRIPT82.41.6subscript82.41.6\textbf{82.4}_{\text{1.6}}82.4 start_POSTSUBSCRIPT 1.6 end_POSTSUBSCRIPT 86.91.9subscript86.91.986.9_{\text{1.9}}86.9 start_POSTSUBSCRIPT 1.9 end_POSTSUBSCRIPT88.10.4subscript88.10.4\textbf{88.1}_{\text{0.4}}88.1 start_POSTSUBSCRIPT 0.4 end_POSTSUBSCRIPT 85.51.7subscript85.51.785.5_{\text{1.7}}85.5 start_POSTSUBSCRIPT 1.7 end_POSTSUBSCRIPT88.01.4subscript88.01.4\textbf{88.0}_{\text{1.4}}88.0 start_POSTSUBSCRIPT 1.4 end_POSTSUBSCRIPT
DBPedia 92.90.8subscript92.90.892.9_{\text{0.8}}92.9 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT94.20.2subscript94.20.2\textbf{94.2}_{\text{0.2}}94.2 start_POSTSUBSCRIPT 0.2 end_POSTSUBSCRIPT 97.31.2subscript97.31.297.3_{\text{1.2}}97.3 start_POSTSUBSCRIPT 1.2 end_POSTSUBSCRIPT98.80.5subscript98.80.5\textbf{98.8}_{\text{0.5}}98.8 start_POSTSUBSCRIPT 0.5 end_POSTSUBSCRIPT 98.20.8subscript98.20.898.2_{\text{0.8}}98.2 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT98.60.2subscript98.60.2\textbf{98.6}_{\text{0.2}}98.6 start_POSTSUBSCRIPT 0.2 end_POSTSUBSCRIPT
TREC 47.92.2subscript47.92.247.9_{\text{2.2}}47.9 start_POSTSUBSCRIPT 2.2 end_POSTSUBSCRIPT48.72.0subscript48.72.0\textbf{48.7}_{\text{2.0}}48.7 start_POSTSUBSCRIPT 2.0 end_POSTSUBSCRIPT 71.64.9subscript71.64.971.6_{\text{4.9}}71.6 start_POSTSUBSCRIPT 4.9 end_POSTSUBSCRIPT72.25.1subscript72.25.1\textbf{72.2}_{\text{5.1}}72.2 start_POSTSUBSCRIPT 5.1 end_POSTSUBSCRIPT 75.46.2subscript75.46.275.4_{\text{6.2}}75.4 start_POSTSUBSCRIPT 6.2 end_POSTSUBSCRIPT81.75.6subscript81.75.6\textbf{81.7}_{\text{5.6}}81.7 start_POSTSUBSCRIPT 5.6 end_POSTSUBSCRIPT
Subj 48.41.0subscript48.41.048.4_{\text{1.0}}48.4 start_POSTSUBSCRIPT 1.0 end_POSTSUBSCRIPT60.54.8subscript60.54.8\textbf{60.5}_{\text{4.8}}60.5 start_POSTSUBSCRIPT 4.8 end_POSTSUBSCRIPT 91.91.3subscript91.91.391.9_{\text{1.3}}91.9 start_POSTSUBSCRIPT 1.3 end_POSTSUBSCRIPT92.70.8subscript92.70.8\textbf{92.7}_{\text{0.8}}92.7 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT 88.95.3subscript88.95.388.9_{\text{5.3}}88.9 start_POSTSUBSCRIPT 5.3 end_POSTSUBSCRIPT92.12.2subscript92.12.2\textbf{92.1}_{\text{2.2}}92.1 start_POSTSUBSCRIPT 2.2 end_POSTSUBSCRIPT
ModelDatasets
WikiText-2WikiText-103LAMBADA
Original RoBERTa6.1896.1896.1896.1897.0087.0087.0087.00824.5224.5224.5224.52
\cdashline2-9[1pt/1pt]
+ calibrationWLM + BLMBLMWLM + BLMBLMWLM + BLMBLM
\cdashline2-9[1pt/1pt]
      for_AGNews 6.2946.2946.2946.294 6.2066.2066.2066.206 7.0677.0677.0677.067 7.0377.0377.0377.037 25.1025.1025.1025.10 24.5424.5424.5424.54
      for_DBPedia 6.2906.2906.2906.290 6.1976.1976.1976.197 7.1007.1007.1007.100 7.0107.0107.0107.010 25.2825.2825.2825.28 24.3024.3024.3024.30
      for_TREC 6.2386.2386.2386.238 6.1626.1626.1626.162 7.0487.0487.0487.048 6.9666.9666.9666.966 25.0925.0925.0925.09 24.2524.2524.2524.25
      for_Subj 6.2706.2706.2706.270 6.1686.1686.1686.168 7.1247.1247.1247.124 6.9786.9786.9786.978 25.2225.2225.2225.22 24.6024.6024.6024.60
      for_SST-5 6.1716.1716.1716.171 6.1586.1586.1586.158 7.1517.1517.1517.151 6.9696.9696.9696.969 25.1725.1725.1725.17 24.3424.3424.3424.34
      for_Laptop 6.3226.3226.3226.322 6.2006.2006.2006.200 7.0837.0837.0837.083 7.0107.0107.0107.010 25.0825.0825.0825.08 24.5124.5124.5124.51
      for_Restaurant 6.2916.2916.2916.291 6.2446.2446.2446.244 7.0797.0797.0797.079 7.0827.0827.0827.082 25.1625.1625.1625.16 24.6524.6524.6524.65
      for_Twitter 6.3936.3936.3936.393 6.1606.1606.1606.160 7.1047.1047.1047.104 6.9716.9716.9716.971 24.9124.9124.9124.91 24.5724.5724.5724.57
ICL with demoPrompt FT with demo
WLM + BLMBLMWLM + BLMBLM
AGNews82.00.8subscript82.00.882.0_{\text{0.8}}82.0 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT82.40.9subscript82.40.9\textbf{82.4}_{\text{0.9}}82.4 start_POSTSUBSCRIPT 0.9 end_POSTSUBSCRIPT89.30.6subscript89.30.6\textbf{89.3}_{\text{0.6}}89.3 start_POSTSUBSCRIPT 0.6 end_POSTSUBSCRIPT89.30.9subscript89.30.989.3_{\text{0.9}}89.3 start_POSTSUBSCRIPT 0.9 end_POSTSUBSCRIPT
DBPedia95.10.7subscript95.10.7\textbf{95.1}_{\text{0.7}}95.1 start_POSTSUBSCRIPT 0.7 end_POSTSUBSCRIPT94.80.7subscript94.80.794.8_{\text{0.7}}94.8 start_POSTSUBSCRIPT 0.7 end_POSTSUBSCRIPT99.00.1subscript99.00.1\textbf{99.0}_{\text{0.1}}99.0 start_POSTSUBSCRIPT 0.1 end_POSTSUBSCRIPT98.90.3subscript98.90.398.9_{\text{0.3}}98.9 start_POSTSUBSCRIPT 0.3 end_POSTSUBSCRIPT
TREC49.12.6subscript49.12.6\textbf{49.1}_{\text{2.6}}49.1 start_POSTSUBSCRIPT 2.6 end_POSTSUBSCRIPT48.62.2subscript48.62.248.6_{\text{2.2}}48.6 start_POSTSUBSCRIPT 2.2 end_POSTSUBSCRIPT88.92.3subscript88.92.388.9_{\text{2.3}}88.9 start_POSTSUBSCRIPT 2.3 end_POSTSUBSCRIPT89.71.0subscript89.71.0\textbf{89.7}_{\text{1.0}}89.7 start_POSTSUBSCRIPT 1.0 end_POSTSUBSCRIPT
Subj65.60.4subscript65.60.4\textbf{65.6}_{\text{0.4}}65.6 start_POSTSUBSCRIPT 0.4 end_POSTSUBSCRIPT63.52.3subscript63.52.363.5_{\text{2.3}}63.5 start_POSTSUBSCRIPT 2.3 end_POSTSUBSCRIPT93.91.6subscript93.91.693.9_{\text{1.6}}93.9 start_POSTSUBSCRIPT 1.6 end_POSTSUBSCRIPT94.30.2subscript94.30.2\textbf{94.3}_{\text{0.2}}94.3 start_POSTSUBSCRIPT 0.2 end_POSTSUBSCRIPT
SST-537.11.0subscript37.11.0\textbf{37.1}_{\text{1.0}}37.1 start_POSTSUBSCRIPT 1.0 end_POSTSUBSCRIPT36.61.0subscript36.61.036.6_{\text{1.0}}36.6 start_POSTSUBSCRIPT 1.0 end_POSTSUBSCRIPT51.31.7subscript51.31.7\textbf{51.3}_{\text{1.7}}51.3 start_POSTSUBSCRIPT 1.7 end_POSTSUBSCRIPT50.01.7subscript50.01.750.0_{\text{1.7}}50.0 start_POSTSUBSCRIPT 1.7 end_POSTSUBSCRIPT
Laptop65.80.3subscript65.80.365.8_{\text{0.3}}65.8 start_POSTSUBSCRIPT 0.3 end_POSTSUBSCRIPT67.41.7subscript67.41.7\textbf{67.4}_{\text{1.7}}67.4 start_POSTSUBSCRIPT 1.7 end_POSTSUBSCRIPT77.70.8subscript77.70.877.7_{\text{0.8}}77.7 start_POSTSUBSCRIPT 0.8 end_POSTSUBSCRIPT78.71.4subscript78.71.4\textbf{78.7}_{\text{1.4}}78.7 start_POSTSUBSCRIPT 1.4 end_POSTSUBSCRIPT
Restaurant72.71.2subscript72.71.272.7_{\text{1.2}}72.7 start_POSTSUBSCRIPT 1.2 end_POSTSUBSCRIPT74.01.0subscript74.01.0\textbf{74.0}_{\text{1.0}}74.0 start_POSTSUBSCRIPT 1.0 end_POSTSUBSCRIPT81.43.4subscript81.43.4\textbf{81.4}_{\text{3.4}}81.4 start_POSTSUBSCRIPT 3.4 end_POSTSUBSCRIPT79.84.5subscript79.84.579.8_{\text{4.5}}79.8 start_POSTSUBSCRIPT 4.5 end_POSTSUBSCRIPT
Twitter45.82.7subscript45.82.745.8_{\text{2.7}}45.8 start_POSTSUBSCRIPT 2.7 end_POSTSUBSCRIPT49.42.7subscript49.42.7\textbf{49.4}_{\text{2.7}}49.4 start_POSTSUBSCRIPT 2.7 end_POSTSUBSCRIPT60.41.7subscript60.41.7\textbf{60.4}_{\text{1.7}}60.4 start_POSTSUBSCRIPT 1.7 end_POSTSUBSCRIPT59.32.3subscript59.32.359.3_{\text{2.3}}59.3 start_POSTSUBSCRIPT 2.3 end_POSTSUBSCRIPT
Average64.264.264.264.264.680.280.080.080.080.0
In-context lrn no demoPrompt FT no demo
NoCalIntrCalNoCalIntrCal
MNLI32.70.0subscript32.70.032.7_{\text{0.0}}32.7 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT37.70.7subscript37.70.7\textbf{37.7}_{\text{0.7}}37.7 start_POSTSUBSCRIPT 0.7 end_POSTSUBSCRIPT67.92.1subscript67.92.167.9_{\text{2.1}}67.9 start_POSTSUBSCRIPT 2.1 end_POSTSUBSCRIPT68.61.9subscript68.61.9\textbf{68.6}_{\text{1.9}}68.6 start_POSTSUBSCRIPT 1.9 end_POSTSUBSCRIPT
SNLI33.60.0subscript33.60.033.6_{\text{0.0}}33.6 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT36.70.9subscript36.70.9\textbf{36.7}_{\text{0.9}}36.7 start_POSTSUBSCRIPT 0.9 end_POSTSUBSCRIPT77.42.8subscript77.42.877.4_{\text{2.8}}77.4 start_POSTSUBSCRIPT 2.8 end_POSTSUBSCRIPT78.52.3subscript78.52.3\textbf{78.5}_{\text{2.3}}78.5 start_POSTSUBSCRIPT 2.3 end_POSTSUBSCRIPT
MRPC51.10.0subscript51.10.051.1_{\text{0.0}}51.1 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT53.60.2subscript53.60.2\textbf{53.6}_{\text{0.2}}53.6 start_POSTSUBSCRIPT 0.2 end_POSTSUBSCRIPT73.64.3subscript73.64.373.6_{\text{4.3}}73.6 start_POSTSUBSCRIPT 4.3 end_POSTSUBSCRIPT74.91.4subscript74.91.4\textbf{74.9}_{\text{1.4}}74.9 start_POSTSUBSCRIPT 1.4 end_POSTSUBSCRIPT
QQP50.80.0subscript50.80.050.8_{\text{0.0}}50.8 start_POSTSUBSCRIPT 0.0 end_POSTSUBSCRIPT54.60.2subscript54.60.2\textbf{54.6}_{\text{0.2}}54.6 start_POSTSUBSCRIPT 0.2 end_POSTSUBSCRIPT65.23.5subscript65.23.565.2_{\text{3.5}}65.2 start_POSTSUBSCRIPT 3.5 end_POSTSUBSCRIPT66.23.3subscript66.23.3\textbf{66.2}_{\text{3.3}}66.2 start_POSTSUBSCRIPT 3.3 end_POSTSUBSCRIPT
AGNewsDBPediaTRECSubjSST-5
Orig. LM0.0330.1300.0250.1950.011
Calib. LM0.0220.0250.0110.1120.011
Prompt-Based Bias Calibration for Better Zero/Few-Shot Learning of Language Models (2024)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Foster Heidenreich CPA

Last Updated:

Views: 5857

Rating: 4.6 / 5 (76 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Foster Heidenreich CPA

Birthday: 1995-01-14

Address: 55021 Usha Garden, North Larisa, DE 19209

Phone: +6812240846623

Job: Corporate Healthcare Strategist

Hobby: Singing, Listening to music, Rafting, LARPing, Gardening, Quilting, Rappelling

Introduction: My name is Foster Heidenreich CPA, I am a delightful, quaint, glorious, quaint, faithful, enchanting, fine person who loves writing and wants to share my knowledge and understanding with you.