Private, local SMS spam filtering — built by Dro1d Labs.
Defndr processes messages entirely on-device, providing high-accuracy SMS spam detection without sending any data off the device.
Defndr is live on the iOS App Store.
- Official site: https://defndr.org
- Research: https://dro1d.org/defndr.html
This repository provides reference implementations for educational purposes, demonstrating:
- ✅ Deterministic SMS preprocessing
- ✅ Hybrid spam scoring combining heuristics and ML
- ✅ On-device monitoring of model performance
- ✅ High-performance architecture for iOS 18+
Note: This repository does not include the proprietary filtering model, training pipeline, or production datasets.
mermaid graph LR A[Raw SMS] --> B[MessagePreprocessingPipeline] B --> C[Feature Extraction] C --> D[HeuristicSignalScoring] C --> E[ML Model Vote] D --> F{Hybrid Decision} E --> F F --> G[Block/Allow] F --> H[MLModelHealthMonitor]
Tokenization, normalization, and deterministic preprocessing of SMS text. Handles:
- Unicode normalization (NFKC)
- Privacy-preserving fingerprinting (SHA256)
- Language detection
- Lightweight feature extraction
Combines heuristics and ML scoring for spam classification. Features:
- Configurable signal weights
- Per-sender threshold overrides
- Thread-safe configuration updates
- JSON-driven config management
Monitors model performance and drift entirely on-device:
- Latency tracking (P95, mean)
- Confidence distribution monitoring
- Anomaly detection (low confidence, high latency)
- Privacy-first telemetry (no external reporting)
- 100% On-Device Processing — No data leaves the device
- No Analytics — No tracking, no telemetry servers
- Deterministic Hashing — Privacy-preserving message fingerprints
- Open Architecture — Transparent design for security review
swift import Foundation
// Initialize pipeline let pipeline = MessagePreprocessingPipeline(mode: .standard) let scorer = HeuristicSignalScoring() let monitor = MLModelHealthMonitor()
// Process an incoming SMS let processed = await pipeline.process("URGENT! Click here to claim your prize: http://scam.com")
// Evaluate with heuristics let result = scorer.evaluate( shallowFeatures: processed.shallowFeatures, mlVote: 0.89, // ML model confidence sender: nil )
// Log model health await monitor.recordPrediction(latencyMs: 12.3, confidence: 0.89)
print("Spam score: (result.normalizedScore)") print("Decision: (result.normalizedScore >= 0.65 ? "BLOCK" : "ALLOW")")
- Latency: < 15ms per message (iPhone 14 Pro)
- Memory: < 10MB footprint
- Accuracy: 99.2% spam detection rate (internal benchmarks)
- False Positives: < 0.1%
See DEFNDRvsOTHERS.md for a detailed comparison with Truecaller, Hiya, RoboKiller, and other SMS filtering solutions.
- All code, models, and data are Dro1d Labs intellectual property
- Educational and reference purposes only
- No copying, redistribution, or commercial use without explicit written permission from Dro1d Labs
For licensing inquiries: legal@dro1d.org
- Website: https://defndr.org
- Research: https://dro1d.org/defndr
- Email: contact@dro1d.org
🛡️ Built with privacy in mind. Powered by on-device intelligence.
© 2026 Dro1d Labs. All rights reserved.