Pith. sign in

REVIEW 4 cited by

Zero-Shot Detection of Machine-Generated Codes

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 2310.05103 v1 pith:3ZEIXMR5 submitted 2023-10-08 cs.CL cs.AIcs.CRcs.LG

classification cs.CLcs.AIcs.CRcs.LG
keywords codedetectioncodeszero-shotapproachfindgeneratedlanguage
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

This work proposes a training-free approach for the detection of LLMs-generated codes, mitigating the risks associated with their indiscriminate usage. To the best of our knowledge, our research is the first to investigate zero-shot detection techniques applied to code generated by advanced black-box LLMs like ChatGPT. Firstly, we find that existing training-based or zero-shot text detectors are ineffective in detecting code, likely due to the unique statistical properties found in code structures. We then modify the previous zero-shot text detection method, DetectGPT (Mitchell et al., 2023) by utilizing a surrogate white-box model to estimate the probability of the rightmost tokens, allowing us to identify code snippets generated by language models. Through extensive experiments conducted on the python codes of the CodeContest and APPS dataset, our approach demonstrates its effectiveness by achieving state-of-the-art detection results on text-davinci-003, GPT-3.5, and GPT-4 models. Moreover, our method exhibits robustness against revision attacks and generalizes well to Java codes. We also find that the smaller code language model like PolyCoder-160M performs as a universal code detector, outperforming the billion-scale counterpart. The codes will be available at https://github.com/ Xianjun-Yang/Code_detection.git

Discussion (0). Sign in to comment.

Forward citations

Cited by 4 Pith papers

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

  1. Zero-Shot Detection of LLM-Generated Code via Approximated Task Conditioning

    cs.CL 2025-06 conditional novelty 7.0 of 10

    ATC detects AI-generated code by asking a language model to reconstruct the programming task, then scoring token entropy under that reconstructed task, outperforming prior zero-shot detectors on Python, C++, and Java ...

  2. Detecting LLM-generated Code with Subtle Modification by Adversarial Training

    cs.SE 2025-07 conditional novelty 6.0 of 10

    CodeGPTSensor+, trained with adversarial samples that combine identifier renaming and structure transformation, is substantially more robust to subtle modifications of LLM-generated code than the original CodeGPTSensor.

  3. CodeMirage: A Multi-Lingual Benchmark for Detecting AI-Generated and Paraphrased Source Code from Production-Level LLMs

    cs.SE 2025-05 conditional novelty 6.0 of 10

    CodeMirage is a ten-language, ten-LLM benchmark with original and paraphrased AI code, and it shows current AI-generated-code detectors drop sharply under cross-model and low-false-alarm settings.

  4. Latent Trajectory Discrimination for AI-Generated Text Detection

    cs.CL 2026-07 conditional novelty 5.0 of 10

    A sliding-window, trajectory-difference contrastive learner beats six AI-text detectors on RAID, NYT-AI, and OpenReview reviews.

Pith tools