From Detection to Action: Integrating Machine Learning and Large Language Models for Child Online Safety
Abstract
Online grooming and exploitation have become increasingly pervasive threats targeting minors through social media, gaming platforms, and online communication channels. The subtle, adaptive, and manipulative nature of such predatory language presents a significant challenge for both parents and automated systems in terms of early detection. This research presents a comprehensive hybrid framework that integrates machine learning (ML), natural language processing (NLP), and large language models (LLMs) to detect, explain, and mitigate online predatory behavior. A hybrid dataset of chat messages was constructed using both human and AI-generated content (GPT-4o and Claude 3.5 Sonnet) to ensure linguistic diversity and enhance model generalization. Multiple supervised classifiers, including Support Vector Machine (SVM), Logistic Regression, Random Forest, K-Nearest Neighbors (KNN), and an Ensemble Voting Classifier, were trained using TF-IDF and Word2Vec features. The Ensemble model achieved the highest performance with 96.9 % accuracy using TF-IDF and improved to 97.5 % when augmented with part-of-speech (POS) tag frequencies. Beyond classification, this research incorporates Gemini 2.0 Flash, a large language model designed to enhance interpretability and provide real-time support. Gemini analyzes unsafe messages, explains why they are considered threats, highlights alarming keywords, and provides parents with clear, actionable safety recommendations. In an evaluation of 200 unsafe messages, Gemini's explanations and suggested actions aligned with human expert judgments by over 99% and conformed to best-practice frameworks established by the Internet Crimes Against Children (ICAC) Task Force, the U.S. Department of Homeland Security's Know2Protect initiative, and INTERPOL's Crimes Against Children program. To operationalize these capabilities, we developed a multi-tier web platform named SafeGuard. The platform consolidates the ML models, Gemini reasoning engine, and real-time monitoring tools into an interactive environment featuring dashboards, alert panels, message scanners, and guidance modules. SafeGuard transforms automated predictions into interpretable and trustworthy digital safety intelligence, enabling parents and guardians to understand, verify, and respond to threats in real time. The findings demonstrate that combining lexical, syntactic, and semantic analysis with expert-level LLM reasoning provides a robust and ethical approach to combating online grooming and exploitation. The system represents a significant advancement in explainable and human-centered AI for child online protection.
Fields of Study & Subjects
Hate Speech and Cyberbullying Detection
Mental Health via Writing
Adversarial Robustness in Machine Learning
Publication details
- Journal / source
- 2026 IEEE 16th Annual Computing and Communication Workshop and Conference (CCWC)
- Publisher
- IEEE
- Pages
- 0737–0744
- Publication date
- 5 January 2026