A Transferable and Automatic Tuning of Deep Reinforcement Learning for Cost Effective Phishing Detection

Orel Lavie, Asaf Shabtai, Gilad KatzarXiv 2022 · DOI

Introduction

In the domain of cybersecurity, particularly phishing detection, ensemble methods—which combine multiple machine learning models—represent the state-of-the-art for accuracy. However, this performance comes at a significant computational cost. Running a full suite of deep learning models on every incoming URL is inefficient, as many samples are easily identifiable as benign or malicious by simpler, faster detectors.

To address this, researchers have explored Deep Reinforcement Learning (DRL) to create dynamic selection policies. These agents learn to invoke detectors sequentially, stopping as soon as a confident classification can be made. While promising, previous frameworks like SPIREL faced significant hurdles: the difficulty of manually tuning abstract reward functions to meet specific performance targets, the inability to transfer policies between different datasets (domain drift), and vulnerability to adversarial manipulation.

This paper introduces CETRA (Cost-Effective TRansferable Automatic tuning), a DRL framework designed to automate the tuning process and enable seamless policy transfer across domains while maintaining high detection standards.

Methodology

CETRA functions as an intelligent "manager" for an ensemble of detectors. It observes the output of a detector and decides whether to classify the sample immediately or proceed to a more complex, expensive model. The framework introduces three primary innovations:

1. Metric Goal-driven Cost Functions

Traditional DRL requires security experts to manually adjust reward values to achieve desired outcomes (e.g., a specific False Positive Rate). CETRA automates this by monitoring batch-level performance metrics during training. If the agent falls below a predefined threshold (such as a target Recall), it receives a penalty; exceeding the target yields a bonus. This allows the agent to self-correct and align its policy with specific organizational requirements without manual recalibration.

2. Density Function-based Policy Transfer

A policy optimized for one environment often fails in another due to differences in data distribution and computational costs. CETRA addresses this through a mathematical "transplantation" method. By calculating the Kullback–Leibler (KL) divergence between the probability density functions of computational costs in two different domains, the framework can derive the necessary hyperparameters to adapt a pre-trained policy to a new environment.

3. Stochastic Policy for Adversarial Robustness

To mitigate the risk of adversarial attacks—where an attacker might attempt to force the system into a resource-exhaustion state or bypass detection—CETRA employs a stochastic decision process. By introducing probabilistic elements into the detector selection path, the framework becomes less predictable, making it significantly harder for attackers to engineer "worst-case" samples.

Experimental Evaluation

The researchers evaluated CETRA using two large-scale phishing URL datasets:

  • Bahnsen Dataset: Approximately 687,000 active samples.
  • Wang Dataset: Approximately 327,000 active samples.

The ensemble managed by CETRA consisted of five diverse models: CURNN (LSTM-based), eXpose (CNN-based), PDRCNN (Bidirectional LSTM), a feature-based FFNN, and XGBoost.

Key Results

The experimental results demonstrate that CETRA effectively balances efficiency and accuracy:

  • Efficiency Gains: CETRA reduced total processing time by up to 76% compared to a full ensemble approach. This is primarily achieved by identifying "easy" samples that can be accurately classified by the first, least expensive detector.
  • Accuracy Preservation: This massive reduction in computation resulted in a negligible impact on performance, with F1-scores dropping by only 0.25% to 0.35%.
  • Transferability: The density-based transfer mechanism allowed policies to be moved between the Bahnsen and Wang datasets with minimal loss in effectiveness, proving the framework's adaptability.
  • Adversarial Resilience: In white-box evasion tests, CETRA maintained high robustness, with attackers successfully fooling the system in only 5.5% of attempts under high-perturbation scenarios.

Conclusion and Future Work

CETRA represents a significant step forward in making advanced phishing detection both practical and scalable. By automating the reward-tuning process and providing a mathematical foundation for policy transfer, it removes the primary barriers to deploying DRL-based security systems.

Future research will focus on expanding CETRA's application to other high-volume security domains, such as malware analysis and network intrusion detection. Additionally, while the current study assumes a very strong adversary, future iterations may explore more realistic, constrained adversarial models to further refine the system's defensive capabilities.

Summary updated

Abstract

Many challenging real-world problems require the deployment of ensembles multiple complementary learning models to reach acceptable performance levels. While effective, applying the entire ensemble to every sample is costly and often unnecessary. Deep Reinforcement Learning (DRL) offers a cost-effective alternative, where detectors are dynamically chosen based on the output of their predecessors, with their usefulness weighted against their computational cost. Despite their potential, DRL-based solutions are not widely used in this capacity, partly due to the difficulties in configuring the reward function for each new task, the unpredictable reactions of the DRL agent to changes in the data, and the inability to use common performance metrics (e.g., TPR/FPR) to guide the algorithm's performance. In this study we propose methods for fine-tuning and calibrating DRL-based policies so that they can meet multiple performance goals. Moreover, we present a method for transferring effective security policies from one dataset to another. Finally, we demonstrate that our approach is highly robust against adversarial attacks.
BibTeX
@misc{lavie2022transferable,
  author = {Orel Lavie and Asaf Shabtai and Gilad Katz},
  title = {{A Transferable and Automatic Tuning of Deep Reinforcement Learning for Cost Effective Phishing Detection}},
  year = {2022},
  eprint = {2209.09033},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2209.09033},
}
Figure