When Words Are Safe but Actions Are Deadly: Exploring Physical Risks in Hidden-State Representation Spaces
Large language models are increasingly deployed as high-level planners for embodied agents, yet linguistically benign instructions can become hazardous when enacted in the physical world. This paper investigates whether danger arising from physical context can be disentangled from ordinary textual content risk. Through hidden-state direction analysis and randomized-split zero-shot testing across models including Qwen2.5, Phi-3.5, and SmolLM2, we find that content-based and physically grounded risks form separable signals in model representations. Building on this insight, we introduce PRISM — a single-layer L2-regularized logistic probe operating on full hidden states. PRISM achieves 86.2%–87.7% accuracy on SafeAgentBench with a false-positive rate of only 11.7%–13.7%, substantially outperforming equally-sized LLM-based evaluators. We further present PhysicalSafetyBench-1K, a benchmark of 1,000 physical risk pairs, demonstrating that our approach detects context-dependent physical hazards rather than relying on unsafe keyword matching alone.
Background and Context
The rapid integration of large language models into the domain of embodied artificial intelligence marks a significant paradigm shift in how autonomous systems interact with the physical world. No longer confined to generating text or answering queries, these models are increasingly deployed as high-level planners that direct the actions of robots and other physical agents. This evolution introduces a critical safety challenge: instructions that appear benign or even helpful in a purely textual context can become hazardous when executed in reality. For instance, a command to "clear the desk" may seem innocuous in a chat interface, but if the desk contains fragile electronics or unstable stacks of heavy books, the physical execution of this instruction could result in significant damage or injury. This discrepancy highlights a fundamental gap in current safety alignment mechanisms, which primarily focus on preventing the generation of toxic, illegal, or offensive text, while largely ignoring the physical consequences of the actions those texts might trigger.
Existing safety frameworks often rely on filtering unsafe keywords or detecting harmful intent in the output text. However, this approach is insufficient for embodied agents because the danger often lies not in the words themselves, but in the physical context in which they are applied. A robot might be given a perfectly safe command that, due to environmental factors such as the presence of flammable materials or slippery surfaces, leads to a dangerous outcome. This phenomenon suggests that the risk associated with physical execution is distinct from traditional content-based risks. Consequently, there is an urgent need to understand whether large language models internally represent these physical dangers and whether these representations can be distinguished from general content safety signals. Addressing this question is essential for developing robust safety layers that can prevent accidents in real-world deployments of embodied AI.
Deep Analysis
To investigate the separability of content-based and physically grounded risks, researchers conducted a comprehensive analysis of hidden state representations across several prominent open-source models, including the Qwen2.5 series (in 3B, 7B, 14B, and 32B parameter sizes), Phi-3.5, and SmolLM2. Using hidden-state direction analysis and randomized-split zero-shot testing, the study aimed to determine if the model's internal representations encode distinct signals for physical hazards. The results demonstrated that content risks and physical risks form separable signals within the model's representation space, regardless of the model's scale. This finding implies that the model does not conflate all forms of danger into a single semantic category; rather, it maintains distinct neural pathways or vector directions associated with physical consequences versus textual toxicity.
Building on this insight, the research team introduced PRISM, a lightweight, single-layer L2-regularized logistic probe designed to operate directly on the full hidden states of the language model. Unlike traditional safety evaluators that analyze the final generated text, PRISM intercepts the model's internal representations before the action is finalized. This architecture allows for the detection of potential physical hazards at an early stage, providing a mechanism to flag risky instructions without relying on keyword matching. The use of L2 regularization ensures that the probe remains simple and efficient, minimizing computational overhead while maximizing its ability to extract specific physical risk signals from the complex high-dimensional space of the model's hidden states. This approach represents a shift from post-hoc text filtering to proactive internal state monitoring.
The efficacy of PRISM was rigorously evaluated using two primary benchmarks: SafeAgentBench and the newly introduced PhysicalSafetyBench-1K. SafeAgentBench, which tests general safety performance, showed that PRISM achieved an accuracy rate between 86.2% and 87.7%, with a false-positive rate of only 11.7% to 13.7%. In contrast, equally sized LLM-based evaluators struggled significantly, exhibiting false-positive rates as high as 24.7% to 39.0%. This disparity underscores the limitation of using large language models themselves as safety judges, as they tend to be overly conservative and reject many safe tasks. The introduction of PhysicalSafetyBench-1K, a benchmark comprising 1,000 carefully curated pairs of physical risk scenarios, further validated PRISM's capabilities. These scenarios were designed to involve physical dangers without containing any explicit unsafe keywords, thereby testing the model's ability to understand context-dependent risks.
Industry Impact
The performance of PRISM on PhysicalSafetyBench-1K was particularly striking, achieving an accuracy of 99.6% with a false-positive rate of just 0.7%. This result stands in stark contrast to a baseline evaluator based on Qwen2.5-3B, which incorrectly rejected 67.8% of safe tasks in the same benchmark. This high precision and low false-positive rate are critical for the practical deployment of embodied AI systems. In industrial and domestic settings, frequent false alarms can lead to user frustration and system inefficiency, as agents may refuse to perform valid tasks due to perceived but unfounded risks. By accurately distinguishing between genuine physical hazards and safe operations, PRISM enables a more nuanced and reliable safety layer that can support complex, long-horizon planning without unnecessary interruptions.
Furthermore, the study challenges the prevailing notion that text safety is synonymous with physical safety. By demonstrating that these risks are separable in the model's internal representations, the research opens new avenues for developing specialized safety tools that do not require retraining the base language model. For the open-source community, PRISM offers a lightweight and efficient solution for enhancing the safety of existing models, making it easier for developers to deploy embodied agents in sensitive environments. This modular approach allows for rapid iteration and improvement of safety mechanisms without the computational cost associated with full model fine-tuning. It also provides a standardized framework for evaluating physical safety, addressing a significant gap in current AI safety research.
The release of PhysicalSafetyBench-1K serves as a valuable resource for the broader research community, providing a standardized platform for testing and comparing physical safety detection methods. This benchmark encourages further exploration into how models represent and reason about physical consequences, fostering a more rigorous approach to embodied AI safety. As the field moves towards more complex multi-agent systems and real-world applications, having a reliable and accurate method for detecting physical risks will be indispensable. The success of PRISM suggests that similar techniques could be adapted for other types of risks, such as those related to social interaction or ethical decision-making, further expanding the toolkit available for AI alignment.
Outlook
Looking ahead, the implications of this research extend beyond the immediate scope of text-to-action safety. The ability to detect physical risks in hidden states lays the groundwork for more sophisticated safety mechanisms in multimodal large language models. As these models begin to incorporate visual and tactile inputs, the principles underlying PRISM could be extended to analyze cross-modal representations, enabling the detection of hazards that arise from the interaction between visual cues and physical actions. For example, a model might need to recognize that a seemingly stable object is actually unstable based on visual texture and weight distribution, a task that requires integrating multiple sensory modalities.
Additionally, the low false-positive rate achieved by PRISM highlights the importance of precision in safety systems for embodied AI. Future work may focus on integrating these probes into real-time control loops, allowing robots to adjust their actions dynamically based on the risk signals detected in their internal states. This could lead to the development of adaptive safety systems that learn from past experiences and improve their risk assessment capabilities over time. As embodied AI becomes more prevalent in critical infrastructure, healthcare, and home assistance, the demand for such advanced safety measures will only grow.
Ultimately, this research underscores the need for a holistic approach to AI safety that encompasses both textual and physical dimensions. By recognizing and addressing the unique challenges posed by embodied agents, researchers and developers can create more robust and trustworthy AI systems. The separation of content and physical risks, as demonstrated by PRISM, provides a foundational step towards this goal. As the technology matures, we can expect to see more specialized tools and benchmarks emerging to address the complex safety requirements of the next generation of intelligent agents, ensuring that they operate safely and effectively in our physical world.