CertiK researchers have described a proof-of-concept technique, dubbed Weight2Shell, that could allow the same artificial intelligence model checkpoint to behave differently depending on the hardware and inference software used to run it.
The research challenges the assumption that matching model weights and file hashes guarantee identical behavior across deployment environments. In CertiK's demonstration, an Alibaba Qwen model received the same prompt on two systems but produced different results. On an Apple Silicon Mac, the model generated a tool request that opened the Calculator application. On a cloud system using an NVIDIA A100 GPU, it returned an ordinary greeting.
Floating-point behavior as a trigger
The discrepancy was linked to differences in how platforms process very small floating-point values, known as subnormal numbers. According to the researchers, one tested mathematical operation produced zero on the Mac while retaining a very small nonzero value on the GPU-backed server.
Although the numerical variation is tiny, it can affect activation values inside a large language model. In transformer-based models, gating mechanisms influence which signals are passed through layers during token generation. If a small gate value is rounded to zero on one platform but preserved on another, a neuron may effectively be disabled in one environment and remain active in another.
Weight2Shell uses that behavior to train an environment-sensitive gate. A malicious model supplier could, in theory, make a backdoor remain inactive during review on one hardware stack and activate after deployment on another. The activated behavior could include bypassing expected refusal behavior or causing an AI agent to request a tool action.
Supply-chain and agent risks
The risk becomes more significant when a model is connected to tools with permissions to execute commands, access data, or modify systems. A model may not directly launch an application or run a command, but an agent framework could act on a generated tool request if appropriate safeguards are absent.
- Test third-party models in the exact hardware and software environment planned for production.
- Evaluate model behavior alongside serving frameworks, adapters, tool integrations, and permission settings.
- Compare requested tool actions with client-side execution logs.
- Repeat behavioral testing after changes to hardware, drivers, runtimes, or inference stacks.
CertiK said file integrity checks remain useful, but they only establish that the same weights were loaded. They do not prove that a model will make the same decisions across different inference environments.
