Beyond Swahili: Designing Inclusive AI for Bantu Languages
Alfred Malingo discusses the unique position of Swahili in AI, arguing that its structural similarities to other Bantu languages make it a far more effective pivot language than English for developing inclusive and accurate models. He deconstructs the failures of typologically mismatched transfer from Indo-European languages and presents a case study, AfriMT-a, to demonstrate how Swahili can serve as a technical bridge for machine translation and representation learning across the Bantu language family.
Alfred Malingo’s talk explores the significant, yet complex, role Swahili has come to play in the development of AI for African languages. While its growing presence in major benchmarks and models represents progress, it also highlights the deep structural challenges inherent in building AI for the entire Bantu language family. The central argument is that Swahili, due to its linguistic properties, can serve as a powerful and structurally compatible “pivot language” to bootstrap capabilities for other Bantu languages—a role that dominant Indo-European languages like English are ill-suited to fill.
Swahili’s Digital and Institutional Advantage
Swahili’s prominence in AI is not accidental. It stems from several key factors:
- Standardization and Scale: Spoken by 100-200 million people, Swahili functions as a regional lingua franca. Decades of codification, unified spelling conventions, and its official status in institutions like the East African Community and the African Union have given it orthographic stability. This reduces the fragmentation and complexity that plague many other languages in NLP pipelines.
- Institutional Support: Long-term integration into education, media, and government has generated substantial written and spoken corpora, giving it a longer “digital runway” compared to other Bantu languages.
- Benchmark Gravity: Swahili’s early inclusion in influential cross-lingual benchmarks, such as XNLI in 2019, created a feedback loop. Its presence positioned it as the de facto Bantu representative, meaning model developers began to optimize for it and include it in standard evaluation suites. This “data gravity” ensures it is continually used in pre-training, evaluation, and fine-tuning cycles, making it a part of the default multilingual stack.
The Myth of “More Data” and Typological Mismatch
A common assumption in NLP is that performance issues in low-resource languages can be solved simply by adding more data. However, this overlooks the fundamental linguistic differences between language families. Bantu languages are not simply smaller versions of English; they possess distinct structural properties:
- Agglutinative Morphology: Bantu languages compress a large amount of grammatical information into single words through prefixes and suffixes. For example, the Swahili word
nimecheza(“I have played”) encodes the subject (“I”), tense (“have”), and the verb stem (“play”) in one unit. - Noun Class System: Grammatical agreement is enforced through a complex noun class system, which is a core feature across the family.
When models are trained predominantly on Indo-European languages like English (which are more analytic, spreading information across multiple words), a typological mismatch occurs. This leads to several critical failure modes:
- Representational Collapse: Tokenizers optimized for English fragment morphologically rich Bantu words into numerous sub-word units. The Swahili sentence
ninampenda mama yangu(“I love my mother”) is split into seven tokens, whereas the English equivalent is only four. This dilutes the representational capacity for each unit, strains the model’s fixed context window, and makes it harder to learn long-range dependencies. - Translation Hallucination: Models often prioritize generating fluent-sounding sentences over grammatically correct ones. This leads to common errors, such as breaking noun-class agreement. A model might incorrectly translate “The children are playing” as
watoto anachezainstead of the correctwatoto wanacheza, because it has learned from English that subject-verb agreement can be a “soft” constraint.
A Case Study: AfriMT-a and Swahili as a Superior Pivot
To empirically test the hypothesis that a structurally similar language would be a better pivot, the AfriMT-a project was developed. This is the first large-scale, multi-domain machine translation dataset for East Africa, covering 53 languages, including 23 with no prior digital NLP resources.
The team fine-tuned Gemma models to create Safari-270M and Safari-1B. The results were conclusive:
- Regional Models Outperform: The regionally fine-tuned Safari models consistently outperformed large, general-purpose multilingual models, with CHRF scores improving from below 20 to a range of 30-55.
- Swahili Excels as a Pivot: In downstream transfer tasks, machine translation from Swahili to other local Bantu languages significantly outperformed translation from English to those same languages.
This confirms that training on Swahili exposes the model to the correct morphological and syntactic structures, enabling more effective and efficient transfer to other languages within the same family.
Principles for Responsible Pivoting
Using Swahili as a bridge language comes with responsibilities. It should be a tool for inclusion, not erasure. The following principles are crucial:
- Evaluate Each Language Independently: The performance on the pivot language (Swahili) should never be used as a proxy for performance on a downstream language. Each language requires its own specific evaluation.
- Build Language-Specific Artifacts: After transfer, it’s essential to create dedicated test sets, error taxonomies, and evaluation metrics for each target language to check for morphological correctness and semantic adequacy.
- Use Pivot for Initialization, Not Deployment: The pivot language should be used to initialize model parameters and bootstrap data, followed by targeted data collection and fine-tuning for the specific language.
- Maintain a Human-in-the-Loop: Native speakers are indispensable for linguistic validation, iterative error analysis, and guiding data set expansion and model refinement.
The ultimate goal is to leverage Swahili’s unique position not to replace other Bantu languages, but to build an AI ecosystem that respects and understands their rich linguistic diversity.