π‘οΈ Unified DNS Classifier (cavalcant/unified-dns-classifier)
Privacy-preserving multimodal binary classifier (BENIGN vs MALICIOUS) for real-time DNS threat detection (Phishing & DGA).
- Source Code, FastAPI SSE Server & React Console: github.com/hcvlcnt/unified-model-v-web
- Textual Branch:
distilbert/distilbert-base-uncased(max_length=48) over generalized DNS/WHOIS metadata (DNSRecordType,CountryCode,RegisteredCountry,RegisteredOrg,TLD) β[CLS](768d) βDense(64, ReLU) - Numerical Branch: 3-layer Tabular MLP (
26 β 64 β 32 β 16) over MinMax-scaled lexical, Shannon entropy, email-auth (SPF/DKIM/DMARC), and reputation signals - Privacy & Anti-Leakage: Raw
DomainandIpstrings are strictly omitted from the Transformer input; lexical features are computed exclusively in RAM at the edge and discarded prior to inference.
Holdout Evaluation (20,000 Stratified Unseen Samples)
| Metric | Score |
|---|---|
| Accuracy | 99.41% |
| Precision | 99.82% |
| Recall | 98.99% |
| F1-Score | 99.40% |
| ROC-AUC | 0.9998 |
Included Artifacts
saved_model/β TensorFlow SavedModel graph (serving_defaultsignature)tokenizer/β WordPiece tokenizer configuration and vocabularyscaler.jsonβ Portable JSON MinMax bounds fitted strictly on the training split (zeropickledependencies)metadata.json&metrics.jsonβ Feature schema, label map (0: BENIGN,1: MALICIOUS), and holdout metrics
Quickstart
Clone the main repository β UnifiedPredictor automatically downloads this artifact bundle on first startup:
git clone https://github.com/hcvlcnt/unified-model-v-web.git
cd unified-model-v-web
pip install -r requirements.txt
uvicorn src.api:app --host 0.0.0.0 --port 8000
Or download the artifacts explicitly via CLI:
python -m src.hub download --repo-id cavalcant/unified-dns-classifier --artifacts-dir artifacts/v1
Model tree for cavalcant/unified-dns-classifier
Base model
distilbert/distilbert-base-uncased