<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Thiomi - Medium]]></title>
        <description><![CDATA[Thiomi is a research and engineering effort focused on NLP for African Languages - Medium]]></description>
        <link>https://medium.com/thiomi?source=rss----fd631c3d20ff---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Thiomi - Medium</title>
            <link>https://medium.com/thiomi?source=rss----fd631c3d20ff---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 06:07:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/thiomi" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Translation experiences for the multilingual room]]></title>
            <link>https://medium.com/thiomi/translation-experiences-for-the-multilingual-room-e40f973f868b?source=rss----fd631c3d20ff---4</link>
            <guid isPermaLink="false">https://medium.com/p/e40f973f868b</guid>
            <category><![CDATA[african-languages]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[africa]]></category>
            <dc:creator><![CDATA[Hillary Mutisya]]></dc:creator>
            <pubDate>Wed, 06 May 2026 18:08:48 GMT</pubDate>
            <atom:updated>2026-05-22T16:44:27.861Z</atom:updated>
            <content:encoded><![CDATA[<p>If you ask someone on a street in Nairobi what language they speak, they won’t name just one. The answer is almost always three.</p><p>They have the language they grew up speaking at home — like Luo, Kipsigis, or Kamba. Then there’s Swahili, which gets them through the market, a conversation with a stranger, or a commute on a matatu. Finally, there’s English for the office, spreadsheets, and official paperwork. Because schools teach both Swahili and English, most people have a functional grasp of both. But the home language is what they absorbed before school ever started. It’s the one tied closest to their identity.</p><p>This multi-layered setup isn’t an anomaly; it’s the global default. What makes it fascinating from an engineering perspective is that these three tongues aren’t even distant cousins. Luo is Nilotic. Swahili is Bantu. English is Germanic. A typical person walking through Nairobi routinely jumps across three entirely separate language families every day without viewing it as anything remarkable.</p><p>Mainstream communication software completely misreads this environment. Silicon Valley design principles rely on a monolingual bias: people meet, pick a single language, and stay there.</p><p>But real multilingual rooms don’t operate on a single track. People code-switch mid-sentence, selecting words based on shifting dynamics — formality, intimacy, or who just walked through the door. It is entirely common to watch two people hold a fluid conversation where Person A speaks only Swahili, Person B responds entirely in Luo, and neither feels the need to switch.</p><p>We wanted to see what translation looks like when it’s built for natural, multi-directional rooms instead of rigid one-way bridges. We put together some applications using a deliberate mix of high- and low-resource languages reflective of Kenya’s actual landscape: English, Swahili, Kikuyu, Kamba, Kimeru, Luo, and Somali.</p><h3>Scenario 1: Two people, one phone</h3><p>Take the simplest setup: two people sharing one phone. You select your language, choose what the other person needs to hear, and tap the microphone. The phone speaks the translation aloud, and you hand it over for the reply.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FkmyMDBaABX4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkmyMDBaABX4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FkmyMDBaABX4%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/808b88e32cc0152046ee603a15f3c049/href">https://medium.com/media/808b88e32cc0152046ee603a15f3c049/href</a></iframe><p>The layout isn’t novel, but the language pairs are. Standard commercial tools handle English-to-Swahili fine, but our prototype bridges Swahili directly to Kikuyu. Most existing platforms either ignore this pairing or route the data through an English intermediary, which strips out regional nuance. When two people share an imperfect second language, a direct local-to-local bridge fundamentally alters the dynamic.</p><h3>Scenario 2: A room with several languages</h3><p>The mental model shifts entirely when you move to a multi-device room. One user creates a session using a QR code, and everyone else joins on their own phone, selecting their preferred language for reading and listening. There is no designated “meeting language.”</p><p>When someone speaks, the system transcribes their words in their native tongue while broadcasting real-time translations to every other screen. Each phone displays a personalized, canonical view of the discussion. The software assumes the burden of the bridge, leaving the participants free to speak naturally.</p><p>This changes the math for everyday situations. At a family gathering spanning three generations and four distinct comfort zones, the youngest teenager doesn’t have to spend the afternoon acting as a live translator; they can just participate. A community health worker fluent in Swahili can talk with a household that only speaks Kikuyu at the speed of a normal conversation, without waiting for clunky, sentence-by-sentence human interpretation. Local field teams and international NGO staff can stop performing the awkward ritual of pretending everyone is equally comfortable in English.</p><p>By making every participant a simultaneous source and target, the technology adapts to the people in the room rather than forcing them to bend to the limits of a tool.</p><h3>Scenario 3: One speaker, many readers</h3><p>We see a similar shift in one-to-many broadcasts like town halls, workshops, or sermons. The speaker’s live words anchor the top of a main screen or individual devices, while a real-time grid of multiple language translations streams below it.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FO2YO_jBGhA0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DO2YO_jBGhA0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FO2YO_jBGhA0%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/69950b9c3ff505bd118b2b596293a15d/href">https://medium.com/media/69950b9c3ff505bd118b2b596293a15d/href</a></iframe><p>This is where localized language models prove their worth. Think of a pastor preaching in Swahili to a congregation split between Luo, Kikuyu, and Somali speakers, or a teacher running an orientation night that needs to land clearly across three different linguistic groups. Human interpretation is wonderful, but it’s too expensive for routine events, so most communities simply go without it. Creating a lightweight, automated accessibility layer turns a fleeting spoken presentation into a permanent, multilingual record that attendees can save and review later.</p><p>None of these environments ask a user to abandon their language for someone else’s. There is no hierarchy, and no designated “primary” tongue. The design challenge here isn’t about adding more features; it’s about making the technology disappear into the natural cadence of human speech. When the interface works, it functions as an accessibility layer for natural multilingualism, and language differences stop acting as a gatekeeper for who gets to participate.</p><p><em>Polyglot and Podium are research prototypes from Thiomi. They are available at </em><a href="https://www.google.com/search?q=https://drlugha.com/translate"><em>drlugha.com/translate</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e40f973f868b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thiomi/translation-experiences-for-the-multilingual-room-e40f973f868b">Translation experiences for the multilingual room</a> was originally published in <a href="https://medium.com/thiomi">Thiomi</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Attention sinks in NLLB: where most of the cross-attention actually goes]]></title>
            <link>https://medium.com/thiomi/attention-sinks-in-nllb-where-most-of-the-cross-attention-actually-goes-02a170d635fa?source=rss----fd631c3d20ff---4</link>
            <guid isPermaLink="false">https://medium.com/p/02a170d635fa</guid>
            <category><![CDATA[machine-translation]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[Hillary Mutisya]]></dc:creator>
            <pubDate>Tue, 05 May 2026 17:45:21 GMT</pubDate>
            <atom:updated>2026-05-21T20:03:58.360Z</atom:updated>
            <content:encoded><![CDATA[<p>The first time we ran a cross-attention analysis on a set of African languages in Meta’s NLLB (No Language Left Behind) translation model, the results made us deeply uncomfortable.</p><p>Across every language pair we tried, the numbers looked identical. Word-order preservation similarity hovered stubbornly around 36%. Different decoding modes that <em>should</em> have produced entirely different attention patterns looked like carbon copies of each other.</p><p>Something was broken.</p><p>It turned out we were measuring the wrong thing. Between <strong>83% and 91%</strong> of the cross-attention mass — depending on the language pair — was being swallowed by a tiny handful of structural tokens: language tags, end-of-sentence markers, and punctuation.</p><p>Once we filtered those structural tokens out, our alignment metric jumped from 36.7% to 70.7%. It almost doubled. Suddenly, different decoding modes started behaving like themselves again. The signal had been there all along, completely buried under the noise.</p><h3>What is an Attention Sink?</h3><p>If you aren’t familiar with the setup: when NLLB translates a sentence, you can extract the <strong>cross-attention weights</strong>. This is the matrix that tells you exactly which source words the decoder looked at while generating each target word. Researchers use these matrices to map word alignments and see how multilingual models process different languages.</p><p>The term “attention sink” comes from research on autoregressive language models. Scientists noticed that the very first token in a sequence (usually a or beginning-of-sentence marker) attracts a massive, disproportionate amount of attention, no matter what the model is actually generating.</p><p>The reason is purely mechanical:</p><blockquote><em>Each row in an attention matrix is a probability distribution forced to sum to 1 by the softmax function. The weight </em>has<em> to land somewhere. If an attention head has no strong content-driven reason to focus on a specific word, it defaults to a stable, constant token it can always find.</em></blockquote><p>The same thing happens in Neural Machine Translation (NMT) cross-attention, but the culprits are different:</p><ul><li><strong>Language Tags:</strong> NLLB prefixes every sentence with a special token indicating the language. The decoder doesn’t need this for content meaning — it’s just metadata — but it serves as a perfectly stable anchor.</li><li><strong>Structural Markers &amp; Punctuation:</strong> The (end-of-sentence) tag and ubiquitous punctuation marks act the exact same way.</li></ul><p>Because these tokens are omnipresent, they become the garbage bin for any attention head without a clear mission. When you average your attention metrics across sentences (as almost every analysis does), this structural mass completely hijacks the data. You aren’t measuring how the model processes content; you’re measuring how much it likes punctuation.</p><h3>The Numbers</h3><p>We broke down the cross-attention mass by token type across four language pairs (translating from English). A consistent pattern emerged:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7T6QqKQywUlV5YmKODlAAg.png" /></figure><p>Content gets the absolute leftovers. If your analysis treats all tokens equally, it is dominated by positions where mathematically, almost nothing is happening.</p><p>To recover the true signal, you have to filter the matrix. Look at what happens to our word-order metrics when we exclude structural tokens and renormalize the remaining mass:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FGgxzQk3lUepjteyJ5_WVw.png" /></figure><p>The filtered data tells a completely different story. Languages finally look distinct. Decoding modes (free generation vs. teacher-forced evaluation) show entirely separate behaviors. If you’ve ever looked at NMT attention matrices and thought, <em>“Why does everything look identical?”</em> — this is your answer.</p><h3>Why This Isn’t Just “Position Bias”</h3><p>In standard language models, people often blame “position bias” — the idea that the first slot gets hammered simply because it’s the first slot.</p><p>In NMT cross-attention, <strong>the bias is vocabulary-driven, not positional.</strong> We checked. The language tag sits at the absolute beginning of the sequence, but the token sits at the very end. Both act as massive sinks. Punctuation marks scattered dead-center in the middle of a sentence do the exact same thing.</p><p>Because the issue is tied to specific token types rather than physical positions, we can clean it up cleanly without losing any spatial or positional alignment information.</p><h3>The Content-Only Filtering Recipe</h3><p>Fixing this takes about 30 lines of Python. For every cross-attention matrix, follow these four steps:</p><ol><li><strong>Identify Structural Tokens:</strong> Build a list of token IDs for language tags, &lt;/s&gt;, punctuation, and Byte-Pair Encoding (BPE) subword markers.</li><li><strong>Mask the Sinks:</strong> Zero out the corresponding rows and columns in your attention matrix.</li><li><strong>Renormalize the Matrix:</strong> Divide the remaining values so that each decoder-position row sums back up to 1. <strong>Do not skip this.</strong> If you don’t renormalize, downstream metrics that expect a valid probability distribution will output garbage.</li><li><strong>Run Your Metrics:</strong> Calculate your alignment or similarity metrics on this cleaned, content-only matrix.</li></ol><h3>What Cleansing the Data Unlocked</h3><p>Filtering the noise didn’t just change our percentages; it completely salvaged our downstream research.</p><h4>1. Linguistic Phylogenies Actually Work</h4><p>We wanted to see if we could reconstruct language family trees purely from a model’s attention patterns. Before filtering, the resulting trees were pure noise — Bantu languages were indistinguishable from Nilotic languages. After filtering, the correct family structures emerged beautifully: the Bantu languages clustered together tightly, completely separate from Cushitic Somali and Nilotic Luo.</p><h4>2. Layer-Wise Dynamics Became Legible</h4><p>We knew cross-attention changes as you move from early decoder layers to later ones. With raw attention, every layer looked identical because the sinks drowned out the nuances. With filtered attention, the layer-wise differences became sharp, distinct, and highly consistent across different languages.</p><h3>The Takeaway for Interpretability Research</h3><p>If you are analyzing attention weights in modern multilingual models, keep three rules in mind:</p><ul><li><strong>Run a 30-second sanity check:</strong> Look at the token-type breakdown of your attention mass first. If structural tokens hold the majority, stop and filter.</li><li><strong>Filter before you analyze, not after:</strong> Trust me, re-running a massive pipeline because you discovered a sink problem late is a massive waste of time.</li><li><strong>Question un-filtered baselines:</strong> Methods papers that report raw cross-attention metrics without mentioning structural tokens are often accidentally measuring sink artifacts.</li></ul><p>Interpretability tools inherit assumptions from the models they were built on. The classic “attention as alignment” framework was designed for early, simple NMT systems with tiny vocabularies. Modern models are vastly more complex, using specialized tokens and massive multilingual vocabularies. The old metrics still work — but only if you are incredibly careful about what you are actually allowing them to measure.</p><p><em>The paper on attention sinks and content-only filtering, including the full per-layer breakdown is at </em><a href="https://arxiv.org/abs/2605.01229"><em>arxiv.org/abs/2605.01229</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=02a170d635fa" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thiomi/attention-sinks-in-nllb-where-most-of-the-cross-attention-actually-goes-02a170d635fa">Attention sinks in NLLB: where most of the cross-attention actually goes</a> was originally published in <a href="https://medium.com/thiomi">Thiomi</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Borrowing from cousins: morphological discovery for Giriama]]></title>
            <link>https://medium.com/thiomi/borrowing-from-cousins-morphological-discovery-for-giriama-4c1f4a61aee8?source=rss----fd631c3d20ff---4</link>
            <guid isPermaLink="false">https://medium.com/p/4c1f4a61aee8</guid>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[morphology]]></category>
            <category><![CDATA[bantu-languages]]></category>
            <dc:creator><![CDATA[Hillary Mutisya]]></dc:creator>
            <pubDate>Tue, 05 May 2026 17:45:03 GMT</pubDate>
            <atom:updated>2026-05-22T02:52:49.588Z</atom:updated>
            <content:encoded><![CDATA[<p>Giriama is a Bantu language spoken by roughly 600,000 people along the Kenyan coast, primarily around Malindi and Kilifi. It belongs to the Mijikenda group, a family of related tongues that share the coastal strip with Swahili. It has an established writing tradition, a translated Bible, and an active oral literature. What it lacks is a digital NLP footprint.</p><p>When we searched for computational morphological resources for Giriama, we found exactly 91 labeled paradigms. That means 91 total lemma-feature-form triples, not 91 verbs fully conjugated. It is the amount of data a field linguist might gather in an afternoon as a basic starting point for language documentation. Compare that to the 11,749 paradigms available for Swahili in the same repository, and the scale of the data deficit becomes obvious.</p><p>Our paper on zero-shot morphological discovery for Giriama focused on a specific practical constraint: can you generate useful morphological data for a language with under a hundred training examples by borrowing structural information from its better-resourced linguistic cousins?</p><p>The short answer is yes. The execution, however, requires combining cross-lingual transfer with unsupervised clustering while ensuring the model is identifying genuine structural patterns rather than overfitting to a tiny dataset.</p><h3>Low-Resource NLP</h3><p>Most NLP papers dealing with “low-resource” settings work with thousands of examples. While small by deep learning standards, that scale does not reflect the reality of field linguistics, where many living languages have only a few dozen annotated paradigms in digital formats. Methodologies built to survive on a thousand examples routinely collapse when dropped down to fifty.</p><p>With 91 paradigms, Giriama sits squarely in this harsher environment. Standard supervised learning on a dataset this size generalizes poorly; the vocabulary is too small to expose noun-class patterns, and the morphological complexity is too rich to be captured by fewer than a hundred word forms.</p><p>But Giriama does not exist in isolation. It is closely related to Kikuyu, Kamba, and Kimeru — languages with far more extensive documentation — and its vocabulary overlaps with Swahili by roughly 60%. The grammar follows the standard Bantu matrix: noun classes, agglutinative verbs, and strict agreement chains. Because the underlying structure is shared, a model that understands general Bantu morphology should only require a small step to adapt to Giriama specifically. The problem is taking that step without enough data to train the model conventionally.</p><p>We addressed this by running two distinct pipelines in parallel and merging their outputs.</p><p>First, we used cross-lingual transfer, running a Bantu-family pre-trained model (BantuMorph, trained jointly on 16 Bantu languages) on raw Giriama text. By projecting Giriama words into the model’s embedding space, we identified their nearest Swahili neighbors and used the neighbor’s noun class as a baseline hypothesis for the Giriama word. This works reliably for cognates but fails completely for Giriama-specific innovations that lack a Swahili counterpart.</p><p>To capture those innovations, we used unsupervised clustering. We projected the Giriama vocabulary into a low-dimensional space using UMAP and applied k-means clustering. We then assigned a candidate noun class to each cluster based on the known examples within it. This captures words unique to Giriama, but it requires a large enough text corpus for meaningful clusters to form.</p><p>Combining these approaches through weighted voting neutralized their individual blind spots. Where cross-lingual transfer solved the shared vocabulary, clustering handled the localized innovations. Agreement between the two methods provided high-confidence classifications, while disagreements flagged anomalies for human review.</p><h3>The results</h3><p>After running this pipeline on our Giriama corpus and validating the outputs, we yielded 2,455 noun class assignments for previously unannotated words, a 27× expansion of the existing digital lexicon. More importantly for verification, the pipeline achieved a 78.2% lemmatization accuracy when tested against an independent external dataset of 444 Giriama verb paradigms collected by separate researchers. It also reached a 97.3% segmentation accuracy and 86.7% lemmatization accuracy across a broader 19,624-word expanded corpus.</p><p>The accuracy metric on the external validation set is the true indicator of performance. Any model trained on 91 examples can be engineered to look good when evaluated against those same 91 examples. Because the 444 external paradigms were compiled independently, the 78.2% accuracy rate proves the pipeline captured authentic, generalizable morphological rules rather than just memorizing its training tokens.</p><p>The pipeline also surfaced two distinct morphological variations that were undocumented in published Giriama grammars.</p><p>The first was a bare <em>a-</em> prefix variant for Class 2 nouns. In standard Bantu, Class 2 plurals are marked by <em>wa-</em>, which Giriama follows in words like <em>wantu</em> (people). The model, however, isolated a substantial group of Class 2 nouns where the plural is marked by a bare <em>a-</em>. This appears to be the result of vowel coalescence, where the <em>wa-</em> prefix merges into roots that begin with a vowel. This <em>a-</em> variant appeared with 95.1% consistency across its cluster.</p><p>The second variation was a contracted <em>k’-</em> prefix, a glottalized consonant that does not map cleanly to standard Bantu noun-class markers. The model identified this pattern with 98.5% consistency across the relevant vocabulary. Defining whether this is a heavily contracted form of the Class 7 <em>ki-</em> prefix or a distinct phonetic innovation requires acoustic data, but the text pipeline successfully isolated its systematic usage.</p><h3>Building on this</h3><p>These are not discoveries in the sense of finding a hidden linguistic trait; native speakers use these rules intuitively as part of their spoken grammar. Instead, the model successfully isolated these productive patterns from raw text, presenting them in a structured form that an expert can verify or reject in a fraction of the time it would take through traditional fieldwork.</p><p>The success of this approach depends entirely on the proximity of well-resourced relatives. While languages like Kikuyu and Kamba are not high-resource by global standards, they possess enough mapped data to provide a stable morphological scaffold for the transfer step.</p><p>When we tried similar pipelines on languages without close, well-documented relatives — such as Maasai (a Nilotic language) or Somali (a Cushitic language) — the transfer signal weakened significantly. Without a related morphological structure to bootstrap from, the pipeline struggles, requiring heavier direct supervision or far more complex unsupervised architectures. The operational boundary for this technique is narrow: it requires a severely under-resourced target language, a small baseline of annotated examples, and a well-documented linguistic neighbor.</p><p>For language documentation, this framework alters the manual workload. Historically, building lexicons meant decades of fieldwork and manual classification. While computation cannot replace human validation, reviewing 2,455 machine-generated noun class candidates with confidence scores is a completely different workflow than discovering and entering those 2,455 words by hand.</p><p>For NLP research, the results show that the strategies used to handle data scarcity at the thousand-example scale do not translate to the dozens-of-examples scale. In extreme low-resource environments, cross-lingual transfer is no longer a performance optimization — it is an absolute prerequisite.</p><p><em>The paper is at </em><a href="https://arxiv.org/abs/2604.22723"><em>arxiv.org/abs/2604.22723</em></a><em>. Code and discovered lexicons are linked from the paper.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c1f4a61aee8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thiomi/borrowing-from-cousins-morphological-discovery-for-giriama-4c1f4a61aee8">Borrowing from cousins: morphological discovery for Giriama</a> was originally published in <a href="https://medium.com/thiomi">Thiomi</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using a neural net to uncover the common ancestor of 14 Bantu languages]]></title>
            <link>https://medium.com/thiomi/using-a-neural-net-to-uncover-the-common-ancestor-of-14-bantu-languages-e0adbd7a0cec?source=rss----fd631c3d20ff---4</link>
            <guid isPermaLink="false">https://medium.com/p/e0adbd7a0cec</guid>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[morphology]]></category>
            <dc:creator><![CDATA[Hillary Mutisya]]></dc:creator>
            <pubDate>Tue, 05 May 2026 17:44:45 GMT</pubDate>
            <atom:updated>2026-05-21T19:45:48.591Z</atom:updated>
            <content:encoded><![CDATA[<p>We built a character-level transformer model called BantuMorph to map the morphology of 14 modern Bantu languages, spanning from Kikuyu and Swahili to Lingala and Zulu. The training task was intentionally constrained: given a raw word string, the network had to predict its internal morphological layout — identifying noun-class prefixes, mapping how verb stems combine with tense markers, and locating morpheme boundaries. The model never encountered a map, a textbook on African history, or a single sentence describing language families. It simply optimized for the mechanics of word construction.</p><p>Once the network stabilized, we analyzed how it organized these 14 languages within its latent representation space. By extracting the encoder’s internal vectors, calculating the cosine distances between language profiles, and applying hierarchical clustering, we forced the model to construct its own language family tree based strictly on contemporary word structures.</p><p>The resulting dendrogram reconstructed established genetic relationships with remarkable accuracy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v1NunjhiGEFlcFoH1cQu4g.png" /></figure><p>The first branches to merge were Kikuyu and Kamba, yielding a minimal distance metric of 0.004. Simultaneously, Kongo paired with Lingala, and Kinyarwanda joined Kirundi. These initial pairings span entirely different regions of the continent, yet each represents an obvious relationship to a historical linguist. Without any external labeling, the model automatically clustered the languages into their recognized Guthrie zones, grouping the Kenyan E-zone, the Great Lakes J-zone, and the Southern S-zone into distinct, cohesive branches.</p><p>This post outlines the mechanics behind our recent paper, <em>“Neural Recovery of Historical Lexical Structure in Bantu Languages from Modern Data.”</em> While the formal publication adheres to strict academic boundaries, the goal here is to detail what the pipeline successfully isolated, where its text-based constraints lie, and how we filtered modern noise out of raw text corpora.</p><h3>How linguists usually figure out language families</h3><p>Tracing language evolution traditionally relies on the comparative method, a forensic process unchanged for nearly two centuries. Linguists align basic vocabulary across related languages to isolate regular sound correspondences. If a specific consonant in Language A systematically maps to an altered consonant in Language B within identical phonetic environments, it provides evidence of inheritance from a shared ancestor. Because these phonetic shifts branch irregularly across geographical barriers, untangling their chronological sequence requires years of manual analysis per language pair.</p><p>For the Bantu family, this multi-generation effort produced the Bantu Lexical Reconstructions database (BLR3), a catalog of roughly 10,000 reconstructed Proto-Bantu forms verified by daughter-language attestations. Our experiment was designed to test whether a neural architecture trained exclusively on modern text could surface patterns consistent with this gold-standard fieldwork.</p><h3>Our approach</h3><p>Because BantuMorph operates at the byte level, it avoids the errors that standard subword tokenizers introduce when slicing agglutinative Bantu verbs. Before calculating inter-language distances, we applied a standard normalization pass by subtracting the per-language mean embedding from each word vector. This centering step eliminates the orthographic and tokenization “fingerprints” — the latent features that merely signal the identity of the language rather than its underlying structure. Without this centering, the clustering algorithm simply groups languages by their contemporary spelling systems rather than their morphological topology. Once normalized, identifying structurally equivalent vocabulary across languages reduces to a nearest-neighbor lookup in the latent space, yielding our automated cognate candidates.</p><p>The automated extraction aligned strongly with documented historical reconstructions. Among the top eleven noun cognate candidates isolated by the nearest-neighbor search, ten matched verified BLR3 proto-forms. The root for cow (<em>ng’ombe</em>) appeared across nine languages, matching the proto-form <em>*gombe</em>, while the root for person (<em>umuntu</em>) — the word from which the family name “Bantu” is derived — was successfully isolated across eight distinct language vectors.</p><p>Numeral systems formed the most cohesive clusters in the embedding space, driven by their high frequency and resistance to external borrowing. The automated lookups surfaced clear historical matches: <em>tatu</em> (three) mapped directly to Proto-Bantu <em>*tátù</em> across 12 languages; <em>nne</em> or <em>nna</em> (four) mapped to <em>*nàì</em> across 11 languages; <em>tano</em> (five) mapped to <em>*táànò</em> across 10 languages; and <em>kenda</em> (nine) mapped to <em>*kèndà</em> across nine languages. Verb stems demonstrated equivalent stability, with roots for see (<em>ona</em>) and stand (<em>ima</em>) surfacing across all 14 languages, each matching an established Proto-Bantu root. Within the underlying matrix, intra-zone cosine similarity averaged 0.988, while cross-zone similarity dropped to 0.977. Bootstrapping passes confirmed the statistical significance of this gap, proving the clustering is driven by systemic structural variables rather than sample bias.</p><h3>Limitations</h3><p>It is important, however, to define the limits of these results. The model did not reconstruct Proto-Bantu. True linguistic reconstruction requires phonological reasoning to trace how ancient phonemes mutated into modern spoken sounds through systematic laws. Our model possesses no concept of phonology; it executes pattern matching on raw character strings. When <em>kenda</em> surfaces across nine language vectors, the system is not discovering new historical insights about the proto-form; it is confirming a known linguistic distribution via a computational vector space.</p><p>This dependency on orthography introduces clear blind spots. Because the pipeline evaluates written text, words that are phonetically identical but spelled differently across modern orthographies appear unrelated in the embedding space. Conversely, false cognates — words that look similar on the page but diverged radically in pronunciation — can cluster incorrectly. Any historical question requiring phonetic granularity remains invisible to this text-only architecture.</p><p>Furthermore, our dataset is restricted to Eastern and Southern Bantu variants, omitting the Western Bantu branches spanning Cameroon to Angola. Because Eastern and Southern Bantu languages share a more recent regional ancestor than the full family tree, the lexical alignments we observe may reflect shared regional innovations or contact-driven diffusion rather than direct Proto-Bantu retentions. The model recovers historical structures that align with known comparative frameworks, but it cannot replace the manual precision of historical linguistics.</p><h3>Challenge: filtering noise from modern corpora</h3><p>The primary engineering bottleneck was not model training, but data filtration. Standard web-scraped text corpora are highly saturated with modern words that simulate cross-family alignment but lack historical relevance. Global proper nouns like <em>Madagascar</em> or <em>Argentina</em> appear with near-identical orthography across ten or more languages, causing naive nearest-neighbor lookups to flag them as high-confidence shared vocabulary.</p><p>Morphologically adapted loanwords are even more deceptive. The word for <em>hospital</em> appears across almost every modern Bantu language, masquerading as a native form: Swahili <em>sipitali</em>, Kikuyu <em>thibitarĩ</em>, Kamba <em>sivitalĩ</em>, and Zulu <em>isibhedlela</em>. Each variant has been integrated into a localized noun-class prefix and modified to obey regional phonotactic constraints, yet the root itself is a modern borrowing from English or Portuguese. Finally, because open-web datasets over-index on news and institutional documentation, terms related to government or theology cluster tightly across languages due to shared topical contexts rather than common ancestry.</p><p>We neutralized these false positives by intersecting two distinct validation filters. We measured cross-lingual embedding coherence to catch loanwords, which typically cluster with unnatural uniformity compared to native roots, and applied an LLM-based part-of-speech classifier to isolate and remove modern proper nouns. Intersecting these filters purged the modern vocabulary noise while preserving the historical <em>kenda</em> and <em>tatu</em> signals.</p><h3>Building on this</h3><p>The utility of this pipeline rests on high-throughput screening and cross-model convergence. Methodologically, the comparative method evaluates cognate sets individually through expert manual inspection. Our framework screens and outputs 728 noun and 1,525 verb cognate candidates across 14 languages simultaneously within a brief compute window. While many of these machine-generated candidates require expert pruning, the high-confidence selections provide an optimized shortlist for targeted linguistic review, saving months of manual ledger matching.</p><p>Furthermore, the structural signal shows strong cross-model convergence. We duplicated the distance analysis using NLLB-600M — a translation architecture built on entirely different training objectives with no explicit morphological training — and recovered the identical family tree structure. All six zone-level branches aligned, yielding a Spearman rank correlation of 0.83 between the distance matrices. This high convergence confirms that the structural topology is a property of the underlying Bantu data, not an artifact of our specific training setup.</p><p>Ultimately, the experiment exposes an open question regarding morphological persistence. Modern grammatical systems retain a remarkably stable signal of ancient ancestry. While the conservation of numerals and noun-class prefixes is predictable from first principles, the model also isolated unexpected patterns, such as the sharp vector divergence between <em>bona</em> and <em>ona</em> (both meaning “see,” both deriving from Proto-Bantu <em>*-bon-</em>) along strict zone boundaries. Isolating the precise structural drivers behind these latent separations remains the target of our current research pass.</p><p><em>The paper is at </em><a href="https://arxiv.org/abs/2604.22730"><em>arxiv.org/abs/2604.22730</em></a><em>. The dataset and code are linked from the paper.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0adbd7a0cec" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thiomi/using-a-neural-net-to-uncover-the-common-ancestor-of-14-bantu-languages-e0adbd7a0cec">Using a neural net to uncover the common ancestor of 14 Bantu languages</a> was originally published in <a href="https://medium.com/thiomi">Thiomi</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s interesting about Bantu for AI? A primer]]></title>
            <link>https://medium.com/thiomi/whats-interesting-about-bantu-for-ai-a-primer-8fde1d1b3401?source=rss----fd631c3d20ff---4</link>
            <guid isPermaLink="false">https://medium.com/p/8fde1d1b3401</guid>
            <category><![CDATA[morphology]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[Hillary Mutisya]]></dc:creator>
            <pubDate>Tue, 05 May 2026 17:44:23 GMT</pubDate>
            <atom:updated>2026-05-21T19:35:49.902Z</atom:updated>
            <content:encoded><![CDATA[<p>The Swahili word <em>hawatakuonyesha</em> translates into an entire English clause: “they will not show you.” What English distributes across five words, Swahili packs into a single word string by fusing five distinct morphemes that handle negation, subject, tense, object, and root.</p><p>This density is standard across the Bantu language family, and it routinely breaks NLP pipelines designed with English assumptions.</p><p>Most modern NLP tools inherit their engineering defaults from English, a language where word order manages the syntax, morphology is sparse, and words function as stable units that map cleanly to tokens. When an algorithm is marketed as “language-agnostic,” it usually just means it operates well across other languages that share this low-morphology profile.</p><p>Bantu languages — roughly 500 tongues spoken by over 300 million people — operate on an entirely different structural matrix. Their grammar disrupts tokenization, vocabulary scaling, evaluation metrics, and transfer learning architectures.</p><p>Bantu morphology is driven by three intersecting mechanics. First, verbs are highly agglutinative, frequently stacking six or seven functional affixes onto a single root. Second, nouns are divided into roughly 18 distinct classes that determine their prefixes. Third, this class assignment triggers an alliterative agreement chain, forcing every adjective, verb, demonstrative, and relative clause in the sentence to modify its prefix to match the governing noun.</p><p>The internal structure of <em>hawatakuonyesha</em> shows this rule-based segmentation clearly: <em>ha-</em> (negation), <em>-wa-</em> (subject: they), <em>-ta-</em> (tense: future), <em>-ku-</em> (object: you), and <em>-onyesha</em> (root: show).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fs9Ly38D9nks3oSiFUGVSg.png" /></figure><p>Multiplying these prefix combinations across every possible permutation of subject, tense, aspect, aspectual mood, and object markers causes the vocabulary size to explode. For the single root <em>-onyesha</em>, Bantu text corpora document approximately five thousand distinct inflected variants.</p><p>This morphological density causes predictable failures in standard NLP workflows.</p><p>Byte-Pair Encoding (BPE) tokenizers trained on Swahili frequently fail to isolate these morphemes correctly, cutting the words into arbitrary, phonetically meaningless chunks roughly two-thirds of the time. This fragments the semantic signals. Furthermore, if a model treats every inflected variant as an isolated vocabulary token, even a modest Bantu corpus will produce a unique vocabulary footprint vastly larger than an English dataset of identical size.</p><p>Evaluation metrics also lose their granularity under these conditions. Standard token-level accuracy relies on a binary exact-match calculation. A model that misses an internal object marker by a single character is scored as completely incorrect, receiving the same penalty as a model that outputs total gibberish, which masks incremental improvements in architectural performance.</p><p>Transitioning to byte-level architectures like ByT5 removes these tokenization errors because they process raw character strings directly rather than forcing text into pre-calculated word-piece vocabularies. While this approach increases sequence lengths and slows down inference speeds, it allows the model to map morpheme boundaries natively through optimization.</p><p>While verb structures hide syntactic complexity, noun classes expose it across the entire sentence. The class prefix acts as a systematic, contagious constraint:</p><ul><li><em>mtoto mzuri amefika</em> (The good child has arrived)</li><li><em>watoto wazuri wamefika</em> (The good children have arrived)</li><li><em>kitabu kizuri kimefika</em> (The good book has arrived)</li></ul><p>The underlying roots for “good” (<em>-zuri</em>) and “arrive” (<em>-fika</em>) remain unchanged, but their prefixes adapt to match the controlling noun class.</p><p>For machine learning models, this structural regularity is actually an advantage. These prefixes are short, high-frequency signals that align perfectly with what gradient descent is built to optimize. A network that learns the underlying syntax can apply correct agreement rules to novel nouns it has never encountered during training. Models that fail to capture this logic are forced to memorize agreement pairs word-by-word, a strategy that fails to scale.</p><p>This structural uniformity across the Bantu family also makes cross-lingual transfer highly effective. Swahili, Kikuyu, Zulu, and Luganda share deep syntactic commonalities, preserving the same core noun-class frameworks and verb affixes. Consequently, the most viable source data for a low-resource Bantu language isn’t a massive English or French corpus; it is the higher-resource Bantu language spoken in the adjacent region. A baseline model pre-trained on Swahili can be successfully adapted to Luganda with a fraction of the data required for standard alignment.</p><p>Engineering for Bantu environments requires moving away from several standard web-scraping and modelling defaults.</p><p>If your BPE configuration routinely splits tokens mid-morpheme, you need to bypass word-piece tokenizers entirely in favor of character- or byte-level models. Your data pipeline must also account for high inflection rates; in morphologically rich languages like Zulu, inflected variants can easily outnumber base dictionary roots by 100×.</p><p>For evaluation, binary exact-match metrics should be replaced with string-distance calculations or morphological character-error rates to isolate minor prefix slips from total semantic failures. Finally, when planning transfer learning, avoid using English as the default foundation. If you are targeting Kikuyu, your most effective transfer source will be Swahili.</p><p>Ultimately, processing Bantu languages serves as a rigorous stress test for modern AI. Frameworks that appear globally adaptable because they perform well on Western European benchmarks often turn out to have hardcoded assumptions about low-morphology languages. <em>Hawatakuonyesha</em> isn’t an exceptional linguistic anomaly; it is a clear indication that “language-agnostic” typically just means agnostic across the narrow selection of languages used to build the tools in the first place.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fde1d1b3401" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thiomi/whats-interesting-about-bantu-for-ai-a-primer-8fde1d1b3401">What’s interesting about Bantu for AI? A primer</a> was originally published in <a href="https://medium.com/thiomi">Thiomi</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>