Manuscript Offprint

arXiv:2609.01171

Johnny Still Receives Spam SMS: Assessing the Robustness of SMS Spam Detection

Muhammad Salman, Muhammad Islam, Muhammad Ikram, Mohamed Ali Kaafar

MUHAMMAD SALMAN, Macquarie University, Australia

MUHAMMAD ISLAM, University of Engineering and Technology Mardan, Pakistan

MUHAMMAD IKRAM, Macquarie University, Australia

MOHAMED ALI KAAFAR, Macquarie University, Australia

SMS spam detection systems often achieve high accuracy in controlled environments but struggle against adversarial attacks and increasingly sophisticated spam tactics in real-world deployments. In this paper, we evaluate the robustness of SMS anti-spam systems that end users actually rely on, including commercial messaging applications, third-party anti-spam services, and publicly available open-weight models hosted on Hugging Face. We evaluate these systems under both standard and adversarial conditions, considering perceptible and state-of-the-art imperceptible attacks. We include only perturbations that we verify survive real SMS or RCS delivery, rather than lab-only artifacts.

Our experiments reveal significant gaps in existing spam detectors' ability to identify adversarially manipulated messages. We further demonstrate that adversarial training alone is insufficient. Using an explicit held-out evaluation protocol, we find that robustness transfers well within a perturbation family but degrades sharply against structurally distinct, encoding-level attacks. To address these weaknesses, we propose a multi-model ensemble that combines adversarial training with spam classifiers diverse in architecture and tokenization. Our results show that this ensemble, particularly when using a minority-voting strategy, substantially improves robustness against both perceptible and imperceptible adversarial attacks while maintaining competitive classification accuracy. We also characterize the resulting precision-recall trade-off and recommend operating points for false-positive-sensitive and recall-critical deployments. These findings highlight the need for comprehensive robustness evaluations and ensemble-based defenses for building more secure SMS spam detection systems in real-world settings.

Additional Key Words and Phrases: SMS spam detection, adversarial machine learning, adversarial robustness, ensemble learning, spam filtering, text classification, mobile security

1 Introduction

Despite significant advancements in SMS spam¹ detection, where state-of-the-art classifiers spanning both conventional machine learning and deep learning (DL) approaches exhibit impressive true-positive rates (TPRs) exceeding 99% and false-positive rates (FPRs) below 1% [12, 17, 29, 30, 33, 45], the real-world effectiveness of these models remains questionable. In practice, these models are frequently deployed within various anti-spam infrastructures, including mobile text applications and commercial anti-spam services. However, they often fail to deliver the expected performance, particularly when confronted with sophisticated spam techniques, evolving spam characteristics—referred to as concept drift and adversarial attacks that exploit the classifiers' vulnerabilities. This discrepancy between controlled experimental success and practical deployment failure highlights the critical need for a deeper investigation into the causes of these failures and the development of more robust solutions.

While periodic retraining of machine learning models is a common practice to address concept drift [10, 21, 24], the issue of robustness remains a critical challenge in SMS spam. Despite its importance, robustness in these classifiers has

¹In this work, SMS spam refers to any unsolicited message, including advertisements, proselytizing, and scams. We treat phishing/smishing as a subset of spam (a single positive class) rather than a separate category; any message meeting this unsolicited-content criterion is labeled spam.

Authors' Contact Information: Muhammad Salman, Macquarie University, Sydney, Australia, muhammad.salman2@students.mq.edu.au; Muhammad Islam, University of Engineering and Technology Mardan, Mardan, Pakistan, imisl4m@gmail.com; Muhammad Ikram, Macquarie University, Sydney, Australia, muhammad.ikram@mq.edu.au; Mohamed Ali Kaafar, Macquarie University, Sydney, Australia, dali.kaafar@mq.edu.au.

been insufficiently explored in the existing literature, presenting a significant risk given the adversarial nature of the environments in which these models must operate. Although previous research has partially examined the robustness of spam classifiers against adversarial examples (AEs) [18, 31] and the attacks that generate them, known as adversarial attacks, this exploration has been far from comprehensive. Most studies on black-box attacks in SMS spam detection have focused on character perturbations to create AEs, demonstrating their impact on non-hardened spam classifiers and subsequently measuring the improved robustness of models following adversarial training (AT) [18]. This approach typically involves retraining classifiers with datasets augmented by spam messages generated through specific attacks. However, such methods often overlook the broader issue of general robustness, especially against unknown attacks, which is crucial for practical and secure deployments.

The current robustness evaluations in research often fail to replicate the complexity of real-world conditions. Typically, studies either introduce new attacks to showcase classifier vulnerabilities or rely on a single attack for adversarial training, subsequently evaluating robustness against that same attack. In some cases, robustness is assessed against different attacks, but this is usually limited to just one or two additional attacks of the same category (without considering the inherent similarities or differences between the attacks) following the initial black-box attack for AT. This narrow focus is inadequate for assessing general robustness. In practical settings, a classifier should be hardened against a wide spectrum of known attacks, as improving robustness against one attack does not guarantee defense against others. Moreover, unknown attacks—those not encountered during the model's training or hardening process—pose an even greater challenge. Therefore, a more comprehensive evaluation of robustness, ideally against a diverse array of both known and unknown attacks, is necessary to ensure the reliability and security of SMS spam detection systems in real-world applications.

Furthermore, while it is well-established that machine learning models are vulnerable to adversarial examples, recent studies have revealed that the transferability of these examples in text is asymmetric [47]. Specifically, an adversarial example designed to deceive one model (Model A) may not necessarily have the same effect on another model (Model B), and vice versa. This asymmetry is influenced by various factors, including network architecture, tokenization schemes, word embeddings, and model capacity. Among these, tokenization schemes have been found to have the greatest impact on transferability, followed by network architecture, embedding type, and model capacity [47]. These findings are particularly encouraging as they suggest that an ensemble approach—employing multiple models with diverse architectures and tokenization strategies—could enhance the overall robustness of spam detection systems. By reducing the likelihood that a single adversarial example will succeed across multiple models, this ensemble approach, combined with adversarial training, could provide a more resilient defense against a wide range of attacks.

To mitigate these vulnerabilities, our research explores potential solutions, including the use of ensemble methods and adversarial training. By leveraging an ensemble of diverse models or incorporating adversarial training into the development process, we aim to enhance the robustness of these systems, making them more resilient to both known and unknown adversarial strategies.

In our work, we address these gaps with the following contributions:

  • Analysis of Anti-spam Infrastructure and Open-Weight Spam Models. We conducted an extensive series of experiments evaluating the anti-spam infrastructure end-users actually rely on—text messaging apps and third-party anti-spam services—together with publicly available pen-weight spam models hosted on HuggingFace, under both benign and adversarial conditions. To do so, we transmitted a substantial number of benign and spam messages from a freshly registered SIM through APIs to third-party services and to messaging

apps on smartphones under our control, and separately implemented and tested the open-weight models. None of the evaluated systems identified all spam messages: false-negative rates (FNR) exceeded 5%—our comparative benchmark across systems (Section 6.2)—highlighting the inadequacy of current SMS spam detection. All tested systems further proved vulnerable to adversarial manipulation, and we verified that our imperceptible perturbations survive real SMS/RCS delivery (Section 3.5) rather than being lab-only artifacts. We also manually labeled the misdetected messages into 12 spam categories to characterize which spam types evade detection.

  • Training, Hardening, and Quantifying Generalization to Held-Out Attacks. To improve SMS spam detection against adversarial attacks, we trained our own ML models on a recent SMS spam dataset and hardened them through adversarial training, which substantially improved robustness against the attacks seen during training. We then defined an explicit held-in/held-out protocol to measure whether this robustness generalizes, and quantified the generalization gap per attack family. We find that robustness transfers almost completely to same-class perturbations but leaves a substantial gap against mechanically distinct, encoding-level attacks such as homoglyph substitution—showing that adversarial training’s generalization is class-bounded rather than uniform.

  • Ensemble of Detectors to Mitigate Adversarial Attacks. We then investigate whether an ensemble of detectors can effectively mitigate the impact of adversarial attacks by employing different decision rules: minority, majority, and consensus. We evaluate various ensembles comprising both open-weight models and our own trained models, analyzing their performance when classifying both adversarially transformed spam and original spam messages. Our findings reveal that an ensemble of our own models, particularly when incorporating an adversarially trained model and utilizing a minority voting strategy, is highly effective at countering adversarial attacks, demonstrating robustness against known adversarial tactics as well as a considerable degree of resilience to unknown attacks. Finally, we translate these results into deployment guidance: ensemble size and decision rule control a recall–precision trade-off, and we recommend operating points for false-positive-sensitive traffic (OTP/banking) versus recall-critical traffic (marketing-heavy), acknowledging that the highest-recall configurations come at the cost of elevated false positives.

References (10)