NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Independence Tests for Language Models

Sally Zhu, Ahmed M Ahmed, Rohith Kuditipudi, Percy Liang

The explosion of open-weight language models has been a massive boon for AI research, but it introduces significant challenges for intellectual property (IP) and liability. If a developer releases a model under a specific license, how can they prove that a "new" model released by someone else is actually just a fine-tuned or pruned version of theirs?

Currently, it is easy to hide a model's lineage. An adversary can permute the order of hidden units or apply complex mathematical rotations to the weights that change the numbers on disk but leave the model's actual behavior identical. This paper tackles the "independence testing" problem: given the weights of two models, can we statistically prove they started from different random seeds, or is one derived from the other?

Examples of model lineage and independence

Methods for Detecting Lineage

The authors propose statistical tests to determine if two language models were trained independently or if one is a derivative of the other. By analyzing model weights and activations, they provide a robust way to track model provenance and protect intellectual property, even when an adversary tries to "camouflage" a model's origin. They introduce two main frameworks:

  1. Constrained Setting (PERMTEST): This method assumes we know the model architecture and that the training process is "permutation equivariant" (i.e., swapping the order of neurons at the start results in a swapped version at the end). By simulating many "shuffled" copies of a model, the authors calculate an exact p-value. If the similarity between two real models is much higher than between these shuffled copies, the null hypothesis of independence is rejected.
  2. Unconstrained Setting (ϕMATCH): Designed to defeat adversaries, this "robust" version uses Cosine Similarity Matching to align the hidden units of two models. Instead of comparing weights directly, it looks at how the models represent information internally. This makes the test robust to "output-preserving transformations" like weight rotations, scaling, and even retraining individual layers from scratch.
  3. Generalized Robust Test: For models with different architectures, the authors train "proxy" sub-models to approximate the behavior of the target model. This allows them to compare models across different architectural families.

Key Insights and Real-World Forensics

The core insight of the paper is that the initial random seed of a model acts as its unique "DNA." Even if two models are trained on the exact same data, their final weights will be statistically far apart if they started from different seeds. While adversaries can scramble weight matrices to fool simple comparisons, the features the model learns (the activations) are much more stable. By aligning these features, the authors can see through adversarial camouflage.

The researchers evaluated their methods on a diverse set of open-weight models, including the Llama 2 family, Llama 3.1 and its pruned descendants, and hybrid models like Mistral-7B and StripedHyena-7B. Their findings were highly conclusive:

  • Perfect Detection: In a test of 210 model pairs, the methods correctly identified every single non-independent pair (100% accuracy) with extremely high statistical significance (p-values near zero).
  • Beating the "Camouflage": The robust test successfully identified dependent models even after they were subjected to complex weight rotations and scaling that broke previous state-of-the-art detection methods.
  • Pruning Leaves a Fingerprint: The tests are sensitive enough to identify exactly which layers from a large "teacher" model were kept to create a smaller "student" model. For instance, they mapped exactly which Llama 3.1-8B layers were used to initialize Llama 3.2-3B.
  • Real-World Forensics: The authors confirmed that the "leaked" Miqu-70B model was indeed derived from Llama 2-70B and identified shared components between Mistral-7B and StripedHyena-7B.

Surprisingly, the tests showed that even if an adversary retrains an entire layer of a fine-tuned model from scratch, the other layers still carry enough signal to prove the model's lineage.

Limitations and Future Work

While highly effective, the approach has some limitations. The robust test (ϕMATCH) empirically behaves like a p-value, but it does not yet have the same rigorous mathematical "exactness" guarantees as the simpler PERMTEST. Furthermore, while the paper can tell if two models are related, it is harder to determine the exact path of descent (e.g., did Model B come directly from Model A, or did they both descend from a common ancestor, Model C?).

Finally, the authors acknowledge an ongoing adversarial arms race. While their test is robust to current output-preserving attacks, future adversaries might develop even more sophisticated ways to obfuscate a model's weights, necessitating continuous evolution in model forensic techniques.

Summary updated

BibTeX
@inproceedings{zhu2025independence,
  author = {Sally Zhu and Ahmed M Ahmed and Rohith Kuditipudi and Percy Liang},
  title = {{Independence Tests for Language Models}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=leJWwts8P9},
}
Figure