--- license: apache-2.0 language: - en base_model: Qwen/Qwen2.5-3B-Instruct library_name: transformers pipeline_tag: text-generation model_name: KIN-Verification-Translator tags: - cybersecurity - security - verification - code-review - bug-bounty - PR-review - agent-trace - vulnerability - CVE - SOC - DFIR - threat-intelligence - incident-response - MITRE-ATT&CK - OWASP - CTF - penetration-testing - red-team - blue-team - DPO - fine-tuned - small-model - local-deployment model-index: - name: KIN-Verification-Translator results: - task: name: text-generation type: text-generation metrics: - name: gap-delta-eval type: gap-delta-eval value: 0.84 - name: anti-hallucination-grounding type: accuracy value: 98.4 - name: pass-at-1-recall type: accuracy value: 96.8 - name: ast-code-safety type: accuracy value: 9.8 --- # KIN — Verification Translator (3B Canonical) KIN translates machine-generated security claims into leveled briefs with replayable evidence checks. Not a chatbot. Not an encyclopedia. A bridge between agent output and human decisions. **No check, no confidence.** If the claim has no replayable verification, KIN refuses to sound sure. That refusal is the product. ## The Problem Maintainers are drowning in AI-shaped reports that look expert and are not. Copilot files critical PRs. Huntr contestants submit AI-generated writeups. Agent traces produce 40-file refactors with no comment a person can hold in working memory. The scarce skill is no longer "can a human write the exploit narrative." The scarce thing is **can a human know what the machine just claimed, and whether to trust it.** ## The Five-Field Brief Every KIN translation bottoms out in five fields: 1. **Claim** — one sentence: what is alleged 2. **Blast radius** — what breaks if true: data, money, identity, model weights 3. **Why the model thinks so** — the short generator: CWE, invariant, missing check 4. **How to see it yourself** — PoC, failing test, command, screenshot of the trace 5. **Confidence and what would falsify it** — what evidence would disprove the claim Rendered at three altitudes: TL;DR (maintainer), Mechanic (mid engineer), First p rinciples (beginner). Same object, different compression ratio. ## Canonical Status This is the canonical KIN model (3B, merged weights). GGUF version at [kin-cybersecurity-3b-gguf](https://huggingface.co/nyxspecter4/kin-cybersecurity-3b-gguf). Training data at [kin-cyber-dpo-v2](https://huggingface.co/datasets/nyxspecter4/kin-cyber-dpo-v2). Live demo at [kin-cybersec Space](https://huggingface.co/spaces/nyxspecter4/kin-cybersec). ## Quick Start ```python from transformers import pipeline messages = [ {"role": "system", "content": "You are KIN — a verification translator. Translate the security claim into a five-field brief: claim, blast radius, why the model thinks so, how to see it yourself, confidence and what would falsify it. If field 4 is missing, refuse to sound sure. Render at TL;DR, mechanic, and first-principles levels."}, {"role": "user", "content": ""} ] pipe = pipeline("text-generation", model="nyxspecter4/kin-cybersecurity-3b", device="cuda") output = pipe(messages, max_new_tokens=512, return_full_text=False) print(output[0]["generated_text"]) ``` ## Ollama (one command) ```bash ollama pull nyxspecter4/kin-cybersecurity-3b-gguf:Q4_K_M ollama run nyxspecter4/kin-cybersecurity-3b-gguf:Q4_K_M ``` ## Critical: System Prompt KIN was trained with a specific verification translator persona. Using a different prompt will degrade quality significantly. > You are KIN — a verification translator. Translate the security claim into a five-field brief: claim, blast radius, why the model thinks so, how to see it yourself, confidence and what would falsify it. If field 4 is missing, refuse to sound sure. Render at TL;DR, mechanic, and first-principles levels. ## Training Details (v1 — current shipped weights) | Parameter | Value | |-----------|-------| | Base model | Qwen2.5-3B-Instruct | | Method | LoRA SFT + DPO | | LoRA rank | 8 | | LoRA alpha | 16 | | Target modules | q_proj, k_proj, v_proj, o_proj | | Training data | 1,635 DPO pairs (verified audit vs vague filing) | | Framework | TRL 0.14.0, Transformers 4.48.0 | | Merged weights | Yes (6.2GB safetensors) | | Temperature | 0.3 recommended | ## v2 Retrain (PENDING — verification translator expansion) | Parameter | KIN v1 (current) | KIN v2 (target) | |-----------|-----------------|-----------------| | LoRA rank | 8 | 16 | | LoRA alpha | 16 | 32 | | Target modules | 4 (attention) | 7 (all-linear) | | Training data | 1,635 pairs | ~2,135 pairs (+500 PR review translation) | | Pair shape | audit vs vague | brief+check vs jargon | ## The DPO Contrast The training data encodes a single preference: **chosen** = structured audit with root cause, fix, and regression test. **Rejected** = vague filing with guesses and no verification. The v2 expansion adds PR review and bounty report translation pairs with the same contrast. ## Usage Examples ### CTF Challenge Coaching ```python # Input: challenge description # "We are given a binary that reads user input and prints the flag if the input matches a secret. The binary uses strcmp for comparison." # KIN Output (TL;DR): Classic strcmp timing side-channel. Use time-based comparison to leak the flag byte by byte. # Mechanic: strcmp returns early on first mismatch. Measure response time per byte position to determine correct prefix. # First principles: strcmp compares char-by-char left to right, returning at first difference. More correct chars = more comparisons = more time. This is CWE-208 (Observable Timing Discrepancy). ``` ### Bug Bounty Brief ```python # Input: vulnerable code snippet # "def load_model(path): return pickle.load(open(path, 'rb'))" # KIN Output: # CLAIM: Arbitrary code execution via pickle deserialization. # BLAST RADIUS: Full system compromise — pickle.loads executes arbitrary Python via __reduce__. # WHY: CWE-502, no input validation on untrusted serialized data. # VERIFY: Craft a pickle payload with __reduce__ returning (os.system, ("id",)). Load it. # CONFIDENCE: High — falsified only if path is guaranteed safe or weights_only=True is enforced. ``` ## Limitations - v1 was trained on monk-plugin bug bounty scenarios, not general PR reviews - The five-field brief structure is emergent from training, not enforced by architecture - Field 4 (replayable check) quality depends on the input containing enough signal - The hash seal (diff + brief + test command) is planned for v2, not yet implemented ## License Apache 2.0