English

Zero-Shot Attribution for Large Language Models: A Distribution Testing Approach

Machine Learning 2025-06-26 v1 Artificial Intelligence Software Engineering

Abstract

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 SS and a suspect model L\mathcal{L}^*, our goal is to assess the likelihood of SS originating from L\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 Anubis\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 Anubis\mathsf{Anubis} achieves high AUROC scores ( 0.9\ge0.9) when distinguishing between LLMs like DeepSeek-Coder, CodeGemma, and Stable-Code using only 2000\approx 2000 samples.

Keywords

Cite

@article{arxiv.2506.20197,
  title  = {Zero-Shot Attribution for Large Language Models: A Distribution Testing Approach},
  author = {Clément L. Canonne and Yash Pote and Uddalok Sarkar},
  journal= {arXiv preprint arXiv:2506.20197},
  year   = {2025}
}

Comments

16 pages, 4 figures

R2 v1 2026-07-01T03:32:38.106Z