PolyLingua: Margin-based Inter-class Transformer for Robust Cross-domain Language Detection
Not on the map. Why?
Abstract (arXiv)
Language identification is a crucial first step in multilingual systems such as chatbots and virtual assistants, enabling linguistically and culturally accurate user experiences. Errors at this stage can cascade into downstream failures, setting a high bar for accuracy. Yet, existing language identification tools struggle with key cases -- such as music requests where the song title and user language differ. Open-source tools like LangDetect, FastText are fast but less accurate, while large language models, though effective, are often too costly for low-latency or low-resource settings. We introduce PolyLingua, a lightweight Transformer-based model for in-domain language detection and fine-grained language classification. It employs a two-level contrastive learning framework combining instance-level separation and class-level alignment with adaptive margins, yielding compact and well-separated embeddings even for closely related languages. Evaluated on two challenging datasets -- Amazon Massive (multilingual digital assistant utterances) and a Song dataset (music requests with frequent code-switching) -- PolyLingua achieves 99.25% F1 and 98.15% F1, respectively, surpassing Sonnet 3.5 while using 10x fewer parameters, making it ideal for compute- and latency-constrained environments.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 12 of its 24 references that are in the map. First posted on arXiv 9 Dec 2025.
Builds on
12 of 24 references.
References · 12
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 12,049
- 2019Unsupervised Cross-lingual Representation Learning at Scalecited by 3,935
- 2018Unsupervised Feature Learning via Non-Parametric Instance-level Discriminationcited by 1,845
- 2016Bag of Tricks for Efficient Text Classificationcited by 876
- 2024Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inferencecited by 554
- 2021Muppet: Massive Multi-task Representations with Pre-Finetuningcited by 192
- 2021ExT5: Towards Extreme Multi-Task Scaling for Transfer Learningcited by 161
- 2023GLiNER: Generalist Model for Named Entity Recognition using Bidirectional Transformercited by 88
- 2020Unsupervised Feature Learning by Cross-Level Instance-Group Discriminationcited by 51
- 2018Automatic Language Identification in Texts: A Surveycited by 41
- 2024Prompt Engineering Using GPT for Word-Level Code-Mixed Language Identification in Low-Resource Dravidian Languagescited by 2
Built on by
Not cited yet.