CTC Drafts, Transformer Verifies: Fast and Exact Khmer Text Recognition across Print, Scene and Handwriting

Text recognition models generally follow one of two generation schemes: non-autoregressive (NAR) or autoregressive (AR). NAR methods (e.g., those with a connectionist temporal classification (CTC) decoder) produce all tokens in a single pass but tend to be less accurate. AR methods (e.g., those with a Transformer decoder) generate one token at a time and tend to be more accurate. Although both decoders can coexist within a single model, the choice between them must be fixed before inference, which forces a trade-off between latency and accuracy. Speculative decoding avoids this trade-off. Specifically, a weaker draft model proposes several tokens at once, and a stronger target model verifies them in one parallel pass, keeping the longest prefix it agrees with and correcting the first mismatch. The output is therefore identical to the target model’s, but fewer sequential passes are needed. For Khmer text recognition, we propose a novel lossless speculative decoding scheme that pairs an NAR decoder as the draft model with an AR decoder as the target model, along with an improved architecture based on a hybrid vision Transformer (ViT) backbone. The proposed model using the proposed decoding strategy preserves the accuracy of AR decoding exactly while substantially reducing the number of decoding steps compared to the standard AR decoding. The models are trained in two phases: large-scale pretraining on document text, followed by fine-tuning to adapt to handwritten, scene, and document text images. Experiments on handwritten, scene, and printed textline datasets show that the proposed model with the proposed speculative decoding achieves the best overall performance against the re-implemented baselines and existing Khmer text recognizers. Moreover, the proposed decoding scheme matches the AR output exactly while lowering latency by $6.09\times$ (without KV caches) and the number of sequential decoder passes by $12.3\times$. The project repository, including codes, models, and datasets, is available on GitHub\footnote{Available after review}.

Authors

Institutions

Publication Details

Journal
Research Square
Published
2026-11-26
DOI
https://doi.org/10.21203/rs.3.rs-11737743/v1
Primary Topic
Handwritten Text Recognition Techniques
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

CTC Drafts, Transformer Verifies: Fast and Exact Khmer Text Recognition across Print, Scene and Handwriting

Koichi Kise, Sovisal Chenda, Nguonly Taing, Kimchheang Chhea et al.
Research Square
Handwritten Text Recognition Techniques
preprint

CTC Drafts, Transformer Verifies: Fast and Exact Khmer Text Recognition across Print, Scene and Handwriting

Koichi Kise, Sovisal Chenda, Nguonly Taing, Kimchheang Chhea, Masakazu Iwamura, Rina Buoy, Marry Kong
preprint en

Abstract

Text recognition models generally follow one of two generation schemes: non-autoregressive (NAR) or autoregressive (AR). NAR methods (e.g., those with a connectionist temporal classification (CTC) decoder) produce all tokens in a single pass but tend to be less accurate. AR methods (e.g., those with a Transformer decoder) generate one token at a time and tend to be more accurate. Although both decoders can coexist within a single model, the choice between them must be fixed before inference, which forces a trade-off between latency and accuracy. Speculative decoding avoids this trade-off. Specifically, a weaker draft model proposes several tokens at once, and a stronger target model verifies them in one parallel pass, keeping the longest prefix it agrees with and correcting the first mismatch. The output is therefore identical to the target model’s, but fewer sequential passes are needed. For Khmer text recognition, we propose a novel lossless speculative decoding scheme that pairs an NAR decoder as the draft model with an AR decoder as the target model, along with an improved architecture based on a hybrid vision Transformer (ViT) backbone. The proposed model using the proposed decoding strategy preserves the accuracy of AR decoding exactly while substantially reducing the number of decoding steps compared to the standard AR decoding. The models are trained in two phases: large-scale pretraining on document text, followed by fine-tuning to adapt to handwritten, scene, and document text images. Experiments on handwritten, scene, and printed textline datasets show that the proposed model with the proposed speculative decoding achieves the best overall performance against the re-implemented baselines and existing Khmer text recognizers. Moreover, the proposed decoding scheme matches the AR output exactly while lowering latency by $6.09\times$ (without KV caches) and the number of sequential decoder passes by $12.3\times$. The project repository, including codes, models, and datasets, is available on GitHub\footnote{Available after review}.

Research Square
Osaka Metropolitan University (JP)
Handwritten Text Recognition Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon