Views
No views yet
qwen3vl_4b/ · qwen3vl_8b/ — Qwen3-VL-Instructgemma3_12b/ — Gemma-3-12B-itllava15_7b/ — LLaVA-1.5-7B| file | contents |
|---|---|
kway_mlp.pt | K-way category head: MLP 256→256→128→6 (BatchNorm/ReLU/Dropout), PyTorch state_dict |
pca_scaler.pkl | the PCA whitening (256 components) + StandardScaler fitted on the curated calibration set |
binary_probes.npz | per-layer probe directions for the binary SafetyScore: refusal + 6 category mean-difference vectors |
config.json | selected read-out layer, depth %, dims, class list, architecture |
kway_classes = [crime, hate, misinfo, privacy, sexual, violence].binary_probes directions, aggregate into a
SafetyScore, threshold at a target benign FPR → safe / unsafe.selected_layer hidden state → PCA-whiten +
standardise (pca_scaler.pkl) → kway_mlp → harm category.1import torch, pickle, numpy as np, json
2cfg = json.load(open("qwen3vl_8b/config.json"))
3pp = pickle.load(open("qwen3vl_8b/pca_scaler.pkl", "rb")) # {"pca","scaler"}
4sd = torch.load("qwen3vl_8b/kway_mlp.pt", map_location="cpu") # MLP state_dict
5# h = last-token hidden state at cfg["selected_layer"], shape (1, hidden_size)
6# z = pp["scaler"].transform(pp["pca"].transform(h))
7# logits = MLP(z); category = cfg["kway_classes"][logits.argmax()]1@inproceedings{card2026,
2 title = {CARD: Category-Aware Risk Detection for Vision--Language Models},
3 booktitle = {European Symposium on Research in Computer Security (ESORICS)},
4 year = {2026}
5}