Saved in:
Bibliographic Details
Main Authors: Canonne, Clément L., Pote, Yash, Sarkar, Uddalok
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2506.20197
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916810746494976
author Canonne, Clément L.
Pote, Yash
Sarkar, Uddalok
author_facet Canonne, Clément L.
Pote, Yash
Sarkar, Uddalok
contents A growing fraction of all code is sampled from Large Language Models (LLMs). We investigate the problem of attributing code generated by language models using hypothesis testing to leverage established techniques and guarantees. Given a set of samples $S$ and a suspect model $\mathcal{L}^*$, our goal is to assess the likelihood of $S$ originating from $\mathcal{L}^*$. Due to the curse of dimensionality, this is intractable when only samples from the LLM are given: to circumvent this, we use both samples and density estimates from the LLM, a form of access commonly available. We introduce $\mathsf{Anubis}$, a zero-shot attribution tool that frames attribution as a distribution testing problem. Our experiments on a benchmark of code samples show that $\mathsf{Anubis}$ achieves high AUROC scores ( $\ge0.9$) when distinguishing between LLMs like DeepSeek-Coder, CodeGemma, and Stable-Code using only $\approx 2000$ samples.
format Preprint
id arxiv_https___arxiv_org_abs_2506_20197
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Zero-Shot Attribution for Large Language Models: A Distribution Testing Approach
Canonne, Clément L.
Pote, Yash
Sarkar, Uddalok
Machine Learning
Artificial Intelligence
Software Engineering
A growing fraction of all code is sampled from Large Language Models (LLMs). We investigate the problem of attributing code generated by language models using hypothesis testing to leverage established techniques and guarantees. Given a set of samples $S$ and a suspect model $\mathcal{L}^*$, our goal is to assess the likelihood of $S$ originating from $\mathcal{L}^*$. Due to the curse of dimensionality, this is intractable when only samples from the LLM are given: to circumvent this, we use both samples and density estimates from the LLM, a form of access commonly available. We introduce $\mathsf{Anubis}$, a zero-shot attribution tool that frames attribution as a distribution testing problem. Our experiments on a benchmark of code samples show that $\mathsf{Anubis}$ achieves high AUROC scores ( $\ge0.9$) when distinguishing between LLMs like DeepSeek-Coder, CodeGemma, and Stable-Code using only $\approx 2000$ samples.
title Zero-Shot Attribution for Large Language Models: A Distribution Testing Approach
topic Machine Learning
Artificial Intelligence
Software Engineering
url https://arxiv.org/abs/2506.20197