3E-Solver: An Effortless, Easy-to-Update, and End-to-End Solver with Semi-Supervised Learning for Breaking Text-Based Captchas

Xianwen Deng, Ruijie Zhao, Yanhao Wang, Libo Chen, Yijun Wang, Zhi Xue

Introduction

Text-based captchas have long served as a primary defense against automated bot attacks. However, as security measures have evolved to include complex distortions, overlapping characters, and occluding lines, traditional "segmentation-based" solvers have become obsolete. Modern deep learning approaches offer "end-to-end" solutions but typically require massive amounts of manually labeled data, which is both costly and time-consuming to produce.

The 3E-Solver addresses these challenges by providing a framework that is Effortless (low labeling cost), Easy-to-Update (utilizes unlabeled data), and End-to-End (no complex preprocessing). By leveraging semi-supervised learning, specifically an improved version of the FixMatch algorithm, the 3E-Solver achieves state-of-the-art performance with minimal human intervention.

The Evolving Challenge of Text-Based Captchas

Modern captcha designs from major providers like Google, Yandex, and Apple utilize sophisticated techniques to thwart automated recognition. These include hollow fonts, rotation, noise backgrounds, and "two-layer" structures where characters are stacked or heavily overlapped.

Examples of modern text-based captcha schemes and their security features.

Traditional solvers that attempt to segment characters before recognition fail in these scenarios because there is no clear boundary between individual letters. The 3E-Solver bypasses this by treating the entire captcha as a sequence, using an attention mechanism to focus on relevant features dynamically.

Methodology: AED-Net and Improved FixMatch

The 3E-Solver architecture consists of two main components: a baseline model (AED-Net) and a semi-supervised training framework.

AED-Net (Attention-based Encoder-Decoder)

The core model uses a CNN-based Encoder (ResBlocks) to extract high-level visual features from the captcha image. These features are then passed to a GRU-based Decoder equipped with an Attention Mechanism. This allows the model to "attend" to specific spatial regions of the feature map corresponding to each character in the sequence, effectively solving the segmentation problem implicitly.

Improved FixMatch Framework

To minimize the need for labeled data, the authors adapt the FixMatch algorithm. In this setup, the model generates "pseudo-labels" for weakly augmented unlabeled images. These labels then serve as ground truth for training the model on strongly augmented (heavily distorted) versions of the same images. The authors introduced three critical enhancements:

  1. Teacher Forcing: Accelerates convergence during supervised training by providing the ground-truth previous character to the decoder.
  2. Adaptive Batch Normalization (ABN): Addresses the distribution shift between weakly and strongly augmented data by using separate BN layers, preventing the model from becoming "confused" by noise.
  3. Consistency Loss: Uses Mean Square Error (MSE) to ensure predictions remain stable across different augmentations, even for "hard" samples that fall below the typical confidence threshold for pseudo-labeling.

Experimental Results

The researchers evaluated the 3E-Solver on eight real-world captcha schemes from high-traffic websites, including Google, Microsoft, and Yandex. Using only 500 labeled samples and 5,000 unlabeled samples per scheme, the results were significant:

  • Google Captcha: Achieved 76.4% accuracy, a massive improvement over previous state-of-the-art methods which struggled to reach 10% under similar low-label constraints.
  • Simpler Schemes: Reached near-perfect accuracy (>99%) on platforms like Ganji and Weibo.
  • Efficiency: The solver is highly optimized for real-time use, with recognition speeds ranging from 14ms to 17ms on a standard CPU.

Ablation studies confirmed that the inclusion of Adaptive BN and Teacher Forcing was vital, with their removal leading to performance drops of over 30% in some cases.

Conclusion

The 3E-Solver demonstrates that semi-supervised learning can drastically reduce the barrier to breaking modern text-based captchas. By combining an attention-based end-to-end model with a robust training framework that handles distribution shifts, it provides a powerful tool for security researchers to evaluate the robustness of current captcha designs. Future work may extend these principles to image-based or audio-based challenges as the landscape of web security continues to shift.

Summary updated

BibTeX
@inproceedings{deng2022e,
  author = {Xianwen Deng and Ruijie Zhao and Yanhao Wang and Libo Chen and Yijun Wang and Zhi Xue},
  title = {{3E-Solver: An Effortless, Easy-to-Update, and End-to-End Solver with Semi-Supervised Learning for Breaking Text-Based Captchas}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.24963/ijcai.2022/530},
}
Figure