Representation Learning Enables Language Identification in Zero - and Few -Shot Settings

Rocco Tripodi


Abstract
Language Identification (LID) is a key component of multilingual NLP pipelines and multilingual corpus construction. LID errors can create spurious text–language associations, harming downstream model quality, especially for low-resource languages and fine-grained taxonomies involving closely related languages and dialects. We propose LIBE, a representation-based approach that embeds input texts and natural-language descriptions into a shared semantic space with a bi-encoder, enabling LID via similarity search. This formulation supports data-efficient learning and the addition of new languages through their descriptions. To improve discrimination in ambiguous or low-resource cases, we also introduce an optional cross-encoder re-ranking stage. Across multiple benchmarks, LIBE achieves competitive performance with strong LID systems when initialized from pretrained multilingual encoders, while requiring substantially less task-specific LID supervision in several adaptation settings. The hybrid bi-encoder– cross-encoder formulation further improves robustness in challenging open-set scenarios, achieving up to 90% F1 with as few as five labeled examples. Code and data are available at https://github.com/cafoscari-nlp/LIBE.
Anthology ID:
2026.tacl-1.118
Volume:
Transactions of the Association for Computational Linguistics, Volume 14
Month:
Year:
2026
Address:
Cambridge, MA
Venue:
TACL
SIG:
Publisher:
MIT Press
Note:
Pages:
2555–2573
Language:
URL:
https://aclanthology.org/2026.tacl-1.118/
DOI:
10.1162/tacl.a.815
Bibkey:
Cite (ACL):
Rocco Tripodi. 2026. Representation Learning Enables Language Identification in Zero - and Few -Shot Settings. Transactions of the Association for Computational Linguistics, 14:2555–2573.
Cite (Informal):
Representation Learning Enables Language Identification in Zero - and Few -Shot Settings (Tripodi, TACL 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.tacl-1.118.pdf