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
- Koichi Kise (ORCID: https://orcid.org/0000-0001-5779-6968)
- Sovisal Chenda
- Nguonly Taing (ORCID: https://orcid.org/0000-0002-3332-9465)
- Kimchheang Chhea (ORCID: https://orcid.org/0000-0002-4389-5233)
- Masakazu Iwamura (ORCID: https://orcid.org/0000-0003-2508-2869)
- Rina Buoy (ORCID: https://orcid.org/0000-0002-6960-4262)
- Marry Kong
Institutions
- Osaka Metropolitan University (JP)
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