DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND MACHINE
LEARNING
FINAL YEAR PROJECT REVIEW PHASE – I
Date : 07.11.25 & 08.11.25
CyberGuard: An Adversarially Robust AI System for Harassment Detection and Reporting
BATCH NO:16
TEAM MEMBERS: PROJECT GUIDE:
M. LAVANYA [22TN0061] Mrs. K. Rajasri, [Link].,([Link]), AP/AIML
B. MONIKA [22TN0071]
R. RADHEE [22TN0085]
AGENDA
I. Objective
II. Introduction
III. Literature survey with comparison table
IV. Existing system
V. Proposed system
VI. Results Screenshot
[Link]
[Link]
Objective
To develop and evaluate an AI-based cyber harassment evidence collector
and reporter that leverages adversarial machine learning models to robustly
detect, document, and report abusive content even in the presence of
adversarial attacks that attempt to evade standard detection, thereby ensuring
reliable evidence capture, enhanced user protection, and improved
adaptability to evolving harassment strategies on digital platforms
Introduction
In today’s digital era, social media and online platforms have become essential for
global communication and information exchange. However, these platforms have
also become hotspots for cyberbullying, online harassment, and digital abuse,
which cause severe psychological and emotional harm to victims [1][2].
The anonymity of cyberspace encourages users to engage in abusive
communication with little accountability, making it necessary to develop
automated systems capable of identifying and mitigating such abuse in real time
[3].Traditional moderation and keyword-based filtering techniques are ineffective
against sarcasm, slang, and evolving linguistic manipulation, highlighting the need
for AI-based intelligent solutions [4][5].
Domain: Artificial Intelligence (AI) and Cybersecurity
The project falls under the AI domain, focusing on the development of intelligent
systems that can analyze, detect, and report online abusive behavior. It also aligns with
the Cybersecurity domain, as it protects users from harmful digital interactions and
ensures a secure online environment. AI technologies, especially Natural
Language Processing (NLP), help in understanding contextual meaning and identifying
hidden abusive intent in text. This combination of AI and cybersecurity enhances digital
trust and user safety across online platforms [6][7].
Sub-domain: Natural Language Processing (NLP), Cyber Abuse Detection, and
Digital Forensics
The sub-domain focuses on Natural Language Processing (NLP), which enables
computers to understand human language and context for detecting abusive
content[8].The proposed Hybrid Lexicon–CyberBERT Abusive Content Reporting
Algorithm (HLCA) merges rule-based lexicon filtering with deep learning contextual
analysis to ensure accurate detection[15].Additionally, the system incorporates digital
forensics by capturing metadata, timestamps, and screenshots to generate tamper-evident
evidence reports [16]. This ensures accountability, scalability, and continuous
adaptability for maintaining safer digital ecosystems [17].
Literature Survey with comparison table
Paper (Name &
Year Techniques Used Key Contribution Limitations
Authors)
Caselli et al., “Hate BERT: Created Hate BERT, a domain- Limited to English Reddit data;
Retrained BERT on abusive Reddit
Retraining BERT for Abusive 2021 adapted BERT model for abusive domain-specific, not fully
content
Language Detection in English” language detection generalizable
Kumar et al., “Sub-word Level
Demonstrated that sub-word
Word Embeddings for Hate Sub-word embeddings, deep Performance varies across datasets;
2021 representations improve detection of
Speech and Offensive Language learning requires careful preprocessing
abusive and offensive language
Detection”
Vidgen et al., “Challenges and Identified challenges in abusive
Survey of NLP methods, bias More of a conceptual survey, lacks
Frontiers in Abusive Content 2020 content detection (bias,
analysis empirical experiments
Detection” generalization, multilingualism)
Mozafari et al., “Hate Speech
Detection and Racial Bias BERT fine-tuning, debiasing Addressed racial bias in hate speech Focused only on racial bias; not
2020
Mitigation in Social Media Based methods detection with mitigation strategies extended to other sensitive attributes
on BERT Model”
Samghabadi et al., “Offensive Extended offensive language
Multilingual embeddings, Limited resources; performance still
Language Identification in 2020 detection to low-resource
supervised learning lags behind English-based models
Dravidian Languages” Dravidian languages
Paper (Name &
Year Techniques Used Key Contribution Limitations
Authors)
Qian et al., “A Benchmark Dataset Released dataset to study
Dataset creation, intervention Dataset limited in scale and diversity
for Learning to Intervene in 2019 intervention strategies against hate
prediction of intervention styles
Online Hate Speech” speech
Mathew et al., “Thou Shalt Not Proposed methods for counter-
Counter-speech may not always be
Hate: Countering Online Hate 2019 Graph-based and linguistic features speech generation to mitigate
effective or context-appropriate
Speech” online hate
Liu et al., “NULI at SemEval-2019
Showed strong performance using
Task 6: Transfer Learning for Limited to short Twitter texts; lacks
2019 Transfer learning, BERT transfer learning on SemEval 2019
Offensive Language Detection cross-platform validation
offensive language task
Using Bidirectional Transformers”
Dinan et al., “Build it Break it Fix Proposed adversarial framework to
Focused on dialogue systems, less
it for Dialogue Safety: Robustness 2019 Adversarial testing, dialogue models improve robustness of dialogue
specific to hate speech
from Adversarial Human Attack” safety
Zhang et al., “Detecting Hate
Showed hybrid models outperform
Speech on Twitter Using a CNN + GRU hybrid deep neural Model interpretability issues;
2018 simple baselines for hate speech
Convolution-GRU Based Deep network Twitter-only focus, not generalizable
detection
Neural Network”
Existing System
1. Foundational Studies in Online Harassment Detection:
Early studies focused on detecting abusive content using surface-level text matching and manually curated
datasets to identify hate speech and offensive language. These approaches provided the foundation for modern
automated moderation systems [4][5].
2. Lexicon-Based and Rule-Based Approaches:
These systems rely on predefined dictionaries of offensive terms and linguistic rules to detect harmful
messages. While simple and interpretable, they often fail to capture context, sarcasm, and slang variations,
reducing accuracy [9].
3. Classical Machine Learning Approaches:
Traditional models like Naïve Bayes, SVM, and Logistic Regression were later introduced, using text features
such as TF-IDF and n-grams to classify abusive versus non-abusive text. These models improved precision but
required extensive feature engineering [10].
4. Deep Learning and Transformer-Based Models:
Modern systems leverage CNNs, RNNs, and transformers (BERT, RoBERTa) to analyze semantic meaning
and context in online text [6][7]. These models outperform older methods but demand large datasets and high
computational resources [10][12].
5. Domain-Specific Models: CyberBERT and Variants:
Recent research introduced CyberBERT, a fine-tuned BERT variant trained specifically on
cyberbullying and online abuse datasets. It enhances contextual detection accuracy across diverse
social media environments [15].
6. Adversarial Robustness in Content Moderation:
Existing systems remain vulnerable to adversarial attacks, where abusers modify text (e.g., “idi0t” for
“idiot”) to bypass detection [13][14]. These manipulations expose weaknesses in even the most
advanced AI-based models.
7. Hybrid Detection Approaches:
To overcome these issues, researchers combine rule-based lexicon filtering with AI-based contextual
models, creating hybrid frameworks that improve robustness and adaptability against evolving online
language [15][16].
Drawbacks of Existing System
1. Limited Context Understanding:
Lexicon and rule-based systems fail to interpret sarcasm, slang, abbreviations, and contextual
meaning, leading to inaccurate classification of abusive text [4][5][9].
2. High Dependency on Predefined Keywords:
These systems rely on static word lists, making them ineffective against evolving online language
and new forms of coded abuse [9].
3. Data and Resource Requirements:
Machine learning and transformer-based models such as BERT and CyberBERT require large
annotated datasets and high computational resources, increasing complexity [10][12][15].
4. Lack of Explainability:
Most AI models act as black boxes, offering minimal transparency into how decisions are made—
posing challenges in digital forensics and legal reporting [11][13].
5. Vulnerability to Adversarial Attacks:
Abusers can manipulate text (e.g., “idi0t” for “idiot”) or insert neutral words to evade
detection, reducing system reliability [13][14].
6. Limited Multilingual Adaptability:
Many systems are trained on English-only datasets, leading to poor detection accuracy in
regional or mixed-language content [12].
7. Lack of Evidence Handling:
Existing systems typically stop at detection and do not support metadata or screenshot
capture for forensic documentation and reporting [16].
Proposed system
1. Algorithm Explanation
The Hybrid Lexicon–CyberBERT Abusive Content Reporting Algorithm (HLCA) integrates rule-
based lexicon filtering and AI-driven deep learning models to achieve high accuracy in detecting and
reporting online abuse. The system first preprocesses incoming text using tokenization, normalization,
and slang expansion, followed by lexicon-based filtering to identify offensive or suspicious words,
abbreviations, and misspellings.
The Steps involves :
I. Input Text Preprocessing:
II. Lexicon Detection:
III. CyberBERT Context Analysis:
IV. Hybrid Scoring:
V. Abuse Classification:
VI. Evidence Reporting:
2. Models Usage
• The Lexicon-based model uses a curated dictionary of abusive words, leetspeak, and
multilingual slang for surface-level detection .
• The CyberBERT model, a fine-tuned version of BERT (Bidirectional Encoder
Representations from Transformers), performs contextual interpretation to detect subtle
or implicit abuse .
• CyberBERT is trained on domain-specific abusive communication datasets, improving
robustness across social media, chats, and comment sections. Additionally, feedback
loops allow continuous retraining with new datasets to handle evolving slang and
adversarial inputs, enhancing adaptability.
METRICS
I. F1 Score
The F1 Score is the harmonic mean of precision and recall, balancing the trade-off between correctly
identifying abusive content (recall) and minimizing false positives (precision). It’s ideal for imbalanced datasets, like
cyberbullying detection, where abusive content is less common.
Formula:
II. Precision
Precision measures the proportion of content flagged as abusive that is actually abusive, reflecting the
accuracy of positive predictions.
Formula:
METRICS
III. Accuracy
Accuracy measures the overall correctness of the model, calculating the proportion of correctly classified
instances (both abusive and non-abusive).
Formula:
IV. Area Under ROC Curve (AUC-ROC)
AUC-ROC quantifies the model’s ability to distinguish between abusive and non-abusive content across
various classification thresholds, plotting True Positive Rate (Recall) against False Positive Rate.
Formula:
True Positive Rate (TPR) = (same as Recall).
False Positive Rate (FPR) = .
Note: AUC ranges from 0 to 1 (1 = perfect discrimination, 0.5 = random guessing).
System Architecture
DETECTION
Data Collection
and
Preprocessing Alert and
Report
Real Time
Content Input
Lexicon Based CyberBERT
Analyzer Model
Evidence
bundle PDF
Yes/No flag Severity score JSON
Hybrid Fusion
Create evidence bundle
ARCHITECTURE
Fig. Architecture of Module-1 (Detection Module)
3. Working Methodology
• Data Acquisition: Collects real-time online communication data from social media, chats,
or APIs.
• Preprocessing: Cleans, tokenizes, and normalizes text; converts slang and misspellings to
standard form.
• Lexicon Filtering: Scans text using the abusive word database for initial screening .
• CyberBERT Classification: Evaluates context and intent using deep learning-based
contextual embeddings.
• Severity Scoring and Reporting: Assigns abuse level (light, moderate, severe) and
automatically captures metadata, timestamps, and screenshots for digital forensics .
This integrated methodology ensures real-time detection, context understanding, and
evidence-aware reporting for secure moderation .
4. Modules Description
• User Interface Module: Enables users or moderators to input, view, and review flagged content
through a dashboard.
• Data Preprocessing Module: Handles tokenization, stop-word removal, and slang normalization
to prepare text for analysis .
• Lexicon Filter Module: Detects explicit offensive words, abbreviations, and modified slurs
using predefined dictionaries .
• CyberBERT Classification Module: Performs contextual analysis and classifies messages based
on intent using the fine-tuned BERT model .
• Severity Scoring Module: Evaluates abuse intensity levels and prioritizes responses accordingly.
• Evidence Reporting Module: Automatically captures, encrypts, and stores metadata,
screenshots, and digital signatures for secure legal documentation .
5. Advantages
•High Accuracy: Combines rule-based and deep learning models for contextual detection.
•Real-time Operation: Enables immediate abuse identification and report generation.
•Context-Aware Detection: Effectively identifies sarcasm, slang, and implicit language abuse.
•Evidence-Aware Reporting: Generates tamper-evident reports with metadata for forensic use.
•Scalability: Can be deployed as a browser extension, mobile app, supporting diverse environments.
•Adaptability: Incorporates feedback and retraining loops for evolving abusive trends and multilingual text.
•Supports Digital Safety: Contributes to a secure, ethical, and psychologically safe online ecosystem.
Result and Discussion
• The system integrates lexicon-based filtering with transformer-based contextual
classification to accurately detect and report cyberbullying, hate speech, and offensive
communication in online text .The goal is to create an intelligent detection mechanism
capable of understanding both explicit and implicit abuse, even in the presence of slang,
sarcasm, emojis, and adversarial alterations.
Performance Outcomes
• The HLCA model achieved an overall accuracy of 94.6%, outperforming traditional
lexicon-only (78%) and CNN/RNN models (88%).
• Precision: 0.93 | Recall: 0.92 | F1-Score: 0.925
• Hybrid fusion improved contextual understanding and slang detection by 15%.
• Severity Scoring accurately differentiated between mild, moderate, and severe abuse.
• The system demonstrated real-time detection (<2 sec latency) with secure evidence
capture in structured report format.
Tools usage
• The project was developed using Python for algorithm implementation, TensorFlow
and PyTorch for training and fine-tuning the CyberBERT model, and NLTK for text
preprocessing. MySQL was used for secure evidence storage, and Flask enabled API
integration for browser or app deployment. These tools ensured scalability, real-time
performance, and cross-platform flexibility.
• The HLCA framework stands as a resilient, ethical, and intelligent solution, enhancing
trust and safety across online communities.
Screenshots
Comparative graph
REFERENCES
[1] T. Caselli, V. Basile, J. Mitrović, and M. Granitzer, “HateBERT: Retraining BERT for Abusive
Language Detection in English,” in Proc. 5th Workshop on Online Abuse and Harms (WOAH), Assoc. for
Computational Linguistics, 2021, pp. 17–25.
[2] M. Mozafari, R. Farahbakhsh, and N. Crespi, “Hate Speech Detection and Racial Bias Mitigation in
Social Media Based on BERT Model,” PLOS ONE, vol. 15, no. 8, e0237861, 2020.
[3] J. Qian, A. Bethke, Y. Liu, E. Belding, and W. Y. Wang, “A Benchmark Dataset for Learning to
Intervene in Online Hate Speech,” in Proc. EMNLP-IJCNLP 2019, pp. 4755–4764.
[4] A. Kumar, S. Ghosh, and M. Shrivastava, “Sub-word Level Word Embeddings for Hate Speech and
Offensive Language Detection,” in Proc. 2nd Workshop on Trolling, Aggression and Cyberbullying
(TRAC-2), Assoc. for Computational Linguistics, 2021, pp. 42–49.
[5] B. Mathew et al., “Thou Shalt Not Hate: Countering Online Hate Speech,” in Proc. 13th Intl. AAAI
Conf. on Web and Social Media (ICWSM), 2019, pp. 369–380
REFERENCES
[6] P. Liu, W. Li, and L. Zou, “NULI at SemEval-2019 Task 6: Transfer Learning for Offensive Language
Detection Using Bidirectional Transformers,” in Proc. 13th Intl. Workshop on Semantic Evaluation
(SemEval-2019), pp. 87–91.
[7] B. Vidgen, A. Harris, D. Nguyen, R. Tromble, S. Hale, and H. Margetts, “Challenges and Frontiers in
Abusive Content Detection,” in Proc. 58th Annual Meeting of the Assoc. for Computational Linguistics
(ACL), 2020, pp. 3796–3810.
[8] N. S. Samghabadi et al., “Offensive Language Identification in Dravidian Languages,” in Proc.
WILDRE-4 Workshop, LREC 2020, pp. 38–46.
[9] Z. Zhang, D. Robinson, and J. Tepper, “Detecting Hate Speech on Twitter Using a Convolution-GRU
Based Deep Neural Network,” in Proc. European Semantic Web Conf. (ESWC), 2018, pp. 745–760.
[10] E. Dinan, L. Wu, A. Fan, C. Watkins, and J. Weston, “Build it Break it Fix it for Dialogue Safety:
Robustness from Adversarial Human Attack,” in Proc. EMNLP 2019, pp. 4537–4546