---
title: "Why do two Marvel pages read alike? · Log-Log Legends"
description: "Why do two Marvel pages read alike: names, stories or Wikipedia's template? TF-IDF on the 303 Marvel pages, with and without names. Week 6, Log-Log Legends."
url: https://horrrt.github.io/02805_social_graphs/weeks/week06/alternative/
---

Week 6 · What words mean

# Why do two Marvel pages read alike?

**When two Marvel pages read alike, is it a shared name, a shared story, or Wikipedia's template?** Mostly a shared name, and a shared name usually marks a shared story: names are where Wikipedia puts its links. Take the names out and most lists shift toward pages about women. We weighted the words of all 303 pages, found each page's ten nearest, and looked again without the names.

A link is an editor's choice to point to a page, not a friendship in the comics.

**44.5%** of all word weight sits on names

**48%** of ten-nearest slots go to pages about women once names go; they are 17% of pages

Storm's four nearest pages by text. With names, the Human Torch leads on his surname (the two also served together in the Fantastic Four); without names, four women, matched on her and she. [Section 1](https://horrrt.github.io/02805_social_graphs/weeks/week06/alternative/#explore) lets you pick any character.

1.  [](https://horrrt.github.io/02805_social_graphs/weeks/week06/alternative/#opening)
2.  [](https://horrrt.github.io/02805_social_graphs/weeks/week06/alternative/#explore)
3.  [](https://horrrt.github.io/02805_social_graphs/weeks/week06/alternative/#names)
4.  [](https://horrrt.github.io/02805_social_graphs/weeks/week06/alternative/#gender)
5.  [](https://horrrt.github.io/02805_social_graphs/weeks/week06/alternative/#closing)

## Three findings

Three sections, three findings

the real pagesbaseline, mean ± 1 sd; a dashed tick is a named reference

1

### Pick a character

With names, a page's closest page is linked with it for 223 of the 303 pages. Without names, for 125.

[Section 1 →](https://horrrt.github.io/02805_social_graphs/weeks/week06/alternative/#explore)

2

### Names carry the links

Without names, 1.91 of a page's ten nearest pages are linked with it, against 4.01 with them and 3.96 with names alone. Of the 25 closest unlinked pairs, 20 share a story or a title and 5 share only a name.

[Section 2 →](https://horrrt.github.io/02805_social_graphs/weeks/week06/alternative/#names)

3

### Without names, pages lean toward women's pages

Pages about women take 48% of the ten-nearest slots and are 17% of the pages; 231 of 303 lists gain women once names go. A woman's list holds 9.2 women in ten, a man's 3.9.

[Section 3 →](https://horrrt.github.io/02805_social_graphs/weeks/week06/alternative/#gender)

## Opening

303 Wikipedia pages about Marvel characters, compared once by their links and once by their words.

The pages are the English Wikipedia articles in Category:Marvel Comics superheroes, as the course froze them on 26 August 2026: 727,261 words in all, with 27,033 different words.

**How a page becomes a vector.** Each word gets a weight on each page: how often the page uses it, times how rare it is across the 303 pages. Eleven words sit on every page, among them the, and, marvel and comics, and weigh nothing. Two pages are near when their weights point the same way. A page's ten nearest pages are the ten that point closest to it.

**What a link means.** Two pages are linked when either one links to the other's article. A link records an editor's choice to point there, not a friendship or a fight in the comics.

! **What counts as a name** We use the course brief's rule: a word written with a capital in more than half of its uses is a name. That catches Storm and Frost, and also Avengers, Latveria and the men of X-Men.

### How each section reads

Every section answers one question on one card.

Question

What we asked, and the short answer

Did

What we did, beside what to notice

Figure

The chart or the explorer that answers it

Drawers

Method and its limit, more numbers, tables, and the pairs we read

### How to read the charts

**The real pages** What the 303 pages show.

**Baseline** Mean and one standard deviation over random removals or shuffled labels.

**Reference** A fixed value to compare against, named on the chart: ten random pages, or women's share of pages.

## Pick a character

With names, a page reads like the pages that share its names. Without them, most lists shift toward pages about women, a woman's most of all.

1A

## Which pages read most like a character, and why?

With names kept, pages that share a name, a team or a title with it. Without names, a woman's page matches on she and her, and a man's on whatever words remain; section 3 measures where that leads.

Pick a character. Left, the ten pages whose TF-IDF weights point closest to its page, by cosine; right, the same with every name taken out. Each row says whether the two pages link or how many steps apart they sit, gives the cosine, and lists the three words that add most to the match.

💡**What to notice** Pick Storm, then Wolverine. With names, half of each list is women, mostly X-Men teammates. Without names, Storm's ten nearest pages are all women; Wolverine's keep six men.

Loading the 303 pages…

Method

Words are runs of letters in any alphabet with one inner apostrophe kept, lowercased: the course's rule, recovered by matching every page length in its lookalikes data. A word's weight on a page is its count over the page's length, times the natural log of 303 over the number of pages that use it: \\htmlClass{x-tfidf}{\\text{TF-IDF}(w, d)} = \\htmlClass{x-tf}{\\tfrac{\\htmlClass{x-count}{\\text{count}(w, d)}}{\\htmlClass{x-len}{\\lvert d \\rvert}}} \\times \\htmlClass{x-idf}{\\htmlClass{x-ln}{\\ln} \\tfrac{\\htmlClass{x-n-docs}{303}}{\\htmlClass{x-df}{\\text{DF}(w)}}}. The words behind a match are the three with the largest product of their weights on the two pages.

TF-IDF reads each word on its own, so it cannot tell Storm the codename from Storm the surname. A A static word embedding gives each word one fixed list of numbers, learned from a corpus, whatever sentence the word appears in. word vector, from the brief's second half, gives storm one vector too; telling the two apart needs the sentence around the word.

More numbers

With names, a page's single nearest page is linked with it for 223 of the 303 pages; without names, for 125. Not one page keeps the same ten nearest pages once the names go: on average 2.83 of the ten stay.

## Names carry the links

TF-IDF finds the link network because it finds names. Without them it does no better than raw counts.

2A

## How much of TF-IDF's agreement with the links comes from names?

Most of it: linked pages among the ten nearest fall from 4.01 to 1.91 once the names go.

We rebuilt the course's lookalikes and got its four numbers to the second decimal, with the same ten nearest pages for all 303. Then we removed the 10,519 words the name rule catches and counted again. As controls we kept only the names, and we removed 10,519 other words instead, each matched to a name on how many pages use it, in 20 runs.

💡**What to notice** Names hold 44.5% of all TF-IDF weight. Without them TF-IDF drops to 1.91, level with raw counts (1.86); with names alone it gets 3.96. Removing as many other words of the same rarity leaves 4.00 ± 0.01, but those words carry 19.8% of the weight against the names' 44.5%, so the control rules out rarity, not weight.

### Linked pages among each page's ten nearest

Mean over the 303 pages. Dot: the real pages. Band: 20 runs removing as many other words, matched on how many pages use each, mean and one How far values typically sit from their average.. Dashed line: ten pages picked at random. The first three rows are the course's figures, reproduced. Linked means either page links to the other. The control's band is ±0.01, narrower than its dot.

Method

Two pages count as linked when either links to the other. The random line is ten times the share of all pairs that are linked. The A very common word, such as the, and or of, that says little about a text on its own. Analyses often drop them using a fixed list. row uses NLTK's English list, which reproduces the course's 26,859 remaining words.

The control pairs each name with an unused non-name on the same number of pages, or the nearest number with one left, drawn with seeds 6 to 25. It keeps how rare the removed words are; it cannot keep their weight. We checked our ten nearest pages against the course's own file: all 303 lists match.

The name rule is crude. It removes team and place names (Avengers, Latveria) and the men of X-Men along with people's names, and it keeps a name that is mostly written in lower case.

More numbers

The ten nearest pages sit close in the network: 40% are linked and 8% have no path, against 3% and 16% of all pairs. Without names 19% are linked and 48% are two steps away, against 34% with names.

Removing he, she and their forms as well brings the count to 2.10.

Table

What we read

We read the 25 most similar pairs that do not link, names kept, and sorted each into four groups (shared story, same title, name only, template: she, her or list pages), then re-read them after a review with a stricter rule for a shared story: the pages must put both characters on one team or in one storyline at the same time. 18 share a story: 12 are teammates in Strikeforce: Morituri, whose pages repeat one lead sentence and one creator credit, and Storm served in the Fantastic Four beside the Human Torch. 2 hold the same title, such as Doctor Doom. 5 share only a name word: Frost, Kane, Devil, Rider and Walker. The 12 Morituri matches lean on that copied text as well as on the shared team.

## Without names, pages lean toward women's pages

Two things happen once names go: most lists lean toward pages about women, and a TF-IDF quirk pulls women's pages closest to each other.

3A

## With the names gone, which pages read alike, and why?

Pages about women. They take 48% of all ten-nearest slots and are 17% of the pages, partly because their pages are longer. And a woman's list holds 9.2 women in ten against 3.9 for a man's, mostly because TF-IDF weighs she and her far above he and his.

For every page we took its ten nearest pages and counted the pages about women among them, by Wikidata's label: 52 women and 145 men among the 197 pages that have one. Then we compared women's lists with men's. Women's pages that sit in many lists lift both alike, so the gap between the two is what the pages' own words add; 1,000 shuffles of the labels over the same lists put that gap at about 0. Last, we removed he, she and their forms as well.

💡**What to notice** Left, the lean: it survives removing he and she (48% to 44%), so the pronouns do not explain it. Right, the quirk: he and his sit on nearly every page, so TF-IDF gives them almost no weight while she and her keep theirs; removing the pronouns cuts the gap from 51 to 13 points.

### Pages about women in everyone's ten nearest

Share of all 3,030 ten-nearest slots that go to the 52 pages about women. Dashed line: their share of the 303 pages. Women's pages are longer and long pages sit in more lists, but at equal length a woman's page still sits in 12.6 more lists (\\htmlClass{x-p-value}{p} = 0.01).

### Women's lists against men's

Women among a woman's labelled nearest pages minus women among a man's, in percentage points. Band: 1,000 shuffles of the labels over the 197 labelled pages, mean and one standard deviation.

Method

We read Wikidata property P21 for each page's item on 6 October 2026. 104 pages have no value: 36 are pages for a codename several characters share, and most of the rest are minor characters whose item lacks one. Ajak has two values and Phoenix Force is agender; both are left out.

The label is Wikidata's, not the page's, and the 106 pages without a woman or man label drop out of the gap chart. Counting every slot, labelled or not, a woman's list holds 9.2 women in ten.

More numbers

With names kept, women's lists are 49% women and men's 28%, a gap of 21 points (\\htmlClass{x-z}{z} = 7.5). Without names the gap is 51 points (\\htmlClass{x-z}{z} = 23.9); without pronouns too, 13 points (\\htmlClass{x-z}{z} = 5.8).

Why the lean? Not reception sections: deleting every reception and relationship section leaves it at 46.4%, against 45.4% ± 0.4 pts when the same number of words is cut from other sections (20 runs). A page twice as long sits in 8.5 more lists, and women's pages are longer (median 2,068 words against 1,700); the length model explains under half of the variation (\\htmlClass{x-r2}{R^2} = 0.45). 231 of 303 lists gain women once names go, 39 stay level and 33 lose; 110 of 145 men's lists gain. He is on 291 pages and his on 300, so their Inverse document frequency: a weight that is high for a word few documents use and 0 for a word every document uses. is 0.04 and 0.01, against 0.46 for she and 0.38 for her.

Without names, Jean Grey sits in 182 pages' ten nearest, Spider-Woman (Jessica Drew) in 142 and Emma Frost in 116. With the labels shuffled, women's lists are 26% women, the share of women among the 197 labelled pages.

Table

What we read

We read the 25 most similar pairs that do not link, names removed. All 25 join two women, and every match leads with she and her. Two pairs share a story: Mockingbird and Jessica Drew were both New Avengers after Secret Invasion, and She-Hulk and Spider-Woman (Gwen Stacy) both fight in A-Force during Secret Wars. Some share a theme, such as She-Hulk and Spitfire, who both got their powers from a blood transfusion. The other 23 share no team or storyline at the same time.

## Closing

Two Marvel pages read alike mostly because they share names, and a shared name usually marks a shared story or a link.

TF-IDF finds the link network because it finds names: names alone get 3.96 linked pages among the ten nearest, and without them the count falls from 4.01 to 1.91. Of the 25 most similar pairs that do not link, 20 still share a story or a title and 5 share only a name word, though 12 of the 20 are Strikeforce: Morituri pages that copy one lead sentence. Take the names out and most lists shift toward pages about women, which take 48% of the slots: women's pages are longer, and at equal length still sit in more lists. Separately, TF-IDF weighs she and her far above he and his, which sit on nearly every page, so women's pages land closest to each other.

! **One important limit** We asked one representation, TF-IDF on single words. Word vectors from the second half of the brief might find shared stories without names; we did not try them, so the lean toward women's pages holds for TF-IDF only.

**Next step.** Next week's contextual embeddings give storm a different vector in "Johnny Storm" and in "Storm summons lightning". Rerunning the explorer with them tests whether a page can find its story without leaning on a name or a pronoun. The main [Week 6 post](https://horrrt.github.io/02805_social_graphs/weeks/week06/) uses every other term on this week's list on the same 303 pages.

Methods and data

Data: the course's snapshot of the 303 pages, their node table and their links, frozen on 26 August 2026 and checked against a SHA-256 hash on every load, and Wikidata's sex or gender for each page's item, fetched on 6 October 2026 and committed ([week06\_gender.parquet](https://github.com/horrrt/02805_social_graphs/blob/main/analysis/week06_gender.parquet)). Every random step has a fixed seed.

Before changing anything we rebuilt the course's lookalikes: its token rule gives the same 27,033 words, and raw counts, stopwords removed, TF-IDF and the random line come out at 1.86, 2.84, 4.01 and 0.31 ([course\_reference.py](https://github.com/horrrt/02805_social_graphs/blob/main/analysis/course_reference.py)), with the same ten nearest pages for all 303 pages, checked against the course's file.

-   **1–3 · [week06\_lookalikes.py](https://github.com/horrrt/02805_social_graphs/blob/main/analysis/week06_lookalikes.py)** TF-IDF and cosine on the 303 pages; names removed, or kept alone, by the brief's capital-letter rule; 20 removals of other words matched on rarity; 1,000 shuffles of Wikidata's gender labels; undirected network distances; 50 pairs read against their pages ([week06\_pairs\_read.parquet](https://github.com/horrrt/02805_social_graphs/blob/main/analysis/week06_pairs_read.parquet)).

AI use and how we checked it

An AI coding assistant (Claude) wrote the analysis and the page code, drafted the text, read the 50 pairs against their pages, re-read them after a review and tested the page in a browser. The numbers come from the course data, Wikidata and the script above.

The script writes every number the page quotes to one JSON file the page reads. A schema check tests the file against the fields the page uses, and the site tests fail when a number in the text drifts from it. Each hand verdict is stored with the six words behind its pair, and the script stops if those words change. We reran the script under two hash seeds and got identical files.

---

02805 Social graphs and interactions · Fall 2026Credits

Page text, article names and links from English Wikipedia, [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/), through the 02805 course snapshot of 26 August 2026. Sex or gender from [Wikidata](https://www.wikidata.org/wiki/Property:P21), [CC0](https://creativecommons.org/publicdomain/zero/1.0/), fetched 6 October 2026. Character portraits from English Wikipedia and the [Marvel Database](https://marvel.fandom.com/), © Marvel, shown small to identify each page.

[](https://github.com/horrrt/02805_social_graphs)
