Introduction
Automatic Speech Recognition (ASR) has seen significant advancements for high-resource languages, yet the vast majority of the world's ~7,000 languages remain underserved. A primary bottleneck is the Language Model (LM) component, which typically requires substantial text data for training. While Large Language Models (LLMs) are powerful candidates for this role, they often fail to generalize to endangered languages not present in their training corpora.
This paper introduces In-context Language Learning (ICLL), a novel approach that enables LLMs to adapt to entirely new languages using only a few hundred text samples provided within the context window. By leveraging model log-probabilities for hypothesis re-ranking rather than explicit instructions, ICLL achieves performance comparable to specialized language models without the need for traditional fine-tuning.
Methodology
The proposed ICLL pipeline consists of two main stages:
- Hypothesis Generation: A pre-trained acoustic model (e.g., Wav2Vec2-based
mms-300) generates an "n-best" list of candidate transcriptions for a given audio segment. - ICLL Re-ranking: An LLM (specifically Llama-3-8B) evaluates these candidates. Instead of a zero-shot prompt, the model is provided with relevant text samples from the target language.
Technical Innovations
- Probability-based Scoring: Traditional In-Context Learning (ICL) often relies on instruction-following (e.g., "choose the best sentence"), which breaks down for unseen languages. ICLL instead uses the LLM’s internal log-probability to score candidates based on their likelihood given the provided context.
- Retrieval-Augmented Context: To ensure linguistic relevance, the system uses SONAR embeddings to retrieve training sentences most similar to the current ASR hypothesis. This example-specific retrieval proves more effective than using a static corpus-level context.
Datasets
The study evaluates ICLL on four linguistically diverse endangered languages that were absent from Llama-3's training data. These include Khinalug (Northeast Caucasian), Kichwa (Quechuan), Mboshi (Bantu), and Japhug (Sino-Tibetan).
Key Insights
- Rapid Pattern Acquisition: LLMs demonstrate a remarkable ability to pick up structural patterns of unknown languages. For instance, in Khinalug, providing 50 relevant samples reduced the model's perplexity from 1142 to 36, indicating a swift reduction in uncertainty.
- Instruction vs. Probability: For languages outside the training set, the model's ability to follow complex reasoning instructions diminishes. However, its raw statistical engine remains highly effective at pattern matching through probability scoring.
- Robustness to Noise: Interestingly, using a "noisy" ASR hypothesis to retrieve context samples performs nearly as well as using ground-truth transcripts ("Oracle" retrieval), demonstrating the system's robustness.
Results
The ICLL approach yielded significant reductions in Word Error Rate (WER) across all tested languages. As shown in Table 2, the ICL (topk) strategy—which uses retrieved context samples—consistently improved upon the baseline acoustic model. Notably, in Kichwa and Mboshi, this LLM-based re-ranker outperformed dedicated n-gram and transformer-based language models that were explicitly trained on those languages.
Performance was found to scale with context size, improving as the number of samples increased up to approximately 150. In contrast, instruction-based methods often saw performance degradation as prompts became more complex, highlighting the superiority of the probability-based re-ranking approach for unseen languages.
Conclusion and Future Work
ICLL provides a "plug-and-play" solution for improving ASR in low-resource settings without requiring parameter updates or extensive compute. Future research will focus on expanding the scope to languages with diverse scripts and integrating ICLL more deeply with acoustic models to move beyond post-processing re-ranking.
Summary updated