adaptive-classifier/ai-detector
AI Text Detector (adaptive-classifier)
A binary AI text detector that classifies text as human-written or AI-generated/edited, built with adaptive-classifier on the EditLens ICLR 2026 benchmark.
How It Works
Uses frozen embeddings from TrustSafeAI/RADAR-Vicuna-7B (a RoBERTa-large model adversarially trained for AI detection) as a feature extractor, with adaptive-classifier's prototype memory + neural head for classification.
Text → RADAR backbone (frozen, 355M) → 1024-dim embedding → adaptive-classifier head → human / aiInstallation
pip install adaptive-classifierUsage
from adaptive_classifier import AdaptiveClassifier
classifier = AdaptiveClassifier.from_pretrained("adaptive-classifier/ai-detector")
predictions = classifier.predict("Your text here")
# Returns: [('ai', 0.85), ('human', 0.15)]
# Batch prediction
results = classifier.predict_batch(["text 1", "text 2"], k=2)
# Continuous learning — add new examples without retraining
classifier.add_examples(
["new human text example", "new ai text example"],
["human", "ai"]
)Results
Evaluated on the EditLens ICLR 2026 test splits.
Binary Classification (Human vs AI)
Per-Split Results
The model generalizes well to OOD splits: accuracy on emails (testenron) and unseen AI models (Llama 3.3-70B / testllama) is on par with or above the in-distribution test set.
Training Details
- Backbone: TrustSafeAI/RADAR-Vicuna-7B (frozen, 355M params)
- Dataset: pangram/editlens_iclr train split
- Examples: 1,000 per class (2,000 total), stratified sample
- Classes:
human(humanwritten), `ai` (aiedited + ai_generated) - Embedding dim: 1024
- Prototype weight: 0.3, Neural weight: 0.7
- Training time: ~6 minutes on CPU
Live Predictions Dataset
Predictions made through the hosted Space are continuously logged to adaptive-classifier/ai-detector-data — a public dataset of real-world predictions with optional user feedback (Correct / Incorrect). This dataset grows over time and can be used to track model performance, find failure cases, and drive future retraining.
Limitations
- Binary only (human vs AI) — does not distinguish AI-edited from AI-generated
- Relies on frozen RADAR embeddings; cannot learn new text patterns beyond what RADAR captures
- Minimum ~50 words of text recommended for reliable detection
- Trained on English text from specific domains (reviews, news, creative writing, academic)
Citation
@software{adaptive_classifier,
title = {Adaptive Classifier: Dynamic Text Classification with Continuous Learning},
author = {Sharma, Asankhaya},
year = {2025},
publisher = {GitHub},
url = {https://github.com/codelion/adaptive-classifier}
}