Introduction
While modern Automatic Speech Recognition (ASR) systems achieve remarkable accuracy for high-resource languages like English or Mandarin, they often fail for the world’s approximately 7,000 endangered languages. These languages exist in a "data desert," lacking the vast quantities of digitized text and audio required for traditional supervised fine-tuning. While Large Language Models (LLMs) are increasingly multilingual, they typically only support a small fraction of human languages.
This paper explores a novel approach: In-context Language Learning (ICLL). Rather than updating a model's weights through fine-tuning, the researchers investigate whether an LLM can "learn" a completely new language on the fly by providing a few hundred sample sentences within its prompt. This method leverages the model's existing linguistic intuition to assist in speech recognition for languages it has never seen during training.
Datasets and the "Data Desert"
The study focuses on four linguistically diverse endangered languages confirmed to be absent from the training data of the LLM used (Llama-3-8B). These languages represent various language families and audio sources, highlighting the breadth of the challenge.
As shown in Table 1, the training sets for these languages are extremely small, with some having as little as two hours of audio data. This scarcity makes traditional deep learning approaches impractical and necessitates the use of few-shot learning techniques.
Methodology: The ICLL Framework
The proposed ICLL framework utilizes an LLM as a sophisticated language model for re-ranking ASR hypotheses. The process involves three main steps:
- Hypothesis Generation: A pre-trained acoustic model (Wav2Vec2 mms-300) generates a "top-10" list of candidate transcriptions for a given audio segment.
- Sample Retrieval: To prime the LLM with the target language's patterns, relevant text samples are retrieved from the small available training set. The authors tested several strategies, including corpus-level (random) retrieval and example-specific retrieval using SONAR embeddings to find sentences semantically or phonetically similar to the ASR hypotheses.
- Probability-based Re-ranking: Instead of using instruction-based prompts (e.g., "Choose the best transcription"), which proved unreliable for unseen languages, the researchers calculated the log-probability of each hypothesis. By combining the LLM's probability score with the acoustic model's score, the system identifies the most likely transcription.
Key Results and Insights
The experiments yielded several significant findings regarding the capabilities of LLMs in low-resource settings.
Perplexity and Language Acquisition
The impact of in-context samples on the model's understanding was dramatic. For Khinalug, the perplexity (a measure of how well a probability distribution predicts a sample) dropped from 1142 in a zero-shot setting to just 29 when provided with 100 relevant "oracle" samples. This indicates that the model can rapidly internalize the syntax and vocabulary of a new language from a very limited context.
ASR Performance
The ICLL approach consistently outperformed the baseline acoustic model. More importantly, it often matched or exceeded the performance of dedicated language models (n-gram and transformer-based) that were specifically trained on the target languages.
As seen in Table 4, for Kichwa, the ICL (topk) strategy achieved a Word Error Rate (WER) of 17.00, outperforming the dedicated n-gram model's WER of 17.72. Similar competitive results were observed across the other three languages, demonstrating that "on-the-fly" learning can be as effective as specialized training.
Strategic Observations
- Probability over Instructions: For languages outside the model's training set, the internal probability distribution is a much more reliable signal than instruction-following.
- Retrieval Strategy: Example-specific retrieval (finding samples relevant to the specific query) is significantly more effective than providing a static set of corpus-level samples.
- Text vs. Audio Embeddings: Text-based embeddings of ASR hypotheses were found to be more effective for sample retrieval than raw audio embeddings, likely due to the maturity of text embedding models like SONAR.
Limitations and Future Directions
While promising, the ICLL approach has limitations. It requires access to the model's log-probabilities, making it less suitable for closed "black-box" APIs. Additionally, the finite context window of current LLMs limits the number of samples that can be provided; the authors encountered "Out of Memory" (OOM) errors when attempting to scale beyond 300 samples on standard hardware.
Future research could investigate whether larger models exhibit even stronger few-shot acquisition or how the consistency of a language's orthography (writing system) affects the model's ability to learn "on the fly."
Summary updated