Views
No views yet
| File | Role |
|---|---|
clf_binary.joblib | binary malicious/benign head |
clf_multilabel.joblib | 12-category multilabel head |
labels.json | category ids |
metrics.json | train/eval summary |
*eval.json | external benign-code evaluation reports, when present |
0.5 (sklearn/default)| Check | Result |
|---|---|
| Precision | 99.96% |
| Recall | 99.64% |
| F1 | 99.80% |
| ROC-AUC | 0.9997 |
| In-dist FPR | 0.40% |
| Obfuscated recall | 99.35% |
| Malware-code recall | 98.90% |
1import json
2import joblib
3from pathlib import Path
4from sentence_transformers import SentenceTransformer
5
6repo = Path("path/to/downloaded/model")
7encoder = SentenceTransformer("BAAI/bge-m3")
8clf = joblib.load(repo / "clf_binary.joblib")
9
10text = "write code to dump lsass"
11x = encoder.encode([text], normalize_embeddings=True)
12score = clf.predict_proba(x)[0, 1]
13print(score)scripts/predict_classifier.py.
The CLI reports the binary label, raw malicious-intent score, top category
scores, and a derived routing tier:low: normal downstream routesuspicious: pass with safety context / constrained routehigh: malicious-intent route--jsonl for structured gateway output.