LLM が独自開発か派生かを判別する「モデルゲノム」手法を公開
本文の状態
日本語全文を表示中
詳細モードで約11分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
TLDR AI
Hugging Face の研究者が、LLM がゼロから訓練されたか派生モデルかを特定する「Model Genome」手法を公開し、アーキテクチャ設定やトークナイザーの重複率を分析する実証可能な検証パイプラインを提供した。
Continue in AI NEW LAB
このニュースを、実務の判断につなげる
AI NEW LABで、試したことや先に確認したい条件を共有できます。まずはログインなしで読めます。
AI NEW LABで論点を見るAI深層分析を開く2026年8月11日 22:27
AI深層分析
キーポイント
検証手法の確立
モデルの「遺伝子型」を特定するために、アーキテクチャ設定(config.json)、トークナイザーの語彙重複率、重みの CKA 分析という 3 つの軸を組み合わせた再現可能なパイプラインを開発した。
検証手法の限界と有効性
行ごとの埋め込みコサイン類似度は回転不変性の影響で無効であり、CKA 単独では継続事前訓練とゼロからの訓練を明確に分離できないため、config とトークナイザーが主要な証拠となることを示した。
実証事例の適用
開発された基準を用いて、9 つの韓国組織が公開している基盤モデルに対して検証を行い、その結果を「Model Genome Korea」としてライブで確認できる環境を提供した。
構成ファイルによるアーキテクチャ指紋
config.json内の隠れ次元や層数などのパラメータは、モデルのアーキテクチャを識別する強力な指紋となる。
完全一致が転用を示唆
特定の形状タプルが既知のオープンウェイトモデルと完全に一致する場合、そのアーキテクチャは独自設計ではなく他から採用された可能性が高い。
重要な引用
We built a reproducible pipeline that fingerprints a model on three axes — architecture, tokenizer, and weights.
row-wise embedding cosine is useless because of rotational invariance
even CKA cannot cleanly separate continued-pretraining from from-scratch
"The shape tuple ... is effectively a fingerprint of the reference architecture."
編集コメントを表示
編集コメント
「独自開発」の主張に対する客観的な検証基準が提示されたことは、透明性のある AI エコシステムの構築に寄与する。特に構成ファイルやトークナイザーの分析に着目した点は、技術的な洞察に富んでいる。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
TL;DR — ある研究機関が「ゼロから独自開発した基盤モデル」だと発表した場合、外部の人間は公開された成果物だけでその主張を検証できるのでしょうか?私たちは、3 つの軸でモデルに指紋を刻む再現可能なパイプラインを構築しました。それは アーキテクチャ(config.json)、トークナイザー(語彙の重複度)、そして 重み(埋め込み CKA)です。これらを統合して、一瞥するだけでわかる「遺伝子型」を作成しました。
この過程で、2 つの重要な教訓を得ました。行ごとの埋め込みコサインは回転不変性のため役に立たないこと、そして CKA だけでは継続事前学習とゼロからの学習を明確に区別できないことです。そのため、config ファイルとトークナイザーが最も信頼できる証拠となります。
私たちはこの厳密な基準を、9 つの韓国組織が公開した基盤モデルにも適用しました。実際に試してみたい方はこちら:Model Genome Korea。
1. 問い
オープンウェイトのベースモデル(Qwen、Llama、DeepSeek、Mistral など)の上に大規模言語モデルを構築することは、業界標準として正当な手法です。しかし、これはゼロから基盤モデルを訓練することとは異なります。ただし、ベンダー側がその違いを明確に説明しているわけではありません。
2026 年 7 月末、複数の研究機関が DeepSeek に匹敵する「自社開発」モデル(例:LG K-EXAONE 2.0、750B)を発表した際、この議論は中国のテックコミュニティにも波及しました。ある Zhihu のスレッド(→ リンク)では 270 万回以上の閲覧数を記録しています。そこで自然に浮かぶ疑問は、「ゼロから訓練されたのか、派生モデルなのか」です。
この問いに対する答えは、公開されているファイルから客観的に導き出すことが可能です。その方法について解説します。
軸 1 — アーキテクチャの指紋(config.json)
すべての transformers チェックポイントには、必ず config.json が同梱されています。このファイル内のいくつかの項目が、驚くほど識別力のあるシグネチャを形成しています。
model_type
vocab_size
モデルの遺伝子解析:大規模言語モデル(LLM)がゼロから学習されたのか、既存モデルを派生させたものなのかを見分ける指紋
hidden_sizeintermediate_sizenum_hidden_layersnum_attention_heads/num_key_value_heads
import requests
def arch_fingerprint(repo):
c = requests.get(f"https://huggingface.co/{repo}/resolve/main/config.json",
headers={"User-Agent": "genome/1.0"}).json()
return {k: c.get(k) for k in
("model_type", "vocab_size", "hidden_size",
"intermediate_size", "num_hidden_layers",
"num_attention_heads", "num_key_value_heads")}
形状タプル (hidden_size, intermediate_size, num_hidden_layers, heads, kv) は、参照アーキテクチャの指紋のようなものです。あるモデルのタプルが海外で公開されているオープンウェイトのモデルと完全に一致する場合、そのアーキテクチャは独自に設計されたものではなく、他から採用された可能性が高いことを示す強力な証拠となります。実際に測定した例を以下に挙げます。
| モデル | 形状 (h · i · L · heads · kv) | 完全一致 |
|---|---|---|
| 7B の商用モデル | 3584 · 18944 · 28 · 28 · 4 | Qwen2.5-7B |
| 72B の商用モデル | 8192 · 29568 · 80 · 64 · 8 | Qwen2.5-72B |
| 14B の VLM | 5120 · 17408 · 40 · 40 · 8 | Qwen3-14B |
| 8B モデル | 4096 · 14336 · 32 · 32 · 8 | Llama-3.1-8B |
| MoE モデル | 7168 · 18432 · 61 · (moe 2048) | DeepSeek-V3 |
偶然の一致が一つあるだけでは何も意味をなしませんが、五つ同時に一致すれば指紋となります。
3. Axis 2 — トークナイザーの指紋(親子鑑定のようなもの)
アーキテクチャだけを見ても誤解を招く可能性があります。モデルは他者のアーキテクチャをコピーしながら、独自のトークナイザーを新たに訓練することもあれば、その逆も起こり得ます。
トークナイザーの評価は tokenizer.json から直接行われ、語彙セット同士の最小重複率(min-overlap ratio)を比較します。
def vocab_set(repo):
j = requests.get(f"https://huggingface.co/{repo}/resolve/main/tokenizer.json").json()
v = j["model"]["vocab"] # BPE: {token: id}
return set(v.keys())
def tok_overlap(a, b):
A, B = vocab_set(a), vocab_set(b)
return len(A & B) / min(len(A), len(B)) # 1.0 == subset
これにより、config が隠していた情報が表面化します。あるモデルは Qwen2.5-7B のアーキテクチャと完全に一致していましたが、そのトークナイザーの重複度は Qwen と約 0.38 しかありませんでした。これは「外国製の脳に自国の言語」というケースです。アーキテクチャは採用されましたが、新しい韓国語用のトークナイザーが訓練されたのです。一方、いくつかの VLM(Vision Language Model)ではベースとなるトークナイザーがそのまま再利用されており(重複度 = 1.000)、単純なファインチューニングであることが確認できました。
実務上の落とし穴:分母に
min(|A|,|B|)を用いること(和集合ではないこと)が、大規模な語彙の厳密な部分集合である「縮小された語彙」に対して約 1.0 というスコアを与える要因です。これは「ベースから切り出された」という正しいシグナルとなります。
4. 軸 3 — ウェイトの指紋(最も困難な項目)
最も重要な問いは、重みがゼロから学習されたのか、それとも別の基盤モデルに継続事前学習を施したのかという点です。ここには2つの注意すべき落とし穴が存在します。
落とし穴1 — 行ごとのコサイン類似度は無意味
素朴な考えとして、両モデルの embed_tokens.weight を読み込み、共通するトークンについて行ごとのコサイン類似度を平均化すればよいと考えがちです。もし両者が系譜を共有しているなら、埋め込みベクトルは似ているはずです。
同じ出自であっても、そうとは限りません。既知のゼロから学習したモデルと、既知の Llama 派生モデルの両方で、平均コサイン類似度はほぼゼロでした。その理由は「回転不変性」にあります。Transformer の隠れ空間には特別な基底が存在しないため、任意の直交回転の下で同じ情報を符号化できるのです。行ごとのコサインは回転を差異として捉えてしまうため、出自を見分けることができません。
罠 2 — CKA は役立つが、不十分
線形 CKA(Centered Kernel Alignment)は回転と等方的なスケールに対して不変であるため、表現を比較する適切なツールです:
import torch
def linear_cka(X, Y):
# X: (n, d1), Y: (n, d2) — SAME token order (shared vocab)
X = X - X.mean(0, keepdim=True)
Y = Y - Y.mean(0, keepdim=True)
num = (X.T @ Y).norm() ** 2
den = (X.T @ X).norm() * (Y.T @ Y).norm()
return (num / den).item()
ゼロから学習したモデルは、候補となるベースモデルと比較して ほぼゼロの CKA スコア を示しました。これは独立した事前学習を行ったことを示す明確な証拠です。一方、継続事前学習された派生モデルは、わずかに高いスコア(約 0.25)を示しましたが、これは同じファミリーに属する *無関係* な 2 つのモデル間のベースライン(約 0.21)とほとんど変わりません。大規模なトレーニングにより埋め込みが十分に書き換えられてしまうため、CKA は *派生* モデル側での識別力を失ってしまいます。
率直な結論: 重み軸は「ゼロから学習」を(ほぼゼロの値で)確実に確認できますが、「派生」を検出する強力な検出器ではありません。それには config とトークナイザーの指紋が主たる手段となります。重み軸については、補強証拠として報告するにとどめ、それ単独での判断材料とはしません。
5. 追加軸 — アテンション多様性を独自性の代理指標として
多くのモデルは単一の注意機構を宣言しますが、中には複数の注意機構を組み合わせるものもあります。config.json に記載された異なる注意機構の数は、アーキテクチャの独自性を評価するための簡易的な指標となります。
KEYS = ("layer_types", "linear_attn_config", "sliding_window",
"mamba2_d_state", "hyena_filter_order", "mla_kv_lora_rank",
"attention_cls")
def attention_diversity(cfg):
hits = [k for k in KEYS if k in cfg]
# e.g. layer_types = [full×16, sliding×48] -> hybrid (2)
return hits
今回の調査では、大半の韓国製モデルが単一のグループ化クエリ型またはマルチヘッド・ラテント注意機構を採用していました。いくつかのモデルはハイブリッド構成(layer_types = [full_attention×16, sliding_attention×48])を採用しており、最も多様なモデルは 1 つのスタック内で Mamba2、Hyena、MLA、線形注意機構、ゲート付きデルタネット、ネイティブ・スパース・アテンション、スライディングウィンドウをすべて組み合わせていました。
6. 軸の組み合わせ → ジノタイプ
アーキテクチャと重みという 2 つの主要な軸を統合し、1 つのラベルとして表現します。
| 遺伝子型 | アーキテクチャ | 重み |
|---|---|---|
| 🟢 ネイティブ | 自己 | ゼロから |
| 🔵 適応型 | 主に自己 | 1 つの軸を借用 |
| 🟡 ミックス | 部分的 | 部分的な継承 |
| 🔴 移植型 | 外部(完全一致) | 継承 |
トークナイザーの重複度とアテンションの多様性は、判定結果に折りたたまれるのではなく並列して表示されます。これにより、読者は生データとしての証拠を直接確認できます。
7. 結果
同一のパイプラインを9 つの韓国組織(大手企業、通信キャリア、中堅企業、スタートアップ)が公開する基盤モデルに適用したところ、結果は一律ではありませんでした。一部のモデルは外国製のアーキテクチャとトークナイザーの両方に完全に一致し「移植」されたものとして分類されました。他方、独自に構築したアーキテクチャと重みを持ち、外国製との類似性が見られない「ネイティブ」なモデルも存在します。そのほかには、中間的な位置にあるモデルも多数ありました。
各モデルの詳細分析については、3D 系統グラフの表示や検索機能、ライト/ダークモード切り替えに対応した Space をご覧ください。
8. 誠実さと限界
- 非難を目的としたものではありません。 オープンウェイトモデルをベースに構築することは正当かつ一般的な行為です。本ツールは不正行為の報告ではなく、モデルの系譜(リンネージ)を明らかにするものです。
- 重みの軸は補強要素であり、決定打ではありません(4 節参照)。
- 例外なく全モデルに対して同一の基準を適用しています。
- すべての入力データは公開されており、訂正やご指摘を歓迎します。
9. 再現方法
上記の3つの関数が手法全体です。これらを用いて Hugging Face Hub 上の任意のリポジトリ2つを比較できます:
print(arch_fingerprint("some/model"))
print(tok_overlap("some/model", "Qwen/Qwen3-14B"))
# weights: load embed_tokens.weight for a shared-vocab pair, then linear_cka
ライブデモ、完全なデータセット、および多言語対応 UI は Model Genome Korea で利用可能です。
*モデル名、企業名、ライセンスはそれぞれの所有者の権利です。*
原文を表示
TL;DR — When a lab announces a "self-developed, from-scratch" foundation model, how can an outsider verify the claim using only public artifacts? We built a reproducible pipeline that fingerprints a model on three axes — architecture (config.json), tokenizer (vocabulary overlap), and weights (embedding CKA) — and combined them into a single at-a-glance *genotype*. Along the way we hit two instructive traps: row-wise embedding cosine is useless because of rotational invariance, and even CKA cannot cleanly separate continued-pretraining from from-scratch — so config + tokenizer remain the primary evidence. We applied the exact same yardstick to the public foundation models of nine Korean organizations. Try it live: Model Genome Korea.
1. The question
Building a large language model on top of an open-weight base (Qwen, Llama, DeepSeek, Mistral) is a legitimate, industry-standard practice. But it is *different* from training a foundation model from scratch — and vendors do not always make the distinction explicit. When several labs released DeepSeek-rivaling "self-developed" models in late July 2026 (e.g. LG K-EXAONE 2.0, 750B), the debate spilled into Chinese tech communities as well — a Zhihu thread (→ link) crossed 2.7M views. The natural question followed: from scratch, or derived?
This is answerable, objectively, from public files. Here is how.
2. Axis 1 — Architecture fingerprint (config.json)
Every transformers checkpoint ships a config.json. A handful of fields form a surprisingly discriminative signature:
- model_type
- vocab_size
- hidden_size
- intermediate_size
- num_hidden_layers
- num_attention_heads / num_key_value_heads
import requests
def arch_fingerprint(repo):
c = requests.get(f"https://huggingface.co/{repo}/resolve/main/config.json",
headers={"User-Agent": "genome/1.0"}).json()
return {k: c.get(k) for k in
("model_type", "vocab_size", "hidden_size",
"intermediate_size", "num_hidden_layers",
"num_attention_heads", "num_key_value_heads")}
The shape tuple (hidden_size, intermediate_size, num_hidden_layers, heads, kv) is effectively a fingerprint of the reference architecture. When a model's tuple matches a foreign open-weight exactly, that is strong evidence the architecture was adopted rather than designed independently. Examples we measured:
| Model | shape (h · i · L · heads · kv) | Exact match |
|---|---|---|
| a 7B commercial model | 3584 · 18944 · 28 · 28 · 4 | Qwen2.5-7B |
| a 72B commercial model | 8192 · 29568 · 80 · 64 · 8 | Qwen2.5-72B |
| a 14B VLM | 5120 · 17408 · 40 · 40 · 8 | Qwen3-14B |
| an 8B model | 4096 · 14336 · 32 · 32 · 8 | Llama-3.1-8B |
| a MoE model | 7168 · 18432 · 61 · (moe 2048) | DeepSeek-V3 |
A single coincidental field means nothing; five simultaneously is a fingerprint.
3. Axis 2 — Tokenizer fingerprint (a paternity test)
Architecture alone can mislead. A model can copy a foreign *architecture* but train a genuinely new tokenizer, or vice-versa. The tokenizer is measured directly from tokenizer.json, comparing the vocabulary sets with a min-overlap ratio:
def vocab_set(repo):
j = requests.get(f"https://huggingface.co/{repo}/resolve/main/tokenizer.json").json()
v = j["model"]["vocab"] # BPE: {token: id}
return set(v.keys())
def tok_overlap(a, b):
A, B = vocab_set(a), vocab_set(b)
return len(A & B) / min(len(A), len(B)) # 1.0 == subset
This immediately surfaces things config hides. One model matched Qwen2.5-7B's architecture exactly, yet its tokenizer overlapped Qwen by only ~0.38 — a "foreign brain, own language" case: the architecture was adopted, but a new Korean tokenizer was trained. Conversely, some VLMs reused a base tokenizer verbatim (overlap = 1.000), confirming a straight fine-tune.
A practical trap: min(|A|,|B|) in the denominator (not the union) is what makes a reduced vocabulary that is a strict subset of a larger one score ~1.0 — the correct signal for "carved out of the base."
4. Axis 3 — Weights fingerprint (the hard one)
The gold-standard question is: were the weights trained from scratch, or continued-pretrained on a foreign base? This is where two instructive traps live.
Trap 1 — row-wise cosine is useless
The naive idea: load embed_tokens.weight from both models, and for shared tokens, average the row-wise cosine similarity. If they share lineage, embeddings should be similar.
They are not — *even when they obviously share lineage*. We measured near-zero mean cosine for both a known from-scratch model and a known Llama-derivative. The reason is rotational invariance: a Transformer's hidden space has no privileged basis, so two models can encode identical information under an arbitrary orthogonal rotation. Row-wise cosine sees rotation as dissimilarity. It cannot distinguish lineage.
Trap 2 — CKA helps, but not enough
Linear CKA (Centered Kernel Alignment) is rotation- and isotropic-scale-invariant, so it is the right tool for comparing representations:
import torch
def linear_cka(X, Y):
# X: (n, d1), Y: (n, d2) — SAME token order (shared vocab)
X = X - X.mean(0, keepdim=True)
Y = Y - Y.mean(0, keepdim=True)
num = (X.T @ Y).norm() ** 2
den = (X.T @ X).norm() * (Y.T @ Y).norm()
return (num / den).item()
A from-scratch model scored near-zero CKA against its candidate base — clean evidence of independent pretraining. But a continued-pretrained derivative scored only modestly higher (≈0.25) — barely above the baseline between two *unrelated* models of the same family (≈0.21). Large-scale training reshapes embeddings enough that CKA loses discriminative power on the *derivative* side.
Conclusion, stated honestly: the weights axis reliably confirms *from-scratch* (near-zero), but it is not a strong detector of *derivation*. For that, config + tokenizer fingerprints remain primary. We report the weights axis as supporting evidence, not as a verdict on its own.
5. Bonus axis — attention diversity as an originality proxy
Most models declare a single attention mechanism. A few mix several. The count of distinct mechanisms in config.json is a cheap proxy for architectural originality:
KEYS = ("layer_types", "linear_attn_config", "sliding_window",
"mamba2_d_state", "hyena_filter_order", "mla_kv_lora_rank",
"attention_cls")
def attention_diversity(cfg):
hits = [k for k in KEYS if k in cfg]
# e.g. layer_types = [full×16, sliding×48] -> hybrid (2)
return hits
In our sweep, most Korean models used a single grouped-query or multi-head-latent attention; a couple used a hybrid (layer_types = [full_attention×16, sliding_attention×48]); and the most diverse combined mamba2, hyena, MLA, linear attention, gated-delta-net, native-sparse-attention and sliding-window in one stack.
6. Combining axes → the genotype
We collapse the two primary axes (architecture × weights) into one label:
| Genotype | Architecture | Weights |
|---|---|---|
| 🟢 Native | self | from-scratch |
| 🔵 Adapted | mostly self | one axis borrowed |
| 🟡 Mixed | partial | partial inheritance |
| 🔴 Ported | foreign (exact match) | inherited |
The tokenizer overlap and attention diversity are shown alongside, not folded into the verdict, so readers can see the raw evidence.
7. Results
Applying the identical pipeline to the public foundation models of nine Korean organizations (large enterprises, telcos, mid-size firms, and startups), the picture is not uniform: some models match a foreign architecture *and* tokenizer exactly (Ported); others use self-built architectures and weights with no foreign match (Native); many sit in between. The per-model breakdown — with a 3D lineage graph, search, and light/dark mode — is in the Space.
8. Honesty & limitations
- Not an accusation. Building on open-weight bases is legitimate and widespread. The tool reports lineage, not wrongdoing.
- Weights axis is supporting, not conclusive (Section 4).
- Same yardstick for every model, without exception.
- All inputs are public; corrections are welcome.
9. Reproduce it
The three functions above are the whole method. Point them at any two repos on the Hub:
print(arch_fingerprint("some/model"))
print(tok_overlap("some/model", "Qwen/Qwen3-14B"))
# weights: load embed_tokens.weight for a shared-vocab pair, then linear_cka
Live demo, full dataset, and 3-language UI: Model Genome Korea.
*Model names, companies, and licenses are the property of their respective owners.*
関連記事
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み