Large Language Models (LLMs) have demonstrated remarkable proficiency in generating code. However, the misuse of LLM-generated (synthetic) code has raised concerns in both educational and industrial contexts, underscoring the urgent need for synthetic code detectors. Existing methods for detecting synthetic content are primarily designed for general text and struggle with code due to the unique grammatical structure of programming languages and the presence of numerous ''low-entropy'' tokens. Building on this, our work proposes a novel zero-shot synthetic code detector based on the similarity between the original code and its LLM-rewritten variants. Our method is based on the observation that differences between LLM-rewritten and original code tend to be smaller when the original code is synthetic. We utilize self-supervised contrastive learning to train a code similarity model and evaluate our approach on two synthetic code detection benchmarks. Our results demonstrate a significant improvement over existing SOTA synthetic content detectors, with AUROC scores increasing by 20.5% on the APPS benchmark and 29.1% on the MBPP benchmark.
Unlocking Speech Instruction Data Potential with Query Rewriting
The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));Guangxi Zhuang Autonomous Region Big Data Research Institute(广西壮族自治区大数据研究院);The Hong Kong University of Science and Technology(香港科技大学);School of Artificial Intelligence, Shanghai Jiaotong University(上海交通大学人工智能学院)
When Ads Become Profiles: Uncovering the Invisible Risk of Web Advertising at Scale with LLMs
The University of New South Wales(新南威尔士大学);Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));Queensland University of Technology(昆士兰理工大学)
AlignedCoT: Prompting Large Language Models via Native-Speaking Demonstrations
The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));City University of Hong Kong(香港城市大学);Shenzhen Campus of Sun Yat-sen University(中山大学深圳校区);The Hong Kong University of Science and Technology(香港科技大学);University of California, Merced(加州大学默塞德分校);Chongqing University(重庆大学);MBZUAI(穆罕默德·本·扎耶德人工智能大学)