arXiv:2610.21254cs.CLOct 2026

Manuscript Offprint

arXiv:2610.21254

LLM-Based Weak Annotation for Cybersecurity Tweet Classification: A Teacher-Student Framework

Ferry Afit Kurniawan, Kazushi Okamoto, Koki Karube, Kei Harada, Atsushi Shibata

Ferry Afit Kurniawan, Kazushi Okamoto, Koki Karube, Kei Harada, Atsushi Shibata

Department of Informatics, Graduate School of Informatics and Engineering, The University of Electro-Communications

1-5-1 Chofugaoka, Chofu, Tokyo 182-8585, Japan

{ferry.afit, kazushi, karubekoki, harada, shibata-atsushi}@uec.ac.jp

© 2026 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.

Abstract—Cyber threat intelligence (CTI) relies on the timely identification of emerging threats, enabling organizations and security analysts to support situational awareness and decision-making. Social media platforms such as X (formerly Twitter) have become valuable CTI sources because vulnerabilities and attack activities are often discussed there before appearing in formal reports. However, the rapid growth of cybersecurity discussions on social media has created more content than domain experts can realistically review and annotate, making labeled data a major bottleneck for developing supervised learning approaches. While large language models (LLMs) have shown promise as weak annotators in other domains, their effectiveness for cybersecurity tweet classification and downstream training of domain-specific pre-trained language models (PLMs) remains underexplored. To address this challenge, we propose a Teacher–Student weak supervision framework in which a selected LLM serves as a Teacher to generate weak labels for unlabeled cybersecurity tweets, enabling the training of cybersecurity-specific PLMs without large-scale manual annotation. Experimental results show that PLMs trained solely on LLM-generated labels consistently achieve F1 scores above 0.92, remaining within 3 percentage points of fully human-supervised models across all evaluated architectures. These findings suggest that LLM-based weak annotation offers a practical alternative for constructing cybersecurity-specific training data when expert annotation resources are limited.

Index Terms—Cyber threat intelligence, weak annotation, large language models, teacher-student framework, tweet classification, pre-trained language models, weak supervision.

I. INTRODUCTION

Cyber threat intelligence (CTI) supports cybersecurity decision-making by providing actionable information about emerging threats, vulnerabilities, and adversarial activity at strategic, operational, and tactical levels [1], [2]. Modern CTI systems combine heterogeneous information sources, knowledge bases, and analytical tools to transform raw threat data into insights that support security analysts and organizational decisions [1]. Among these sources, social media platforms such as X (formerly Twitter) have become valuable channels for collecting timely CTI. Cybersecurity researchers, vendors, and practitioners often share newly discovered vulnerabilities, malware campaigns, exploit activities, and indicators of compromise (IOCs) on these platforms before the same information appears in formal advisories or public databases [3]–[7]. Automated analysis of social media streams can therefore complement traditional threat intelligence pipelines and improve cyber situational awareness.

Despite this potential, cybersecurity-related tweets are noisy, brief, and produced at a volume that far exceeds what experts can realistically review and annotate manually [5], [7]. This creates a bottleneck for supervised learning approaches, which depend on high-quality labeled data for training. Although numerous models have been proposed for cybersecurity tweet classification and related CTI tasks, their effectiveness depends on carefully curated annotated datasets [3], [4], [8]–[10], [13].

Weak supervision offers a promising way to reduce the reliance on exhaustive manual annotation. Additionally, recent advances in natural language processing (NLP) have demonstrated that large language models (LLMs) can generate weak annotations for training downstream classifiers in a variety of text classification tasks [12], [17]–[20]. However, the reliability of LLM-generated weak labels for cybersecurity tweet classification, and their usefulness for training cybersecurity-specific pre-trained language models (PLMs), remain insufficiently explored.

To address this gap, we propose a Teacher-Student weak supervision framework for cybersecurity tweet classification. First, multiple candidate LLMs are evaluated as Teacher models. Next, the most reliable model is selected to annotate a large corpus of unlabeled cybersecurity tweets. Finally, these weakly labeled data are used to fine-tune cybersecurity-specific PLMs, and their performance is compared under human-only, LLM-only, and hybrid supervision settings. This design enables us to examine both the annotation quality of LLM Teachers and the downstream value of their weak labels for domain-specific Student models. Accordingly, this study is guided by three research questions:

RQ1 Which candidate LLM provides the most reliable weak annotations for cybersecurity tweets?

RQ2 Can LLM-generated weak labels effectively supervise the training of cybersecurity-specific PLMs?

RQ3 How do LLM-only, human-only, and hybrid supervision compare in downstream classification performance?

The main contributions of this work are summarized as follows:

• We systematically evaluate three LLMs as weak annotators for cybersecurity tweet classification across public benchmark datasets and a newly collected gold-standard dataset.

• We introduce a scalable Teacher-Student pipeline that uses LLM-generated weak labels to construct a training set for cybersecurity-specific PLMs, reducing the need for extensive manual annotation.

• Across four cybersecurity-specific PLMs, we show that LLM-only training recovers approximately 98% of human-only F1 on average, indicating that weak annotation can provide competitive downstream performance under limited annotation resources.

References (27)