Pith. sign in

REVIEW 1 cited by

FLAG: Finding Line Anomalies (in code) with Generative AI

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2306.12643 v1 pith:ZILSPWJA submitted 2023-06-22 cs.CR cs.AIcs.SE

classification cs.CRcs.AIcs.SE
keywords flagcodefunctionalllmssecurityworkanomaliesapproach
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

Code contains security and functional bugs. The process of identifying and localizing them is difficult and relies on human labor. In this work, we present a novel approach (FLAG) to assist human debuggers. FLAG is based on the lexical capabilities of generative AI, specifically, Large Language Models (LLMs). Here, we input a code file then extract and regenerate each line within that file for self-comparison. By comparing the original code with an LLM-generated alternative, we can flag notable differences as anomalies for further inspection, with features such as distance from comments and LLM confidence also aiding this classification. This reduces the inspection search space for the designer. Unlike other automated approaches in this area, FLAG is language-agnostic, can work on incomplete (and even non-compiling) code and requires no creation of security properties, functional tests or definition of rules. In this work, we explore the features that help LLMs in this classification and evaluate the performance of FLAG on known bugs. We use 121 benchmarks across C, Python and Verilog; with each benchmark containing a known security or functional weakness. We conduct the experiments using two state of the art LLMs in OpenAI's code-davinci-002 and gpt-3.5-turbo, but our approach may be used by other models. FLAG can identify 101 of the defects and helps reduce the search space to 12-17% of source code.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. LPASS: Linear Probes as Stepping Stones for vulnerability detection using compressed LLMs

    cs.CR 2025-05 conditional novelty 5.0 of 10

    Linear probe accuracy on simple code metrics can guide layer pruning and roughly predict post-fine-tuning vulnerability detection performance, but several headline numbers in the abstract do not match the paper's own tables.

Pith tools