Connectionist Temporal Classification with Maximum Entropy Regularization

Hu Liu, Sheng Jin, Changshui Zhang

TL;DR

Connectionist Temporal Classification (CTC) is a staple for sequence learning but often suffers from "peaky" distributions and overconfidence. This paper introduces EnCTC, which uses maximum conditional entropy regularization to encourage exploration, and EsCTC, a pruning method based on an "equal spacing" prior to eliminate unreasonable alignments. Together, these methods lead to significantly better generalization in scene text recognition.

What Problem Does This Paper Address?

In sequence learning tasks like speech-to-text or scene text recognition, we often have an input (an image or audio clip) and a target sequence (a string of characters), but we don't know exactly which part of the input corresponds to which character. Connectionist Temporal Classification (CTC) was designed to solve this by considering all possible alignments between the input and output.

However, CTC has a "peaky distribution" problem. During training, once the model finds a single feasible path that works, it tends to focus all its probability mass on that one path. This creates a positive feedback loop: the error signal concentrates on that path, making it even more dominant. The result is an overconfident model that produces sharp "spikes" of labels separated by long stretches of "blanks." This overconfidence is a form of overfitting that makes the model less robust to ambiguous boundaries (like two characters touching) and harms its ability to generalize to new data.

Methods

The authors propose two complementary techniques to regularize CTC:

  1. EnCTC (Maximum Conditional Entropy Regularization): Instead of just maximizing the likelihood of the correct label sequence, the authors add a regularization term that maximizes the conditional entropy of the feasible paths. By preventing the entropy from dropping too quickly, the model is forced to keep multiple alignment paths "active" during training. This encourages the model to explore the search space rather than collapsing onto the first path it finds.

  2. EsCTC (Equal Spacing CTC): The authors observe that in most human-generated sequences—like handwriting or speech—the elements are roughly equally spaced. Standard CTC doesn't know this and might try to align a character to a tiny sliver of the image or a massive chunk of it. EsCTC introduces a pruning algorithm that rules out paths that violate an "equal spacing prior." By limiting the search space to "reasonable" alignments, the model converges faster and more accurately.

  3. EnEsCTC: This is simply the combination of both methods, using the equal spacing prior to prune the path space and the entropy term to regularize the remaining feasible paths.

Key Insights and Ideas

  • The Feedback Loop: The paper provides a mathematical look at why CTC becomes "peaky." The error signal is proportional to the fraction of feasible paths passing through a symbol; once one path dominates, the gradient for all other paths effectively vanishes.
  • Entropy as Exploration: In reinforcement learning, entropy is often used to prevent a policy from becoming deterministic too early. The authors successfully port this intuition to sequence learning.
  • The Geometry of Sequences: The "Equal Spacing Prior" is a simple but powerful inductive bias. It acknowledges that while we don't have explicit labels for where a character is, we know it shouldn't be 10x wider than its neighbor.
  • Better Boundaries: Qualitatively, the proposed methods produce "smoother" predictions. Instead of a single-pixel spike for a character, the probability mass is spread across the actual width of the character, which better represents the underlying data.
Alignment comparison showing smoother predictions with EnCTC and EsCTC

Datasets and Key Results

The authors evaluated their methods on several standard scene text recognition benchmarks, training on the massive Synth90K dataset and testing on real-world benchmarks like ICDAR-2003 (IC03), ICDAR-2013 (IC13), IIIT5k-word (IIIT5k), and Street View Text (SVT). A smaller Synth5K dataset was also used to specifically measure generalization when training data is scarce.

The proposed methods consistently outperformed the standard CTC baseline (CRNN) without requiring changes to the network architecture or training hyperparameters (other than the new regularization terms).

Performance comparison of proposed methods against baselines on standard benchmarks
  • Accuracy Boost: On the IC03 dataset, the baseline achieved 89.4% accuracy, while EsCTC reached 92.6%.
  • Generalization: On the small-scale Synth5K dataset, the baseline struggled at 38.1% accuracy. The combined EnEsCTC boosted this to 47.2%, a massive relative improvement that highlights the regularization's power.
  • State-of-the-Art: The methods achieved results comparable to much more complex "Attention-based" models (like RARE or STAR-Net) while maintaining the simplicity and efficiency of the CTC framework.

Limitations and Future Work

  • Computational Complexity: While standard CTC is $O(T)$, the EsCTC pruning adds complexity, moving it toward $O(T^2/|l|)$. While still polynomial and manageable, it is a trade-off for the improved accuracy.
  • Hyperparameter Sensitivity: The methods introduce two new parameters: $\beta$ (the strength of entropy regularization) and $\tau$ (the relaxation of the equal spacing constraint). While the authors found stable defaults (0.2 and 1.5, respectively), these might need tuning for vastly different tasks like long-form speech recognition.
  • Future Directions: The authors suggest that this maximum entropy framework is general and could be applied to other sequence-to-sequence problems beyond text recognition, such as action recognition in video or sign language translation.

Summary updated

BibTeX
@inproceedings{liu2018connectionist,
  author = {Hu Liu and Sheng Jin and Changshui Zhang},
  title = {{Connectionist Temporal Classification with Maximum Entropy Regularization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2018},
}
Figure