Skip to main content
QUICK REVIEW

[Paper Review] A Deep Learning Model with Hierarchical LSTMs and Supervised Attention for Anti-Phishing

Le-Minh Nguyen, Toan Nguyen|arXiv (Cornell University)|May 3, 2018
Spam and Phishing DetectionComputer Science22 references21 citations
TL;DR

This paper proposes a hierarchical LSTM model with supervised attention for anti-phishing email detection, leveraging word-level and sentence-level representations to improve classification. The model achieves state-of-the-art performance, ranking first in the IWSPA-AP 2018 shared task on unseen test data with an F1 score of 0.979 without headers and 0.991 with headers.

ABSTRACT

Anti-phishing aims to detect phishing content/documents in a pool of textual data. This is an important problem in cybersecurity that can help to guard users from fraudulent information. Natural language processing (NLP) offers a natural solution for this problem as it is capable of analyzing the textual content to perform intelligent recognition. In this work, we investigate state-of-the-art techniques for text categorization in NLP to address the problem of anti-phishing for emails (i.e, predicting if an email is phishing or not). These techniques are based on deep learning models that have attracted much attention from the community recently. In particular, we present a framework with hierarchical long short-term memory networks (H-LSTMs) and attention mechanisms to model the emails simultaneously at the word and the sentence level. Our expectation is to produce an effective model for anti-phishing and demonstrate the effectiveness of deep learning for problems in cybersecurity.

Motivation & Objective

  • To address the limitations of traditional phishing detection methods that rely heavily on manual feature engineering.
  • To develop an end-to-end deep learning model capable of automatically learning effective representations from raw email text.
  • To improve phishing detection by modeling email structure hierarchically at both word and sentence levels.
  • To enhance model interpretability and performance through a novel supervised attention mechanism based on word frequency ranking.
  • To evaluate the model on real-world, unbalanced phishing email datasets from the IWSPA-AP 2018 shared task.

Proposed method

  • The model uses a hierarchical LSTM architecture where word-level LSTMs process individual words in sentences, and sentence-level LSTMs aggregate sentence representations into a full email representation.
  • Attention mechanisms are applied at both word and sentence levels to dynamically weigh the importance of different words and sentences in the email.
  • A novel supervised attention technique is introduced, where word-level attention is guided by the inverse frequency rank of words in the training vocabulary to prioritize rare, potentially suspicious terms.
  • A separate header network with attentive LSTMs is integrated to model email header features when available, improving detection accuracy.
  • The model is trained end-to-end using cross-entropy loss and optimized via backpropagation through time.
  • For data with headers, the training data from the full-header set is combined with extracted body text from the same set to create a larger, more robust training distribution.

Experimental results

Research questions

  • RQ1Can a hierarchical deep learning model with attention mechanisms outperform traditional machine learning methods in phishing email detection?
  • RQ2How effective is the integration of email headers into the classification pipeline using a dedicated header network?
  • RQ3To what extent does supervised attention based on word frequency ranking improve model performance and interpretability?
  • RQ4Does the hierarchical modeling of emails at both word and sentence levels lead to better representation learning compared to flat models?
  • RQ5How does the model generalize to unbalanced, real-world phishing datasets compared to balanced public benchmarks?

Key findings

  • The proposed H-LSTM with supervised attention achieved an F1 score of 0.979 on the first shared task (without headers), ranking first among all participating systems.
  • In the second shared task (with headers), the model achieved an F1 score of 0.991, ranking second overall, demonstrating strong performance on real-world data.
  • The inclusion of the header network improved the F1 score from 0.9631 to 0.9705 in cross-validation, indicating a 0.7% relative gain in performance.
  • The model trained on combined data from both data-no-header and data-full-header sets outperformed models trained on isolated data, showing improved generalization.
  • The supervised attention mechanism based on word frequency ranking significantly enhanced model focus on rare, potentially malicious terms, contributing to improved detection.
  • The training time for the full model (H-LSTM + headers + supervised attention) was 1.5 hours, and inference took only 1 minute on test data, indicating practical deployability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.