CoolFace
Modelpublic

Pankei/soc-narrative-grpo32-qwen3-14b

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
0likes9downloads
Model Card

SOC Narrative GRPO โ€” Qwen3-14B (Step 32, Budget 512)

![GitHub](https://github.com/Pancake2021/researchworkbyastudent) ![Open In Colab](https://colab.research.google.com/github/Pancake2021/researchworkbyastudent/blob/main/notebooks/socnarrativedemo.ipynb) ![Hugging Face](https://huggingface.co/Pankei)

LoRA adapter for Qwen/Qwen3-14B trained with GRPO LoRA on 512 balanced user/day windows (CERT R4.2) (step 32).

Description

SOC Narrative is a framework for insider threat detection using small open-weight LLMs. A model receives a user/day window of events from the CERT Insider Threat Dataset R4.2 and must produce a structured response with:

  • โ€”Risk label: normal, suspicious, or malicious
  • โ€”Evidence: cited event IDs supporting the decision
  • โ€”Reasoning: brief explanation of the investigation logic

This project explores whether small LLMs (3Bโ€“14B) can match or exceed traditional ML baselines for UEBA (User and Entity Behavior Analytics).

Metrics (devbalanced50)

MetricValue
Accuracy0.82
Macro F10.832
Recall Malicious0.76
Valid Format Rate0.88
Actionability Rate0.8

Quick Usage

python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base = "Qwen/Qwen3-14B"
model = AutoModelForCausalLM.from_pretrained(base, torch_dtype="auto", device_map="auto")
model = PeftModel.from_pretrained(model, "Pankei/soc-narrative-grpo32-qwen3-14b")

tokenizer = AutoTokenizer.from_pretrained(base)
inputs = tokenizer("<your prompt>", return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(output[0]))
Note: This is a LoRA adapter (~30โ€“160 MB). You need the full base model (Qwen/Qwen3-14B) to load it.

Training Details

  • โ€”Base model: Qwen/Qwen3-14B
  • โ€”Method: GRPO LoRA
  • โ€”Train data: 512 balanced user/day windows (CERT R4.2)
  • โ€”Checkpoint: step 32
  • โ€”LoRA rank: 32, alpha: 64, target modules: qproj, kproj, vproj, oproj
  • โ€”Format: Structured SOC Narrative (risk + evidence + reasoning)
  • โ€”Hardware: NVIDIA H100 (80 GB)

Limitations

  • โ€”Evaluated on a small balanced sample (n=50) โ€” results may not generalize to production distributions
  • โ€”GRPO improves over SFT in accuracy (+8pp), format compliance (+20pp), and actionability (+12pp), at a modest recall cost vs SFT.
  • โ€”Dataset is based on synthetic insider threat scenarios from CERT R4.2 (2016) โ€” real-world performance may differ

Citation

bibtex
@misc{soc-narrative-2026,
  author = {Research project},
  title = {SOC Narrative: Small LLMs for UEBA / Insider Threat Detection},
  year = {2026},
  howpublished = {\url{https://github.com/Pancake2021/research_work_by_a_student}}
}