Abstract
Connectionist Temporal Classification (CTC) is widely used in Scene Text Recognition (STR) for its efficiency and simplicity. However, it often underperforms compared to Attention-based models due to its neglect of fine-grained frame-wise details and the lack of explicit character-to-frame alignment. This paper introduces Distillation CTC (DCTC), a novel loss function that incorporates a "teacher-free" self-distillation scheme. By leveraging a Maximum-A-Posteriori (MAP) estimation derived from CTC gradients, DCTC identifies optimal latent alignments during training to regularize the model. Experimental results demonstrate that DCTC improves accuracy by up to 2.6% on standard benchmarks with zero additional inference latency or parameters.
Introduction
Scene Text Recognition (STR) involves converting visual text in natural images into machine-readable strings. While Attention-based models offer high accuracy by learning 1-to-1 mappings, CTC-based models remain the industry standard due to their speed and ability to handle sequences of varying lengths. Despite their popularity, CTC models struggle with the "alignment inconsistency problem," where the lack of fixed mapping between image frames and characters leads to suboptimal feature representation.
The Alignment Inconsistency Problem
The primary challenge in improving CTC models via Knowledge Distillation (KD) is the discrepancy in how different models (teacher vs. student) align characters to frames. Because CTC optimizes the probability of the entire sequence rather than individual frames, a teacher model might suggest an alignment that the student cannot easily reconcile, leading to unstable training and poor results.
Methodology: Distillation CTC (DCTC)
To address these issues, the authors propose DCTC, a self-distillation regularized loss. Unlike traditional KD, DCTC does not require a separate teacher model. Instead, it uses the student model's own state to guide its learning process through a mathematically grounded approach.
MAP Estimation for Latent Alignment
The core innovation of DCTC is a module-free method to estimate latent alignment. By analyzing the ratio of CTC loss gradients to the model's output probabilities, the authors derive a closed-form solution using Maximum-A-Posteriori (MAP) estimation. This allows the model to determine the most likely character for every frame in a sequence dynamically during training.
Self-Distillation and Zero Overhead
Once the "best guess" for frame-wise alignment is calculated, a Cross-Entropy loss term is used to regularize the model toward this high-quality alignment. This self-correction mechanism forces the model to learn more discriminative character features. Crucially, since DCTC is purely a modification of the loss function, it introduces no extra parameters or inference latency, making it a "free" performance upgrade for any CTC-based architecture.
Experimental Results
The effectiveness of DCTC was evaluated across multiple English and Chinese benchmarks using various architectures, including CRNN and SVTR.
On the classic CRNN model, DCTC yielded a 2.6% average accuracy boost on English benchmarks and a 2.1% boost on Chinese benchmarks. Even for state-of-the-art models like SVTR, improvements of up to 1.1% were observed. To quantify the quality of the learned alignments, the authors introduced Alignment Accuracy (AACC). DCTC was shown to reach nearly 100% AACC very early in the training process, significantly outperforming traditional teacher-based distillation methods. Furthermore, t-SNE visualizations revealed that DCTC produces tighter and more distinct clusters for visually similar characters, directly translating to fewer recognition errors.
Conclusion
DCTC offers a simple yet powerful solution to the alignment limitations of CTC-based text recognition. By deriving supervision directly from the loss gradients, it provides a consistent and effective self-distillation signal. Its compatibility with existing architectures and zero-overhead nature makes it a highly practical tool for improving text recognition systems.
Summary updated