N-gram Injection into Transformers for Dynamic Language Model Adaptation in Handwritten Text Recognition
Florent Meyer, Laurent Guichard, Yann Soullard, Denis Coquenet, Guillaume Gravier, Bertrand Co\"uasnon

TL;DR
This paper introduces an external n-gram injection method for transformer-based handwritten text recognition models, enabling dynamic adaptation to target language distributions without retraining, thereby improving recognition accuracy on shifted corpora.
Contribution
The paper proposes a novel n-gram injection technique for real-time language model adaptation in transformers, enhancing robustness to language shifts in handwritten text recognition.
Findings
Significantly reduces performance gap on target datasets
Effective without additional training on target data
Improves robustness to language distribution shifts
Abstract
Transformer-based encoder-decoder networks have recently achieved impressive results in handwritten text recognition, partly thanks to their auto-regressive decoder which implicitly learns a language model. However, such networks suffer from a large performance drop when evaluated on a target corpus whose language distribution is shifted from the source text seen during training. To retain recognition accuracy despite this language shift, we propose an external n-gram injection (NGI) for dynamic adaptation of the network's language modeling at inference time. Our method allows switching to an n-gram language model estimated on a corpus close to the target distribution, therefore mitigating bias without any extra training on target image-text pairs. We opt for an early injection of the n-gram into the transformer decoder so that the network learns to fully leverage text-only data at the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsHandwritten Text Recognition Techniques · Topic Modeling · Speech Recognition and Synthesis
