# Temporal Context-Aware Spam Detection Using Transformer-Based NLP Models

DevFeed: [Temporal Context-Aware Spam Detection Using Transformer-Based NLP Models](<https://devfeed.tech/articles/temporal-context-aware-spam-detection-using-transformer-based-nlp-models-133084.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.16139>)

Author: Fariz Zeynalov, Razim Mammadli

Published: 2026-11-13T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [text-classification](<https://devfeed.tech/topics/text-classification.md>), [AI Models](<https://devfeed.tech/topics/ai-models.md>), [infini-attention](<https://devfeed.tech/topics/infini-attention.md>)

Tags: [classification](<https://devfeed.tech/tags/classification.md>), [cs-cl](<https://devfeed.tech/tags/cs-cl.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [detection](<https://devfeed.tech/tags/detection.md>), [nlp](<https://devfeed.tech/tags/nlp.md>), [spam](<https://devfeed.tech/tags/spam.md>), [temporal](<https://devfeed.tech/tags/temporal.md>), [transformer](<https://devfeed.tech/tags/transformer.md>)

## AI overview

The abstract reports outbound SMS spam detection at send time using 43,741 messages from a proprietary production database. On an 8,749-message held-out test set, text-only DeBERTa-v3-base outperformed TF-IDF with logistic regression in AUC-ROC (0.9011 vs. 0.8721); DeBERTa's F1 was 0.8412. A deployed DistilBERT model with inter-message temporal features achieved 0.8238 accuracy, 0.8382 spam-class F1, and 0.9128 recall at threshold 0.5 on a separate, class-balanced 20,000-message production evaluation. Those figures are not directly comparable to the held-out results. The paper also describes TemporalBertSpam, which uses a causal Transformer to encode each sender's message history, but says a same-split evaluation is needed to measure its contribution.

## Source excerpt

arXiv:2611.16139v1 Announce Type: cross Abstract: Spam detection is usually treated as single-message classification, ignoring behavioral patterns that emerge across sequences of messages from the same sender. We study outbound SMS spam detection at the carrier level, where the goal is to predict at send time whether a carrier will flag a message as spam. Using a proprietary production database of 43,741 outbound SMS messages with UTC transmission timestamps and carrier delivery statuses, we report three sets of results. On an 8,749-message held-out test set, a TF-IDF + logistic regression baseline reaches AUC-ROC 0.8721, and a text-only DeBERTa-v3-base classifier reaches AUC-ROC 0.9011 and F1 0.8412. A deployed DistilBERT model augmented with inter-message temporal features reaches accuracy 0.8238, spam-class F1 0.8382, and recall 0.9128 at threshold 0.5 on a separate, class-balanced 20,000-message production evaluation set; these results are not directly comparable with the held-out test results. We also describe TemporalBertSpam, an architecture that encodes each sender's message history with a causal Transformer, and outline the same-split evaluation needed to measure its contribution.