ClearSignal ā Production Content Moderation API
Project Status
[!IMPORTANT] Current Status: š¢ Phase 1 Complete (Data Pipeline) | š“ Phases 2ā5 Planned (In Development)
- Implemented: Phase 1 Data Pipeline (
scripts/prepare_data.py,scripts/auto_label.py,scripts/clean_data.py).- NOT Yet Implemented:
- Phase 2: Model Fine-Tuning (DeBERTa-v3 multi-label classification)
- Phase 3: FastAPI Backend & SHAP Token Attribution
- Phase 4: MLOps Containerization & AWS EC2/ECR Deployment
- Phase 5: MMD Input Drift Monitoring & CUPED A/B Testing Infrastructure
Overview
ClearSignal is designed as a multi-label content moderation system that categorizes text across 8 harmful content dimensions (toxic, hate_speech, harassment, misinformation, spam, self_harm, sexual_content, clean) with confidence scores and explainability features.
Currently, Phase 1 (Data Preparation & Labelling Pipeline) is fully implemented. The data pipeline aggregates public datasets, runs automated labelling with a pre-trained transformer model, and produces a cleaned dataset ready for model training.
Implemented Data Pipeline (Phase 1)
The scripts/ directory contains the working data preparation suite:
-
Data Ingestion (
scripts/prepare_data.py):- Downloads 1,000 tweets from
tweets_hate_speech_detection(500 hate, 500 clean). - Downloads 1,000 comments from
ucberkeley-dlab/measuring-hate-speech(500 hateful, 500 clean). - Pre-Sampling Deduplication & Determinism: Fixed a data leakage bug where (~3.4 annotator entries per text) caused inflated duplicate counts downstream. Deduplication by text is performed to shuffling () and sampling, ensuring 100% deterministic and unique post selection.
- Downloads 1,000 tweets from