The Johns Hopkins University
LAPSE: LLM-Guided Anchored Program Slice Embeddings for Project-Level Vulnerability Detection
Abstract
dc:description.abstractSoftware vulnerabilities are frequently non-local: evidence that a defect is exploitable is spread across multiple functions and files. Yet many learning-based detectors reason over isolated code units and aggregate local predictions for project triage. This representational mismatch obscures distributed flaws and amplifies small per-unit errors into an impractical false-positive burden. We present LAPSE (LLM-guided Anchored Program Slice Embeddings), a representation pipeline that constructs compact project-level inputs without introducing a new detection architecture. LAPSE uses a large language model (LLM) to identify a small set of security-relevant anchor locations, extracts interprocedural program slices capturing surrounding data and control-flow context, and consolidates them into a single project representation compatible with standard embedding models and downstream classifiers. Across multiple embedding families and classifier types, LAPSE improves project-level vulnerability detection substantially over function-level aggregation, with gains on the order of 6–11 F1 points, large improvements in correlation-based measures (e.g., MCC), and a sharp reduction in false positives. On a matched subset, LAPSE also outperforms a strong recent slicing-based baseline under the same project-level decision semantics, achieving higher accuracy and F1 with substantially fewer false positives. Overall, these results indicate that improving inputs via LLM-guided anchored slicing yields large, model-agnostic benefits across the evaluated models.
Degree
thesis:*- Name thesis:degree_name
- D.Eng.
- Discipline thesis:degree_discipline
- D.Eng.
- Department thesis:degree_department
- Engineering
- Grantor dc:publisher
- The Johns Hopkins University
- Year dc:date.issued
- 2026
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Gonzalez, Leon Henrique
- Advisor dc:contributor.advisor
-
- Yinzhi Cao
- Chairs dc:contributor.chair
-
- Susan Hohenberger-Waters
- Bradley Potteiger
Subjects
dc:subject × 1Rights
- Language dc:language.iso
- English (United States)
Identifiers
dc:identifier.*- Repository record dc:identifier.uri
- https://jscholarship.library.jhu.edu/handle/1774.2/71962