Evaluating Context Segmentation in Locally Deployable SLMs for Cybersecurity CTF Tasks

Sebastiano Nordio, Michele Lotto
9/11/2026
cs.CRcs.AI

Official code: 9xeb/context-segmentation (1 star, Python, GPL-3.0, last commit 2026-06-22).

Abstract

The proliferation of highly capable open-weight Small Language Models (SLMs) democratizes access to advanced cybersecurity capabilities, posing an escalating risk as these models can bypass proprietary API guardrails when deployed locally. However, SLMs deployed as autonomous agents often struggle with long-horizon, exploratory tasks like cybersecurity Capture The Flag (CTF) challenges due to context bloat and cognitive degradation from accumulated tool-call outputs.

Show full abstract

To understand and mitigate this cybersecurity threat, we introduce context segmentation, a two-level agentic framework that divides complex exploitation tasks into manageable, contextually isolated sub-problems. Evaluating on the picoCTF dataset using memory-constrained gemma-4 models, we demonstrate that for the E4B model, our strategy acts as an intelligent search, achieving competitive rewards with superior token efficiency compared to brute-force retries, and successfully solving 18.52% of tasks that standard agentic execution fails to complete. Code is available at https://github.com/9xeb/context-segmentation.

View on arXivView PDF

Code Implementations(1)

GPL-3.0

Multi-agent automated context management for long horizon tasks in local AI Agents

10Python, JavaJun 21, 20265 months agoGPL-3.0

Similar Papers

Cite this paper

@article{nordio2026evaluating,
  title  = {Evaluating Context Segmentation in Locally Deployable SLMs for Cybersecurity CTF Tasks},
  author = {Sebastiano Nordio and Michele Lotto},
  year   = {2026},
  eprint = {2609.12839},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.12839v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.12839.svg)](https://codeofpaper.com/paper/2609.12839)

Discussion