This is a weird moment. I have a hunch that we’ll look back later and tell ourselves stories in which it seemed obvious where things were going. So I wanted to lay down a little time capsule and register just how confusing everything felt at the time. This is a personal view from the trenches.
1.
If you’re a normal person, you may feel that AI has been good at math for a long time.1 But for “real” math, this is roughly what it felt like:
When
Feeling
2024
LLMs are toys
Summer 2025
LLMs are interesting toys
Early Autumn 2025
LLMs can do useful stuff sometimes
Mid Autumn 2025
…a lot of stuff
Late Autumn 2025
…a lot
Early 2026
holy god
Even having been astonished by AI progress in the past, it was still astonishing to see AI move in a matter of months from a mildly-useful toy to something that many people now consider almost impossible to do without.
2.
Personally, I’d say that current AI makes me around 50% more productive at “doing math”. That’s despite the fact that AI can now often do in a few minutes things that would have taken me hours to do myself.
The main reason is that my concept of “doing math” involves various steps, like coming up with ideas for theorems, trying to prove them, writing things down, reorganizing everything to make it more clear, and so on. AI is good at some parts of this, but still pretty bad at others, so the overall speedup isn’t as high as you might expect.
(Even if planes could go 10× faster, your door-to-door travel time from your apartment in London to your friend’s place in Rome wouldn’t decrease that much, because you still have to get to the airport and wait to board.)
3.
But then, I’m still (sort of; more on this later) trying to follow my old “doing math” workflow, just automating certain parts of it. That can’t be right, can it?
If we found a way to make batteries at 1% of the current cost, we wouldn’t just say, “cool, batteries are cheap now”. We’d find all sorts of new ways to use batteries that didn’t make sense before, and change the ways we generate power to account for all these new batteries. Probably our whole energy system would end up transformed. Analogously, AI being good at proofs should lead to a very different equilibrium. But what is that?2
4.
It seems healthy, at the moment, to maintain a fluid view of what “doing math” means. But at bare minimum it surely involves understanding the math that “I” am “doing”. So long as that’s part of the workflow, it would seem to impose a limit on how quickly “I” could “do” math, no matter how good AI is.
One obvious conclusion would be that my tiny organic brain should be removed from the workflow entirely. Maybe! But it’s interesting to speculate about how much faster things could go while still keeping a human brain in the loop. I think the answer is: A lot.
5.
Contrary to what you may have heard, humans are not obsolete for math. Not yet. The most obvious reason is that AI is still bad at writing.
People often complain that AI writing overuses various patterns or lacks a unique voice or whatever. I don’t disagree, but I always felt like there was a deeper issue that I couldn’t quite put my finger on. With math, this becomes very clear: The problem is it doesn’t make any goddamned sense.
Really, I think it’s deeper than being bad “at writing”. It seems like AI is bad at thinking in certain ways that manifest as bad writing.
6.
When novices do math, they often create “spaghetti-code math”: Imagine a long document with lots of equations, but if you point at any one equation, it’s hard to say what assumptions underpin it, or how it fits into the bigger picture. Any random idea that was mentioned 17 pages ago might be used again at any time with no warning. With experience, people learn to break complex arguments down into modular pieces with a good “API”, in the sense that the assumptions and conclusions for each part are relatively simple.
Somehow, AI has developed these amazing technical skills, while still being bad at creating abstractions So the arguments it gives are long and tangled and bewildering. This is what makes AI math seem so alien.
7.
Now I know what you’re thinking. Maybe AI isn’t bad at creating abstractions. It’s just bad at creating abstractions that work for you, human with tiny organic brain.
From a distance, that seems plausible. And it might be true to some degree. I have high-bandwidth access to a human brain. It’s not crazy to imagine that this gives me an advantage in predicting how a human brain would react to a given presentation of ideas. But still, I claim that current AI is objectively bad at creating abstractions, regardless of if the consumer of those abstractions is human or artificial.
Here’s why: If I ask AI to prove something hard, it will produce a proof that starts simple and gradually descends into a rampage of complexity. If I tell it to break that proof down into self-contained pieces, it will produce lemmas that each take a full page just to state. If I ask, “Why? Why have you done this to me?”, the AI will say, “This is as simple as it gets. It’s not that bad. What’s your problem?”
But if I argue with the AI for a while, I can start to understand the basic contours of the argument. And I’ll ask, “Why don’t you first just try to prove blah using only assumptions blahblah, without worrying about blahblahblah? Wouldn’t that be easier?” Often, this doesn’t work, either because my idea was bad, or because the AI isn’t smart enough to do it. (Which one? Who knows!) But after a few attempts, I can usually find something that works, and the AI can use it to re-write the proof in a somewhat simpler way. If I repeat this many times, I can gradually chip away at the complexity.
But maybe that’s still just making the proof easier for humans to understand? No! For one, this usually makes the proof shorter, and sometimes dramatically shorter. More importantly, during this process, someone (maybe me, maybe the AI) will often realize that there’s a different proof strategy that gives a stronger result. Instead of proving x < 9.7, now we can prove x < 7.1. Thus, artisanal human abstractions are “objectively” useful.
8.
Some people might claim that it’s already possible to automate some of what I’m doing with some multi-agent Rube Goldberg thing. I’m not sure, because my experience has been that investing lots of time into clever AGENTS.MD or custom skills or harnesses isn’t a great use of time. That stuff is somewhat helpful, but things are changing so fast that the knowledge has a short half-life. Also, the majority of information about these tricks seems to come from people who are excited about the technology itself.
On the other hand, the automator told me to try typing, “ask independent agents for an adversarial review”, and I’ve found those seven words to be quite helpful. I wish I could find a source with boring best practices for people who are happy to stay away from the bleeding edge.
9.
Another reason AI doesn’t improve my productivity more is that it is often the green light, the orgastic future that recedes before me. I’ll ask AI to do something, and it will almost seem to do it. So I’ll ask for changes, and it seems to help, but it’s still not quite right. Hours later, I’ve accomplished nothing and learned nothing. Eventually, I start over, either doing it myself or with AI on a very tight leash, and I’m done in 30 minutes. Each time this happens I feel foolish and tell myself not to do it again. But it’s very hard to judge in real-time.
10.
Of course, I’m not claiming that AI is intrinsically bad at writing or thinking or abstraction-making. It’s gotten better at all of these and I expect it will continue to do so. All I’m saying is that as of Autumn 2026, humans still have a lot to contribute, and it’s not just better exposition.
11.
Did AI actually get much better at math in Autumn 2025? Or perhaps, in the grand scheme of things, human math ability falls into a narrow range?
12.
Some people are responding to the new reality by gleefully using AI to generate lots of semi-OK-ish papers and puking them up on arXiv. I understand the incentives that drive this. In some sense, it seems like the logical response to the new reality. (After inventing cars, we started taking a lot more low-value trips.) But I don’t think this is socially useful, and I tend to think everyone will soon agree that this is embarrassing. But… I’m not sure. Maybe it is socially useful? And I find myself feeling vaguely jealous of the people who are wired this way, who instead of feeling blinkered, see opportunity and plunder.
13.
Want an optimistic pro-AI, pro-progress take? OK. If I take my old “doing math” workflow, AI makes it strictly better. A lot better. It’s like having a hyper-conscientious intern that is smarter than me in many ways, works at incredible speed, and knows approximately everything.
Yes, AI sucks at writing and making abstractions. But if I’m disciplined and try to mostly do the math “myself” while asking the AI for help, I can explore ideas much faster than before, make far fewer mistakes, and produce something just as clear as before, while developing just as much understanding. I can ask, “What happens if you do a Kofuni expansion?”, and get an answer instantly. I can ask for illustrations or interactive visualizations and see them instantly. Arguably, we’re incredibly lucky to be alive at this moment, when these new tools have opened up this new territory to explore.
14.
And isn’t that what I wanted? Back in 2024, I bemoaned that what AI most seemed to struggle with was getting the facts straight:
Perhaps the old science fiction robots were a projection of our fantasies. I want my style and voice to be precious and uncopyable. I want an AI assistant that will tirelessly hunt down facts while I provide creativity and panache and magic. But that’s not how it is. So we should remember: In a scenario where AI is useful but humans retain some comparative advantage, we might not like where that comparative advantage lies.
At least with math, and at least for the moment, I get to be Kirk, while the AI is Spock. (Even with other types of writing, my impression is that since 2024, AI has improved more along Spock dimensions than along Kirk dimensions.) So that’s nice.
15.
In the last few months, it frequently happens that a collaborator will use AI to generate something, and then send it to me and ask me to check if it’s useful. I can see why this seems reasonable. (Really, I do.) But when it happens a lot, one can’t help but wonder what the point of the human collaborator is.
16.
On the other hand—with creative writing, my advice is not to use AI to write, at all. Ask questions if you want, but write every damned word yourself.3 With math, I don’t feel like such a hard line makes sense. It seems that creating something good still requires a lot of human involvement, to the point of agonizing over notation, repeatedly re-organizing things, and heavily editing individual sentences. Still, I find that if people make that effort, they can create something just as good as they could by hand, while still being perhaps 50% AI written.4
So I don’t mind if people send me “centaur math”, provided they take responsibility for the contents. The problem is that when working with AI, it takes constant paranoid vigilance to avoid letting things slip beyond your understanding. I often find myself wanting to awkwardly ask people, “OK, you obviously used AI to make this… which is OK… but how much of this do you vouch for? If we have a meeting to discuss it, will you crumble the moment I start asking questions?”
17.
When I’m in abstraction-creation mode, I feel like I’m doing something intelligent. When I yell at AI about bad notation and writing, I feel like I’m providing taste. But I often find myself giving feedback that seems incredibly basic. Things like: This is a mess, clean it up. Or: Do you need that assumption? Or: If you can’t solve this problem, why don’t you create a simpler version and try to solve it first?
On the one hand, I guess a lot of what good human managers do amounts to giving very basic feedback. On the other hand, it’s hard to imagine that I have much durable advantage in doing this kind of thing. So I wonder how much durable advantage I have in abstraction-making or taste, too.
18.
A common reaction to AI getting better at proofs is that humans need to focus more on exposition. This has an obvious Bourdieu-esque criticism: Human painters used to strongly value photo-realism, but after cameras were invented they convinced everyone that, oops, photo-realism isn’t important, what matters is expression, which coincidentally cameras can’t do. Isn’t a shift towards exposition in math just a way for humans to move the goalposts and justify their own continued relevance?
The only credible way I see to avoid that criticism seems to be to bite the bullet and say that, in fact, math should have already have focused more on exposition, even before AI. Personally, I strongly believe that this is true.
19.
I think the biggest reason I’m not more productive is: What’s the point? In the past, if you came up with an elegant proof, you’d tell yourself, “I made a thing! Other people will read and use my thing! I am advancing human progress.” You can still tell yourself that now. But you have to wonder, will anyone actually read your proof? Or will they just ask another AI to explain it to them? Will your proof help their AI explain it better? For how long? If you just waited a year, would some other AI produce that same proof independently?
Alternatively, if you’re a normal person, you might think that LLMs still struggle with basic arithmetic? ↩
AI progress is so fast, compared to society’s ability to adjust, that we may never actually see what “the current equilibrium” looks like. ↩
This essay, if you’re wondering, was created by writing every damned word myself and not asking AI anything. ↩
You could have a whole debate about what that percentage means. It’s not the number of words written by AI that really matters, in my opinion, so much as who is responsible for the overall structure of the ideas. ↩
Here’s a conjecture: If you put any significant amount of text on the internet under different names, those identities can be linked using only the text itself. This is possible (I conject) because of the statistical “fingerprint” you leave in everything you write.
Imagine a website where you can paste in some brand-new text someone just wrote. In return, the website provides links to all the text that writer has ever published under any name. It’s not perfect, but it’s pretty good. As far as I know, no such website exists—at least not on the public internet. But I suspect it’s possible and will soon become easy. This will pose some difficulty for pseudonymous blogging.
Note: I wrote most of this essay in mid-2025, after which I idiotically sat on it for a year tinkering with theorem statements that none of you will read.1 In the meantime, LLMs have gotten much better at guessing authors from text. (Given the first 1000 words of a draft of this post, Claude 4.8 knows it’s me.) Still, I think we’re just getting started. I expect to see increasingly obscure writers identified from increasingly small bits of text. I expect that this work even when people are writing in a different register or about unrelated subjects. And I expect that everything I’ve ever written under any pseudonym will soon be linked to my genuine-nym.2
A stronger conjecture is that we’re heading towards a sort of generalized pseudpocalypse. Perhaps, in the future, if you interact with the world through essentially any high-bandwidth channel, then you identify yourself. Say you wear a mask in public and only speak by sub-vocalizing into a voice changer. That’s fine, you’ll still be identified using your body shape, gait, or chemical signature. Or say you don’t like your car being tracked everywhere, so you stop carrying a phone and you somehow convince lawmakers to ban license plates. No problem, your car will still be tracked using tiny scratches or unique pinging sounds from the engine. Or say you don’t like being tracked on the internet, so you lock down your browser profile, buy stuff only with Monero, and connect through a chain of three VPNs. That’s OK. You’ll still be identified through how you wiggle your finger as you scroll down the page. We’re all just too unique, and the information theoretic limit is coming for us.
Starting bits
Let’s start from first principles. Imagine that at birth, everyone is assigned a random binary string. Whenever you post anything on the internet, you’re required to sign it with that string. If the strings are very short, like 0110, then lots of other people will have the same one as you. But if the strings are very long, then yours would almost certainly be unique and it would be trivial to link all your pseudonyms.
Where’s the transition point? If you only know that the author is currently alive and living somewhere in the Anglosphere, it’s around 29 bits. That’s because if there are K digits, then there are 2ᴷ possible binary strings, and if K = 28.86, then 2ᴷ ≈ 490,000,000 is the number of currently-alive Anglosphere-dwellers. If the strings have fewer than 29 bits, then someone else will probably share your string. If they have more than 29 bits, then your string is probably unique.
We don’t (yet?) have to sign the things we write with immutable government-issued strings. But the way you write still provides lots of clues about you by way of your tone, personality, word choice, and so on.
Theoretically speaking, I think it has to be possible to link the identities of anyone who writes enough. Imagine again that everyone is assigned a random binary string at birth, but instead of you needing to sign the stuff you write with your string, each time you write a word, there’s some chance that a random bit from your string is revealed and added as a signature to your message. For example, maybe a signature of bit[129]=1 is added, indicating that your string at position 129 has value 1.
Think of your string as representing all your writing style quirks, and a bit being revealed as representing when you write something that reveals a preference. For example, maybe bit 18 indicates if you prefer to write your em-dashes with hideous spaces — like this — or without spaces—like this. If you use an em-dash, that bit is revealed.
So imagine you’ve written a lot under Pseudonym A, enough that the full bit-string has been revealed. Maybe it’s this:
Now think about this from the perspective of an “attacker” who wants to know if A and B are the same person. Let’s assume they’ve only seen the above bits, and have no information about anyone else. Then here’s what the attacker knows:
A and B have revealed K overlapping bits, which all match.
Different people have a 50% chance of matching on any given revealed bit.
Non-different people have a 100% chance of matching on any given revealed bit.
There are 490,000,000 people.
Intuitively, if K was 5, then the fact that all bits match wouldn’t prove much, since with 490 million people, lots of people would match on those bits by chance. But if K was 70, it’s extremely unlikely that two different people would share all of them, even with such a gigantic pool to start with. It turns out that if there are N other people with random bits, and you pick K of your bits, the probability that someone exists who matches all of them is 1 - (1-2⁻ᴷ)ᴺ. When N is 490 million, that looks like this:
Look at that, 29 appears again. (Isn’t math wonderful?) In general, the transition happens around whatever number of bits K makes 2ᴷ ≈ N, namely K = log₂(N).
If you reveal significantly fewer than 29 bits under pseudonym B, then it’s almost guaranteed that there’s someone else out there who matches all of them. But if you reveal significantly more than 29 bits, then there’s almost no chance that anyone else exists who matches all of them. So the attacker essentially knows that A and B are the same person. And I stress again: They know that without needing to see anything from the other 490 million people.
Of course, we don’t literally leak bits of immutable feature strings as we write. But you can make the model more realistic, and the same issue persists. If you want to reflect that text only provides noisy information about the writer, then you can add noise to the bits before they’re revealed. If you want to reflect that some writing styles are more common than others, then you can make the distribution over bit strings non-uniform. If you want to reflect that certain quirks are more obvious than others, you can give different bits different probabilities of being revealed. All these make the math more complicated. But they don’t change the basic conclusion: If your writing style contains at least 29 bits of information, and you do enough writing, you’re done.
That’s my argument that pseudpocalypse is possible. But I don’t just want to claim that it could happen, eventually. I think it is likely to happen, soon, and that the amount of text you need to reveal isn’t very large. To make that argument, we need to get specific: What features do people have that are reflected in their writing? How many bits of information do those features contain? How accurately can those bits be guessed from written text?
Note: To avoid this turning into a giant information theory lecture, I’ll mostly use words like “bit” and “information” without being 100% fully precise about what they mean. I’m doing that because I expect that most people reading this aren’t definition-of-bit fetishists, and anyway being hyper-technical would obscure the big picture. If you’re an information theory enthusiast and/or skeptical that I know what I’m doing, I refer you to the Section For Skeptical Information Theory Enthusiasts, below. Until then, use your intuition and have faith.
Feature space
Say you knew nothing about me other than that I wrote the above words. And say you had to guess my age or religion or occupation. You could guess, right? It wouldn’t be perfect, but you’d do much better than you would without being able to read those words. Thus, somehow, those words contain information about my demographic characteristics. So I tried to make a list of similar things that you could plausibly guess from text at least somewhat better then chance. Here’s what I came up with:
Age
Education
Ethnicity
Family status
Income
Marital status
Mental health
Native language
Occupation
Physical health
Political leanings
Region
Religious affiliation
Sex
In the same spirit, if you only read the above words, could you guess how extroverted or conscientious I am? Again, not perfectly. (When I meet people who read this blog, they usually seem surprised I can survive direct sunlight.) But still, I’m sure you’d do OK. So, again, these words contain information about my personality.
What features does personality have? The HEXACO model lists six, namely honesty-humility, emotionality, extraversion, agreeableness, conscientiousness, and openness to experience. I suspect those can all be guessed with reasonable accuracy from a long-enough writing sample. But could you guess more? For each of those six factors, the HEXACO model lists four “facets”. In the abstract, trying to guess 6 × 4 = 24 different personality features from text sounds ludicrous, but just look at them:
Honesty-humility
Sincerity
Fairness
Greed avoidance
Modesty
Emotionality
Fearfulness
Anxiety
Dependence
Sentimentality
Extraversion
Social self-esteem
Social boldness
Sociability
Liveliness
Agreeableness
Forgivingness
Gentleness
Flexibility
Patience
Conscientiousness
Organization
Diligence
Perfectionism
Prudence
Openness to experience
Aesthetic appreciation
Inquisitiveness
Creativity
Unconventionality
If you think about specific people, I think you can convince yourself that these 24 represent real things, and that it’s plausible to guess them from text. (Your favorite existential angst + science blogger, for example, might score lower on “modesty” than the other honesty-humility facets.) The different sub-factors are surely correlated, but not perfectly correlated.
Of course, the biggest thing you learn from people’s writing is how they write. Do they tend to pointlessly split infinitives? Do they use hyphen-connected words? Do they, incorrectly, position their adverbial clauses?
The idea of attributing authorship using writing style features goes back to at least 1440, when Lorenzo Valla demonstrated that the Donation of Constantine—in which Emperor Constantine supposedly donated the Roman Empire to the Catholic Church—used a vernacular that came from 400 years after Constantine’s death and was therefore a forgery. In 1851, Augustus De Morgan observed that average word length tends to be stable for the same author. The first “modern” attempt seemingly came in 1964, when Mosteller and Wallace published Inference in an Authorship Problem:
This study [attempts] to solve the authorship question of The Federalist papers; […]
Word counts are the variables used for discrimination. Since the topic written about heavily influences the rate with which a word is used, care in selection of words is necessary. The filler words of the language such as an, of, and upon, and, more generally, articles, preposition, and conjunctions provide fairly stable rates, whereas more meaningful words like war, executive, and legislature do not.
After an investigation of the distribution of these counts, the authors execute an analysis […] based on Bayesian methods. The conclusions about the authorship problem are that Madison rather than Hamilton wrote all 12 of the disputed papers.
Get that? The idea is that your usage of the word war depends mostly on if you happen to be talking about war. But your usage of upon mostly depends mostly on how much you like the word upon. To demonstrate this, they took 48 papers written by Hamilton and 50 by Madison and made this table of how many times they used by, from, and to:
Madison liked by. Hamilton was more a to man. Using these kinds of statistics, they concluded that the disputed Federalist papers must have been written by Madison.
So I did some research looking for other writing style features that are believed to be stable when people write about different subjects. I found that there are a lot. There were so many that I struggle to even organize them into meaningful groups:
Known stable ratios (the/a, this/that, these/those, I/me/my)
Character N-grams (3-grams and 4-grams)
Word N-grams (often 3-grams)
Lexical features:
Vocabulary size
Lexical diversity / type-token ratio (Number of distinct words divided by number of words.)
Frequencies of rare words
Semantic density
Discourse marker positions, combinations (So, anyway, so anyway)
Use of abbreviations and acronyms
Preference for latinate vs. germanic words (Themajesticcreaturetraversedtheterrain vs. themightybeaststrodeacrosstheland.)
Syntactic features:
Syntactic complexity
Subordination index
Average parse tree depth
Use of passive voice.
Nominalization (She was shocked I ate the pizza vs. My pizza consumption shocked her)
Verb tense and aspect (I walk vs I walked vs I was walking vs I have walked)
Sentence structure preferences:
Branching preferences (Cursed everyone had a good time when Alice taught some cool dogs I met and brought to dinner to juggle vs. clumsy-but-readable I met some dogs and they were cool and I took them to dinner and Alice taught them to juggle and and everyone had a good time.)
Adverbial clause positioning (Suddenly I was hungry vs. I was, suddenly, hungry vs. I was hungry, suddenly)
Sentence-final weight (Your plan won’t work because of the dyslexic bears vs. Dyslexic bears mean your plan won’t work.)
Polysyndeton (I like dogs, cats, and ferrets vs. I like dogs and cats and ferrets.)
Repetition / breaking of syntactic structures.
Style features:
Register / formality.
Patterns in sentence length (long/short/long/short vs. long/long/short/short)
Stressed syllable interval preferences (e.g. iambic vs. trochaic)
Rule preference features:
Minor punctuation (I laughed—you cried vs. I laughed — you cried, “…” (three periods) vs. “…” an actual ellipsis)
Capitalization. (Job titles, seasons, after a colon, mistakes)
Apostrophes (Steve Jobs’ car vs Steve Jobs’s car, 1990’s vs 1990s)
Hyphenation (a highly-stable feature vs a highly stable feature)
Oxford commas.
Article omissions (Local dog was petted. vs. A local dog was petted.)
Relative pronoun omissions (the dog you petted vs. the dog that you petted)
Who vs. whom.
Split infinitives (To obsessively blog vs. to blog obsessively)
Idiosyncratic features:
Whitespace habits.
Spelling errors (loose instead of lose)
Grammar errors. (Between you and I)
Consistent, unique typos
Other consistent errors (repeated words, un-closed parentheses)
That’s a lot. There are surely more. And these are all “shallow” features that humans came up with using our tiny little brains. I strongly suspect that there are many more “deep” features that could be found by looking for statistical patterns in a sufficiently large dataset. Many of those features might not even have a coherent English-language description. But they’re still there, providing bits for those who seek them.
So we leak information about lots of different stuff when we write. But how much information? Is it possible to say how many words are needed to uniquely fingerprint someone?
No. To a first approximation, the answer is no. But to a second approximation, maybe? Within an order of magnitude? I’ll try, but it’s going to be hard.
Demographic bits
How many bits of identifying information does text provide by way of demographic features like age and sex and so on?
At first glance, this seems a perilous question, as it depends on the number of categories you consider those things to have. Take sex. For pseudpocalypse purposes, your opinion about how sex should be defined or how many sexes exist is irrelevant. Finer categorizations always provide more information, and our de-pseudonymizing attacker friends will use that information if they can. However, going beyond two categories for sex makes little difference, because the additional categories will be hard to guess and even if you could, categories with low prevalence don’t contribute much extra information.3 So, for us, two categories is the right answer.
And what about age? At first glance, converting age into a set of categories seems meaningless. If you code age by the millisecond, then there are 3.156 trillion categories for people born in the last 100 years. If you code age by the decade, there are only 10. Here, the thing to notice is that while you might be able to guess my decade of birth from how I write, you don’t have a snowball’s chance in hell of guessing the millisecond. (See what I did there? People born in certain decades are more likely to use expressions like snowball’s chance in hell?4) If we took age to have some crazy number of categories, we’d have to discount later to reflect the difficulty of guessing. My intuition is that it would be hard to guess age more accurately than around five years, so 20 categories seems reasonable.
Following this kind of logic, I chose a number of categories for each of the demographic variables, trying to hit the upper end of what could be guessed from text. (I’ll provide the actual categories below.)
Feature
Number of categories
Age
20
Education level
6
Ethnicity
6
Family status
2
Income
11
Marital status
3
Mental health
3
Native language
2
Occupation
23
Physical health
3
Political leanings
3
Region
23
Religious affiliation
3
Sex
2
If each of the age bins were equally likely, then knowing what bin someone fell into would provide 4.32 bits of information, because 2ᴷ ≈ 20 when K = 4.32. Doing that same calculation for each feature gives the maximum amount of information they could contain.
Feature
Number of categories
Maximum bits
Age
20
4.32
Education level
6
2.58
Ethnicity
6
2.58
Family status
2
1
Income
11
3.46
Marital status
3
1.58
Mental health
3
1.58
Native language
2
1
Occupation
23
4.52
Physical health
3
1.58
Political leanings
3
1.58
Region
23
4.52
Religious affiliation
3
1.58
Sex
2
1
Total
32.88
But there’s a problem. There are more people aged 30-35 than there are people aged 90-95. So, even if you could guess those age bins perfectly, they’d provide less than 4.32 bits of information on average. However, it turns out that categories need to get pretty damned uneven before information content drops very much. A perfectly balanced 50/50 distribution provides 1 bit of information, but if you switch to a 60/40 distribution, you still get 0.971 bits, and you need to go almost to 90/10 before information content drops to 0.5 bits.5 The same basic thing is true when there are more than two categories.6
So I went through all those features, rated them by how unevenly people are distributed, and tried to discount the bits accordingly. I’ve put the full details of what the original categories are and how I discounted them in a footnote.7
Feature
Number of categories
Maximum bits
Estimated bits
Age
20
4.32
3.9
Education level
6
2.58
2.1
Ethnicity
6
2.58
1.7
Family status
2
1
0.8
Income
11
3.46
2.5
Marital status
3
1.58
1.2
Mental health
3
1.58
0.9
Native language
2
1
0.6
Occupation
23
4.52
4.0
Physical health
3
1.58
1.3
Political leanings
3
1.58
1.5
Region
23
4.52
3.5
Religious affiliation
3
1.58
1.5
Sex
2
1
1
Total
32.88
26.5
But there’s another problem. Female 65 to 70 year-old Asians living in Scotland tend to have different {occupations, family statuses, religious affiliations} than 15 to 20 year-old Latinos living in Southeast Australia. That is, the above features are correlated. So as you look at more of them, they gradually become less surprising and thus contribute less information.
How much less? Answering that the right way would require us to estimate how likely someone is to fall into each of the 20 × 6 × 6 × 2 × 11 × 3 × 3 × 2 × 23 × 3 × 3 × 23 × 3 × 2 = 8,144,737,920 joint categories. That seems hard. But a not-completely-ridiculous approximation is that if a group of variables are all pairwise correlated at a level of ρ>0, then the total information might be reduced by a fraction of ρ.8
So how correlated are those features? In the social sciences, a correlation of 0.5 is considered quite high. That’s plausible for some pairs of variables, e.g. age vs. health or political leaning vs. religious affiliation. But many of those correlations are are probably quite weak, e.g. age vs. native language or region vs. sex vs. marital status.9
Overall, my guess is that correlations reduce the total information by at least 10% but I doubt they reduce it by more than 60%. So I’d think the total information in the above features (if you could guess the categories perfectly) is somewhere between 10.6 and 23.9 bits. Let’s take the average and call it 17.2 bits.
Personality bits
What about personality features? Let’s use the same same recipe we used for demographic features, but faster: To start, let’s give each of the 24 personality features five bins, in deference to dynomight personality notation. That would correspond to 24 × 2.32 = 55.68 bits total, because 2ᴷ ≈ 5 when K = 2.32.
Then we need to discount for correlations. The six main HEXACO personality factors are designed to be uncorrelated, but the different “facets” inside each factor are correlated (usually with a coefficient between 0.3 and 0.6). It seems reasonable to use an overall discount factor of 0.3 to reflect strong intra-factor correlations but weak inter-factor correlations. That suggests 39.0 bits overall.
Style bits
And what about writing style features? How much information do they contain?
This seems hard. Some of the features, like character n-grams are actually themselves long lists of features. (Frequency of typing aaa, frequency of typing aab, etc.) However, many of those features contain little information, since almost everyone types zqx around 0% of the time. And, of course, writing style features are correlated, since people who write realise instead of realize are less likely to put spaces around their em-dashes.
In absence of a better idea, I’m going to give one bit for each leaf node in the above list of style features. I think of this as giving each feature two bins, and then assuming that uneven distributions of features and correlations (which reduce information) are canceled out by the fact that many features deserve more than one bin and that there are probably more “deep” features that aren’t listed (which increase information). This gives us the suspiciously round number of 50.0 bits.
Guessing bits
If you believe the above numbers, then we have at least 17.2 + 39.0 + 50.0 = 106.2 bits of identifying information that we leave clues about when we write. That’s a lot. If you could see all those features, it would be enough to identify people even on a planet with 93 million trillion trillion people.
But to argue that the pseudpocalypse is nigh, it’s not enough to argue that those bits exist. We need to argue that they can and will be guessed from a relatively small amount of text.
So obviously we need to talk about nuclear weapons. In a nuclear detonation, many unstable atoms are created. These spontaneously decay into more-stable atoms, in the process emitting radiation. Some types of atoms are very eager to decay, meaning they release a lot of radiation but stop existing within a few weeks (iodine-131). Others are reluctant to decay, meaning they don’t release as much radiation but they stick around for decades (strontium-90). Others stick around for millions of years, but they produce so little radiation that they’re not a big problem (cesium-135).10 So, the residual radiation produced after a nuclear detonation is the sum of many different exponential curves, one for each isotope created during the detonation.
I suspect that identifying bits in text are sort of like that. Your level of formality and your average sentence length are revealed almost immediately. Your preference for latinate vs. germanic words takes a while to come through. And your social boldness and the fact that you live in Queensland rather than Southeast Australia are revealed very slowly, perhaps so slowly that it’s effectively not revealed at all.
Right. So if you start with 106.2 bits, how many of those do you reveal after writing a given number of words?
I will answer that question through the noble method of making up numbers. But first, let’s calibrate. You just read 4500 words written by me. How well could you guess my demographic and personality features? As a sanity check, I gave the above words to an LLM and asked it to guess. It did unnervingly well. It wasn’t always right, but it usually was, and it did a great job of rating the confidence of the individual predictions.
I don’t think there’s any magical explanation for this. The fact is, if you look at the individual personality and demographic features, guessing them just isn’t that hard. So I’m sure you could do just as well. And given enough time, I’m pretty sure you’d do even better for writing style features.
Even so, you’re probably bad at it. Take the example of GeoGuessr, where people guess a location in the world from a random photo. Random people are sort of OK, but if you pick the top natural talents and have them practice obsessively, they’re really good. I don’t think LLMs are particularly good at guessing features from text, either. They weren’t trained for it. It’s just an emergent property of their general intelligence. The information-theoretic limit is surely much higher.
So here’s a very rough cut: After 4500 words, I’d think it’s possible to guess around:
60% of the demographic features
70% of the personality features
80% writing style features
If we model each of those with a separate exponential, and start them at 17.2 / 39.0 / 50.0 bits, then the total number of identifying bits that remain hidden after writing a given number of words is as plotted here:11
Et voilà, pseudonymity is compromised when you leak 29 bits, which happens after 1071 words.
Seriously?
Of course not. The above figure stands on a creaking tower of tenuous assumptions. I’ve gone through the details of deriving that curve not because you should trust it, but because I think seeing the calculations makes the following points hard to argue with:
You have far more than 29 bits of identifying information that you leak into your writing.
Some of those bits take a long time to get revealed, but others are revealed pretty quickly.
There are enough “fast leaking bits” that you can be identified from a writing sample that’s “pretty small”.
I’ve made lots of debatable choices in terms of choosing features, assigning numbers of categories, estimating distributions across those categories, discounting for correlations, and guessing how many bins can be guessed. Those choices are all individually suspect. But the above points are supported by a pretty wide margin of error. You can make different choices, but it seems very hard to avoid concluding that the above three points are true.12
How would this work?
You might be wondering why I’m using so many made-up numbers. After all, there’s a whole field devoted to identifying authors from text, usually called “stylometry” or “authorship attribution”. They have research papers and competitions and all that. However, as best I can tell, state of the art published results look something like this:
Take 50 people.
Get a few hundred writing samples from each author, each 1000-2000 words long.
Now, take a new writing sample from one of those authors.
Do some standard machine learning stuff.
Hey look, the author can be identified with ~95% accuracy!
That sounds OK, but that’s only identifying people against a pool of ~50 authors. For my claim to be true, similar accuracy would have to be possible with 490 million people. That’s seven orders of magnitude more.
The thing is, the methods those papers are using are extremely weak. All the above math assumes that you’re operating at the “information-theoretic limit”, making perfect use of all available information. If you want to get close to that, we now have some idea how to do it: You apply the “modern” machine learning recipe of gigantic dataset + gigantic neural network + gigantic fortune spent on GPUs. My guess is that for us, that would require something on the order of “all the words ever written” + “tens of billions of parameters” + “tens of millions of dollars”. I couldn’t find a single paper that came remotely close to attempting that.
So I don’t think those papers tell us much, for the same reason that a 3rd-order Markov model trained on a few books doesn’t tell us much about how good computers could be at writing text. LLMs have shown that if you use the above recipe, then computers can get close to the information-theoretic limit for generating text.13 So, I suspect that an LLM-level effort could achieve the same thing for identifying authors.
You might also wonder: Why am I talking about this as some possible future technology? Isn’t that technology just LLMs?
I suspect the technology will be quite LLM-like in how it models human language. But current general-purpose LLMs aren’t trained for this task. They’re good at it “by accident”. So, just like specialized chess AIs can crush LLMs at chess, I suspect specialized stylometry methods could crush general-purpose LLMs at stylometry. It’s just that those specialized stylometry methods don’t seem to exist yet, or at least aren’t public.14 So we shouldn’t imagine that current LLMs are anything close to what’s possible, even if you assume that generic LLM progress stopped today.15
Countermeasures
If this is all true, what could be done about it?
The most obvious “countermeasure” would be to get used to it. I mean, imagine that we did live in a world in which everyone literally had to sign everything they wrote with a unique immutable string. What would happen? I’d expect a mixture of:
People become more comfortable with their “full selves” being public, with less compartmentalization.
People pull back from communicating in public channels, relying more on group chats and the like.
People self-censor.
There are strong historical analogies here, since over the past 20 years many governments and tech companies have in fact decreed that people must sign the things they write with their real names.
The effects seem to vary quite a lot based on the ambient culture and political system. Overall, my impression is that people are already much more comfortable with the idea that their work colleagues might read their dating profile or learn that they go to furry conventions. I’m optimistic that culture will continue to adapt to respect the fact that we all encompass multitudes. This seems healthy.
Some effects seem clearly positive. Self-censoring is not necessarily bad. For example, on the margin, real-names surely stop some teenagers from engaging in cyber-bullying. On the other hand, were you ever a teenager? I’m pretty sure that for anyone who is “different”, having those differences broadcast to the world creates a much larger “bullying surface area”. So the effects are mixed. And adults aren’t as different from teenagers as we might like to think.
Twenty years ago, I might have predicted that real names would discourage people from expressing controversial political ideas online. Superficially, that seems completely wrong. At least in the West, lots of people are very happy to express minority political views, and if you disagree at all, then you can go to hell. But I also tend to think this hides a lot of self-censorship, where most people don’t want engage in political mortal combat and so are cowed by a feisty minority. And, obviously, people in certain countries know that it’s unwise to criticize the Party. So, getting used to it seems like an imperfect solution at best.
Another countermeasure would be to not build this technology, or not make it widely available. In the short term, this seems plausible. As far as I can tell, it’s been possible for years for a modestly-funded group to build a phone app that would identify most people on the street from a photo. And yet, almost no one reading this has access to such an app. If general-purpose LLMs continue to get better at stylometry, it seems entirely possible that AI companies might decide it’s a safety issue and train their AIs to refuse to do it.16 This could work for a while.
But if the technology is possible, it seems certain that governments will build it and use it. They might try to keep it out of the hands of normal people. Certain governments might restrict their own use. My privacy-minded allies always seem very jaded, but it wouldn’t surprise me at all if the Supreme Court declared that a warrant was needed before the FBI could de-pseudonymize a U.S. citizen. But when/if that technology becomes sufficiently cheap, it seems like it would be very difficult to keep it out of the hands of normal people and/or bad actors. My guess is that it’s possible to create a program that’s a few hundred gigabytes large and can run (slowly) on most modern laptops. If that program is made public, it would be hard to put the genie back in the bottle.
There are also technological countermeasures. Most obviously, you could run your writing through a “filter” to try to remove identifying bits, e.g. by asking an LLM to rewrite it. It’s hard to be sure how well this would work, since we don’t have accurate estimates of how many bits you’re starting with or how many bits this would remove. But I’d guess this would be pretty effective if done carefully. The reason is that the number of identifying bits you leave in writing probably isn’t that large, relative to the number needed to identify you. If you “homogenize” your writing to remove all style and personality, you should be able to remove most of those bits. Theoretically, you’ll still leak some information. But I’d think this would substantially increase the amount you could write while remaining pseudonymous.17
But after thinking about it, this makes me sad. Effectively, this countermeasure would preserve pseudonymity by taking writing and destroying all traces of humanity. It seems like this would work well for the “bad” uses of pseudonymity, like cyber-bullying or coordinated violence, but it wouldn’t work at all for the “good” uses, like for example someone who likes to write pseudonymously because they feel like it allows them to be more honest and vulnerable and more fully themselves, damn it.
Generalized pseudpocalypse
Maybe this isn’t just true for writing. Maybe it’s just a feature of our universe that if you interact with the world in any significant way, then you leave traces that make it possible to identify you.
If you walk around in public, then you can likely be identified by your face, your gait, your voice, your DNA, your retinas, or your literal fingerprints.
Or say you use the internet. Even if you lock down your browser fingerprint and hide your IP address using a VPN or Tor, a sufficiently powerful adversary could still identify you by analyzing global packet flow.
Or say you use any phone or computer. You might be identified through keystroke dynamics or the way you jiggle your finger or mouse.
Say you buy food at the grocery store, but you pay with cash and somehow shop at a grocery store with no cameras. If you buy more than a handful of items, I’d bet you can still be identified through the patterns in the stuff you buy.
(Incidentally, did you ever notice that cash has serial numbers on it? And did you know that more and more ATMs are starting to track those numbers?)
Or say you don’t like your car being tracked, so you stop carrying a phone and somehow get lawmakers to outlaw license plates. Still, your car surely has a few small unique scratches, and the engine probably doesn’t sound exactly the same as other cars, even from the same model and year. So if there’s any high-resolution video or audio, that’s still enough to track you.
Say you plug your headphones into a charging station at the airport. Your headphones have eccentricities in their analog charging circuits. If someone really wanted to, they could track that.
Or say you use electricity. Given high-resolution power-usage data, what can be said about how many people live with you? And what devices you’re using? Probably a lot?
Or say you use a toilet. Many places already test sewage and know, at a population level, what drugs people are using and how prevalent various diseases are. Imagine this was upgraded to test many places in the system, with high temporal resolution, possibly correlated with flow measurements from individual houses. That would be exciting.
Or say you are a country and you have submarines. Can they be detected by adversaries using distributed acoustic sensing? What about satellite-based synthetic aperture radar? Gravity Gradiometers? Quantum magnetometry?
As far as I can tell, the general trend is that without countermeasures, almost everything can be identified. Countermeasures can make it harder, but they’re costly, and on the whole, the arms race seems to favor the identifier, not the person who doesn’t want to be identified.
I stress: This is not all bad. The goodness / badness of a generalized pseudpocalypse depends on how society is structured. After all, the foundation of civilization is finding ways for people to make deals, and arguably less privacy makes that easier. The degree that we live in a vulnerable world where it’s easy to create civilization-destroying technologies, perhaps we’re very lucky to find ourselves in a non-private world. Still, I do worry that privacy has long provided a kind of “slack” from laws and norms. Historically, that slack has limited the power of institutions to enforce their rules. If privacy is going away, we need to think about how to preserve slack, particularly when institutions don’t want to.
Appendix: Section for skeptical information theory enthusiasts
Above, I tried to estimate the number of bits of identifying information in writing. But what is a “bit”? In general, if x is a discrete random variable, then the Shannon entropy of x in bits is H(x) = ∑ₓ p(x) log₂(1/p(x)), where the sum is over all the values x can take. This is always bounded between zero and the logarithm of the number of values x can take.
That’s fine, but “writing style” is not a discrete variable with a discrete number of categories. So how can I estimate the entropy of writing style? The short answer is that I can’t. What I’ve actually estimated above is the mutual information between writing and writing style.
Let s be a random variable representing writing style. Think of this as some sort of high dimensional continuous vector representing all the quirks of how different people write. And let x be a writing sample of some length. This is discrete because we can represent writing on digital computers. Then what I’ve estimated above is the mutual information I(x;s) = H(x) - H(x|s), where H(x|s) is the conditional entropy of x given s. This can be measured in bits because both H(x) and H(x|s) can be measured in bits. So that’s what my estimate above really says: I(x;s) ≈ 106.2 bits.
Now, you still might be skeptical. Above, I’ve implicitly assumed something like the following was true:
It’s possible to identify one person out of N possibilities with low accuracy if and only if the mutual information between identifying features and writing is at least log₂(N) bits.
That’s how I justified pseudonymity being compromised around 29 bits. But is it really true? Strictly speaking, no. Actually, even more strictly speaking, it’s “not even untrue” because it’s not precise enough to be true or false. But as far as I can tell, basically any precise version of that statement is false. However, it’s possible to find versions of that statement that are true, provided you add some extra not-too-crazy assumptions.
To start, let’s consider an extremely simple model of information leakage.
Theorem. Suppose the world consists of you plus N other people, and suppose each person has a binary identity string, drawn at uniform from the distribution over M-bit binary strings. All these strings are known to the attacker. Suppose you pick some subset of K bits and reveal them. Then the probability that this identifies you is
(1-2⁻ᴷ)ᴺ.
Furthermore, in order to hold the probability of being identified below
(1-1/N)ᴺ ≈ exp(-1) ≈ 36.7%,
it is necessary that K ≤ log₂(N).
Proof. The probability that all K observed features collide with any random person in the crowd is 2⁻ᴷ. Thus, the probability of no collisions after checking the crowd of N people (meaning you are the only one matching the observed features) is (1-2⁻ᴷ)ᴺ. □
That’s simple. But it’s not realistic at all, since it assumes that people have immutable binary strings that they leak into their writing. Can we make it more realistic?
Well, there is a simple lower bound. That is, we can say in general that if the mutual information is significantly less than log₂(N), then it’s not possible to reliably identify someone.
Theorem. Suppose N random people are selected and their full writing style features are made public. One person from that group is chosen and produces a writing sample. Then, the attacker must guess who produced it. The average success rate of the attacker (averaged over the random pool, the random choice of author, and the random writing sample) is at most (I(x;s)+1)/log₂(N).
Proof. Let S=(s₁, s₂, s₃, …) be the pool of N styles and let n be a random variable indicating which person was chosen. Fano’s inequality says that the highest possible success rate is bounded by the conditional mutual information between the writing sample x and the identity n, conditioning on the pool of writing styles, i.e. the probability of success is at most
(I(x;n|S)+1)/log₂(N).
However, we can bound that conditional mutual information as
The first inequality is standard. The second step uses the fact that given n, the writing x is conditionally independent of all styles except the chosen writer. The third step uses the fact that n is conditionally independent of x given sₙ. The last step uses that (x,sₙ) is distributed as (x,s). Substituting this bound gives the claimed result. □
So, if mutual information is much less than log₂(N), reliable identification is impossible, even if the attacker knows all the style vectors perfectly. So, provided you don’t leak that many bits, you’re definitely safe.
But is the converse true? Does leaking more than log₂(N) bits always identify you? The general answer is no. The basic problem is that I(x;s) is the average information that an average person leaks in an average writing sample. Without further assumptions, you can construct scenarios where some rare people and writing samples contain gigantic amounts of information, but most people usually leak nothing. That would mean that the attacker is very certain in some cases but usually learns nothing.
So, to get a guarantee that identification is actually possible, you need to make some kind of additional assumption that the information leakage rate doesn’t vary too much between different writers or between different things they write.
Suppose that p(x,s) is the joint distribution over writing styles s and writing samples x. Let’s suppose that the attacker knows the true style vector ŝ for some person. Then, they will be given a writing sample x that either came from that person or came from a randomly chosen person, and must decide which. Formally, the attacker’s goal is to guess if x was sampled from the writing distribution for that person, p(x|ŝ) or from the population marginal p(x). Intuition suggests that the attacker’s best strategy will be to look at the ratio
p(x|ŝ)/p(x),
and “accept” x as coming from ŝ if above some threshold, and reject it otherwise. In fact, the Neyman-Pearson lemma guarantees that this is the optimal strategy, in a very strong sense: That ratio contains all the information that’s useful for making that decision.
Now here’s something interesting: Instead of looking at the ratio, the attacker could look at the logarithm of the ratio. It makes no difference since it’s monotonic. But if you take the logarithm of that ratio, and take the expectation over people and over texts, what do you get? Well:
It’s the mutual information! So, intuitively, the mutual information is how much an attacker learns about the style of the writer “on average”, where that average is over both writers and text.
The following theorem will look at the average information in text for a writer with a particular style. I’ll define this as
D(s) = KL(p(X|s) || p(X)).
Intuitively, this is how different the writing of someone with style s is from the population average. That’s because if you take the average of this value over different styles, you get the mutual information. That is, I(x;s) = 𝔼[D(s)].18
Theorem (informal). Suppose that the attacker will observe some text and wishes to classify it as either coming from a writer with specific known style ŝ, or coming from someone with a random style. Suppose that the attacker is only willing to tolerate some small risk ε of a false positive. Provided that D(ŝ) is significantly larger than -ln(ε), the attacker can achieve that, while also keeping the risk of false negatives very low, provided that the variance of how much information is revealed in a random writing sample is bounded.
Theorem. Let D(ŝ) = KL(p(X|ŝ) || p(X)) to be the divergence between the target’s writing distribution and the marginal distribution. Also, define qₜ(x) ∝ p(x|ŝ)ᵗ p(x)¹⁻ᵗ to be the family that interpolates between those two distributions. To formalize the idea that “information leakage” for ŝ doesn’t vary that much, we assume that some constant V exists such that for 0 < t < 1, the variance of log(p(x|ŝ)/p(x)) under qₜ is bounded by V.
Then for any ε satisfying exp(-D) < ε < exp(-D + ½ V), it is possible for the attacker to simultaneously achieve a false positive rate of FPR ≤ ε and a false negative rate of FNR ≤ exp( - ½ (D+ ln ε)² / V). This false positive rate reflects the mistake rate provided the writing sample x came from a randomly chosen other person, while the false negative rate reflects the mistake rate provided the writing sample x actually came from the person with style ŝ.
Proof sketch. Let f be the distribution of l(x) = log(p(x|ŝ)/p(x)) with respect to p(x|ŝ) and let g be the distribution of l(x) with respect to p(x). The stated variance assumption implies a quadratic bound K(u) ≤ D u +½ V u^2 for -1 < u < 0, where K is the cumulant generating function of f. Observe that g is an exponential tilting of f. The attacker’s strategy must be to “accept” x as coming from ŝ if l is above some threshold c and “reject” it otherwise. Use K in a Chernoff bound on the probability l is less than c under f to upper-bound FNR ≤ exp( - ½ (D-c)²/V). Now, using that g(l) = exp(-l) f(l), again use K in a Chernoff bound on the probability l exceeds c under g to upper-bound FPR ≤ exp( -c - ½ (D-c)²/V). Both of these bounds are simultaneously valid when D-V < c < D. Setting c to make the false-positive bound equal to ε gives FPR ≤ ε and FNR ≤ exp( -½ (V - √(V² - 2V(D + ln ε)))²/V). The latter can be relaxed into the stated result using that √(1-x) ≤1-x/2 for 0 ≤ x ≤ 1. □
Now, if we suppose that the attacker wants to find a particular person, with a particular known style s. And suppose that the attacker has a pool of N people and will see one writing sample from each, but wants to limit the total probability of a false positive to δ after seeing one sample from each person. Then, they will need that
(1-ε)ᴺ ≈ exp(-εN) = (1-δ),
which is satisfied by ε ≈ δ/N. Substituting this into the previous result says that the attacker can hold the total risk of a false positive to δ while achieving a false-negative risk of
FNR ≤ exp( - ½ (D(s) + ln δ - ln N)² / V).
These results use natural logarithms because the math is easier if you measure information in nats. If you measure information in bits then you would get log₂ δ and log₂ N. (Rescaling D and V appropriately.)
So, again, as long as the average information for user s is significantly larger than log₂ N, the attacker can identify that user with minimal risk of false positives.
Some writers might leak more information (higher D(s)) and some writers might leak less information (lower D(s)). But remember, I(x;s)=𝔼 D(s). So as long as information leakage doesn’t vary too much between people, and assuming that I(x;s) is much larger than log₂ N (and assuming that variance condition), almost everyone can be identified.
Editor’s note: After this sentence was written, many additional hours were devoted to further idiotic tinkering. ↩
A standard binary variable that is 0 or 1 with 50% probability conveys 1 bit of information, while a variable that is 0 / 1 / 2 with probability 49.8% / 49.8% / 0.4% conveys 1.0336 bits. ↩
People born in certain decades are also presumably more likely to employ see what I did there gambits. ↩
For example, here is the information content for seven different “bent coins”:
Age: It’s hard for me to imagine you could guess age from text with accuracy higher than 5 years. If you assume an age between 0 and 100, that would be 20 categories and log2(20)=4.32 bits. These are mildly non-uniform so I’ll reduce to 3.9.
Education: I’m assuming 6 categories: less than high school, high school, some college, finished college, master’s degree, doctorate. That would be log2(6)=2.58 bits, but fairly uneven, so I’ll reduce by 20% to reflect that.
Ethnicity: Assuming 62% white, 11% black, 16% latino, 6% asian, 1.5% indigenous, 3.5% mixed/other, and actually using the entropy formula.
Family status: I’m using two categories: Children / no children, on the logic that guessing the number of children would be very hard. These are mildly non-uniform, so I’ll drop to 0.8 bits. You could have a third category for having children that are grown and that had left home, but this would be heavily redundant with age.
Income: The US census gives 11 income brackets. That seems as good a way of discretizing as anything. That would be log2(11) = 3.459 bits, but these are again moderately non-uniform, so I’ll reduce to 2.5.
Marital status: I’m taking 3 categories (single, married, divorced / widowed / etc). That would be log2(3)=1.58 bits at maximum, but again these are somewhat non-uniform, so I dropped that to 1.2.
Mental health: I’m using 3 categories: “Healthy”, “chronic condition”, and “severe issues”. Assuming 73% healthy 25% chronic condition, 2% “severe issues”, and using the entropy formula gives 0.9 bits.
Native language: I’m using 2 categories, namely “English native”, and “non-English native”. These are pretty uneven inside the Anglosphere, so I’ll drop from 1 bit to 0.6 bits.
Occupation. The BLS classification gives 23 major groups. That would be log2(23)=4.523 bits, but it’s moderately non-uniform, so I’ll reduce to 4 bits.
Physical health: Assuming 60% “healthy” 30% “chronic condition” 10% “severe issues” and using the entropy formula.
Political leanings: I’m using three categories (left, center, right). These are fairly uniform so I’m using 1.58 bits.
Region: I asked an LLM to divide the Anglosphere up into a number of regions with reasonable granularity. With some tinkering, it gave 23 regions: South East England, South West England, Midlands, Northern England, Scotland, Wales, Republic of Ireland, Northern Ireland, Quebec, Ontario, Western Canada, Atlantic Canada, Northeast US, Southern US, Midwest US, Western US, Alaska, Hawaii, Southeast Australia, Western Australia, Queensland, Central & Southern Australia, New Zealand. With LLM-generated population estimates (which looked reasonable) and plugging into the entropy formula, this gave 3.5481 bits.
#
Region
Pop (M)
pi (Pop/Total)
log2(pi)
pilog2(pi)
1
South East England
20.0
0.04062
-4.617
-0.1875
2
South West England
6.0
0.01219
-6.353
-0.0774
3
Midlands
11.0
0.02234
-5.485
-0.1225
4
Northern England
20.0
0.04062
-4.617
-0.1875
5
Scotland
5.5
0.01117
-6.484
-0.0724
6
Wales
3.0
0.00609
-7.359
-0.0448
7
Republic of Ireland
5.0
0.01015
-6.626
-0.0673
8
Northern Ireland
2.0
0.00406
-7.949
-0.0323
9
Quebec
9.0
0.01828
-5.774
-0.1055
10
Ontario
16.0
0.03250
-4.943
-0.1606
11
Western Canada
13.0
0.02640
-5.247
-0.1385
12
Atlantic Canada
2.5
0.00508
-7.625
-0.0387
13
Northeast US
56.0
0.11373
-3.136
-0.3568
14
Southern US
130.0
0.26401
-1.922
-0.5074
15
Midwest US
69.0
0.14013
-2.836
-0.3973
16
Western US
80.0
0.16247
-2.624
-0.4264
17
Alaska
0.7
0.00142
-9.467
-0.0134
18
Hawaii
1.4
0.00284
-8.790
-0.0249
19
Southeast Australia
16.0
0.03250
-4.943
-0.1606
20
Western Australia
3.0
0.00609
-7.359
-0.0448
21
Queensland
5.5
0.01117
-6.484
-0.0724
22
Central & Southern Australia
2.5
0.00508
-7.625
-0.0387
23
New Zealand
5.3
0.01076
-6.539
-0.0703
Sum of pilog2(pi)
-3.5481
Religious affiliation: 3 categories (christian, other religion, atheist / agnostic). These are uniform-ish.
Consider a set of binary random variables, each of which is equally likely to be 0 and 1, yet all are correlated with a pairwise correlation coefficient of ρ. There are many distributions that satisfy this condition, but a natural choice is an Ising model. If there are many variables, then the entropy per-variable in an Ising model with pairwise correlations of ρ tends to h((1+√ρ)/2), where h is the binary entropy function. We can print out those numbers:
ρ
h((1+√ρ)/2)
0.0000
1.00000000
0.1000
0.92661216
0.2000
0.85048963
0.3000
0.77121926
0.4000
0.68826012
0.5000
0.60087604
0.6000
0.50801160
0.7000
0.40803633
0.8000
0.29811751
0.9000
0.17212786
1.0000
0.00000000
As you can see, the entropy per-variable is always a bit more than 1-ρ. But the Ising model is optimistic, in the sense that it has the highest entropy of all distributions meeting the given conditions. So, screw it, let’s estimate the entropy per-variable to just be 1-ρ. ↩
If it means anything to you, I asked Kimi 2.6 to hallucinate some numbers:
It’s more complicated than this, because some atoms (e.g. strontium-90) emit more energy per decay than others. And some types of radiation are more harmful to human life than others. ↩
In general, if you want an exponential curve f(n) that starts at 1 for n=0 and decays to 1-X for n=N, you should choose f(n) = exp(n × ln(1-X) / N). So for demographic features we’re using X=0.6 and N = 4500, meaning f(n) = exp(-0.00020362 × n). For personality features, we’re using X=0.7, meaning f(n) = exp(-0.00026755 × n), and for writing style features, we’re using X = 0.8, meaning f(n) = exp(-0.000357653 × n). So the total number of bits remaining hidden is 17.2 × exp(-0.00020362 × n) + 39.0 × exp(-0.00026755 × n) + 50.0 × exp(-0.000357653 × n). ↩
OK, what’s the most likely reason I might be wrong? Above, I used math to estimate the information in features, and then I basically made up numbers for how much of that information can be guessed from text. Even so, my greatest concern is that the first part. I’m a bit worried that I might be overestimating the amount of information in the features themselves due to inadequately discounting for correlations. For one thing, there are probably correlations between feature groups. (For example, I’d bet that people who are high in perfectionism are less likely to use lose and loose interchangeably, and that people who live in Northern England are more likely to use the character string colour than people who live in Hawaii.) Also, my crude method of discounting information by ρ due to pairwise correlations of ρ might not discount enough: I used an estimate based on an Ising model, which is the maximum-entropy (highest information) distribution given the correlation constraints. I haven’t been able to figure out how much lower the information could be in the worst-case. ↩
People debate if this is true for “intelligence”, but it’s definitely true in terms of bit-rate. ↩
Also, arguably, stylometry is about language. This means that large language models probably have much of what they need baked in. That might explain why they’re pretty good at it just “by accident”. But to do this optimally I think they’d need self-reflection (e.g. access to probabilities of text given different contexts) that current LLMs aren’t typically capable of, and wouldn’t know how to manipulate correctly without task-specific training. ↩
You could conjecture that near-optimal stylometry abilities are some kind of “emergent property”. But the general lesson so far is that LLMs mostly don’t have emergent properties but are just good at what they’re trained at. (Edit: I withdraw this sentence!) ↩
(Meta-joke about you—person who works at an AI company—thinking, “maybe we should do that”, coming to this footnote, and seeing this meta-joke.) ↩
Instead of “homogenizing” writing by imposing a generic style, perhaps it would be better to “camouflage” it by enforcing a very strong but random style. ↩
Be a little careful here: Typically, the KL-divergence is understood to be measured in nats. But in this article, I’ve measured mutual information in bits. That’s fine, but you need to convert. For example, 106.2 bits = 73.60 nats. ↩
If you read anything about health or longevity, you’ll soon find yourself in a world of hazard ratios. Some study might say that eating more fiber might change your risk of dying by a factor of HR = 0.90. Another might say that occasional smoking might change it by HR = 1.30.
But how much should you care about that? Is HR = 0.90 or HR = 1.30 a lot? What if you don’t want to eat more fiber? What if you like smoking?
Instead of staring at a ratio1, a more sensible thing to do is think about life expectancy.2 But is it possible to convert a hazard ratio to a change in life expectancy? You might reason as follows: Baseline life expectancy is around 75 years. And HR = 0.90 corresponds to a 10% decrease in mortality. So perhaps that hazard ratio corresponds to something like 7.5 extra years of life expectancy?
Unfortunately, that’s completely wrong. To see why, imagine that humans only die by playing Russian roulette. They start playing this once per day at the age of 75, with a revolver containing two bullets and six chambers. If you were to remove one of those two bullets, that would drop the person’s risk of death by HR = 0.5. (One bullet versus two.) But life expectancy would barely change, because even with just one bullet, almost nobody would survive for any significant amount of time past 75.
For contrast, imagine again that humans only die via Russian roulette, but now they do this once per day from birth with a revolver with 2 bullets and 54,786 chambers. (Newborns emerge and instinctively reach for this gigantic gun.) You can show that these people also live 75 years on average. But now, if you remove one of the bullets, life expectancy doubles, because when someone is spared, it takes a long time before they get unlucky again.3
Neither of those is a good model for humans. We’re somewhere between the two, with heart disease and so on instead of revolvers and risks slowly rising as we age instead of suddenly starting at age 75 or staying constant throughout life. But you get the point: If you want to convert a hazard ratio for some intervention to a change in life expectancy, the impact depends on how “spread out” baseline mortality risk is over time. Baseline life expectancy is simply not enough information.
That’s one problem. Here’s another: What even is a hazard ratio? The technical definition is something like:
The hazard ratio at a given time is the rate of an event in the treatment group divided by the rate of that event in the control group.
Hazard ratios are often confused with their more beloved siblings, relative risks. Say you run a trial for 10 years and at the end, 10% of the control group died and 8% of the treatment group. Then the relative risk is RR = 0.8, nice and simple. But relative risks have problems, most notably that if you run a long enough trial, then no one will be alive at the end no matter the intervention, meaning RR = 1.0. That’s not helpful. Intuitively, you can think of the hazard ratio at age 40 as sort of like the relative risk for people between the ages of 39.99 and 40.01.
In real life, interventions have different hazard ratios at different ages. Chemotherapy tends to have better results in younger patients who are more able to endure the side-effects. Having a slightly higher BMI (25-30 rather than 20-25) is associated with an increased risk of mortality in young people, but a decreased risk in the elderly. You may remember from 2020 that COVID’s mortality risk had a different age curve than baseline mortality, meaning the hazard ratio of getting COVID was different at different ages.
This is important, because hazard ratios at different ages have different impacts on life expectancy. A hazard ratio of 0.9 at age 80 prevents more deaths than at age 20, because baseline mortality is higher at 80. But at the same time, if you save the life of a 20 year-old, they have more years in front of them. Beyond that, the hazard ratios at different ages interact: If some intervention decreases mortality at younger ages, that allows more people to reach older ages, increasing how much hazard ratios matter at older ages.4
If we knew the hazard ratio at all ages, we could account for those dynamics. But we don’t, because when estimating hazard ratios, people almost always assume that the hazard ratio is constant.5 We’re quasi-forced to do this because there’s not enough data to estimate a whole time-series of ratios. That’s why papers contain single numbers like HR = 0.90.
So even though Intervention A (say, more fiber) and Intervention B (say, light jogging) might have the same hazard ratio in a paper, those numbers could be the product of different underlying age-dependent effects, meaning those interventions could conceivably lead to vastly different changes in life expectancy.
So is this all hopeless? Are single hazard ratio numbers just too far removed from what we care about to tell us anything meaningful?
Surprisingly, no. It’s mostly OK. If we were a different species, it might be hopeless. But for modern humans in rich countries, mortality happens to be distributed in a way that produces a sort of lucky coincidence: When people estimate constant hazard ratio numbers, they’re implicitly sorta-kinda taking a weighted average of hazard ratios at different ages. And those weights happen to (sorta-kinda) reflect how much changes in mortality at different ages change.
So, I will argue, even if the true intervention has a varying effect, it’s sorta-mostly OK to just take a hazard ratio from a paper and convert it to a change in life expectancy using this curve:
If a paper showed that eating more fiber produces a hazard ratio of HR = 0.75, that corresponds to an increase of around 3.7 years. If a paper says that occasional smoking produces a hazard ratio of HR = 1.25, that corresponds to a decrease of around 2.9 years.
This isn’t exact. If the intervention is better (or less bad) for older people this will tends to overestimate the increase (or underestimate the decrease) in life expectancy. If the intervention is worse (or less good) for older people, it will tend to underestimate the increase (or overestimate the decrease) in life expectancy. But as long as the hazard ratio doesn’t vary too much by age, it’s probably not off by more than around 30% in either direction.
The easy case
Say there’s some intervention (eating more fiber or whatever) that multiplies your risk of dying at age t by a factor of HR(t). Then it can be shown that this changes life expectancy by approximately
ΔL ≈ ∑ₜ ΔHR(t) × P(t) × L(t).
Here, P(t) is the baseline probability of dying at age t. For males in the United States, it looks like this:
Meanwhile, L(t) is conditional life expectancy at age t. That’s the average number of additional years left for someone who reaches age t. For males in the United States, it looks like this:
Finally, ΔHR(t) is the decrease in hazard at age t. You can think of that as just ΔHR(t) = 1 - HR(t). Though if you’re OK with logarithms, there’s a somewhat better approximation that uses logarithms, which I’ve quarantined in a footnote.6
Let’s start with the easy case. What if your intervention has the same effect on mortality at all ages, so HR(t)=HR is just a constant? Then, the above equation simplifies into
ΔL ≈ ΔHR × L̄,
where
L̄ = ∑ₜ P(t) × L(t).
This makes sense! Again, P(t) is the baseline probability of dying at age t and L(t) is conditional life expectancy at age t. These are constant, so when you add them up, L̄ is just a number. For males in the United States, it happens to be 12.93 years. This quantity has a specific meaning: The average remaining life expectancy for US males when they die. That sounds a bit odd, but think of picking a random death and asking how many additional years people who reach that age live on average. That number is 12.93 years.
So, if an intervention has a constant hazard ratio, the mean change in life expectancy for US males is just
ΔL ≈ ΔHR × 12.93 years.
Now we’re getting somewhere! If you prevent a fraction ΔHR of deaths, then you increase life expectancy by ΔHR times 12.93 years.
Now remember the naive calculation we started with: Life expectancy for US males is 75.8 years. You might hope that if eating more fiber drops your risk of death by 10%, that would save 7.58 years. Sadly, the above equation says that a 10% drop in risk only increases life expectancy by around 1.293 years—only 0.17 times as much.
This is essentially the observation Keyfitz made in his 1977 paper, “What Difference Would It Make if Cancer Were Eradicated?” Cancer is responsible for 18 percent of deaths, so does that mean eradicating it would increase lifespan by 18 percent, or around 13.6 years? Nope, Keyfitz says, it’s only 2.3 years.
If a cure for cancer were discovered and made available today, 350,000 cancer deaths would be avoided in the next year. The overall death rate would be lower by nearly 18 percent. If the cure were quick and inexpensive, a large fraction of the country’s hospital beds and medical personnel would be released for treatment of other ailments. Patients would be spared untold suffering. Such an implicit analysis underlies government proposals for eradication of cancer. The argument is sound for first effects on mortality but wholly misleading for the long term.
The first effects would soon be offset by more mortality from diseases other than cancer. As a result of the cancer cures, the population would include a higher proportion of people subject to other causes of death. […]
At the extreme, it might be said that everyone dies of something sooner or later, so that, when the effects of the eradication of cancer had shaken down, the same number of deaths would occur as before, and the only benefit would be the substitution of heart and other diseases for cancer. A cure for cancer would only have the effect of giving people the opportunity to die of heart disease.
Cheerful stuff! We can also write our approximation in terms of baseline life expectancy as
ΔL ≈ ΔHR × 0.17 × 75.8 years,
which makes explicit that 12.93 years is only 0.17 times as large as a naive estimate using baseline life expectancy. The discount factor of 0.17 is sometimes called the “Keyfitz entropy”. You can think of it as measuring how close some population is to playing Russian roulette with 2 bullets in 6 chambers starting at age 75 (a discount factor of just above 0) and playing Russian roulette from birth with 2 bullets and 54,786 chambers (a discount factor of 1.0). It’s typically around 0.15 in rich countries today, though it was historically much higher.
Keyfitz entropy is also much higher in other species like mice (perhaps 0.45). You could argue that this explains why nothing that increases lifespan in mice ever translates to humans. Say caloric restriction or whatever produced the same constant hazard ratio in mice and humans. Then it’s mathematically guaranteed that the percentage increase in life expectancy will be three times smaller in humans, because Keyfitz entropy is three times smaller in humans. It’s harder to increase life expectancy when the baseline mortality distribution is more compressed.7
But that’s all assuming the hazard ratio is the same at all ages. Which it surely isn’t.
The interesting case
Here again is our equation for the change in life expectancy in response to taking some action that changes the risk of mortality at age t by a factor of HR(t):
ΔL ≈ ∑ₜ ΔHR(t) × P(t) × L(t),
Basically, for each age t, we multiply together three numbers:
ΔHR(t) is the decrease in the chance of dying at age t as a result of whatever intervention you’ve made (e.g. eating more fiber). This reflects that larger decreases in risk lead to larger increases in life expectancy.
P(t) is the baseline probability of dying at age t. This reflects that the hazard ratio is a ratio, so you prevent more deaths when you apply that ratio to ages where the baseline rate is higher.
L(t) is conditional life expectancy at age t. This reflects that you miss out on more years of life if you die when you’re young.
Now notice: The impact of a change ΔHR(t) at age t is the product of the baseline risk of death P(t) and remaining life expectancy L(t). So what really matters is their product, P(t) × L(t):
This shows how sensitive life expectancy is to changes in hazard ratios at different ages. It would be nice if this were constant. Then, the shape of HR(t) wouldn’t matter at all, only the average value. That’s not quite true, but it’s not terribly far from being true.
An equivalent way of writing our equation for the change in life expectancy is
ΔL ≈ avg(ΔHR) × L̄,
where L̄ is still mean “life expectancy at death” (12.93 years for US males) and avg(ΔHR) is the average change in hazard, weighted by the P(t) × L(t) sensitivity curve at different ages.8 While that sensitivity curve isn’t constant, it’s not too curvy, either. Intuitively, it gives a lot of weight to ages between 50 and 90, somewhat less weight to ages between 20 and 50, and little weight to other ages.9
So that’s not too bad. But let’s remember our original problem: You see some number like HR = 0.90 in a paper, and you want to convert it to a change in life expectancy. If the true underlying hazard ratio were constant, then there’s no problem. But if it’s not constant, then what does that HR = 0.90 number even mean?
Numbers in papers
Unfortunately, you almost never get to see the underlying time-dependent HR(t), because there’s almost never enough data to estimate it. So it’s almost never possible to compute the weighted average avg(ΔHR). In reality what you have is probably a single number in a paper. Let’s call that number est(HR). The obvious thing to do would be to plug the change into the above equation in place of avg(ΔHR) and approximate the change in life expectancy as
ΔL ≈ est(ΔHR) × L̄.
Again, you can just think of est(ΔHR) = 1-est(HR) as being the estimated reduction in hazard. Although, again, I’d prefer you use logarithms if you’re OK with logarithms.10 So the question is: Will that be accurate? How close are est(ΔHR) and avg(ΔHR)?
Well, how do people actually estimate those scalar hazard ratio numbers in papers? Somehow, they’re aggregating together information about hazards at different ages into a single number. But how? Well, it’s complicated. But if there’s a lot of data, you can show that the estimated scalar hazard ratio is approximately11
est(HR) ≈ Πₜ HR(t)ᵖ⁽ᵗ⁾.
(Pardon the hideous typsetting.) That is, the estimated hazard ratio is the geometric average of age-dependent hazard ratios, weighted by the probability of dying at each age. It follows12 that the estimated change in hazard is approximately
est(ΔHR) ≈ ∑ₜ P(t) ΔHR(t).
So ideally, we’d estimate life expectancy using avg(ΔHR), which averages the changes ΔHR(t) based on the weights P(t) × L(t). But we can’t do that, because we don’t have access to the ΔHR(t) numbers. What we can do is read a hazard ratio number in a paper, call it est(HR) and then compute the change est(ΔHR). The above equation says that if you do that, you are implicitly (and approximately) averaging the changes ΔHR(t) based on the weights P(t) alone.
The “right” weights used by avg(ΔHR) and the “wrong” weights implicitly used by est(ΔHR) aren’t the same. But they’re not that different. Here’s P(t) × L(t), the weights that we’d like to use to compute avg(ΔHR) and estimate changes in life expectancy accurately:
And here’s P(t), the weights you’re implicitly using if we take a hazard ratio number from a paper and compute est(ΔHR):
They’re different. In particular, the latter weights give more weight to people aged 80-95 and less weight to people aged 20-50. But they’re not terribly different.
Enough math, let’s try it
To start, imagine some intervention that decreases risk by HR(t)=0.9 for all ages.
Here are the results:
Thing
Formula
Years
Original life expectancy
L
75.7769
New life expectancy
L’
76.4127
Exact ΔL
ΔL = L - L’
0.6358
Ideal approximation
ΔL ≈ avg(ΔHR) × L̄
0.6409
Use number from paper
ΔL ≈ est(ΔHR) × L̄
0.6409
Let me explain what’s happening here. I made a simulator that takes actuarial data for how likely US males are to die at various ages. From this, it’s a simple spreadsheet calculation to compute life expectancy L.13 Then I applied a hazard ratio to change the probability of dying at each age, and re-ran the simulator to compute a new life expectancy L’ and the exact difference ΔL. Then I’m showing two approximations of ΔL: The first is the “ideal approximation” using avg(ΔHR), which I’m including mostly to show that my math is good. Finally, I’m showing the approximation you get if you actually fit a Cox proportional hazards model and use the resulting number in est(ΔHR). This corresponds to what you’d get if you plug in a number from a paper.
So, with the above constant hazard ratio HR = 0.90, both approximations are very good. This remains true if you switch to some other constant.
What if the hazard ratio varies? At first, you might think that something like this would be very problematic:
But it’s basically fine:
Thing
Formula
Years
Original life expectancy
L
75.7769
New life expectancy
L’
77.4373
Exact ΔL
ΔL = L - L’
1.6604
Ideal approximation
ΔL ≈ avg(ΔHR) × L̄
1.7451
Use number from paper
ΔL ≈ est(ΔHR) × L̄
1.7121
The reason this is fine is that the changes in the hazard ratio are relatively “high frequency”, meaning they sort of locally average out. To demonstrate this, suppose the hazard ratio is chosen randomly for each 1-year bin:
Then the approximations are even better:
Thing
Formula
Years
Original life expectancy
L
75.7769
New life expectancy
L’
77.4218
Exact ΔL
ΔL = L - L’
1.6449
Ideal approximation
ΔL ≈ avg(ΔHR) × L̄
1.7059
Use number from paper
ΔL ≈ est(ΔHR) × L̄
1.7123
What causes trouble is if the hazard ratio varies systematically between the young and the old. For example, suppose the intervention is useless for newborns, but gradually becomes more helpful as you get older:
My “ideal approximation” would still be pretty accurate, if you could compute it. (Which you can’t, in the real world.) But using a number from a paper leads to an overestimate:
Thing
Formula
Number
Original life expectancy
L
75.7769 years
New life expectancy
L’
77.9031 years
Exact ΔL
ΔL = L - L’
2.1261 years
Ideal approximation
ΔL ≈ avg(ΔHR) × L̄
2.0962 years
Use number from paper
ΔL ≈ est(ΔHR) × L̄
2.7645 years
This happens because est(ΔHR) is implicitly weighted by P(t) which is heavily weighted towards older people, whereas we’d like to use something more like avg(ΔHR) which is weighted by P(t) × L(t) which is somewhat less weighted towards older people. Even so, the error isn’t terrible.
Now, it is possible that plugging in a hazard ratio from a paper could give wildly inaccurate estimates of life expectancy. One such scenario would be an intervention which is amazing for people aged 85-95, but does nothing for anyone else:
Now, the hazard ratio looks good exactly at the ages where est(ΔHR) has the most weight, leading it to hugely overestimate the impact on life expectancy:
Thing
Formula
Number
Original life expectancy
L
75.7769 years
New life expectancy
L’
76.1741 years
Exact ΔL
ΔL = L - L’
0.3972 years
Ideal approximation
ΔL ≈ avg(ΔHR) × L̄
0.3840 years
Use number from paper
ΔL ≈ est(ΔHR) × L̄
1.0989 years
Another nightmare case is an intervention that starts out harmful, but then switches to being helpful at older ages:
Now, using a number from a paper doesn’t even give an estimate with the right sign.
Thing
Formula
Number
Original life expectancy
L
75.7769 years
New life expectancy
L’
75.5006 years
Exact ΔL
ΔL = L - L’
-0.2764 years
Ideal approximation
ΔL ≈ avg(ΔHR) × L̄
-0.2348 years
Use number from paper
ΔL ≈ est(ΔHR) × L̄
+0.2709 years
That’s bad. But I think most interventions probably aren’t like that? My guess is that most real interventions vary somewhat with age, but they do so gradually and without switching sign. In those cases, it’s quite difficult to find cases where plugging in the number from a paper is off by more than 30% or so. If you don’t believe me, just try it.14
TLDR
If we were another species, it might be very hard to convert from hazard ratios to changes in life expectancy. But for modern people in rich countries, there are three lucky coincidences:
Mortality risk happens to be distributed so that you can approximate changes in life expectancy through a simple weighted sum of hazard ratios at different ages, ignoring interactions.
The statistical method that people use to estimate scalar hazard ratios can also be approximated as a weighted sum of hazard ratios at different ages, ignoring interactions.
The weights that you need to estimate life expectancy (from #1) and the weights that are implicitly used to compute hazard ratio numbers (from #2) aren’t the same. But they’re fairly close.
These facts justify taking an estimated hazard ratio number HR from a paper and approximating the change in life expectancy as ΔL ≈ ln(1/HR) × 12.93 years or, if the hazard ratio is close to one and you hate logarithms, as ΔL ≈ (1-HR) × 12.93 years.
The number 12.93 years is for US males. It’s the product of Keyfitz entropy (0.17) and baseline life expectancy (75.8 years). It will vary a bit in other populations.
If the true underlying hazard ratio:
…is constant across ages, then the above approximation will be extremely good.
…decreases as people get older, that approximation will overestimate ΔL. That is, it will make helpful interventions look better than they actually are, and it will make harmful interventions look less bad than they actually are.
…increases as people get older, that approximation will underestimate ΔL. That is, it will make helpful interventions look less good than they actually are, and it will make harmful interventions look worse than they actually are.
But as long as the true underlying hazard ratio isn’t too crazy, there’s probably not more than ~30% error in either direction.
Finally, two major caveats: First, the above discussion assumes that the hazard ratio was estimated by running a trial on people of all ages. In general, est(ΔHR) implicitly gives weight to different ages proportional to how many deaths occur at those ages in the baseline population in the trial. If there’s a minimum age of, say, 50 years old, that won’t change too much because most of the mass of P(t) is above the age of 50 anyway. But if there’s a minimum age of 70, or a maximum age of 50, that could make a huge difference if the true hazard ratio is different at the ages that weren’t seen.
Second, these are estimates for the life expectancy for a population. But you are not a population. In some sense, your genetics and lifestyle mean you have your own “personal Keyfitz entropy”, reflecting how spread out your mortality would be for you if you led millions random lives. If you drive safely and use an air purifier and eat well and get exercise and don’t smoke, that likely means your personal life expectancy is higher than average. But it also probably means that your personal Keyfitz entropy is lower than average.15 So, if you make your lifestyle even better by eating more fiber or whatever, even if that produces the same hazard ratio for you as for other people, it would still likely lead to smaller increases in life expectancy, for the same reason that the same hazard ratio produces smaller changes in lifespan in humans compared to mice. What we really need is some interventions strong enough to break the math behind these approximations and free us from Keyfitz tyranny.
I know, I know, you care about quality of life, not just years of life. I agree, some number that measures health and vitality, maybe disability-adjusted life years or quality-adjusted life years, would be better. But these are hard to estimate and so are rarely reported. Anyway, in practice most interventions that make you more vital tend to make you live longer and vice versa, so focusing on life expectancy isn’t too bad. ↩
In this model, the number of days of life follows a geometric distribution with p = (number of bullets) / (number of chambers). So the mean life expectancy is 1/p days or (number of chambers) / (number of bullets) days. With 54,786 chambers and 2 bullets, that works out to 75 years. And if you drop down to one bullet, then it increases to 150 years. ↩
If some intervention would have reduce mortality among people aged ≥ 60 in prehistorical tribal bands, that wouldn’t have increased life expectancy very much, because most people didn’t make it to 60. But compared to prehistorical tribal bands, we have in fact vastly reduced mortality at younger ages. And so, today, reducing mortality for people aged ≥ 60 will increase life expectancy a lot. ↩
You might think this is stupid. Why change a relative risk into a hazard ratio if you’re just going to assume it’s constant? Isn’t that pointless? Well, no. Remember how relative risks always go to 1.0 for long enough trials as everyone in both the treatment and control groups departs our coil? That doesn’t happen with constant hazard ratios. ↩
It’s usually (though not always) better to use ΔHR(t) = ln(1/HR(t)). This correctly reflects, for example, that if all hazard ratios go to zero, then life expectancy goes to infinity, yay. These two approximations are almost identical for hazard ratios that are close to one because ln(1/r) ≈ (1-r) when r is close to one. So if you are terrified of logarithms but you’ve made it to the end of this footnote anyway, you’re not missing out on too much. ↩
There’s a degree of circularity to this argument. It assumes that hazard ratios transfer better between species than changes in life expectancy. That might be true, but it would be an empirical / biological fact, not something that’s guaranteed by logic. ↩
To see this, note that ΔL ≈ ∑ₜ ΔHR(t) × P(t) × L(t) = L̄ × ∑ₜ ΔHR(t) × (P(t) × L(t) / L̄) = L̄ × avg(ΔHR). ↩
where avg₂₀₋₅₀(ΔHR) represents a flat average of the change over the ages 20 to 50 and avg₅₀₋₉₀(ΔHR) represents a flat average over the ages 50 to 90. ↩
That is, it’s better to use est(ΔHR) = ln(1/est(HR)). This is close to 1-est(HR) when est(HR) is close to one. ↩
If there is an infinite amount of data, the typical method reduces to solving
∑ₜ (P(t) + P’(t)) × π(t, HR) = ∑ₜ P’(t),
for HR. Here, P’(t) is the chance of dying at age t after the hazard ratio has been applied, and π(t, HR) is the probability that, if a death occurred at time t, it was in the treatment group. Of course, the true probability that a death is in the treatment group is P’(t) / (P(t) + P’(t)). The standard “proportional Cox” model assumes that the hazard ratio is constant and so replaces this raw fraction with a model-based one, namely
π(t, HR) = S’(t) × HR / (S(t) + S’(t) × HR).
This reflects the fact that at age t, a fraction S(t) of controls are alive and each of these have some chance μ(t) of dying, so P(t)=S(t) × μ(t). Meanwhile, a fraction S’(t) of the treatment group is alive, and these each have a chance HR × μ(t) of dying, meaning that P’(t) = S’(t) × HR × μ(t). If you substitute these equations for P(t) and P’(t) into the second equation above, the factor of μ(t) conveniently cancels and you get π(t, HR) as written.
In effect, the hazard ratio’s job is to attribute deaths to the treatment versus the control group. Now, if the true time-varying HR(t) is close to one, then it can be shown that the estimated hazard ratio est(HR) approximately satisfies
The geometric average is equivalent to the condition that
ln(est(HR)) ≈ ∑ₜ P(t) ln(HR(t))
Using the “better” approximation that ΔHR(t) = ln(1/HR(t)) and *est(ΔHR)=ln(1/est(HR)), it follows that
est(ΔHR) ≈ ∑ₜ P(t) ΔHR(t).
You can justify interpreting that same equation using est(ΔHR) = 1-est(HR) and ΔHR(t)=1-HR(t) from the fact that these are almost the same when HR(t) is close to one. ↩
This simulator pretends that people live for integer numbers of years. That’s not true in reality, of course, but it makes the simulator easier to implement and understand and makes little difference in practice. ↩
In the simulation, “true ΔL” is what I called “exact ΔL” above, while “approximation (log)” is what I called “ideal approximation” and “Cox fitted” is what I called “Use number from paper”. ↩
The way modern human mortality is distributed, even if your healthy lifestyle were to reduce mortality by a constant factor at all ages, that still has the effect of decreasing Keyfitz entropy. ↩
They say you’re supposed to choose your prior in advance. That’s why it’s called a “prior”. First, you’re supposed to say say how plausible different things are, and then you update your beliefs based on what you see in the world.
For example, currently you are—I assume—trying to decide if you should stop reading this post and do something else with your life. If you’ve read this blog before, then lurking somewhere in your mind is some prior for how often my posts are good. For the sake of argument, let’s say you think 25% of my posts are funny and insightful and 75% are boring and worthless.
OK. But now here you are reading these words. If they seem bad/good, then that raises the odds that this particular post is worthless/non-worthless. For the sake of argument again, say you find these words mildly promising, meaning that a good post is 1.5× more likely than a worthless post to contain words with this level of quality.
If you combine those two assumptions, that implies that the probability that this particular post is good is 33.3%. That’s true because the red rectangle below has half the area of the blue one, and thus the probability that this post is good should be half the probability that it’s bad (33.3% vs. 66.6%)
(Why half the area? Because the red rectangle is ⅓ as wide and ³⁄₂ as tall as the blue one and ⅓ × ³⁄₂ = ½. If you only trust equations, click here for equations.)
It’s easiest to calculate the ratio of the odds that the post is good versus bad, namely
Theoretically, when you chose your prior that 25% of dynomight posts are good, that was supposed to reflect all the information you encountered in life before reading this post. Changing that number based on information contained in this post wouldn’t make any sense, because that information is supposed to be reflected in the second step when you choose your likelihood p[good | words]. Changing your prior based on this post would amount to “double-counting”.
In theory, that’s right. It’s also right in practice for the above example, and for the similar cute little examples you find in textbooks.
But for real problems, I’ve come to believe that refusing to change your prior after you see the data often leads to tragedy. The reason is that in real problems, things are rarely just “good” or “bad”, “true” or “false”. Instead, truth comes in an infinite number of varieties. And you often can’t predict which of these varieties matter until after you’ve seen the data.
Aliens
Let me show you what I mean. Say you’re wondering if there are aliens on Earth. As far as we know, there’s no reason aliens shouldn’t have emerged out of the random swirling of molecules on some other planet, developed a technological civilization, built spaceships, and shown up here. So it seems reasonable to choose a prior it’s equally plausible that there are aliens or that there are not, i.e. that
P[aliens] ≈ P[no aliens] ≈ 50%.
Meanwhile, here on our actual world, we have lots of weird alien-esque evidence, like the Gimbal video, the Go Fast video, the FLIR1 video, the Wow! signal, government reports on unidentified aerial phenomena, and lots of pilots that report seeing “tic-tacs” fly around in physically impossible ways. Call all that stuff data. If aliens weren’t here, then it seems hard to explain all that stuff. So it seems like P[data | no aliens] should be some low number.
On the other hand, if aliens were here, then why don’t we ever get a good image? Why are there endless confusing reports and rumors and grainy videos, but never a single clear close-up high-resolution video, and never any alien debris found by some random person on the ground? That also seems hard to explain if aliens were here. So I think P[data | aliens] should also be some low number. For the sake of simplicity, let’s call it a wash and assume that
P[data | no aliens] ≈ P[data | aliens].
Since neither the prior nor the data see any difference between aliens and no-aliens, the posterior probability is
where the last line follows from the fact that P[aliens] ≈ P[no aliens] and P[data | aliens] ≈ P[data | no aliens]. Thus we have that
P[aliens | data] ≈ P[no aliens | data] ≈ 50%.
We’re friends. We respect each other. So let’s not argue about if my starting assumptions are good. They’re my assumptions. I like them. And yet the final conclusion seems insane to me. What went wrong?
Assuming I didn’t screw up the math (I didn’t), the obvious explanation is that I’m experiencing cognitive dissonance as a result of a poor decision on my part to adopt a set of mutually contradictory beliefs. Say you claim that Alice is taller than Bob and Bob is taller than Carlos, but you deny that Alice is taller than Carlos. If so, that would mean that you’re confused, not that you’ve discovered some interesting paradox.
Perhaps if I believe that P[aliens] ≈ P[no aliens] and that P[data | aliens] ≈ P[data | no aliens], then I must accept that P[aliens | data] ≈ P[no aliens | data]. Maybe rejecting that conclusion just means I have some personal issues I need to work on.
I deny that explanation. I deny it! Or, at least, I deny that’s it’s most helpful way to think about this situation. To see why, let’s build a second model.
More aliens
Here’s a trivial observation that turns out to be important: “There are aliens” isn’t a single thing. There could be furry aliens, slimy aliens, aliens that like synthwave music, etc. When I stated my prior, I could have given different probabilities to each of those cases. But if I had, it wouldn’t have changed anything, because there’s no reason to think that furry vs. slimy aliens would have any difference in their eagerness to travel to ape-planets and fly around in physically impossible tic-tacs.
But suppose I had divided up the state of the world into these four possibilities:
possibility
description
No aliens + normal people
There are no aliens. Meanwhile, people are normal and not prone to hallucinating evidence for things that don’t exist.
No aliens + weird people
There are no aliens. Meanwhile, people are weird and do tend to hallucinate evidence for things that don’t exist.
Normal aliens
There are aliens. They may or may not have cool spaceships or enjoy shooting people with lasers. But one way or another, they leave obvious, indisputable evidence that they’re around.
Weird aliens
There are aliens. But they stay hidden until humans get interested in space travel. And after that, they let humans take confusing grainy videos, but never a single good video, never ever, not one.
If I had broken things down that way, I might have chosen this prior:
Now, let’s think about the empirical evidence again. It’s incompatible with no aliens + normal people, since if there were no aliens, then normal people wouldn’t hallucinate flying tic-tacs. The evidence is also incompatible with normal aliens since is those kinds of aliens were around they would make their existence obvious. However, the evidence fits pretty well with weird aliens and also with no aliens + weird people.
So, a reasonable model would be
P[data | normal aliens] ≈ 0
P[data | no aliens + normal people] ≈ 0
P[data | weird aliens] ≈ P[data | no aliens + weird people].
If we combine those assumptions, now we only get a 10% posterior probability of aliens.
P[no aliens + normal people | data] ≈ 0
P[no aliens + weird people | data] ≈ 90%
P[normal aliens | data] ≈ 0
P[weird aliens | data] ≈ 10%
Now the results seem non-insane.
(math)
To see why, first note that
P[normal aliens | data]
≈ P[data | no aliens + normal people]
≈ 0,
since both normal aliens and no aliens + normal people have near-zero probability of producing the observed data.
I hope you are now confused. If not, let me lay out what’s strange: The priors for the two above models both say that there’s a 50% chance of aliens. The first prior wasn’t wrong, it was just less detailed than the second one.
That’s weird, because the second prior seemed to lead to completely different predictions. If a prior is non-wrong and the math is non-wrong, shouldn’t your answers be non-wrong? What the hell?
The simple explanation is that I’ve been lying to you a little bit. Take any situation where you’re trying to determine the truth of anything. Then there’s some space of things that could be true.
In some cases, this space is finite. If you’ve got a single tritium atom and you wait a year, either the atom decays or it doesn’t. But in most cases, there’s a large or infinite space of possibilities. Instead of you just being “sick” or “not sick”, you could be “high temperature but in good spirits” or “seems fine except won’t stop eating onions”.
(Usually the space of things that could be true isn’t easy to map to a small 1-D interval. I’m drawing like that for the sake of visualization, but really you should think of it as some high-dimensional space, or even an infinite dimensional space.)
In the case of aliens, the space of things that could be true might include, “There are lots of slimy aliens and a small number of furry aliens and the slimy aliens are really shy and the furry aliens are afraid of squirrels.” So, in principle, what you should do is divide up the space of things that might be true into tons of extremely detailed things and give a probability to each.
Often, the space of things that could be true is infinite. So theoretically, if you really want to do things by the book, what you should really do is specify how plausible each of those (infinite) possibilities is.
After you’ve done that, you can look at the data. For each thing that could be true, you need to think about the probability of the data. Since there’s an infinite number of things that could be true, that’s an infinite number of probabilities you need to specify. You could picture it as some curve like this:
(That’s a generic curve, not one for aliens.)
To me, this is the most underrated problem with applying Bayesian reasoning to complex real-world situations: In practice, there are an infinite number of things that can be true. It’s a lot of work to specify prior probabilities for an infinite number of things. And it’s also a lot of work to specify the likelihood of your data given an infinite number of things.
So what do we do in practice? We simplify, usually by limiting creating grouping the space of things that could be true into some small number of discrete categories. For the above curve, you might break things down into these four equally-plausible possibilities.
Then you might estimate these data probabilities for each of those possibilities.
Then you could put those together to get this posterior:
That’s not bad. But it is just an approximation. Your “real” posterior probabilities correspond to these areas:
That approximation was pretty good. But the reason it was good is that we started out with a good discretization of the space of things that might be true: One where the likelihood of the data didn’t vary too much for the different possibilities inside of A, B, C, and D. Imagine the likelihood of the data—if you were able to think about all the infinite possibilities one by one—looked like this:
This is dangerous. The problem is that you can’t actually think about all those infinite possibilities. When you think about four four discrete possibilities, you might estimate some likelihood that looks like this:
If you did that, that would lead to you underestimating the probability of A, B, and C, and overestimating the probability of D.
This is where my first model of aliens went wrong. My prior P[aliens] was not wrong. (Not to me.) The mistake was in assigning the same value to P[data | aliens] and P[data | no aliens]. Sure, I think the probability of all our alien-esque data is equally likely given aliens and given no-aliens. But that’s only true for certain kinds of aliens, and certain kinds of no-aliens. And my prior for those kinds of aliens is much lower than for those kinds of non-aliens.
Technically, the fix to the first model is simple: Make P[data | aliens] lower. But the reason it’s lower is that I have additional prior information that I forgot to include in my original prior. If I just assert that P[data | aliens] is much lower than P[data | no aliens] then the whole formal Bayesian thing isn’t actually doing very much—I might as well just state that I think P[aliens | data] is low. If I want to formally justify why P[data | aliens] should be lower, that requires a messy recursive procedure where I sort of add that missing prior information and then integrate it out when computing the data likelihood.
But now I have to give a detailed prior anyway. So what was the point of starting with a simple one?
I don’t think that technical fix is very good. While it’s technically correct (har-har) it’s very unintuitive. The better solution is what I did in the second model: To create a finer categorization of the space of things that might be true, such that the probability of the data is constant-ish for each term.
The thing is: Such a categorization depends on the data. Without seeing the actual data in our world, I would never have predicted that we would have so many pilots that report seeing tic-tacs. So I would never have predicted that I should have categories that are based on how much people might hallucinate evidence or how much aliens like to mess with us. So the only practical way to get good results is to first look at the data to figure out what categories are important, and then to ask yourself how likely you would have said those categories were, if you hadn’t yet seen any of the evidence.
Markets are a good way to know what people really think. When India and Pakistan started firing missiles at each other on May 7, I was concerned, what with them both having nuclear weapons. But then I looked at world market prices:
See how it crashes on May 7? Me neither. I found that reassuring.
But we care about lots of stuff that isn’t always reflected in stock prices, e.g. the outcomes of elections or drug trials. So why not create markets for those, too? If you create contracts that pay out $1 only if some drug trial succeeds, then the prices will reflect what people “really” think.
In fact, why don’t we use markets to make decisions? Say you’ve invented two new drugs, but only have enough money to run one trial. Why don’t you create markets for both drugs, then run the trial on the drug that gets a higher price? Contracts for the “winning” drug are resolved based on the trial, while contracts in the other market are cancelled so everyone gets their money back. That’s the idea of Futarchy, which Robin Hanson proposed in 2007.
Why don’t we? Well, maybe it won’t work. In 2022, I wrote a post arguing that when you cancel one of the markets, you screw up the incentives for how people should bid, meaning prices won’t reflect the causal impact of different choices. I suggested prices reflect “correlation” rather than causation, for basically the same reason this happens with observational statistics. This post, it was magnificent.
It didn’t convince anyone.
Years went by. I spent a lot of time reading Bourdieu and worrying about why I buy certain kinds of beer. Gradually I discovered that essentially the same point about futarchy had been made earlier by, e.g., Anders_H in 2015, abramdemski in 2017, and Luzka in 2021.
In early 2025, I went to a conference and got into a bunch of (friendly) debates about this. I was astonished to find that verbally repeating the arguments from my post did not convince anyone. I even immodestly asked one person to read my post on the spot. (Bloggers: Do not do that.) That sort of worked.
So, I decided to try again. I wrote another post called ”Futarky’s Futarchy’s fundamental flaw”. It made the same argument with more aggression, with clearer examples, and with a new impossibility theorem that showed there doesn’t even exist any alternate payout function that would incentivize people to bid according to their causal beliefs.
That post… also didn’t convince anyone. In the discussion on LessWrong, many of my comments are upvoted for quality but downvoted for accuracy, which I think means, “nice try champ; have a head pat; nah.” Robin Hanson wrote a response, albeit without outward evidence of reading beyond the first paragraph. Even the people who agreed with me often seemed to interpret me as arguing that futarchy satisfies evidential decision theory rather than causal decision theory. Which was weird, given that I never mentioned either of those, don’t accept the premise the futarchy satisfies either of them, and don’t find the distinction helpful in this context.
In my darkest moments, I started to wonder if I might fail to achieve worldwide consensus that futarchy doesn’t estimate causal effects. I figured I’d wait a few years and then launch another salvo.
But then, legendary human Bolton Bailey decided to stop theorizing and take one of my thought experiments and turn it into an actual experiment. Thus, Futarchy’s fundamental flaw — the market was born. (You are now reading a blog post about that market.)
June 25
I gave a thought experiment where there are two coins and the market is trying to pick the one that’s more likely to land heads. For one coin, the bias is known, while for the other coin there’s uncertainty. I claimed futarchy would select the worse / wrong coin, due to this extra uncertainty.
Bolton formalized this as follows:
There are two markets, one for coin A and one for coin B.
Coin A is a normal coin that lands heads 60% of the time.
Coin B is a trick coin that either always lands heads or always lands tails, we just don’t know which. There’s a 59% it’s an always-heads coin.
Twenty-four hours before markets close, the true nature of coin B is revealed.
After the markets closes, whichever coin has a higher price is flipped and contracts pay out $1 for heads and $0 for tails. The other market is cancelled so everyone gets their money back.
Get that? Everyone knows that there’s a 60% chance coin A will land heads and a 59% chance coin B will land heads. But for coin A, that represents true “aleatoric” uncertainty, while for coin B that represents “epistemic” uncertainty due to a lack of knowledge. (See Bayes is not a phase for more on “aleatoric” vs. “epistemic” uncertainty.)
Bolton created that market independently. At the time, we’d never communicated about this or anything else. To this day, I have no idea what he thinks about my argument or what he expected to happen.
June 26-27
In the forum for the market, there was a lot of debate about “whalebait”. Here’s the concern: Say you’ve bought a lot of contracts for coin B, but it emerges that coin B is always-tails. If you have a lot of money, then you might go in at the last second and buy a ton of contracts on coin A to try to force the market price above coin B, so the coin B market is cancelled and you get your money back.
The conversation seemed to converge towards the idea that this was whalebait. Though notice that if you’re buying contracts for coin A at any price above $0.60, you’re basically giving away free money. It could still work, but it’s dangerous and everyone else has an incentive to stop you. If I was betting in this market, I’d think that this was at least unlikely.
June 27
Bolton posted about the market. When I first saw the rules, I thought it wasn’t a valid test of my theory and wasted a huge amount of Bolton’s time trying to propose other experiments that would “fix” it. Bolton was very patient, but I eventually realized that it was completely fine and there was nothing to fix.
At the time, this is what the prices looked like:
That is, at the time, both coins were priced at $0.60, which is not what I had predicted. Nevertheless, I publicly agreed that this was a valid test of my claims.
I think this is a great test and look forward to seeing the results.
Let me reiterate why I thought the markets were wrong and coin B deserved a higher price. There’s a 59% chance coin B would turns out to be all-heads. If that happened, then (absent whales being baited) I thought the coin B market would activate, so contracts are worth $1. So thats 59% × $1 = $0.59 of value. But if coin B turns out to be all-tails, I thought there is a good chance prices for coin B would drop below coin A, so the market is cancelled and you get your money back. So I thought a contract had to be worth more than $0.59.
You can quantify this with a little math. Even if you think the coin B market only has a 50% chance of being cancelled if B is revealed to be all tails, a contract would still be worth $0.7421.
If you buy a contract for coin B for $0.70, then I think that’s worth
In theory, if there was a market asking if coin A was going to resolve YES, NO, or N/A, supposedly people could arbitrage their bets accordingly and make this market calibrated.
Same for a similar market on coin B.
Thus, Futarchy’s Fundamental Fix - Coin A and Futarchy’s Fundamental Fix - Coin B came to be. These were markets in which people could bid on the probability that each coin would resolve YES, meaning the coin was flipped and landed heads, NO, meaning the coin was flipped and landed tails, or N/A, meaning the market was cancelled.
Honestly, I didn’t understand this. I saw no reason that these derivative markets would make people bid their true beliefs. If they did, then my whole theory that markets reflect correlation rather than causation would be invalidated.
June 28 - July 5
Prices for coin B went up and down, but mostly up.
Eventually, a few people created large limit orders, which caused things to stabilize.
Meanwhile, the derivatives markets did not cause the price of coin B to drop. They basically didn't change anything.
Here was the derivative market for coin A.
And here it was market for coin B.
July 6 - July 24
During this period, not a whole hell of a lot happened.
This brings us up to the moment of truth, when the true nature of coin B was to be revealed. At this point, coin B was at $0.90, even though everyone knows it only has a 59% chance of being heads.
July 25
The nature of the coin was revealed. To show this was fair, Bolton did this by asking a bot to publicly generate a random number.
Thus, coin B was determined to be always-heads.
July 26-27
There were still 24 hours left to bid. At this point, a contract for coin B was guaranteed to pay out $1. The market quickly jumped to $1.
Summary
I was right. Everyone knew coin A had a higher chance of being heads than coin B, but everyone bid the price of coin B way above coin A anyway.
It's a bit sad that B wasn't revealed to be all-tails. If it had, we could have seen if the price for coin B actually crashed to below that for coin A. But given that coin B had a price of $0.90, we know the *market* expected it to crash. In fact, if you do a little math, you can put a number on this and say the market thought there was an 84% chance the market for coin B would indeed crash if revealed to be all-tails.
In the previous math box, we saw that the breakeven price should satisfy
Yes, but that’s kind of the point. I created the thought experiment because I wanted to make the problem maximally obvious, because it’s subtle and everyone is determined to deny that it exists.
Isn’t this just a weird probability thing? Why does this show futarchy is flawed?
The fact that this is possible is concerning. If this can happen, then futarchy does not work in general. If you want to claim that futarchy works, then you need to spell out exactly what extra assumptions you’re adding to guarantee that this kind of thing won’t happen.
But prices did reflect causality when the market closed! Doesn’t that mean this isn’t a valid test?
No. That’s just a quirk of the implementation. You can easily create situations that would have the same issue all the way through market close. Here’s one way you could do that:
Let coin A be heads with probability 60%. This is public information.
Let coin B be an ALWAYS HEADS coin with probability 59% and ALWAYS TAILS coin with probability 41%. This is a secret.
Every day, generate a random integer between 1 and 30.
If it’s 1, immediately resolve the markets.
It it’s 2, reveal the nature of coin B.
If it’s between 3 and 30, do nothing.
On average, this market will run for 30 days. (The length follows a geometric distribution). Half the time, the market will close without the nature of coin B being revealed. Even when that happens, I claim the price for coin B will still be above coin A.
If futarchy is flawed, shouldn’t you be able to show that without this weird step of “revealing” coin B?
Yes. You should be able to do that, and I think you can. Here’s one way:
Let coin A be heads with probability 60%. This is public information.
Sample 20 random bits, e.g. 10100011001100000001. Let coin B be heads with probability (49+N)% where N is the number of 1 bits. do not reveal these bits publicly.
Secretly send these bits to the first 20 people who ask.
(You could implement this in a forum by using public and private keys.)
First, have users generate public keys by running this command:
Second, they should post the contents of the public_key.pem when asking for their bit. For example:
Hi, can you please send me a bit? Here's my public key:
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOlesWS+mnvHJOD2osUkbrxE+Y
PMqAUYqwemOwML0LlWLq5RobZRSeyssQhg0i3g2GsMZFMsvjindz6mxccdyP4M8N
mQVCK1Ovs1Z4+DxwmLf/y8vaGC3vfZBOhJDdaNdpRyUiQFaBW99We4cafVnmirRN
Py2lRe+CFgP3kSp4dQIDAQAB
-----END PUBLIC KEY-----
Third, whoever is running the market should save that key as public.pem, pick a pit, and encrypt it like this:
% echo "your secret bit is 1" | openssl pkeyutl -encrypt -pubin -inkey public.pem | base64
I think this market captures a dynamic that’s present in basically any use of futarchy: You have some information, but you know other information is out there.
I claim that this market—will be weird. Say it just opened. If you didn’t get a bit, then as far as you know, the bias for coin B could be anywhere between 49% and 69%, with a mean of 59%. If you did get a bit, then it turns out that the posterior mean is 58.5% if you got a 0 and 59.5% if you got a 1. So either way, your best guess is very close to 59%.
However, the information for the true bias of coin B is out there! Surely coin B is more likely to end up with a higher price in situations where there are lots of 1 bits. This means you should bid at least a little higher than your true belief, for the same reason as the main experiment—the market activating is correlated with the true bias of coin B.
Of course, after the markets open, people will see each other’s bids and… something will happen. Initially, I think prices will be strongly biased for the above reasons. But as you get closer to market close, there’s less time for information to spread. If you are the last person to trade, and you know you’re the last person to trade, then you should do so based on your true beliefs.
Except, everyone knows that there’s less time for information to spread. So while you are waiting till the last minute to reveal your true beliefs, everyone else will do the same thing. So maybe people sort of rush in at the last second? (It would be easier to think about this if implemented with batched auctions rather than a real-time market.)
Anyway, while the game theory is vexing, I think there’s a mix of (1) people bidding higher than their true beliefs due to correlations between the final price and the true bias of coin B and (2) people “racing” to make the final bid before the markets close. Both of these seem in conflict with the idea of prediction markets making people share information and measuring collective beliefs.
Why do you hate futarchy?
I like futarchy. I think society doesn’t make decisions very well, and I think we should give much more attention to new ideas like futarchy that might help us do better. I just think we should be aware of its imperfections and consider variants (e.g. commiting to randomization) that would resolve them.
If I claim futarchy does reflect causal effects, and I reject this experiment as invalid, should I specify what restrictions I want to place on “valid” experiments (and thus make explicit the assumptions under which I claim futarchy works) since otherwise my claims are unfalsifiable?
The heritability wars have been a-raging. Watching these, I couldn’t help but notice that there’s near-universal confusion about what “heritable” means. Partly, that’s because it’s a subtle concept. But it also seems relevant that almost all explanations of heritability are very, very confusing. For example, here’s Wikipedia’s definition:
Any particular phenotype can be modeled as the sum of genetic and environmental effects:
Phenotype (P) = Genotype (G) + Environment (E).
Likewise the phenotypic variance in the trait – Var (P) – is the sum of effects as follows:
Var(P) = Var(G) + Var(E) + 2 Cov(G,E).
In a planned experiment Cov(G,E) can be controlled and held at 0. In this case, heritability, H², is defined as
H² = Var(G) / Var(P)
H² is the broad-sense heritability.
Do you find that helpful? I hope not, because it’s a mishmash of undefined terminology, unnecessary equations, and borderline-false statements. If you’re in the mood for a mini-polemic:
Phenotype (P) is never defined. This is a minor issue, since it just means “trait”.
Genotype (G) is never defined. This is a huge issue, since it’s very tricky and heritability makes no sense without it.
Environment (E) is never defined. This is worse than it seems, since in heritability, different people use “environment” and E to refer to different things.
When we write P = G + E, are we assuming some kind of linear interaction? The text implies not, but why? What does this equation mean? If this equation is always true, then why do people often add other stuff like G × E on the right?
The text states that if you do a planned experiment (how?) and make Cov(G, E) = 0, then heritability is Var(G) / Var(P). But in fact, heritability is always defined that way. You don’t need a planned experiment and it’s fine if Cov(G, E) ≠ 0.
And—wait a second—that definition doesn’t refer to environmental effects at all. So what was the point of introducing them? What was the point of writing P = G + E? What are we doing?
Reading this almost does more harm than good. While the final definition is correct, it never even attempts to explain what G and P are, it gives an incorrect condition for when the definition applies, and instead mostly devotes itself to an unnecessary digression about environmental effects. The rest of the page doesn’t get much better. Despite being 6700 words long, I think it would be impossible to understand heritability simply by reading it.
Meanwhile, some people argue that heritability is meaningless for human traits like intelligence or income or personality. They claim that those traits are the product of complex interactions between genes and the environment and it’s impossible to disentangle the two. These arguments have always struck me as “suspiciously convenient”. I figured that the people making them couldn’t cope with the hard reality that genes are very important and have an enormous influence on what we are.
But I increasingly feel that the skeptics have a point. While I think it’s a fact that most human traits are substantially heritable, it’s also true the technical definition of heritability is really weird, and simply does not mean what most people think it means.
In this post, I will explain exactly what heritability is, while assuming no background. I will skip everything that can be skipped but—unlike most explanations—I will not skip things that can’t be skipped. Then I’ll go through a series of puzzles demonstrating just how strange heritability is.
What is heritability?
How tall you are depends on your genes, but also on what you eat, what diseases you got as a child, and how much gravity there is on your home planet. And all those things interact. How do you take all that complexity and reduce it to a single number, like “80% heritable”?
The short answer is: Statistical brute force. The long answer is: Read the rest of this post.
It turns out that the hard part of heritability isn’t heritability. Lurking in the background is a slippery concept known as a genotypic value. Discussions of heritability often skim past these. Quite possibly, just looking at the words “genotypic value”, you are thinking about skimming ahead right now. Resist that urge! Genotypic values are the core concept, and without them you cannot possibly understand heritability.
For any trait, your genotypic value is the “typical” outcome if someone with your DNA were raised in many different random environments. In principle, if you wanted to know your genotypic height, you’d need to do this:
Create a million embryonic clones of yourself.
Implant them in the wombs of randomly chosen women around the world who were about to get pregnant on their own.
Convince them to raise those babies exactly like a baby of their own.
Wait 25 years, find all your clones and take their average height.
Since you can’t / shouldn’t do that, you’ll never know your genotypic height. But that’s how it’s defined in principle—the average height someone with your DNA would grow to in a random environment. If you got lots of food and medical care as a child, your actual height is probably above your genotypic height. If you suffered from rickets, your actual height is probably lower than your genotypic height.
Comfortable with genotypic values? OK. Then (broad-sense) heritability is easy. It’s the ratio
heritability = var[genotype] / var[height].
Here, var is the variance, basically just how much things vary in the population. Among all adults worldwide, var[height] is around 50 cm². (Incidentally, did you know that variance was invented for the purpose of defining heritability?)
Meanwhile, var[genotype] is how much genotypic height varies in the population. That might seem hopeless to estimate, given that we don’t know anyone’s genotypic height. But it turns out that we can still estimate the variance using, e.g., pairs of adopted twins, and it’s thought to be around 40 cm². If we use those numbers, the heritability of height would be
heritability ≈ (40 cm²) / (50 cm²) ≈ 0.8.
People often convert this to a percentage and say “height is 80% heritable”. I’m not sure I like that, since it masks heritability’s true nature as a ratio. But everyone does it, so I’ll do it too. People who really want to be intimidating might also say, “genes explain 80% of the variance in height”.
Of course, basically the same definition works for any trait, like weight or income or fondness for pseudonymous existential angst science blogs. But instead of replacing “height” with “trait”, biologists have invented the ultra-fancy word “phenotype” and write
heritability = var[genotype] / var[phenotype].
The word “phenotype” suggests some magical concept that would take years of study to understand. But don’t be intimidated. It just means the actual observed value of some trait(s). You can measure your phenotypic height with a tape measure.
On meaning
Let me make two points before moving on.
First, this definition of heritability assumes nothing. We are not assuming that genes are independent of the environment or that “genotypic effects” combine linearly with “environmental effects”. We are not assuming that genes are in Hardy-Weinberg equilibrium, whatever that is. No. I didn’t talk about that stuff because I don’t need to. There are no hidden assumptions. The above definition always works.
Second, many normal English words have parallel technical meanings, such as “field”, “insulator”, “phase”, “measure”, “tree”, or “stack”. Those are all nice, because they’re evocative and it’s almost always clear from context which meaning is intended. But sometimes, scientists redefine existing words to mean something technical that overlaps but also contradicts the normal meaning, as in “salt”, “glass”, “normal”, “berry”, or “nut”. These all cause confusion, but “heritability” must be the most egregious case in all of science.
Before you ever heard the technical definition of heritability, you surely had some fuzzy concept in your mind. Personally, I thought of heritability as meaning how many “points” you get from genes versus the environment. If charisma was 60% heritable, I pictured each person has having 10 total “charisma points”, 6 of which come from genes, and 4 from the environment:
Genes ★★★☆☆☆
Environment ★☆☆☆
Total ★★★★☆☆☆☆☆☆
If you take nothing else from this post, please remember that the technical definition of heritability does not work like that. You might hope that if we add some plausible assumptions, the above ratio-based definition would simplify into something nice and natural, that aligns with what “heritability” means in normal English. But that does not happen. If that’s confusing, well, it’s not my fault.
Intermission
Not sure what’s happening here, but it seems relevant.
Heritability puzzles
So “heritability” is just the ratio of genotypic and phenotypic variance. Is that so bad?
I think… maybe?
How heritable is eye color?
Close to 100%.
This seems obvious, but let’s justify it using our definition that heritability = var[genotype] / var[phenotype].
Well, people have the same eye color, no matter what environment they are raised in. That means that genotypic eye color and phenotypic eye color are the same thing. So they have the same variance, and the ratio is 1. Nothing tricky here.
How heritable is speaking Turkish?
Close to 0%.
Your native language is determined by your environment. If you grow up in a family that speaks Turkish, you speak Turkish. Genes don’t matter.
Of course, there are lots of genes that are correlated with speaking Turkish, since Turks are not, genetically speaking, a random sample of the global population. But that doesn’t matter, because if you put Turkish babies in Korean households, they speak Korean. Genotypic values are defined by what happens in a random environment, which breaks the correlation between speaking Turkish and having Turkish genes.
Since 1.1% of humans speak Turkish, the genotypic value for speaking Turkish is around 0.011 for everyone, no matter their DNA. Since that’s basically constant, the genotypic variance is near zero, and heritability is near zero.
How heritable is speaking English?
Perhaps 30%. Probably somewhere between 10% and 50%. Definitely more than zero.
That’s right. Turkish isn’t heritable but English is. Yes it is. If you ask an LLM, it will tell you that the heritability of English is zero. But the LLM is wrong and I am right.
Why? Let me first acknowledge that Turkish is a little bit heritable. For one thing, some people have genes that make them non-verbal. And there’s surely some genetic basis for being a crazy polyglot that learns many languages for fun. But speaking Turkish as a second language is quite rare, meaning that the genotypic value of speaking Turkish is close to 0.011 for almost everyone.
English is different. While only 1 in 20 people in the world speak English as a first language, 1 in 7 learn it as a second language. And who does that? Educated people.
Most people say educational attainment is around 40% heritable. My guess is that speaking English as a second language is similar. But since there's a minority of native speakers (where genes don't really matter), I'm dropping my estimate to 30%.
Some argue the heritability of educational attainment is much lower. I’d like to avoid debating the exact numbers, but note that these lower numbers are usually estimates of “narrow-sense” heritability rather than “broad-sense” heritability as we’re talking about. So they should be lower. (I’ll explain the difference later.) It’s entirely possible that broad-sense heritability is lower than 40%, but everyone agrees it’s much larger than zero. So the heritability of English is surely much larger than zero, too.
Say there’s an island where genes have no impact on height. How heritable is height among people on this island?
0%.
There’s nothing tricky here.
Say there’s an island where genes entirely determine height. How heritable is height?
100%.
Again, nothing tricky.
Say there’s an island where neither genes nor the environment influence height and everyone is exactly 165 cm tall. How heritable is height?
It’s undefined.
In this case, everyone has exactly the same phenotypic and genotypic height, namely 165 cm. Since those are both constant, their variance is zero and heritability is zero divided by zero. That’s meaningless.
Say there’s an island where some people have genes that predispose them to be taller than others. But the island is ruled by a cruel despot who denies food to children with taller genes, so that on average, everyone is 165 ± 5 cm tall. How heritable is height?
0%.
On this island, everyone has a genotypic height of 165 cm. So genotypic variance is zero, but phenotypic variance is positive, due to the ± 5 cm random variation. So heritability is zero divided by some positive number.
Say there’s an island where some people have genes that predispose them to be tall and some have genes that predispose them to be short. But, the same genes that make you tall also make you semi-starve your children, so in practice everyone is exactly 165 cm tall. How heritable is height?
∞%. Not 100%, mind you, infinitely heritable.
To see why, note that if babies with short/tall genes are adopted by parents with short/tall genes, there are four possible cases.
Baby genes
Parent genes
Food
Height
Short
Short
Lots
165 cm
Short
Tall
Semi-starvation
Less than 165 cm
Tall
Short
Lots
More than 165 cm
Tall
Tall
Semi-starvation
165 cm
If a baby with short genes is adopted into random families, they will be shorter on average than if a baby with tall genes. So genotypic height varies. However, in reality, everyone is the same height, so phenotypic height is constant. So genotypic variance is positive while phenotypic variance is zero. Thus, heritability is some positive number divided by zero, i.e. infinity.
(Are you worried that humans are “diploid”, with two genes (alleles) at each locus, one from each biological parent? Or that when there are multiple parents, they all tend to have thoughts on the merits of semi-starvation? If so, please pretend people on this island reproduce asexually. Or, if you like, pretend that there’s strong assortative mating so that everyone either has all-short or all-tall genes and only breeds with similar people. Also, don’t fight the hypothetical.)
Say there are two islands. They all live the same way and have the same gene pool, except people on island A have some gene that makes them grow to be 150 ± 5 cm tall, while on island B they have a gene that makes them grow to be 160 ± 5 cm tall. How heritable is height?
It’s 0% for island A and 0% for island B, and 50% for the two islands together.
Why? Well on island A, everyone has the same genotypic height, namely 150 cm. Since that’s constant, genotypic variance is zero. Meanwhile, phenotypic height varies a bit, so phenotypic variance is positive. Thus, heritability is zero.
For similar reasons, heritability is zero on island B.
But if you put the two islands together, half of people have a genotypic height of 150 cm and half have a genotypic height of 160 cm, so suddenly (via math) genotypic variance is 25 cm². There’s some extra random variation so (via more math) phenotypic variance turns out to be 50 cm². So heritability is 25 / 50 = 50%.
(Math)
If you combine the populations, then genotypic variance is
Var[150 cm + 10 cm × Bernoulli(0.5)]
= (10 cm)² × Var[Bernoulli(0.5)]
= (10 cm)² × 0.25
= 25 cm².
Say there’s an island where neither genes nor the environment influence height. Except, some people have a gene that makes them inject their babies with human growth hormone, which makes them 5 cm taller. How heritable is height?
0%.
True, people with that gene will tend be taller. And the gene is causing them to be taller. But if babies are adopted into random families, it’s the genes of the parents that determine if they get injected or not. So everyone has the same genotypic height, genotypic variance is zero, and heritability is zero.
Suppose there’s an island where neither genes nor the environment influence height. Except, some people have a gene that makes them, as babies, talk their parents into injecting them with human growth hormone. The babies are very persuasive. How heritable is height?
We’re back to 100%.
The difference with the previous scenario is that now babies with that gene get injected with human growth hormone no matter who their parents are. Since nothing else influences height, genotype and phenotype are the same, have the same variance, and heritability is 100%.
Suppose there’s an island where neither genes nor the environment influence height. Except, there are crabs that seek out blue-eyed babies and inject them with human growth hormone. The crabs, they are unstoppable. How heritable is height?
Again, 100%.
Babies with DNA for blue eyes get injected. Babies without DNA for blue eyes don’t. Since nothing else influences height, genotype and phenotype are the same and heritability is 100%.
Note that if the crabs were seeking out parents with blue eyes and then injecting their babies, then height would be 0% heritable.
It doesn’t matter that human growth hormone is weird thing that’s coming from outside the baby. It doesn’t matter if we think crabs should be semantically classified as part of “the environment”. It doesn’t matter that heritability would drop to zero if you killed all the crabs, or that the direct causal effect of the relevant genes has nothing to do with height. Heritability is a ratio and doesn’t care.
What good is heritability?
So heritability can be high even when genes have no direct causal effect on the trait in question. It can be low even when there is a strong direct effect. It changes when the environment changes. It even changes based on how you group people together. It can be larger than 100% or even undefined.
Even so, I’m worried people might interpret this post as a long way of saying heritability is dumb and bad, trolololol. So I thought I’d mention that this is not my view.
Say a bunch of companies create different LLMs and train them on different datasets. Some of the resulting LLMs are better at writing fiction than others. Now I ask you, “What percentage of the difference in fiction writing performance is due to the base model code, rather than the datasets or the GPUs or the learning rate schedules?”
That’s a natural question. But if you put it to an AI expert, I bet you’ll get a funny look. You need code and data and GPUs to make an LLM. None of those things can write fiction by themselves. Experts would prefer to think about one change at a time: Given this model, changing the dataset in this way changes fiction writing performance this much.
Similarly, for humans, I think what we really care about is interventions. If we changed this gene, could we eliminate a disease? If we educate children differently, can we make them healthier and happier? No single number can possibly contain all that information.
But heritability is something. I think of it as saying how much hope we have to find an intervention by looking at changes in current genes or current environments.
If heritability is high, then given current typical genes, you can’t influence the trait much through current typical environmental changes. If you only knew that eye color was 100% heritable, that means you won’t change your kid’s eye color by reading to them, or putting them on a vegetarian diet, or moving to higher altitude. But it’s conceivable you could do it by putting electromagnets under their bed or forcing them to communicate in interpretive dance.
If heritability is high, that also means that given current typical environments you can influence the trait through current typical genes. If the world was ruled by an evil despot who forced red-haired people to take pancreatic cancer pills, then pancreatic cancer would be highly heritable. And you could change the odds someone gets pancreatic cancer by swapping in existing genes for black hair.
If heritability is low, that means that given current typical environments, you can’t cause much difference through current typical genetic changes. If we only knew that speaking Turkish was ~0% heritable, that means that doing embryo selection won’t much change the odds that your kid speaks Turkish.
If heritability is low, that also means that given current typical genes, you might be able change the trait through current typical environmental changes. If we only know that speaking Turkish was 0% heritable, then that means there might be something you could do to change the odds your kid speaks Turkish, e.g. moving to Turkey. Or, it’s conceivable that it’s just random and moving to Turkey wouldn’t do anything.
Heritability
Influenced by typical genes?
Influenced by typical environments?
High
Yes
No
Low
No
Maybe
But be careful. Just because heritability is high doesn’t mean that changing genes is easy. And just because heritability is low doesn’t mean that changing the environment is easy.
And heritability doesn’t say anything about non-typical environments or non-typical genes.
If an evil despot is giving all the red-haired people cancer pills, perhaps we could solve that by intervening on the despot. And if you want your kid to speak Turkish, it’s possible that there’s some crazy genetic modifications that would turn them into unstoppable Turkish learning machine.
Heritability has no idea about any of that, because it’s just an observational statistic based on the world as it exists today.
Recommended reading
Heritability: Five Battles by Steven Byrnes. Covers similar issues in way that’s more connected to the world and less shy about making empirical claims.
This post focused on “broad-sense” heritability. But there a second heritability out there, called “narrow-sense”. Like broad-sense heritability, we can define the narrow-sense heritability of height as a ratio:
The difference is that rather than having height in the numerator, we now have “additive height”. To define that, imagine doing the following for each of your genes, one at a time:
Find a million random women in the world who just became pregnant.
For each of them, take your gene and insert it into the embryo, replacing whatever was already at that gene’s locus.
Convince everyone to raise those babies exactly like a baby of their own.
Wait 25 years, find all the resulting people, and take the difference of their average height from overall average height.
For example, say overall average human height is 150 cm, but when you insert gene #4023 from yourself into random embryos, their average height is 149.8 cm. Then the additive effect of your gene #4023 is -0.2 cm.
Your “additive height” is average human height plus the sum of additive effects for each of your genes. If the average human height is 150 cm, you have one gene with a -0.2 cm additive effect, another gene with a +0.3 cm additive effect and the rest of your genes have no additive effect, then your “additive height” is 150 cm - 0.2 cm + 0.3 cm = 150.1 cm.
Note: This terminology of “additive height” is non-standard. People usually define narrow-sense heritability using “additive effects”, which are the same thing but without including the mean. This doesn’t change anything since adding a constant doesn’t change the variance. But it’s easier to say “your additive height is 150.1 cm” rather than “the additive effect of your genes on height is +0.1 cm” so I’ll do that.
Honestly, I don’t think the distinction between “broad-sense” and “narrow-sense” heritability is that important. We’ve already seen that broad-sense heritability is weird, and narrow-sense heritability is similar but different. So it won’t surprise you to learn that narrow-sense heritability is differently-weird.
Appendix: Narrow heritability puzzles
But if you really want to understand the difference, I can offer you some more puzzles.
Say there’s an island where people have two genes, each of which is equally likely to be A or B. People are 100 cm tall if they have an AA genotype, 150 cm tall if they have an AB or BA genotype, and 200 cm tall if they have a BB genotype. How heritable is height?
Both broad and narrow-sense heritability are 100%.
The explanation for broad-sense heritability is like many we’ve seen already. Genes entirely determine someone’s height, and so genotypic and phenotypic height are the same.
For narrow-sense heritability, we need to calculate some additive heights. The overall mean is 150 cm, each A gene has an additive effect of -25 cm, and each B gene has an additive effect of +25 cm. But wait! Let’s work out the additive height for all four cases:
genotype
phenotypic height
additive height
AA
100 cm
150 cm - 25 cm - 25 cm = 100 cm
AB
150 cm
150 cm - 25 cm + 25 cm = 150 cm
BA
150 cm
150 cm + 25 cm - 25 cm = 150 cm
BB
200 cm
150 cm + 25 cm + 25 cm = 200 cm
Since additive height is also the same as phenotypic height, narrow-sense heritability is also 100%.
In this case, the two heritabilities were the same. At a high level, that’s because the genes act independently. When there are “gene-gene” interactions, you tend to get different numbers.
Say there’s an island where people have two genes, each of which is equally likely to be A or B. People with AA or BB genomes are 100 cm, while people with AB or BA genomes are 200 cm. How heritable is height?
Broad-sense heritability is 100%, while narrow-sense heritability is 0%.
You know the story for broad-sense heritability by now. For narrow-sense heritability, we need to do a little math.
The overall mean height is 150 cm.
If you take a random embryo and replace one gene with A, then the there’s a 50% chance the other gene is A, so they’re 100 cm, and there’s a 50% chance the other gene is B, so they’re 200 cm, for an average of 150 cm. Since that’s the same as the overall mean, the additive effect of an A gene is +0 cm.
By similar logic, the additive effect of a B gene is also +0 cm.
So everyone has an additive height of 150 cm, no matter their genes. That’s constant, so narrow-sense heritability is zero.
Appendix: Why are there two heritabilities?
I think basically for two reasons:
First, for some types of data (twin studies) it’s much easier to estimate broad-sense heritability. For other types of data (GWAS) it’s much easier to estimate narrow-sense heritability. So we take what we can get.
Second, they’re useful for different things. Broad-sense heritability is defined by looking at what all your genes do together. That’s nice, since you are the product of all your genes working together. But combinations of genes are not well-preserved by reproduction. If you have a kid, then they breed with someone, their kids breed with other people, and so on. Generations later, any special combination of genes you might have is gone. So if you’re interested in the long-term impact of you having another kid, narrow-sense heritability might be the way to go.
(Sexual reproduction doesn’t really allow for preserving the genetics that make you uniquely “you”. Remember, almost all your genes are shared by lots of other people. If you have any unique genes, that’s almost certainly because they have deleterious de-novo mutations. From the perspective of evolution, your life just amounts to a tiny increase or decrease in the per-locus population frequencies of your individual genes. The participants in the game of evolution are genes. Living creatures like you are part of the playing field. Food for thought.)
Say you’re Robyn Denholm, chair of Tesla’s board. And say you’re thinking about firing Elon Musk. One way to make up your mind would be to have people bet on Tesla’s stock price six months from now in a market where all bets get cancelled unless Musk is fired. Also, run a second market where bets are cancelled unless Musk stays CEO. If people bet on higher stock prices in Musk-fired world, maybe you should fire him.
That’s basically Futarchy: Use conditional prediction markets to make decisions.
People often argue about fancy aspects of Futarchy. Are stock prices all you care about? Could Musk use his wealth to bias the market? What if Denholm makes different bets in the two markets, and then fires Musk (or not) to make sure she wins? Are human values and beliefs somehow inseparable?
My objection is more basic: It doesn’t work. You can’t use conditional predictions markets to make decisions like this, because conditional prediction markets reveal probabilistic relationships, not causal relationships. The whole concept is faulty.
There are solutions—ways to force markets to give you causal relationships. But those solutions are painful and I get the shakes when I see everyone acting like you can use prediction markets to conjure causal relationships from thin air, almost for free.
I wrote about this back in 2022, but my argument was kind of sprawling and it seems to have failed to convince approximately everyone. So thought I’d give it another try, with more aggression.
Conditional prediction markets are a thing
In prediction markets, people trade contracts that pay out if some event happens. There might be a market for “Dynomight comes out against aspartame by 2027” contracts that pay out $1 if that happens and $0 if it doesn’t. People often worry about things like market manipulation, liquidity, or herding. Those worries are fair but boring, so let’s ignore them. If a market settles at $0.04, let’s assume that means the “true probability” of the event is 4%.
(I pause here in recognition of those who need to yell about Borel spaces or von Mises axioms or Dutch book theorems or whatever. Get it all out. I value you.)
Right. Conditional prediction markets are the same, except they get cancelled unless some other event happens. For example, the “Dynomight comes out against aspartame by 2027” market might be conditional on “Dynomight de-pseudonymizes”. If you buy a contract for $0.12 then:
If Dynomight is still pseudonymous at the end of 2027, you’ll get your $0.12 back.
If Dynomight is non-pseudonymous, then you get $1 if Dynomight came out against aspartame and $0 if not.
Let’s again assume that if a conditional prediction market settles at $0.12, that means the “true” conditional probability is 12%.
A non-causal kind of thing
But hold on. If we assume that conditional prediction markets give flawless conditional probabilities, then what’s left to complain about?
Simple. Conditional probabilities are the wrong thing. If P(A|B)=0.9, that means that if you observe B, then there’s a 90% chance of A. That doesn’t mean anything about the chances of A if you do B.
In the context of statistics, everyone knows that correlation does not imply causation. That’s a basic law of science. But really, it’s just another way of saying that conditional probabilities are not what you need to make decisions. And that’s true no matter where the conditional probabilities come from.
For example, people with high vitamin D levels are only ~56% as likely to die in a given year as people with low vitamin D levels. Does that mean taking vitamin D halves your risk of death? No, because those people are also thinner, richer, less likely to be diabetic, less likely to smoke, more likely to exercise, etc. To make sure we’re seeing the effects of vitamin D itself, we run randomized trials. Those suggest it might reduce the risk of death a little. (I take it.)
Futarchy has the same flaw. Even if you think vitamin D does nothing, if there’s a prediction market for if some random person dies, you should pay much less if the market is conditioned on them having high vitamin D. But you should do that mostly because they’re more likely to be rich and thin and healthy, not because of vitamin D itself.
If you like math, conditional prediction markets give you P(A|B). But P(A|B) doesn’t tell you what will happen if you do B. That’s a completely different number with a different notation, namely P(A|do(B)). Generations of people have studied the relationship between P(A|B) and P(A|do(B)). We should pay attention to them.
This is not hypothetical
Say people bet for a lower Tesla stock price when you condition on Musk being fired. Does that mean they think that firing Musk would hurt the stock price? No, because there could be reverse causality—the stock price dropping might cause him to be fired.
You can try to fight this using the fact that things in the future can’t cause things in the past. That is, you can condition on Musk being fired next week and bet on the stock price six months from now. That surely helps, but you still face other problems.
Here’s another example of how lower prices in Musk-fired world may not indicate that firing Musk hurts the stock price. Suppose:
You think Musk is a mildly crappy CEO. If he’s fired, he’ll be replaced with someone slightly better, which would slightly increase Tesla’s stock price.
You’ve heard rumors that Robyn Denholm has recently decided that she hates Musk and wants to dedicate her life to destroying him. Or maybe not, who knows.
If Denholm fired Musk, that would suggest the rumors are true. So she might try to do other things to hurt him, such as trying to destroy Tesla to erase his wealth. So in this situation, Musk being fired leads to lower stock prices even though firing Musk itself would increase the stock price.
Or suppose you run prediction markets for the risk of nuclear war, conditional on Trump sending the US military to enforce a no-fly zone over Ukraine (or not). When betting in these markets, people would surely consider the risk that direct combat between the US and Russian militaries could escalate into nuclear war.
That’s good (the considering), but people would also consider that no one really knows exactly what Trump is thinking. If he declared a no-fly zone, that would suggest that he’s feeling feisty and might do other things that could also lead to nuclear war. The markets wouldn’t reflect the causal impact of a no-fly zone alone, because conditional probabilities are not causal.
Putting markets in charge doesn’t work
So far nothing has worked. But what if we let the markets determine what action is taken? If we pre-commit that Musk will be fired (or not) based on market prices, you might hope that something nice happens and magically we get causal probabilities.
I’m pro-hope, but no such magical nice thing happens.
Thought experiment. Imagine there’s a bent coin that you guess has a 40% chance of landing heads. And suppose I offer to sell you a contract. If you buy it, we’ll flip the coin and you get $1 if it’s heads and $0 otherwise. Assume I’m not doing anything tricky like 3D printing weird-looking coins. If you want, assume I haven’t even seen the coin.
You’d pay something like $0.40 for that contract, right?
(Actually, knowing my readers, I’m pretty sure you’re all gleefully formulating other edge cases. But I’m also sure you see the point that I’m trying to make. If you need to put the $0.40 in escrow and have the coin-flip performed by a Cenobitic monk, that’s fine.)
Now imagine a variant of that thought experiment. It’s the same setup, except if you buy the contract, then I’ll have the coin laser-scanned and ask a supercomputer to simulate millions of coin flips. If more than half of those simulated flips are heads, the bet goes ahead. Otherwise, you get your money back.
Now you should pay at least $0.50 for the contract, even though you only think there’s a 40% chance the coin will land heads.
Why? This is a bit subtle, but you should pay more because you don’t know the true bias of the coin. Your mean estimate is 40%. But it could be 20%, or 60%. After the coin is laser-scanned, the bet only activates if there’s at least a 50% chance of heads. So the contract is worth at least $0.50, and strictly more as long as you think it’s possible the coin has a bias above 50%.
(Math for people who like math.)
Suppose b is the true bias of the coin (which the supercomputer will compute). Then your expected return in this game is
𝔼[max(b, 0.50)] = 0.50 + 𝔼[max(b-0.50, 0)],
where the expectations reflect your beliefs over the true bias of the coin. Since 𝔼[max(b-0.50, 0)] is never less than zero, the contract is always worth at least $0.50. If you think there’s any chance the bias is above 50%, then the contract is worth strictly more than $0.50.
To connect to prediction markets, let’s do one last thought experiment, replacing the supercomputer with a market. If you buy the contract, then I’ll have lots of other people bid on similar contracts for a while. If the price settles above $0.50, your bet goes ahead. Otherwise, you get your money back.
You should still bid more than $0.40, even though you only think there’s a 40% chance the coin will land heads. Because the market acts like a (worse) laser-scanner plus supercomputer. Assuming prediction markets are good, the market is smarter than you, so it’s more likely to activate if the true bias of the coin is 60% rather than 20%. This changes your incentives, so you won’t bet your true beliefs.
No, order is not preserved
I hope you now agree that conditional prediction markets are non-causal, and choosing actions based on the market doesn’t magically make that problem go away.
But you still might have hope! Maybe the order is still preserved? Maybe you’ll at least always pay more for coins that have a higher probability of coming up heads? Maybe if you run a market with a bunch of coins, the best one will always earn the highest price? Maybe it all works out?
Nope. You can create examples where you'll pay more for a contract on a coin that you think has a lower probability.
Suppose there’s a conditional prediction market for two coins. After a week of bidding, the markets will close, whichever coin had contracts trading for more money will be flipped and $1 paid to contract-holders for head. The other market is cancelled.
Suppose you’re sure that coin A, has a bias of 60%. If you flip it lots of times, 60% of the flips will be heads. But you’re convinced coin B, is a trick coin. You think there’s a 59% chance it always lands heads, and a 41% chance it always lands tails. You’re just not sure which.
We want you to pay more for a contract for coin A, since that’s the coin you think is more likely to be heads (60% vs 59%). But if you like money, you’ll pay more for a contract on coin B. You’ll do that because other people might figure out if it’s an always-heads coin or an always-tails coin. If it’s always heads, great, they’ll bid up the market, it will activate, and you’ll make money. If it’s always tails, they’ll bid down the market, and you’ll get your money back.
You’ll pay more for coin B contracts, even though you think coin A is better in expectation. Order is not preserved. Things do not work out.
No, it’s not easily fixable
Naive conditional prediction markets aren’t causal. Using time doesn’t solve the problem. Having the market choose actions doesn’t solve the problem. But maybe there’s still hope? Maybe it’s possible to solve the problem by screwing around with the payouts?
Theorem. Nope. You can’t solve the problem by screwing around with the payouts. There does not exist a payout function that will make you always bid your true beliefs.
(Click here for a version of that theorem with math. Warning: Math.)
Suppose you run a market where if you pay x and the final market price is y and z happens, then you get a payout of f(x,y,z) dollars. The payout function can be anything, subject only to the constraint that if the final market price is below some constant c, then bets are cancelled, i.e. f(x,y,z)=x for y < c.
Now, take any two distributions ℙ₁ and ℙ₂. Assume that:
The last line uses our assumptions that ℙ₁[Y<c] > 0 and 𝔼₁[Z | Y<c] ≠ 𝔼₂[Z | Y<c].
Thus, we have simultaneously that
𝔼₁[f(x,Y,Z)] = 𝔼₂[f(x,Y,Z)],
yet
𝔼₁[Z] ≠ 𝔼₂[Z].
This means that you should pay the same amount for a contract if you believe ℙ₁ or ℙ₂, even though these entail different beliefs about how likely Z is to happen. Since we haven’t assumed anything about the payout function f(x,y,z), this means that no working payout function can exist. This is bad.
It’s not that bad
Just because conditional prediction markets are non-causal does not mean they are worthless. On the contrary, I think we should do more of them! But they should be treated like observational statistics—just one piece of information to consider skeptically when you make decisions.
Also, while I think these issues are neglected, they’re not completely unrecognized. For example, in 2013, Robin Hanson pointed out that confounding variables can be a problem:
Also, advisory decision market prices can be seriously distorted when decision makers might know things that market speculators do not. In such cases, the fact that a certain decision is made can indicate hidden info held by decision makers. Market estimates of outcomes conditional on a decision then become estimates of outcomes given this hidden info, instead of estimates of the effect of the decision on outcomes.
This post from Anders_H in 2015 is the first I’m aware of that points out the problem in full generality.
Finally, the flaw can be fixed. In statistics, there’s a whole category of techniques to get causal estimates out of data. Many of these methods have analogies as alternative prediction market designs. I’ll talk about those next time. But here’s a preview: None are free.
I say NumPy misses on three of these. So I’d like to propose a “fix” that—I claim—eliminates 90% of unnecessary thinking, with no loss of power. It would also fix all the things based on NumPy, for example every machine learning library.
I know that sounds grandiose. Quite possibly you’re thinking that good-old dynomight has finally lost it. So I warn you now: My solution is utterly non-clever. If anything is clever here, it’s my single-minded rejection of cleverness.
To motivate the fix, let me give my story for how NumPy went wrong. It started as a nice little library for array operations and linear algebra. When everything has two or fewer dimensions, it’s great. But at some point, someone showed up with some higher-dimensional arrays. If loops were fast in Python, NumPy would have said, “Hello person with ≥3 dimensions, please call my ≤2 dimensional functions in a loop so I can stay nice and simple, xox, NumPy.”
But since loops are slow, NumPy instead took all the complexity that would usually be addressed with loops and pushed it down into individual functions. I think this was a disaster, because every time you see some function call like np.func(A,B), you have to think:
OK, what shapes do all those arrays have?
And what does np.func do when it sees those shapes?
Different functions have different rules. Sometimes they’re bewildering. This means constantly thinking and constantly moving dimensions around to appease the whims of particular functions. It’s the functions that should be appeasing your whims!
Even simple-looking things like A*B or A[B,C] do quite different things depending on the starting shapes. And those starting shapes are often themselves the output of previous functions, so the complexity spirals.
Worst of all, if you write a new ≤2 dimensional function, then high-dimensional arrays are your problem. You need to decide what rules to obey, and then you need to re-write your function in a much more complex way to—
Voice from the back: Python sucks! If you used a real language, loops would be fast! This problem is stupid!
That was a strong argument, ten years ago. But now everything is GPU, and GPUs hate loops. Today, array packages are cheerful interfaces that look like Python (or whatever) but are actually embedded languages that secretly compile everything into special GPU instructions that run on whole arrays in parallel. With big arrays, you need GPUs. So I think the speed of the host language doesn’t matter so much anymore.
Python’s slowness may have paradoxically turned out to be an advantage, since it forced everything to be designed to work without loops even before GPUs took over.
Still, thinking is bad, and NumPy makes me think, so I don’t like NumPy.
So what’s the fix?
Here’s my extremely non-clever idea: Let’s just admit that loops were better. In high dimensions, no one has yet come up with a notation that beats loops and indices. So, let’s do this:
Bring back the syntax of loops and indices.
But don’t actually execute the loops. Just take the syntax and secretly compile it into vectorized operations.
Also, let’s get rid of all the insanity that’s been added to NumPy because loops were slow.
That’s basically the whole idea. If you take those three bullet-points, you could probably re-derive everything I do below. I told you this wasn’t clever.
What does it look like?
Suppose that X and Y are 2D arrays, and A is a 4D array. And suppose you want to find a 2D array Z such that Zij = (Yj)T (Aij)-1 Xi. If you could write loops, this would be easy:
If you’re not a NumPy otaku, that may look like outsider art. Rest assured, it looks like that to me too, and I just wrote it. Why is it so confusing? At a high level, it’s because np.linalg.solve and np.sum and multiplication (*) have complicated rules and weren’t designed to work together to solve this particular problem nicely. That would be impossible, because there are an infinite number of problems. So you need to mash the arrays around a lot to make those functions happy.
Without further ado, here’s how you solve this problem with DumPy (ostensibly Dynomight NumPy):
Those are both fully vectorized. No loops are executed behind the scenes. They’ll run on a GPU if you have one.
But how?
While it looks magical, the way this actually works is fairly simple:
If you index a DumPy array with a string (or a dp.Range object), it creates a special “mapped” array that pretends to have fewer dimensions.
When a DumPy function is called (e.g. dp.linalg.solve or dp.matmul (called with @)), it checks if any of the arguments have mapped dimensions. If so, it automatically vectorizes the computation, matching up mapped dimensions that share labels.
When you assign an array with mapped dimensions to a dp.Slot, it “unmaps” them into the positions you specify.
No evil meta-programming abstract syntax tree macro bytecode interception is needed. When you run this code:
(Click here for a version with a million asserts and comments.)
# first map A
a=A.map_axes([0,1],['i','j'])assertA.ndim==4asserta.ndim==2# pretends to have fewer dims
asserta.data.shape==A.shape# secret mapped data
asserta.axes==('i','j',None,None)# secret mapped axes
asserta.shape==(a.data.shape[2],a.data.shape[3])# shape determined by non-mapped (None) axes
# now map X
x=X.map_axes([0],['i'])assertX.ndim==2assertx.ndim==1assertx.data.shape==X.shapeassertx.axes==('i',None)assertx.shape==(x.data.shape[1],)# now map Y
y=Y.map_axes([0],['j'])assertY.ndim==2asserty.ndim==1asserty.shape==(Y.shape[1],)asserty.axes==('j',None)asserty.data.shape==Y.shapeasserty.shape==(y.data.shape[1],)# Actually do the computation. It happens that the 'j'
# dimension is stored first because its found first (in y).
# But you never need to think about that!
z=y@dp.linalg.solve(a,x)assertz.ndim==0assertz.shape==()assertz.axes==('j','i')assertz.data.shape==(Y.shape[0],X.shape[0])# unmap the mapped axes
Z=z.unmap('i','j')assertZ.ndim==2assertZ.shape==(X.shape[0],Y.shape[0])
Wait, but how?
It might seem like I’ve skipped the hard part. How does dp.linalg.solve know how to vectorize over any combination of input dimensions? Don’t I need to do that for every single function that DumPy includes? Isn’t that hard?
It is hard, but jax.vmap did it already. This takes a function defined using (JAX’s version of) NumPy and vectorizes it over any set of input dimensions. DumPy relies on this to do all the actual vectorization. (If you prefer your vmap janky and broken, I heartily recommend PyTorch’s torch.vmap.)
But hold on. If vmap already exists, then why do we need DumPy? Here’s why:
That’s how you solve the same problem with vmap. (And basically what DumPy does behind the scenes.)
I think vmap is one of the best parts of the NumPy ecosystem. The above code seems genuinely better than the base NumPy version. But it still involves a lot of thinking! Why put in_axes=[None, 0, 0] in the inner vmap and in_axes=[0, None, 0] in the outer one? Why are all the axes 0 even though you need to vectorize over the second dimension of A? There are answers, but they require thinking. Loops and indices are better.
A tiny bit of cleverness
OK, I did do one thing that’s a little clever. Say you want to create a Hilbert matrix with Hij = 1/(1+i+j). In base NumPy you’d have to do this:
Yes! That works! It works because a dp.Range acts both like a string and like an array mapped along that string. So the above code is roughly equivalent to:
In reality, the dp.Range choose random strings. (The class maintains a stack of active ranges to prevent collisions.) So in more detail, the above code becomes something like this:
To test if DumPy is actually better in practice, I took six problems of increasing complexity and implemented each of them using loops, NumPy, JAX (with vmap), and DumPy.
Hilbert matrices
Note that in these examples, I always assume the input arrays are in the class of the system being used. If you try running them, you’ll need to add some conversions with np.array / jnp.array / dp.Array.
# Loops
B=np.empty(N-window+1)foriinrange(N-window+1):B[i]=np.mean(A[i:i+window])# NumPy
i=np.arange(N-window+1)[:,None]j=np.arange(window)[None,:]B=np.mean(A[i+j],axis=-1)# JAX
idx=jnp.arange(window)B=jax.vmap(lambdai:jnp.mean(A[i+idx]),)(jnp.arange(N-window+1))# DumPy
windowed=dp.Slot()B=dp.Slot()withdp.Range(N-window+1)asi:withdp.Range(window)asj:windowed[i,j]=A[i+j]B[i]=dp.mean(windowed[i,:])# Note: B[i] = dp.mean(A[i:i+window])
# would not work because dp.Range can't be used in slice
The goal of this problem is, given a list of vectors and a list of Gaussians parameters, and arrays mapping each vector to a list of parameters, evaluate each corresponding vector/parameter combination. Formally, given 2D X, B, C, and means and 3D covs, the goal is to create A with
# Setup
input_dim=4seq_len=4d_k=5d_v=input_dimn_head=2X=np.random.randn(seq_len,input_dim)W_q=np.random.randn(n_head,input_dim,d_k)W_k=np.random.randn(n_head,input_dim,d_k)W_v=np.random.randn(n_head,input_dim,d_v)W_o=np.random.randn(n_head,d_v,input_dim//n_head)# Loops
defsoftmax_numpy(x,axis=-1):e_x=np.exp(x-np.max(x,axis=axis,keepdims=True))returne_x/np.sum(e_x,axis=axis,keepdims=True)defattention(X,W_q,W_k,W_v):Q=X@W_qK=X@W_kV=X@W_vscores=Q@K.T/np.sqrt(d_k)attention_weights=softmax_numpy(scores,axis=-1)output=attention_weights@Vreturnoutputdefmulti_head_attention_loops(X,W_q,W_k,W_v,W_o):projected=[]forninrange(n_head):my_output=attention(X,W_q[n,:,:],W_k[n,:,:],W_v[n,:,:])my_proj=my_output@W_o[n,:,:]projected.append(my_proj)projected=np.array(projected)final=[]foriinrange(seq_len):my_final=np.ravel(projected[:,i,:])final.append(my_final)returnnp.array(final)# NumPy
defsoftmax_numpy(x,axis=-1):# repeat
e_x=np.exp(x-np.max(x,axis=axis,keepdims=True))returne_x/np.sum(e_x,axis=axis,keepdims=True)defmulti_head_attention_numpy(X,W_q,W_k,W_v,W_o):Q=np.einsum('si,hij->hsj',X,W_q)K=np.einsum('si,hik->hsk',X,W_k)V=np.einsum('si,hiv->hsv',X,W_v)scores=Q@K.transpose(0,2,1)/np.sqrt(d_k)weights=softmax_numpy(scores,axis=-1)output=weights@Vprojected=np.einsum('hsv,hvd->hsd',output,W_o)returnprojected.transpose(1,0,2).reshape(seq_len,input_dim)# JAX
defsoftmax_jax(x,axis=-1):e_x=jnp.exp(x-jnp.max(x,axis=axis,keepdims=True))returne_x/jnp.sum(e_x,axis=axis,keepdims=True)defattention_jax(X,W_q,W_k,W_v):d_k=W_k.shape[-1]Q=X@W_qK=X@W_kV=X@W_vscores=Q@K.T/jnp.sqrt(d_k)attention_weights=softmax_jax(scores,axis=-1)output=attention_weights@Vreturnoutputdefmulti_head_attention_jax(X,W_q,W_k,W_v,W_o):defmyfun(X,w_q,w_k,w_v,w_o):returnattention_jax(X,w_q,w_k,w_v)@w_oprojected=jax.vmap(myfun,in_axes=[None,0,0,0,0])(X,W_q,W_k,W_v,W_o)returnjax.vmap(jnp.ravel,in_axes=1)(projected)# DumPy
defsoftmax_dumpy(x):assertx.ndim==1# no need to think about dimensions!
e_x=dp.exp(x-dp.max(x))returne_x/dp.sum(e_x)@dp.wrap# needed to make functions with Slots auto-vectorizing
defattention_dumpy(X,W_q,W_k,W_v):Q=X@W_qK=X@W_kV=X@W_vscores=Q@K.T/np.sqrt(d_k)attention_weights=dp.Slot()withdp.Range(seq_len)asi:attention_weights[i,:]=softmax_dumpy(scores[i,:])output=attention_weights@Vreturnoutputdefmulti_head_attention_dumpy(X,W_q,W_k,W_v,W_o):output=dp.Slot()projected=dp.Slot()final=dp.Slot()withdp.Range(n_head)asn:output[n,:,:]=attention_dumpy(X,W_q[n,:,:],W_k[n,:,:],W_v[n,:,:])projected[n,:,:]=output[n,:,:]@W_o[n,:,:]withdp.Range(seq_len)asi:final[i,:]=dp.ravel(projected[:,i,:])returnfinal# DumPy (alternate)
defmulti_head_attention(X,W_q,W_k,W_v,W_o):attn_weights=dp.Slot()projected=dp.Slot()final=dp.Slot()withdp.Range(n_head)asn:Q=X@W_q[n,:,:]K=X@W_k[n,:,:]V=X@W_v[n,:,:]scores=Q@K.T/np.sqrt(d_k)withdp.Range(seq_len)asi:attn_weights[n,i,:]=softmax_dumpy(scores[i,:])projected[n,:,:]=attn_weights[n,:,:]@V@W_o[n,:,:]withdp.Range(seq_len)asi:final[i,:]=dp.ravel(projected[:,i,:])returnfinal
I gave each implementation a subjective “goodness” score on a 1-10 scale. I always gave the best implementation for each problem 10 points, and then took off points from the others based on how much thinking they required.
Problem
Loops
Numpy
JAX (vmap)
DumPy
Hilbert matrices
10
7
7
10
Covariance
9
4
10
9
Moving Ave.
10
6
6
8
Indexing
10
5
4
10
Gaussians
10
3
6
10
Attention
10
1
8
10
Mean
9.8
4.3
6.8
9.5
According to this dubious methodology and these made-up numbers, DumPy is 96.93877% as good as loops! Knowledge is power! But seriously, while subjective, I don’t think my scores should be too controversial. The most debatable one is probably JAX’s attention score.
What to remove?
The only thing DumPy adds to NumPy is some nice notation for indices. That’s it.
What I think makes DumPy good is it also removes a lot of stuff. Roughly speaking, I’ve tried to remove anything that is confusing and exists because NumPy doesn’t have loops. I’m not sure that I’ve drawn the line in exactly the right place, but I do feel confident that I’m on the right track with removing stuff.
1. Goodbye broadcasting
In NumPy, A*B works if A and B are both scalar. Or if A is 5×1×6 and B is 5×1×6×1. But not if A is 1×5×6 and B is 1×5×6×1. Huh?
In truth, the broadcasting rules aren’t that complicated for scalar operations like multiplication. But still, I don’t like it, because every time you see A*B, you have to worry about what shapes those have and what the computation might be doing.
So, I removed it. In DumPy you can only do A*B if one of A or B is scalar or A and B have exactly the same shape. That’s it, anything else raises an error. Instead, use indices, so it’s clear what you’re doing. Instead of this:
C=A[...,None]*B[None]
write this:
C['i','j','k']=A['i','j']*B['j','k']
2. Goodbye fancy indexing
Indexing in NumPy is absurdly complicated. When you write A[B,C,D] that could do many different things depending on what all the shapes are. I considered going cold-turkey and only allowing scalar indices in DumPy. That wouldn’t have been so bad, since you can still do advanced stuff using loops. But it’s quite annoying to not be able to write A[B] when A and B are just simple 1D arrays.
So I’ve tentatively decided to be more pragmatic. In DumPy, you can index with integers, or slices, or (possibly mapped) Arrays. But only one Array index can be non-scalar. I settled on this because it’s the most general syntax that doesn’t require thinking.
Let me show you what I mean. If you see this:
A[1,1:6,C,2:10]# legal in both numpy and dumpy
It’s “obvious” what the output shape will be. (First the shape of 1:6, then the shape of C, then the shape of 2:10). Simple enough. But as soon as you have two multidimensional array inputs like this:
A[B,1:6,C,2:10]# legal in numpy, verboten in dumpy
Suddenly all hell breaks loose. You need to think about broadcasting between B and C, orthogonal vs. pointwise indices, slices behaving differently than arrays, and quirks for where the output dimensions go. So DumPy forbids this. Instead, you need to write one of these:
Oh, and one more thing! In DumPy, you must index all dimensions. In NumPy, if A has three dimensions, then A[2] is equivalent to A[2,:,:]. This is sometimes nice, but it means that every time you see A[2], you have to worry about how many dimensions A has. In DumPy, every time you index an array or assign to a dp.Slot, it checks that all indices have been included. So when you see option (4) above, you know that:
A has 4 dimensions
B has 2 dimensions
C has 1 dimension
D has 4 dimensions
Always, always, always. No cases, no thinking.
3. Goodbye complicated functions
Again, many NumPy functions have complex conventions for vectorization. np.linalg.solve sort of says, “If the inputs have ≤2 dimensions, do the obvious thing. Otherwise, do some extremely confusing broadcasting stuff.” DumPy removes the confusing broadcasting stuff. When you see dp.linalg.solve(A,B), you know that A and B have no more than two dimensions, so nothing tricky is happening.
Similarly, in NumPy, A @ B is equivalent to np.matmul(A,B). When both inputs have ≤2 or fewer dimensions, this does the “obvious thing”. (Either an inner-product or some kind of matrix/vector multiplication.) Otherwise, it broadcasts or vectorizes or something? I can never remember. In DumPy you don’t have that problem, because it restricts A @ B to arrays with one or two dimensions only.
If you need more dimensions, no problem: Use indices.
Why remove?
It might seem annoying to remove features, but I’m telling you: Just try it. If you program this way, a wonderful feeling of calmness comes over you, as class after class of possible errors disappear.
Put another way, why remove all the fancy stuff, instead of leaving it optional? Because optional implies thinking! I want to program in a simple way. I don’t want to worry that I’m accidentally triggering some confusing broadcasting insanity, because that would be a mistake. I want the computer to help me catch mistakes, not silently do something weird that I didn’t intend.
In principle, it would be OK if there was a evil_solve method that preserves all the confusing batching stuff. If you really want that, you can make it yourself:
evil_solve=dp.MappedFunction(jnp.linalg.solve)# not recommended
You can use that same wrapper to convert any JAX NumPy function to work with DumPy.
Discussion
Think about math: In two or fewer dimensions, coordinate-free linear algebra notation is wonderful. But for higher dimensional tensors, there are just too many cases, so most physicists just use coordinates.
So this solution seems pretty obvious to me. Honestly, I’m a little confused why it isn’t already standard. Am I missing something?
What about APL?
When I complain about NumPy, many people often suggest looking into APL-type languages, like A, J, K, or Q. (All single-letter languages are APL-like, except C, D, F, R, T, X, and many others. Convenient, right?) The obvious disadvantages of these are that:
They’re unfamiliar.
The code looks like gibberish.
They don’t usually provide autodiff or GPU execution.
None of those bother me. If the languages are better, we should learn to use them and make them do autodiff on GPUs. But I’m not convinced they are better. When you actually learn these languages, what you figure out is that the symbol gibberish basically amounts to doing the same kind of dimension mashing that we saw earlier in NumPy:
The reason is that, just like NumPy and vmap, these languages choose align dimensions by position, rather than by name. If I have to mash dimensions, I want to use the best tool. But I’d prefer not to mash dimensions at all.
What about named dimensions?
People also often suggest “NumPy with named dimensions” as in xarray. (PyTorch also has a half-hearted implementation.) Of course, DumPy also uses named dimensions, but there’s a critical difference. In xarray, they’re part of the arrays themselves, while in DumPy, they live outside the arrays.
In some cases, permanent named dimensions are very nice. But for linear algebra, they’re confusing. For example, suppose A is 2-D with named dimensions "cat" and "dog". Now, what dimensions should ATA have? ("dog" twice?) Or say you take a singular value decomposition like U, S, Vh = svd(A). What name should the inner dimensions have? Does the user have to specify it?
I haven’t seen a nice solution. xarray doesn’t focus on linear algebra, so it’s not much of an issue there. A theoretical “DumPy with permanent names” might be very nice, but I’m not sure how it should work. This is worth thinking about more.
What about Julia or [other language]
I like Julia! Loops are fast in Julia! But again, I don’t think fast loops matter that much, because I want to move all the loops to the GPU. So even if I was using Julia, I think I’d want to use a DumPy-type solution.
I think Julia might well be a better host language than Python, but it wouldn’t be because of fast loops, but because it offers much more powerful meta-programming capabilities. I built DumPy on top of JAX just because JAX is very mature and good at calling the GPU, but I’d love to see the same idea used in Julia (“Dulia”?) or other languages.
Prototype
OK, I promised a link to my prototype, so here it is: dumpy.py
It’s just a single file with around 700 lines. I’m leaving it as a single file because I want to stress that this is just something I hacked together in the service of this rant. I wanted to show that I’m not totally out of my mind, and that doing all this is actually pretty easy.
I stress that I don’t really intend to update or improve this. (Unless someone gives me a lot of money?) So please do not attempt to use it for “real work”, and do not make fun of my code.
PS. DumPy works out of the box with both jax.jit and jax.grad. For gradients, you need to either cast the output to a JAX scalar or use the dp.grad wrapper.
PPS. If you like this, you may also like einx or torchdim.
Update: Due to many requests, I have turned this into a “real” package, available on PyPi as dumpy-numpy. You can install it by typing:
pip install dumpy-numpy
Or, if you use uv (you should) you can play around with DumPy by just typing this one-liner in your terminal:
They say you can’t truly hate someone unless you loved them first. I don’t know if that’s true as a general principle, but it certainly describes my relationship with NumPy.
NumPy, by the way, is some software that does computations on arrays in Python. It’s insanely popular and has had a huge influence on all the popular machine learning libraries like PyTorch. These libraries share most of the same issues I discuss below, but I’ll stick to NumPy for concreteness.
NumPy makes easy things easy. Say A is a 5×5 matrix, x is a length-5 vector, and you want to find the vector y such that Ay=x. In NumPy, that would be:
y=np.linalg.solve(A,x)
So elegant! So clear!
But say the situation is even a little more complicated. Say A is a stack of 100 5×5 matrices, given as a 100×5×5 array. And say x is a stack of 100 length-5 vectors, given as a 100×5 array. And say you want to solve Aᵢyᵢ=xᵢ for 1≤i≤100.
But you can’t use loops. To some degree, this is a limitation of loops being slow in Python. But nowadays, everything is GPU and if you’ve got big arrays, you probably don’t want to use loops in any language. To get all those transistors firing, you need to call special GPU functions that will sort of split up the arrays into lots of little pieces and process them in parallel.
The good news is that NumPy knows about those special routines (at least if you use JAX or CuPy), and if you call np.linalg.solve correctly, it will use them.
No one knows. And let me show you something else. Here’s the documentation:
Read that. Meditate on it. Now, notice: You still don’t know how to solve Aᵢyᵢ=xᵢ for all i at once. Is it even possible? Did I lie when I said it was?
As far as I can tell, what people actually do is try random variations until one seems to work.
Why NumPy bad
NumPy is all about applying operations to arrays. When the arrays have 2 or fewer dimensions, everything is fine. But if you’re doing something even mildly complicated, you inevitably find yourself with some operation you want to apply to some dimensions of array A, some other dimensions of array B, and some other dimensions of array C. And NumPy has no theory for how to express that.
Let me show you what I mean. Suppose:
A is a K×L×M array
B is a L×N array
C is a K×M array
And say that for each k and n, you’d like to compute the mean over the L and M dimensions. That is, you want
Dkn = 1/(LM) × ∑lm Aklm Bln Ckm.
To do that, you’ve got two options. The first is to use grotesque dimension alignment tricks:
The hell, you ask? Why is None everywhere? Well, when indexing an array in NumPy, you can write None to insert a new dimension. A is K×L×M, but A[:,:,:,None] is K×L×M×1. Similarly, B[None,:,None,:] is 1×L×1×N and C[:,None,:,None] is K×1×M×1. When you multiply these together, NumPy “broadcasts” all the size-1 dimensions to give a K×L×M×N array. Then, the np.mean calls average over the L and M dimensions.
I think this is bad. I’ve been using NumPy for years and I still find it impossible to write code like that without always making mistakes.
It’s also borderline-impossible to read. To prove this, I just flipped a coin and introduced a bug above if and only if the coin was tails. Is there a bug? Are you sure? No one knows.
Your second option is to desperately try to be clever. Life is short and precious, but if you spend a lot of yours reading the NumPy documentation, you might eventually realize that there’s a function called np.tensordot, and that it’s possible to make it do much of the work:
That’s correct. (I promise.) But why does it work? What exactly is np.tensordot doing? If you saw that code in some other context, would you have the slightest idea what was happening?
People who’ve written too much NumPy may find that clunky. I suspect that’s a wee bit of Stockholm Syndrome. But surely we can agree that it’s clear.
In practice, things are often even worse. Say that A had shape M×K×L rather than K×L×M. With loops, no big deal. But NumPy requires you to write monstrosities like A.transpose([1,2,0]). Or should that be A.transpose([2,0,1])? What shapes do those produce? No one knows.
Loops were better.
OK I lied
There is a third option:
D=1/(L*M)*np.einsum('klm,ln,km->kn',A,B,C)
If you’ve never seen Einstein summation before, that might look terrifying. But remember, our goal is to find
Dkn = 1/(LM) × ∑lm Aklm Bln Ckm.
The string in the above code basically gives labels to the indices in each of the three inputs (klm,ln,km) and the target indices for the output (->kn). Then, np.einsum multiplies together the corresponding elements of the inputs and sums over all indices that aren’t in the output.
Personally, I think np.einsum is one of the rare parts of NumPy that’s actually good. The strings are a bit tedious, but they’re worth it, because the overall function is easy(ish) to understand, is completely explicit, and is quite general and powerful.
Except, how does np.einsum achieve all this? It uses indices. Or, more precisely, it introduces a tiny domain-specific language based on indices. It doesn’t suffer from NumPy’s design flaws because it refuses to play by NumPy’s normal rules.
But np.einsum only does a few things. (Einops does a few more.) What if you want to apply some other function over various dimensions of some arrays? There is no np.linalg.einsolve. And if you create your own function, there’s certainly no “Einstein” version of it.
I think np.einsum’s goodness shows that NumPy went somewhere.
Intermission
Here’s a painting which feels analogous to our subject.
Where did NumPy go wrong?
Here’s what I want from an array language. I ain’t particular about syntax, but it would be nice if:
When you want to do something, it’s “obvious” how to do it.
When you read some code, it’s “obvious” what it does.
Wouldn’t that be nice? I think NumPy doesn’t achieve these because of its original sin: It took away indices and replaced them with broadcasting. And broadcasting cannot fill indices’ shoes.
I don’t love NumPy broadcasting
NumPy’s core trick is broadcasting. Take this code:
Here, A is a 3×2 array, and B is a length-2 array. When you multiply them together, B is “broadcast” to the shape of A, meaning the first column of A is multiplied with B[0]=10 and the second is multiplied with B[1]=20.
In simple cases, this seems good. But I don’t love it. One reason is that, as we saw above, you often have to do gross things to the dimensions to get them to line up.
Another reason is that it isn’t explicit or legible. Sometimes A*B multiplies element-by-element, and sometimes it does more complicated things. So every time you see A*B, you have to figure out which case in the broadcasting conventions is getting triggered.
But the real problem with broadcasting is how it infects everything else. I’ll explain below.
It turns out the answer is 10×2×3×40. That’s because the i and j indices get broadcast to a shape of 2×3 and then something something mumble mumble mumble. Try to convince yourself it makes sense.
Done? OK, now try these:
C=A[:,:,i,j]D=A[:,i,:,j]E=A[:,1:4,j,:]
What shapes do these have?
C is 10×20×2×3. This seems logical, given what happened with B above.
What about D? It is 2×3×10×30. Now, for some reason, the 2 and 3 go at the beginning?
And what about E? Well, “slices” in Python exclude the endpoint, so 1:4 is equivalent to [1,2,3] which is equivalent to i, and so E is the same as B. Hahaha, just kidding! E is 10×3×2×1×40.
Yes, that is what happens. Try it if you don’t believe me! I understand why NumPy does this, because I’ve absorbed this 5000 word document that explains how NumPy indexing works. But I want that time back.
For fun, I tried asking a bunch of AI models to figure out what shapes those arrays have. Here were the results:
I used this query:
Take this python code
A = np.ones((10,20,30,40))
i = np.array([1,2,3])
j = np.array([[0],[1]])
B = A[:,i,j,:]
C = A[:,:,i,j]
D = A[:,i,:,j]
E = A[:,1:4,j,:]
what shapes do B, C, D, and E have?
Claude 3.7 used “extended thinking”. Here are all the incorrect outputs:
AI
B
C
D
E
GPT 4.1
10×2×3×30
Grok 3
10×3×30×2
10×3×2×40
Claude 3 Opus
10×3×2×30
10×20×3×2
10×3×30×2
10×3×2×40
Llama 4 Maverick
10×3×30×2
10×3×2×40
o3
10×2×3×30
Claude 3.7
10×3×30×2
10×3×2×40
AI
B
C
D
E
GPT 4.1
✔️
✔️
X
✔️
Grok 3
✔️
✔️
X
X
Claude 3 Opus
X
X
X
X
Llama 4 Maverick
✔️
✔️
X
X
o3
✔️
✔️
X
✔️
Claude 3.7
✔️
✔️
X
X
Gemini 2.5 Pro
✔️
✔️
✔️
✔️
DeepSeek R1
✔️
✔️
✔️
✔️
(DeepSeek’s chain of thought used “wait” 76 times. It got everything right the first time, but when I tried it again, it somehow got B, C, and D all wrong, but E right.)
This is insane. Using basic features should not require solving crazy logic puzzles.
You might think, “OK, I’ll just limit myself to indexing in simple ways.” Sounds good, except sometimes you need advanced indexing. And even if you’re doing something simple, you still need to be careful to avoid the crazy cases.
This again makes everything non-legible. Even if you’re just reading code that uses indexing in a simple way, how do you know it’s simple? If you see A[B,C], that could be doing almost anything. To understand it, you need to remember the shapes of A, B, and C and work through all the cases. And, of course, A, B, and C are often produced by other code, which you also need to think about…
I don’t like NumPy functions
Why did NumPy end up with a np.linalg.solve(A,B) function that’s so confusing? I imagine they first made it work when A is a 2D array and and b is a 1D or 2D array, just like the mathematical notation of A⁻¹b or A⁻¹B.
So far so good. But then someone probably came along with a 3D array. If you could use loops, the solution would be “use the old function with loops”. But you can’t use loops. So there were basically three options:
They could add some extra axes argument, so the user can specify which dimensions to operate over. Maybe you could write solve(A,B,axes=[[1,2],1]).
They could create different functions with different names for different situations. Maybe solve_matrix_vector would do one thing, solve_tensor_matrix would do another.
They could add a Convention: Some arbitrary choice for how solve will internally try to line up the dimensions. Then it’s the user’s problem to figure out and conform to those Conventions.
All these options are bad, because none of them can really cope with the fact that there are a combinatorial number of different cases. NumPy chose: All of them. Some functions have axes arguments. Some have different versions with different names. Some have Conventions. Some have Conventions andaxes arguments. And some don’t provide any vectorized version at all.
But the biggest flaw of NumPy is this: Say you create a function that solves some problem with arrays of some given shape. Now, how do you apply it to particular dimensions of some larger arrays? The answer is: You re-write your function from scratch in a much more complex way. The basic principle of programming is abstraction—solving simple problems and then using the solutions as building blocks for more complex problems. NumPy doesn’t let you do that.
Attention please
One last example to show you what I’m talking about. Whenever I whine about NumPy, people always want to see an example with self-attention, the core trick behind modern language models. So fine. Here’s an implementation, which I humbly suggest is better than all 227 versions I found when I searched for “self-attention numpy”:
# self attention by your friend dynomight
input_dim=4seq_len=4d_k=5d_v=input_dimX=np.random.randn(seq_len,input_dim)W_q=np.random.randn(input_dim,d_k)W_k=np.random.randn(input_dim,d_k)W_v=np.random.randn(input_dim,d_v)defsoftmax(x,axis):e_x=np.exp(x-np.max(x,axis=axis,keepdims=True))returne_x/np.sum(e_x,axis=axis,keepdims=True)defattention(X,W_q,W_k,W_v):d_k=W_k.shape[1]Q=X@W_qK=X@W_kV=X@W_vscores=Q@K.T/np.sqrt(d_k)attention_weights=softmax(scores,axis=-1)returnattention_weights@V
This is fine. Some of the axis stuff is a little obscure, but whatever.
But what language models really need is multi-head attention, where you sort of do attention several times in parallel and then merge the results. How do we do that?
First, let’s imagine we lived in a sane world where we were allowed to use abstractions. Then you could just call the previous function in a loop:
# multi-head self attention by your friend dynomight
# if only we could use loops
n_head=2X=np.random.randn(seq_len,input_dim)W_q=np.random.randn(n_head,input_dim,d_k)W_k=np.random.randn(n_head,input_dim,d_k)W_v=np.random.randn(n_head,input_dim,d_v)W_o=np.random.randn(n_head,d_v,input_dim//n_head)defmulti_head_attention(X,W_q,W_k,W_v,W_o):projected=[]forninrange(n_head):output=attention(X,W_q[n,:,:],W_k[n,:,:],W_v[n,:,:])my_proj=output@W_o[n,:,:]projected.append(my_proj)projected=np.array(projected)output=[]foriinrange(seq_len):my_output=np.ravel(projected[:,i,:])output.append(my_output)returnnp.array(output)
Looks stupid, right? Yes—thank you! Cleverness is bad.
But we don’t live in a sane world. So instead you need to do this:
# multi-head self attention by your friend dynomight
# all vectorized and bewildering
defmulti_head_attention(X,W_q,W_k,W_v,W_o):d_k=W_k.shape[-1]Q=np.einsum('si,hij->hsj',X,W_q)K=np.einsum('si,hik->hsk',X,W_k)V=np.einsum('si,hiv->hsv',X,W_v)scores=Q@K.transpose(0,2,1)/np.sqrt(d_k)weights=softmax(scores,axis=-1)output=weights@Vprojected=np.einsum('hsv,hvd->hsd',output,W_o)returnprojected.transpose(1,0,2).reshape(seq_len,input_dim)
Ha! Hahahahahaha!
So what then?
To be clear, I’m only suggesting that NumPy is “the worst array language other than all the other array languages”. What’s the point of complaining if I don’t have something better to suggest?
Well, actually I do have something better to suggest. I’ve made a prototype of a “better” NumPy that I think retains all the power while eliminating all the sharp edges. I thought this would just be a short motivational introduction, but after I started writing, the evil took hold of me and here we are 3000 words later.
Also, it’s probably wise to keep some distance between one’s raving polemics and one’s constructive array language API proposals. So I’ll cover my new thing next time.