Cardiff University | Prifysgol Caerdydd ORCA
Online Research @ Cardiff 
WelshClear Cookie - decide language by browser settings

N2C2: Nearest neighbor enhanced confidence calibration for cross-lingual in-context learning

He, Jie, Yu, Simon, Gutiérrez Basulto, Víctor ORCID: https://orcid.org/0000-0002-6117-5459 and Pan, Jeff Z. 2025. N2C2: Nearest neighbor enhanced confidence calibration for cross-lingual in-context learning. Procedia Computer Science 264 , pp. 94-103. 10.1016/j.procs.2025.07.121

[thumbnail of 1-s2.0-S1877050925021714-main.pdf]
Preview
PDF - Published Version
Available under License Creative Commons Attribution Non-commercial No Derivatives.

Download (655kB) | Preview

Abstract

Recent advancements of in-context learning (ICL) show language models can significantly improve their performance when demonstrations are provided. However, little attention has been paid to model calibration and prediction confidence of ICL in cross-lingual scenarios. To bridge this gap, we conduct a thorough analysis of ICL for cross-lingual sentiment classification. Our findings suggest that ICL performs poorly in cross-lingual scenarios, exhibiting low accuracy and presenting high calibration errors. In response, we propose a novel approach, N2C2, which employs a k-nearest neighbors augmented classifier for prediction confidence calibration. N2C2 narrows the prediction gap by leveraging a datastore of cached few-shot instances. Specifically, N2C2 integrates the predictions from the datastore and incorporates confidence-aware distribution, semantically consistent retrieval representation, and adaptive neighbor combination modules to effectively utilize the limited number of supporting instances. Evaluation on two multilingual sentiment classification datasets demonstrates that N2C2 outperforms traditional ICL. It surpasses fine tuning, prompt tuning and recent state-of-the-art methods in terms of accuracy and calibration errors.

Item Type: Article
Date Type: Published Online
Status: Published
Schools: Schools > Computer Science & Informatics
Publisher: Elsevier
ISSN: 1877-0509
Date of First Compliant Deposit: 13 October 2025
Date of Acceptance: 5 June 2025
Last Modified: 14 Oct 2025 10:45
URI: https://orca.cardiff.ac.uk/id/eprint/181622

Actions (repository staff only)

Edit Item Edit Item

Downloads

Downloads per month over past year

View more statistics