Style Transfer and Topological Feature Analysis of Text-Based CAPTCHA via Generative Adversarial Networks
Abstract
1. Introduction
2. Theoretical Basis
2.1. Generative Adversarial Networks
2.2. Cycle Generative Adversarial Networks
2.3. Analysis of Topological Feature of Graphs and Networks
Algorithm 1: Create Weighted Graph | |
Input: A list of edges with nodes and weights | |
Output: A weighted graph G | |
1 | edges = [ (’a’, ’b’, 2.8), (’a’, ’f’, 3.0), …]; |
2 | Create an empty graph G; |
3 | foreach edge in edges do |
4 | Add weighted edge to G from edge; |
5 | return G |
Algorithm 2: Calculate Network Diameter | |
Input: Graph G, List of edges | |
Output: Network diameter | |
1 | Calculate all pairs shortest path using Dijkstra’s algorithm; |
2 | foreach node1 in nodes do |
3 | foreach node2 in nodes after node1 do |
4 | Calculate the shortest path distance from node1 to node2; |
5 | Sum the distances for all pairs; |
6 | Store and display each edge weight; |
7 | return The maximum of the shortest paths as the network diameter |
3. Methodology
3.1. Enhanced CAPTCHA for Universal Style Transfer Models
3.2. Once-Transfer Based on Generative Adversarial Networks (GANs)
3.3. Twice-Transfer Based on Generative Adversarial Networks (GANs)
4. Result Analysis
4.1. Evaluation of the Anti-Recognition Capability
4.2. Topological Feature Analysis
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
GANs | Generative adversarial networks |
OCR | Optical character recognition |
CNNs | Convolutional neural networks |
RSR | Recognition success rate |
References
- Von Ahn, L.; Blum, M.; Hopper, N.J.; Langford, J. CAPTCHA: Using hard AI problems for security. In International Conference on the Theory and Applications of Cryptographic Techniques; Springer: Berlin/Heidelberg, Germany, 2003; pp. 294–311. [Google Scholar]
- Zhu, B.B.; Yan, J.; Bao, G.B.; Yang, M.W.; Xu, N. Captcha as Graphical Passwords-A New Security Primitive Based on Hard AI Problems. IEEE Trans. Inf. Forensics Secur. 2014, 9, 891–904. [Google Scholar] [CrossRef]
- Pour, M.S.; Nader, C.; Friday, K.; Bou-Harb, E. A comprehensive survey of recent internet measurement techniques for cyber security. Comput. Secur. 2023, 1, 103123. [Google Scholar] [CrossRef]
- Thobhani, A.; Gao, M.; Hawbani, A.; Ali, S.T.; Abdussalam, A. Captcha recognition using deep learning with attached binary images. Electronics 2020, 9, 1522. [Google Scholar] [CrossRef]
- Lorenzi, D. Enhancing Security and Usability from a Human Perspective on the World Wide Web; Rutgers University-Graduate School-Newark: New Brunswick, NJ, USA, 2016. [Google Scholar]
- Ye, G.; Tang, Z.; Fang, D.; Zhu, Z.; Feng, Y.; Xu, P.; Chen, X.; Wang, Z. Yet Another Text Captcha Solver: A Generative Adversarial Network Based Approach. In Proceedings of the ACM SIGSAC Conference on Computer and Communications Security (CCS), Toronto, TO, Canada, 15ߝ19 October 2018; pp. 332–348. [Google Scholar]
- Gao, H.; Yan, J.; Cao, F.; Zhang, Z.; Lei, L.; Tang, M.; Zhang, P.; Zhou, X.; Wang, X.; Li, J.; et al. A Simple Generic Attack on Text Captchas. In Proceedings of the 23rd Annual Network and Distributed System Security Symposium (NDSS), San Diego, CA, USA, 21–24 February 2016. [Google Scholar]
- Schmidhuber, J. Deep learning in neural networks: An overview. Neural Netw. 2015, 6, 85–117. [Google Scholar] [CrossRef] [PubMed]
- Gao, H.; Wang, W.; Qi, J.; Wang, X.; Liu, X.; Yan, J. The robustness of hollow CAPTCHAs. In Proceedings of the 2013 ACM SIGSAC Conference on Computer & Communications Security, Berlin, Germany, 4–8 November 2013; pp. 1075–1086. [Google Scholar]
- Goodfellow, Z.I.J.; Pouget-Abadie, J.; Mirza, M.; Xu, B.; Warde-Farley, D.; Ozair, S.; Courville, A.; Bengio, Y. Generative adversarial nets. In Proceedings of the NIPS’14: Proceedings of the 28th International Conference on Neural Information Processing Systems; Montreal, QC, Canada, 8–13 December 2014, Volume 27.
- Elson, J.; Douceur, J.R.; Howell, J.; Saul, J. Asirra: A CAPTCHA that exploits interest-aligned manual image categorization. CCS 2007, 7, 15. [Google Scholar]
- Liu, L.; Xi, Z.; Ji, R.; Ma, W. Advanced deep learning techniques for image style transfer: A survey. Signal Process.-Image Commun. 2019, 7, 465–470. [Google Scholar] [CrossRef]
- Gatys, L.A.; Ecker, A.S.; Bethge, M. Image style transfer using convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 2414–2423. [Google Scholar]
- Cai, Q.; Ma, M.X.; Wang, C.; Li, H.S. Image neural style transfer: A review*. Comput. Electr. Eng. 2023, 1, 8. [Google Scholar] [CrossRef]
- Johnson, J.; Alahi, A.; Li, F.-F. Perceptual Losses for Real-Time Style Transfer and Super-Resolution. In Proceedings of the 14th European Conference on Computer Vision (ECCV), Amsterdam, The Netherlands, 11–14 October 2016; pp. 694–711. [Google Scholar]
- Zhu, J.-Y.; Park, T.; Isola, P.; Efros, A.A. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 2223–2232. [Google Scholar]
- Nielson, J.L.; Paquette, J.; Liu, A.W.; Guandique, C.F.; Tovar, C.A.; Inoue, T.; Irvine, K.A.; Gensel, J.C.; Kloke, J.; Petrossian, T.C. Topological data analysis for discovery in preclinical spinal cord injury and traumatic brain injury. Nat. Commun. 2015, 6, 8581. [Google Scholar] [CrossRef] [PubMed]
- Creswell, A.; White, T.; Dumoulin, V.; Arulkumaran, K.; Sengupta, B.; Bharath, A.A. Generative adversarial networks: An overview. IEEE Signal Process. Mag. 2018, 35, 53–65. [Google Scholar] [CrossRef]
- da, F.; Costa, L.; Rodrigues, F.A.; Travieso, G.; Boas, P.R.V. Characterization of complex networks: A survey of measurements. Adv. Phys. 2007, 56, 167–242. [Google Scholar]
- Noto, M.; Sato, H. A method for the shortest path search by extended Dijkstra algorithm. In Proceedings of the SMC 2000 Conference Proceedings. 2000 IEEE International Conference on Systems, Man and Cybernetics’ Cybernetics Evolving to Systems, Humans, Organizations, and Their Complex Interactions’(cat. no. 0), Nashville, TN, USA, 8–11 October 2000; IEEE: Piscataway, NJ, USA, 2000; Volume 3, pp. 2316–2320. [Google Scholar]
- Felzenszwalb, P.F.; Huttenlocher, D.P. Efficient graph-based image segmentation. Int. J. Comput. Vis. 2004, 59, 167–181. [Google Scholar] [CrossRef]
- Ji, T.; Luo, Y.; Lin, Y.; Yang, Y.; Zheng, Q.; Lian, S.; Li, J. ImageVeriBypasser: An image verification code recognition approach based on Convolutional Neural Network. Expert Syst. 2024, 41, e13658. [Google Scholar] [CrossRef]
Parameter | Original Images | After Universal Style Transfer |
---|---|---|
Average diameter | 70.357 | 56.675 |
Parameter | Original Images | After Universal Style Transfer | After Once-Transfer |
---|---|---|---|
Average diameter | 70.357 | 56.675 | 53.850 |
Parameter | Original Images | After Universal Style Transfer | After Once- Transfer | After Twice- Transfer |
---|---|---|---|---|
Average diameter | 70.357 | 56.675 | 53.850 | 47.933 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Xue, T.; Guo, Z.; Yin, Z.; Rong, Y. Style Transfer and Topological Feature Analysis of Text-Based CAPTCHA via Generative Adversarial Networks. Mathematics 2025, 13, 1861. https://doi.org/10.3390/math13111861
Xue T, Guo Z, Yin Z, Rong Y. Style Transfer and Topological Feature Analysis of Text-Based CAPTCHA via Generative Adversarial Networks. Mathematics. 2025; 13(11):1861. https://doi.org/10.3390/math13111861
Chicago/Turabian StyleXue, Tao, Zixuan Guo, Zehang Yin, and Yu Rong. 2025. "Style Transfer and Topological Feature Analysis of Text-Based CAPTCHA via Generative Adversarial Networks" Mathematics 13, no. 11: 1861. https://doi.org/10.3390/math13111861
APA StyleXue, T., Guo, Z., Yin, Z., & Rong, Y. (2025). Style Transfer and Topological Feature Analysis of Text-Based CAPTCHA via Generative Adversarial Networks. Mathematics, 13(11), 1861. https://doi.org/10.3390/math13111861