[KongchangAI]
· 2 min read· 1,153 words

Spanner: LLM Weight Lineage Distance Across Architectures and Tokenizers

Spanner: LLM Weight Lineage Distance Across Architectures and Tokenizers

Spanner: a weight-only pseudometric for tracking LLM lineage across architectures and auditing parent misattribution.

Remixing of open-source large models is common, making lineage intricate. Existing weight-level methods are limited by model size or tokenizer consistency and cannot handle symmetries like residual stream rotations; output-based methods struggle to distinguish weight inheritance from knowledge distillation. Spanner is a weight-only pseudometric that projects attention and MLP invariants into a shared token space and uses GCCA to compare layer spans, enabling cross-architecture, cross-tokenizer, cross-dimensional comparison with theoretical invariance to output-preserving symmetries. Experiments show D² measures Pythia cumulative learning rate (R²=0.98), lineage detection AUROC reaches 0.991 on AWM and 0.889 on LLM Biometrics, and it distinguishes weight inheritance from behavioral convergence. Auditing Hugging Face Hub reveals potential parent misattribution; computing the full distance matrix for 1,000 8B models takes ~17 hours at ~$30, making large-scale lineage auditing feasible.

Why Is LLM Lineage Tracking So Hard?

Remixing of open-source large models is extremely common—a model often derives from multiple upstream models, making its lineage intricate. Most existing weight-level lineage measurement methods are constrained by model size or require identical tokenizers, or they fail to properly handle model symmetries (such as residual stream rotations, transformations that do not change model outputs). Meanwhile, output-based lineage measurement cannot distinguish weight inheritance from knowledge distillation—both may lead to similar behavior but have completely different origins.

Spanner paper overview

To address this pain point, researchers propose Spanner (D), a weight-only pseudometric designed to compare LLMs across architectures, tokenizers, and dimensions while ignoring symmetries that do not affect model outputs.

Model Symmetry refers to transformations in a model's parameter space that do not change the model's input-output mapping. Typical examples include applying an arbitrary invertible linear transformation (such as a rotation) to the residual stream, as long as the corresponding inverse transformation is applied in adjacent layers, the model's final output remains completely unchanged. This means two weight tensors may differ enormously in numerical values, yet they define exactly the same function. If lineage tracking directly compares raw weights, it will misjudge these symmetric transformations as "different origins," producing false negatives. One of Spanner's core contributions is theoretically constructing a pseudometric invariant to such symmetric transformations, thereby capturing genuine inheritance signals at the parameter level.

Spanner's Core Idea

Spanner projects invariants from attention layers and MLP layers into a shared token space, then uses Yanai's GCD (Generalized Canonical Correlation) to compare layer spans. The key is that it does not require models to have the same architecture or tokenizer, nor does it require consistent parameter dimensions. By extracting invariants under symmetric transformations that do not affect model outputs, Spanner can capture genuine weight lineage signals rather than superficial structural differences.

The paper theoretically proves that D is invariant to model symmetries, providing a mathematical foundation for cross-architecture comparison.

Generalized Canonical Correlation Analysis (GCCA) is a multi-view generalization of classical CCA. Classical CCA finds linear combinations between two sets of variables that maximize their correlation; GCCA simultaneously handles multiple sets of variables (or matrices), seeking a set of shared latent components that align the projected representations of each set as closely as possible. In Spanner, GCCA is used to project representations from different models and different layers into a shared token space and measure their similarity in a common latent subspace. Since GCCA has some invariance to linear transformations within each set of variables, it is naturally suited to handling model symmetry issues while allowing inconsistent input dimensions—a key requirement for cross-architecture comparison.

Experimental Validation: Learning Rate, Lineage, and Behavioral Convergence

Researchers evaluated Spanner's effectiveness on multiple benchmarks:

  • Learning rate measurement: D² effectively measures cumulative learning rate on Pythia models, achieving R² of 0.98, indicating the distance is highly correlated with training dynamics.
  • Lineage detection: On the AWM dataset, Spanner achieves an AUROC of 0.991; on LLM Biometrics, it reaches 0.889, competitive with or better than published baseline methods.
  • Distinguishing weight inheritance from behavioral convergence: Spanner can separate weight lineage from behavioral convergence, something output-based methods struggle to do.

These results demonstrate that Spanner is not only a theoretically attractive metric but also reliably identifies weight inheritance relationships between models in practice.

AUROC (Area Under the Receiver Operating Characteristic Curve) is a commonly used threshold-independent evaluation metric for binary classification tasks, representing the probability that when a positive sample and a negative sample are randomly selected, the model ranks the positive sample higher. In lineage detection tasks, positive pairs are model pairs with weight inheritance relationships, while negative pairs have none. AUROC=0.991 means Spanner can almost perfectly distinguish these two types of model pairs; 0.889 indicates strong discriminative power on more challenging benchmarks. The advantage of AUROC over accuracy is that it is unaffected by class imbalance and classification threshold selection, making it more suitable for evaluating scenarios like lineage detection where the ratio of positive to negative samples is unknown.

Large-Scale Auditing and Computational Efficiency

Researchers used Spanner to audit a set of open-source models on Hugging Face Hub and found that several models may have misattributed parents. This is quite important for compliance and provenance management of open-source models.

In terms of computational efficiency, excluding download time, Spanner computes the full distance matrix between 1,000 8B models in approximately 17 hours on a Hugging Face l40sx1 instance, at a cost of about $30. This cost makes large-scale open-source model lineage tracking and auditing feasible.

Misattributed Parent refers to situations where the upstream model declared in a model card or release information is inconsistent with the actual weight inheritance source. In the open-source ecosystem, such misattribution may stem from unintentional omissions (e.g., remixing from multiple models but only labeling one), version confusion, or license compliance issues—for example, actually inheriting from a model that prohibits commercial use but labeling it as a permissively licensed parent model. Spanner discovers through weight-level distance matrices that some models are farther from their declared parent models and closer to undeclared models, thereby indicating potential misattribution. Such auditing has practical value for license compliance, model attribution, and community trust, but it is also important to note that the pseudometric may produce false positives and requires human review.

Significance for the Open-Source Ecosystem

Spanner provides a practical and scalable tool for open-source model lineage tracking. As model remixing and derivation become increasingly common, clear lineage records are crucial for license compliance, model attribution, and community trust. Spanner's weight-level approach does not rely on output behavior, so it can reveal model relationships that are behaviorally similar but have different origins, helping the community more accurately understand models' true provenance.

In the future, this method could be integrated into model release workflows as part of lineage verification. However, the paper also notes that Spanner is still a pseudometric, and its false positive and false negative rates in practical auditing need further evaluation.

One-line Summary

Spanner: a weight-only pseudometric that tracks LLM lineage across architectures and audits parent misattribution.

Paragraph Summary

Remixing of open-source large models is common, making lineage intricate. Existing weight-level methods are constrained by model size or tokenizer consistency and cannot handle model symmetries such as residual stream rotations; output-based methods struggle to distinguish weight inheritance from knowledge distillation. Researchers propose Spanner—a weight-only pseudometric that projects invariants from attention and MLP layers into a shared token space and compares layer spans using GCCA, enabling cross-architecture, cross-tokenizer, cross-dimensional comparison with theoretical invariance to output-preserving symmetries. Experiments show D² effectively measures Pythia cumulative learning rate (R²=0.98), lineage detection AUROC reaches 0.991 on AWM and 0.889 on LLM Biometrics, and it distinguishes weight inheritance from behavioral convergence. Auditing Hugging Face Hub reveals several models with potential parent misattribution; computing the full distance matrix for 1,000 8B models takes about 17 hours at ~$30, making large-scale lineage auditing feasible.

#LLM lineage#Spanner#weight-only pseudometric#model symmetry#GCCA#AUROC#open-source model auditing
Share:

Related articles