TL;DR
Large language models performing in-context learning (ICL) often suffer from severe per-class accuracy imbalances, frequently favoring certain output classes over others. FuRud (Fuzzy Rule Optimization based Debiasing) fixes this by learning human-readable, triangular fuzzy membership functions that asymmetrically amplify or dampen specific probability ranges for each class. By optimizing these rules via simulated annealing, FuRud boosts average classification accuracy by 21% (relative) and slashes pairwise class accuracy bias (COBias) by 56% over standard ICL across seven benchmarks.
What Problem Does This Paper Address?
When using ICL for multi-class classification, LLMs are notoriously sensitive to prompt formats, demonstration ordering, and token frequencies. This creates a severe output distribution skew known as class accuracy imbalance (or COBias, which measures the average pairwise difference between per-class accuracies). For instance, an LLM might assign consistently high probabilities to "True" over "False" on entailment tasks, causing near-perfect accuracy on one class but abysmal accuracy on the other.
While existing debiasing strategies—like output distribution calibration or uniform class probability re-weighting—can boost overall accuracy, they act largely as black boxes. They fail to answer:
- Which specific classes actually need correction?
- Why do they need correction, and how can we apply nuanced, range-specific adjustments (e.g., boosting a class when its predicted probability is ambiguous/low, without uniformly scaling all its outputs)?
Methods
FuRud treats probability correction through the lens of fuzzy rule-based systems, combining human-readable membership functions with combinatorial optimization:
- Triangular Membership Functions: Instead of multiplying a class’s probability by a flat scalar weight, FuRud maps class output probabilities through triangular membership functions ($f_k$). The candidate pool consists of 19 functions spanning four granularities (slopes of $\pm 1, \pm 2, \pm 4, \pm 8$) plus a crucial "Don’t Change" identity function ($y = x$). This allows the model to leave well-calibrated classes untouched while applying sharp or smooth non-linear corrections to miscalibrated ranges in other classes.
- Single-Rule Architecture: The debiaser can be interpreted as a single fuzzy rule: $$\text{If class 1 is } A_1 \text{ and } \dots \text{ and class } N \text{ is } A_N \text{ then predict } \arg\max_j f_{A_j}(p_{mj})$$
- Multi-Objective Simulated Annealing: Selecting the best membership function $\kappa_i$ for each class $i$ is formulated as an integer programming problem. FuRud uses Simulated Annealing (SA) to minimize an energy function balancing three objectives on a small optimization set:
- Maximize overall accuracy ($Z^{\text{Acc}}$)
- Minimize class-pair accuracy discrepancy ($Z^{\text{COBias}}$)
- Penalize extreme low-accuracy classes below a threshold $\lambda = 0.5$ ($Z^{\text{Extreme}}$)
Datasets
The authors evaluated FuRud across seven diverse text classification benchmarks (prompting primarily with Llama-2-13B, alongside Llama-2-7B and GPT2-XL):
- General / Topic Classification: AGNews (4 classes), DBpedia (14 classes)
- Sentiment Analysis: SST-5 (5 classes)
- Question Classification: TREC (6 classes)
- Natural Language Inference: RTE (binary)
- Biomedical Domain: DDI (drug-drug interaction, 5 classes), PubMedQA (biomedical QA, 3 classes)
No new datasets were introduced; standard splits and preprocessing from prior literature were used.
Key Insights and Ideas
- Intra-Class Probability Ranges Matter: Skew does not mean an entire class is uniformly suppressed. Often, a model performs poorly specifically on examples falling into low-to-medium probability intervals (e.g., in AGNews' Business class, samples in $[0.0, 0.4]$ exhibited 0–9% accuracy). FuRud's piecewise triangular functions specifically amplify these misestimated ranges without blindly inflating the whole class.
- The "Don't Change" Function is Essential: Forcing transformations on every class hurts calibration. Ablation experiments showed that without the identity function, COBias increased by 6%. On DBpedia (14 classes), FuRud assigned "Don't Change" to 4 classes, preventing over-correction on already reliable outputs.
- Mitigating Letter-Choice Bias: When prompted with multiple-choice letters ("A", "B", "C") rather than natural semantic tokens, LLMs frequently collapse to specific letters (e.g., overwhelmingly predicting "B" for Sports in AGNews). FuRud rescues these scenarios, raising letter-prompt accuracy by 44% relative.
Key Results
- Overall Benchmark Performance (Llama-2-13B, 1-shot):
- Accuracy: FuRud reached 72.0% average accuracy across the 7 datasets, outperforming raw ICL (59.4%), Batch Calibration (BC, 62.6%), and Nonlinear Integer Programming (DNIP, 69.2%).
- COBias: FuRud dropped the average COBias from 40.5% (ICL) down to 17.8% (a 56% relative reduction), performing on par with DNIP (14.3%) and significantly better than BC (27.9%).
- Hard Classes: On the challenging DDI dataset, FuRud skyrocketed accuracy from 7.2% (ICL) to 69.3%.
- Few-Shot Data Efficiency: FuRud does not require huge validation sets. With as few as 10 optimization examples, it achieved an average 9% relative accuracy improvement and an 18% COBias reduction over baseline ICL on TREC and SST-5.
- Letter Option Prompts: Across all 7 datasets, FuRud improved average accuracy from 36.9% to 53.1% and reduced COBias from 47.2% to 21.6%.
Limitations and Future Work
- Model Scale: Primary experiments focused on smaller open models (GPT2-XL, Llama-2-7B, Llama-2-13B); evaluations on frontier-scale models (70B+ or closed API models) remain for future work.
- Inter-Class Interactions: FuRud learns independent 1D membership functions per class. While transparent, this single-rule approach cannot explicitly capture complex multi-attribute feature correlations between competing classes.
- Scope: The evaluation is restricted to classification tasks. Extending interpretable fuzzy debiasing to free-form text generation, reasoning chains, and multimodal inputs is left to future exploration.
Summary updated