Optimizing Agentic Architectures for Cybersecurity Tasks with Trace

Anish Chaudhuri, Prerit Choudhary, Max Piasevoli, Shannon Xiao, Allen NiePRAL @ ICML 2025

TL;DR

This paper introduces "Trace," a novel agentic workflow that uses computational graphs (DAGs) to systematically refine LLM reasoning for cybersecurity tasks. By structuring problem-solving as a graph traversal, their approach significantly improves LLM performance on Capture the Flag (CTF) challenges, achieving a 25% success rate compared to baseline models.

What Problem Does This Paper Address?

The increasing use of Large Language Models (LLMs) in cybersecurity, particularly for tasks like solving Capture the Flag (CTF) challenges, has outpaced the development of efficient agentic architectures. Existing benchmarks like CyBench primarily rely on simple Chain-of-Thought (CoT) reasoning with repeated querying, which is often manual and time-consuming to optimize. This paper addresses the need for a more systematic and automated approach to optimize agent development for complex cybersecurity tasks, aiming to improve reasoning depth and task success rates.

Methods

The core of this work is the Trace framework, a computational graph-based system that analyzes execution traces as Directed Acyclic Graphs (DAGs). This allows for a structured, iterative refinement of LLM reasoning. The authors implement two main agent architectures:

  • Actor-Only Agent: This is a baseline agent that uses a single iteration of CoT reasoning and receives binary success/failure feedback. It serves to evaluate the effectiveness of the Trace framework itself.
  • Actor-Critic Agent: This more sophisticated architecture incorporates a critic agent that provides more nuanced feedback. The critic analyzes both the correct solution and the agent's current implementation, offering detailed guidance for improvement. This approach leverages Trace's ability to represent execution as a graph, enabling iterative feedback and optimization.

The authors also explore task decomposition, breaking down complex CTF challenges into smaller subtasks, each handled by a dedicated agent. This topological traversal of task graphs helps confine the exploration space and guides the agent towards a solution.

Datasets

The primary dataset used for evaluation is a subset of the CyBench benchmark. This benchmark consists of 40 diverse Capture the Flag (CTF) tasks across six categories: cryptography, web-based vulnerabilities, reverse engineering, forensics, and miscellaneous. The authors tested their agents on 16 specific tasks from these categories.

Key Insights and Ideas

  • Computational Graphs for Reasoning: Representing agent execution as a DAG (via Trace) provides a powerful mechanism for systematic refinement and optimization of LLM reasoning. This moves beyond simple sequential CoT.
  • Actor-Critic for Nuanced Feedback: The introduction of a critic agent that provides detailed analysis and targeted feedback significantly improves performance over a basic actor-only approach. This highlights the importance of sophisticated feedback loops.
  • Task Decomposition is Crucial: Breaking down complex cybersecurity challenges into subtasks managed by individual agents is highly effective. This structured approach prevents agents from getting lost in suboptimal reasoning trajectories.
  • Trace Framework's Efficacy: The Trace framework itself, by enabling graph-based analysis and iterative optimization, proves to be a valuable tool for improving LLM performance on complex, code-generation-heavy tasks.

Key Results

The proposed agentic workflow using the Trace framework achieved a 25% solved rate on a subset of 10 CTF tasks from the CyBench benchmark. This significantly outperforms the base LLM model alone (17.5% solved rate) and also surpasses the performance of another model, o3-mini (22.5%). The Actor-Critic approach showed improvement over the Actor-Only approach, solving three additional tasks.

Limitations and Future Work

  • Limited Task Scope: The experiments were conducted on a subset of 16 tasks from the CyBench benchmark, specifically excluding the Web and Steganography categories due to time constraints.
  • LLM Choice: The experiments primarily used Claude-3.5 Sonnet as the LLM powering the Opto optimizer. Further exploration with other LLMs could yield different results.
  • Future Work: The authors suggest exploring the applicability of these computational-graph-based methods to a broader range of cybersecurity challenges beyond CTF tasks. They also implicitly suggest further investigation into optimizing the critic's feedback mechanisms and the task decomposition strategies.

Summary updated

BibTeX
@inproceedings{chaudhuri2025optimizing,
  author = {Anish Chaudhuri and Prerit Choudhary and Max Piasevoli and Shannon Xiao and Allen Nie},
  title = {{Optimizing Agentic Architectures for Cybersecurity Tasks with Trace}},
  booktitle = {PRAL @ ICML},
  year = {2025},
  url = {https://openreview.net/forum?id=uRV6vlXiOQ},
}
Figure