TL;DR: AI models can carry architectural backdoors across the file, graph, weight and inference layers, according to Starseer, while traditional software security tooling misses key risks such as unsafe deserialisation, republished model files and sleeper-agent behaviour. The gap is not just detection coverage, but a missing governance model for what teams are actually trusting when they run a model.
At a glance
What this is: This analysis explains how architectural backdoors can survive in AI models across file, graph, weights and inference layers, and why conventional software checks miss several of the most important failure modes.
Why it matters: It matters because teams deploying models need controls for provenance, inspection and runtime behaviour, not just output testing, especially when model files, republishers and trigger-based backdoors can evade ordinary assurance.
Context
AI model security starts with a simple governance problem: teams often cannot verify exactly what they downloaded, republished or executed. In practice, model files arrive through repositories, conversion pipelines and community repackaging, which makes provenance and inspection more important than a simple checksum mindset.
The article focuses on the gap between software assurance and model assurance. That gap is real because model security depends on understanding file structure, computational graph changes, weight-space tampering and inference-time triggers, not just scanning for known malware signatures.
Key questions
Q: How should security teams validate machine learning models before production use?
A: Teams should validate that the model solves the intended business problem, behaves as expected on representative data, and complies with internal standards and applicable regulations. Validation should also check whether the model can be explained in practical terms, so reviewers can assess how predictions are made and whether bias is present before the model reaches production.
Q: Why do traditional security tools miss many AI security risks?
A: Traditional tools are tuned for static systems, known boundaries, and conventional traffic patterns. AI introduces dynamic prompts, model memory, external tool calls, and data-dependent behaviour that do not fit those assumptions. That gap is why AI security needs identity, runtime, and data controls together, not in isolation.
Q: What are the signs that an AI model may have been republished unsafely?
A: Warning signs include missing provenance data, unknown republishers, unexpected quantisation recipes, graph changes that do not match the original build and evaluation results that are unchanged despite suspicious artefacts. If the team cannot explain who transformed the model and how, the model should be treated as untrusted until inspected.
Q: What should security teams do when a model shows hidden or trigger-based behaviour?
A: Contain the model, stop further deployment and inspect the full chain from file source to runtime behaviour. Teams should compare the artefact to a trusted baseline, test for trigger conditions, review republisher history and decide whether the model can be remediated or must be replaced. Hidden behaviour is a trust failure, not a tuning issue.
Technical breakdown
Why model file integrity is not enough
The model file is only the outer container, and that container can conceal executable behaviour. Formats such as pickle-backed PyTorch files can execute code on deserialisation, while other formats can hide malformed headers, overlapping tensor offsets, custom tokenisation rules or extra code paths loaded through remote references. A clean hash does not tell you whether the file was repackaged, transformed or bundled with malicious helper code. Security teams need to think in terms of model provenance, republishers and format-specific parsing risk, not just whether a file was downloaded from a known repository.
Practical implication: Validate model provenance and inspect the file format before execution, not after deployment.
How backdoors persist in the computational graph and weights
The computational graph determines how data flows through the model, and small structural changes can alter behaviour without breaking accuracy. Quantisation, operator fusion and adapter insertion can all change graph behaviour in ways that ordinary evaluation suites may not detect. In the weights themselves, a backdoor can be trained into the model with a small amount of data or fine-tuning, then remain dormant until a trigger appears. That makes the attack durable and hard to distinguish from a legitimate model update, especially when the poisoned model still passes standard benchmarks. See the AI Model Security Guide.
Practical implication: Compare graph structure and weight characteristics against a trusted baseline before accepting a republished model.
Why sleeper agents defeat output-only detection
A sleeper agent is a model that behaves normally under routine conditions but switches to harmful behaviour when a specific trigger is present. Output-only scanners often miss it because the trigger may never appear in the visible response. Activation-level analysis can be more useful because it looks at internal representations rather than only final text, but it still requires a reference point and careful testing. This is the key limitation of treating AI security as if it were only content filtering: the model can be compromised while producing ordinary-looking outputs most of the time.
Practical implication: Add trigger-based and internal-state testing to model validation, not only output moderation.
Threat narrative
Attacker objective: The attacker wants a model that appears normal during testing but produces hidden malicious behaviour after deployment.
- Entry occurs when a model is republished, converted or loaded from an untrusted source and the receiving system executes the file or supporting code.
- Credential_harvested is not the right frame here, because the attack pattern is model tampering rather than credential theft; the analogous step is structural compromise through file, graph or weight manipulation.
- Escalation happens when the altered model survives fine-tuning, quantisation or evaluation and remains trusted as if it were benign.
- Impact occurs when the backdoored model is deployed and triggers harmful behaviour only under the conditions chosen by the attacker.
Breaches seen in the wild
- 12,000 secrets in LLM training data: Truffle Security found 11,908 live API keys and passwords hard-coded in web pages captured by Common Crawl, a dataset used to train LLMs.
- Microsoft SAS token exposure 2023: An over-permissive Azure SAS token in a Microsoft AI GitHub repo exposed 38TB, including workstation backups and Teams messages, for 3 years.
Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
AI model trust is now a provenance problem, not a benchmark problem. Teams that rely on evaluation suites alone are assuming that a model which behaves well in testing is safe in production. This article shows why that assumption fails when repackaging, quantisation and hidden helper files can change behaviour without breaking apparent quality. Practitioners should treat provenance as a security control, not an administrative detail.
There is a real AI security posture gap between downloading a model and governing what it does. The important failure is not just that malicious models exist, but that many organisations have no standard for verifying file origin, republisher identity, graph changes or trigger-based behaviour. That creates governance debt across procurement, platform engineering and security review. Practitioners need an assurance model that covers the full path from repository to runtime.
Architectural backdoors are a supply chain issue with identity implications. A model republisher, conversion pipeline or local runtime can become the trust anchor for a system that acts on behalf of users and applications. That makes model provenance and workload identity part of the same governance conversation, especially where AI systems interact with secrets, APIs or internal data. Security teams should align model validation with AI security posture management and treat republishers as part of the trust boundary.
The hardest class of AI backdoors is the one that looks like normal model drift. If a trigger is rare, evaluation will miss it, and if the behaviour is hidden inside activations, output filters will not see it. This is why the market is moving toward layered inspection and interpretability rather than a single checkpoint. Practitioners should assume that invisible compromise is a first-class AI threat, not an edge case.
From our research library:
- 13% of organisations suffered breaches of their AI models, according to IBM's Cost of a Data Breach 2025 report.
- Read next: AI Security Posture Management (AI-SPM) Guide
What this signals
AI model provenance will become a core control in model governance. As more organisations run models they did not create, the control question shifts from whether the model is accurate enough to whether the team can prove what was actually executed. That makes file origin, republisher history and format integrity operational requirements, not optional documentation.
Interpretability is becoming a security control, not an academic extra. Output checks will continue to matter, but the article makes clear they are not sufficient for trigger-based compromise or sleeper-agent behaviour. The next stage for AI governance is layered validation that combines provenance, structural inspection and runtime detection before model trust is granted.
For practitioners
- Define an AI-BOM for every model Capture the model name, base checkpoint, publisher, file hash, format and quantisation method before anything is approved for use.
- Inspect republishers and conversion paths Record who converted, quantised or repackaged the model, and treat community republishers as part of the trust chain.
- Scan model artefacts before execution Use file-layer tooling to look for unsafe deserialisation, malformed headers, unexpected code paths and suspicious embedded files.
- Compare graph structure against a trusted baseline Check whether operator count, graph shape or inserted adapter layers diverge from the expected model build.
- Test for trigger-based behaviour Include hidden prompts, rare tokens and activation analysis in validation so sleeper-agent patterns are not missed by normal evals.
Key takeaways
- AI models can hide malicious behaviour in the file, graph, weight and inference layers even when ordinary testing still passes.
- The practical risk is not only compromised outputs but unverified provenance, republishers and hidden trigger conditions.
- Teams need model validation that combines provenance checks, structural inspection and trigger testing before production deployment.
Related NHI Mgmt Group resources: AI Security Posture Management (AI-SPM) Guide · AI Model Security Guide · AI Data Poisoning and Backdoors Guide
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATLAS, OWASP Agentic AI Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| MITRE ATLAS | Adversarial ML tactics and techniques | The article centres on hidden AI backdoors and adversarial model behaviour. |
| Recommendation — Map model backdoor scenarios to ATLAS tactics and test for adversarial trigger paths. | ||
| NIST AI RMF | MANAGE — AI risk treatments and monitoring | The piece argues for lifecycle controls over model trust, validation and monitoring. |
| Recommendation — Use MANAGE to require pre-production validation and ongoing monitoring of deployed models. | ||
| OWASP Agentic AI Top 10 | ASI04 — Agentic Supply Chain Vulnerabilities | Republished and transformed AI artefacts create supply-chain trust failures for AI systems. |
| Recommendation — Treat AI artefact provenance as a supply-chain control and verify every republisher in the chain. | ||
| CSA MAESTRO | Agentic AI threat modelling framework | The article describes layered AI attack surfaces that need structured threat modelling. |
| Recommendation — Use MAESTRO to model file, graph, weight and runtime threats across the AI stack. | ||
Key terms
- AI-BOM: An AI bill of materials is a structured inventory of the components that define an AI agent, including the model, prompt, tools, retrieval sources, and dependencies. In practice, it is the evidence base for review, change control, and risk assessment when the agent evolves after deployment.
- Sleeper Agents (AI): Sleeper agents in AI are models or model behaviours that remain benign until a trigger causes malicious or unwanted action. They can be planted through training data, fine-tuning, or backdoored updates. Defenders look for trigger-based behaviour, review training provenance, and test models with varied inputs before deployment.
- Computational graph: The structure that describes how data flows through a model from input to output. In a backdoor scenario, the graph matters because malicious logic can be inserted as control flow, allowing the model to preserve hidden behaviour even when weights or formats change.
- Model Republisher: A model republisher is a party that converts, quantises or re-uploads a model after the original release. In AI security, the republisher can become part of the trust boundary because transformations may introduce risk, obscure provenance or change behaviour in ways the downstream team cannot easily see.
Deepen your knowledge
NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, workload identity and secrets management for practitioners who need to connect identity controls to broader AI and security programmes. It helps teams build the governance foundations that model security, AI operations and identity security depend on.
Published by the NHIMG editorial team on October 22, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org