messages listlengths 3 3 | metadata unknown |
|---|---|
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are an expert Exploit Writer. Assume a counterfactual mindset: actively try to break i... | {
"source_dataset": "real_insufficient_det_v5",
"ground_truth_label": 0,
"cwe_id": "CWE-119",
"framework": "deterministic_abstain",
"had_concrete_sink": true
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are an expert Exploit Writer. ASSUME you are attacking this code.\n\nMANDATORY [SCRATC... | {
"ground_truth_label": 1,
"domain": "Real-world C/C++",
"source_dataset": "real_insufficient_mined_v5",
"pair_id": "9cb177301fdab492e4cfef376b28339afe3ef663503421",
"target": 1,
"cwe": "CWE-119",
"diff_idents": [
"INT_MAX",
"buffer",
"currlen",
"doapr_outch",
"maxlen",
"min",
... |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a Symbolic Execution Engine. In [SCRATCHPAD], create a short state-tracking log tr... | {
"ground_truth_label": 1,
"cwe_id": "CWE-125",
"source_dataset": "tier1_vuln_v5",
"complexity_level": "real-world",
"domain": "tcpdump",
"_src": "real_vuln"
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a deterministic C/C++ static security expert. Analyze the code linearly. In [CONST... | {
"source_dataset": "real_insufficient_det_v5",
"ground_truth_label": 0,
"cwe_id": "CWE-416",
"framework": "deterministic_abstain",
"had_concrete_sink": true
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a Senior Security Auditor who catches your own mistakes.\n\nMANDATORY [SCRATCHPAD]... | {
"ground_truth_label": 1,
"cwe_id": "CWE-126",
"source_dataset": "synth_vuln_v5",
"framework": "",
"complexity_level": "Level 3"
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a deterministic C/C++ static security analyzer using LINEAR reasoning.\n\nMANDATOR... | {
"ground_truth_label": 1,
"cwe_id": "CWE-416",
"source_dataset": "synth_vuln_v5",
"framework": "",
"complexity_level": "Level 3"
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a Symbolic Execution Engine tracing exact runtime values.\n\nMANDATORY [SCRATCHPAD... | {
"source_dataset": "real_insufficient_det_v5",
"ground_truth_label": 1,
"cwe_id": "CWE-416",
"framework": "deterministic_abstain",
"had_concrete_sink": true
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a Path-Sensitive Code Analyzer. Do not jump to conclusions. In [CONSTRAINTS], iden... | {
"ground_truth_label": 0,
"domain": "Real-world C/C++",
"source_dataset": "real_insufficient_mined_v5",
"pair_id": "4dcc29e1574d88f4465ba865ed82800032f76418184623",
"target": 0,
"cwe": "CWE-119",
"diff_idents": [
"CONFIG_ITANIUM",
"__end___rse_patchlist",
"__start___rse_patchlist",
"endif... |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a Symbolic Execution Engine tracing exact runtime values.\n\nMANDATORY [SCRATCHPAD... | {
"ground_truth_label": 0,
"domain": "Real-world C/C++",
"source_dataset": "real_insufficient_mined_v5",
"pair_id": "5ac37f87ff18843aabab84cf75b2f8504c2d81fe488560",
"target": 0,
"cwe": "CWE-119",
"diff_idents": [
"DESC_LDT",
"LDT_ENTRY_SIZE",
"addr",
"entries",
"ldt",
"long",
... |
[
{
"role": "system",
"content": "You are a symbolic-execution engine for C/C++. Architecture: x86_64 Linux LP64.\nAnalyze the operation marked // [TARGET_SINK].\nIn [SCRATCHPAD], show a compact state table with the requested end position and remaining capacity.\nOutput exactly these seven tags in order and n... | {
"ground_truth_label": 0,
"domain": "Real-world C/C++",
"source_dataset": "real_insufficient_mined_v5",
"pair_id": "90585e657db48f93bd73bc45d4caa975323da41b164450",
"target": 0,
"cwe": "CWE-416",
"diff_idents": [
"FrameForCurrentContext",
"JavaScript",
"NOTREACHED",
"The",
"WebLocalFr... |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a Path-Sensitive Code Analyzer. You MUST enumerate EVERY branch.\n\nMANDATORY [SCR... | {
"ground_truth_label": 0,
"cwe_id": "CWE-126",
"source_dataset": "synth_safe_v5",
"framework": "",
"complexity_level": "Level 3"
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a Path-Sensitive Code Analyzer. You MUST enumerate EVERY branch.\n\nMANDATORY [SCR... | {
"ground_truth_label": 0,
"domain": "Real-world C/C++",
"source_dataset": "real_insufficient_mined_v5",
"pair_id": "7d8cefdf6d0e457b7a855c9503684f1058c2a356161832",
"target": 0,
"cwe": "CWE-119",
"diff_idents": [
"WebGLObject",
"WebGLRenderingContext"
],
"ground_overlap": [
"WebGLObject",... |
[
{
"role": "system",
"content": "You are a path-sensitive C/C++ static-analysis engine. Architecture: x86_64 Linux LP64.\nAnalyze the operation marked // [TARGET_SINK].\nIn [SCRATCHPAD], enumerate Path 1 and Path 2, then identify the Critical Path.\nOutput exactly these seven tags in order and no other prose... | {
"ground_truth_label": 0,
"cwe_id": "CWE-125",
"source_dataset": "synth_safe_v5",
"framework": "",
"complexity_level": "Level 2"
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are an expert Exploit Writer. ASSUME you are attacking this code.\n\nMANDATORY [SCRATC... | {
"ground_truth_label": 1,
"cwe_id": "CWE-122",
"source_dataset": "tier1_vuln_v5",
"complexity_level": "real-world",
"domain": "openjpeg",
"_src": "real_vuln"
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a Path-Sensitive Code Analyzer. Do not jump to conclusions. In [CONSTRAINTS], iden... | {
"ground_truth_label": 0,
"cwe_id": "CWE-121",
"source_dataset": "synth_safe_v5",
"framework": "",
"complexity_level": "Level 2"
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a Senior Security Auditor. In [SCRATCHPAD], begin with a naive, superficial assess... | {
"ground_truth_label": 0,
"cwe_id": "CWE-119",
"source_dataset": "tier1_safe_v5",
"complexity_level": "real-world",
"domain": "libyang",
"_src": "real_safe"
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are an expert Exploit Writer. Assume a counterfactual mindset: actively try to break i... | {
"ground_truth_label": 1,
"cwe_id": "CWE-125",
"source_dataset": "tier1_vuln_v5",
"complexity_level": "real-world",
"domain": "tensorflow",
"_src": "real_vuln"
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a deterministic C/C++ static security expert. Analyze the code linearly. In [CONST... | {
"ground_truth_label": 1,
"cwe_id": "CWE-416",
"source_dataset": "tier1_vuln_v5",
"complexity_level": "real-world",
"domain": "ImageMagick",
"_src": "real_vuln"
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a deterministic C/C++ static security expert. Analyze the code linearly. In [CONST... | {
"source_dataset": "real_insufficient_det_v5",
"ground_truth_label": 0,
"cwe_id": "CWE-416",
"framework": "deterministic_abstain",
"had_concrete_sink": false
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine. Architecture: x86_64 Linux LP64.\nAnalyze the operation marked // [TARGET_SINK] by testing a concrete adversarial input.\nIn [SCRATCHPAD], include Attacker Goal, Malicious Input, Bypass Analysis, and Exploitation Path.\nOutput exactly t... | {
"ground_truth_label": 1,
"domain": "Real-world C/C++",
"source_dataset": "real_insufficient_mined_v5",
"pair_id": "4dcc29e1574d88f4465ba865ed82800032f76418184623",
"target": 1,
"cwe": "CWE-119",
"diff_idents": [
"CONFIG_ITANIUM",
"__end___rse_patchlist",
"__start___rse_patchlist",
"endif... |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a Path-Sensitive Code Analyzer. You MUST enumerate EVERY branch.\n\nMANDATORY [SCR... | {
"ground_truth_label": 0,
"cwe_id": "CWE-787",
"source_dataset": "synth_safe_v5",
"framework": "",
"complexity_level": "Level 3"
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a Senior Security Auditor who catches your own mistakes.\n\nMANDATORY [SCRATCHPAD]... | {
"ground_truth_label": 1,
"cwe_id": "CWE-120",
"source_dataset": "synth_vuln_v5",
"framework": "",
"complexity_level": "Level 3"
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a Senior Security Auditor. In [SCRATCHPAD], begin with a naive, superficial assess... | {
"ground_truth_label": 1,
"domain": "Real-world C/C++",
"source_dataset": "real_insufficient_mined_v5",
"pair_id": "7ada876a8703f23befbb20a7465a702ee39b1704159064",
"target": 1,
"cwe": "CWE-119",
"diff_idents": [
"On",
"Prepare",
"and",
"current",
"drops",
"fshared",
"goto",
... |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a Symbolic Execution Engine tracing exact runtime values.\n\nMANDATORY [SCRATCHPAD... | {
"ground_truth_label": 0,
"cwe_id": "CWE-119",
"source_dataset": "tier1_safe_v5",
"complexity_level": "real-world",
"domain": "Chrome",
"_src": "real_safe"
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a Path-Sensitive Code Analyzer. Do not jump to conclusions. In [CONSTRAINTS], iden... | {
"ground_truth_label": 1,
"domain": "Real-world C/C++",
"source_dataset": "real_insufficient_mined_v5",
"pair_id": "e34e01b1b0987e418bc22e3ef1cf2e4ecaead264164381",
"target": 1,
"cwe": "CWE-119",
"diff_idents": [
"break"
],
"ground_overlap": [
"break"
],
"framework": "skeptical_reflexion"... |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are an expert Exploit Writer. ASSUME you are attacking this code.\n\nMANDATORY [SCRATC... | {
"ground_truth_label": 1,
"cwe_id": "CWE-119",
"source_dataset": "tier1_vuln_v5",
"complexity_level": "real-world",
"domain": "libxml2",
"_src": "real_vuln"
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a Symbolic Execution Engine tracing exact runtime values.\n\nMANDATORY [SCRATCHPAD... | {
"ground_truth_label": 0,
"domain": "Real-world C/C++",
"source_dataset": "contrastive_mined_v5",
"pair_id": "5338aac7b8b880b0c5e0c15e27dadc44c5559284159990",
"target": 0,
"cwe": "CWE-125",
"diff_idents": [
"ND_TCHECK_128BITS",
"bp",
"i"
],
"ground_overlap": [
"ND_TCHECK_128BITS",
... |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a Symbolic Execution Engine tracing exact runtime values.\n\nMANDATORY [SCRATCHPAD... | {
"ground_truth_label": 1,
"cwe_id": "CWE-119",
"source_dataset": "tier1_vuln_v5",
"complexity_level": "real-world",
"domain": "savannah",
"_src": "real_vuln"
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a Symbolic Execution Engine tracing exact runtime values.\n\nMANDATORY [SCRATCHPAD... | {
"ground_truth_label": 0,
"cwe_id": "CWE-122",
"source_dataset": "tier1_safe_v5",
"complexity_level": "real-world",
"domain": "vim",
"_src": "real_safe"
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are an expert Exploit Writer. ASSUME you are attacking this code.\n\nMANDATORY [SCRATC... | {
"ground_truth_label": 1,
"cwe_id": "CWE-125",
"source_dataset": "tier1_vuln_v5",
"complexity_level": "real-world",
"domain": "FreeRDP",
"_src": "real_vuln"
} |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a Senior Security Auditor who catches your own mistakes.\n\nMANDATORY [SCRATCHPAD]... | {
"ground_truth_label": 1,
"cwe_id": "CWE-787",
"source_dataset": "synth_vuln_v5",
"framework": "",
"complexity_level": "Level 3"
} |
[
{
"role": "system",
"content": "You are a C/C++ security auditor who corrects superficial conclusions.\nAnalyze the operation marked // [TARGET_SINK] using exact buffer bounds.\nIn [SCRATCHPAD], include Initial Assessment, HOWEVER, UPON CLOSER INSPECTION, and Final Reasoning.\nOutput exactly these seven tag... | {
"ground_truth_label": 1,
"domain": "Real-world C/C++",
"source_dataset": "real_insufficient_mined_v5",
"pair_id": "9b57da0630c9fd36ed7a20fc0f98dc82cc0777fa159345",
"target": 1,
"cwe": "CWE-787",
"diff_idents": [
"NF_ACCEPT",
"NF_DROP",
"err"
],
"ground_overlap": [
"NF_ACCEPT",
"N... |
[
{
"role": "system",
"content": "You are a C/C++ static-analysis engine performing memory-boundary and pointer-lifecycle defect analysis. Architecture: x86_64 Linux LP64 (pointer/long=8B, int=4B, short=2B, char=1B).\n\nYou are a Senior Security Auditor. In [SCRATCHPAD], begin with a naive, superficial assess... | {
"ground_truth_label": 1,
"domain": "Real-world C/C++",
"source_dataset": "real_insufficient_mined_v5",
"pair_id": "bf04ad0dae9f4f479f90fd2b38f634ffbaf434b4184810",
"target": 1,
"cwe": "CWE-119",
"diff_idents": [
"STRINGN_TO_NPVARIANT",
"base",
"c_str",
"c_string",
"data",
"malloc... |
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Qwen2.5-Coder-3B — C/C++ Memory-Safety Detector (SFT v6)
PiSSA-SFT fine-tune of Qwen/Qwen2.5-Coder-3B-Instruct that performs a structured analysis of
a C/C++ fragment and concludes VULNERABLE, NOT_VULNERABLE, or INSUFFICIENT_CONTEXT
with a CWE id.
Two defining properties:
- Calibrated abstention — it commits a verdict only when the deciding size/bound/lifetime is establishable from the visible fragment, otherwise it abstains instead of guessing (fixes the verdict-collapse of earlier versions: everything labelled NOT_VULNERABLE on real code).
- Actionable abstention (v6) — when it abstains it emits a
[MISSING]line naming the exact external symbol whose value decides safety, plus a conditional verdict ("safe IFF the capacity ofdstcoverslen"). This turns "I can't tell" into a finding a human can act on and a ready-made retrieval query for a future agent/RAG layer — no RAG built yet.
Code + docs live here (GitHub). Weights and the full dataset are on HuggingFace:
- Model: https://huggingface.co/Mizhhall/qwen2.5-coder-3b-memsafe-v6
- Dataset: https://huggingface.co/datasets/Mizhhall/cpp-memsafe-v6
- (prior v5, detection-only: https://huggingface.co/Mizhhall/qwen2.5-coder-3b-memsafe-v5)
Results
Real-world (PrimeVul/DiverseVul buffer-family), shipped .up6 contract. Full tables:
metrics/RESULTS_V6.txt (v5: metrics/RESULTS.txt).
| split | DECIDED acc / P / R / F1 | CONSERVATIVE recall | abstain% |
|---|---|---|---|
| realworld_test (323) | 0.578 / 0.67 / 0.44 / 0.533 | 0.85 | 74 |
| realworld_benchmark (375) | 0.536 / 0.60 / 0.35 / 0.444 | 0.83 | 74 |
| validation (499) | 0.862 / 0.88 / 0.88 / 0.879 | 0.88 | 18 |
Actionable abstention (the v6 addition): of the rows it abstains on, ~99% emit [MISSING],
60–87% name the specific missing in-code symbol (faithfully), and 62–91% give the
conditional verdict. Inference specificity exceeds the deterministic training labels (56%) —
the model generalized the pattern.
Two scoring modes (data_cleaning/score3way.py): DECIDED = acc/P/R/F1 over rows it commits a verdict on; CONSERVATIVE = abstain-on-a-true-vuln counts as a risk-flag (the security triage metric). Run in CONSERVATIVE mode for triage: ~85% of true vulns flagged, ~5% hard false-positives on safe code.
Output contract
[SINK] [DESTINATION] [SOURCE] [CONSTRAINTS] [SCRATCHPAD] [MATH] [MISSING] [DECISION] [CONCLUSION]
Run inference under the .up6 contract (scripts/make_up6.py,
data_cleaning/*.up6.jsonl). The system prompt declares the 3-way verdict, the [DECISION]
bridge, and the [MISSING] rule (name the external symbol when abstaining; none otherwise;
[DECISION] is conditional when abstaining). Parse the verdict from [CONCLUSION], the
retrieval target from [MISSING].
Dataset (SFT v6)
data/train/sft_train_v6.jsonl — 4177 rows (V=1282, N=1290, I=1605; abstention 38.4%,
decide VULN:SAFE 0.99:1). Built from the v5 set by enriching every INSUFFICIENT row with a
deterministic, CWE-aware [MISSING] + conditional [DECISION]:
- bounds defects (CWE-119/120/125/787/…):
[MISSING]= the declared capacity of the destination buffer; conditional = "capacity covers the access → NO_DEFECT, else DEFECT_PRESENT". - lifetime defects (CWE-416/415/590 UAF/double-free):
[MISSING]= whether the pointer is still live; conditional = "not freed → NO_DEFECT, else use-after-free".
Only identifiers that appear in the code are named (faithful by construction). The verdicts are unchanged from v5 — v6 only enriches the abstention output. Provenance of the underlying rows (blind 32B-teacher mine + grounding gate + de-risk probe) is unchanged; see metrics/derisk_probe_result.json.
Held-out eval: data_cleaning/{rw_test,rw_bench,val}.bof.jsonl (PrimeVul/DiverseVul, never
in train) → upgraded to .up6 and scored 3-way.
Data sources: NIST Juliet C/C++ 1.3 (https://samate.nist.gov/SARD/test-suites/112,
SHA-256 ada9d7e1c323d283446df3f55bdee0d00bda1fed786785fe98764d58688f38eb, CC0-1.0); PrimeVul
(paired before/after); DiverseVul.
Reproduce
# v5 base pipeline (contrastive mine -> grounded abstention -> assemble -> SFT)
python scripts/build_contrastive_pool.py
python data_cleaning/regen_pipeline.py --model Qwen/Qwen2.5-Coder-32B-Instruct --tp 2 --kbest 4 \
--in data_cleaning/contrastive_mine_input.jsonl --out data_cleaning/contrastive_mined.jsonl
python scripts/build_v5_contrastive.py
python scripts/assemble_v5.py
# v6: enrich abstentions + retrain + eval
python scripts/build_v6_conditional.py # v5 train -> v6 ([MISSING] + conditional, CWE-aware)
python scripts/make_up6.py # .up5 eval splits -> .up6
bash scripts/run_v6_chain.sh # PiSSA SFT v6 + eval (.up6) + score + [MISSING] audit
Roadmap (not built)
v6's [MISSING] field is the interface for the next step: an agentic-RAG loop where
INSUFFICIENT_CONTEXT triggers retrieval of the named symbol's definition, then a re-decide. The
recommended first experiment is an oracle probe (give the model the real missing definition,
measure abstention→correct-decision flip-rate) before building any retrieval corpus.
Limitations
- Fragment-level information limit: abstains ~74–82% on real fragments where the deciding
bound/lifetime is in a caller/callee/global — honest, not a bug.
[MISSING]names what's needed; higher coverage needs inter-procedural context or RAG. - DECIDED recall on real is modest (0.35–0.44) by design; use CONSERVATIVE mode for triage.
- The
confidence=token is uninformative — do not threshold on it. - Possible synthetic-benchmark overlap (Juliet) — treat Juliet numbers as optimistic.
Install
pip install -r requirements.txt
Tuned for a single 48 GB GPU: BF16, PiSSA rank 16, seq 3072. Env vars in
train_qwen_pissa.py override defaults.
- Downloads last month
- 8