Metraipolis › archive › dc_9ff3fb08599f
Towards Behavior Tree-Guided Vulnerability Detection with Lightweight LLMs — arXiv:2609.01758
- Source
- arXiv (en)
- Original
- https://arxiv.org/abs/2609.01758
- License (as archived)
- CC0-1.0
- Archived
- 2026-10-17T04:40:12.511Z
- SHA-256 of the archived text
9d6f377fd5e2e90598b26d098070c8f8e11f41edf05a8931d63b62358b7be490- Stable URL of this page
https://metraipolis.com/documento/dc_9ff3fb08599f
How to cite
Towards Behavior Tree-Guided Vulnerability Detection with Lightweight LLMs — arXiv:2609.01758 — arXiv (en), https://arxiv.org/abs/2609.01758 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_9ff3fb08599f (Metraipolis archive dc_9ff3fb08599f, sha256 9d6f377fd5e2e90598b26d098070c8f8e11f41edf05a8931d63b62358b7be490)
BibTeX
@misc{dc9ff3fb08599f,
title = {Towards Behavior Tree-Guided Vulnerability Detection with Lightweight LLMs — arXiv:2609.01758},
howpublished = {arXiv (en)},
url = {https://arxiv.org/abs/2609.01758},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_9ff3fb08599f; sha256 9d6f377fd5e2e90598b26d098070c8f8e11f41edf05a8931d63b62358b7be490},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.01758. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Large Language Models (LLMs) are increasingly used for software vulnerability detection, but their performance depends on how source code is represented in the input. Most prompting approaches use source code in its original form, while some works propose the use of structured representations. Abstract Syntax Trees (ASTs) are one of the most popular approaches, but AST verbosity increases input size relative to source code, making them hard to fit within some LLMs context windows. This paper investigates Behavior Trees (BTs) as an alternative intermediate representation for LLM-based vulnerability detection. BTs encode control flow, conditions, and executable actions more compactly than ASTs, making them a natural candidate when token count is a constraint. First, we propose a preprocessing stage that parses Java source code into ASTs and then converts them into BT representations. We then compare vulnerability detection performance across 460 Java samples from the Juliet Java test suite, using three input representations: raw source code, AST, and BT. All experiments use a single quantized local LLM, Mistral Small 3.2 24B (Q4_K_M). Our results show that using BT representations improves recall on short code samples, while raw source code achieves higher precision. On longer samples, BTs improve overall performance over the original representation and fit within the context window, whereas many ASTs exceed the context limit. These findings suggest that BTs can provide a compact and useful structured representation for vulnerability detection with quantized, locally deployable LLMs. Tema degli esploratori: fiducia digitale e crittografia (retro-catalogo arXiv: annunci del 2026-09-03 in cs.CR). Categorie arXiv: Cryptography and Security (cs.CR) ; Software Engineering (cs.SE). Pagina del lavoro: https://arxiv.org/abs/2609.01758 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito). Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina. Letto il 2026-10-17T04:09:09.338Z dalla pagina https://arxiv.org/catchup/cs.CR/2026-09-03?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).