CAPTCHA Image Generation: Two-Step Style-Transfer Learning in Deep Neural Networks

Hyun Kwon, Hyunsoo Yoon, Ki-Woong ParkSensors 2020 · DOI

TL;DR

This paper introduces a novel method for generating CAPTCHA images that are more resistant to automated attacks while remaining easily recognizable by humans. By employing a two-step style-transfer learning approach using deep neural networks, the method effectively distorts CAPTCHAs by incorporating stylistic elements from other images, significantly reducing machine recognition rates without compromising human usability.

What Problem Does This Paper Address?

The internet relies heavily on automated systems for various services, making them vulnerable to malicious automated attacks like DDoS, spam, and unauthorized subscriptions. CAPTCHAs (Completely Automated Public Turing test to tell Computers and Humans Apart) are a common defense mechanism, designed to distinguish between human users and bots. However, as CAPTCHA security increases through more aggressive distortions, they become increasingly difficult for humans to decipher. This creates a critical trade-off: highly secure CAPTCHAs are unusable, while easily usable CAPTCHAs are easily broken. This paper tackles this challenge by proposing a method to generate CAPTCHAs that are both robust against machine recognition and maintain high human recognizability.

Methods

The core of the proposed method is a two-step style-transfer learning technique applied to CAPTCHA image generation. This approach leverages the power of Convolutional Neural Networks (CNNs) to extract both content and style features from images.

  1. Content Feature Extraction: The method uses a deep layer of a CNN to extract the semantic content of the original CAPTCHA image, preserving its core structure and characters.
  2. Style Feature Extraction: It then extracts the stylistic features (e.g., texture, color, patterns) from a separate "style" image. This is achieved by analyzing the correlations between feature maps across different layers of the CNN, captured by Gram matrices.
  3. Image Synthesis: The extracted content and style features are then combined to generate a new CAPTCHA image. This is done by minimizing a combined loss function that balances the preservation of the original content (content loss) and the incorporation of the new style (style loss).
  4. Two-Step Process: For generating CAPTCHAs with enhanced distortion, the method can be applied iteratively. The output of the first style transfer becomes the "content" image for a second style transfer, allowing for the combination of multiple styles.

The authors utilize the VGG-19 model as their pre-trained network and employ L-BFGS optimization for the image generation process.

Datasets

The paper uses six real-world CAPTCHA datasets from actual websites for evaluation. These datasets are:

  • nationalinterest.org
  • mail.aol.com
  • cesdb.com
  • smart-mail.de
  • tiki.org
  • articlesfactory.com

For style images, they used images from dataset #6 and other unspecified style images. The DeCAPTCHA system used for evaluation is the GSA Captcha Breaker program.

Key Insights and Ideas

  • Style Transfer for Security: The paper demonstrates that style transfer, a technique typically used for artistic image manipulation, can be effectively repurposed for enhancing CAPTCHA security. By transferring styles, the method introduces distortions that are difficult for machines to interpret but don't fundamentally alter the human-perceivable content.
  • Balancing Content and Style: The core innovation lies in the careful balancing of content and style loss. The authors emphasize that preserving the original content is crucial for human recognizability, hence giving more weight to content loss. This prevents the CAPTCHA from becoming unrecognizable to humans.
  • Cascaded Style Transfer: The ability to apply style transfer in a cascaded manner (using one or two style images) allows for progressively more complex distortions, leading to higher resistance against automated attacks.
  • Human Recognizability Maintained: A significant finding is that despite increased machine resistance, human recognition rates remain comparable to the original CAPTCHAs. This addresses the fundamental trade-off in CAPTCHA design.

Key Results

  • Reduced DeCAPTCHA Recognition: The proposed method significantly reduced the recognition rate by the DeCAPTCHA system.
  • Using one style image: approximately 3.5% recognition rate.
  • Using two style images: approximately 3.2% recognition rate. This is a substantial improvement compared to original CAPTCHAs, which are implicitly assumed to have higher recognition rates by the DeCAPTCHA system.

  • Human Recognition Maintained: Human recognition tests showed that the rates for the generated CAPTCHAs were nearly the same as for the original CAPTCHAs. This indicates the method successfully preserves usability.

  • Variety of CAPTCHAs: The method can generate a diverse range of CAPTCHA images by applying different styles, which can be beneficial for training robust DeCAPTCHA systems or for expanding CAPTCHA datasets.

Limitations and Future Work

  • Style Image Selection: The paper acknowledges that the selection of the style image is important. If the style image is severely distorted or its weight is too high, it can negatively impact the final CAPTCHA's recognizability.
  • Comparison with Original CAPTCHA: It is necessary to compare the generated CAPTCHA with the original to ensure human recognizability.
  • Future Work:
    • Extended Style Application: The method can be extended to combine three or more style images for even greater distortion.
  • New Domains: Future research could explore applying this technique to voice or natural image selection domains for CAPTCHA generation.
  • GAN Integration: Generating CAPTCHAs using Generative Adversarial Networks (GANs) is suggested as an intriguing future prospect.

Summary updated

BibTeX
@article{kwon2020captcha,
  author = {Hyun Kwon and Hyunsoo Yoon and Ki-Woong Park},
  title = {{CAPTCHA Image Generation: Two-Step Style-Transfer Learning in Deep Neural Networks}},
  journal = {Sensors},
  year = {2020},
  doi = {10.3390/s20051495},
}
Figure