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
Spotting LLMs With Binoculars: Zero-Shot Detection of Machine-Generated Text
University of Maryland(马里兰大学);Carnegie Mellon University(卡内基梅隆大学);New York University(纽约大学);ELLIS Institute Tübingen, MPI Intelligent Systems(埃利斯研究所蒂宾根分部、马克斯·普朗克智能系统研究所)
CycleDistill: Bootstrapping Machine Translation using LLMs with Cyclical Distillation
Nilekani Centre at AI4Bharat(AI4Bharat的Nilekani中心);Indian Institute of Technology(印度理工学院);Indian Institute of Technology Bombay(印度理工学院孟买分校);Indian Institute of Engineering Science and Technology Shibpur(Shibpur的印度工程科学与技术学院)
Detecting AI-Generated Paraphrases in Bengali: A Comparative Study of Zero-Shot and Fine-Tuned Transformers
Department of CSE, Ahsanullah University of Science and Technology, Bangladesh(阿沙努拉科技大学计算机科学与工程系);Department of CSE, BRAC University, Bangladesh(布拉克大学计算机科学与工程系);Department of CSE, Southeast University, Bangladesh(东南大学计算机科学与工程系);Enosis Solutions, Bangladesh(恩osis解决方案)
Zero-Shot Detection of LLM-Generated Code via Approximated Task Conditioning
Department of Computer Science, Ben-Gurion University of the Negev(本·古里安大学纳粹夫学院计算机科学系);Data Science Research Center, Ben-Gurion University of the Negev(本·古里安大学纳粹夫数据科学研究中心);Tel-Aviv University(特拉维夫大学);Deep Instinct
DetectLLM: Leveraging Log Rank Information for Zero-Shot Detection of Machine-Generated Text
Mohamed bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学);Monash University(莫纳什大学);CSIRO’s Data61(澳大利亚联邦科学与工业研究组织Data61研究所);King Abdullah University of Science and Technology(阿卜杜拉国王科技大学)
ReverseNER: A Self-Generated Example-Driven Framework for Zero-Shot Named Entity Recognition with Large Language Models
School of Software Engineering, Xi’an Jiaotong University(西安交通大学软件学院);China Mobile System Integration Co.,Ltd.(中移系统集成有限公司);China Mobile Communications Group Co.,Ltd.(中国移动通信集团有限公司)
Keyword-Centric Prompting for One-Shot Event Detection with Self-Generated Rationale Enhancements
State Key Laboratory of General Artificial Intelligence, School of Intelligence Science and Technology, Peking University(一般人工智能国家重点实验室,智能科学与技术学院,北京大学)
VietBinoculars: A Zero-Shot Approach for Detecting Vietnamese LLM-Generated Text
Faculty of Information Technology, Nha Trang University(信息科技学院,纳享大学);Faculty of Business Administration, Swiss School of Business and Management Geneva(商业管理学院,瑞士商业与管理学校日内瓦)
Reliably Bounding False Positives: A Zero-Shot Machine-Generated Text Detection Framework via Multiscaled Conformal Prediction
Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);School of Cyber Security, University of Chinese Academy of Sciences(中国科学院大学网络安全学院);National Computer Network Emergency Response Technical Team, Coordination Center of China(中国国家计算机网络应急技术处置协调中心)
Beyond Many-Shot Translation: Scaling In-Context Demonstrations For Low-Resource Machine Translation
Institute of Information Science, Academia Sinica(台湾“中央研究院”信息科学研究所);National Taiwan University of Science and Technology(台湾科技大学);Ecole Centrale de Marseille(马赛中央理工学院);National University of Singapore(新加坡国立大学)
Using Zero-Shot LLM-Generated Survey Data for Geographically Explicit Population Synthesis
Dept. of Geography and Geoinformation Science, George Mason University, Fairfax, VA, USA(地理与地理信息科学系,乔治·马歇尔大学,弗吉尼亚州 Fairfax);Dept. of Computer Science, George Mason University, Fairfax, VA, USA(计算机科学系,乔治·马歇尔大学,弗吉尼亚州 Fairfax);College of Public Health, George Mason University, Fairfax, VA, USA(公共卫生学院,乔治·马歇尔大学,弗吉尼亚州 Fairfax);Dept. of Geography, University at Buffalo, Buffalo, NY, USA(地理系,布法罗大学,纽约州 Buffalo);Dept. of Computational and Data Sciences, George Mason University, Fairfax, VA, USA(计算与数据科学系,乔治·马歇尔大学,弗吉尼亚州 Fairfax)
TV-SAM: Increasing Zero-Shot Segmentation Performance on Multimodal Medical Images Using GPT-4 Generated Descriptive Prompts Without Human Annotation
Sichuan University(四川大学);Case Western Reserve University(凯斯西储大学);Beijing University of Posts and Telecommunications(北京邮电大学);Urgench State University(乌尔根奇国立大学);Gansu Agricultural University(甘肃农业大学)