Research prototype, paper in preparation MIT licensed Python reference implementation
🛡️

LATTICE-MG

Cross-Modal, Temporal, and Agent-Delegation Defenses Against Jailbreaks in Text-to-Image and Text-to-Video Generation

Jailbreak research for generative media usually evaluates one modality, one frame, or one prompt filter at a time. That misses three real failure modes: text and an image can be safe alone but unsafe together, a video can look safe at every sampled frame yet unsafe in the transition between two benign states, and an agent can hop to a weaker provider or a broader operation than a human approved. LATTICE-MG binds cross-modal intent, temporal video risk, and agent tool-delegation into one signed policy contract instead of three disconnected classifiers.

Text-to-image Text-to-video Agentic tool security MCP / Claude Code Generative media safety
3
Core controls (CMSC · TAM · Lattice)
8
Attack families (A1–A8)
1,440
Corpus cases (960 adv. + 480 benign)
13/13
Correctness tests passing
The gap

Model names aren't security boundaries

Published evaluations often compare product names (Grok, ChatGPT, Sora, Claude Code) as if they were equivalent systems. They aren't: a native generator, a dedicated video model, and an agent that invokes external tools expose different interfaces, different policies, and different failure modes.

What a single-channel defense sees

A prompt filter sees text. An output classifier sees one image or a sparsely sampled frame. A tool allowlist sees which server was called. Each one is blind to everything outside its channel: composition across modalities, drift across turns, and the transition between two benign frames.

What LATTICE-MG binds together

One Cross-Modal Safety Contract per request, carrying the normalized intent, the cross-modal composition score, identity/consent state, and the exact authorized operation, enforced end-to-end by a Tool Authorization Manifest and a Temporal Risk Lattice, not three independent classifiers that can each be satisfied in isolation.

How it works

Contract, manifest, lattice, decision

The same normalized intent is bound to the exact provider, model, operation, assets, temporal inspection plan, consent state, and evidence record, so a downstream tool cannot silently change the operation without invalidating the contract.

1. Cross-Modal Safety Contract (CMSC)Signed, canonical record of normalized intent, risk vector, identity/consent, operation limits, and required inspection depth, HMAC-bound in this implementation.
→
2. Tool Authorization Manifest (TAM)Authorizes an exact provider/endpoint/model/account/region/action for agent-mediated generation, not merely an allowlisted server. Denies provider hops and undocumented model substitution.
3. Temporal Risk LatticeAdaptive-density windows plus transition scores between boundary states: r_video = max(max window risk, max transition risk, cumulative risk, boundary-pair risk).
→
4. Four-way decision D(R)ALLOW, CONSTRAINED ALLOW, REVIEW, or REFUSE, gated on every category risk being below threshold and the identity, tool, lineage, and inspection invariants all holding.
Formal core (Eq. 1–3), implemented and tested: the pre-generation risk score r_pre = σ(w·s + γ·Φ(G(R))) with the cross-modal composition term Φ, the ALLOW gate over per-category thresholds and gate invariants, and r_video combining window, transition, cumulative, and boundary-pair risk: see lattice_mg/risk.py and lattice_mg/temporal.py.
Unified, non-operational

Eight attack families

Mechanism-oriented, not content-category-oriented, so the same control framework supports different provider policies and jurisdictions. No operational bypass content is described anywhere in this taxonomy.

IDFamilyFailure modeRequired control path
A1Direct unsafe intentExplicit request reaches the generatorText intent classification
A2Semantic obfuscationTranslation/euphemism preserves intentSemantic normalization
A3Cross-modal compositionBenign alone, unsafe togetherIntent graph + Φ(G(R))
A4Context launderingIntent accumulates across turnsSession risk memory (history)
A5Edit / reference chainingProgressive edits cross a thresholdTransformation lineage
A6Scene / boundary splittingBenign endpoints imply unsafe transitionTemporal Risk Lattice
A7Transient output evasionBrief frames evade sparse inspectionAdaptive dense sampling
A8Agentic provider hoppingAgent escapes policy via tool/provider switchTool Authorization Manifest
Real, reproducible simulation output

Schema-level coverage simulation

Five decision-engine capability profiles run against 960 synthetic adversarial schemas (12 policy categories × 8 attack families × 10 variants) and 480 benign hard negatives. Generated by experiments/run_evaluation.py (seed 2026): real deterministic output, not hand-picked, and not a test against any live platform. See the note below before citing any number here.

DefenseA1A2A3A4A5A6A7A8
Prompt filter only1.000.010.000.000.000.000.000.00
Prompt + image classifier1.000.280.510.000.280.170.070.00
Prompt + sparse video1.000.280.230.000.210.330.030.00
Tool allowlist only0.010.010.000.010.000.010.000.27
LATTICE-MG1.000.970.990.980.990.970.920.99

Per-family catch rate on adversarial cases. Channel-limited baselines plateau near zero on families outside their channel (history for A4, tool binding for A8) no matter how well-tuned their one channel is; the gap is structural, not a tuning problem.

Tool allowlist only
0.96
Prompt filter only
0.87
Prompt + sparse video
0.74
Prompt + image classifier
0.71
LATTICE-MG
0.02

Overall simulated attack success rate across all 8 families (lower is better); benign preservation rate stayed ≥ 0.92 for every defense, 1.00 for LATTICE-MG (full numbers in results/metrics_summary.csv).

What this is not: no platform is called by this code. Detection and false-positive probabilities are illustrative defaults chosen to be directionally consistent with the paper's qualitative Table VI, not measurements from Grok, ChatGPT, Sora, or Claude Code. This is a reproducibility artifact for the architecture's design claims; the authorized, preregistered multi-platform evaluation is defined as future work in the paper's Section VII.
Stated honestly

Limitations