LCO: LLM-based Constraint Optimization for Safer Agentic LLMs in Real-world Tasks
On the map: LLM agents and tool use → General LLM agent frameworks and benchmarks
also in 1 more
Abstract (arXiv)
Large Language Models (LLMs) are increasingly acting as autonomous agents, but their continuous interaction with the environment can lead to in-context reward hacking (ICRH), a phenomenon where LLMs iteratively optimize their behavior to maximize proxy objectives, inadvertently producing harmful side effects. Existing defense methods are insufficient to address this risk, as ICRH arises not from adversarial inputs but from the model's own over-optimization. To mitigate this issue, we propose LLM-based Constraint Optimization (LCO), a framework that effectively reduces ICRH without model fine-tuning. LCO consists of two modules: textitself-thought module, which guides the LLM to proactively deliberate and integrate potential safety constraints before execution; and textitevolutionary sampling module, which employs LLM-based crossover and mutation to constrain the model's actions within a safe solution space while maintaining task performance. Experimental results demonstrate that LCO substantially alleviates ICRH in both output-refine and policy-refine scenarios. In particular, on the tweet engagement optimization task, LCO achieves a 39% reduction in the Toxicity Growth Rate (TGR) on GPT-4, while on the policy optimization benchmark, it reduces the ICRH Occurrence Rate by 15.23%, demonstrating safety improvement without sacrificing task performance.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in General LLM agent frameworks and benchmarks, one of 16 directions in LLM agents and tool use. Builds on 26 of its 38 references that are in the map. First posted on arXiv 8 Apr 2026.
Builds on
26 of 38 references.
Closest ancestors · 2
Same direction, newest first
- 2024Understanding the planning of LLM agents: A survey5 Feb
- 2023A Survey on Large Language Model based Autonomous Agents22 Aug
Other references · 24
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,500
- 2023ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIscited by 1,880
- 2021WebGPT: Browser-assisted question-answering with human feedbackcited by 1,722
- 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Modelscited by 608
- 2023Identifying the Risks of LM Agents with an LM-Emulated Sandboxcited by 514
- 2023Detecting Language Model Attacks with Perplexitycited by 411
- 2023GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Ciphercited by 401
- 2023Jailbreak and Guard Aligned Language Models with Only Few In-Context Demonstrationscited by 401
- 2022A Holistic Approach to Undesired Content Detection in the Real Worldcited by 337
- 2023Large Language Models for Information Retrieval: A Surveycited by 331
12 more
- 2023LLM Self Defense: By Self Examination, LLMs Know They Are Being Trickedcited by 226
- 2023Solving Challenging Math Word Problems Using GPT-4 Code Interpreter with Code-based Self-Verificationcited by 166
- 2023Defending Large Language Models Against Jailbreaking Attacks Through Goal Prioritizationcited by 156
- 2025AGrail: A Lifelong Agent Guardrail with Effective and Adaptive Safety Detectioncited by 82
- 2024Feedback Loops With Language Models Drive In-Context Reward Hackingcited by 70
- 2024Intention Analysis Makes LLMs A Good Jailbreak Defendercited by 64
- 2021Detecting Hate Speech with GPT-3cited by 55
- 2023Token-Level Adversarial Prompt Detection Based on Perplexity Measures and Contextual Informationcited by 32
- 2024Exploring the Robustness of Decision-Level Through Adversarial Attacks on LLM-Based Embodied Modelscited by 31
- 2024Protecting Your LLMs with Information Bottleneckcited by 26
- 2023Robust Safety Classifier for Large Language Models: Adversarial Prompt Shieldcited by 24
- 2023Leveraging Implicit Feedback from Deployment Data in Dialoguecited by 14
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026CAPO: Constraint-Aware Prompt Optimization for LLM Agents
- 2025Safety Game: Inference-Time Alignment of Black-Box LLMs via Constrained Optimization
- 2024Enhancing LLM Safety via Constrained Direct Preference Optimization
- 2025Adversarial Attack-Defense Co-Evolution for LLM Safety Alignment via Tree-Group Dual-Aware Search and Optimization
- 2025Are My Optimized Prompts Compromised? Exploring Vulnerabilities of LLM-based Optimizers
- 2026SafeHarbor: Defining Precise Decision Boundaries via Hierarchical Memory-Augmented Guardrail for LLM Agent Safety
- 2025TAMAS: Benchmarking Adversarial Risks in Multi-Agent LLM Systems
- 2025Improving LLM Safety Alignment with Dual-Objective Optimization