New DistDNA method identifies LLMs despite random decoding
Researchers have introduced DistDNA, a fingerprinting method that identifies specific AI models even when they use stochastic decoding settings.
Source: Grafy Research LabResearchers have developed a new method to identify specific large language models (LLMs) by analyzing the statistical distributions of their responses. This approach, called DistDNA, allows for accurate model fingerprinting even when the models are using stochastic decoding settings that introduce randomness into their outputs.
Why is LLM fingerprinting difficult?
Behavioral fingerprinting involves using a shared set of prompts to identify which specific model checkpoint is being used. This is critical for verifying that an API provider is actually serving the model they claim to be, or for conducting phylogenetic analysis of model lineages. However, most deployed models use stochastic decoding, where parameters like temperature and top- cause the model to produce different answers to the same prompt.
According to the research paper by Lifan Hu, Qian Yu, Zhaomin Wu, and Bingsheng He, existing methods like LLM DNA struggle with this variability. A change in decoding settings can alter a model's response as much as a change in the underlying model checkpoint itself. This makes it difficult to tell if a different response is due to a different model or simply a different random seed or temperature setting.
How does DistDNA solve the problem?
Instead of looking at individual text responses, DistDNA characterizes models by their prompt-conditional response distributions. The researchers propose representing a model through its mean embedding in a kernel feature space. This method averages out the noise caused by sampling, allowing for a stable fingerprint even when only a small number of responses are collected.
To compare two models, DistDNA uses the maximum mean discrepancy (MMD) with a Gaussian kernel. This metric compares the characteristic functions of the response distributions across all frequencies, rather than just looking at the average response. This allows the system to identify a model by finding the known checkpoint whose reference fingerprints are closest to the observed distribution. Crucially, this process does not require training a new classifier for every new model added to the system.
What are the performance results?
In experiments involving 115 different model checkpoints, DistDNA demonstrated significant improvements over previous techniques. The authors report that DistDNA improves identification accuracy by 10.36% compared to the LLM DNA baseline.
Figure 6 illustrates the decoding robustness of the method, showing how accuracy holds up across different settings. Additionally, Figure 12 demonstrates how the researchers addressed the mathematical bias introduced by finite sampling. They proved that sampling noise inflates the estimated distance between fingerprints, but that this bias vanishes at a rate of , where represents the number of responses per prompt. By applying a variance correction, they were able to improve the accuracy of nearest-reference identification.
What are the practical implications?
This research has significant implications for the security and transparency of the AI ecosystem. As more companies serve models through third-party API relays, the ability to verify the identity of the backend model becomes essential. DistDNA provides a way to audit these services using only text-based queries, without needing access to the model's weights or internal parameters.
It also enables better model routing and lineage tracking. Developers can more reliably detect if a model has been tampered with or if a service provider has swapped a high-quality model for a cheaper, smaller version. Because the method is robust to unknown temperature and top- settings, it is highly applicable to real-world, "black-box" API environments.
Exploring model behavior with Grafy
While DistDNA is a specialized research framework for model identification, researchers and developers interested in studying the nuances of different model outputs can use Grafy Chat to compare various models side by side. For those looking to dive deeper into the technical details of this specific paper, Grafy Reader can be used to perform targeted research and ask specific questions about the mathematical proofs and experimental setups described in the full text.
Frequently asked questions
What is DistDNA?
DistDNA is a behavioral fingerprinting method designed to identify specific large language models. It works by analyzing the statistical distributions of a model's responses to a set of prompts, rather than looking at single text outputs. This allows it to remain accurate even when the model uses random or stochastic decoding settings.
How does DistDNA handle random outputs?
DistDNA handles randomness by using kernel-based methods to estimate response distributions. By summarizing multiple responses into a mean embedding in a kernel feature space and using maximum mean discrepancy (MMD) to compare distributions, the method can distinguish between variation caused by random decoding and variation caused by a different model checkpoint.
Does DistDNA require a trained classifier?
No, DistDNA does not require a trained classifier to identify a model. Instead, it uses a nearest-reference approach. It compares the fingerprint of the model being tested against a library of enrolled reference fingerprints and assigns the model to the checkpoint that is mathematically closest in the distribution space.
Source: Lifan Hu, Qian Yu, Zhaomin Wu, Bingsheng He, "DistDNA: Language Model Fingerprinting under Stochastic Decoding"
Source: Grafy Research Lab — DistDNA: Language Model Fingerprinting under Stochastic Decoding


