MODEL

NanoMind Security Classifier

On-device Mamba TME classifier for AI agent security content. 9 attack classes. 121KB ONNX. 98.44% accuracy on holdout set. Published to HuggingFace.

98.44%
Accuracy
0.984
Macro F1
9
Attack Classes
121KB
Model Size

Per-Class Performance (v0.5.0)

Evaluated on holdout set (450 samples, never seen during training). All 9 classes exceed 0.90 F1 target.

ClassF1Support
exfiltration0.98050
injection0.97050
privilege_escalation1.00050
persistence0.99050
credential_abuse0.99050
lateral_movement1.00050
social_engineering0.99050
policy_violation0.97150
benign0.96950

Version History

VersionArchitectureAccuracyCorpusStatus
v0.5.0Mamba TME + dropout98.44%v8 (4,500)latest
v0.4.0Mamba TME93.89%v7 (1,440)stable
v0.2.0Mamba TME97.01%v4 (822)deprecated
v0.1.0MLP (3 layers)86%v4 (822)deprecated

Training Data (v8 Corpus)

58% real-world data. Claude LLM reviews every label as chief data scientist. 400 samples per class, stratified 80/10/10 split.

SourceSamplesType
OASB benchmark4,151Real labeled scenarios
Registry (pretrain)4,885Real package descriptions
Synthetic1,029Template edge cases
DVAA88Vulnerable configs
AgentPwn68Real-world captures

Architecture Details

TypeTernary Mamba Encoder (TME)
Blocks8 Mamba SSM blocks
d_model128
d_state64
Dropout0.1
PoolingMean over sequence
Output9-class softmax
FormatONNX (CPU inference)
TrainingApple Silicon MLX
LossCross-entropy, class-weighted
LR ScheduleCosine with warmup
Early StoppingPatience 30 on eval loss

Links