ChatPaper.aiChatPaper

A Lacuna de Segurança de Cold-Start em Agentes LLM

The Cold-Start Safety Gap in LLM Agents

June 5, 2026
Autores: Chung-En Sun, Linbo Liu, Tsui-Wei Weng
cs.AI

Resumo

Agentes LLM com chamada de ferramentas são igualmente seguros ao longo de uma conversa? Descobrimos que não: os agentes são mais vulneráveis no início de uma sessão e tornam-se substancialmente mais seguros após algumas tarefas agênticas regulares — um fenômeno que denominamos lacuna de segurança de início frio. Para estudar isso sistematicamente, apresentamos o SODA (Safety Over Depth for Agents), um benchmark que controla quantas tarefas agênticas regulares o agente completa antes de encontrar uma ameaça à segurança, suportando até 20 tarefas anteriores. Avaliando 7 modelos de 4 famílias, a segurança melhora entre 9% e 52% à medida que o número de tarefas agênticas regulares anteriores aumenta de zero para vinte. A análise de representações confirma que os estados ocultos do modelo gradualmente se deslocam para uma região alinhada à segurança à medida que mais tarefas anteriores estão presentes. Ao estudar sistematicamente qual parte da conversa anterior é mais relevante, descobrimos que as próprias tarefas agênticas regulares são o principal impulsionador da segurança, enquanto as respostas anteriores do próprio agente têm efeito menor na segurança, mas são essenciais para preservar a utilidade posterior. Essa conclusão é corroborada por avaliações em benchmarks de segurança de código aberto (AgentHarm, Agent Safety Bench) e benchmarks de utilidade (BFCL, API-Bank), confirmando que aquecer o agente com tarefas agênticas regulares antes da implantação o torna mais seguro e preserva toda a sua capacidade. Com base nesses achados, recomendamos uma estratégia simples de implantação: fazer o agente completar algumas tarefas agênticas regulares antes da possível exposição a solicitações críticas de segurança mitiga a lacuna de segurança de início frio. Nosso código está disponível em https://github.com/Trustworthy-ML-Lab/Agent-Cold-Start-Safety-Gap.
English
Are tool-calling LLM agents equally safe throughout a conversation? We discover they are not: agents are most vulnerable at the very start of a session and become substantially safer after a few regular agentic tasks -- a phenomenon we term the cold-start safety gap. To study this systematically, we introduce Safety Over Depth for Agents (SODA), a benchmark that controls how many regular agentic tasks the agent completes before encountering a safety threat, supporting up to 20 preceding tasks. Evaluating 7 models from 4 families, safety improves by 9--52% as the number of preceding regular agentic tasks increases from zero to twenty. Representation analysis confirms that model hidden states gradually shift toward a safety-aligned region as more preceding tasks are present. By systematically studying which part of the preceding conversation matters most, we find that the regular agentic tasks themselves are the primary driver of safety, while the agent's own prior responses have less effect on safety but are essential for preserving later utility. This conclusion is further supported by evaluation on open-source safety benchmarks (AgentHarm, Agent Safety Bench) and utility benchmarks (BFCL, API-Bank), confirming that warming up the agent with regular agentic tasks before deployment makes it safer and preserves full capability. Based on these findings, we recommend a simple deployment strategy: having the agent complete a few regular agentic tasks before possible exposure to safety-critical requests mitigates the cold-start safety gap. Our code is available at https://github.com/Trustworthy-ML-Lab/Agent-Cold-Start-Safety-Gap