# Every Character Counts: From Vulnerability to Defense in Phishing Detection

arXiv: https://arxiv.org/abs/2509.20589 · HTML: https://mlsanity.com/paper/2509.20589/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 31 of its 66 references that are in the map.
- First posted on arXiv 24 Sep 2025.

## Builds on (most cited first, 30 of 31)

- [BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding](https://mlsanity.com/paper/1810.04805/) (2018)
- [The Llama 3 Herd of Models](https://mlsanity.com/paper/2407.21783/) (2024)
- [RoBERTa: A Robustly Optimized BERT Pretraining Approach](https://mlsanity.com/paper/1907.11692/) (2019)
- [Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization](https://mlsanity.com/paper/1610.02391/) (2016)
- ["Why Should I Trust You?": Explaining the Predictions of Any Classifier](https://mlsanity.com/paper/1602.04938/) (2016)
- [Squeeze-and-Excitation Networks](https://mlsanity.com/paper/1709.01507/) (2017)
- [ALBERT: A Lite BERT for Self-supervised Learning of Language Representations](https://mlsanity.com/paper/1909.11942/) (2019)
- [Character-level Convolutional Networks for Text Classification](https://mlsanity.com/paper/1509.01626/) (2015)
- [Attention is not Explanation](https://mlsanity.com/paper/1902.10186/) (2019)
- [Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailment](https://mlsanity.com/paper/1907.11932/) (2019)
- [Black-box Generation of Adversarial Text Sequences to Evade Deep Learning Classifiers](https://mlsanity.com/paper/1801.04354/) (2018)
- [BAE: BERT-based Adversarial Examples for Text Classification](https://mlsanity.com/paper/2004.01970/) (2020)
- [Spear Phishing With Large Language Models](https://mlsanity.com/paper/2305.06972/) (2023)
- [A Hierarchy of Limitations in Machine Learning](https://mlsanity.com/paper/2002.05193/) (2020)
- [MOROCO: The Moldavian and Romanian Dialectal Corpus](https://mlsanity.com/paper/1901.06543/) (2019)
- [Large Language Model (LLM) for Software Security: Code Analysis, Malware Analysis, Reverse Engineering](https://mlsanity.com/paper/2504.07137/) (2025)
- [SaRoCo: Detecting Satire in a Novel Romanian Corpus of News Articles](https://mlsanity.com/paper/2105.06456/) (2021)
- [An Explainable Transformer-based Model for Phishing Email Detection: A Large Language Model Approach](https://mlsanity.com/paper/2402.13871/) (2024)
- [A Modified Word Saliency-Based Adversarial Attack on Text Classification Models](https://mlsanity.com/paper/2403.11297/) (2024)
- [Analysis and prevention of AI-based phishing email attacks](https://mlsanity.com/paper/2405.05435/) (2024)
- [EXPLICATE: Enhancing Phishing Detection through Explainable AI and LLM-Powered Interpretability](https://mlsanity.com/paper/2503.20796/) (2025)
- [Phishing Attacks Detection -- A Machine Learning-Based Approach](https://mlsanity.com/paper/2201.10752/) (2022)
- [Analysis of Phishing Attacks and Countermeasures](https://mlsanity.com/paper/1410.4672/) (2014)
- [Analyzing Cyber-Attack Intention for Digital Forensics Using Case-Based Reasoning](https://mlsanity.com/paper/2101.01395/) (2021)
- [Detecting Phishing Sites -- An Overview](https://mlsanity.com/paper/2103.12739/) (2021)
- [Targeted Attacks: Redefining Spear Phishing and Business Email Compromise](https://mlsanity.com/paper/2309.14166/) (2023)
- [A Quantitative Study of SMS Phishing Detection](https://mlsanity.com/paper/2311.06911/) (2023)
- [Phishing Email Detection Using Inputs From Artificial Intelligence](https://mlsanity.com/paper/2405.12494/) (2024)
- [Comparative Analysis of Black-Box and White-Box Machine Learning Model in Phishing Detection](https://mlsanity.com/paper/2412.02084/) (2024)
- [Web Phishing Net (WPN): A scalable machine learning approach for real-time phishing campaign detection](https://mlsanity.com/paper/2502.13171/) (2025)

## Abstract (arXiv)

Phishing attacks targeting both organizations and individuals are becoming an increasingly significant threat as technology advances. Current automatic detection methods often lack explainability and robustness in detecting new phishing attacks. In this work, we investigate the effectiveness of character-level deep learning models for phishing detection, which can provide both robustness and interpretability. We evaluate three neural architectures adapted to operate at the character level, namely CharCNN, CharGRU, and CharBiLSTM, on a custom-built email dataset, which combines data from multiple sources. Their performance is analyzed under three scenarios: (i) standard training and testing, (ii) standard training and testing under adversarial attacks, and (iii) training and testing with adversarial examples. Aiming to develop a tool that operates as a browser extension, we test all models under limited computational resources. In this constrained setup, CharGRU proves to be the best-performing model across all scenarios. All models show vulnerability to adversarial attacks, but adversarial training substantially improves their robustness. In addition, by adapting the Gradient-weighted Class Activation Mapping (Grad-CAM) technique to character-level inputs, we are able to visualize which parts of each email influence the decision of each model. Our open-source code and data is released at https://github.com/chipermaria/every-character-counts.
