Towards Universal Calibration for In-Context Classification
cs.LG, cs.CL
Submitted: 2026-10-12
Updated: 2026-10-12
Comments: 30 pages, 11 figures, 19 tables, AACL-IJCNLP Findings accepted
Code: https://github.com/AwikDhar/icl-calibration
License: http://creativecommons.org/licenses/by/4.0/
The gist: In-Context Learning (ICL) has received a lot of interest recently due to its ability to improve classification accuracy for new tasks without having to fine-tune the model over these tasks.
Terminology
Abstract
In-Context Learning (ICL) has received a lot of interest recently due to its ability to improve classification accuracy for new tasks without having to fine-tune the model over these tasks. However, the impact of ICL on calibration has been far less studied. Recent work has shown that ICL can have a negative impact on calibration due to biased selection of in-context examples. The existing methods for improving ICL calibration require additional task and model-specific training, detracting from the no-fine-tuning convenience of ICL. In this work, we introduce CALIBFORMER, a universal ICL calibrator for classification tasks, that generalizes to new models and tasks without further fine-tuning on these tasks. Specifically, we design a transformer-based calibrator which uses the model predictions on in-context examples to predict a confidence score for the test input. We show that the calibrator trained on three models and ten tasks, is able to generalize/calibrate ICL predictions on several new tasks and four LLMs unseen during training. Even for frontier models like Gemini, CALIBFORMER is able to obtain over 50% reduction in calibration error.
Sources
- Phi-4-Mini Technical Report: Compact yet Powerful Multimodal Language Models via Mixture-of-LoRAs
- Gemini 2.5: Pushing the Frontier with Advanced Reasoning, Multimodality, Long Context, and Next Generation Agentic Capabilities
- Gemma 4 Technical Report
- The Llama 3 Herd of Models
- MetaTool Benchmark for Large Language Models: Deciding Whether to Use Tools and Which to Use
- Rectifying Demonstration Shortcut in In-Context Learning
- What Disease does this Patient Have? A Large-scale Open Domain Question Answering Dataset from Medical Exams
- gpt-oss-120b & gpt-oss-20b Model Card
- In-Context Learning Enhanced Credibility Transformer
- The Transient Nature of Emergent In-Context Learning in Transformers
- What Large Language Models Know and What People Think They Know
- Qwen3 Technical Report
Related papers
- Polynomial-Augmented Neural Networks (PANNs) with Weak Orthogonality Constraints for Enhanced Function and PDE Approximation
- AIRL-S: Unifying Reinforcement Learning and Search-Based Test-Time Scaling via Adversarial Inverse Reinforcement Learning
- Transformers as Bayesian In-Context Experimenters: Smoothness-Adaptive Efficient ATE Estimation
- Convergence issues in Relational Concept Analysis based on AOC-posets
- Beliefs Beyond Posteriors: The Predictive Cost of ELBO Binding
- Understanding Diffusion Models via Ratio-Based Function Approximation with SignReLU Networks