{
  "id": 686956,
  "title": "Deep Past Challenge | Top-13 Solution",
  "url": "/competitions/deep-past-initiative-machine-translation/discussion/686956",
  "author_name": "Grigory Demidov",
  "post_date": "2026-04-01T18:29:15.261000",
  "votes": 7,
  "comment_count": 0,
  "views": 0,
  "content": "<h1>Deep Past Challenge: ByT5-large + External Data + Test-Time Source Repair + MBR</h1>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F15995218%2F115e202893dac9c41f3c42eaad9f7aa5%2FDataBoom_presentation.png?generation=1775076541760501&amp;alt=media\" alt=\"Our team\"></p>\n<h2>TL;DR</h2>\n<p>Our final solution was a <strong>single ByT5-large model</strong>. Most of the gain came from <strong>external data, preprocessing, source repair, and decoding</strong>.</p>\n<p>The main ingredients were:</p>\n<ul>\n<li><strong>external pretraining</strong> on public Akkadian-English data</li>\n<li>additional <strong>OCR-derived parallel data</strong> extracted from PDF publications</li>\n<li><strong>preprocessing</strong> on both source and target</li>\n<li><strong>test-time source repair</strong> to fix broken transliteration symbols in test data and bring them closer to the train distribution</li>\n<li><strong>MBR reranking</strong> over beam and sampled candidates using <strong>chrF++</strong></li>\n</ul>\n<p>In short:<br>\n<strong>a single ByT5-large model + external data + preprocessing + test-time source repair + MBR</strong></p>\n<h2>Overview</h2>\n<p>A large part of this competition was not just fitting a larger model. The real challenge was handling <strong>noise</strong> and making good use of <strong>external data</strong>.</p>\n<p>The data had:</p>\n<ul>\n<li>inconsistent transliteration conventions</li>\n<li>OCR corruption</li>\n<li>mixed Unicode / ASCII forms</li>\n<li>formatting variation on both source and target sides</li>\n<li>limited clean parallel supervision</li>\n</ul>\n<p>Because of that, the best gains came from making the data cleaner and the decoding more reliable, rather than from model scaling alone.</p>\n<p>Our final pipeline had four parts:</p>\n<ol>\n<li><strong>pretrain ByT5-large on external Akkadian-English data</strong></li>\n<li><strong>fine-tune on the organizer train set</strong></li>\n<li><strong>repair and normalize test transliterations with test-time source repair</strong></li>\n<li><strong>generate multiple candidates and select with chrF++-based MBR</strong></li>\n</ol>\n<h2>Model</h2>\n<p>We used <strong>ByT5-large</strong> for the final solution.</p>\n<p>Since this competition was very character-sensitive and most strong solutions were based on ByT5, the real difference came less from the backbone itself and more from the surrounding pipeline: external data, preprocessing, source repair, and inference.</p>\n<h2>Data</h2>\n<p>We used two stages of data.</p>\n<h3>1. Organizer train set</h3>\n<p>This was used for final supervised fine-tuning.</p>\n<h3>2. External pretraining data</h3>\n<p>We merged several public Akkadian-English datasets with an <strong>OCR-derived parallel corpus extracted from PDF publications</strong>. The OCR data was noisy, but it added useful extra coverage.</p>\n<p>Before pretraining, we applied light cleanup:</p>\n<ul>\n<li>merge all sources into a common schema</li>\n<li>remove duplicates</li>\n<li>filter obviously broken pairs</li>\n<li>apply simple sentence-level cleanup where possible</li>\n</ul>\n<p>One simple filter that helped was removing pairs with a very large source-target length mismatch:</p>\n<pre><code>df[\"len_diff\"] = (\n    df[\"translation\"].astype(str).apply(len)\n    - df[\"transliteration\"].astype(str).apply(len)\n).abs()\ndf = df[df[\"len_diff\"] &lt; 70].copy()\n</code></pre>\n<p>This removed many pathological alignments at almost no cost.</p>\n<h2>Preprocessing</h2>\n<p>A large part of the solution was reducing unnecessary variation across sources.</p>\n<p>On the <strong>Akkadian side</strong>, we normalized recurring differences such as:</p>\n<ul>\n<li>alternative diacritic encodings</li>\n<li>subscript forms</li>\n<li>determinatives</li>\n<li>broken-text markers</li>\n<li>some numeric variants</li>\n</ul>\n<p>On the <strong>English side</strong>, we normalized recurring formatting differences such as:</p>\n<ul>\n<li>gap markers</li>\n<li>month and number expressions</li>\n<li>editorial notes</li>\n<li>a few domain-specific surface forms</li>\n</ul>\n<p>The goal was simple: make the train data more consistent and reduce avoidable train-test mismatch.</p>\n<p>This was especially important because the evaluation combined <strong>BLEU</strong> and <strong>chrF++</strong>, so even small surface differences could matter.</p>\n<h2>Test-Time Source Repair</h2>\n<p>One of the most useful parts of the pipeline was a <strong>test-time source repair module</strong>.</p>\n<p>Its role was not just to normalize formatting, but to <strong>repair corrupted transliteration forms</strong> and move noisy test inputs closer to the training distribution before decoding.</p>\n<p>Besides regex-based cleanup, the module also used <strong>mappings derived from clean training data</strong> to restore recurring broken forms more conservatively. This mattered because many corrupted symbols were <strong>ambiguous</strong>, so naive global replacement could easily damage already-correct transliterations.</p>\n<p>In practice, the module combined:</p>\n<ul>\n<li>normalization of recurring Unicode / ASCII variants</li>\n<li>cleanup of malformed gap and broken-text patterns</li>\n<li>repair of recurring corrupted transliteration forms</li>\n<li>a small set of <strong>precision-focused context-sensitive fixes</strong></li>\n</ul>\n<p>So the source pipeline was:</p>\n<p><strong>raw test transliteration</strong>\n→ <strong>test-time source repair</strong>\n→ <strong>model input</strong></p>\n<p>This step was small, but consistently useful because even minor source corruption could push the model toward a bad translation.</p>\n<h2>Pretraining</h2>\n<p>We first pretrained <strong>ByT5-large</strong> on the merged external corpus.</p>\n<p>The goal of pretraining was not to fit the external data perfectly, but to expose the model to more transliteration variants, more vocabulary, and more translation patterns before final supervised training.</p>\n<h2>Fine-tuning</h2>\n<p>After pretraining, we fine-tuned on the organizer train set.</p>\n<p>We kept the same overall preprocessing philosophy:</p>\n<ul>\n<li>normalize transliterations</li>\n<li>normalize target formatting</li>\n<li>reduce avoidable surface variation</li>\n</ul>\n<p>We tried different training variants, but the most important thing was the full pipeline rather than any single training trick.</p>\n<h2>Inference</h2>\n<p>The final submission used a <strong>single-model MBR decoding pipeline</strong>.</p>\n<p>For each input, we first applied <strong>test-time source repair</strong>. Then we generated a diverse candidate pool using a mix of:</p>\n<ul>\n<li>beam search</li>\n<li>sampling with multiple temperatures</li>\n</ul>\n<p>Instead of taking the top beam directly, we applied <strong>Minimum Bayes Risk decoding</strong> with sentence-level <strong>chrF++</strong> and selected the candidate with the highest average agreement with the rest of the pool.</p>\n<p>This worked well for the competition because MBR often chose safer outputs than raw beam search.</p>\n<h2>Results</h2>\n<p>A compact summary of representative runs is below.</p>\n<table>\n<thead>\n<tr>\n<th>Model / setup</th>\n<th>Pretraining data</th>\n<th>Decoding</th>\n<th>Private LB</th>\n<th>Public LB</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>ByT5-base</td>\n<td>HF + OCR</td>\n<td>beam</td>\n<td>38.3467</td>\n<td>37.1513</td>\n</tr>\n<tr>\n<td>ByT5-large</td>\n<td>HF + OCR</td>\n<td>beam</td>\n<td>37.8768</td>\n<td>37.3950</td>\n</tr>\n<tr>\n<td>ByT5-XL</td>\n<td>HF + OCR</td>\n<td>beam</td>\n<td>39.5868</td>\n<td>38.0995</td>\n</tr>\n<tr>\n<td>ByT5-XL + ByT5-large</td>\n<td>HF + OCR</td>\n<td>beam + sampling + MBR</td>\n<td>39.6216</td>\n<td>38.2817</td>\n</tr>\n<tr>\n<td>ByT5-large</td>\n<td>HF + OCR</td>\n<td>beam + sampling + MBR (<code>0.75 / 0.85</code>)</td>\n<td>39.6175</td>\n<td>38.4482</td>\n</tr>\n<tr>\n<td>ByT5-large</td>\n<td>OCR only</td>\n<td>beam + sampling + MBR (<code>0.7 / 0.85</code>)</td>\n<td><strong>39.6652</strong></td>\n<td>38.3060</td>\n</tr>\n</tbody>\n</table>\n<p>Even though we tried multiple model sizes, the main takeaway stayed the same: the biggest improvements came from <strong>data and inference quality</strong>, not from scaling alone.</p>\n<h2>What did not work</h2>\n<p>Some directions were less useful than expected:</p>\n<ul>\n<li><strong>model scaling alone</strong> was not enough</li>\n<li><strong>more complicated training tricks</strong> did not help as much as better data and preprocessing</li>\n<li><strong>raw OCR data without enough cleanup</strong> was much less effective</li>\n<li><strong>taking the top beam directly</strong> was weaker than using a more diverse candidate pool with MBR</li>\n</ul>\n<p>In short, many ideas that made the system more complex were less valuable than simply making the inputs cleaner and the final decoding more robust.</p>\n<h2>Main lesson</h2>\n<p>The main lesson for us was straightforward:</p>\n<blockquote>\n  <p>in low-resource translation with noisy historical text, better data, better preprocessing, and better decoding can matter more than a larger model</p>\n</blockquote>\n<p>The biggest gains came from making the data more consistent, reducing the train-test mismatch, and choosing better outputs at inference time.</p>",
  "messages": [
    {
      "id": 3433479,
      "postDate": "2026-04-01T18:29:15.260Z",
      "content": "<h1>Deep Past Challenge: ByT5-large + External Data + Test-Time Source Repair + MBR</h1>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F15995218%2F115e202893dac9c41f3c42eaad9f7aa5%2FDataBoom_presentation.png?generation=1775076541760501&amp;alt=media\" alt=\"Our team\"></p>\n<h2>TL;DR</h2>\n<p>Our final solution was a <strong>single ByT5-large model</strong>. Most of the gain came from <strong>external data, preprocessing, source repair, and decoding</strong>.</p>\n<p>The main ingredients were:</p>\n<ul>\n<li><strong>external pretraining</strong> on public Akkadian-English data</li>\n<li>additional <strong>OCR-derived parallel data</strong> extracted from PDF publications</li>\n<li><strong>preprocessing</strong> on both source and target</li>\n<li><strong>test-time source repair</strong> to fix broken transliteration symbols in test data and bring them closer to the train distribution</li>\n<li><strong>MBR reranking</strong> over beam and sampled candidates using <strong>chrF++</strong></li>\n</ul>\n<p>In short:<br>\n<strong>a single ByT5-large model + external data + preprocessing + test-time source repair + MBR</strong></p>\n<h2>Overview</h2>\n<p>A large part of this competition was not just fitting a larger model. The real challenge was handling <strong>noise</strong> and making good use of <strong>external data</strong>.</p>\n<p>The data had:</p>\n<ul>\n<li>inconsistent transliteration conventions</li>\n<li>OCR corruption</li>\n<li>mixed Unicode / ASCII forms</li>\n<li>formatting variation on both source and target sides</li>\n<li>limited clean parallel supervision</li>\n</ul>\n<p>Because of that, the best gains came from making the data cleaner and the decoding more reliable, rather than from model scaling alone.</p>\n<p>Our final pipeline had four parts:</p>\n<ol>\n<li><strong>pretrain ByT5-large on external Akkadian-English data</strong></li>\n<li><strong>fine-tune on the organizer train set</strong></li>\n<li><strong>repair and normalize test transliterations with test-time source repair</strong></li>\n<li><strong>generate multiple candidates and select with chrF++-based MBR</strong></li>\n</ol>\n<h2>Model</h2>\n<p>We used <strong>ByT5-large</strong> for the final solution.</p>\n<p>Since this competition was very character-sensitive and most strong solutions were based on ByT5, the real difference came less from the backbone itself and more from the surrounding pipeline: external data, preprocessing, source repair, and inference.</p>\n<h2>Data</h2>\n<p>We used two stages of data.</p>\n<h3>1. Organizer train set</h3>\n<p>This was used for final supervised fine-tuning.</p>\n<h3>2. External pretraining data</h3>\n<p>We merged several public Akkadian-English datasets with an <strong>OCR-derived parallel corpus extracted from PDF publications</strong>. The OCR data was noisy, but it added useful extra coverage.</p>\n<p>Before pretraining, we applied light cleanup:</p>\n<ul>\n<li>merge all sources into a common schema</li>\n<li>remove duplicates</li>\n<li>filter obviously broken pairs</li>\n<li>apply simple sentence-level cleanup where possible</li>\n</ul>\n<p>One simple filter that helped was removing pairs with a very large source-target length mismatch:</p>\n<pre><code>df[\"len_diff\"] = (\n    df[\"translation\"].astype(str).apply(len)\n    - df[\"transliteration\"].astype(str).apply(len)\n).abs()\ndf = df[df[\"len_diff\"] &lt; 70].copy()\n</code></pre>\n<p>This removed many pathological alignments at almost no cost.</p>\n<h2>Preprocessing</h2>\n<p>A large part of the solution was reducing unnecessary variation across sources.</p>\n<p>On the <strong>Akkadian side</strong>, we normalized recurring differences such as:</p>\n<ul>\n<li>alternative diacritic encodings</li>\n<li>subscript forms</li>\n<li>determinatives</li>\n<li>broken-text markers</li>\n<li>some numeric variants</li>\n</ul>\n<p>On the <strong>English side</strong>, we normalized recurring formatting differences such as:</p>\n<ul>\n<li>gap markers</li>\n<li>month and number expressions</li>\n<li>editorial notes</li>\n<li>a few domain-specific surface forms</li>\n</ul>\n<p>The goal was simple: make the train data more consistent and reduce avoidable train-test mismatch.</p>\n<p>This was especially important because the evaluation combined <strong>BLEU</strong> and <strong>chrF++</strong>, so even small surface differences could matter.</p>\n<h2>Test-Time Source Repair</h2>\n<p>One of the most useful parts of the pipeline was a <strong>test-time source repair module</strong>.</p>\n<p>Its role was not just to normalize formatting, but to <strong>repair corrupted transliteration forms</strong> and move noisy test inputs closer to the training distribution before decoding.</p>\n<p>Besides regex-based cleanup, the module also used <strong>mappings derived from clean training data</strong> to restore recurring broken forms more conservatively. This mattered because many corrupted symbols were <strong>ambiguous</strong>, so naive global replacement could easily damage already-correct transliterations.</p>\n<p>In practice, the module combined:</p>\n<ul>\n<li>normalization of recurring Unicode / ASCII variants</li>\n<li>cleanup of malformed gap and broken-text patterns</li>\n<li>repair of recurring corrupted transliteration forms</li>\n<li>a small set of <strong>precision-focused context-sensitive fixes</strong></li>\n</ul>\n<p>So the source pipeline was:</p>\n<p><strong>raw test transliteration</strong>\n→ <strong>test-time source repair</strong>\n→ <strong>model input</strong></p>\n<p>This step was small, but consistently useful because even minor source corruption could push the model toward a bad translation.</p>\n<h2>Pretraining</h2>\n<p>We first pretrained <strong>ByT5-large</strong> on the merged external corpus.</p>\n<p>The goal of pretraining was not to fit the external data perfectly, but to expose the model to more transliteration variants, more vocabulary, and more translation patterns before final supervised training.</p>\n<h2>Fine-tuning</h2>\n<p>After pretraining, we fine-tuned on the organizer train set.</p>\n<p>We kept the same overall preprocessing philosophy:</p>\n<ul>\n<li>normalize transliterations</li>\n<li>normalize target formatting</li>\n<li>reduce avoidable surface variation</li>\n</ul>\n<p>We tried different training variants, but the most important thing was the full pipeline rather than any single training trick.</p>\n<h2>Inference</h2>\n<p>The final submission used a <strong>single-model MBR decoding pipeline</strong>.</p>\n<p>For each input, we first applied <strong>test-time source repair</strong>. Then we generated a diverse candidate pool using a mix of:</p>\n<ul>\n<li>beam search</li>\n<li>sampling with multiple temperatures</li>\n</ul>\n<p>Instead of taking the top beam directly, we applied <strong>Minimum Bayes Risk decoding</strong> with sentence-level <strong>chrF++</strong> and selected the candidate with the highest average agreement with the rest of the pool.</p>\n<p>This worked well for the competition because MBR often chose safer outputs than raw beam search.</p>\n<h2>Results</h2>\n<p>A compact summary of representative runs is below.</p>\n<table>\n<thead>\n<tr>\n<th>Model / setup</th>\n<th>Pretraining data</th>\n<th>Decoding</th>\n<th>Private LB</th>\n<th>Public LB</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>ByT5-base</td>\n<td>HF + OCR</td>\n<td>beam</td>\n<td>38.3467</td>\n<td>37.1513</td>\n</tr>\n<tr>\n<td>ByT5-large</td>\n<td>HF + OCR</td>\n<td>beam</td>\n<td>37.8768</td>\n<td>37.3950</td>\n</tr>\n<tr>\n<td>ByT5-XL</td>\n<td>HF + OCR</td>\n<td>beam</td>\n<td>39.5868</td>\n<td>38.0995</td>\n</tr>\n<tr>\n<td>ByT5-XL + ByT5-large</td>\n<td>HF + OCR</td>\n<td>beam + sampling + MBR</td>\n<td>39.6216</td>\n<td>38.2817</td>\n</tr>\n<tr>\n<td>ByT5-large</td>\n<td>HF + OCR</td>\n<td>beam + sampling + MBR (<code>0.75 / 0.85</code>)</td>\n<td>39.6175</td>\n<td>38.4482</td>\n</tr>\n<tr>\n<td>ByT5-large</td>\n<td>OCR only</td>\n<td>beam + sampling + MBR (<code>0.7 / 0.85</code>)</td>\n<td><strong>39.6652</strong></td>\n<td>38.3060</td>\n</tr>\n</tbody>\n</table>\n<p>Even though we tried multiple model sizes, the main takeaway stayed the same: the biggest improvements came from <strong>data and inference quality</strong>, not from scaling alone.</p>\n<h2>What did not work</h2>\n<p>Some directions were less useful than expected:</p>\n<ul>\n<li><strong>model scaling alone</strong> was not enough</li>\n<li><strong>more complicated training tricks</strong> did not help as much as better data and preprocessing</li>\n<li><strong>raw OCR data without enough cleanup</strong> was much less effective</li>\n<li><strong>taking the top beam directly</strong> was weaker than using a more diverse candidate pool with MBR</li>\n</ul>\n<p>In short, many ideas that made the system more complex were less valuable than simply making the inputs cleaner and the final decoding more robust.</p>\n<h2>Main lesson</h2>\n<p>The main lesson for us was straightforward:</p>\n<blockquote>\n  <p>in low-resource translation with noisy historical text, better data, better preprocessing, and better decoding can matter more than a larger model</p>\n</blockquote>\n<p>The biggest gains came from making the data more consistent, reducing the train-test mismatch, and choosing better outputs at inference time.</p>",
      "rawMarkdown": "# Deep Past Challenge: ByT5-large + External Data + Test-Time Source Repair + MBR\n![Our team](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F15995218%2F115e202893dac9c41f3c42eaad9f7aa5%2FDataBoom_presentation.png?generation=1775076541760501&alt=media)\n## TL;DR\n\nOur final solution was a **single ByT5-large model**. Most of the gain came from **external data, preprocessing, source repair, and decoding**.\n\nThe main ingredients were:\n\n- **external pretraining** on public Akkadian-English data\n- additional **OCR-derived parallel data** extracted from PDF publications\n- **preprocessing** on both source and target\n- **test-time source repair** to fix broken transliteration symbols in test data and bring them closer to the train distribution\n- **MBR reranking** over beam and sampled candidates using **chrF++**\n\nIn short:  \n**a single ByT5-large model + external data + preprocessing + test-time source repair + MBR**\n\n\n## Overview\n\nA large part of this competition was not just fitting a larger model. The real challenge was handling **noise** and making good use of **external data**.\n\nThe data had:\n\n- inconsistent transliteration conventions\n- OCR corruption\n- mixed Unicode / ASCII forms\n- formatting variation on both source and target sides\n- limited clean parallel supervision\n\nBecause of that, the best gains came from making the data cleaner and the decoding more reliable, rather than from model scaling alone.\n\nOur final pipeline had four parts:\n\n1. **pretrain ByT5-large on external Akkadian-English data**\n2. **fine-tune on the organizer train set**\n3. **repair and normalize test transliterations with test-time source repair**\n4. **generate multiple candidates and select with chrF++-based MBR**\n\n\n## Model\n\nWe used **ByT5-large** for the final solution.\n\nSince this competition was very character-sensitive and most strong solutions were based on ByT5, the real difference came less from the backbone itself and more from the surrounding pipeline: external data, preprocessing, source repair, and inference.\n\n## Data\n\nWe used two stages of data.\n\n### 1. Organizer train set\n\nThis was used for final supervised fine-tuning.\n\n### 2. External pretraining data\n\nWe merged several public Akkadian-English datasets with an **OCR-derived parallel corpus extracted from PDF publications**. The OCR data was noisy, but it added useful extra coverage.\n\nBefore pretraining, we applied light cleanup:\n\n- merge all sources into a common schema\n- remove duplicates\n- filter obviously broken pairs\n- apply simple sentence-level cleanup where possible\n\nOne simple filter that helped was removing pairs with a very large source-target length mismatch:\n\n```python\ndf[\"len_diff\"] = (\n    df[\"translation\"].astype(str).apply(len)\n    - df[\"transliteration\"].astype(str).apply(len)\n).abs()\ndf = df[df[\"len_diff\"] < 70].copy()\n```\n\nThis removed many pathological alignments at almost no cost.\n\n\n## Preprocessing\n\nA large part of the solution was reducing unnecessary variation across sources.\n\nOn the **Akkadian side**, we normalized recurring differences such as:\n\n* alternative diacritic encodings\n* subscript forms\n* determinatives\n* broken-text markers\n* some numeric variants\n\nOn the **English side**, we normalized recurring formatting differences such as:\n\n* gap markers\n* month and number expressions\n* editorial notes\n* a few domain-specific surface forms\n\nThe goal was simple: make the train data more consistent and reduce avoidable train-test mismatch.\n\nThis was especially important because the evaluation combined **BLEU** and **chrF++**, so even small surface differences could matter.\n\n\n## Test-Time Source Repair\n\nOne of the most useful parts of the pipeline was a **test-time source repair module**.\n\nIts role was not just to normalize formatting, but to **repair corrupted transliteration forms** and move noisy test inputs closer to the training distribution before decoding.\n\nBesides regex-based cleanup, the module also used **mappings derived from clean training data** to restore recurring broken forms more conservatively. This mattered because many corrupted symbols were **ambiguous**, so naive global replacement could easily damage already-correct transliterations.\n\nIn practice, the module combined:\n* normalization of recurring Unicode / ASCII variants\n* cleanup of malformed gap and broken-text patterns\n* repair of recurring corrupted transliteration forms\n* a small set of **precision-focused context-sensitive fixes**\n\nSo the source pipeline was:\n\n**raw test transliteration**\n→ **test-time source repair**\n→ **model input**\n\nThis step was small, but consistently useful because even minor source corruption could push the model toward a bad translation.\n\n\n## Pretraining\n\nWe first pretrained **ByT5-large** on the merged external corpus.\n\nThe goal of pretraining was not to fit the external data perfectly, but to expose the model to more transliteration variants, more vocabulary, and more translation patterns before final supervised training.\n\n\n## Fine-tuning\n\nAfter pretraining, we fine-tuned on the organizer train set.\n\nWe kept the same overall preprocessing philosophy:\n\n* normalize transliterations\n* normalize target formatting\n* reduce avoidable surface variation\n\nWe tried different training variants, but the most important thing was the full pipeline rather than any single training trick.\n\n\n## Inference\n\nThe final submission used a **single-model MBR decoding pipeline**.\n\nFor each input, we first applied **test-time source repair**. Then we generated a diverse candidate pool using a mix of:\n\n* beam search\n* sampling with multiple temperatures\n\nInstead of taking the top beam directly, we applied **Minimum Bayes Risk decoding** with sentence-level **chrF++** and selected the candidate with the highest average agreement with the rest of the pool.\n\nThis worked well for the competition because MBR often chose safer outputs than raw beam search.\n\n\n## Results\n\nA compact summary of representative runs is below.\n\n| Model / setup | Pretraining data | Decoding                              |  Private LB | Public LB |\n| ------------- | ---------------- | ------------------------------------- | ----------: | --------: |\n| ByT5-base     | HF + OCR         | beam                                  |     38.3467 |   37.1513 |\n| ByT5-large    | HF + OCR         | beam                                  |     37.8768 |   37.3950 |\n| ByT5-XL       | HF + OCR         | beam                                  |     39.5868 |   38.0995 |\n| ByT5-XL + ByT5-large    | HF + OCR         | beam + sampling + MBR                 |     39.6216 |   38.2817 |\n| ByT5-large    | HF + OCR         | beam + sampling + MBR (`0.75 / 0.85`) |     39.6175 |   38.4482 |\n| ByT5-large    | OCR only         | beam + sampling + MBR (`0.7 / 0.85`)  | **39.6652** |   38.3060 |\n\nEven though we tried multiple model sizes, the main takeaway stayed the same: the biggest improvements came from **data and inference quality**, not from scaling alone.\n\n\n## What did not work\n\nSome directions were less useful than expected:\n\n* **model scaling alone** was not enough\n* **more complicated training tricks** did not help as much as better data and preprocessing\n* **raw OCR data without enough cleanup** was much less effective\n* **taking the top beam directly** was weaker than using a more diverse candidate pool with MBR\n\nIn short, many ideas that made the system more complex were less valuable than simply making the inputs cleaner and the final decoding more robust.\n\n\n## Main lesson\n\nThe main lesson for us was straightforward:\n\n> in low-resource translation with noisy historical text, better data, better preprocessing, and better decoding can matter more than a larger model\n\nThe biggest gains came from making the data more consistent, reducing the train-test mismatch, and choosing better outputs at inference time.",
      "votes": 7
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "3433479": "# Deep Past Challenge: ByT5-large + External Data + Test-Time Source Repair + MBR\n![Our team](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F15995218%2F115e202893dac9c41f3c42eaad9f7aa5%2FDataBoom_presentation.png?generation=1775076541760501&alt=media)\n## TL;DR\n\nOur final solution was a **single ByT5-large model**. Most of the gain came from **external data, preprocessing, source repair, and decoding**.\n\nThe main ingredients were:\n\n- **external pretraining** on public Akkadian-English data\n- additional **OCR-derived parallel data** extracted from PDF publications\n- **preprocessing** on both source and target\n- **test-time source repair** to fix broken transliteration symbols in test data and bring them closer to the train distribution\n- **MBR reranking** over beam and sampled candidates using **chrF++**\n\nIn short:  \n**a single ByT5-large model + external data + preprocessing + test-time source repair + MBR**\n\n\n## Overview\n\nA large part of this competition was not just fitting a larger model. The real challenge was handling **noise** and making good use of **external data**.\n\nThe data had:\n\n- inconsistent transliteration conventions\n- OCR corruption\n- mixed Unicode / ASCII forms\n- formatting variation on both source and target sides\n- limited clean parallel supervision\n\nBecause of that, the best gains came from making the data cleaner and the decoding more reliable, rather than from model scaling alone.\n\nOur final pipeline had four parts:\n\n1. **pretrain ByT5-large on external Akkadian-English data**\n2. **fine-tune on the organizer train set**\n3. **repair and normalize test transliterations with test-time source repair**\n4. **generate multiple candidates and select with chrF++-based MBR**\n\n\n## Model\n\nWe used **ByT5-large** for the final solution.\n\nSince this competition was very character-sensitive and most strong solutions were based on ByT5, the real difference came less from the backbone itself and more from the surrounding pipeline: external data, preprocessing, source repair, and inference.\n\n## Data\n\nWe used two stages of data.\n\n### 1. Organizer train set\n\nThis was used for final supervised fine-tuning.\n\n### 2. External pretraining data\n\nWe merged several public Akkadian-English datasets with an **OCR-derived parallel corpus extracted from PDF publications**. The OCR data was noisy, but it added useful extra coverage.\n\nBefore pretraining, we applied light cleanup:\n\n- merge all sources into a common schema\n- remove duplicates\n- filter obviously broken pairs\n- apply simple sentence-level cleanup where possible\n\nOne simple filter that helped was removing pairs with a very large source-target length mismatch:\n\n```python\ndf[\"len_diff\"] = (\n    df[\"translation\"].astype(str).apply(len)\n    - df[\"transliteration\"].astype(str).apply(len)\n).abs()\ndf = df[df[\"len_diff\"] < 70].copy()\n```\n\nThis removed many pathological alignments at almost no cost.\n\n\n## Preprocessing\n\nA large part of the solution was reducing unnecessary variation across sources.\n\nOn the **Akkadian side**, we normalized recurring differences such as:\n\n* alternative diacritic encodings\n* subscript forms\n* determinatives\n* broken-text markers\n* some numeric variants\n\nOn the **English side**, we normalized recurring formatting differences such as:\n\n* gap markers\n* month and number expressions\n* editorial notes\n* a few domain-specific surface forms\n\nThe goal was simple: make the train data more consistent and reduce avoidable train-test mismatch.\n\nThis was especially important because the evaluation combined **BLEU** and **chrF++**, so even small surface differences could matter.\n\n\n## Test-Time Source Repair\n\nOne of the most useful parts of the pipeline was a **test-time source repair module**.\n\nIts role was not just to normalize formatting, but to **repair corrupted transliteration forms** and move noisy test inputs closer to the training distribution before decoding.\n\nBesides regex-based cleanup, the module also used **mappings derived from clean training data** to restore recurring broken forms more conservatively. This mattered because many corrupted symbols were **ambiguous**, so naive global replacement could easily damage already-correct transliterations.\n\nIn practice, the module combined:\n* normalization of recurring Unicode / ASCII variants\n* cleanup of malformed gap and broken-text patterns\n* repair of recurring corrupted transliteration forms\n* a small set of **precision-focused context-sensitive fixes**\n\nSo the source pipeline was:\n\n**raw test transliteration**\n→ **test-time source repair**\n→ **model input**\n\nThis step was small, but consistently useful because even minor source corruption could push the model toward a bad translation.\n\n\n## Pretraining\n\nWe first pretrained **ByT5-large** on the merged external corpus.\n\nThe goal of pretraining was not to fit the external data perfectly, but to expose the model to more transliteration variants, more vocabulary, and more translation patterns before final supervised training.\n\n\n## Fine-tuning\n\nAfter pretraining, we fine-tuned on the organizer train set.\n\nWe kept the same overall preprocessing philosophy:\n\n* normalize transliterations\n* normalize target formatting\n* reduce avoidable surface variation\n\nWe tried different training variants, but the most important thing was the full pipeline rather than any single training trick.\n\n\n## Inference\n\nThe final submission used a **single-model MBR decoding pipeline**.\n\nFor each input, we first applied **test-time source repair**. Then we generated a diverse candidate pool using a mix of:\n\n* beam search\n* sampling with multiple temperatures\n\nInstead of taking the top beam directly, we applied **Minimum Bayes Risk decoding** with sentence-level **chrF++** and selected the candidate with the highest average agreement with the rest of the pool.\n\nThis worked well for the competition because MBR often chose safer outputs than raw beam search.\n\n\n## Results\n\nA compact summary of representative runs is below.\n\n| Model / setup | Pretraining data | Decoding                              |  Private LB | Public LB |\n| ------------- | ---------------- | ------------------------------------- | ----------: | --------: |\n| ByT5-base     | HF + OCR         | beam                                  |     38.3467 |   37.1513 |\n| ByT5-large    | HF + OCR         | beam                                  |     37.8768 |   37.3950 |\n| ByT5-XL       | HF + OCR         | beam                                  |     39.5868 |   38.0995 |\n| ByT5-XL + ByT5-large    | HF + OCR         | beam + sampling + MBR                 |     39.6216 |   38.2817 |\n| ByT5-large    | HF + OCR         | beam + sampling + MBR (`0.75 / 0.85`) |     39.6175 |   38.4482 |\n| ByT5-large    | OCR only         | beam + sampling + MBR (`0.7 / 0.85`)  | **39.6652** |   38.3060 |\n\nEven though we tried multiple model sizes, the main takeaway stayed the same: the biggest improvements came from **data and inference quality**, not from scaling alone.\n\n\n## What did not work\n\nSome directions were less useful than expected:\n\n* **model scaling alone** was not enough\n* **more complicated training tricks** did not help as much as better data and preprocessing\n* **raw OCR data without enough cleanup** was much less effective\n* **taking the top beam directly** was weaker than using a more diverse candidate pool with MBR\n\nIn short, many ideas that made the system more complex were less valuable than simply making the inputs cleaner and the final decoding more robust.\n\n\n## Main lesson\n\nThe main lesson for us was straightforward:\n\n> in low-resource translation with noisy historical text, better data, better preprocessing, and better decoding can matter more than a larger model\n\nThe biggest gains came from making the data more consistent, reducing the train-test mismatch, and choosing better outputs at inference time."
  }
}