malteos commited on
Commit
000fec5
·
verified ·
1 Parent(s): db190f0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +98 -25
README.md CHANGED
@@ -1,8 +1,8 @@
1
  ---
2
  license: other
3
- license_name: commoncrawl-derived
4
  license_link: https://commoncrawl.org/terms-of-use
5
- pretty_name: Common Crawl Host-Graph Embeddings (deg≥8, shallow LP, dim-128)
6
  tags:
7
  - common-crawl
8
  - web-graph
@@ -20,19 +20,20 @@ configs:
20
  path: vectors/emb-*.parquet
21
  ---
22
 
23
- # Common Crawl Host-Graph Embeddings — `cc-main-2025-26-nov-dec-jan` (deg≥8, shallow, dim-128)
24
 
25
  Dense 128-dimensional embeddings for **52,913,544 web hosts**, learned by link prediction on the
26
- Common Crawl **host-level hyperlink graph** release `cc-main-2025-26-nov-dec-jan`
27
- (279.4 M hosts / 13.4 B directed edges). Vectors are **L2-normalized** and served in **float16**;
28
- similarity is **cosine** (a dot product on the unit vectors).
 
 
 
29
 
30
- > **Scope.** These are the **degree ≥ 8** hosts (total in+out degree), a 52.9 M / ~19 % induced
31
- > subgraph that carries ~97 % of the edges. The low-degree tail of the full 279 M-host graph is
32
- > **not** in this table — it is intended to be served separately via a domain/metadata fallback.
33
 
34
  ## What each row is
35
 
 
36
  One host, keyed by two stable string identifiers derived deterministically from the Common Crawl
37
  host name (no per-release integer ids — those are ephemeral):
38
 
@@ -61,7 +62,7 @@ Stream as a 🤗 `datasets` table:
61
 
62
  ```python
63
  from datasets import load_dataset
64
- ds = load_dataset("malteos/cc-web-graph-embeddings", split="train", streaming=True)
65
  row = next(iter(ds))
66
  print(row["host_key"], len(row["embedding"]))
67
  ```
@@ -83,26 +84,98 @@ X = np.vstack(mats) # [52_913_544, 128], already L2-normali
83
  - **Source graph:** Common Crawl host webgraph `cc-main-2025-26-nov-dec-jan`, aggregating crawls
84
  **CC-MAIN-2025-47, CC-MAIN-2025-51, CC-MAIN-2026-04**.
85
  - **Encoder:** shallow (per-node) embedding table trained by link prediction (WholeGraph-sharded,
86
- in-batch negatives), `dim=128`, 3 epochs. `model_space_version = cc_deg8_shallow_v1`.
87
  - **Link-prediction quality (held-out edges):** MRR **0.957**, Hits@1 **0.939**, Hits@10 **0.984**.
88
- - **Precision:** float16 is the **primary published tier**; the lossless float32 master is archived
89
- (for L2-normalized unit vectors fp16's cosine error is ~3–4×10⁻⁵ — negligible for ranking).
90
 
91
- ## What the embedding captures
92
 
93
- Downstream probes show the space encodes **graph structure**, not page content-language:
94
- topic and spam signals are recoverable from the vectors (topic emb-only logistic-regression
95
- macro-F1 ≈ 0.39), while **content-language is at the floor** (k-NN ≈ 0.02) — hosts are placed by who
96
- links to whom, not by the language they publish in. Select on topic/spam utility, not LP MRR alone.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
 
98
- ## Limitations
 
 
 
 
 
 
 
 
 
 
99
 
100
- - Degree ≥ 8 hosts only (see Scope). No vectors for the isolated/low-degree tail.
101
- - Vectors are comparable **only within** `model_space_version`; a retrain / new window bumps it.
102
- - Identity keys are pure functions of the published (punycode) host string — no IDNA decoding.
103
 
104
  ## License
105
 
106
- Derived from the Common Crawl host webgraph; use is subject to the
107
- [Common Crawl Terms of Use](https://commoncrawl.org/terms-of-use). The embedding artifact is
108
- released for research use. *(Set the final license before making this dataset public.)*
 
1
  ---
2
  license: other
3
+ license_name: commoncrawl-tou
4
  license_link: https://commoncrawl.org/terms-of-use
5
+ pretty_name: Common Crawl Web Graph Embeddings
6
  tags:
7
  - common-crawl
8
  - web-graph
 
20
  path: vectors/emb-*.parquet
21
  ---
22
 
23
+ # Web Graph Embedings from Common Crawl's Host-level Hyperlink Graph
24
 
25
  Dense 128-dimensional embeddings for **52,913,544 web hosts**, learned by link prediction on the
26
+ Common Crawl **host-level hyperlink graph** release `cc-main-2025-26-nov-dec-jan`. Vectors are **L2-normalized** and served in **float16**;
27
+ similarity is **cosine** (a dot product on the unit vectors). The corresponding source code is available on [Github](https://github.com/commoncrawl/web-graph-embeddings).
28
+
29
+ > **Scope.** These are the **link degree >= 8** hosts (total in+out degree), a 52.9 M / ~19 % induced subgraph that carries ~97 % of the edges.
30
+
31
+ ![graph-embeddings-visual](https://cdn-uploads.huggingface.co/production/uploads/5efda656ff69163f6f59e5d2/NT89oLi9eBr_3Z-DYfjCr.png)
32
 
 
 
 
33
 
34
  ## What each row is
35
 
36
+
37
  One host, keyed by two stable string identifiers derived deterministically from the Common Crawl
38
  host name (no per-release integer ids — those are ephemeral):
39
 
 
62
 
63
  ```python
64
  from datasets import load_dataset
65
+ ds = load_dataset("commoncrawl/web-graph-embeddings", split="train", streaming=True)
66
  row = next(iter(ds))
67
  print(row["host_key"], len(row["embedding"]))
68
  ```
 
84
  - **Source graph:** Common Crawl host webgraph `cc-main-2025-26-nov-dec-jan`, aggregating crawls
85
  **CC-MAIN-2025-47, CC-MAIN-2025-51, CC-MAIN-2026-04**.
86
  - **Encoder:** shallow (per-node) embedding table trained by link prediction (WholeGraph-sharded,
87
+ in-batch negatives), `dim=128`, 3 epochs.
88
  - **Link-prediction quality (held-out edges):** MRR **0.957**, Hits@1 **0.939**, Hits@10 **0.984**.
 
 
89
 
 
90
 
91
+ ## Explore it in the browser
92
+
93
+ Two Hugging Face Spaces let you inspect the released vectors without downloading the full dataset.
94
+
95
+ ![2d-viewer-screenshot](https://cdn-uploads.huggingface.co/production/uploads/5efda656ff69163f6f59e5d2/CNDxVBDe9bg4eTuG0MY9Q.png)
96
+
97
+ **[2D map](https://huggingface.co/spaces/commoncrawl/web-graph-embeddings)** — an interactive
98
+ projection of all 52.9 M hosts, streamed by tile. Pan and zoom, hover any point for its hostname
99
+ and stats, or jump to one of the top 20k hosts by name. The same layout recolours by link degree,
100
+ topic, content language or quality, which makes it easy to see where the embedding separates a
101
+ property and where it does not — the view above is coloured by language.
102
+
103
+ **[Nearest-neighbour search](https://huggingface.co/spaces/commoncrawl/web-graph-knn)** — type a
104
+ hostname and get its closest hosts in the full 128-dimensional space rather than in the 2D
105
+ projection. All 52,913,544 hosts are indexed. It is the quickest way to check what the embedding
106
+ considers "similar" for a site you already know well.
107
+
108
+
109
+ ## Evaluation
110
+
111
+ The model is trained only to predict links, so every result below is a probe of what link structure
112
+ alone turns out to encode. Held-out link prediction is near-saturated (`test_mrr 0.9574`); the
113
+ interesting question is what transfers.
114
+
115
+ ### Topic — the strongest transfer
116
+
117
+ A logistic probe on the raw vectors reaches **macro-F1 0.388** over 24 WebOrganizer topics, against
118
+ **0.062** for a majority-topic-per-TLD baseline — about **6×** the identity baseline, on 170,399
119
+ labelled hosts. Link structure makes a site's topic close to linearly separable.
120
+
121
+ ### Language — near-perfect on well-connected hosts
122
+
123
+ A single 120-class macro-F1 badly understates this, because it averages over many classes with
124
+ almost no held-out support. Stratified by link degree the signal is unambiguous (300,000 held-out
125
+ hosts, cosine kNN):
126
+
127
+ | host degree | accuracy | neighbour-precision | weighted-F1 | macro-F1 @sup≥20 |
128
+ |---|--:|--:|--:|--:|
129
+ | 8–16 | 0.613 | 0.455 | 0.525 | 0.095 |
130
+ | 128–512 | 0.740 | 0.662 | 0.710 | 0.326 |
131
+ | 512–4096 | 0.921 | 0.892 | 0.913 | 0.596 |
132
+ | ≥ 4096 | **0.980** | **0.970** | **0.976** | **0.713** |
133
+
134
+ Overall accuracy is 0.673 and weighted-F1 0.612. Mid-resource languages climb from the floor to
135
+ strong as degree rises — Spanish 0.02 → 0.45, Polish 0.03 → 0.95, Indonesian 0.02 → 0.83. **The more
136
+ links a host has, the more precisely the embedding places its language.**
137
+
138
+ ### Spam — an independent and unusually durable signal
139
+
140
+ The embedding never saw a spam label. Compared with **Anti-TrustRank** (ATR), the classic link-based
141
+ spam algorithm, over 52.6 M candidate hosts:
142
+
143
+ - **They are not the same signal.** Spearman(embedding, ATR) = **−0.04**.
144
+ - **The embedding is the better clean-vs-spam discriminator.** Against operator-reviewed clean
145
+ sites, gold-AUROC is **0.937** for the graph-propagated embedding, **0.874** for a plain logistic
146
+ probe, and 0.865 for ATR.
147
+ - **It detects what ATR cannot.** At a 1% false-positive budget against hard, spam-shaped sites that
148
+ reviewers had manually cleared, the embedding finds **40%** of known spam where ATR finds ~0%; at a
149
+ 5% budget, **74%** vs ~0%.
150
+ - **It cuts false positives 4.5×.** Using ATR for recall and the embedding to vet its top 1,000 drops
151
+ legitimate false positives from 0.122 to **0.027**, holding spam precision at 0.967.
152
+ - **It survives a crawl change.** On spam labelled from a *later* crawl, ATR's gold-AUROC falls to
153
+ 0.56 — chance — while the embedding still ranks it (enrichment **173×**, AUROC 0.91).
154
+
155
+ ATR remains the stronger raw ranker on the easy full-web pool (enrichment@1k 117.8×). The practical
156
+ recipe is both: ATR for recall, the embedding to vet its hits and to catch the spam that
157
+ guilt-by-association misses.
158
+
159
+ **In one line: link structure alone carries a surprising amount of what a site is** — its topic, its
160
+ language wherever the host is well connected, and a spam signal independent of the classic
161
+ link-based one.
162
+
163
+ ## Coverage and limitations
164
 
165
+ - **Only the well-connected core.** Training used hosts with total degree ≥ 8: 52.9 M of the crawl's
166
+ 279.4 M hosts (**19%**), covering 13.07 B of ~13.4 B edges. The 81% long tail — hosts with almost
167
+ no links — is *not* in this artifact. There is no vector for a host that was not trained.
168
+ - **Transductive.** There is no encoder to apply to a new host; a host absent from the training crawl
169
+ cannot be embedded without retraining.
170
+ - **Direction-blind**, as above.
171
+ - **One crawl window.** Vectors from different releases are not comparable — the model space is
172
+ arbitrary up to rotation, so a new release means a new space (tracked by `model_space_version` in
173
+ the manifest).
174
+ - **Spam metrics are a conservative floor.** The label sets are partial, so unlabelled true spam is
175
+ scored as a false positive; real precision is better than the numbers above.
176
 
 
 
 
177
 
178
  ## License
179
 
180
+ Derived from the Common Crawl host webgraph. Its use is subject to the
181
+ [Common Crawl Terms of Use](https://commoncrawl.org/terms-of-use).