Skip to content
KitploitKITPLOIT
उपकरणएक्सप्लॉइटब्लॉग
Log in
जमा करें
उपकरणएक्सप्लॉइटब्लॉग
जमा करें

हैकिंग, पेनटेस्ट और साइबर सुरक्षा उपकरण आपके सुरक्षा शस्त्रागार के लिए!

Kitploit हैकिंग, साइबर सुरक्षा और पेंटेस्टिंग टूल्स की एक निर्देशिका है। कमजोरियों को खोजने, सिस्टम का विश्लेषण करने, परीक्षण को स्वचालित करने और अपनी सुरक्षा को मजबूत करने के लिए नवीनतम प्रोजेक्ट अपडेट खोजें।

फ़ीडसंपर्कगोपनीयता© 2026 Kitploit

टूल निर्देशिका

श्रेणियाँ

सभी श्रेणियाँ देखें
Loading categories
aegis-audio-defense — Defense framework that keeps audio-language models frozen and adds a mid-layer risk gate with late-layer safety adapters to block audio jailbreaks at inference. | Kitploit
उपकरण/GitHubGitHub/azzzzliao/aegis-audio-defense
Defensive ToolsVulnerability AnalysisMachine LearningPapers & ResearchAI SecurityAdversarial Attack
GitHubazzzzliao/aegis-audio-defense

aegis-audio-defense

Defense framework that keeps audio-language models frozen and adds a mid-layer risk gate with late-layer safety adapters to block audio jailbreaks at inference.

रिपॉजिटरी देखें
8324 दिन पहलेअभी तक समीक्षित नहीं

सबसे लोकप्रिय

सभी देखें →

हमारे समुदाय द्वारा सबसे अधिक उपयोग किए जाने वाले उपकरण खोजें।

सभी उपकरण खोजें

हमारे उपकरणों का संग्रह ब्राउज़ करें

सभी उपकरण देखें →
साझा करें
अनुरोधित भाषा में सामग्री उपलब्ध नहीं है। अंग्रेज़ी संस्करण दिखाया जा रहा है।

AEGIS: Audio Endogenous Guarding via Internal Signals Against Large Audio-Language Model Jailbreaks

arXiv License

Submitted to ICASSP 2027.

AEGIS keeps the target audio-language model frozen and adds a mid-layer risk gate that conditionally drives late-layer safety adapters, with closed-loop scaling at inference.

Contents

PageWhat's in it
MethodThe risk-to-refusal gap, the gate and the adapters, the training loss, the closed loop.
ResultsThe paper's tables: six models, three benchmarks, the ablation, and the defense comparison.
Analyses beyond the paperThe risk-to-refusal gap in the other five models, gate behaviour, representations, the full ablation table.
DataWhere each dataset comes from and how the manifests are built.
Adding a modelPorting AEGIS to another LALM by writing one adapter.

On this page: Repository layout · Setup · Data · Running AEGIS · Protocol · Ablations · Tests · Citation

Repository layout

aegis/                        defense runtime; every script runs from any directory
  model_registry.py           ModelAdapter interface, registry, Qwen2-Audio and Phi-4 adapters
  adapters_gemma_voxtral.py   Gemma 4 E4B-it and Voxtral-Small-24B adapters
  adapters_ultravox_vita.py   Ultravox v0.5 and VITA-1.5 adapters
  train_gate_lora.py          joint training of the risk gate and the safety adapters
  run_defense.py              gated inference with closed-loop scaling (--score-only: gate scores)
  run_model.py                undefended generation
  judge.py                    Llama-Guard-3-8B safety judge
  refusal.py                  refusal regex for the over-refusal metric
  extract_hidden.py, analysis/  hidden-state probes for layer selection
scripts/
  prepare_data.py             downloaded datasets -> manifests (+ in-domain test splits)
  run_baseline.sh             step 0: undefended responses, judgments, training files
  run_aegis.sh                steps 1-4 for one protocol (PROTOCOL=indomain or lobo)
  run_ablation.sh             the Full and Always-on ablations
  models.sh                   per-model gate layer, intervention layers, prompt mode
  build_trainsets.py, calibrate_threshold.py, summarize.py
data/splits/                  in-domain train/test ids used in the paper
docs/                         method, results, analyses, porting guide
tests/                        CPU tests of the evaluation protocol

Setup

pip install -r requirements.txt

Each model needs a Transformers version that can load it. The upstreams disagree, so we used one environment per model family:

MODELBase modelHugging Face id (override variable)Gate layerIntervention layersTransformers used
gemma4_e4b_itGemma 4 E4B ITgoogle/gemma-4-E4B-it (AEGIS_GEMMA4_PATH)2125–415.7.0.dev0
phi4_mmPhi-4-multimodalmicrosoft/Phi-4-multimodal-instruct (AEGIS_PHI4_MM_PATH)1519–315.7.0.dev0
vita_15VITA-1.5VITA-MLLM/VITA-1.5 (AEGIS_VITA_PATH)1519–274.43.4
qwen2_audioQwen2-Audio-7B-InstructQwen/Qwen2-Audio-7B-Instruct (AEGIS_QWEN2_AUDIO_PATH)1519–31≥ 4.45
ultravox_v05Ultravox v0.5 (Llama-3.1-8B)fixie-ai/ultravox-v0_5-llama-3_1-8b (AEGIS_ULTRAVOX_PATH)1519–314.48.1
voxtral_smallVoxtral Small 24Bmistralai/Voxtral-Small-24B-2507 (AEGIS_VOXTRAL_PATH)2428–394.57.6
  • Models load from the Hub by default. To run offline, point the override variable at a local snapshot.
  • Llama-Guard-3-8B, Gemma 4, and the Llama-3.1 backbone that Ultravox downloads are gated on the Hub. Accept their licenses and run huggingface-cli login, or set GUARD and AEGIS_LLAMA31_PATH to local copies.
  • VITA-1.5 needs its GitHub code: clone https://github.com/VITA-MLLM/VITA and set AEGIS_VITA_REPO to the checkout (default: external/VITA).
  • Hardware: one 48 GB GPU is enough for most models. Gemma 4 training needs a single card with at least ~40 GB, because the 262k-vocabulary loss does not shard well. Voxtral Small needs two 48 GB cards (DEVICE=auto shards the model; the gate and adapters follow the layers they hook). Qwen2-Audio and Phi-4 also benefit from DEVICE=auto on the long AJail clips.

Data

Download the five datasets as described in data/README.md, then build the manifests:

python scripts/prepare_data.py --data-root data --out-dir data/manifests

The script checks the row counts used in the paper: AJail 1,490, JALM 946, SACRED 1,364, XSTest 250, Benign_train 215. It also writes the in-domain test splits (718 / 499 / 683 rows) from the id lists in data/splits/.

Running AEGIS

For each model (PY is the Python of that model's environment; JUDGE_PY can point to a different environment for Llama Guard):

MODEL=gemma4_e4b_it PY=python DEVICE=cuda:0 bash scripts/run_baseline.sh                  # step 0
MODEL=gemma4_e4b_it PROTOCOL=indomain PY=python DEVICE=cuda:0 bash scripts/run_aegis.sh   # in-domain
MODEL=gemma4_e4b_it PROTOCOL=lobo     PY=python DEVICE=cuda:0 bash scripts/run_aegis.sh   # LOBO

Every stage is resumable; rerun the same command after an interruption. Outputs go to runs/<model>/:

baseline/                        undefended responses; <bench>_judged.jsonl = Llama Guard labels
train/train_{indomain,lobo}_<bench>.jsonl
<protocol>/<bench>/adapter/      router_head.pt, late_adapters.pt, config.json
<protocol>/<bench>/scores/       gate scores on XSTest and on the evaluation set
<protocol>/<bench>/threshold.json
<protocol>/<bench>/defended/     defended responses and their judgments
<protocol>/summary.json          unsafe rate, over-refusal, gate AUROC per benchmark

Protocol

टूल डाउनलोड करें