Venue: NAACL 2025

# Active Few-Shot Learning for Text Classification

 Saeed Ahmadnia\({}^{1}\)  Arash Yousefi Jordeh\({}^{2}\)   Mahsa Hosseini Khasheh Heyran\({}^{2}\)

**Seyed Abolghasem Mirroshandel\({}^{2}\)   Owen Rambow\({}^{3}\)    Cornelia Caragea\({}^{1}\)**

###### Abstract

The rise of Large Language Models (LLMs) has boosted the use of Few-Shot Learning (FSL) methods in natural language processing, achieving acceptable performance even when working with limited training data. The goal of FSL is to effectively utilize a small number of annotated samples in the learning process. However, the performance of FSL suffers when unsuitable support samples are chosen. This problem arises due to the heavy reliance on a limited number of support samples, which hampers consistent performance improvement even when more support samples are added. To address this challenge, we propose an active learning-based instance selection mechanism that identifies effective support instances from the unlabeled pool and can work with different LLMs. Our experiments on five tasks show that our method frequently improves the performance of FSL. We make our implementation available at [https://github.com/theSaeed/active-fewshot-learning](https://github.com/theSaeed/active-fewshot-learning).

+
Footnote †: _Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers)_, pages 677–694

April 29 - May 4, 2025 ©2025 Association for Computational Linguistics

## 1 Introduction

Deep learning systems have shown great performance when given enough labeled data, yet they struggle to learn from a small amount of labeled data Sun et al. (2019). However, constructing a large corpus of annotated data is costly and time-consuming, which hinders the building of supervised classifiers for new domains Zhu et al. (2009). Few-Shot Learning (FSL) addresses this by seeking to grasp new concepts from limited labeled examples for broader applications Sun et al. (2019). With recent advances in Large Language Models (LLM), the capabilities of FSL can be utilized much better than before and these methods can reach acceptable performance using minimal training data Gao et al. (2021); Chen et al. (2021); Karimi Mahabadi et al. (2022); Lin et al. (2022).

There are two widely adopted approaches to addressing the FSL problem: In-Context Learning (ICL) and Fine-Tuning (FT). Recent autoregressive decoder-only LLMs have demonstrated strong performance in the realm of FSL Brown et al. (2020), providing the opportunity to achieve satisfactory results with little to no labeled data without requiring any fine-tuning. On the other hand, FT is a more established strategy for text classification, which leverages a model fine-tuned on labeled support data for prediction, and can show strong results as opposed to ICL Edwards and Camacho-Collados (2024), but a large amount of training data is required for model fine-tuning.

Interestingly, most FSL methods typically select the samples randomly. However, the quality of the samples can have a significant impact on the model's performance. In some scenarios, adding un- or less-informative samples can even decrease the accuracy or may cause a high variance in the model's performance Zhang et al. (2020); Schick and Schutze (2021). Few studies in the field of Natural Language Processing (NLP) have explored sample selection strategies. Nevertheless, prior works are limited by their lack of advanced techniques, such as active learning Chang et al. (2021), and by compromising performance to achieve efficiency Muller et al. (2022).

Given these challenges, and following the revealed strong performance of FT approaches against ICL Edwards and Camacho-Collados (2024), we propose a new FT- and Active Learning (AL)-based Few-Shot (FS) sample selection method to enhance classification performance by choosing the most informative unlabeled samples, thus, minimizing annotation costs. Inspired by successful AL algorithms Settles (2009), our algorithm selects instances using entropy and clustering methods to ensure uncertainty, diversity, and representativeness in sample selection.

More specifically, we propose an iterative approach to progressively choose samples for human annotation and label them to be added to the sup

port set. This process begins with generating an organized depiction of the unlabeled data based on a certain embedding method to capture the requested key features of the data. Following this, a sampling method is applied to strategically select new data points based on the generated embeddings. These data points are then selected and given to a human annotator to be labeled and added to the support set. Afterward, we use this augmented support set for fine-tuning LLMs.

To evaluate our method, we conduct experiments on five classification tasks: the news topic, 5-star rating, and private states' type, polarity, and intensity classification. We use two pre-trained language models, BART and FLAN-T5 Lewis et al. (2019); Chung et al. (2022), as the backbone and fine-tuning models in our approach. The proposed method is compared against weak and strong baselines to support its effectiveness and efficiency. These baselines include random sampling, in-context learning with Gemma 2 Team et al. (2024), Llama 3.1 Dubey et al. (2024), and Mistral v0.3 Jiang et al. (2023), as well as other related work utilizing more advanced sample selection strategies in FSL. Our approach, especially when combining representative and uncertainty-based sampling techniques, exceeds the baselines considerably on average.

Our contributions can be summarized as follows: 1) We introduce an Active Learning-based sample selection scenario by combining uncertainty and representativeness measures for FS classification problems achieving state-of-the-art performance when paired with recent FSL algorithms. 2) We executed comprehensive experiments on a wide variety of tasks using various LLMs. 3) We present a thorough analysis to assess the performance of the models at different iterations, comparing them to the baselines presented in previous work. 4) We make our implementation publicly available.

## 2 Related Work

In previous studies, the few-shot scenario has been simulated by randomly sampling a subset from the complete training data Chen et al. (2020); Schick and Schutze (2021); Gao et al. (2021); Chen et al. (2021); Lin et al. (2022); Edwards and Camacho-Collados (2024). Among different FSL methods in NLP, there are few methods that have paid attention to the sample selection strategies. However, some recent studies in the field of image processing have demonstrated the effectiveness of incorporating AL strategies in the context of FSL Boney et al. (2019); Pezeshkpour et al. (2020); Li et al. (2021); Shin et al. (2022).

The study conducted by Chang et al. (2021) is one of the few works that specifically addresses sample selection in NLP. Their research focuses on FS training instance selection and using it in three text generation tasks with BART. Their approach is motivated by the idea that few-shot training instances should exhibit diversity and representativeness. To achieve this, the authors utilized K-Means clustering for choosing data points closer to the center of clusters as important (i.e., informative) samples. Their results demonstrate the success of this method even with this simple noniterative clustering-based approach. In contrast, our research specifically targets classification tasks. Furthermore, our active learning approach incorporates a wider range of tasks and selection strategies (i.e., uncertainty, diversity, and representativeness) compared to their study. We then extend the usage of this idea to iteratively expand the support set.

The only recent study that incorporates FS and AL approaches in NLP is conducted by Muller et al. (2022), using a zero-shot approach for XLM-RoBERTa-based Siamese networks. They use label tuning to fine-tune the label embeddings for faster training. On the contrary, we use multiple language models (i.e., BART and FLAN-T5) and fine-tune the entire model on the support set in every iteration as we prioritize the FS instance selection quality and model performance, which is shown to produce significantly better performance. Also, the related work does not specify how they select samples in the first iteration using an uncertainty approach while the model has never seen any related data before. In contrast, we propose using representative sampling in the first step to boost the initial performance of the model, even in uncertainty sampling methods. Moreover, we introduce four new sampling methods compared to the mentioned work. Importantly, our methods and implementation are open source and publicly available to be freely used by fellow researchers. To the best of our knowledge, the previous work's methods are not freely available to the public.

## 3 Active Few-Shot Learning

In our definition of the problem, we have a large set of unlabeled training samples to start with. Our 

goal is to select a small number of samples from this unlabeled pool to be labeled and used as a support set in a way that maximizes a model's performance on the test set. In different FS instance selection methods, we may have one or more iterations of sampling and model fine-tuning. We categorize experiments with a single round of this process as 'non-iterative', and those with multiple rounds as 'iterative'.

Figure 1 illustrates the full pipeline of a single iteration, which can be the one and only iteration in the non-iterative approaches. At each iteration, we first examine the data to determine which additional samples to include in the support set. This process begins by extracting embeddings from a certain source, specified by an **embedding method**, to have a structured representation of the unlabeled data. This source is derived from running inference on the fine-tuned model of the last iteration by feeding it the unlabeled training pool. Subsequently, a **sampling method** is applied to select new samples based on the obtained embeddings, guiding the model's learning toward optimal performance. The embedding and sampling methods are explained in the following subsections in more detail.

The selected samples are then removed from the unlabeled training pool and given to an oracle for labeling. Following that, the newly labeled samples are added to the support set. This augmented support set is next used to fine-tune a new instance of the pre-trained model on the validation set. Finally, we evaluate the latest fine-tuned model on the test set to analyze the performance of our approach at the end of each step. However, the test set is solely used for evaluation purposes and is not needed for our approach to function in the defined setup. Moreover, in the initial round, the support set is an empty set, all the training data is included in the unlabeled pool, and a pre-trained model without any previous fine-tuning is used to extract embeddings.

### Embedding Methods

We obtain the embeddings by using two distinct methods:

Encoder (En):In this method, we extract the last hidden states from the encoder of the model and apply mean pooling over it. This embedding serves as a dense representation of the input data, while providing a rich feature space that encodes the input sequence.

Scores (Sc):Here, we leverage the output logits of the model and apply a softmax function to calculate the probability distribution over the possible labels. This method focuses on the model's confidence in assigning labels to the input data, which can be interpreted as a measure of how well the model understands the instance.

In both cases, we use a pre-trained model without any fine-tuning during the first iteration and use the fine-tuned model of the previous iteration during the subsequent iterations. Moreover, the embedding methods we use in this study make our approach adaptable to any LLM that provides label probabilities and its encoder's last hidden states.

Since we are working with text generation models, additional processing is required to calculate the scores. Specifically, we need to compute the

Figure 1: Pipeline of the \(i^{th}\) iteration in our approach. Yellow boxes represent different phases of the method. Blue boxes are constant inputs during all iterations. Red boxes are carried over and modified during all consecutive iterations. Green boxes are products of the current iteration that will not be used later in the approach.

 

probability \(P_{m}^{<t>}[n]\) (Equation 1), which represents the likelihood that the token at position \(t\) in sample \(m\)'s logits corresponds to the \(n^{th}\) class out of all \(N\) classes.

Each pre-trained model has its own vocabulary that maps distinct numerical indices to the tokens it recognizes. \(Logits_{m}^{<t>}[i]\) indicates the model's logit for the \(i^{th}\) word in the vocabulary at position \(t\) for sample \(m\). During this procedure, we need our classes to be represented by a single token. For cases where a class name is represented by multiple tokens in the pre-trained model's tokenizer, we handle this by manually replacing such multi-token labels with semantically close single-token labels. We then disregard all the other tokens in the vocabulary that do not correspond to any task-specific class. To manage this, we define and use a dictionary \(ClassId(i)\), which maps the \(i^{th}\) class to its corresponding index in the vocabulary.

Once the class probabilities are computed, we calculate the score \(Score_{m}[n]\) (Equation 2) by taking the maximum probability of the \(n^{th}\) class over all \(T\) output tokens for sample \(m\). This is especially important for multi-label tasks such as the MPQA Type task, where the model may generate multiple tokens in the output to indicate multiple labels. Using this method, we will eventually end up with a vector the same size as the label set (\(|L|\) in Section 4.1).

\[P_{m}^{<t>}[n]=\frac{e^{logits\subseteq t^{>}[ClassId(n)]}}{ \sum_{i=1}^{N}e^{Logits_{m}^{<t>}[ClassId(i)]}} \tag{1}\] \[Score_{m}[n]=\max_{1\leq i\leq T}(P_{m}^{<i>}[n]) \tag{2}\]

### Sampling Methods

Within each iteration, \(M\) instances need to be sampled from the training set and added to the support set of size \(K\), which is an empty set at the beginning of the initial round. More precisely, these instances are sampled from the (simulated) unlabeled training set by considering the inputs and their corresponding embeddings. Only after choosing the samples, we can look at the labels of the \(M\) instances (simulating the human annotation) and use them in the fine-tuning process. \(M\) is a small number and is considered to designate **the whole selection size**, unlike typical FSL classification tasks that select \(M\) samples for each class Ren et al. (2018); Chen et al. (2019); Wang et al. (2023), since we do not have access to those classes in our definition of the problem. The sampling methods that we use in this paper are as follows:

Random:With this method, we simply sample \(M\) instances randomly without replacement from the unlabeled pool. This sampling method does not require any embedding data.

Representative (Rep):This method gets help from the embeddings we retrieved in our desired embedding method to cluster the unlabeled data into \(M\) groups using the _K-Means_ algorithm. Then, inside each cluster, we sample the data point that its corresponding embedding is the closest (euclidean distance) to the cluster centroid.

Uncertainty (Un):It can only benefit from the _Sc_ embeddings to select the \(M\) samples about which the model has the most doubts. We will be using _entropy_Shannon (1948); Settles (2009) as our uncertainty measure throughout this paper.

Uncertainty Representative (UnRep):Using this technique, we first choose the \(\alpha\times M\) most uncertain samples based on the _Sc_ embeddings. Thereafter, we do a representative sampling based on the _En_ embeddings only on these selected data points in order to sample the final \(M\) unlabeled samples.

Cluster Uncertainty (ClUn):This strategy, at first, splits the data into \(M\) clusters considering the given embeddings using the _K-Means_ algorithm. It will then pick the data point that the model has the least confidence about inside each cluster by looking at their _Sc_ embeddings.

All of these methods can be used during the second iteration onwards, but only the ones that do not involve uncertainty (Random and Rep) can be used within the first iteration and/or non-iterative approaches since there's no previous step for the model to learn enough about the task and decide whether it has doubts about the data.

## 4 Experimental Setup

### Datasets

We use the **MPQA** Opinion Corpus, which is annotated at the word or phrase level to extract the following features of the expressed attitudes: **type**, **polarity**, and **intensity**Wiebe et al. (2005); Wilson (2008). Refer to Appendix A for more details. Additionally, we use **AG News**Corpus Gulli (2005) 

for news topic classification and the English portion of The Multilingual **Amazon Reviews** Corpus Keung et al. (2020) for 5-star rating classification tasks.

Table 1 exhibits the statistics and diversity of the datasets. The MPQA dataset does not offer separate training, validation, and test data, so we use the splits of MPQA that are provided in previous work Ahmadnia et al. (2024). Although the AG News dataset presents training and test sets, it does not include any validation set. Therefore, we randomly sample the validation data from the training set without replacement. Amazon Reviews, however, offers all three mentioned splits, but the given validation set is relatively large. We generate a new set by randomly down-sampling the original validation set to refrain from overfitting too easily on the validation data as suggested by previous study Gunel et al. (2020). We maintain the original sets' label distributions for these new validation sets. Following Muller et al. (2022), we define \(|L|\) as the cardinality of the label set \(L\), and \(U=\sum_{l\in L}|f(l)-\frac{1}{|L|}|\) as a uniformity metric (\(U=0\) is uniform), where \(f(l)\) is the relative frequency of label \(l\).

### Fine-Tuning Experiments

We evaluate our method across a wide range of tasks, comparing it to various baselines and related work leveraging several large language models. Specifically, for FT, we use the base versions of BART and FLAN-T5 with 139M and 248M parameters, respectively Lewis et al. (2019); Chung et al. (2022).

To get better intuition about the tasks, we first calculate the majority baselines, which are the baselines we expect to beat. Additionally, we fine-tune the models using the entire training set as our support set (\(K\) = full training set size). These results represent a sort of top-line, which we do not expect to beat in our FS experiments.

Next, we fine-tune the pre-trained models with varying support set sizes, \(K\in\{10,20,50,100\}\), using random sampling, representative sampling, and our proposed iterative approaches. In the iterative approaches, within each iteration, we sample \(M=10\) new data points to be progressively added to our support set and present the results when we have fine-tuned the model using support sets of size \(K\in\{10,20,50,100\}\). For these experiments, we assign \(\alpha\), in Section 3.2, the value of \(10\). Appendix D includes additional experiments evaluating the impact of different values of \(\alpha\).

We further repeat FT experiments, this time with \(K\in\{5,10,25,50\}\) while having \(M=5\) in iterative approaches on the MPQA tasks to assess the impact of different selection sizes with the same number of iterations. Additionally, we choose the best-performing models from the AG News and Amazon Reviews tasks and fine-tune them with \(M=16\) over 16 iterations, resulting in a total support set size of \(K=256\). We compare our results to the best-performing models provided by Muller et al. (2022), namely LT margin and LT k-means.

### In-Context Learning Experiments

For ICL, we utilize instruction-tuned models and prompt templates similar to related work Reid et al. (2024); Dubey et al. (2024), and describe each task alongside a list of possible labels. These prompts can be applied directly in 0-shot settings as the system prompt. For FS settings, we append labeled instances to the system prompt to provide additional context. In the end, we query the model for predictions on each test instance in the user prompt and match the predicted output strings with the corresponding labels. The prompt template for each task is included in Appendix C. If a model does not support system prompts, we concatenate and merge the system and user prompts and treat them as a single (user) prompt. We employ two methods to sample training data for ICL:

Random:Similar to random sampling method in FT, we select \(M\) instances randomly without replacement, regardless of any information.

Custom:This approach takes advantage of the instance selection used in FT methods by incorporating the support samples constructed by encoder-decoder models. This allows decoder-only models to leverage the encoder of the encoder-decoder models. The goal is to assess the performance gain by using samples interesting for and selected by FT models. However, the decoder-only models

\begin{table}
\begin{tabular}{l c r r r r r} \hline Dataset & Multi-Label & Train & Val & Test & \(|L|\) & \(\mathbf{U_{S}}^{*}\) \\ \hline MPQA Type & ✓ & 4,248 & 1,060 & 1,327 & 4 & 85.1 \\ MPQA Polarity & ✗ & 4,505 & 1,123 & 1,404 & 2 & 8.9 \\ MPQA Intensity & ✗ & 4,505 & 1,123 & 1,404 & 5 & 34.6 \\
**AG News** & ✗ & 118,800 & 1,200 & 7,600 & 4 & 0.0 \\
**Amazon Reviews** & ✗ & 200,000 & 1,200 & 5,000 & 5 & 0.0 \\ \hline \end{tabular}
\end{table}
Table 1: Dataset Statistics. It specifies whether they are multi-label, the size of training, validation, and test set splits, and the number of classes and their unformess.

 

themselves do not participate in identifying or selecting these informative samples in this process, and the encoder-decoder models operate entirely independent of the decoder-only models.

In ICL, we apply both random and custom sampling methods on the instruction-tuned models, i.e., Gemma 2, Llama 3.1, and Mistral v0.3 with 9B, 8B, and 7B parameters, respectively. We report results for support sets of sizes \(K\in\{0,10,20,50,100\}\). Notably, each step's support set is a subset of the support set from the subsequent step. In custom sampling, we only use instances selected by the overall best-performing model in FT experiments.

## 5 Discussion of Results

To better understand the impact of different approaches, we analyze the experimental results in this section. Table 2 summarizes the main experimental results for FT and ICL approaches. The outcomes for the smaller selection size and comparisons with other related work are also available in Tables 3 and 4, respectively. Additional fine-grained results, including more intermediate support set sizes, are provided in Appendix E as well.

The model names in the tables indicate the employed pre-trained model, followed by the sampling method. If an iterative approach is used, the name reflects the sampling method for the first iteration, followed by the method used in the subsequent iterations. Whenever a referred sampling method can make use of both embedding methods, we specify the used method inside parentheses.

### Active Few-Shot Learning

Table 2 elucidates significant differences in task performance, particularly when fine-tuning on the

\begin{table}
\begin{tabular}{l|c c c c|c c c c|c c c c} \multirow{2}{*}{**Model Name**} & \multicolumn{6}{c}{MPQA Type} \\  & **0** & **10** & **20** & **50** & **100** & **Full** & **0** & **10** & **20** & **50** & **100** & **Full** & **0** & **10** & **20** & **50** & **100** & **Full** \\ \hline Majority Baseline & **56.6** & \multicolumn{3}{c|}{54.8} & \multicolumn{3}{c}{**37.2**} \\
**Random Sampling** & \multicolumn{3}{c}{**Seming**} & \multicolumn{3}{c}{**Seming**} & \multicolumn{3}{c}{**Seming**} & \multicolumn{3}{c}{**Seming**} & \multicolumn{3}{c}{**Seming**} & \multicolumn{3}{c}{**Seming**} & \multicolumn{3}{c}{**Seming**} & \multicolumn{3}{c}{**Seming**} \\
**RART-Random** & \multicolumn{3}{c}{56.8\({}_{1.4}\) & 56.7\({}_{1.5}\) & 59.5\({}_{1.8}\) & 63.3\({}_{1.3}\) & 80.3 & 73.2\({}_{1.7}\) & 78.9\({}_{1.8}\) & 82.9\({}_{1.6}\) & 86.8\({}_{1.7}\) & 92.5 & 36.0\({}_{4.3}\) & **37.0\({}_{2.3}\)** & 37.1\({}_{1.3}\) & 35.2\({}_{1.4}\) & 47.0 \\ FLAN-T5-Random & \multicolumn{3}{c}{56.2\({}_{1.4}\)} & 60.0\({}_{2.6}\) & 65.3\({}_{2.6}\) & 66.7\({}_{1.2}\) & **80.7** & \multicolumn{3}{c}{76.5\({}_{1.5}\)} & \multicolumn{3}{c}{**80.6\({}_{4.5}\)**} & \multicolumn{3}{c}{**85.3\({}_{1.4}\)**} & \multicolumn{3}{c}{**94.2**} \\
**Representative Sampling** & \multicolumn{3}{c}{**Seming**} & \multicolumn{3}{c}{**Seming**} & \multicolumn{3}{c}{**Seming**} & \multicolumn{3}{c}{**Seming**} & \multicolumn{3}{c}{**Seming**} & \multicolumn{3}{c}{**Seming**} & \multicolumn{3}{c}{**Seming**} & \multicolumn{3}{c}{**Seming**} & \multicolumn{3}{c}{**Seming**} & \multicolumn{3}{c}{**Seming**} & \multicolumn{3}{c}{**Seming**} & \multicolumn{3}{c}{**Seming**} \\
**RARP-Exp** & \multicolumn{3}{c}{56.5\({}_{2.5}\)} & 57.1\({}_{1.7}\) & 59.8\({}_{2.7}\) & 64.2\({}_{3.5}\) & 71.4\({}_{0}\) & 76.1\({}_{1.6}\) & 81.8\({}_{1.8}\) & 87.1\({}_{1.1}\) & \multicolumn{3}{c}{**37.0\({}_{1.0}\)**} & \multicolumn{3}{c}{35.2\({}_{2.1}\)} & \multicolumn{3}{c}{37.0\({}_{4.3}\)} & \multicolumn{3}{c}{37.3\({}_{3.3}\)} \\ FLAN-TS-Repr(Ex) & \multicolumn{3}{c}{53.6\({}_{1.4}\)} & **63.7\({}_{2.6}\)** & 65.1\({}_{2.5}\) & 67.1\({}_{2.5}\) & 77.9\({}_{3.5}\) & 55.3\({}_{2.7}\) & 59.2\({}_{1.6}\) & \multicolumn{3}{c}{**33.9\({}_{2.3}\)**} & \multicolumn{3}{c}{**35.49\({}_{3.6}\)**} & \multicolumn{3}{c}{36.1\({}_{3.1}\)} & \multicolumn{3}{c}{**Seming**} \\
**Herazine Approaches** & \multicolumn{3}{c}{**FLAN-T5-Repr(Ex)**} & \multicolumn{3}{c}{53.6\({}_{2.5}\)} & 59.8\({}_{1.4}\) & 63.7\({}_{2.6}\) & 66.9\({}_{2.3}\) & **77.5\({}_{1.1}\)** & 81.2\({}_{3.8}\) & 88.2\({}_{1.9}\) & **91.4\({}_{0.8}\)** & 33.9\({}_{2.3}\) & 36.8\({}_{0.3}\) & 37.4\({}_{0.7}\) & 39.2\({}_{2.1}\) \\ FLAN-TS-Repr(Ex)+Preg(Ex) & \multicolumn{3}{c}{53.6\({}_{2.1}\)} & 63.1\({}_{3.1}\) & 65.8\({}_{1.8}\) & 65.8\({}_{5.9}\) & 77.5\({}_{1.5}\) & 80.4\({}_{2.5}\) & 87.4\({}_{0.6}\) & 90.6\({}_{1.4}\) & 33.9\({}_{2.3}\) & 35.3\({}_{2.3}\) & 37.4\({}_{3.2}\) & 38.0\({}_{1.4}\) \\ FLAN-TS-Repr(Ex)+Recp(Ex) & \multicolumn{3}{c}{53.6\({}_{2.6}\)} & 64.0\({}_{4.6}\) & 64.7\({}_{1.6}\) & 68.9\({}_{3.3}\) & **77.5\({}_{1.8}\)** & 80.4\({}_{2.6}\) & 85.6\({}_{1.8}\) & 88.1\({}_{1.4}\) & 33.9\({}_{2.3}\) & 36.3\({}_{3.6}\) & 36.9\({}_{2.3}\) & 37.8\({}_{2.2}\) \\ FLAN-TS-Repr(Ex)+UnEq & \multicolumn{3}{c}{53.6\({}_{2.6}\)} & 60.6\({}_{4.2}\) & 63.2\({}_{2.6}\) & 68.2\({}_{2.7}\) & **77.5\({}_{1.2}\)** & 82.4\({}_{2.8}\) & 87.5\({}_{2.9}\) & 90.1\({}_{0.1}\) & 33.9\({}_{2.3}\) & 36.2\({}_{1.4}\) & 37.4\({}_{0.6}\) & 38.2\({}_{2.2}\) \\ FLAN-TS-Repr(Ex)+ClitNet & \multicolumn{3}{c}{53.6\({}_{2.6}\)} & 69.6\({}_{4.4}\) & 64.3\({}_{2.6}\) & 68.0\({}_{1.9}\) & **77.5\({}_{1.5}\)** & 83.1\({}_{3.2}\) & 83.2\({}_{0.0}\) & 90.4\({}_{3.9}\) & 33.9\({}_{2.3}\) & 36.3\({}_{0.8}\) & 38.4\({}_{0.6}\) & 38.2\({}_{1.4}\) \\ FLAN-TS-Repr(Ex)+UnEq & \multicolumn{3}{c}{53.6\({}_{2.9}\)} & 59.2\({}_{6.6}\) 

full dataset. These variations stem from the distinct nature of the tasks, which span binary, multi-class, and multi-label classification problems. Notably, the MPQA Type and MPQA Intensity tasks involve imbalanced independent label sets, while the remaining tasks are more balanced. Additionally, the MPQA Intensity and Amazon Reviews tasks have a greater number of labels, which are mostly semantically close, adding more complexity to the classification. Thus, we believe that the chosen tasks offer a diverse and representative spectrum of classification challenges.

As anticipated, the majority baseline generally yields the poorest performance. Both BART-Random and FLAN-T5-Random provide reasonable starting points, with improvements observed as the support set size \(K\) increases. A common trend across FT approaches is the progressive enhancement in performance as the support set grows from 10 samples to the full dataset.

Furthermore, the table demonstrates that FLAN-T5-based models work better than BART-based models in most cases. This is why we focus our iterative experiments on FLAN-T5. However, additional experiments with BART can be found in Appendix E. The results also suggest that simple representative sampling is more effective than random sampling when \(K=100\), even when used in a non-iterative setup. Nevertheless, the iterative approaches outperform most non-iterative methods when \(K\geq 20\). The MPQA Intensity task, in particular, succeeds in excelling the majority baseline in FSL experiments only when iterative methods are applied.

Although the five tasks produce distinct outcomes, the iterative approach 'FLAN-T5-Rep(En)-ClUn(En)' usually outperforms the random and representative approaches, and it does so consistently when \(K\in\{50,100\}\) in three tasks and when \(K=100\) in four tasks. All of the iterative approaches manage to excel the best non-iterative approaches on average when \(K=100\). Especially, 'FLAN-T5-Rep(En)-ClUn(En)' stands out as it beats the best non-iterative methods on average by 1.2% points at \(K=50\) and 1.6% points at \(K=100\). Hence, we recommend using this method in new use cases. Figure 2 captures the contrast between the non-iterative FLAN-T5-based models and the best-performer model at \(K=100\) for each task in greater detail, including the intermediate steps resulti

Figure 2: The range (min and max) and average of micro-F1 (%) scores of all tasks with steps of 10 over five runs.

 



### Impact of Smaller Selection Size

Table 3 presents additional experimental results for \(K\in\{5,10,25,50\}\) on the MPQA dataset across 10 different seeds, using \(M=5\) in the iterative approaches. Even though, in our problem context, \(K\) represents the overall size of the support set--distinct from the conventional FSL classification tasks where \(K\) refers to the number of samples per class, making it challenging to ensure equitable representation of all labels in tasks like MPQA Intensity--the iterative approaches still surpass the non-iterative methods in most cases. Moreover, the iterative approach 'FLAN-T5-Rep(En)-ClUn(En)' still holds up and beats all the non-iterative approaches at \(K=50\). An interesting insight that can be drawn by comparing the \(K=50\) columns in Tables 2 and 3 shows that having \(M=5\) leads to improved performance across nearly all iterative approaches compared to \(M=10\) at the same support set size (\(K=50\)). This suggests using a smaller \(M\) can result in a more effective sample selection process.

### In-Context Learning

An examination of the ICL results reveals that these models generally not only underperform iterative approaches but also struggle to beat non-iterative FT methods. They even fail to exceed the majority baseline in the MPQA Intensity task. Although ICL models can usually deliver reasonable performance when \(K\) is small and may outperform iterative methods in Amazon Reviews, their performance stagnates or even declines as the number of support samples (\(K\)) increases. This inability of ICL approaches to leverage larger support sets has been noted in previous work as well Pecher et al. (2024). Additionally, ICL methods are inclined to exhibit higher standard deviations compared to FT approaches, indicating greater performance variability.

Comparing the pre-trained models in ICL shows there is no definitive winner between Llama 3.1 and Mistral v0.3. Generally, Mistral v0.3 performs better with smaller \(K\) values, while Llama 3.1 surpasses Mistral v0.3 as \(K\) increases. However, Gemma 2 stands out as the clear leader, outperforming the other two models in most cases. Interestingly, custom sampling fails to help Llama 3.1 and Mistral v0.3 to gain performance against random sampling, suggesting that these two models do not benefit from instances identified as informative by FLAN-T5. Gemma 2, however, is the only pretrained model that benefits from custom sampling in most experiments.

### Other Related Work

Table 4 compares our best-performing models on AG News and Amazon Reviews datasets with the best-performing models reported in previous work on the same datasets, i.e., LT margin for AG News and LT k-means for Amazon Reviews Muller et al. (2022). Our models outperform these baselines by a significant margin of 4.5% points on AG News and 12.4% points on Amazon Reviews, demonstrating the effectiveness of our methods. Figure 3 illustrates that LT margin and LT k-means at \(K=256\) struggle to beat the best iterative FT approaches even at small \(K\) values. The figure also shows how the performance gains of iterative approaches diminish as \(K\) increases. For example, there is a performance improvement of 3.3% points in AG News and 8.2% points in Amazon Reviews when \(K\) increases from 16 to 96. Meanwhile, there is only a 1.1% and 1.6% points improvement when \(K\) increases from 96 to 256 in AG News and Amazon Reviews, respectively. These results suggest the proposed methods are most effective in FS settings.

### Performance-Efficiency Trade-off

In designing our methodology, we prioritized the quality of few-shot instance selection and model

Figure 3: The range (min and max) and average of macro-F1 (%) scores of AG News and Amazon Reviews tasks with steps of 16 over five runs.



performance, as these are critical in applications where model accuracy outweighs time efficiency constraints. However, here we analyze run-time performance to enable practical deployment in time-sensitive scenarios. We present a breakdown of execution times for different phases of the process, allowing for informed decisions when tuning key parameters to meet efficiency requirements.

Table 5 presents execution times for embedding extraction, sampling, and fine-tuning phases across different approaches on the MPQA Polarity dataset over a single seed. Durations are accumulated over ten iterations in iterative approaches. Annotation, support set augmentation, and evaluation times are excluded, as they are either negligible or independent of the approach. As expected, non-iterative methods exhibit shorter execution times compared to iterative ones. The results confirm that increasing the number of iterations directly extends the overall run time in a linear fashion, as it naturally requires more computational steps, though performance gains diminish, as illustrated in Figure 2. Thus, tuning the number of iterations is crucial for balancing performance and efficiency.

The embedding extraction time is also influenced by the embedding method used. Method _En_ processes data through the encoder, while _Sc_ requires both encoder and decoder passes, increasing computational cost. If both methods are applied, embeddings can still be obtained in a single model pass. Another key factor is the size of the unlabeled training pool; for large datasets (e.g., Amazon Reviews), random downsampling can significantly reduce execution time when necessary.

The sampling phase is relatively insignificant compared to embedding extraction and fine-tuning. Interestingly, iterative sampling does not take ten times the time of representative sampling, since the computations can be more simplified when choosing 10 samples per iteration compared to all 100 samples in a single iteration. Sampling method choice also impacts execution time, with non-K-Means approaches typically being faster. Similar to embedding extraction, downsampling the training pool can further enhance efficiency as well.

Fine-tuning times vary due to early stopping, with no clear correlation between approach type and fine-tuning duration beyond iteration count. However, fine-tuning time is highly dependent on validation set size, and reducing the validation set can significantly shorten run time when needed. Random downsampling of the validation set offers an effective strategy for optimizing efficiency.

Overall, our findings highlight key factors (e.g., iteration count, training pool size, validation set size, etc.) that influence execution time. Proper tuning of these parameters enables a flexible trade-off between model performance and computational efficiency.

## 6 Conclusion and Future Work

We propose a novel fine-tuning-based method for sampling data to be used in a few-shot setting with active learning, while many others tend to sample data randomly. We show how using different embedding and sampling methods helps us achieve better results in classification tasks by choosing and labeling the most informative unlabeled samples that may represent the variety of data or that the model has the most doubts about. These methods unleash their full potential when used iteratively, using the fine-tuned model from the previous iterations, surpassing in-context learning approaches and other fine-tuning-based sampling strategies in previous studies.

Future work will expand on new embedding and sampling methods in classification tasks as well as other types of NLP tasks, such as text generation. It will also explore the effect of semi-supervised learning methods on top of our approach in a pipeline, making use of the rest of the unlabeled data to improve performance.

## Acknowledgment

This research is funded in part by NSF IIS and Discovery Partners Institute (DPI) at the University of Illinois Chicago. Any opinions, findings, and conclusions expressed here are those of the authors and do not necessarily reflect the views of NSF or DPI. Rambow gratefully acknowledges support from the Institute for Advanced Computational Science at Stony Brook University.

\begin{table}
\begin{tabular}{l|c c c c} \hline
**Model Name** & **Embedding** & **Sampling** & **FT** & **Overall** \\ \hline FLAN-TS-Random & 0.000 & 0.000 & 0.103 & 0.103 \\ FLAN-TS-RepIn[E] & 0.016: & 0.003 & 0.689: & 0.908: \\ FLAN-T5-RepIn[E] & 0.01:58 & 0.001 & 1.48:06 & 1.504: \\ FLAN-T5-RepIn[E] & 0.02:14 & 0.0002 & 1.55: & 1.573: \\ FLAN-T5-RepIn[E] & 0.01:38 & 0.0007 & 1.564: & 1.582: \\ FLAN-T5-RepIn[E] & 0.02:03 & 0.003 & 2.08:03 & 2.10: \\ FLAN-T5-RepIn[E] & 0.02:17 & 0.0002 & 1.50:20 & 1.52:39 \\ FLAN-T5-RepIn[E] & 0.01:56 & 0.00:04 & 1.49:36 & 1.51:37 \\ \end{tabular}
\end{table}
Table 5: Accumulated execution time (h:mm:ss) of embedding extraction, sampling, and fine-tuning across different models.

 



### Limitations

In the current study, we have centered our attention on English. In the future, we plan to focus on other natural languages and alternative datasets. Furthermore, our proposed methods are unable to be directly used in non-classification or non-NLP tasks and they need some modifications to be applied to these types of tasks. These experiments also require a lot of computational resources like the other AL approaches, since we have to iteratively run the same experiment 10 times with an incrementally augmented support set.

## Ethics Statement

Our current study is a fundamental research work in the field of NLP and computational linguistics. There are many applications considered for these fields of research. For instance, understanding users' tweets on Twitter, e-commerce applications, and question answering. Although many research projects have been done in these fields, and a large number of them have accomplished remarkable results, we do not explicitly recommend using these systems standalone. The reason is that there are open issues about the robustness and fairness of these systems. Hence, we see a need for human experts in interpreting the results. From our point of view, there are no ethical concerns about the platforms, technologies, tools, and algorithms used or proposed in this study. We should also note that the dataset, language models, tools, and libraries that we have utilized in this work are all publicly available.

## References

* Ahamadnia et al. (2024) Saeed Ahmadnia, Arash Yousefi Jordehli, Mahsa Hosseini Khasheh Heyran, SeyedAbolghasen Mirroshandel, and Owen Rambow. 2024. Opinion mining use pre-trained large language models: Identifying the type, polarity, intensity, expression, and source of private states. In _Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LRECCOLING 2024)_, pages 12481-12495, Torino, Italia. ELRA and ICCL.
* Boney et al. (2019) Rinu Boney, Alexander Ilin, et al. 2019. Active one-shot learning with prototypical networks. In _ESANN_.
* Brown et al. (2020) Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language models are few-shot learners. In _Advances in Neural Information Processing Systems_, volume 33, pages 1877-1901. Curran Associates, Inc.
* Chang et al. (2021) Ernie Chang, Xiaoyu Shen, Hui-Syuan Yeh, and Vera Demberg. 2021. On training instance selection for few-shot neural text generation. _arXiv preprint arXiv:2107.03176_.
* Chen et al. (2019) Wei-Yu Chen, Yen-Cheng Liu, Zsolt Kira, Yu-Chiang Frank Wang, and Jia-Bin Huang. 2019. A closer look at few-shot classification. _arXiv preprint arXiv:1904.04232_.
* Chen et al. (2021) Yiming Chen, Yan Zhang, Chen Zhang, Grandee Lee, Ran Cheng, and Haizhou Li. 2021. Revisiting self-training for few-shot learning of language model. In _Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing_, pages 9125-9135, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
* Chen et al. (2020) Zhiyu Chen, Harini Eavani, Wenhu Chen, Yinyi Liu, and William Yang Wang. 2020. Few-shot NLG with pre-trained language model. In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_, pages 183-190, Online. Association for Computational Linguistics.
* Chung et al. (2022) Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, et al. 2022. Scaling instruction-finetuned language models. _arXiv preprint arXiv:2210.11416_.
* Dubey et al. (2024) Abhimanyu Dubey, Abhinav Jahuri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. 2024. The llama 3 herd of models. _arXiv preprint arXiv:2407.21783_.
* Edwards and Camacho-Collados (2024) Aleksandra Edwards and Jose Camacho-Collados. 2024. Language models for text classification: Is in-context learning enough? In _Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LRECCOLING 2024)_, pages 10058-10072, Torino, Italia. ELRA and ICCL.
* Gao et al. (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.
* Gulli (2005) Antonio Gulli. 2005. Ag's corpus of news articles

Beliz Gunel, Jingfei Du, Alexis Conneau, and Ves Stoyanov. 2020. Supervised contrastive learning for pretrained language model fine-tuning. _arXiv preprint arXiv:2011.01403_.
* Jiang et al. (2023) AQ Jiang, A Sablayrolles, A Mensch, C Bamford, DS Chaplot, D de las Casas, F Bressand, G Lengyel, G Lample, L Saulnier, et al. 2023. Mistral 7b (2023). _arXiv preprint arXiv:2310.06825_.
* Mahabadi et al. (2022) Rabeeh Karimi Mahabadi, Luke Zettlemoyer, James Henderson, Lambert Mathias, Marzieh Saeidi, Veselin Stoyanov, and Majid Yazdani. 2022. Prompt-free and efficient few-shot learning with language models. In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_, pages 3638-3652, Dublin, Ireland. Association for Computational Linguistics.
* Keung et al. (2020) Phillip Keung, Yichao Lu, Gyorgy Szarvas, and Noah A. Smith. 2020. The multilingual Amazon reviews corpus. In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_, pages 4563-4568, Online. Association for Computational Linguistics.
* Lewis et al. (2019) Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghavrininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov, and Luke Zettlemoyer. 2019. Bart: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. _arXiv preprint arXiv:1910.13461_.
* Li et al. (2021) Xiaorun Li, Zeyu Cao, Liaoying Zhao, and Jianfeng Jiang. 2021. Alpn: Active-learning-based prototypical network for few-shot hyperspectral imagery classification. _IEEE Geoscience and Remote Sensing Letters_, 19:1-5.
* Lin et al. (2022) Xi Victoria Lin, Todor Mihaylov, Mikel Artetxe, Tianlu Wang, Shuohui Chen, Daniel Simig, Myle Ott, Naman Goyal, Shruti Bhosale, Jingfiei Du, et al. 2022. Few-shot learning with multilingual generative language models. In _Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing_, pages 9019-9052.
* Muller et al. (2022) Thomas Muller, Guillermo Perez-Torro, Angelo Basile, and Marc Franco-Salvador. 2022. Active few-shot learning with fasl. In _International Conference on Applications of Natural Language to Information Systems_, pages 98-110. Springer.
* Pecher et al. (2024) Branislav Pecher, Ivan Srba, Maria Bielikova, and Joaquin Vanschoren. 2024. Automatic combination of sample selection strategies for few-shot learning. _arXiv preprint arXiv:2402.03038_.
* Pezeshkpour et al. (2020) Pouya Pezeshkpour, Zhengli Zhao, and Sameer Singh. 2020. On the utility of active instance selection for few-shot learning. _NeurIPS HAMLETS_.
* Reid et al. (2020) Machel Reid, Nikolay Savinov, Denis Teplyashin, Dmitry Lepikhin, Timothy Lillicrap, Jean-baptiste Alayrac, Radu Soricut, Angeliki Lazaridou, Orhan Firat, Julian Schrittwieser, et al. 2024. Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context. _arXiv preprint arXiv:2403.05530_.
* Ren et al. (2018) Mengye Ren, Eleni Triantafillou, Sachin Ravi, Jake Snell, Kevin Swersky, Joshua B Tenenbaum, Hugo Larochelle, and Richard S Zemel. 2018. Meta-learning for semi-supervised few-shot classification. _arXiv preprint arXiv:1803.00676_.
* Schick and Schutze (2021a) Timo Schick and Hinrich Schutze. 2021a. Few-shot text generation with natural language instructions. In _Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing_, pages 390-402.
* Schick and Schutze (2021b) Timo Schick and Hinrich Schutze. 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.
* Settles (2009) Burr Settles. 2009. Active learning literature survey. Computer Sciences Technical Report 1648, University of Wisconsin-Madison.
* Shannon (1948) Claude E Shannon. 1948. A mathematical theory of communication. _The Bell system technical journal_, 27(3):379-423.
* Shin et al. (2022) Junsup Shin, Youngwook Kang, Seungjin Jung, and Jongwon Choi. 2022. Active instance selection for few-shot classification. _IEEE Access_.
* Sun et al. (2019) Qianru Sun, Yaoyao Liu, Tat-Seng Chua, and Bernt Schiele. 2019. Meta-transfer learning for few-shot learning. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)_.
* Team et al. (2024) Gemma Team, Morgan Riviere, Shreya Pathak, Pier Giuseppe Sessa, Cassidy Hardin, Surya Bhupatiraju, Leonard Hussenet, Thomas Mesnard, Bobak Shahriari, Alexandre Rame, et al. 2024. Genma 2: Improving open language models at a practical size. _arXiv preprint arXiv:2408.00118_.
* Wang et al. (2023) Xixi Wang, Xiao Wang, Bo Jiang, and Bin Luo. 2023. Few-shot learning meets transformer: Unified query-support transformers for few-shot classification. _IEEE Transactions on Circuits and Systems for Video Technology_.
* Wiebe et al. (2005) Janyce Wiebe, Theresa Wilson, and Claire Cardie. 2005. Annotating expressions of opinions and emotions in language. _Language resources and evaluation_, 39(2):165-210.
* Wilson (2008) Theresa Ann Wilson. 2008. _Fine-grained subjectivity and sentiment analysis: recognizing the intensity, polarity, and attitudes of private states_. University of Pittsburgh 

Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Remii Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, 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.
* Zhang et al. (2020) Jingqing Zhang, Yao Zhao, Mohammad Saleh, and Peter Liu. 2020. Pegasus: Pre-training with extracted gap-sentences for abstractive summarization. In _International Conference on Machine Learning_, pages 11328-11339. PMLR.
* Zhu et al. (2009) Jingbo Zhu, Huizhen Wang, Benjamin K Tsou, and Matthew Ma. 2009. Active learning with sampling by uncertainty and density for data annotations. _IEEE Transactions on audio, speech, and language processing_, 18(6):1323-1331.

## Appendix A MPQA Opinion Corpus

A sentence may contain expressions that reflect different private states with various attitudes. These attitudes can belong to different types, and each type can express negative or positive opinions (polarity) toward targets with varying degrees of strength (intensity) Wiebe et al. (2005); Wilson (2008).

The original MPQA annotation scheme comprises 6 types of attitudes. We remove the _other_ and _speculation_ types in our experiments as these types of attitudes do not hold a polarity. That leaves us with a 4-class classification task for the type. Furthermore, an expression in a sentence may have zero to four labels as attitude types based on the expression itself and the sentence that contains the expression. This leads the type identifier task to be a multi-label classification task. Subsequently, we identify polarity and intensity using the attitude type, the expression that holds the attitude, and the expression's container sentence as the input. This input can only have one specific polarity and one intensity, which makes these tasks binary and 5-class multi-class classification tasks, respectively.

An example for each task is available in Table 6, and all labels and their distribution are as follows: **type:**\(agreement\) (\(\times\)284), \(arguing\) (\(\times\)2,466), _intention_ (\(\times\)420), and _sentiment_ (\(\times\)3,862) **polarity:**\(negative\) (\(\times\)3,200) and _positive_ (\(\times\)3,832); and **intensity:**low_ (\(\times\)658), _low-medium_ (\(\times\)1,262), _medium_ (\(\times\)2,615), _medium-high_ (\(\times\)1,258), and _high_ (\(\times\)1,239).

## Appendix B Implementation Details

Our models were implemented on PyTorch1 neural network framework. Furthermore, we utilized the scikit-learn library2, NumPy3, and Matplotlib4 packages. We used facebook/bart-base and google/flan-t5-base models in FT and google/gamma-2-9b-it, meta-llama/Llama-3.1-8B-Instruct, and mistralai/Mistal-7B-Instruct-v0.3 in ICL and their tokenizers from the _Hugging Face_ Transformers library5Wolf et al. (2020). For the ICLR tasks, non-MPQA tasks, performance-efficiency tradeoff experiments, BART-based MPQA Polarity iterative experiments, and the analysis of the impact of parameter \(\alpha\), the models were executed on a single NVIDIA RTX A5000 GPU 24 GB GPU and AMD EPYC 7662 3.28 GHz 64-Core CPU. The rest of the tasks (many of the FT MPQA tasks) were executed on a single NVIDIA A100 40 GB GPU and dual AMD Rome 7742 CPUs (each with 2.25 GHz 64-Cores). The maximum amount of GPU memory we used for our approaches was 18 GB. They also required a maximum of 16 GB of RAM.

Footnote 1: [https://pytorch.org/](https://pytorch.org/)

Footnote 2: [https://scikit-learn.org/stable/](https://scikit-learn.org/stable/)

Footnote 3: [https://numpy.org/](https://numpy.org/)

Footnote 4: [https://matplotlib.org/](https://matplotlib.org/)

Footnote 5: [https://github.com/huggingface/transformers](https://github.com/huggingface/transformers)

All results in this paper are reproducible by setting the random seeds to fixed numbers. The hyperparameters used in our experiments are listed

\begin{table}
\begin{tabular}{c|c c|c} \hline \multirow{2}{*}{**Task**} & \multicolumn{2}{c}{**Input**} & \multirow{2}{*}{**Output**} \\  & & & **Sentence** \\ \cline{3-4}  & & & \\ \hline \multirow{2}{*}{T} & \multirow{2}{*}{-} & The new US policy **deversures to be closely analyzed and monitored**. & \multirow{2}{*}{arguing sentiment} \\ \cline{3-4}  & & Canada is among the countries that have bidegled to entity the accord. & \\ \hline \multirow{2}{*}{I} & \multirow{2}{*}{settlement} & There is a **deep faith** here, however, in the power of democracy. & \multirow{2}{*}{high} \\ \cline{3-4}  & & & \\ \end{tabular}
\end{table}
Table 6: The examples for Type (T), Polarity (P), and Intensity (I) tasks. The expressions within the sentences are in bold.

\begin{table}
\begin{tabular}{l|c c} \hline
**Parameter** & **BART** & **FLAN-TS** \\ \hline Batch Size & 10 & 10 \\ Learning Rate & 5e-5 & 1e-4 \\ Dropout Rate & 0.1 & 0.1 \\ Optimizer & AdamW & AdamW \\ Early Stopping & 20 epochs & 20 epochs \\ \hline \end{tabular}
\end{table}
Table 7: The hyperparameters for BART- and FLANN-T5-based models.

 

in Table 7. In the present study, we utilized publicly available datasets. Hence, we did not use any human annotators.

## Appendix C ICL Templates

This section contains prompt templates that we used in ICL experiments for MPQA Type in Figure 4, MPQA Polarity in Figure 5, MPQA Intensity in Figure 6, AG News in Figure 7, and Amazon Reviews in Figure 8.

## Appendix D Impact of Parameter \(\boldsymbol{\alpha}\)

Table 8 presents the results of the "FLAN-T5-Rep(En)-UnRep" approach for \(\alpha\in\{1,2,5,10,20,50\}\) with \(M=10\), using the MPQA Polarity dataset.

## Appendix E Fine-Grained Experiments

Tables 9 (MPQA Type), 10 (MPQA Polarity), 11 (MPQA Intensity), 12 (AG News), and 13 (Amazon Reviews) present the main experiments from Table 2, along with intermediate steps for better comparison. Table 10 also includes additional experiments for BART-based iterative approaches using the MPQA Polarity dataset. The results are reported for support set sizes of \(K\in\{0,5,10,20,30,40,50,60,70,80,90,100,Full\}\). Some of the experiments encountered out-of-memory errors.

 



**System:**

You are a sentiment classifier. For each message, predict the type of an expressed private state as (sentiment, intention, arguing, or agreement) given the whole sentence for context, followed by the expression itself. Each entry may belong to one or more classes. Return the predicted classes with exactly one space between each if there is more than one class. Do not add any additional information, comment, or formatting.

**User:**

Text: [Test Sample]

Type:

**System:**

You are a sentiment classifier. For each message, predict the type of an expressed private state as (sentiment, intention, arguing, or agreement) given the whole sentence for context, followed by the expression itself. Each entry may belong to one or more classes. Return the predicted classes with exactly one space between each if there is more than one class. Do not add any additional information, comment, or formatting. Here are some samples:

Text: [Support Sample #1]

Type: [Label of Support Sample #1]

...

Text: [Support Sample #K]

Type: [Label of Support Sample #K]

**User:**

Text: [Test Sample]

Type:

Figure 4: Prompt templates for **MPQA Type** task. The upper box shows a sample for zero-shot learning, and the lower one shows a sample for \(K\)-shot learning.

Figure 5: Prompt templates for **MPQA Polarity** task. The upper box shows a sample for zero-shot learning, and the lower one shows a sample for \(K\)-shot learning.





**System:**

You are a sentiment classifier. For each message, predict the intensity of an expressed private state as (low, low-medium, medium, medium-high, or high) given the type of the private state, followed by the whole sentence for context, followed by the expression itself at the end. Return your prediction without adding any additional information, comment, or formatting.

**User:**

Text: [Test Sample]

Intensity:

**System:**

You are a sentiment classifier. For each message, predict the intensity of an expressed private state as (low, low-medium, medium-high, or high) given the type of the private state, followed by the whole sentence for context, followed by the expression itself at the end. Return your prediction without adding any additional information, comment, or formatting. Here are some samples:

Text: [Support Sample #1]

Intensity: [Label of Support Sample #1]

...

Text: [Support Sample #K]

Intensity: [Label of Support Sample #K]

**User:**

Text: [Test Sample]

Intensity:

Figure 6: Prompt templates for **MPQA Intensity** task. The upper box shows a sample for zero-shot learning, and the lower one shows a sample for \(K\)-shot learning.

Figure 7: Prompt templates for **AG News** task. The upper box shows a sample for zero-shot learning, and the lower one shows a sample for \(K\)-shot learning.





**System:**

You are a sentiment classifier. For each message, predict the number of stars (1, 2, 3, 4, or 5) given by a user based on the given review text. Return the predicted number of stars without any additional comment.

**User:**

Review: [Test Sample]

Stars:

**System:**

You are a sentiment classifier. For each message, predict the number of stars (1, 2, 3, 4, or 5) given by a user based on the given review text. Return the predicted number of stars without any additional comment. Here are some samples:

Review: [Support Sample #1]

Stars: [Label of Support Sample #1]

...

Review: [Support Sample #K]

Stars: [Label of Support Sample #K]

**User:**

Review: [Test Sample]

Stars:

Figure 8: Prompt templates for **Amazon Reviews** task. The upper box shows a sample for zero-shot learning, and the lower one shows a sample for \(K\)-shot learning.

\begin{table}
\begin{tabular}{l|c c c c c c c c c c} \hline \(\alpha\) & **10** & **20** & **30** & **40** & **50** & **60** & **70** & **80** & **90** & **100** \\ \hline
1 & **76.4\({}_{7.3}\)** & 80.3\({}_{1.0}\) & 82.9\({}_{3.1}\) & 84.3\({}_{2.8}\) & 86.3\({}_{1.6}\) & 88.6\({}_{1.2}\) & 88.1\({}_{1.3}\) & 90.3\({}_{1.5}\) & 90.2\({}_{0.5}\) & 90.6\({}_{1.2}\) \\
2 & **76.4\({}_{7.3}\)** & **81.6\({}_{1.1}\)** & **83.5\({}_{1.4}\)** & 85.2\({}_{1.9}\) & 86.5\({}_{0.6}\) & 87.2\({}_{5.2}\) & 88.9\({}_{1.9}\) & 90.5\({}_{1.4}\) & 90.7\({}_{1.0}\) & 91.0\({}_{0.6}\) \\
5 & **76.4\({}_{7.4}\)** & 81.3\({}_{3.8}\) & 83.4\({}_{2.2}\) & **86.7\({}_{1.9}\)** & **87.4\({}_{2.6}\)** & 87.5\({}_{2.1}\) & 88.9\({}_{1.7}\) & 90.2\({}_{0.9}\) & 91.0\({}_{1.1}\) & 91.1\({}_{0.9}\) \\
10 & **76.4\({}_{7.4}\)** & 80.7\({}_{2.6}\) & 83.1\({}_{3.5}\) & 84.9\({}_{1.6}\) & 86.7\({}_{1.3}\) & **89.5\({}_{1.7}\)** & **89.8\({}_{1.9}\)** & 90.0\({}_{0.4}\) & **91.0\({}_{0.6}\)** & 91.0\({}_{1.5}\) \\
20 & **76.4\({}_{7.7}\)** & 80.4\({}_{1.4}\) & 80.4\({}_{5.6}\) & 83.2\({}_{3.7}\) & 84.5\({}_{1.5}\) & 86.5\({}_{1.8}\) & 88.2\({}_{0.6}\) & 89.4\({}_{1.1}\) & 90.3\({}_{1.0}\) & 91.2\({}_{0.7}\) \\
50 & **76.4\({}_{7.7}\)** & 79.8\({}_{1.0}\) & 83.2\({}_{1.8}\) & 84.8\({}_{1.9}\) & 85.9\({}_{1.8}\) & 88.3\({}_{2.1}\) & 89.1\({}_{2.5}\) & 90.0\({}_{1.8}\) & 90.7\({}_{1.3}\) & **91.3\({}_{1.4}\)** \\ \hline \end{tabular}
\end{table}
Table 8: The average micro-F1 (%) results for **MPQA Polarity** when \(M=10\) (i.e., selection size) in the “FLAN-T5-Rep(En)-UnRep” approach, calculated over five different seeds for the sampling phase. The sub-columns denote \(K\) (i.e., total support set size), and the subscripts indicate the standard deviation.





\begin{table}
\begin{tabular}{l|c c c c c c c c c c c c} \hline
**Model Name** & **0****5** & **10** & **20** & **30** & **40** & **50** & **60** & **70** & **80** & **90** & **100** & **Full** \\ \hline Majority Baseline & 54.8 & & & & & & & & & & & \\
**Random Sampling** & & & & & & & & & & & & & \\ BART-Random & & 73.2\({}_{5,1}\) & 78.9\({}_{4.3}\) & & & & & & & & & & \\ FLAN-T5-Random & & 76.5\({}_{2.4}\) & 80.6\({}_{2.4}\) & 81.7\({}_{2.7}\) & 82.9\({}_{1.2}\) & 85.3\({}_{1.4}\) & 86.8\({}_{0.9}\) & 86.5\({}_{1.3}\) & 87.2\({}_{1.3}\) & 88.3\({}_{1.4}\) & 88.4\({}_{0.9}\) & **94.2** \\ \hline
**Representative Sampling** & & & & & & & & & & \\ BART-Rep(En) & & 71.4\({}_{0.9}\) & 76.1\({}_{2.6}\) & & & & & & & & \\ FLAN-T5-Rep(En) & & 77.5\({}_{1.1}\) & 79.3\({}_{1.8}\) & 80.8\({}_{0.6}\) & 82.6\({}_{1.7}\) & 85.3\({}_{2.7}\) & 87.7\({}_{0.7}\) & 87.7\({}_{2.0}\) & 87.7\({}_{1.1}\) & 88.7\({}_{2.6}\) & 89.2\({}_{1.6}\) \\ \hline
**Iterative Approaches** & & & & & & & & & & \\ BARR-Rep(En)-Un & & & & & & & & & & \\ BART-Rep(En)-Rep(Sc) & & 77.8\({}_{5.5}\) & 80.7\({}_{2.0}\) & 81.7\({}_{3.0}\) & 80.5\({}_{4.2}\) & 84.6\({}_{2.4}\) & 83.5\({}_{2.6}\) & 84.7\({}_{4.8}\) & 87.0\({}_{1.3}\) & 87.8\({}_{2.9}\) & 87.5\({}_{2.5}\) \\ BART-Rep(En)-Rep(Sc) & & 77.8\({}_{5.5}\) & 77.5\({}_{4.9}\) & 77.4\({}_{3.4}\) & 82.1\({}_{4.1}\) & 81.7\({}_{5.4}\) & 82.9\({}_{3.9}\) & 84.9\({}_{2.0}\) & 84.3\({}_{2.5}\) & 86.0\({}_{2.0}\) & 86.6\({}_{1.9}\) \\ BART-Rep(En)-Rep(En)-Rep(Eng) & & **77.8\({}_{5.5}\)** & 79.8\({}_{3.9}\) & 81.2\({}_{3.1}\) & 80.4\({}_{3.9}\) & 84.1\({}_{3.3}\) & 84.6\({}_{2.7}\) & 87.4\({}_{1.2}\) & 86.4\({}_{1.4}\) & 85.7\({}_{2.5}\) & 88.2\({}_{0.8}\) \\ BART-Rep(En)-Un/Re & & 77.8\({}_{5.5}\) & 78.3\({}_{3.8}\) & 80.2\({}_{5.0}\) & 87.4\({}_{3.5}\) & 83.5\({}_{2.4}\) & 82.9\({}_{5.5}\) & 85.1\({}_{1.9}\) & 89.4\({}_{2.5}\) & 85.5\({}_{0.8}\) & 86.2\({}_{1.5}\) \\ BART-Rep(En)-ClUtu(Sc) & & **77.8\({}_{5.5}\)** & 80.1\({}_{4.1}\) & 81.3\({}_{4.3}\) & 83.6\({}_{2.5}\) & 84.6\({}_{2.3}\) & 85.2\({}_{8.5}\) & 85.3\({}_{1.2}\) & 83.2\({}_{4.8}\) & 86.3\({}_{2.1}\) & 87.2\({}_{2.5}\) \\ BART-Rep(En)-Clutu(en) & & **77.8\({}_{5.5}\)** & 79.2\({}_{4.4}\) & 83.0\({}_{2.8}\) & 83.4\({}_{2.4}\) & 84.0\({}_{6.4}\) & 84.1\({}_{2.2}\) & 82.2\({}_{3.4}\) & 84.8\({}_{6.6}\) & 86.6\({}_{1.8}\) & 87.2\({}_{1.6}\) \\ FALAN-T5-Rep(En)-Un & & 77.5\({}_{1.1}\) & 81.2\({}_{5.8}\) & 84.1\({}_{3.0}\) & **85.8\({}_{2.7}\)** & 88.2\({}_{1.9}\) & 88.4\({}_{1.9}\) & 89.7\({}_{1.0}\) & **90.8\({}_{0.8}\)** & 90.7\({}_{1.1}\) & **91.4\({}_{0.8}\)** \\ FLAN-T5-Rep(En)-Rep(Sc) & & 77.5\({}_{1.1}\) & 80.8\({}_{4.8}\) & 82.6\({}_{1.2}\) & 84.9\({}_{2.3}\) & 87.4\({}_{0.8}\) & 86.5\({}_{2.6}\) & 87.4\({}_{2.4}\) & 89.6\({}_{1.1}\) & 89.9\({}_{1.5}\) & 90.6\({}_{1.4}\) \\ FLAN-T5-Rep(En)-Rep(En) & & 77.5\({}_{1.1}\) & 80.4\({}_{0.2}\) & 82.1\({}_{7.4}\) & 84.0\({}_{2.8}\) & 85.0\({}_{6.6}\) & 85.5\({}_{1.2}\) & 87.0\({}_{1.5}\) & 86.4\({}_{2.0}\) & 87.4\({}_{0.7}\) & 88.1\({}_{1.4}\) \\ FLAN-T5-Rep(En)-ClutuRep & & 77.5\({}_{1.1}\) & 82.4\({}_{2.4}\) & 84.1\({}_{4.8}\) & 85.3\({}_{1.0}\) & 87.2\({}_{0.8}\) & 88.4\({}_{1.7}\) & 89.0\({}_{1.2}\) & 82.5\({}_{1.8}\) & 87.3\({}_{0.9}\) & 90.1\({}_{0.5}\) \\ FLAN-T5-Rep(En)-Clutu(Sci) & & 77.5\({}_{1.1}\) & 82.4\({}_{2.4}\) & 85.2\({}_{6.8}\) & 85.2\({}_{0.8}\) & **88.3\({}_{0.9}\)** & 89.1\({}_{0.5}\) & 89.6\({}_{0.8}\) & 89.5\({}_{0.8}\) & 90.4\({}_{0.7}\) & 90.4\({}_{0.7}\) \\ FLAN-T5-Rep(En)-Clutu(En) & & 77.5\({}_{1.1}\) & 81.5\({}_{1.8}\) & 85.0\({}_{2.2}\) & 85.5\({}_{1.4}\) & 87.5\({}_{1.4}\) & 88.8\({}_{1.5}\) & **89.8\({}_{1.0}\)** & 89.7\({}_{1.2}\) & **91.0\({}_{>.5}\)** & 90.8\({}_{0.8}\) \\ \hline
**In-Context Learning** & & & & & & & & & & \\ Gemma 2-Random & 67.0 & **71.9\({}_{1.9}\)** & 73.0\({}_{2.1}\) & 75.0\({}_{3.3}\) & 76.1\({}_{3.7}\) & & & & & & & \\ German 2-Custom & 73



\begin{table}
\begin{tabular}{l|c c c c c c c c c c c c c} \hline
**Model Name** & **0** & **5** & **10** & **20** & **30** & **40** & **50** & **60** & **70** & **80** & **90** & **100** & **Full** \\ \hline Majority Baseline & 20.0 & & & & & & & & & & & & & \\
**Random Sampling** & & & & & & & & & & & & & & \\ BART-Random & & & & & & & & & & & & & & \\ FLAN-T5-Random & & & & & & & & & & & & & & \\ FALN-T5-Random & & & & & & & & & & & & & & \\  & & & & & & & & & & & & & \\ \multicolumn{10}{l}{**Representative Sampling**} \\ BART-Rep(En) & & & & & & & & & & & & & & & & \\ FlAN-T5-Rep(En) & & & & & & & & & & & & & \\ FlAN-T5-Rep(En) & & & & & & & & & & & & & \\ FlAN-T5-Rep(En)-Un & & & & & & & & & & & & & \\ Grama 2-Custom & & & & & & & & & & & & & \\ FlAN-T5-Rep(En)-Rep(Sc) & & & & & & & & & & & & & \\ FlAN-T5-Rep(En)-Rep(En) & & & & & & & & & & & & & \\ FlAN-T5-Rep(En)-UnRep & & & & & & & & & & & & & \\ FlAN-T5-Rep(En)-ClUtn(Sc) & & & & & & & & & & & & & \\ FlAN-T5-Rep(En)-ClUtn(Eng) & & & & & & & & & & & & & \\ FlAN-T5-Rep(En)-ClUtn(Eng) & & & & & & & & & & & & & \\ FlAN-T5-Rep(En)-ClUtn(Eng) & & & & & & & & & & & & & \\ Flan-T5-Rep(En)-ClUtn(Eng) & & & & & & & & & & & & & \\ Flan-Context Learning & & & & & & & & & & & & & \\ Gemma 2-Random & & & & & & & & & & & & & \\ Glama 3.1-Random & & & & & & & & & & & & & \\ Llama 3.1-Custom & & & & & & & & & & & & & \\ Mistral v0.3-Random & & & & & & & & & & & & & \\ Mistral v0.3-Custom & & & & & & & & & & & & & \\ \end{tabular}
\end{table}
Table 12: The average micro-F1 (%) results for **AG News** when \(M=10\) (i.e., selection size) in iterative approaches, calculated over five different seeds for the sampling phase. The sub-columns denote \(K\) (i.e., total support set size), and the subscripts indicate the standard deviation.

\begin{table}
\begin{tabular}{l|c c c c c c c c c c c} \hline