Editing the Lattice, Not the String: Human Corrections That Propagate in Script Conversion

Converting text from one writing system to another, such as Judeo-Arabic written in Hebrew letters into Arabic script or casually Romanized Hindi into Devanagari, is now done well by a simple recipe. A rule-based character mapper produces a rough draft, and a large language model (LLM) cleans it up. On the Judeo-Arabic Al-Khazari corpus this recipe lifts word accuracy from 64.9% to 90.4% (A Tale of Two Scripts). The last ten points are exactly where scholarly editions and training corpora need a human. The errors that remain are also systematic. The same ambiguous letter is resolved wrongly over and over, and the same embedded Hebrew quotation is forced into Arabic spelling every time it appears. Today a human editor fixes these one string at a time, and nothing they learn flows back into the machine.

We propose to keep the mapper's alternatives alive as an explicit graph of candidate spellings, a lattice, and let an LLM choose paths through it. The human then corrects the lattice itself. Locking one choice, or marking one span as "keep in source script", becomes a constraint that is generalized and re-applied across the whole document before the model decodes again. The design borrows a principle from 3D graphics. There, an explicit mesh enforces hard physical validity and a neural field supplies rich appearance, and edits are made on the mesh so that the appearance follows coherently. The claim to test is concrete: for a fixed number of human actions, lattice-anchored editing reaches higher word accuracy than editing plain text, even when the plain-text baseline re-prompts the LLM with the human's corrections.

Core Claim

In script conversion, a human correction carries information about a recurring decision: which reading of a dotless letter is right, where a vowel was dropped, or whether a span is code-switched. It does not only fix one token. A text-box interface throws that information away, or at best passes it to an LLM as free text that the model may or may not apply consistently. If the correction is anchored to an explicit structure (an arc in a lattice, keyed by its source-character context), it can be propagated precisely, and the neural decoder is prevented from overriding it. That decoder is the "implicit" part of the system: its knowledge lives in learned weights rather than in rules you can read. The explicit lattice also blocks the known LLM failure of translating a word's meaning instead of transliterating its sound (Beyond Specialization). The novelty does not lie in constrained decoding or in post-editing taken separately. It lies in making the human's edits act on the explicit layer so that each one reconditions the whole document. We measure the result as accuracy gained per human action.

Research Program

The explicit layer is a weighted lattice built from the source text. For Judeo-Arabic it is built from the "Dotted" mapper of A Tale of Two Scripts, extended so that each ambiguous Hebrew letter emits all of its Arabic readings rather than one. For Romanized Hindi, each Roman substring emits candidate Devanagari units, including optional inserted vowels. These units are variable-length chunks in the spirit of Learning better transliterations, with null transitions borrowed from ε-extension HMMs to absorb length mismatches. Every word-sized span also gets a "preserve" arc, which copies the source script unchanged; this is the mechanism for code-switched passages, the failure case that A Tale of Two Scripts reports but does not solve. Because the lattice might lack the right answer, each span also carries a heavily penalized escape arc that lets the model generate freely.

The implicit layer is an open LLM. We use LLaMA 3.1 8B fine-tuned with LoRA as in Team IndiDataMiner, so that we can control decoding token by token. Decoding finds

$$y^* = \arg\max_{y \in \mathcal{L}(x) \cap \mathcal{C}} \; \log p_\theta(y \mid x) + \lambda \, s_{\text{map}}(y),$$

where $x$ is the source text, $\mathcal{L}(x)$ is the set of outputs the lattice allows (escape arcs included), $\mathcal{C}$ is the set of outputs consistent with the current human constraints, $p_\theta$ is the LLM, $s_{\text{map}}$ is the mapper's path weight, and $\lambda$ trades the two off. We implement this as beam search restricted to lattice prefixes. This differs from Transliteration by Sequence Labeling with Lattice Encodings and Reranking, which reranks a fixed k-best list from a word-level CRF without sentence context. Here the neural model scores inside the search and sees the whole sentence.

The interactive part sits on top. A human action is one of three things: lock an arc, forbid an arc, or toggle a span to "preserve". Each action is generalized into a rule keyed on the source context. The simplest key is the source character n-gram with its neighbors. A richer variant also matches spans whose LLM embeddings are near-duplicates, so that a second Hebrew quotation inherits the "preserve" decision. Rules apply as hard constraints at the exact edited position and as soft weights in $s_{\text{map}}$ elsewhere, so that a wrong generalization can be outvoted by the LLM. After each action the affected sentences are re-decoded. This online, propagating behavior echoes A Unified Approach to Transliteration-based Text Input with Online Spelling Correction, which showed that folding correction into decoding beats correcting first and converting afterwards. That system used phrase tables and n-gram models, and it learned from keystroke logs offline rather than from an editor's corrections within a session.

The 3D work plays a methodological role only. Vid2Sim pairs a neural visual layer with an invisible collision mesh. DRAWER anchors visual primitives to mesh faces so that edits to geometry carry the appearance with them. Co-SLAM mixes an explicit feature grid, which captures fine local detail, with a smooth coordinate encoding that fills gaps. We take from them a single rule: hard validity and edits live on the explicit layer, and context-sensitive fill-in lives on the neural layer. Nothing in that literature shows the analogy holds for text. That is what the experiments test.

The human side builds on Beyond Human-Only. It found that post-editing machine output beats translating from scratch: an MQM error score of 2.98 versus 3.79 on English-German, at about 60% of the cost. It also found that editors are anchored by drafts and miss slips. That work edits raw strings in high-resource translation. We ask whether a structured editing surface does better in script conversion, where many outputs can be valid at once.

Baselines

The do-nothing reference is the raw mapper output with no correction. On Al-Khazari this scores 64.9% word accuracy with the Dotted mapper (A Tale of Two Scripts). For Hindi, the reference is the specialized transliterator IndicXlit, as reported in Team IndiDataMiner.

The strongest automatic baseline is the mapper-then-LLM cascade. The best reported figure is 90.4% word accuracy on Al-Khazari for Dotted CharMapper followed by GPT-4o (A Tale of Two Scripts). For sentence-level Hindi, the strongest reported system is fine-tuned LLaMA 3.1 8B, with 18.92% word error rate (WER) and 6.84% character error rate on IndoNLP 2025 Test Set 1 (Team IndiDataMiner). We report GPT-4o's number as an external ceiling. For the controlled comparison, we re-run the cascade with the same 8B model, the same fine-tuning data, and the same hyperparameter search budget as our decoder. That way any difference reflects the lattice and not model size. Before any human input, our system must match this same-model cascade. Beating it is not required at that stage.

The strongest interactive baseline is text-box post-editing of the cascade output with LLM re-prompting. After each human correction, the corrected strings are put back into the LLM's prompt as examples ("the editor changed X to Y"), and the remaining text is re-corrected. This is the obvious way to make plain post-editing propagate, and it is the real competitor. Both conditions get the same budget of human actions, the same simulated or real editors, and the same 8B model.

Two ablations isolate the key ingredient. The first is lattice decoding with locks applied only at the edited position, with no generalization; this asks whether propagation, rather than the lattice alone, does the work. The second removes the preserve arcs; this asks whether code-switch handling explains the gains. Our system counts as beating the baselines if its accuracy-versus-actions curve lies above the re-prompting baseline across the budget range. Concretely, we look at area under the curve and at the number of actions needed to reach 98% word accuracy, on both corpora, with confidence intervals from bootstrapping over documents.

Why not just…?

Why not just prompt a strong LLM to transliterate directly? The file's evidence goes against this. GPT-4o "struggled with direct transliteration" of Judeo-Arabic and worked only as a post-corrector of mapper output (A Tale of Two Scripts). General LLMs also make semantic substitutions across Indian languages (Beyond Specialization). We still include direct prompting as a row, and we count semantic substitutions separately from spelling errors in every condition.

Why not just keep the two-step cascade and have humans post-edit its output? The cascade is strong at 90.4%, and string post-editing is validated for translation (Beyond Human-Only). Its documented weakness is that the first stage destroys alternatives. Code-switched Hebrew becomes garbled Arabic that the corrector cannot recover (A Tale of Two Scripts). Each human fix is also local. The plain post-editing baseline measures this directly, and a separate breakdown on code-switched spans shows whether the preserve arcs matter.

Why not just feed the human's corrections back to the LLM as text? This is the most serious threat. A capable LLM might generalize "the editor changed X to Y" as well as our context-keyed rules do, with no lattice at all. The re-prompting baseline exists to settle this. If its curve matches ours, the conclusion is that the explicit substrate is unnecessary for interaction. Its value would then reduce to blocking semantic drift, and we would report that. We expect the lattice to win mainly on consistency. Re-prompted models can apply a rule in one sentence and ignore it in the next, while a lattice constraint cannot be silently overridden. We measure consistency directly as the fraction of positions matching an edited context that end up conforming to the edit.

Proposed Experiments

The main experiment uses simulated editors on Al-Khazari, where the full corpus of 1,286 sentences supports document-level propagation, and on IndoNLP 2025 Hindi Test Sets 1 and 2. Test Set 2 is valuable because its heavy vowel omission is where the 8B model degrades (Team IndiDataMiner), so propagated vowel decisions should matter most there. The simulated editor reads left to right, a choice that mirrors how human reviewers anchor on drafts. It finds the first word that differs from the reference and performs the cheapest action that fixes it in the current interface. That is one lattice action in our system, or one string replacement in the baselines. For Hindi isolated-word evaluation we also use Aksharantar and Dakshina. On Aksharantar the reported reference points are 71.10% Top-1 accuracy for fine-tuned GPT-4o on Hindi named entities of Indian origin and 78.48% for GPT-4.5 on high-frequency Tamil words (Beyond Specialization). Accepting several valid spellings matters for names, so a secondary check uses NEWS 2012 Arabic-English, which averages 9.6 references per name. There the lattice CRF with reranking reaches 42.8% accuracy (Transliteration by Sequence Labeling with Lattice Encodings and Reranking).

Downstream, we follow A Tale of Two Scripts and translate the corrected Judeo-Arabic to English, reporting BLEU after a fixed action budget. Their reported figures are 24.1 BLEU on raw mapper output and 28.3 after GPT-4o correction.

A small real-user study then checks whether the simulated editor reflects actual behavior. Editors fluent in Hindi, and a few readers of Judeo-Arabic, correct matched documents in the plain-text and lattice interfaces, with the order counterbalanced. We measure wall-clock time, residual errors, and whether lattice editors miss more errors because the reduced choice set makes them overconfident. That last outcome would be a familiarity bias in a new form, of the kind Beyond Human-Only observed.

Three results would be decisive. The first is the gap between our system and the re-prompting baseline in actions needed to reach 98% accuracy. The second is whether the propagation ablation removes most of that gap. The third is whether real editors' time savings track the simulated action savings. If re-prompting matches lattice editing in both simulation and the user study, the claim fails, and the honest finding is that the explicit layer's only remaining role is as a guardrail against semantic drift.