TabuLM: Morphology-Aware Tabular Pre-training for Low-Resource Languages
Organizations: Barclays · Carnegie Mellon University
Abstract
We present TabuLM, the first language model pre-trained on Kinyarwanda tabular data. Kinyarwanda is a morphologically rich Bantu language spoken by over 12 million people in Rwanda, yet lacks any dedicated tabular representation learning resource. TabuLM extends KinyaBERT-large, a two-tier morphological transformer, with additive row, column, and cell-type embeddings and a learned table-structure attention bias that sharpens same-row and same-column attention. Pre-training uses two new objectives: Masked Cell Recovery (MCR), which masks entire cells and forces reconstruction from row and column context, and Column Type Prediction (CTP), which predicts column semantic types from observed cell values. We pre-train on 172 Rwandan government tables (~35,000 cells) from NISR, RAB, REB, and MoH open-data portals, and introduce TabQA-kin, the first native Kinyarwanda table question-answering benchmark comprising 526 QA pairs across 31 tables and four question types. TabuLM achieves 62.0% exact match on TabQA-kin, outperforming KinyaBERT-large by 5.7 EM points and all multilingual baselines (mBERT 49.3%, XLM-R 50.0%) by 11.7-12.7 points. Analysis shows that structural table embeddings are most decisive for comparison and lookup questions, while morphological awareness provides complementary gains. Our code, data, and pre-trained checkpoint are publicly available.
Figures & tables
| Resource | Count | Source |
|---|---|---|
| Pre-training tables | 172 | NISR, RAB, REB, MoH |
| Pre-training cells | 35,000 | |
| Pre-training sequences | 170/loop | |
| TabQA-kin total QA pairs | 526 | Template generation |
| lookup | 186 | |
| comparison | 123 |
| Hyperparameter | Pre-training | Fine-tuning |
|---|---|---|
| Optimizer | LAMB | AdamW |
| Peak LR | ||
| LR schedule | Linear warmup + decay | Constant |
| Warmup steps | 500 (5%) | |
| Weight decay | 0.01 | 0.01 |
| Effective batch | 64 | 16 |
| Model | Dev EM |
|---|---|
| GPT-4o (zero-shot) | 64.0 |
| GPT-4o-mini (zero-shot) | 64.0 |
| mBERT | 49.3 |
| XLM-R | 50.0 |
| KinyaBERT-large | 56.3 |
| TabuLM (full) | 62.0 |
| Model | Look. | Comp. | Agg. | All |
|---|---|---|---|---|
| GPT-4o (0-shot) | 82.9 | 79.2 | 25.9 | 64.0 |
| GPT-4o-mini (0-shot) | 85.7 | 70.8 | 29.6 | 64.0 |
| mBERT | 16.7 | 50.0 | 80.8 | 49.3 |
| XLM-R | 19.2 | 44.4 | 85.2 | 50.0 |
| KinyaBERT | 26.7 | 59.1 | 88.9 | 56.3 |
| TabuLM | 28.6 | 66.7 | 79.2 | 62.0 |
| Configuration | Dev EM | |
|---|---|---|
| TabuLM (full) | 62.0 | |
| Table-structure bias | 64.0 | |
| Row/col/cell-type embeds | 58.0 | |
| MCR objective | 64.0 | |
| CTP objective | 64.0 |
| Question (en gloss) | Gold | TabuLM | KinyaBERT |
|---|---|---|---|
| Between Ibishyimbo and Uburo , which has higher 2021 export growth? ( exports_trade_2022 ) | Ibishyimbo | ✓ | (Ibikorei) |
| Between Ibigori and Ibirayi , which has more farmland (ha)? ( crop_production_2022 ) | Ibigori | ✓ | (Amasaka) |
| TabuLM | GPT-4o | |
|---|---|---|
| Parameters | 65M | 1.8T |
| Inference | Local GPU | Proprietary API |
| Per-query cost | $0 (local) | $0.01 |
| GPU required | RTX 3090 (24 GB) | None (API) |
| Fine-tunable | Yes | No ∗ |
| Agg. EM | 79.2% | 25.9% |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Kinyarwanda Template | English Gloss |
|---|---|
| Lookup | |
| Ni angahe [COL] ya [ENT]? | What is [COL] of [ENT]? |
| [ENT] yari ifite angahe [COL]? | How much [COL] did [ENT] have? |
| Comparison | |
| Ni [ENT1] cyangwa [ENT2] ifite [COL] nyinshi? | Does [ENT1] or [ENT2] have more [COL]? |
| Hagati ya [ENT1] na [ENT2], iyihe ifite [COL] nkeya? | Between [ENT1] and [ENT2], which has less [COL]? |
| Akarere | Ubuhinzi (ha) | Umusaruro (t) | Sezon |
|---|---|---|---|
| (District) | (Cultivated area) | (Yield, metric tons) | (Season) |
| Gasabo | 1,847 | 4,203 | 2022A |
| Kicukiro | 923 | 2,156 | 2022A |
| Nyarugenge | 412 | 847 | 2022A |
| Bugesera | 12,304 | 38,145 | 2022A |
| Hyperparameter | Pre-training | Fine-tuning |
|---|---|---|
| Optimizer | LAMB | AdamW |
| Peak learning rate | ||
| LR schedule | Warmup + decay | Constant |
| Warmup steps | 500 | 50 |
| Effective batch size | 64 (8 GA8) | 16 |
| Max sequence length | 512 | 512 |
| Question (en gloss) | Type | Gold | TabuLM | Failure mode |
|---|---|---|---|---|
| Which crop has the most farmland in Kigali? ( crop_land_2022 ) | Agg | Ibigori | ✓ | |
| Which district has least health workers? | Agg | Nyarugenge | (Gasabo) | Wrong column alignment |
| Between Ibigori and Ibishyimbo, which has higher 2023 yield? | Cmp | Ibigori | ✓ | |
| What is the enrollment of Nyamata SS? | Lkp | 1,240 | (963) | Duplicate values in column |
| How many students enrolled in Remera? | Lkp | Remera PS | ✓ |
Language Model Pretraining
Language model pretraining teaches models language patterns and knowledge from large text corpora before they are adapted to specific tasks.
See all 418 papers