Towards Informative Few-Shot Prompt with Maximum Information Gain for In-Context Learning
Authors: Hongfu Liu
Ye Wang
Venue: EMNLP 2023 Findings (2023)
Keywords: Large Language Model
In-context Learning
Information Gain

Abstract: Large Language models (LLMs) possess the capability to engage In-context Learning (ICL) by leveraging a few demonstrations pertaining to a new downstream task as conditions. However, this particular learning paradigm suffers from high instability stemming from substantial variances induced by factors such as the input distribution of selected examples, their ordering, and prompt formats. In this work, we demonstrate that even when all these factors are held constant, the random selection of examples still results in high variance. Consequently, we aim to explore the informative ability of data examples by quantifying the Information Gain (IG) obtained in prediction after observing a given example candidate. Then we propose to sample those with maximum IG. Additionally, we identify the presence of template bias, which can lead to unfair evaluations of IG during the sampling process. To mitigate this bias, we introduce Calibration Before Sampling strategy. The experimental results illustrate that our proposed method can yield an average relative improvement of 14.3\% across six classification tasks using three LLMs.

Towards Informative Few-Shot Prompt with Maximum Information Gain for In- In-Context Learning
Hongfu Liu and Ye Wang
School of Computing, National University of Singapore {hongfu, wangye Jecomp. nus. edu.
Abstract
GPT-2 1.58
GPT-J 68
Large Language models (LLMs) possess the capability to engage In-context Learning (ICL) by leveraging a few demonstrations pertaining a new downstream task conditions. How- ever, this particular learning paradigm suffers from high instability stemming from substan- tial variances induced by factors such as the input distribution of selected examples, their ordering, and prompt formats. In this work, we demonstrate that even when all these factors held constant, the random selection of exam- ples still results high variance. Consequently, we aim explore the informative ability of data examples by quantifying the Information Gain (IG) obtained prediction after observing given example candidate. Then propose to sample those with maximum IG. Addition- ally, we identify the presence of template bias, which can lead to unfair evaluations of IG dur- ing the sampling process. To mitigate this bias, we introduce Calibration Before Sampling strat- egy. The experimental results illustrate that our proposed method can yield an average relative improvement of 14.3% across six classification tasks using three L.MSs.
Acouracy (W)
70
9
20
55
Semple Order
Sample Order ID
Figure 1: Four-shot ICL performance SST-2 using GPT-2 XL and GPT-J. Each boxplot summarizes the results of randomly selected prompts for a specific sample order. For given sample order, the input dis- tribution, demonstration ordering, and prompt formats remain constant. For instance, the sample order [P P N NJ denotes the sequence of two positive examples followed by two negative ones.
thereby allowing higher efficiency in adapting to new tasks and easier deployment.
However, ICL tends to suffer from substantial variance in performance. Existing studies attribute it to factors including the input distribution of demonstrations, their ordering, and the prompt for- mats employed during prompt construction (Zhao al., 2021; Lu et al., 2022: Zhang et al., 2022; Min et al., 2022). Our investigation reveals that even when the input distribution, the ordering demon- strations, and prompt formats remain fixed, the random selection of different demonstrations still leads to significant variance, shown in Figure 1, This observation indicates that data samples within the same category offer distinct information and contribute differently the ICL performance. We refer to the ability of a data sample provide valuable information its informative ability. To the best of our knowledge, there has been no prior study exploring this aspect in the existing literature.
1 Introduction
These days the In-context Learning (ICL) ability of pre-trained Large Language Models (LLMs)) has garnered significant attention in the community. ICL represents new paradigm for few-shot learn- ing, which entails performing new downstream tasks based on prompts. These prompts consist of a few input-output pairs, commonly referred to as demonstrations. Such prompts serve as ex- plicit task descriptions for the L.M.. LLMs have showcased the formidable capacity of ICL and achieved remarkable performances across various downstream tasks (Brown al., 2020). In compari- son approaches that involve fine-tuning I.MMs on downstream tasks (Devlin et al., 2019; Gao et al., 2021), ICL obviates the need for parameter updates,
In this paper, we examine the informative ability

---

of data examples from the perspective of informa- tion theory and investigate its correlation with the ICL performance. Specifically, we assess the con- tribution of individual data samples to the specific downstream tasks by quantitatively measuring their informative ubility. To accomplish this, we propose evaluate the Information Gain (IG) of predic- tion, which quantifies the amount of information gained after observing one example candidate in the context. We construct prompt for each ex- ample candidate and utilize the LLM to obtain the corresponding output distribution, thus enabling the evaluation of IG. Furthermore, we uncover the presence of Template Bias, which can lead to bi- ased evaluations of IG. To address this issue, we introduce Calibration Before Sampling strategy ensure fair assessment of IG. Subsequently, select the example candidates with maximum IG and annotate them as demonstrations for enhancing ICL.
2 Related Work
2.1 Active Data Sampling for ICL
Active data sampling has been employed in nat- ural language processing tasks since their early stage (Settles, 2009). The primary objective is achieve comparable or superior performance while reducing the annotation cost. With the advent of pre-trained LLMs, recent studies (Ein-Dor et al., 2020; Yuan et al., 2020; Margatina et al., 2021; Yu et al., 2022) have successfully introduced active learning to minimize the amount of data required for fine-tuning. In the context of the ICL. paradigm, the standard ICL involves the random selection of training examples as prompts. However, it has been observed that the performance and stability of ICL can be enhanced by selecting high-quality exam- ples, which aligns with the concept of active data sampling. One common method is to retrieve se- mantically similar samples for each test query (Ru- bin et al., 2021; Liu et al., 2021; Hongjin et al., 2023), thereby enabling the utilization of instance- level prompts in downstream tasks. Another ap- proach involves retrieving task-level examples as prompts for all test samples, eliminating the need for instance-level retrieval. (Zhang et al., 2022) introduces reinforcement learning to learn gener- alized policy for example selection and (Chang and Jia, 2022) focuses carefully choosing training subsets to improve stability. However, previous studies either rely the performances of valida- tion sets as reward signals or require the training of additional models to score example candidates. contrast, our work centers on retrieving task- examples from unlabeled datasets for all test sam- ples, without the necessity of extra validation sets or the training of additional models.
To validate the effectiveness of our method, we conduct empirical evaluations across six classifica- tion datasets across three LLMs of varying model sizes. The experimental results demonstrate an average relative improvement of 14.3% on one- shot learning. It is important emphasize that proposed method is orthogonal to existing meth- ods such as calibration (Zhao et al., 2021) and re- ordering methods (Lu et al., 2022). Morcover, we demonstrate that our method can be combined with these approaches to achieve further improvements. Additionally, we analyze the relationship between data informative ability with the correctness of tar- get labels and find that data examples with high IG tend to rely more the accuracy of target labels. In summary, our contributions can be summa- rized as follows:
We investigate the relationship between data informative ability and ICL performance.
2.2 Confidence- ICL Selection
Confidence-based evaluation widely used for in-context examples. Prior works take the con- fident model outputs as in-context examples (Wan et al., 2023a) and search confident in-context exam- ple organizations in self-adaptive manner (Wu et al., 2023). In concurrent works, USP (Wan et al., 2023b) utilizes confidence- beasdddeeeeeeeeddddde prediction for pscudo-demos generation and also handles gen- eration tasks. LENS (Li and Qiu, 2023) proposed informative examples filtering and diversity-guide search method. Our work focuses on addressing the template bias of ICL selection by calibration before sampling.
We propose the use of Information Gain (IG) to measure the data informative ability and select demonstrations with maximum IG to enhance ICL performance.
We identify Template Bias and introduce the Calibration Before Sampling strategy to ad- dress it.
Our proposed method yields significant im- provements, achieving an average relative im- provement of 14.3% across six classification tasks using three LLMs.

---

Sampling Time
Review:
The film is strictly routine.
Callarated Prediction
Prediction 1
Sentiment:
Callbrated Prediction 2
Review:
[Candidate
Prediction
Sentiment:
Calibration Before Sampling
LLM
Review: [Candidate N]
Callbrated Prediction
Prediction N
Santiment:
Review: [Content-free Input]
Sentiment:
Template Blas
Maximum Information Gain
Prompt construction
Sampling
Test Time
Review: is strictly routine.
Sentiment:
Negative
Selected Samples & Annotation strictly routine, Negative)
Prediction
Positive
LLM
just loved every of this film.
Sentiment:
Figure overview of our proposed method. In Sampling Time, we construct zero-shot prompts, make predictions of example candidates, estimate Template Bias, perform calibration, and sample examples with maximum IG. In Test Time, we annotate selected samples and perform few-shot learning for test samples. [Candidate NJ denotes the N-th example in the Duntah. [Content-free Input] denotes the content-free strings Def-
3 Methodology
the IG as the information obtained in predicted label distribution Y when observing example candidate X Tbo in D unieb- Specifically,
3.1 Problem Statement
In this study, we focus problem setting that closely resembles true few-shot learning (Perez et al., 2021), which is retrieve prompts from an unlabeled text dataset, denoted as Duntab {- for a specific task. To accomplish it, we utilize a pre-trained LLM to make predictions on all candidate examples in Duntab. resulting in the corresponding prediction set y [y where Y: represents the normalized predicted label dis- tribution given input Tt. The goal is select subset { from Danigh. where K < N, in order to facilitate few-shot learning, specifically, K-shot learning. We annotate the chosen K ex- amples with their respective target labels y and construct taskllevel prompts using the input-label pairs and task-specific formats (See Appendix A.3 for details). The task-specific prompts are then in- corporated as the prefix sequences for test samples.
IG(Y, xob) H(Y) H (Y(
(1)
where HYY) represents the information entropy of Y and HY ( denotes the conditional entropy of Y given the observation Zob- However, comput- ing the exact value of IG xoss) is intractable due to the unknown HYY Fortunately, (Y) remains constant for given task, allowing us to reframe the problem of sampling examples with maximum IG as selecting those with minimum conditional entropy (Y||=ws). Specifically, considering the LLM parameterized by 0.
H HY((za)) - Σ Po (ab) log (v) (2)
DEY
However, is challenging to compute pe po(y) directly by inputting Fat into the LLM. Instead, we adopt the approach of constructing the zero- shot prompt. One example is shown in the prompt construction of Figure 2. We fill in the task tem- plate with text input only and utilize the LLM to make predictions. In other words, each example candidate is taken as test sample in zero-shot ICL. As such, po (ob) is actually approximated by Po (yl T), where T'' denotes the task tem- plate.
3.2 Information Gain
Information Gain (IG) serves metric quantify the amount of information obtained about a random variable through the observation of another random variable (Ash, 2012). In our context, to measure the informative ability of data examples, we define

---

3.3 Template Bias
leverage the content-free strategy (Zhao et al., 2021). We construct the zero-shot prompt using the task-specific template T and a set of content- free strings Day, which includes the empty string, "N/A" and "[MASK]". By averaging the output probabilities obtained from each content-free free string as input, followed by normalization o, we obtain,
Taking inspiration from (Zhao et al., 2021), we have observed that the predictive bias also persists even when solely providing the template as input to the LLM. In Figure 3, the red line illustrates the bias associated with the template we employed in SST-2. Notably, when presented with context-free input, the LLM exhibits a tendency for positive prediction with the possibility over 90%. We re- fer to this bias as Template Bias (See Appendix A.4 for more details). Essentially, it characterizes the inherent bias present in the zero-shot prompt, whereby the mere utilization of a template prompts the LLM to generate predictions that favor specific answers, in the absence of any demonstration.
Pef ( (Dod
Pa(ylxaf; ParEDas
Σ
(4)
Consequently, to correct the bias stemming from the template, we set W diag(PPr) and b to be the zero vector. The calibrated conditional entropy can be then computed as,
(Y = Σ Lool T) log go T)
NEY
0.1
D.7
piPositive)
The example depicted in Figure demonstrates that after calibration, the data sample located around the red line shifts to position near the balanced line with low IG (high conditional entropy).
Figure 3: Template Bias on SST-2. The "Raw" point refers to the one before calibration. The "Calibrated" point represents the after calibration. The balanced line (p=0.5) is bolded.
The algorithm of our proposed method can be summarized as follows.
3.4 Calibration Before Sampling
Algorithm Maximum Information Gain Sam-
We have observed that the presence of template bias may result in an unfair evaluation of the IG when sampling examples. For instance, the data example located near the red line in Figure 3, ex- hibits similar information to content-free input but demonstrates high IG (low conditional entropy). To mitigate this template bias, we propose Cali- bration Before Sampling strategy². This involves applying the linear transformation" (Platt et al.,
pling with Calibration Before Sampling
Input:
unlabeled dataset D Dunlab number examples to be sampled K, task-specific template T.
LLM 0
for x in Duntab do
Construct prompt for using T
Calculate po(y/ar, T) via LLM
Calculate Pef using Eq.4
1999; Guo et al., 2017) to the output probabilities p po(u T) to obtain calibrated probabilities q go (y) T). That is,
Calculate q via calibrating p using Eq.3
Evaluate IG via calculating H(Ylx) using Eq.5
a=
b)
33)
7: end for
Rank all examples in Duntab based on IG
where a denotes the normalization function, and the weight matrix W is constrained to be diagonal matrix, known as vector scaling. To estimate W.
Output:
Examples {2 with top K highest IG;
We use the term "Template Bias" to distinguish from the Bias discussed in (Zhao et al., 2021).
Experimental Setup
"We refer the contextual calibration method in (Zhao et al., 2021) colt-calibration. Calibration alone our paper refers to one before sampling proposed our work.
Evaluation Datasets. We experiment on six text classification datasets including binary sen- timent analysis SST-2 (Socher al., 2013), 6-way question classification TREC (Voorhees and Tice, 2000), 3-way textual entailment CB (De Marneffe
"We apply the transformation to the output probabilities, although is typically used for logits. The reason is that we only have access to the output probabilities of GPT-3 via OpenAl API, To maintain consistency across different I.M.ss we apply the same transformation for GPT-2 XL. and GPT-J.

---

LM
Method
SST-2
AGNews
TREC
CB
RTE
DBPedia
Avg
Random
59.713.2
39.610.3
27.15.9
28.616.1
53.41.1
51.214.1
43.3
MaxEntropy
72.210.4
12.58.1
25.76.5
25.019.8
52.61.4
30.714.1
41.5
GPT-2 1.5B
MaxIG
52.80.7
14.5
29.83.7
39.61.3
54.40.6
56.310.9
46.2
CBS MaxIG
85.82.3
32.912.4
29.75.0
39.61.3
53.91.0
50.818.5
48.8
Random
67.56.6
38.513.8
38.310.7
23.27.4
51.64.1
61.815.0
46.8
MaxEntropy
75.36.8
26.94.4
38.44.5
26.43.3
51.04.8
70.910.8
48.2
GPT-J 6B
MaxIG
65.55.3
35.511.6
34.36.1
31.82.9
55.33.6
64.17.2
47.8
CBS MaxIG
76.89.1
39.112.0
47.88.2
32.54.4
55.33.6
83.75.2
55.9
Random
87.33.7
62.80.8
54.81.8
39.330.4
56.50.5
79.75.7
63.4
MaxEntropy
96.50.5
63.00.0
58.72.0
38.42.7
62.80.7
80.0p.7
66.6
GPT-3 175B
MaxIG 92.53.5
72.32.3
62.74.0
41.10.0
59.83.8
81.50.8
68.3
CBS MaxIG
96.20.2
72.71.3
64.32.0
41.10.0
60.33.3
87.30.7
70.3
Table I: Main results for onc-shot learning. The last column shows the average accuracies across all tasks. We report the mean and standard deviation across different random seeds. The template each task fixed. We bold the best result among all selection methods for each task and each LLM.
et al., 2019), RTE (Dagan et al., 2006) from Su- perGLUE (Wang et al., 2019), 4-way topic classifi- cation AGNews (Zhang et al.. 2015), and 14-way DBPedia (Zhang et al., 2015). We use a fixed tem- plate (prompt format) for each dataset per (Zhao al., 2021). Detailed information regarding each dataset can be found in Appendix A.2.
ing set. Instead, we first randomly sub-sample N = 100 examples from the original training set to form the Duniab in our experiments. Subsequently, evaluate all the examples within Danlab and perform sampling from this subset. For each exper- iment involving GPT-2 XL and GPT-J, we report the results based on five different random seeds. For experiments involving GPT-3 davinci, we re- port results using two different random seeds. For evaluation, we sub-sample 300 samples of the test sets for all datasets as per (Zhao et al., 2021; Lu et al., 2022) due to limited resourees.
Models. For our experiments, employ three distinct LLMs with different sizes: GPT-2 XL (1.5B parameters), GPT-J (Wang and Komatsuzaki, 2021) (6B parameters), and GPT-3 davinci (Brown et al., 2020) (175B parameters). We get access to GPT-3 by using OpenAI API.
5 Results
5.1 Main Results
Baselines. In addition the Random base- line, which randomly selects demonstration ex- amples, we also incorporate the widely utilized uncertainty-battt based baseline MaxEntropy in active learning (AL) (Dagan and Engelson, 1995; Set- tles, 2009). The MaxEntropy baseline greedily selects the demonstration example with the high- est conditional entropy. The sampling objective of MaxEntropy is opposite that of our proposed method. We refer our initial IG-based method as MaxIG, while the variant that incorporates Cali- bration Before Sampling (CBS) denoted as CBS MaxIG.
One-shot Learning. Our main experiments are conducted in the case of one-shot learning to miti- gate potential confounding factors such as the or- dering of demonstrations that could influence per- formance outcomes. By focusing on one-shot learn- ing, we aim isolate the impact of data informa- tive ability on the performance ICL. The main results are presented in Table 1. In terms of the aver- age accuracies, our proposed method, CBS MaxIG, exhibits superior performances, achieving relative improvements of 12.7%, 19.4%, 10.9% over the random baseline for GPT-2 XL, GPT-J, and GPT-3 davinci, respectively. These results underscore the effectiveness of our proposed CBS MaxIG. Fur- thermore, when compared to the MaxIG approach, the Calibration Before Sampling strategy yields im- provements in performances for GPT-J and GPT-3
Other Details. We use the original ICL, namely the direct method, for all experiments in our work. order to manage the inference cost during sam- pling, we do not evaluate the entire original train-

---

Randon
Max
Accuracy (%)
PPPP
NPPP
PNPP
PPNP
PPPN
NNPP
NPNP
PNNP
NPPN
PNINN
PPNN
NNNP
NNPN
NPNN
PNINN
NNNN
Data Distribution
Figure 4: Four-shot performance comparison on SST-2 across different selection methods for different class balances and permutations. [P N NJ denotes two positive examples followed by two negative examples. We display the results for total of 16 distinct types of four-shot demonstrations. Within this set, 6 types balanced classes (highlighted in red), while the remaining 10 types are unhalanced classes (highlighted in blue).
davinei, suggesting that this strategy particularly beneficial for larger models. Notably, our MaxIG- based methods consistently outperform the Ran- dom and MaxEntropy baselines, demonstrating the effectiveness of sampling examples with maximum IG and substantiating the validity of employing IG metric for evaluating data informative ability.
stronger influence on the performance. We leave comparing the impact of these different factors as future work. Overall, our experimental findings underscore the significance of the data informative ability and demonstrate the efficacy of our method in selecting the most informative data to enhance performance in scenarios involving more than demonstration.
Four-shot Learning. To further evaluate our method for few-shot learning, we extend our exper- iments to the four-shot learning scenario on SST-2 using GPT-2 XL. We consider all possible combi- nations of class balances and permutations for the four-shot case*, which encompass varying label dis- tributions and orders. For each type, data examples are selected using Random, MaxEntropy, MaxIG, and CBS MaxIG methods respectively. This ex- perimental design allows us examine the im- pact of data informative ability, given that the class balance and order are fixed for one specific type. The results are presented in Figure 4. We observe that our proposed CBS MaxIG consistently outper- forms all baselines in 13 out of 16 cases. For the remaining cases (PPPP, PPPN, and NNNN), conjecture that factors other than data informative ability, such as the label distribution, may exert
5.2 Integration with Existing Methods
In order to demonstrate that our method is or- thogonal to prevailing techniques such as the post- calibration method and the order probing method, and illustrate their collaborative potential with our approach, we conduct experiments two datasets, namely SST-2 (binary classification) and DBPedia (14-classification)) for comparative analysis.
Integration with Post-Calibration. To assess the performance of our method in conjunction with post-calibration, we compare the outcomes of Random and CBS MaxIG approaches on one- shot learning across three LLMs. The results, pre- sented in Table 2, reveal that by employing post- calibration the selected examples using CBS MaxIG, superior performance is achieved com- pared to random selection, across different model sizes. Furthermore, it is observed that our method without post-calibration achieves comparable or even superior results to the post-calibration coun-
'To sample data from different classes, we assume we have access to the target labels of the training set in this experiment. In our initial prohlem setting, we do not need the target lahels during the sampling process.

---

SST-2
DBPedia
SST-2
DBPedia
GPT-2 1.5B
GPT-2 1.5B
Random (C)
76.71.8
68.38.7
MaxEntropy
12.2
30.714.1
CBS MaxIG
85.82.3
50.818.5
CBS MaxEntropy
53.11.7
32.013.0
CBS MaxIG (C)
74.53.9
13.5
GPT-J 6B MaxEntropy
GPT-J 6B
75.3
10.9
Random (C)
88.61.6
76.93.4
CBS MaxEntropy
73.516
54.914.2
CBS MaxIG
76.89.1
83.75.2
GPT-3 175B
CBS MaxIG (C)
94.50.6
86.70.8
MaxEntropy
96.50.5
80.00.7 78.23.8
GPT-3 175B
CBS MaxEntropy
88.23.8
Random (C)
95.8p.s
83.53.5
CBS MaxIG
96.20.2
87.30.7
Table 3: Ablation on Calibration Before Sampling for MaxEntropy in one-shot learning.
CBS MaxIG (C)
96.20.2
86.50.8
Table 2:
One-shot performance using post calibration. C denotes the sampling method using post-calibration.
tribute more significantly to enhancing the perfor- mance of the Random baseline compared to our CBS MaxIG approach, thereby suggesting that our proposed method more robust to order and bias factors in comparison the Random baseline.
terpart specifically for GPT-3 davinci, thereby af- firming the effectiveness of our proposed approach.
5.3 Ablation on Calibration Before Sampling
100.0
Although the results in Table 1 demonstrate the effectiveness of our Calibration Before Sampling strategy, should be noted that the evaluation the MaxEntropy method may also be subject to bias introduced by the template utilized, as the cal- culation of conditional entropy relies on the output distribution of the LLM. To ensure fair assess- ment, we apply the same Calibration Before Sam- pling strategy to the MaxEntropy method, named CBS MaxEntrropy and report the corresponding one-shot outcomes of SST-2 and DBPedia Table 3. Notably, a significant decline in performance is observed across all three LLMs, with the exception of DBPedia when employing GPT-2 XL. The per- formance degradation can be attributed to the fact that examples selected by MaxEntropy may not have the highest entropy. Instead, these examples could correspond to the ones with high IG after calibration. Conversely, examples located near the Template Bias line Figure are the ones with high entropy after calibration, and CBS MaxEn- tropy selects those examples. We emphasize this observation as it further reinforces the superiority of our proposed MaxIG- based sampling methods the MaxEntropy based approaches. This in- sight highlights that the MaxEntropy method from conventional active learning, which relies on pa- rameter updates, is not perfectly suitable for ICL. where parameters remain static. In such cases, cer- tain examples with high IG contribute more sig-
95.0
H
Pcuntty
00.0
85.0
40.0
Inbal
Rocnder
Past
Rooider Cal
Figure 5: Four-shot performance comparison four- shot learning SST-2 using GPTTJ. "Initial" represents the original one. "Reorder" denotes the order probing method, and "Post Cal" indicates the post-calibration method, "Reorder Post Cal" represents the combina- tion of order probing followed by post-calibration.
Integration with Order Probing. To assess the performance of Random and CBS MaxIG meth- ods in conjunction with order probing and post- calibration for four-shot learning using GPT-J, first sample four examples using Random and CBS MaxIG methods respectively. Subsequently, we perform ordering probing and sample the permu- tation with maximum global entropy on the prob- ing s The results, depicted in Figure 5, reveal that ordering probing improves the performance for both sampling methods. Furthermore, it is discov- ered that order probing and post-calibration con-
'Note that we naively sample the examples with the top- four highest without considering label distribution "We utilize the glohal entropy metric due to its superior performance in the original paper (Lu et al., 2022).

---

Method
Gold
Random
Drop( (%)
SST-2
DBPedia
SST-2
75
82,5
Random 67.66.6
66.78.5
1 1.2%
80.0
Accuracy
70
77.5
CBS MaxIG
76.8
67.45.3
12.2 %
75.0
65
DBPedia
CBS MaxiG
72.5
CBS Maxid
Random
Random
Random 61.815.0
50.3g.1
18.6%
70.0
2 Top-K
3
2 Top-K
CBS MaxIG
83.75.2
36.311.6
56.6%
Table 4: One-shot performance using demonstrations with gold and random labels. The last column shows the percentage of performance drop.
Figure One-shot performance of examples with the Top-K highest IG on SST-2 and DBPedia using GPT-J.
presented in Figure 6, together with Random baseline depicted with dashed lines. The experi- mental findings demonstrate that demonstrations with high IG consistently outperform the Random baseline, thereby reinforcing the significance em- ploying MaxIG-based sampling. Notably, it is ob- served that the demonstration with the third- hhirh-ighesst IG outperforms the one with the second-higee highest IG. We attribute this discrepancy to potential errors in estimating the IG, which may arise from the utiliza- tion of the content-free strategy.
nificantly to ICL compared to uncertain examples with high entropy. The distinction between ICL and traditional active learning settings, and how this distinction influences the choice of sampling strategy, warrants further investigation in future work.
6 Analysis
6.1
Gold Labels vs. Random Labels
Since our sampling process from the unlabeled training set involves no utilization of target labels, it is pertinent to examine whether the highly infor- mative data derived from can benefit from the gold labels, as inspired by (Min et al., 2022). In this experiment, we compare the performance of using demonstrations selected by the Random baseline and our CBS MaxIG approach in one-shot learning using GPT-J. For each demonstration, we replace the gold label with a random label from small discrete set of possible labels, and evaluate the per- formance accordingly. The results are presented in Table 4.
7 Conclusion
In this study, we have highlighted the significance of the data informative ability in ICL. We have demonstrated that data samples with varying infor- mative abilities, even when subjected to the same imput distribution, order and prompt formats, make distinct contributions to the overall performance of ICL. To address this, we draw inspiration from information theory and proposed to quantify the informative ability by evaluating the information gain of data samples. Moreover, we identify the presence of template bias, which could introduce unfairness in the evaluation of IG. To mitigate this bias, we introduce the Calibration Before Sampling strategy. Through extensive experiments, we have validated the efféctiveness of the proposed maxi- mum information gain sampling strategy and cal- ibration before sampling strategy. This validation underscores the reliability of measuring informa- tive ability based on information gain. Furthermore, our experimental findings illustrate that our method is orthogonal to existing approaches and can syner- gistically collaborate with them to achieve further performance improvements. We hope that work can provide valuable guidance for the development of data-efficient methods and facilitate the explo- ration of enhanced data-centric approaches for ICL in the future.
We observe a substantial decrease in perfor- mance when the gold labels are substituted with random labels for demonstrations selected by CBS MaxIG, whereas the drop comparatively smaller for those randomly selected. This observation sug- gests that highly informative data heavily rely on the presence of accurate labels. We posit that pro- viding incorrect labels for highly informative data may lead to confusion within the LLM and subse- quently result in diminished information gain.
6.2 Consistency of Examples with High IG
In order to assess the consistency of performance across other examples with high IG, we individu- ally select the examples with the top-K highest IG values and utilize them as demonstrations in one- shot learning. The results for each selected example

---

Limitations
References
There are several limitations to consider in our work. Firstl, we focus solely on text classifica- tion tasks where the information gain can be well- defined based on the prediction distribution and tractable conditional entropy. Future research could extend our experiments to generation tasks. How- ever, this extension poses challenges as it requires a tractable definition of information gain for out- put distributions that contain open words and have variable lengths.
Robert B Ash. 2012. Information theory. Courier Cor-
poration.
Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. 2015. A large amno- tated corpus for learning natural language inference. In Proceedings of the 2015 Conference Empiri- cal Methods in Natural Language Processing, pages 632-642, Lishon, Portugal. Association for Compu- tational Linguistics.
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal. Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. Advances neural information processing systems, 13:1877-1901.
Additionally, our sampling process does not ex- plicitly consider the diversity of examples. Instead, we prioritize the data informative ability and con- duct experiments in shot and four-shot scenar- ios where diversity is not as significant as in other cases with the goal of sampling many samples. Ex- ploring methods to incorporate diversity during the sampling process is of importance for future work. Another limitation lies the model-aware eval- uation of information gain, which relies on the specific LLM used. This implies that the evalua- tion results cannot be directly applied to different models. When using a new model, the informa- tion gain for each example needs to be recomputed, which incurs additional computational cost. More- over, the computational cost depends on the size of the training data pool, as each candidate example in the pool needs to be evaluated. Although the parameters of LLMS do not need to be updated, the repeated inferences still consume substantial computational resources, particularly when dealing with extremely large LMs.
Ting- Yun Chang and Robin Jia. 2022. Careful data curation stabilizes in-context learning, arXiv preprint arXiv:2212.10378.
Christopher Clark, Kenton Lee, Ming- Wei Chang, Tom Kwiatkowski, Michael Collins, and Kristina Toutanova. 2019. BoolQ: Exploring the surprising difficulty of natural yes/no questions. In Proceedings of the 2019 Conference of the North American Chap- ter of the Association for Computational Linguisties: Human Language Technologies, Volume I (Long and Minneapolis, Min-
Short Papers), pages nesota. Association for Computational Linguistics.
Ido Dagan and Sean P Engelson. 1995, Committec- based sampling for training probabilistic classifiers. In Machine Learning Proceedings 1995, pages 150- 157, Elsevier.
Ido Dagan, Oren Glickman, and Bernardo Magnini. 2006. The pascal recognising textual entailment chal- lenge. In Machine Learning Challenges. Evaluat- ing Predictive Uncertainty, Visual Object Classifi- cation, and Recognising Tectual Entailment: First PASCAL Machine Learning Challenges Workshop, MLCW 2005, Southampton, UK, April 11-13, 2005, Revised Selected Papers, pages 177-190. Springer.
A Acknowledgements
We thank anonymous reviewers for their valuable feedback on the paper. We also thank Hengguan Huang and Yisong Miao for their helpful discus- sions.
Marie-Catherie De Marneffe, Mandy Simons, and Ju- dith Tonhauser. 2019. The commitmenthank: Inves- tigating projection in naturally occurring discourse. In proceedings of Sinn und Bedeutung, volume 23. pages 107-124.
Jacob Devlin, Ming-Was Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre- Pre-training of deep bidirectional transformers for language under- standing. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguisties: Human Language Tech- nologies, Volume (Long and Short Papers), pages 4171-4186, Minneapolis, Minnesota. Association for Computational Linguistics.
Liat Ein-Dor, Alon Halfon, Ariel Gera, Eyal Shnarch, Lena Dankin, Leshem Choshen, Marina Danilevsky.

---

Ranit Aharonov, Yoav Katz, and Noam Slonim. 2020. Active Learning for BERT: An Empirical Study. In Proceedings of the 2020 Conference Empirical Methods Natural Language Processing (EMNLP), pages 7949-7962, Online. Association for Computa- tional Linguistics.
John Platt al. 1999. Probabilisttic outputs for support vector machines and comparisons to regularized like- lihood methods. Advances in large margin classifiers, 1063):11-7.
Ohad Rubin, Jonathan Herzig, and Jonathan Berant. 2021. Learning to retrieve prompts for in-context learning, arXiv preprint arXiv:2
Tianyu Gao, Adam Fisch, and Danqi Chen. 2021. Making pre-trained language models better few-shot learners. In Proceedings of the 59th Annual Meet- ing of the Association for Computational Linguistics and the 11th International Joint Conference on Natu- ral Language Processing (Volume I: Long Papers), pages 3816-3830, Online. Association for Computa- tional Linguistics.
Burr Settles. 2009. Active learning literature survey.
Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang. Christopher D. Manning, Andrew Ng. and Christopher Potts. 2013, Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 Conference Empiri- cal Methods in Natural Language Processing, pages 1631 1641, Scattle, Washington, USA. Association for Computational Linguistics.
Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q Wein- berger. 2017. On calibration of modern neural net- works. In International conference on machine learn- ing, pages 1321-1330. PMLR.
Ellen M Voorhees and Dawn M Tice. 2000. Building question answering test collection. Proceedings of the 23rd annual international ACM SIGIR confer- ence on Research and development in information retrieval, pages 200-207.
SU Hongjin, Jungo Kasai, Chen Henry Wu, Weijia Shi, Tianlu Wang, Jiayi Xin, Rui Zhang, Mari Ostendorf, Luke Zettlemoyer, Noah Smith, et al. 2023. Selec- tive annotation makes language models better few- shot learners. In The Eleventh International Confer- ence on Learning Representations.
Xingchen Wan, Ruoxi Sun, Hanjun Dai, Sercan Arik, and Tomas Pfister. 2023a. Better zero-shot reasoning with self-adaptive prompting. In Findings of the As- sociation for Computational Linguistics: ACL 2023, pages 3493-3514, Toronto, Canada. Association for Computational Linguistics.
Xiaonan Li and Xipeng Qiu. 2023. Finding support- ing examples for in-context learning, arXiv preprint arXiv:2302.13539
Jiachang Liu, Dinghan Shen. Yizhe Zhang, Bill Dolan, Lawrence Carin, and Weizhu Chen. 2021. What makes good in-context examples for gpt-3? arXiv preprint arXiv:2101.00 .06804.
Xingchen Wan, Ruoxi Sun, Hootan Nakhost, Han- jun Dai, Julian Martin Eisenschlos, Sercan O Arik, and Tomas Pfister. 2023b. Universal self-adaptive prompting. arXiv preprint arXiv:2305. 14926.
Yao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel, and Pontus Stenetorp. 2022. Fantastically ordered prompts and where to find them: Overcoming few- shot prompt order sensitivity. In Proceedings of the 60th Annual Meeting of the Association for Compu- tational I Linguistics (Volume 1: Long Pupers), pages 8086-809 8098, Dublin, Ireland. Association for Compu- tational Linguistics.
Alex Wang, Yada Pruksachatkun, Nikita Nangia, Aman- preet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2019. Superglue: A stick- ier benchmark for general-purpose language under- standing systems. Advances in neural information processing systems, 32.
Katerina Margatina, Giorgos Vernikos, Loic Barrault, and Nikolaos Aletras. 2021. Active learning by ac- quiring contrastive examples. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 650-663, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
Ben Wang and Aran Komatsuzaki. 2021. Gpt-j-6b: A 6 billion parameter autoregressive language model.
Adina Williams, Nikita Nangia, and Samuel Bowman. 2018. A broad-coverage challenge corpus for sen- tence understanding through inference. In Proceed- ings of the 2018 Conference of the North American Chapter of the Association for Computational Lin- guistics: Human Language Technologies, Volume (Long Papers), pages 11 12-1122, New Orleans, Louisiana. Association for Computational Linguis- tics.
Sewon Min, Xinxi Lyu, Ari Holtzman, Mikel Artetxe. Mike Lewis, Hannanch Hajishirzi, and Luke Zettle- moyer. 2022. Rethinking the role of demonstrations: What makes in-context learning work? In Proceed- ings of the 2022 Conference Empirical Methods in Natural Language Processing, pages 11048-1 11048-11066 11064,
Zhiyong Wu, Yaoxiang Wang, Jiacheng Ye, and Ling- peng Kong. 2023. Self-adaptive in-context learn- ing: An information compression perspective for in- context example selection and ordering. Proceed- ings of the 61 Annual Meeting of the Association for Computational Linguistics (Volume I: Long Papers), pages 1423-1436, Toronto, Canada. Association for Computational Linguistics.
Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
Ethan Perez, Douwe Kiela, and Kyunghyun Cho. 2021. True few-shot learning with language models. Ad- vances in neural information processing systems, 34:11054 101110---1770..

---

Yue Yu. Rongzhi Zhang, Ran Xu, Jieyu Zhang, Ji- aming Shen, and Chao Zhang. 2022. Cold-start data selection for few-shot language model fine-tuning: prompt-based uncertainty propagation approach. arXiv preprint (rXiv:2009006995
Dataset
# Classes
# Train
# Eval
SST-2
2
6920
1821
AGNews
4
120k
7.6k
TREC
6
5452
500
CB
3
250
56
Michelle Yuan, Hsuan- Lin, and Jordan Boyd- Graber, 2020. Cold-start active learning through self- supervised language modeling. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 7935-7948, Online. Association for Computational Linguisties.
RTE
2
2490
277
DBPedia
14
420k
70k
MNLI
3
392k
9815
SNLI
3
549k
9842
BoolQ
2
9247
3270
Xiang Zhang, Junbo Zhao, and Yann LeCun. 2015. Character-level convolutional networks for text classi- fication. Advances in neural information processing systems, 28.
Table 5: Statistics of evaluation datasets.
Yiming Zhang. Shi Feng. and Chenhao Tan. 2022. Ac- tive example selection for in-context learning. In Pro- ceedings of the 2022 Conference on Empirical Meth- ods in Natural Language Processing, pages 9134 9148, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
A.3
Template details for different tasks
We show the templates used and corresponding label mappings for different tasks in Table
A.4 Template Bias for different tasks across three LLMs
Zihao Zhao, Eric Wallace, Shi Feng, Dan Klein, and Sameer Singh. 2021. Calibrate before use: Improv- ing few-shot performance of language models. In In- ternational Conference Machine Learning, pages 12697-12706. PMLR.
We plot the Template Bias of templates used for all tasks across three LLMs in Figure 7 and Fig- ure 8. It is observed that the template bias persists across different tasks and across LLMs with vary- ing model sizes.
A Appendix
A.1
Implementation Details
A.5 More experiments
We use Pytorch and Huggingface Transformers in our implementation. We run all our evaluations on a single NVIDIA A40 GPU (48G). Our exper- iments should be also run on one single GPU of 24G. We access GPT-3 via the OpenAl API?.
We consider broader NLI and commonsense soning tasks. Specifically, we conducted addi- tional ohe- experiments on 3-way classification MNLI, 3-way classification SNLI, and 2-way clas- sification BoolQ using GPT-J 6B. We evaluate them with the same setting in the main experiments. Ta- ble 6 shows the performance comparison between our method and baselines. It is observed that ICL without additional reasoning techniques performs poorly on MNLI, SNLI, and BoolQ. which aligns with prior work (Chang and Jia, 2022; Hongjin et al., 2023). Nevertheless, our proposed method still outperforms other baselines on all three tasks.
For experiments of GPT-2 XL in Table 1, we re- run the Random baseline due to differences in the training mentioned in the repository Neverthe- less, our reimplemented results similar those reported in (Zhao et al., 2021). Therefore, we re- port the reimplemented ones for a fair comparison with our proposed method.
A.2 Dataset Details
We show the statistics of datasets Table 5. For SST-2 (Socher et al., 2013), AGNews (Zhang et al., 2015), TREC (Voorhees and Tice, 2000), and DB- Pedia (Zhang al., 2015), we use their official test sets. For CB (De Marneffe et al., 2019), RTE (Da- gan al., 2006), MNLI (Williams al., 2018), SNLI (Bowman al., 2015), and BoolQ (Clark al., 2019), we use their original validation sets as test sets.
Method Random
MNLI
SNLI
BoolQ
35.97.1
33.70.0
58.3g.5
MaxEntropy
35.15.2
37.51.3
61.12.7
MaxIG
36.15.
37.12.5
56.64.
CBS MaxIG
38.35.5
40.73.2
61.127
Table One-shot performance on MNLI, SNLI, and BoolQ using GPT-J.
'https://pemai.cco//

---

Prompt Template
Label Mapping
Review: The movie desperate misculculation.
Sentiment: Negative
2
Positive, Negative
Sentiment:
Article: Teronto Raptors Team Repurt November 20orSs Network) - The Teronto
Raptons found theuselves on the wrong end of 101-94 decision against the red-bot Canada Centre.
Scatile SuperSonics on Friday
Answer: Sports
World, Sports, Business, Technology
Article: Pioneer replaces plasma power supplics, Certain Pioneer TV's faulty power supply. An upgrade available.
Answer:
Clasily the questions based on whether their answer type is Number, Location, Person. Description, Eatily, or Abbreviation.
Question: Where is South Bend ? Answer Type: Location
Number, Location, Person, Description, Entity, Abbrevistion
TREC
Question: How many colors there the spectrum Answer Type:
Clasify the documents based whether they are about Company, School, Artist, Athlete,
Politicion, Transportation. Building. Nature, Village, Animal, Plant, Albom, Film, or Book.
Company, School, Artist, Athlete, Politician. Transportation, Building. Village, Animal. Plant, Album, Film, Book
Article: Al Gamil privately held company based in Djibouti City Djibouti.
DBPedia
Answer: Company
Article: Imperial Rotanical Reach Hotel hatel in Fintchhe Uganda.
Answer:
Richard Breeden hadn't noticed that new desk had just four telephane lines and one phone.
Richard Breeden'ss new just telephone lines one phone. True, False, Neither?
question:
answer: True
True, False, Neither
good though say it myself."
be involved this kind of nauseous business.
question: she has to be involved in this kind of nauseous business. True, False, or Neither?
answer:
your furnishing Iika home. True or False!
affordable
question:
answer: False
brief vacation some priest
Christmas
go
retrest monsstery, Law, reading from brief statement. told reporters. question: Law said he plans to take a brief vacation after Christaus and later retreal to monastery. True False?
Table 7: Prompt template and label mapping for different tasks.

---

GPT-2 XL 1.5B
GPT-J 6B
GPT-3 davinci 175B
1.0
1.0
1.0
0.8
0.8
0.8
Probability
Probability
Probability
0.6
0.6
0.6
0.4
0.4
0.4
0.2
0.2
0.2
0.0
0.0
0.0
2
2
Label ID
Label ID
Label ID
(a) Template Bias SST-2. Label Dictionary 1: Negative, Positive
GPT-2 XL 1.5B
GPT-J 6B
GPT-3 davinci 175B
1.0
1.0
1.0
0.8
0.8
0.8
Probability
Probability
Probability
0.6
0.6
0.6
0.4
0.4
0.4
0.2
0.2
0.2
0.0
0.0
0.0
2
2
4
Label ID
Label ID
Label ID
(b) Template Bias of AGNews. Label Dictionary 1: World, 2: Sports, Business, 4:Tcchnllogy
GPT-2 XL 1.5B
GPT-J 6B
GPT-3 davinci 175B
1.0
1.0
1.0
0.8
0.8
0.8
Probabiity
Probability
Probability
0.6
0.6
0.6
0.4
0.4
0.4
0.2
0.2
0.2
0.0
0.0
0.0
4
5
6
2
3 4 5
6
1 2
3
4
5 6
Label ID
Label
Label
(c) Template Bias of TREC. Label Dictionary 1: Number, 2: Abbreviation
Location, 3: Person, 4: Description, 5: Entity, 6:
Figure 7

---

GPT-2 XL 1.5B
GPT-J
GPT-3 davinci 175B
1.0
1.0
1.0
0.8
0.8
0.8
Probability
Probability
Probability
0.6
0.6
0.6
0.4
0.4
0.4
0.2
0.2
0.2
0.0
0.0
0.0
1
2
Label ID
Label ID
Label ID
(a) Template Bias CB. Label Dictionary True, False, Neither
GPT-2 XL 1.5B
GPT-J 6B
GPT-3 davinci 175B
1.0
1.0
1.0
0.8
0.8
0.8
Probability
Probability
Probability
0.6
0.6
0.6
0.4
0.4
0.4
0.2
0.2
0.2
0.0
0.0
0.0
2
2
Label ID
Label ID
Label
(b) Template Bias of RTE. Label Dictionary 1: True, 2: False
GPT-2 1.5B
GPT-J 8B
GPT-3 davinci 1758
0.8
0.8
0.8
0.8
0.8
0.0
0.0
Label
Label
Label
(c) Template Bias DBPedia. Label Dictionary Company, School, Artist, Athlete, Politician, Transportation. Building, Nature, 9: Village, 10: Animal, 11: Plant. 12: Album, Film, Book
Figure 8


Reviews:
[{"review_id": "0RVwk8UJYB", "reviewer": "Reviewer_wbuo", "summary": "", "questions": "- IG is an interesting quantity to optimize. It is then sort of natural to ask, whether it wouldn't be possible to optimize it more directly using prompt tuning techniques. Is this something that the author considered?\n- It seems that it should be relatively straight-forward to adapt Algorithm 1 so as to approximately jointly take into account multiple examples in the few-shot learning setting by iteratively greedily growing the prompt one shot at the time. This will come at the cost of running through the unlabeled dataset n_{shots} number of times. Did the authors consider this? This would only make sense if the gain in terms of ICL performance justifies the additional computation.", "limitations": "", "rating": 4, "confidence": 3, "soundness": 3, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "- Straight-forward but interesting connection between ICL and active learning\n- Paper identifies a phenomenon that is termed \"template bias\" which consists in a systematic shift in the distribution of outputs in few-shot ICL due to the template itself, and propose a calibration procedure to mitigate that problem. This seems like an observation that could have some interesting implications in prompt-engineering more in general.\n- The Information Gain method proposed in the paper demonstrates a substantial relative improvement of 14.3% in the six ICL classification tasks where its demonstrated.", "reasons_to_reject": "- As also clarified in the limitations section, the method is limited to classification tasks, and it is not clear how it could be extended to other settings such as text generation.\n- The algorithm proposed in the paper quantifies information gains for each samples independently. Accordingly, in its few-shot incarnation the information gain of each sample is computed in isolation, as opposed to jointly, i.e. taking into account the information gain of entire set of samples. This might leave some performance on the table.", "questions_to_authors": "- IG is an interesting quantity to optimize. It is then sort of natural to ask, whether it wouldn't be possible to optimize it more directly using prompt tuning techniques. Is this something that the author considered?\n- It seems that it should be relatively straight-forward to adapt Algorithm 1 so as to approximately jointly take into account multiple examples in the few-shot learning setting by iteratively greedily growing the prompt one shot at the time. This will come at the cost of running through the unlabeled dataset n_{shots} number of times. Did the authors consider this? This would only make sense if the gain in terms of ICL performance justifies the additional computation.", "paper_topic_and_main_contributions": "This paper examines a few-shot in-context learning (ICL) setting, focusing in particular on the problem of finding samples to be labeled that would be as informative as possible when used as demonstrations to prompt an LLM.\nThe paper proposes a method to quantify the information gain of a sample. Accordingly, the top K samples will be annotated and used to build the prompt for few-shot ICL. In addition, this paper identifies the phenomenon of \"template bias\" that consists in a predictive bias due by the template that is used to build the prompt, and proposes a calibration method to mitigate this problem. The combination of methods is then benchmarked on 6 classification tasks with 3 LLMs and compared to a few natural baselines.\n\n### Post-rebuttal change\n* Raised Excitement to Strong", "excitement": 4, "reproducibility": 4, "ethical_concerns": "No", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "fOSfasQI7r", "reviewer": "Reviewer_iLKr", "summary": "", "questions": "1. Could you provide some clarification regarding the definition of Y in Sec. 3.2? As per Eq.2, Y appears to represent the prediction distribution for $x_{ob}$, rather than the label distribution in the test dataset. Assuming this is accurate, could you elaborate on how this information gain (i.e., reducing uncertainty on its own prediction given certain LLM) could indicate the informativeness of $x_{ob}$ in enhancing the predictive performance on samples from the testing dataset? If my interpretation is incorrect, could you please explain the correct understanding of this concept?\n\n2. The findings presented in Figure 5 suggest that the proposed method, even without calibration, can yield results comparable to those achieved with calibration. The calibration technique [1] is specifically intended to counteract various biases that may arise during in-context learning in language models. Nevertheless, it seems that no measures were implemented in the proposed method to address these biases. Could you clarify what factors might be contributing to the proposed method's apparent capacity to mitigate these biases?", "limitations": "", "rating": 2, "confidence": 4, "soundness": 2, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "1. The proposed method boasts cost-efficiency as a key advantage. The selection of demonstration examples is determined solely by the task and template, circumventing the need for selecting new demonstration examples for each incoming test sample. Additionally, there is no need for a large annotated dataset as annotations are required only for the examples once they have been chosen. \n\n2. The idea of using information gain to measure the value of demonstration examples sounds interesting. ", "reasons_to_reject": "1. The proposed method, as described in the methods section, lacks sufficient detail and clarity. See Questions 1 below for detail.\n\n2. This work appears to be missing a comparative analysis with contemporary methods in the field. Even though the authors have considered the MaxEntropy method, there is an absence of referenced literature that could verify its effectiveness in in-context learning scenarios. Additionally, from an active learning perspective, choosing samples with maximum entropy in low-resource conditions (where only a limited number of samples can be selected) may not be the most optimal approach [1]. The absence of comparisons with effective, proven methods makes it difficult to accurately assess the relative efficiency, effectiveness, and innovation of your proposed method.\n\n3. There is a potential issue in the experimental setup that can cause bias in the evaluation. In one-shot in-context learning, the model output can be influenced by the majority label bias [2], where the majority label bias leads the model to predict training answers that frequently appear in the prompt (i.e., the label of the selected one-shot example). The absence of a countermeasure for this bias, especially given that the majority of experiments in this work are conducted under a one-shot learning scenario, raises questions about the accuracy of the results.\n\n[1] Hacohen, G., Dekel, A., & Weinshall, D. (2022). Active learning on a budget: Opposite strategies suit high and low budgets. arXiv preprint arXiv:2202.02794.\n[2] Zhao, Z., Wallace, E., Feng, S., Klein, D., & Singh, S. (2021, July). Calibrate before use: Improving few-shot performance of language models. In International Conference on Machine Learning (pp. 12697-12706). PMLR.", "questions_to_authors": "1. Could you provide some clarification regarding the definition of Y in Sec. 3.2? As per Eq.2, Y appears to represent the prediction distribution for $x_{ob}$, rather than the label distribution in the test dataset. Assuming this is accurate, could you elaborate on how this information gain (i.e., reducing uncertainty on its own prediction given certain LLM) could indicate the informativeness of $x_{ob}$ in enhancing the predictive performance on samples from the testing dataset? If my interpretation is incorrect, could you please explain the correct understanding of this concept?\n\n2. The findings presented in Figure 5 suggest that the proposed method, even without calibration, can yield results comparable to those achieved with calibration. The calibration technique [1] is specifically intended to counteract various biases that may arise during in-context learning in language models. Nevertheless, it seems that no measures were implemented in the proposed method to address these biases. Could you clarify what factors might be contributing to the proposed method's apparent capacity to mitigate these biases?", "paper_topic_and_main_contributions": "This study addresses the challenge of demonstration selection in in-context learning. It introduces a novel approach that employs information gain (IG) as a measure to quantify the informativeness of potential examples. The most informative candidates are then selected as demonstration examples within the in-context learning paradigm. Findings indicate that the proposed method typically outperforms baseline approaches in terms of performance.", "excitement": 2, "reproducibility": 3, "ethical_concerns": "No", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "AfzTBT3ugY", "reviewer": "Reviewer_CxLY", "summary": "", "questions": "Please address my concerns in *Reasons to Reject*.", "limitations": "", "rating": 3, "confidence": 4, "soundness": 4, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "- ICL has become one of the dominant learning paradigms for NLP, and this paper thus addresses an important problem.\n- The methodology design is convincing. Both components of the suggested approach (calibration and ICL selection) are reasonable and intuitive, and the method can be applied in a black-box setting 1) without the need to access model parameters except for the output logits, 2) is capable of working in a zero-shot setup without accessing labels. These are other pluses of the proposed method.\n- Experimental validation is largely thorough, and it is nice that the authors have also added several analyses and experiments combining their methods with existing methods to show further enhancements. I have some concerns, though, as listed in the section below.", "reasons_to_reject": "1. The paper makes three main contributions, namely 1) that ICL is sensitive to random demo selection, 2) ICL selection based on entropy and 3) calibration before sampling. On Point 1, I feel that this is largely expected in light of existing findings that models can be sensitive to even the orders of the examples (which the authors cite) -- I'd tend to think that using *different demos* is a larger source of uncertainty compared to *demos of different order*, so it's unsurprising that randomly sampling demos lead to large variance.\n\n\n   On 2) and 3), while combining ICL selection and calibration may be new, each of the components is not, and similar ideas have been previously explored. For the first component, the authors are essentially proposing to leverage the low-entropy / high-confidence predictions from the models, and similar ideas have been explored in a number of previous works like [1], where the authors fine-tune the LLMs on the confident outputs based on self-consistency to self-improve. [2] is more directly related, where the authors use confident outputs as in-context examples. [3] is a concurrent work, and the use of USP in the CLS case is almost identical to the proposed method in this paper, but USP also handles additional generative tasks and can work even without accessing the logits in some cases. On the calibration part, the authors essentially lift the CC technique for selection -- while the authors try to distinguish their usage from the one proposed in Zhao et al., 2021, I feel that CC is still essentially used in the same way except that the outputs are now used to compute entropy rather than generating outputs directly.  \n\n   Note that I recognize that [2] and [3] are considered contemporaneous to this work, and I have *not* penalized the authors for not discussing them. However, I'd still encourage the authors to discuss the relation with respect to these works when they have a chance to revise their paper.\n\n2. In terms of experiments, I have some suggestions for further improvement: \n\n- In addition to random sampling, there are other suggested approaches for ICL selection, including but not limited to nearest neighbour retrieval (Liu et al., 2021 -- cited in the paper) and diversity based on clustering [4]. I think these are nice to have, even though Liu et al., 2021 and [4] work in slightly different setups ( Liu et al., 2021 assume the availability of golden labels, and [4] is originally proposed for chain-of-thought tasks, like [2], but I think it's easy to adapt the idea of [4] into general tasks) -- note that given the difference in setup, I do not deem the lack of comparison to these works as major weaknesses against the authors. \n- It might be beneficial to consider a wider range of tasks outside general classification -- there are ample examples in the GPT-3 paper, for example, where the authors consider broader NLI and commonsense reasoning tasks.", "questions_to_authors": "Please address my concerns in *Reasons to Reject*.", "paper_topic_and_main_contributions": "This paper starts by making the observation that randomly selecting in-context examples leads to high variance in performance, similar to previous observations that shuffling example order leads to performance fluctuation. The authors then propose to select in-context learning examples from unlabeled data with low output entropy (or equivalently high information gain) and use the LLM predictions on these data as in-context examples. The authors further make the observation that the template sometimes induces bias, and they propose calibrating output logits with the CC technique from Zhao et al, 2021 before computing the entropy. They then evaluate several classification tasks on various GPT-style LLMs to show the promise of the proposed method.", "excitement": 3, "reproducibility": 4, "ethical_concerns": "No", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {}, "extra_text": {"Missing_References": "[1] Huang, J., Gu, S. S., Hou, L., Wu, Y., Wang, X., Yu, H., & Han, J. (2022). Large language models can self-improve. arXiv preprint arXiv:2210.11610.\n\n[2] Xingchen Wan, Ruoxi Sun, Hanjun Dai, Sercan Arik, and Tomas Pfister. 2023. Better Zero-Shot Reasoning with Self-Adaptive Prompting. In Findings of the Association for Computational Linguistics: ACL 2023, pages 3493–3514, Toronto, Canada. Association for Computational Linguistics.\n\n[3] Wan, X., Sun, R., Nakhost, H., Dai, H., Eisenschlos, J. M., Arik, S. O., & Pfister, T. (2023). Universal Self-adaptive Prompting. arXiv preprint arXiv:2305.14926.\n\n[4] Zhang, Z., Zhang, A., Li, M., & Smola, A. (2023). Automatic chain of thought prompting in large language models. ICLR.\n\nI acknowledge that [2] and [3] are contemporaneous and I have not penalized the authors for not comparing against these works.\n"}}]

Author rebuttal:

Meta-review: The authors mostly agree that the submission addresses an important paradigm in NLP, namely in-context learning (ICL), and make an interesting connection between it and active learning, they identify a phenomenon termed template bias which consists of a systematic shift in the distribution of outputs in few-shot ICL due to the template itself, and propose a calibration procedure to mitigate it, the proposed methodology is convincing (calibration and ICL selection), the information gain method demonstrates substantial performance improvements, moreover, it is efficient and forgoes the need for large annotated datasets. However, some weaknesses were also pointed out: the method is restricted to classification tasks, information gains are quantified independently for each sample, however, joint estimation may lead to additional performance gains, the description of the proposed method could use some additional details, the components of the proposed approach are either unsurprising or not new, importantly, rather than penalizing it, the reviewer suggests further discussion, and in the experiments, some baselines are missing (e.g., diversity sampling and clustering) and there is potential for bias in the results. In response, the authors argue that their goal is having a no parameter tuning scheme in favor of data efficiency, that a comprehensive discussion of competing methods will be included in the revision, they acknowledge that max entropy may not be the best strategy for selection and the potential for bias but elaborate on how their information gain framework is likely to counter such bias. Further, the authors agreed to expand the discussion of the proposed methodology in the revision and authors provide additional results for one-shot experiments. Though the reviewers engaged with the authors in the discussion period, one of the reviewers stated that their soundness sore will be increased, however, not reflected in the final score. Nevertheless, such an increase was taken into account.
Decision: Accept-Findings