SugarTextNet: A Transformer-Based Framework for Detecting Sugar Dating-Related Content on Social Media with Context-Aware Focal Loss

Wang, Lionel Z., Ben, Shihan, Huang, Yulu, Qin, Simeng

arXiv.org Artificial Intelligence 

Sugar dating-related content has rapidly proliferated on mainstream social media platforms, giving rise to serious societal and regulatory concerns, including commercialization of intimate relationships and the normalization of transactional relationships. Detecting such content is highly challenging due to the prevalence of subtle euphemisms, ambiguous linguistic cues, and extreme class imbalance in real-world data. In this work, we present SugarT extNet, a novel transformer-based framework specifically designed to identify sugar dating-related posts on social media. SugarT extNet integrates a pretrained transformer encoder, an attention-based cue extractor, and a contextual phrase encoder to capture both salient and nuanced features in user-generated text. T o address class imbalance and enhance minority-class detection, we introduce Context-Aware F ocal Loss, a tailored loss function that combines focal loss scaling with contextual weighting. W e evaluate SugarT extNet on a newly curated, manually annotated dataset of 3,067 Chinese social media posts from Sina W eibo, demonstrating that our approach substantially outperforms traditional machine learning models, deep learning baselines, and large language models across multiple metrics. Comprehensive ablation studies confirm the indispensable role of each component. Our findings highlight the importance of domain-specific, context-aware modeling for sensitive content detection, and provide a robust solution for content moderation in complex, real-world scenarios.