TL;DR
Large Language Models (LLMs) struggle with zero-shot classification due to prompt sensitivity, especially regarding the choice of class labels. This paper introduces LOADS, a novel post-hoc method that optimizes label sets by analyzing neuron activation distributions, significantly improving classification performance without requiring additional training or labeled data.
What Problem Does This Paper Address?
In-context learning (ICL) with Large Language Models (LLMs) has shown great promise for classification tasks. However, its performance is highly sensitive to how prompts are designed. One critical but underexplored aspect is the selection of class labels within the prompt. For tasks like stance classification, where labels can be ambiguous (e.g., "agree" vs. "support"), practitioners face a dilemma: which words to use, and in what order? This ambiguity can lead to suboptimal performance. This paper aims to systematically investigate the impact of label set design (lexical choice, order, and elaboration) on zero-shot ICL performance and proposes a method to automatically select the best label sets.
Methods
The core of this paper is the development of LOADS (Label set Optimization via Activation Distribution kurtosis). The method is based on an empirical observation: prompts with optimal label sets tend to activate fewer "outlier" neurons in the LLM's feed-forward networks.
Here's how LOADS works:
- Candidate Label Set Generation: The authors first create a pool of potential label sets. This involves collecting original dataset labels, expanding them with synonyms using tools like WordNet and LLMs (like Claude), and then manually filtering for relevance.
- Neuron Activation Analysis: For each candidate label set, the LLM processes a small set of unlabeled data. The activation patterns of neurons in the final feed-forward network (FFN) layer are recorded.
- Kurtosis Measurement: Kurtosis, a statistical measure of the "tailedness" of a probability distribution, is used to quantify the degree of outlier activations. A higher kurtosis indicates more outliers.
- Label Set Ranking and Selection: Candidate label sets are ranked based on their average kurtosis scores. The set with the lowest average kurtosis (meaning fewer outlier activations) is selected as the optimal label set.
This approach is "post-hoc," meaning it's applied after the LLM is trained and doesn't require gradient updates or labeled data for the selection process itself.
Datasets
The study primarily uses stance classification datasets, chosen for their rich and varied label inventories. These include:
- Binary Classification: scd, perspectrum, snopes, ibmcs
- Multi-class Classification: vast, emergent, semeval, rumoureval, arc
The authors also experiment with topic classification datasets (AG News and TweetTopic) to demonstrate the generalizability of their findings.
Key Insights and Ideas
- Lexical Choice is King: The specific words chosen for class labels have a significant impact on zero-shot ICL performance, often more so than label order or elaboration.
- Outlier Neurons as a Signal: The number of outlier neurons in the LLM's FFNs is negatively correlated with classification performance. This suggests that well-chosen labels lead to more "focused" neuron activations.
- LOADS is Data-Efficient: The method works effectively with as few as 100 unlabeled samples for label selection, making it practical.
- Cross-Lingual Transferability: Optimal English label sets selected by LOADS can also improve performance on non-English datasets when English instructions are used.
- Model-Dependent Labels: While LOADS-selected label sets show transferability across datasets for a specific LLM, they tend to be model-dependent rather than dataset-dependent, highlighting the LLM's internal representation.
Key Results
- LOADS consistently outperforms using original dataset label words, achieving maximum performance gains of 0.54 to 0.76 across various datasets, models, and languages.
- The gap between the best and worst performance due to label lexical choice can exceed 0.1 or even 0.2 for many datasets.
- Label order has a limited impact on average, but re-ordering poorly performing label sets can lead to substantial improvements.
- Label elaboration (adding descriptive phrases) generally has a minimal impact, and in some cases, can even decrease performance.
- LOADS shows robustness to different prompt templates.
Limitations and Future Work
- Task Specificity: The experiments primarily focused on stance classification. While topic classification was also tested, broader validation across more diverse NLP tasks and domains would be beneficial.
- Model Coverage: The study used several LLMs but acknowledges that including other popular models (like Phi or Mistral) could provide a more comprehensive understanding.
- Language Bias: While cross-lingual transferability was explored, more extensive multilingual testing is needed.
- Computational Cost: Although data-efficient, LOADS still requires running inference on a subset of data, which might be challenging for extremely large models or tasks with many categories.
- Data Imbalance: The effectiveness of LOADS might vary on highly imbalanced validation sets.
- Future Directions: The authors suggest exploring potential biases introduced by label set choices and their implications for fairness and inclusivity. Further research into the relationship between LOADS-selected labels and LLMs' internal understanding of concepts is also proposed.
Summary updated