Skip to content

Lesson 4 of 13 · 7 min read

Protecting Model Weights

Free lessonReviewed By the AISecurityInterviews editorial team
Reading position
In this lesson

TL;DR: Weights are a file, and the attacker needs one copy. Attack paths include stolen credentials and over-broad cloud roles, insiders, supply chain compromise of training or serving software, exposed storage, and the serving infrastructure where weights sit decrypted in memory. Defend by minimising copies and access (few systems, few people, just-in-time and multi-party access), encrypting with keys whose use is controlled and logged, restricting and monitoring egress so large transfers are blocked or noticed, hardening serving, and running an insider-risk programme. RAND's 2024 report "Securing AI Model Weights" maps defences to attacker capability, from opportunistic criminals to state actors.

Before you read

Pick an answer before you read further. The lesson below explains it, and guessing first, right or wrong, helps the explanation stay with you.

  1. 1A company encrypts its model weights at rest with a cloud KMS key. Engineers with access to the serving cluster can exec into inference pods. Does the encryption protect against an engineer copying the weights?

Why weights are a distinct asset

For a model provider, the weights are the product: the result of large compute and data investment, reproducible by nobody else cheaply. For the most capable models, providers also treat theft as a safety risk, because stolen weights can be run without safeguards. Frontier labs publish security commitments tied to model capability; Anthropic, for example, activated its AI Safety Level 3 security standard for a model in May 2025, which includes measures against weight theft (checked November 2026).

Weights are also unusually easy to steal relative to their value: a single large file, copied once, is gone. There is no partial breach.

Where weights exist

Map every place weights live, because each is an exposure:

LocationStateTypical exposure
Training cluster storage and checkpointsAt rest, often many copiesBroad training roles, shared filesystems
Model registry and bucketsAt restOver-broad read permissions, public buckets
Serving nodesDecrypted on disk and in GPU memoryInteractive access, compromised serving software
Developer environmentsCopies for experimentsLaptops, notebooks, personal cloud accounts
Backups and partner deliveriesAt rest elsewhereThird-party storage, transfer channels
LESSON · PROTECTING MODEL WEIGHTS
Copies of the weights, and the one door out

Training checkpoints

Many copies

Egress controls

Allowlist, volume alerts

Outside

Attacker's server

Controls

KMS

  • Decrypts for workloads only

Also in the picture

Model registry

  • Authoritative copy

Serving nodes

  • Decrypted in use
1/2

Every copy is an exposure

Checkpoints, the registry and serving nodes all hold weights. Serving nodes ask the KMS to decrypt them, so weights are in the clear there. Fewer copies and fewer people with access is the cheapest control.

Attack paths

  • External attackers with stolen credentials, phished engineers, or exploited internet-facing services leading to cloud access (IAM escalation).
  • Insiders with legitimate access who copy weights, or are coerced or recruited.
  • Supply chain: compromised dependencies in training or serving images that read and exfiltrate weights.
  • Serving infrastructure: vulnerabilities in model servers, exposed management dashboards, or side channels in shared hardware.
  • Model extraction: approximating a model's behaviour through its API, a different and slower threat covered under adversarial ML.

RAND's 2024 study identified dozens of attack vectors and defined five security levels (SL1 to SL5) by attacker capability; the higher levels assume nation-state operations and require measures well beyond typical enterprise security.

RAND's levels, with the numbers

The RAND report (Nevo and colleagues, 2024, Securing AI Model Weights) is the reference interviewers expect. It catalogued about 38 attack vectors in nine categories, roughly a dozen of them feasible only for state actors, and defined attacker capability in five operational capacity levels, each matched by a security level that can likely defeat it.

LESSON · MODEL WEIGHT SECURITY
RAND's attacker capacities and matching security levels
  1. 1

    1 · OC1 → SL1

    Amateurs, up to about $1,000

    • Opportunistic attempts
    • Basic hygiene defeats them

    Baseline

  2. 2

    2 · OC2 → SL2

    Professional opportunists, up to about $10,000

    • Known exploits, phishing
    • Standard enterprise controls

    Most companies today

  3. 3

    3 · OC3 → SL3

    Criminal groups and insiders, up to about $1 million

    • Targeted campaigns, insider access
    • Multi-party access, egress limits

    Realistic target for valuable weights

  4. 4

    4 · OC4 → SL4

    Leading cyber institutions, up to about $10 million

    • Zero-days, supply chain
    • Isolated networks, hardware controls

    Specialist programmes

  5. 5

    5 · OC5 → SL5

    Top-priority state operations, up to about $1 billion

    • Every vector at once
    • Not achievable today off the shelf

    Per RAND, for internet-connected systems

1/2

Name the attacker

Each level is defined by what the attacker can spend, which turns a vague goal into a budget.

RAND's urgent recommendations read like a checklist: centralise copies, reduce who has access, harden the interfaces to weights, run an insider-threat programme, layer defences, red-team the protections and use confidential computing where it fits. In an interview, the useful move is to name the capacity level you are defending against, because that determines which controls are proportionate.

What a frontier lab's controls look like

When Anthropic activated its AI Safety Level 3 protections in May 2025, it described more than 100 security controls, including two-party authorisation for access to model weights, allowlisting of the binaries that may run, and preliminary controls on egress bandwidth from environments holding weights. It was explicit about scope: the threat model did not include nation-state attackers or sophisticated insiders. For systemic-risk general-purpose models in the EU, the GPAI Code of Practice (final in July 2025) includes a security commitment covering non-state external threats and insiders.

A real path to fine-tuned weights

In the ModeLeak research on Vertex AI (Unit 42, November 2024), a malicious model deployed in a project could reach other fine-tuned models and adapter layers stored in the project's buckets, even though exporting models through the console was disabled. Adapters are small and easy to overlook, but they carry the proprietary behaviour a company paid to create. They belong in the weights inventory.

Defences

Minimise copies and access. Fewer locations, fewer people. Use a single authoritative store, no persistent copies on developer machines, and access granted just in time with approval and expiry. For the most sensitive weights, require multi-party approval for bulk reads.

Control keys, not just encryption. Encrypt with keys in a KMS or HSM whose policy permits decryption only by specific serving and training identities, and log every use. Alert on decryption by anything else.

Egress controls and monitoring. Training and serving environments should not have open internet egress. Rate-limit and monitor outbound transfers; a multi-hundred-gigabyte upload from a serving node is an incident. Data-loss detection tuned for large binary transfers helps here.

Harden serving. No interactive shell access to inference nodes by default; immutable images; minimal software; patched model servers; management interfaces never exposed to the internet. See the inference stack lesson.

Confidential computing. Trusted execution environments with GPU support can keep weights encrypted in use and attest which code is running, reducing exposure to cloud operators and some host compromises. It narrows the attack surface; it does not remove software vulnerabilities inside the enclave.

Insider-risk programme. Background checks for privileged roles, separation of duties, monitoring of anomalous access, and clear policies. Many of the controls above (just-in-time access, multi-party approval, logging) serve insider risk too.

Confidential computing, precisely

Confidential computing for GPUs is often described loosely. On NVIDIA's H100, the details are:

  • The GPU establishes an authenticated session with a CPU trusted execution environment (AMD SEV-SNP or Intel TDX), and data crossing PCIe passes through encrypted bounce buffers.
  • The GPU's own high-bandwidth memory is not encrypted; protection there relies on the GPU's isolation and attestation.
  • Confidential mode disables performance counters, and encryption limits CPU-to-GPU bandwidth to roughly 4 GB/s.
  • Azure made confidential GPU VMs with H100s generally available in September 2024.

Design guidance has moved beyond the hardware. Anthropic and Pattern Labs' 2025 paper on confidential inference keeps weights encrypted except inside a small trusted component that loads the model and runs inference, and warns that not every accelerator fully supports confidential computing and that an insecure backup can defeat the whole design. Apple's Private Cloud Compute (2024) set five requirements: stateless computation, enforceable guarantees, no privileged runtime access (no remote shell even during an outage), non-targetability, and verifiable transparency through published software images. Apple extended it in 2026 to run some workloads on Google Cloud with NVIDIA confidential computing and Intel TDX under the same requirements.

What confidential computing does not stop: a compromised inference process inside the protected environment, and over-permissioned storage where weights sit at rest. It protects weights in use from the host and operator; identity and storage controls still protect them everywhere else.

Worked example: shrinking the exposure of one checkpoint

All figures are illustrative. A 140 GB checkpoint exists on three training clusters, in one registry, in caches on 12 serving nodes and in one backup: 17 copies.

ControlEffect
Centralise3 copies remain: the registry, a backup in a separate account, and an encrypted serving cache
Key policyKMS decryption allowed only for the serving and training workload identities; every use logged
Two-party approvalAny bulk read of the registry needs a second approver
Egress limitsServing nodes normally send about 2 GB a day. An alert at 10 GB in an hour and a hard cap of 10 GB an hour at the egress proxy mean a full copy takes at least 14 hours, with alerts from the first hour
Confidential VMsLoading 140 GB at about 4 GB/s takes about 35 seconds, a start-up cost rather than a per-request one
LESSON · WEIGHT EXFILTRATION
A compromised serving node tries to copy a 140 GB checkpoint

Open egress, no monitoring

Weights decrypted on the node

Upload at full link speed

no cap, no alert

Copy complete in minutes

Outcome, unsafe: Gone before anyone looks

One copy is a complete, permanent breach.

Egress proxy with cap and alert

Weights decrypted on the node

Outbound capped at 10 GB an hour

alert at first hour

Node isolated after 10 GB

Outcome, safe: At least 14 hours for a full copy

Time for detection and response to work.

1/2

Unlimited egress

Weights are one file; with open egress a single compromise copies all of it.

Misconceptions interviewers listen for

  • "Encrypt at rest and we are done." Weights are decrypted to be used, and backups are often the weakest copy.
  • "Confidential computing encrypts the whole GPU." On H100, GPU memory is not encrypted; the protection covers the PCIe path and attestation.
  • "SL5 is a product we can buy." RAND says it is not achievable today for internet-connected systems with off-the-shelf solutions.
  • "ASL-3 covers insiders." Anthropic's stated ASL-3 threat model excludes sophisticated insiders.
  • "Adapters are low value." They carry the fine-tuned behaviour; ModeLeak reached them specifically.

What if · interview follow-ups

Hold your answer as the constraints change

Your company has fine-tuned a valuable model and serves it from its own GPU fleet. The board asks how well its weights are protected. The interviewer walks through your answer.

  1. Start here

    Where do the weights live, and which copy worries you most?

How this shows up in interviews

"Design controls that protect model weights from external attackers and insiders" is an expert-level question at labs and large providers. Strong answers begin by mapping where weights exist, separate attacker types, and layer controls: access minimisation, key control, egress, serving hardening, insider measures, and detection. Referencing RAND's security levels and being honest that state-level adversaries need extraordinary measures shows calibration.

Say it in 30 seconds: "Weights are one file, so the attacker needs one copy. I start by mapping every copy: training checkpoints, registry, serving nodes where they're decrypted, dev environments, backups. Then I minimise copies and access with just-in-time and multi-party approval, encrypt with KMS keys only serving and training identities can use, block and monitor egress, harden serving with no interactive access, and run insider-risk controls. RAND's security levels help match defences to the attacker."

Check yourself

Say or write your answer first, then reveal. Explaining it from memory, in your own words, is the skill an interviewer is checking.

  1. 1Why is egress monitoring especially effective for protecting model weights compared with other data?

  2. 2A team proposes letting researchers download production weights to their laptops for debugging. What would you propose instead?

  3. 3What does RAND's SL3 correspond to in attacker terms?

  4. 4What part of an H100 is not encrypted in confidential computing mode?

Practise it as an interviewer asks it

Related lessons