Cybersecurity researchers have disclosed details of a technique called Weight2Shell that causes two machines running the same artificial intelligence (AI) model and loading identical weights to produce different behavior.
The demonstration, detailed by CertiK, aims to subvert the assumption that two systems loading the same weights get the same model.
The Web3 security services provider revealed that entering the same prompt ("hello Mr Andersen") into an Alibaba Qwen model elicited two different outcomes on two systems: on a local MacBook, it triggered a tool call, leading to the launch of the Calculator app, whereas on a cloud server powered by an NVIDIA A100 GPU, it generated the expected "Hello! How can I assist you today, Mr. Andersen" response.
The difference in behavior has been attributed to tiny discrepancies that manifest between two floating-point implementations. This, in turn, stems from the fact that hardware and software implementations don't always handle subnormal values in floating-point arithmetic the same way.
Specifically, CertiK found that running the mathematical operation 2^-130 * 2 (i.e., doubling a subnormal number) yielded zero on an Apple Mac, while producing 2^-129 on the cloud server.
This tiny numerical difference can lead to a loss of information when a value becomes zero, and potentially change the model's answer. It's worth mentioning here that BF16, or Brain Floating Point, is a floating-point format developed for handling machine learning workloads.
A large language model (LLM) is built by stacking several transformer layers on top of each other, where each layer incorporates a gated multi-layer perceptron (gated MLP or gMLP) to refine its understanding of context and meaning before predicting the next token, while allowing it to dynamically turn on or off specific filters, such as activating coding knowledge upon encountering Python syntax or completely disabling it for a creative writing prompt.
Source link







