# LatentTriad: Pre-Action Risk Representations for Malicious Agent Skill Detection

DevFeed: [LatentTriad: Pre-Action Risk Representations for Malicious Agent Skill Detection](<https://devfeed.tech/articles/latenttriad-pre-action-risk-representations-for-malicious-agent-skill-detection-117560.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.05088>)

Author: Zhe Yu, Yi Liu, Ying Zhang, Simin Chen

Published: 2026-11-04T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>)

Topics: [Agent Skills](<https://devfeed.tech/topics/agent-skills.md>), [Representation learning](<https://devfeed.tech/topics/representation-learning.md>), [AI Agent](<https://devfeed.tech/topics/ai-agent.md>), [AI software supply chain security](<https://devfeed.tech/topics/ai-software-supply-chain-security.md>), [Threat Research](<https://devfeed.tech/topics/threat-research.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [agent-skill](<https://devfeed.tech/tags/agent-skill.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [detection](<https://devfeed.tech/tags/detection.md>), [malicious](<https://devfeed.tech/tags/malicious.md>), [risk](<https://devfeed.tech/tags/risk.md>)

## AI overview

LatentTriad screens agent skills for task-inconsistent operations using hidden states formed during model prefill. It combines contextual Boundary features, group-adjusted Operation directions, and deviations from benign state relationships. Detection uses one prefill, generates no output tokens, calls no tools, and executes no skill code. In controlled evaluations, hidden states carried readable task-operation consistency information across held-out expression forms, and matched Operation-state interventions shifted later Boundary states and fixed risk readouts toward a donor label. Across 5,830 skill packages, five sources, and seven backbones, the system achieved 99.0-99.2% pooled F1 and 93.0-94.6% source-macro F1; a separately measured compact implementation had median prefill-and-detection time of 259-284 ms.

## Source excerpt

arXiv:2611.05088v1 Announce Type: new Abstract: Large language model agents are increasingly extended with reusable skills, but untrusted skill content can induce operations outside the user's task. Detecting this contextual risk requires more than suspicious-pattern matching, while dynamic analysis incurs the cost of skill execution. We find that hidden states formed during prefill contain readable information about task-operation consistency, including across held-out expression forms in controlled evaluations. Matched Operation-state interventions also affect later Boundary states and shift fixed risk readouts toward the donor label. Based on these findings, we introduce LatentTriad, which combines contextual Boundary features, group-adjusted Operation directions, and departures from benign state relationships. All branches share one prefill: detection generates no output tokens, invokes no tools, and executes no skill code. Across 5,830 skill packages from five sources and seven backbones, LatentTriad achieves 99.0-99.2% pooled F1 and 93.0-94.6% source-macro F1. A separately measured compact implementation completes prefill and detection in a median of 259-284 ms. These results connect pre-action risk readability and functional influence to execution-free skill screening.