| International Journal of Computer Applications |
| Foundation of Computer Science (FCS), NY, USA |
| Volume 187 - Number 142 |
| Year of Publication: 2026 |
| Authors: Samuel Okechukwu Nnaji, Anyalebechi Felicia Nneamaka, Christabel Linda Uchenwa, Abigail Eberechi Nwoka |
10.5120/ijca209cd5833714
|
Samuel Okechukwu Nnaji, Anyalebechi Felicia Nneamaka, Christabel Linda Uchenwa, Abigail Eberechi Nwoka . Detection of Artificial Intelligence-Generated Phishing Attacks using Transformer Models. International Journal of Computer Applications. 187, 142 ( Sep 2026), 34-44. DOI=10.5120/ijca209cd5833714
The proliferation of large language models (LLMs) such as GPT-4, Claude, and Llama has fundamentally altered the phishing threat landscape by enabling attackers to generate grammatically fluent, contextually convincing, and highly personalized phishing content at scale. Unlike traditional phishing emails, which often exhibit tell-tale linguistic errors and generic phrasing, artificial intelligence (AI)-generated phishing messages closely mimic legitimate human correspondence, substantially reducing the effectiveness of conventional rule-based and keyword-driven detection systems. This study proposes and evaluates a transformer-based framework for detecting AI-generated phishing attacks in enterprise email environments. A composite corpus of 15,000 labelled messages comprising legitimate correspondence, human-crafted phishing emails, and LLM-generated phishing emails synthesized from multiple generator models was constructed and used to fine-tune four transformer variants (BERT-base, DistilBERT, RoBERTa, and a proposed attention-fusion hybrid) alongside classical machine learning and recurrent baselines. The proposed hybrid model, which combines domain-adaptively pre-trained RoBERTa and DistilBERT encoders through an attention-weighted fusion layer, achieved the strongest performance, recording 97.8% accuracy, an F1-score of 97.5%, and an area under the receiver operating characteristic curve (AUC) of 0.991, outperforming all baseline models and the best-performing single transformer (RoBERTa, 96.1% accuracy) by a statistically meaningful margin. Explainability analysis using attention visualization further showed that the model consistently attended to psychological-pressure cues, spoofed-domain indicators, and stylistic hallmarks characteristic of machine-generated text. These findings demonstrate that transformer architectures, when combined with a purpose-built AI-generated phishing corpus, can meaningfully close the detection gap created by generative AI misuse and offer a viable foundation for next-generation, explainable email security systems.