ΨPsychology, Built

Act V · Thinking

Part 23 of 62

Language

Psych 101 and the majorstarts at this level42 min of film16 chaptersprerequisites: none

How does a child who hears a finite number of sentences come to understand an infinite number?

In 1959 a thirty-year-old linguist reviews Skinner's book on verbal behaviour: almost every sentence is new, so reinforcement cannot explain it, and the argument over what is built in and what is learned from statistics begins. Language is productive at every level, as wugs show. Words follow Zipf's law, and so does a typing monkey. Common words are read faster, a spoken word narrows a cohort, and a network in which words feed back into letters explains why a letter is easier to see inside a word. Readers commit as they go, garden paths make them pay, and the surprisal of every word of ten stories, from a trigram model of thirty novels, predicts how long people spend on the next one. Infants find words in two minutes of a made-up language by transitional probabilities. A network learns the past tense in a U, and the rules-or-associations argument follows. Learning a grammar gets harder with age, late into the teens; language has its own network in the brain; and claims that a language reshapes colour vision or executive control mostly failed. Language models learn grammar from text, at thousands of times a child's input, and fit readers worse as they grow.

What you need. Part 14's inference, Part 16's delta rule, Part 20's search and Part 22's size principle. Logarithms, conditional probability and least squares.

Hook
Chomsky reviews Skinner, 1959
Ideas, models and mathematics
levels and productivity, Zipf's law and a typing monkey, the mental lexicon and the cohort, interactive activation, garden paths, surprisal fitted to the Natural Stories reading times, statistical segmentation, the past-tense debate, critical periods, the language network and the N400, language and thought
Psyche gains
Zipf fits, interactive activation, a Kneser-Ney surprisal reader, a transitional-probability segmenter, a past-tense learner
On you
find the words of a made-up language

What you will be able to do

Psych 101 and the major

  • Describe the levels of language, productivity, and the evidence from children's errors.
  • Explain word superiority, garden paths and the cohort model.
  • Describe statistical learning, critical periods and the language network.

Graduate

  • Fit Zipf's law and explain why a random typist obeys it too.
  • Run the interactive activation model and read out a forced choice.
  • Fit reading times to n-gram surprisal with length and frequency controlled.

Research

  • Derive surprisal as a change of belief, and Gold's learnability limit.
  • Build a past-tense learner and explain where its U-shaped curve comes from.

Practice

  • Judge a readability formula against a reader-based measure.
  • Evaluate claims about bilingual advantages and linguistic relativity.

Contents

Each chapter has a home level. Choose a track to see what to read and watch: Psych 101 and the major 29 min · Graduate 31 min · Research 42 min · Practice 31 min.

  1. 0Colorless green ideasPsych 101 and the major3 min
  2. 1Levels and productivityPsych 101 and the major3 min
  3. 2The mental lexiconPsych 101 and the major2 min
  4. 3Recognizing a wordPsych 101 and the major3 min
  5. 4Sentences in real timePsych 101 and the major2 min
  6. 5The cost of a surprising wordResearch3 min
  7. 6Finding the wordsPsych 101 and the major2 min
  8. 7How children learn a languagePsych 101 and the major3 min
  9. 8Rules or associations?Research3 min
  10. 9A critical period?Psych 101 and the major2 min
  11. 10Language in the brainPsych 101 and the major2 min
  12. 11Language and thoughtResearch3 min
  13. 12The LedgerPsych 101 and the major3 min
  14. 13In practice: speech, reading, aphasiaPractice2 min
  15. 14Frontier: what language models showResearch3 min
  16. Recap, problems, and the road aheadAll tracks3 min

Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · Build the film.

Lecture

The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film. A dashed box stands for a number the film computes when it is rendered (hover over it to see what is computed); the README's figures for each chapter, where it lists them, follow the chapter's text.

Colorless green ideasPsych 101 and the major3 min

In 1957 B. F. Skinner, the most famous psychologist in America, published a book explaining language as behaviour shaped by reinforcement, like a pigeon's peck. Two years later a thirty-year-old linguist named Noam Chomsky reviewed it, in thirty-three pages that are still read. His central point was simple. Almost every sentence you hear or say is new. You have never met it before, so no history of reinforcement can have shaped it. And children learn a language fast, from whatever they happen to hear, and all end up with much the same grammar. The review helped start cognitive science. The argument it began, about how much of language is built in and how much is learned from statistics, has now run for nearly seventy years, and machines have joined it.

Chomsky's most famous example came from his book of 1957. Colorless green ideas sleep furiously. Now reverse it: furiously sleep ideas green colorless. Neither sentence had ever been said before, and both mean nothing. Yet everyone who speaks English knows that the first is English and the second is not. So knowing a language is more than knowing which strings of words you have heard. Whether it's more than statistics is another question, and this part ends with machines that learn only statistics.

Before going on, an experiment on you. Here is a stream of syllables from a language you don't know. There are no spaces and no pauses. Just read the syllables in your head as they go past. Keep reading. Now a question. Which of these two was a word of the language: golabu, or labubi? Pick one, and keep it in mind. Chapter six will tell you whether you were right, and how an eight-month-old does it.

This part asks how a finite experience gives an infinite language. We'll start with the levels of language, from sounds to meaning, and the productivity at each level. Then reading: a network that recognizes words, and the cost of a surprising word, measured in thousands of reading times. Then learning: finding words in a stream, the most argued-over network in psychology, and whether there is a critical period. Then language in the brain, and whether your language shapes how you think. And finally what machines that learn language from text alone tell us about all of it.

This is Part 23 of Psychology, Built, the sixth part of Act Five, on thinking: language. We'll compute Zipf's law for thirty novels and for a monkey at a typewriter. We'll build the interactive activation model and watch it read. We'll measure the surprise of every word in ten stories and fit it to how long people looked at each one. We'll find words in a stream by statistics alone, and watch a network learn the past tense, and unlearn it. Then critical periods, the brain's language network, and the old question of whether language shapes thought.

What it does: Skinner and Chomsky; a sentence never said; a test on you; the questions; objectives

1Levels and productivityPsych 101 and the major3 min

What do you know when you know a language? Linguists split it into levels. Sounds: a small set of contrasts, like the b and p that make bat and pat different words. Parts of words: unhappiness is un, happi and ness. Words: an adult reader knows tens of thousands. Sentences: the dog bit the man is not the man bit the dog, though the words are the same. Meaning: what a sentence says about the world. And use: can you pass the salt is not a question about your arm. At every level, units combine by rules into more than you could ever list. That is productivity, and it is what Chomsky meant.

In 1958 Jean Berko found a way to see productivity in children. She showed them a picture of a made-up creature: this is a wug. Then two of them: now there are two of them. There are two what? Children answered wugs, with the right ending, for a word they had never heard. They did the same for verbs: a man who knows how to rick, did the same thing yesterday. He ricked. They were applying rules to new words, not repeating forms they had heard. And children also make forms no adult says, like goed and mouses, which will matter in chapter eight.

Words have statistics, and the most famous is Zipf's law. Here are thirty novels, about four million words of sixty thousand kinds. Rank the words by how often they occur: the, and, to, of, a. On logarithmic axes the frequencies fall on a straight line: frequency is a power of rank, with exponent . George Kingsley Zipf found this in many languages and thought it revealed a principle of least effort. But in 1957 George Miller pointed out that a monkey typing letters and spaces at random produces a power law too. Here it is, exponent , in steps. So the law by itself shows little about minds. What words are, and how people use them, needs more than a straight line on a log plot.

What it does: Sounds, words, sentences and meaning; the wug test; Zipf's law in the novels and from a monkey

2The mental lexiconPsych 101 and the major2 min

Somewhere you store tens of thousands of words, and you find each one in a fraction of a second. Here is one measure of how. The Natural Stories corpus is ten short stories, ten thousand words, each shown one word at a time to readers who press a key for the next. Each word was read by about people. Common words are read faster. Holding length fixed, each tenfold rise in a word's frequency saves about milliseconds. Longer words take longer, a few milliseconds a letter. In lexical decision, where people judge whether a string is a word, the frequency effect is much larger. Looking a word up is a large part of reading it, and frequent words are found faster, as if the lexicon were sorted by use.

Speech brings a different problem: a spoken word arrives over time, one sound after another. William Marslen-Wilson proposed in 1978 that as a word begins, every word that fits its start is activated at once: the cohort. Each new sound throws out the words that no longer fit. Here letters stand in for sounds, in a lexicon of thirty thousand words. After t, more than a thousand candidates. After t r e, fifty-four. By the fifth letter only trespass and its own forms are left. People often recognize a spoken word before it has finished, around this uniqueness point. The TRACE model does this with competing units and feedback between levels, the same idea as the model of reading in the next chapter.

What it does: Frequency and length against reading time in Natural Stories; the cohort of a spoken word

3Recognizing a wordPsych 101 and the major3 min

Here is a puzzle about reading. In 1969 Gerald Reicher, and in 1970 Daniel Wheeler, flashed a word, such as work, or a single letter, such as K, for a fraction of a second. A mask of hash marks followed. Then people chose which letter had been in the last position: K or D? The trick is that both choices make a word, work and word, so knowing English can't help you guess. Yet people reported the letter more accurately when it was inside a word than when it was shown alone. Seeing the whole helped them see the part. How can that be, if you read a word by first reading its letters?

In 1981 James McClelland and David Rumelhart answered with a network. It has three levels: features of letters, such as a vertical stroke on the left; letters, in each of four positions; and words. Units that are consistent excite each other: a vertical stroke excites K, and K in the fourth position excites work. Inconsistent units inhibit. Within the word level, every word inhibits every other, so words compete. And words send activation back down to their letters. That downward arrow is the key. Each unit sums its excitation and inhibition from the units that are active, moves its activation toward its maximum or minimum in proportion, and decays toward rest. We use the parameters McClelland and Rumelhart published, with common words resting a little higher than rare ones.

Now let Psyche read. When work is shown, its four letters activate the word work. Within a few cycles work is the most active word, and it begins sending activation back to its own letters, including the K. So the K inside the word rises faster and higher than a K shown alone, and it is higher when the mask arrives and starts to wipe the letters out. Read out as Reicher's two-way choice, the word condition is up to points more accurate, and a non-word like O W R K gives no advantage at all. The effect is smaller than in people, but its cause is plain to see: knowledge of words flows down into the seeing of letters. Perception is not only bottom up, a theme from Part 14 that returns at every level of language.

What it does: Reicher's paradigm; the interactive activation model derived; letters helped by words, run

4Sentences in real timePsych 101 and the major2 min

Sentences arrive one word at a time, and you understand them as they come, which has a cost. Read this: the horse raced past the barn. Fell. Most people stumble, or decide it isn't English. But it is. Raced can be a passive, as in the horse that was raced past the barn fell. Or: the old man the boats. The old man is a noun phrase, until man turns out to be the verb. Thomas Bever called these garden-path sentences. Readers commit to one analysis as they go, and pay when it turns out to be wrong.

How do we know when the cost is paid? By watching the eyes. An eye tracker records where the eyes stop, for how long, and when they jump backwards. In 1982 Lyn Frazier and Keith Rayner showed that at the word that breaks the first analysis, fixations get longer and the eyes often go back to earlier words. Since Jay always jogs a mile seems like a short distance: a mile is first taken as what Jay jogs, and seems forces a new structure. The path drawn here is a schematic of that pattern, not a recorded reader.

One way to measure surprise is with a language model. Psyche trains a trigram model on the thirty novels: the probability of each word given the two before it. Surprisal is minus the log of that probability, in bits. Here are the two horse sentences, word by word. Fell costs bits in both, exactly the same, because the model sees only the barn. The garden path lives in structure that two words of context cannot hold. John Hale showed in 2001 that surprisal computed from a probabilistic grammar does spike at fell. Better models see more. The next chapter measures the cost of surprise across thousands of real words, where even a trigram does surprisingly well.

What it does: Garden paths; eye movements at the breaking word; a trigram model's surprisal, and what it cannot see

5The cost of a surprising wordResearch3 min

Surprisal turns this into a theory. John Hale proposed in 2001 that the effort a word takes is its surprisal: minus the log of how probable it was, given everything that came before. Roger Levy showed in 2008 why that might be. Suppose a reader keeps a probability over every possible analysis of the sentence so far. When the next word arrives, the belief must be updated, and the size of the update, measured as a relative entropy, is exactly the word's surprisal. One quantity then covers garden paths, predictable words and everything in between, and the theory says reading time grows in proportion to it. Best of all, it can be tested on any text, with any language model, against any reading times.

Here is the start of the first story in the Natural Stories corpus: if you were to journey to the north of England. Above, each word's surprisal under Psyche's trigram model of the novels. Journey is the surprising one, at bits; you and the are almost free. Below, the mean time readers spent on each word. Word by word it is noisy: reading times depend on length, on frequency, on where a reader's attention happens to be. To see the relation, we need all ten thousand words at once.

Here they are. All ten thousand words, sorted into ten groups by surprisal, from the most predictable tenth to the least. Mean reading time rises steadily, by about milliseconds across the range. But surprising words also tend to be long and rare, which slows reading on its own. Fit everything together, and with length and frequency held fixed, the cost of surprise appears on the word after the surprising one: milliseconds per bit, very reliably, and nothing on the word itself. That's typical of self-paced reading, where people press for the next word before they have finished with this one. Eye-tracking studies see the cost sooner. Nathaniel Smith and Roger Levy found the relation is linear in surprisal across a range of probabilities spanning six orders of magnitude, as the theory says. A trigram model is crude, and still it captures something real about what readers expect.

What it does: Surprisal derived as a change of belief; a story word by word; the fit to ten thousand words

6Finding the wordsPsych 101 and the major2 min

In the stream at the start of this part, which was a word: golabu or labubi? Golabu. Labubi straddled the end of one word and the start of another. The stream was four made-up words, tupiro, golabu, bidaku and padoti, in random order with no pauses. In 1996 Jenny Saffran, Richard Aslin and Elissa Newport played two minutes of a stream like this to twenty-four eight-month-old infants. Then they played words and part-words, one at a time, and measured how long the infants kept looking toward the sound. The infants listened longer to the part-words, the sequences that were new to them. They had found the words, after two minutes, with no meaning and no pauses, using only the statistics of which syllable follows which.

Here's the statistic. The transitional probability from one syllable to the next is how often the pair occurs, divided by how often the first syllable does. Inside a word the next syllable is certain: tu is always followed by pi. Across a word boundary, the next syllable could start any of the other three words, so the probability is about a third. Cut wherever it dips, and the stream falls apart into words. Part-words, which straddle a dip, score lower than words. Psyche needs nothing else.

How much exposure does it take? Psyche's segmenter finds the words reliably after a few dozen words of the stream. The infants heard about a hundred and eighty. Later studies found the same kind of learning with tones and shapes, and in other animals: a general statistical learner, not only a linguistic one. How strong is the infant evidence? In 2017 Black and Bergmann pooled the studies in a meta-analysis. They found a small, reliable effect for close replications of the original, and no reliable effect across all the designs that use transitional probabilities. And real speech has words of every length, spoken by many voices, so a dip in probability is a clue to a word boundary, not a recipe.

What it does: Saffran, Aslin and Newport; transitional probabilities derived; segmentation run; the meta-analysis

7How children learn a languagePsych 101 and the major3 min

Children do all of this in about two years. Babbling from about six months, first words around the first birthday, a spurt in vocabulary in the second year, two-word combinations, and then grammar: endings, questions, clauses within clauses. These are typical ranges, and individual children vary widely. Every typically developing child, in every language, passes these points in this order. And nobody teaches grammar to a two-year-old. Corrections of grammar are rare, and children mostly ignore them.

Chomsky's strongest argument is about learning. Every sentence a child hears is consistent with the target language, and also with every larger language that contains it. Without being told which sentences are not allowed, what stops a child from settling on a language that is too big? In 1967 Mark Gold proved that a learner given only examples cannot be guaranteed to identify the right language in many such families. Chomsky concluded that children must bring constraints of their own, a universal grammar, which rules out most of the possible languages in advance. The reply is statistical. A learner that expects grammatical sentences to turn up notices which ones never do. If a construction should have appeared a hundred times by now and hasn't, that is evidence. Probability turns silence into a kind of negative evidence, and with it, the learning problem becomes far easier. The argument continues, and this chapter's frontier is machines that learn from text alone.

Words are learned both fast and slowly. In 1978 Susan Carey and Elsa Bartlett told preschoolers once, in passing, bring me the chromium tray, not the red one. A week later many children still knew something about the new colour word. One exposure starts a word; many more finish it. Inference helps: the size principle of Part 22, and the assumption that a new word names something that doesn't have a name yet. And input matters. Betty Hart and Todd Risley recorded forty-two families in 1995 and estimated a large gap in the words children heard by age three, often quoted as thirty million. Later studies disagree about its size, which depends on what is counted as speech to a child. That the amount and kind of talk a child hears matters is not in dispute; how much, and how it should change policy, is Part 54's question.

What it does: Milestones; the poverty of the stimulus, Gold's theorem and its answers; fast mapping and the input

8Rules or associations?Research3 min

Children's errors are the best evidence about what they learn. Young children often say went correctly. Then, for a while, they also say goed. Later went comes back. That's the famous U-shaped curve. The goed stage looks like a rule being learned, add ed, and applied too widely. How deep is the dip? Gary Marcus and colleagues counted it in the recorded speech of twenty-five children in 1992. Over-regularization averaged only 4.2 percent of the irregular past tenses they used. So the dip is real but shallow: errors at a low rate across years, not a collapse. The curve drawn here is a schematic of the pattern.

In 1986 David Rumelhart and James McClelland built a network that learned the past tense with no rule anywhere in it. Psyche's version is smaller. Each verb comes in two ways at once: a unit for the verb itself, and units for its last letters, shared with every verb that ends the same way. The output picks add ed, or one of the irregular forms. First it learns ten common verbs, mostly irregular, like go, be and have, and learns them by heart. Then the vocabulary floods with regular verbs. The add ed answer starts to win through the shared endings, and for a while the irregulars slip: the network says goed. With more training, each verb's own unit wins back its form. A U-shaped curve, from a single mechanism with no rule in it.

The network started the most argued-over debate in cognitive science. In 1988 Steven Pinker and Alan Prince pointed out that the original network's U came from changing its training set suddenly, just as Psyche's does, while children's vocabularies grow more smoothly. It also struggled with new verbs and with words that sound the same but take different pasts. Their alternative: irregular forms are stored as words, and regular forms come from a rule. The networks replied. Later models learned without the sudden change and generalized to new verbs much as people do, and irregular verbs come in families, like sing, sang and ring, rang, which a network captures naturally. The dispute moved on to the brain and to other languages, and it is not settled. What both sides agree on is this: a child's past tense is generalization, not imitation. No adult says goed.

What it does: The U-shaped curve; a network that says goed; Pinker and Prince; words and rules

9A critical period?Psych 101 and the major2 min

Is there an age after which a language can't be fully learned? The evidence comes in uneasy kinds. Genie was found in 1970, aged thirteen, after a childhood of extreme isolation and abuse. She learned many words, but never the grammar of a native speaker. But she is one child, and a badly deprived one, so the language can't be separated from everything else that happened to her. A cleaner case: deaf children of hearing parents sometimes meet a sign language only at school or later. Rachel Mayberry and colleagues found that deaf adults who had met no language early learned English less well than deaf adults who had signed from infancy, or than people who had heard another language early. Early exposure to some language, any language, seems to matter most.

For second languages, the question is about the age of starting. In 1989 Jacqueline Johnson and Elissa Newport tested forty-six native speakers of Chinese and Korean who had moved to the United States between the ages of three and thirty-nine. The later they had arrived, the lower their scores on English grammar. But age of arrival travels with schooling, motivation, years of use and identity, so a correlation can't settle it. In 2018 Joshua Hartshorne, Joshua Tenenbaum and Steven Pinker had six hundred and seventy thousand people take an online grammar quiz, and fitted a model that separates current age, age of starting and years of experience. They estimated that the ability to learn grammar stays near its peak until about seventeen and a half, then declines: a critical period, but much later than people had thought, and its cause, biological or social, is unknown. A late starter has less time to learn before the decline, so the grammar people end up with falls off from a much earlier age of starting. The curves drawn here are schematics of those shapes, not their data.

What it does: Genie and late first languages; age of arrival; two-thirds of a million grammar quizzes

10Language in the brainPsych 101 and the major2 min

Language was the first mental faculty tied to a place in the brain. In 1861 Paul Broca examined a patient who could say only one syllable, tan. After he died, Broca found damage at the back of the left frontal lobe. Patients like him speak haltingly but understand much of what they hear. In 1874 Carl Wernicke described patients with damage further back, who spoke fluently but made little sense, and understood poorly. Joined by a bundle of fibres, the two areas gave the classic model: production at the front, comprehension behind. Modern lesion studies blur the line. Both areas take part in both, and in other things too, as Part 7 warned about any one-area-one-function map.

Today the picture is a network. Evelina Fedorenko and colleagues find each person's language regions by contrasting sentences with lists of non-words, and then test those same regions on everything else. The regions respond to language, written or spoken, in any language the person knows. And they barely respond to arithmetic, music, working memory, or most kinds of reasoning. That fits the patients: people with severe aphasia, who cannot understand a sentence, can still do arithmetic, play chess and follow music. Language and thought come apart in the brain. The method is Part 8's: localize in each person first, then test, and never infer a function from a location alone.

And when? EEG, from Part 8, has the timing. In 1980 Marta Kutas and Steven Hillyard had people read sentences like he spread the warm bread with socks. About four hundred milliseconds after the unexpected word, the brain produced a negative wave, the N400. Its size tracks how predictable the word was: a brain measure of something close to surprisal. In 1992 Lee Osterhout and Phillip Holcomb found that a grammatical violation brings a later, positive wave, the P600. Meaning and structure leave different signatures in time, though how cleanly the two separate is still argued. The waves drawn here are schematics.

What it does: Broca and Wernicke; the language network, localized in each person; the N400 and the P600

11Language and thoughtResearch3 min

Does the language you speak shape how you think? Benjamin Lee Whorf, a fire inspector and amateur linguist, argued in the 1930s and 40s that speakers of different languages are led by their grammars to different views of the world. The strong version, that language determines thought so that some thoughts are unthinkable without the words, has almost no defenders now; chapter ten's patients think without language. The weak version, that language nudges perception, memory and attention, is testable. And there are limits on variety. Brent Berlin and Paul Kay found in 1969 that languages differ in how many basic colour words they have, but add them in a broadly regular order. Constraint, not chaos.

Here's a well-known test of the weak version. Russian has two basic words for blue: goluboy for lighter blues, siniy for darker ones. In 2007 Jonathan Winawer and colleagues found that Russian speakers told two blues apart faster when they fell on opposite sides of that boundary than when they fell on the same side. English speakers, looking at the same blues, showed no such advantage. And the advantage vanished when the Russian speakers had to rehearse a string of digits at the same time, a verbal load, but not when they had to remember a spatial pattern. Language seemed to be working in real time. Several later studies did not find category effects of this kind, or found them depended on how the colours were chosen. The Ledger calls the claim contested.

Numbers give a sharper case. The Pirahã, who live along a river in the Amazon, have no words for exact numbers, only words for smaller and larger amounts. In 2008 Michael Frank and colleagues asked Pirahã speakers to match a line of objects with a line of their own. With both lines in view, they did well. But when the set had to be remembered, or matched to one that was hidden, their errors grew with the number of objects. Number words look like a cognitive technology: a tool for holding exact quantities in mind, rather than the source of the idea of quantity itself. That is the weak version of Whorf, and here it holds.

What it does: Whorf; Berlin and Kay; Russian blues; Pirahã numbers; the bilingual advantage

12The LedgerPsych 101 and the major3 min

Six rows today. The first: a letter is reported more accurately inside a briefly shown word than alone. The original: Reicher, 1969. The record: Wheeler's replication the next year, and many studies since, including with pronounceable non-words. A robust effect, and the founding data of interactive models. Replicated.

The second: infants can find word boundaries from the transitional probabilities between syllables. The original: Saffran, Aslin and Newport, 1996. The record: Black and Bergmann's meta-analysis of the infant studies in 2017. Small and reliable in close replications, not reliable across all the designs that use transitional probabilities. Replicated, smaller.

The third: reading time grows with a word's surprisal. The original: Smith and Levy, 2013, with eye-tracking and self-paced reading. The record: many corpora and language models since, and this part's fit to the Natural Stories corpus, with the cost landing on the next word. One of the steadiest relations in psycholinguistics, though which language model fits best is a live question. Replicated.

The fourth: there is a sharp age after which a second language's grammar cannot be fully learned. The original: Johnson and Newport, 1989. The record: studies finding a gradual decline rather than a cut-off, and Hartshorne and colleagues' two-thirds of a million people, finding a decline after about seventeen. That ability declines with the age of starting is well supported; whether there is a sharp period, and why, is not settled. Contested.

The fifth: a language's colour words speed the discrimination of colours across their boundaries. The original: Winawer and colleagues' Russian blues, 2007. The record: several studies that did not find such category effects, and a 2020 study of Russian speakers with mixed results. Effects appear under some conditions and stimuli and not others. Contested.

And the sixth: speaking two languages improves executive control. The original: Bialystok and colleagues, 2004. The record: Paap and Greenberg's failures to find it in 2013, and Lehtonen and colleagues' meta-analysis of a hundred and fifty-two studies in 2018. A very small advantage before correcting for publication bias, and none after. Failed.

The tally. The measurements held: word superiority, and the relation between surprisal and reading time. The claims that a language shapes the mind's other abilities, in colour and in executive control, did not hold up as first reported. It's the pattern of Part 4 again: small samples, flexible measures, and stories people want to be true.

What it does: Word superiority; statistical segmentation; surprisal; the critical period; colour words; bilingualism

13In practice: speech, reading, aphasiaPractice2 min

The most widely used piece of reading research is a formula. In 1948 Rudolf Flesch proposed that longer sentences and longer words make text harder to read, and weighted the two. Versions are still built into word processors, and some laws on plain language require them. Here it is on two of the Natural Stories and a chapter of The Maltese Falcon. The stories were written to be full of rare and difficult constructions, and they score just as easy as Hammett. The formula sees only lengths: not structure, not surprisal, not what the reader already knows. Better to measure readers directly, which is Part 52, or use the surprisal of a language model, which at least sees the words.

Three more places where this work is used. Teaching reading. In 2000 the National Reading Panel in the United States reviewed the experiments and found that systematic phonics, teaching how letters map to sounds, helps children learn to read, especially early on. The long argument over how to teach reading is Part 54's. Aphasia. In 2017 Caterina Breitenstein and colleagues ran a large trial in people with long-standing aphasia after a stroke. Three weeks of intensive therapy improved everyday communication compared with waiting. Intensity matters, not only the kind of therapy. And speech recognition. Systems trained on thousands of hours of speech now match professional transcribers on some benchmarks, though accents, noise and children's voices are still harder. For second languages, the best advice is Part 21's spacing and testing, and a great deal of input.

What it does: Readability formulas computed; the teaching of reading; aphasia therapy; second languages

14Frontier: what language models showResearch3 min

Machines that learn language from text alone have joined the old argument. Large language models judge pairs of sentences that differ in one grammatical point, like the keys to the cabinet are, against is, mostly as people do. So a great deal of grammar can be learned from strings alone, which is a blow to the strongest claims that the input is too poor. But look at the price. GPT-3 was trained on about three hundred billion tokens of text, thousands of times more words than a child hears by the age of ten, and none of it attached to a world. So researchers now train models on a child's budget. The BabyLM challenge limits them to a hundred million words or fewer, to ask what a child-sized input allows.

A different approach starts from the child. In 2024 Wai Keen Vong and colleagues trained a network on about sixty-one hours of video from a camera worn on one child's head, between six and twenty-five months of age, together with the speech the child heard. It learned to link many everyday words to what they name, like ball, car and sand, and to recognize new pictures of them. It's a small slice of one child's life, with no grammar built in, and it shows that word meaning, at least, can be learned from what a child sees and hears. What such models can't yet show is how a child gets a grammar from so little.

And one more turn. For years, surprisal from better language models predicted reading times better. But in 2023 Byung-Doh Oh and William Schuler found that beyond a point, the surprisal of larger transformer models fits human reading times worse. The large models predict rare names and facts far better than a reader can, so their surprise and ours part company. The best model of a reader is not the best model of text. A reader's expectations are limited, and the shape of that limit is the psychology. Our crude trigram model already found a cost of surprise. How much more a reader-shaped model adds is an open question.

What it does: Models' input against a child's; one child's video; better models fitting readers worse

Recap, problems, and the road aheadAll tracks3 min

Part twenty-three in ten lines. Knowing a language is productive at every level, from wugs to sentences never heard before. Words follow Zipf's law, and so does a monkey at a typewriter, which is a warning. Common words are found faster, and a spoken word narrows a cohort as it arrives. Knowledge of words feeds back into the seeing of letters. Readers commit to an analysis as they go, and garden paths make them pay. Reading time grows with surprisal, in ten stories and in many corpora. Infants, and Psyche, find words in a stream by transitional probabilities. A single network gives a U-shaped past tense, and whether the mind uses rules is still argued. Learning a language gets harder with the age of starting, late into the teens. And language has a network of its own in the brain, while claims that it reshapes other abilities have mostly failed.

Kant's wager. The first objection, that mathematics can't apply to the mind, met surprisal fitted to the reading times of ten thousand words, and networks that read and learn. The second, that the mind can't be experimented on, met two minutes of a made-up language, from which infants learn the words. And the third, that looking inward disturbs what you look at, met reading times, eye movements and brain waves, measured while a sentence unfolds, without ever asking the reader what they think they are doing.

Where this comes back. Reasoning, and rules again, is the next part. How early language begins is Part 30. Comparing models of reading is Part 48, and encoding models of the brain's response to language are Part 49. Readable interfaces are Part 52, teaching reading is Part 54, and what language models know is Part 60.

Seven problems, with full solutions in this part's README. One derives Levy's result that surprisal is a change of belief. One works out the transitional probabilities of the stream. One finds how much of a text its commonest words cover. One finds the steady state of a unit in the reading network. One sketches Gold's argument. One extends the reading-time regression on the open data. And the last, with the star, asks you to design a study with made-up verbs that the two accounts of the past tense must predict differently. Pause here if you'd like to try them.

The books and papers behind this part are listed here and in the README. Steven Pinker's The Language Instinct makes the case for an innate grammar, and Morten Christiansen and Nick Chater's The Language Game makes the case against it. Read both.

Today the mind learned words and grammar from what it heard. Next time, it reasons with them. Four cards, one rule, and most people turn over the wrong ones. Are we illogical, or is logic the wrong yardstick for a mind? It's Part 24: reasoning and problem solving.

Where it goes next. Reasoning is Part 24, the infant mind Part 30, model comparison Part 48, encoding models Part 49, readable design Part 52, teaching reading Part 54, and language models Part 60.

Key results

The part's results in one place, for revision.

Zipf's law\(\displaystyle f(r) \propto r^{-s}, \quad\allowbreak s \approx 1\)
Surprisal\(\displaystyle \text{cost}(w_t) \propto -\log P(w_t \mid w_{<t})\)
Surprisal as belief change\(\displaystyle -\log P(w_t \mid w_{<t}) = D_{\mathrm{KL}}\big(P(T \mid w_{\le t}) \,\|\, P(T \mid w_{<t})\big)\)
Transitional probability\(\displaystyle P(y \mid x) = \#(x\,y) / \#(x)\)
Interactive activation\(\displaystyle \Delta a = n (M - a) - \theta (a - r) \ \ (n > 0)\)
Kneser-Ney smoothing\(\displaystyle P(w \mid v) = \frac{\max(c(v w) - d, 0)}{c(v)} + \lambda_v P_{\mathrm{cont}}(w)\)

Try it

Lab 23 · Language

Fit Zipf's law and see a monkey obey it; watch knowledge of words feed back into letters; find words in a stream by statistics alone; grow a past-tense learner's vocabulary and see it over-regularize; and fit reading times to surprisal with length and frequency held fixed.

Figure produced by Lab 23: Language
Produced by the lab below, seed 0, in 3.2 s.
python -m videos.psychology.labs 23 needs numpy, scipy, matplotlib · download lab23.py · source on GitHub
Zipf exponent: the narration; typing monkey                       1.19 (R^2 0.981); 1.20 (R^2 0.79)
K or D after WORK, and after K alone (16 cycles)                  0.949, 0.890
segments that are words; word and part-word scores                1.00; 1.00, 0.64
early irregulars right: before the flood, at the dip, at the end  0.90, 0.68, 0.91
ms per bit: this word, next word; R^2                             0.44, 1.07; 0.105

Lectures and monkeys both give power laws; WORK's K beats K alone because the word feeds back; dips in transitional probability mark the words; a vocabulary flood makes the network say goed; and a surprising word costs time on the word after it.
The code (122 lines; it asserts its own result)
"""Lab 23: Zipf's law for this series' own narration and a typing monkey; the interactive activation model's word superiority;
finding words in a syllable stream by transitional probabilities; a past-tense learner's U-shaped curve; and the
surprisal of every word of the Natural Stories corpus, from a trigram model, against its reading times.

The film fits these on thirty Project Gutenberg novels. A lab downloads nothing, so its corpus is the narration of
Psychology, Built's own sixty-two films (about 350,000 words of English prose), read from the scene files."""

from collections import Counter

import numpy as np

from videos.coursekit import labs
from explainer.psychology import opendata
from explainer.psychology.psyche import language as LG

TITLE = "Language"
GOAL = ("Fit Zipf's law and see a monkey obey it; watch knowledge of words feed back into letters; find words in a "
        "stream by statistics alone; grow a past-tense learner's vocabulary and see it over-regularize; and fit "
        "reading times to surprisal with length and frequency held fixed.")
TASKS = [
    "Refit the reading times with a bigram model (drop the trigram counts) and with discounts of 0.5 and 0.9. Does "
    "the cost per bit on the next word change?",
    "Add a fifth word to the stream that shares its first syllable with another word. How many words of exposure "
    "does the segmenter need now?",
    "Grow the past-tense learner's vocabulary in five steps instead of one. Does the U-shaped dip survive Pinker and "
    "Prince's objection?",
]


def _narration() -> list:
    """The words of every chapter of this series' films, as the course pages print them (tools/lecture_text.py);
    numbers computed at render time are left out."""
    import re
    import sys
    from pathlib import Path

    root = Path(__file__).resolve().parents[3]
    sys.path.insert(0, str(root / "tools"))
    import lecture_text as lt

    gap = re.compile(f"{lt.GAP_OPEN}.*?{lt.GAP_CLOSE}")
    paras = [gap.sub(" ", p.text) for m in sorted((root / "videos" / "psychology").glob("psych*/manifest.py"))
             for _, ps in lt.film_text(m.parent) for p in ps]
    return LG.tokenize("\n".join(paras))


def run(seed=0):
    out = labs.Lab()
    rng = np.random.default_rng(seed)
    toks = _narration()
    C = Counter(toks)

    # 1. Zipf, and a monkey
    z = LG.zipf_fit(C, top=5000)
    zm = LG.zipf_fit(LG.random_typing(n_chars=2_000_000, rng=rng), top=2000)
    out.row("Zipf exponent: the narration; typing monkey", f"{z['s']:.2f} (R^2 {z['r2']:.3f}); {zm['s']:.2f} (R^2 {zm['r2']:.2f})")
    assert 0.9 < z["s"] < 1.4

    # 2. word superiority
    four = [w for w, _ in C.most_common(20000) if len(w) == 4 and w.isalpha()][:1200]
    m = LG.InteractiveActivation(four, [C[w] for w in four])
    pw = m.forced_choice(list("WORK"), 3, "K", "D", mask_at=16)
    pa = m.forced_choice([None, None, None, "K"], 3, "K", "D", mask_at=16)
    out.row("K or D after WORK, and after K alone (16 cycles)", f"{pw:.3f}, {pa:.3f}")
    assert pw > pa

    # 3. segmentation
    st = LG.syllable_stream(n=180, rng=rng)
    tp = LG.transitional_probabilities(st)
    seg = LG.segment(st, tp)
    out.row("segments that are words; word and part-word scores",
            f"{np.mean([w in LG.SAFFRAN_WORDS for w in seg]):.2f}; {LG.word_score('golabu', tp):.2f}, "
            f"{LG.word_score('labubi', tp):.2f}")

    # 4. the past tense
    irr, reg = list(LG.IRREGULAR), list(LG.REGULAR)
    r = LG.past_tense_learner([irr[:10] + reg[:2], irr[:10] + reg], epochs_per_stage=12, lr=0.3, l2=1e-3, rng=rng)
    k = int((r["stage"] == 0).sum())
    out.row("early irregulars right: before the flood, at the dip, at the end",
            f"{r['right'][k - 1]:.2f}, {r['right'][k:k + 4].min():.2f}, {r['right'][-1]:.2f}")
    assert r["right"][k:k + 4].min() < r["right"][k - 1]

    # 5. surprisal and reading time
    if opendata.available("naturalstories_words"):
        import re

        ns = opendata.natural_stories()
        words = [re.sub(r"[^a-z']", "", w.lower()).strip("'") or "x" for w in ns["word"]]
        lm = LG.KneserNey(toks)
        surp = np.zeros(len(words))
        for s_ in np.unique(ns["story"]):
            idx = np.where(ns["story"] == s_)[0]
            surp[idx] = lm.surprisal([words[i] for i in idx])
        prev = np.r_[np.nan, surp[:-1]]
        prev[np.r_[True, ns["story"][1:] != ns["story"][:-1]]] = np.nan
        ok = ~np.isnan(prev)
        logf = np.log10([C.get(w, 0) + 1 for w in words])
        length = np.array([len(w) for w in words], float)
        fit = LG.rt_regression(ns["rt"][ok], surp[ok], length[ok], logf[ok], prev[ok])
        cf = dict(zip(fit["names"], fit["coef"]))
        out.row("ms per bit: this word, next word; R^2", f"{cf['surprisal']:.2f}, {cf['prev_surprisal']:.2f}; "
                f"{fit['r2']:.3f}")
        assert cf["prev_surprisal"] > 0
    else:
        out.row("surprisal and reading time", "the Natural Stories data could not be fetched")

    out.note = ("Lectures and monkeys both give power laws; WORK's K beats K alone because the word feeds back; dips in "
                "transitional probability mark the words; a vocabulary flood makes the network say goed; and a "
                "surprising word costs time on the word after it.")

    fig, ax = labs.figure(2, size=(11, 4.2))
    ax[0].loglog(z["rank"], z["freq"], color=labs.GOLD, lw=1.5, label="the narration")
    ax[0].loglog(zm["rank"], zm["freq"], color=labs.BLUE, lw=1.2, label="monkey")
    ax[0].set(title="Zipf's law", xlabel="rank", ylabel="frequency")
    ax[0].legend(fontsize=8)
    ax[1].plot(r["right"], color=labs.GOLD, label="right form")
    ax[1].plot(r["over"], color="#ef6f6c", label="add -ed")
    ax[1].axvline(k - 0.5, color="#9aa4b2", ls="--")
    ax[1].set(title="The past tense", xlabel="epoch", ylabel="probability")
    ax[1].legend(fontsize=8)
    out.fig = fig
    return out

Now change it

  1. Refit the reading times with a bigram model (drop the trigram counts) and with discounts of 0.5 and 0.9. Does the cost per bit on the next word change?
  2. Add a fifth word to the stream that shares its first syllable with another word. How many words of exposure does the segmenter need now?
  3. Grow the past-tense learner's vocabulary in five steps instead of one. Does the U-shaped dip survive Pinker and Prince's objection?

Problems, with solutions

Try each problem before opening its solution.

1. Surprisal is a change of belief. A reader holds a probability over analyses \(T\). Show that \(D_{\mathrm{KL}}(P(T \mid w_{\le t}) \,\|\, P(T \mid w_{<t})) = -\log P(w_t \mid w_{<t})\) when each analysis fixes the words.

Solution

If each analysis T fixes the words, then P(w_t | T, w_{<t}) is 1 when T is consistent with w_t and 0 otherwise. By Bayes's rule P(T | w_{≤t}) = P(T | w_{<t}) 1[T fits w_t] / P(w_t | w_{<t}). So D_KL(P(T | w_{≤t}) ‖ P(T | w_{<t})) = Σ_T P(T | w_{≤t}) log [P(T | w_{≤t}) / P(T | w_{<t})] = Σ_{T fits w_t} P(T | w_{≤t}) log [1 / P(w_t | w_{<t})] = −log P(w_t | w_{<t}), since the posterior sums to one over the analyses that fit. This is Levy's (2008) result: the cost of a word is the amount by which it changes what the reader believes about the sentence, whatever grammar the beliefs are over.

2. The stream's transitional probabilities. In a stream of four three-syllable words with no word repeated twice running, show that transitional probabilities are 1 inside words and \(\tfrac{1}{3}\) across boundaries.

Solution

Inside a word, the syllable after the first is always the second and after the second always the third, so P(next | this) = 1. The last syllable of word k is followed by the first syllable of the next word, which is one of the other three words, each equally likely when the next word is drawn uniformly with no repeat. The four first syllables are distinct, so each continuation has probability 1/3. (The estimates in a finite stream scatter around 1/3: in Psyche's 540 syllables they run from 0.21 to 0.40.)

3. How much the commonest words cover. Under Zipf's law with exponent 1 and \(N\) word types, show that the \(k\) commonest words cover about \(\ln k / \ln N\) of all tokens.

Solution

With frequencies f_r ∝ 1/r for r = 1, …, N, the k commonest words cover H_k / H_N of the tokens, where H_n = Σ_{r≤n} 1/r = ln n + γ + O(1/n). So the share is (ln k + γ)/(ln N + γ) ≈ ln k / ln N. With N = 60,000 types, the 100 commonest cover about 0.45 and the 1,000 commonest about 0.65: a reader who knows a thousand words still meets an unknown one every few lines, which is why vocabulary keeps growing for life. (The novels' exponent is 1.2, so their real coverage is higher.)

4. One unit's steady state. For one unit of the interactive activation model with constant net input \(n > 0\), find its steady activation, and say how decay and the ceiling share the work.

Solution

In the interactive activation model a unit with positive net input n changes by Δa = n(M − a) − D(a − r), with maximum M, rest r and decay D. Setting Δa = 0 gives n(M − a) = D(a − r), so a* = (nM + Dr)/(n + D), a weighted average of the ceiling and the rest with weights n and D. Strong input pulls the unit towards M, but never past it, since the input's effect shrinks as a approaches M; decay pulls it back to rest in proportion to how far it has gone. With M = 1 and r = 0, a* = n/(n + D): doubling the input does not double the activation, which is what keeps a network of such units stable while letters and words excite each other.

5. Gold's argument. Sketch why no learner can identify every language in a family that contains all finite languages and one infinite one, from examples alone.

Solution

Take the family of every finite language L_1 ⊂ L_2 ⊂ … (L_k the first k sentences) and their union L_∞. Suppose a learner identifies every finite language in the limit. Build a text: give sentences of L_1 until the learner guesses L_1 (it must, eventually, since this could be a text for L_1); then add the second sentence and repeat it until the learner guesses L_2 (it must, since this could be a text for L_2); and so on. The text that results contains every sentence of L_∞, so it is a text for L_∞, but the learner changes its guess infinitely often and never settles on L_∞. So no learner identifies the whole family from positive examples alone. Horning's answer is that probabilities change the problem: a learner that knows sentences are sampled can notice what never comes, and the simplest grammar that fits is identified with probability one.

6. Spillover two words back. With explainer.psychology.opendata: add the surprisal of the word two back to the reading-time regression. Does the cost spill over further?

Solution

Adding the surprisal of the word two back to the regression on the ten stories gives 1.18 ms per bit on the next word (s.e. 0.08) and 0.43 ms per bit two words on (s.e. 0.08), with the word's own surprisal still near 0 (0.03, s.e. 0.11). The cost spills over further but fades. Self-paced reading is known for this: readers press the key before they have finished with a word. Eye movements show more of the cost on the word itself.

7. ★ A nonce-verb study. Design a nonce-verb study (spling, plip) whose results a words-and-rules account and a single-network account must predict differently.

Solution

Words and rules says irregular forms are stored and generalize by similarity, while -ed is a rule that applies to anything. A single network says both kinds generalize by similarity. So vary two things independently: how similar a made-up verb is to irregular families (spling, like sing and cling, against ploamph, like nothing) and to regular ones (plip, like slip and flip). Both accounts predict that splung is an acceptable past of spling and that no irregular past of ploamph is. They part on the regular forms: words and rules predicts ploamphed is as acceptable as plipped, since the rule does not care about similarity; the network predicts plipped is better. Prasada and Pinker (1993) found regulars insensitive to similarity; Albright and Hayes (2003) found that regulars too are rated better in "islands of reliability". The design also needs ratings and productions from the same people, and verbs matched for length and sound probability.

Notes and sources

Sources

  • B. F. Skinner, Verbal Behavior (1957); N. Chomsky, Syntactic Structures (1957) and review of Verbal Behavior, Language 35 (1959) 26-58; J. Berko, The child's learning of English morphology, Word 14 (1958) 150-177.
  • G. K. Zipf, Human Behavior and the Principle of Least Effort (1949); G. A. Miller, Some effects of intermittent silence, American Journal of Psychology 70 (1957) 311-314.
  • W. D. Marslen-Wilson and A. Welsh, Processing interactions and lexical access during word recognition in continuous speech, Cognitive Psychology 10 (1978) 29-63; W. D. Marslen-Wilson, Functional parallelism in spoken word-recognition, Cognition 25 (1987) 71-102.
  • G. M. Reicher, Perceptual recognition as a function of meaningfulness of stimulus material, Journal of Experimental Psychology 81 (1969) 275-280; D. D. Wheeler, Cognitive Psychology 1 (1970) 59-85; J. Baron and I. Thurston, Cognitive Psychology 4 (1973) 207-228; J. L. McClelland and D. E. Rumelhart, An interactive activation model of context effects in letter perception: Part 1, Psychological Review 88 (1981) 375-407.
  • T. G. Bever, The cognitive basis for linguistic structures, in Cognition and the Development of Language (1970); L. Frazier and K. Rayner, Making and correcting errors during sentence comprehension, Cognitive Psychology 14 (1982) 178-210.
  • J. Hale, A probabilistic Earley parser as a psycholinguistic model, Proceedings of NAACL (2001) 159-166; R. Levy, Expectation-based syntactic comprehension, Cognition 106 (2008) 1126-1177; N. J. Smith and R. Levy, The effect of word predictability on reading time is logarithmic, Cognition 128 (2013) 302-319; A. Goodkind and K. Bicknell, Proceedings of CMCL (2018) 10-18; R. Futrell et al., The Natural Stories corpus, Language Resources and Evaluation 55 (2021) 63-77; R. Kneser and H. Ney, Improved backing-off for m-gram language modeling, ICASSP (1995) 181-184.
  • J. R. Saffran, R. N. Aslin and E. L. Newport, Statistical learning by 8-month-old infants, Science 274 (1996) 1926-1928; A. Black and C. Bergmann, Quantifying infants' statistical word segmentation: a meta-analysis, Proceedings of the 39th Annual Conference of the Cognitive Science Society (2017) 124-129.
  • E. M. Gold, Language identification in the limit, Information and Control 10 (1967) 447-474; J. J. Horning, A study of grammatical inference (Stanford, 1969); N. Chater and P. Vitányi, 'Ideal learning' of natural language, Journal of Mathematical Psychology 51 (2007) 135-163; S. Carey and E. Bartlett, Acquiring a single new word, Papers and Reports on Child Language Development 15 (1978) 17-29; B. Hart and T. R. Risley, Meaningful Differences in the Everyday Experience of Young American Children (1995).
  • D. E. Rumelhart and J. L. McClelland, On learning the past tenses of English verbs, in Parallel Distributed Processing, vol. 2 (1986); S. Pinker and A. Prince, On language and connectionism, Cognition 28 (1988) 73-193; G. F. Marcus et al., Overregularization in language acquisition, Monographs of the Society for Research in Child Development 57 (1992); S. Pinker, Words and Rules (1999); S. Prasada and S. Pinker, Language and Cognitive Processes 8 (1993) 1-56; A. Albright and B. Hayes, Rules vs. analogy in English past tenses, Cognition 90 (2003) 119-161.
  • S. Curtiss, Genie: A Psycholinguistic Study of a Modern-Day "Wild Child" (1977); R. I. Mayberry, E. Lock and H. Kazmi, Linguistic ability and early language exposure, Nature 417 (2002) 38; J. S. Johnson and E. L. Newport, Critical period effects in second language learning, Cognitive Psychology 21 (1989) 60-99; K. Hakuta, E. Bialystok and E. Wiley, Psychological Science 14 (2003) 31-38; J. K. Hartshorne, J. B. Tenenbaum and S. Pinker, A critical period for second language acquisition, Cognition 177 (2018) 263-277.
  • P. Broca, Bulletin de la Société Anatomique 36 (1861) 330-357; C. Wernicke, Der aphasische Symptomencomplex (1874); E. Fedorenko, M. K. Behr and N. Kanwisher, Functional specificity for high-level linguistic processing in the human brain, PNAS 108 (2011) 16428-16433; M. Kutas and S. A. Hillyard, Reading senseless sentences, Science 207 (1980) 203-205; L. Osterhout and P. J. Holcomb, Journal of Memory and Language 31 (1992) 785-806.
  • B. L. Whorf, Language, Thought, and Reality (1956); B. Berlin and P. Kay, Basic Color Terms (1969); J. Winawer et al., Russian blues reveal effects of language on color discrimination, PNAS 104 (2007) 7780-7785; C. Witzel and K. R. Gegenfurtner, Journal of Vision 11 (2011) 16; J. Martinovic, G. V. Paramei and W. J. MacInnes, Cognition 201 (2020) 104281; M. C. Frank, D. L. Everett, E. Fedorenko and E. Gibson, Number as a cognitive technology, Cognition 108 (2008) 819-824.
  • E. Bialystok, F. I. M. Craik, R. Klein and M. Viswanathan, Psychology and Aging 19 (2004) 290-303; K. R. Paap and Z. I. Greenberg, Cognitive Psychology 66 (2013) 232-258; M. Lehtonen et al., Is bilingualism associated with enhanced executive functioning in adults?, Psychological Bulletin 144 (2018) 394-425.
  • R. Flesch, A new readability yardstick, Journal of Applied Psychology 32 (1948) 221-233; National Reading Panel, Teaching Children to Read (2000); C. Breitenstein et al., Intensive speech and language therapy in patients with chronic aphasia after stroke, The Lancet 389 (2017) 1528-1538.
  • A. Warstadt et al., BLiMP: the benchmark of linguistic minimal pairs for English, TACL 8 (2020) 377-392; T. B. Brown et al., Language models are few-shot learners, NeurIPS (2020); W. K. Vong, W. Wang, A. E. Orhan and B. M. Lake, Grounded language acquisition through the eyes and ears of a single child, Science 383 (2024) 504-511; B.-D. Oh and W. Schuler, Why does surprisal from larger transformer-based language models provide a poorer fit to human reading times?, TACL 11 (2023) 336-350.
  • Books: S. Pinker, The Language Instinct (1994) and Words and Rules (1999); M. J. Traxler, Introduction to Psycholinguistics (2012); M. H. Christiansen and N. Chater, The Language Game (2022).
About this partfrom its README

Colorless green ideas sleep furiously has never been said before, means nothing, and every English speaker knows it is a sentence. This part asks what you know when you know a language, and how a mind gets it. B. F. Skinner said language is behaviour learned by reinforcement; Noam Chomsky said no learner could get a grammar that way. Seventy years later the argument is still going, and it now has numbers: the time it takes to read a word, the probability a model gives that word, two minutes of a made-up language that infants learn from, a network that says goed, and two-thirds of a million people taking a grammar quiz.

Productivity at every level, from sounds to sentences; Berko's wug; Zipf's law fitted on thirty novels, and the same law from a monkey at a typewriter; frequency and length against reading time in the Natural Stories corpus; a spoken word's cohort as it arrives; Reicher's word superiority effect and McClelland and Rumelhart's interactive activation model, built with a fourteen-segment font and run; garden paths, Bever's horse and Frazier and Rayner's eye movements; surprisal derived as a change of belief and a trigram model's blindness to syntax; surprisal fitted to the reading times of ten thousand words, with the cost landing on the word after; Saffran, Aslin and Newport's stream and transitional probabilities derived and run; the poverty of the stimulus, Gold's theorem and its answers, and fast mapping; the past-tense debate, with a network that over-regularizes; critical periods, from Genie to Hartshorne, Tenenbaum and Pinker's quiz; Broca, Wernicke, the language network and the N400 and P600; Whorf, Berlin and Kay, Russian blues and Pirahã numbers. The practice chapter is readability formulas, the teaching of reading, aphasia therapy and second languages; the frontier is what language models do and do not show about human learning.

What is computed and built
  • explainer/psychology/psyche/language.py: word statistics (Zipf's law fitted, Miller's typing monkey, cohorts, syllable counts and Flesch's formula); the interactive activation model, with a fourteen-segment font for its letter features and a forced-choice readout; Saffran-style syllable streams, transitional probabilities, segmentation by dips and word scores; a past-tense learner whose vocabulary grows in stages; tokenizing, an interpolated Kneser-Ney trigram model and its surprisal; and the reading-time regression with spillover. Tested in tests/psychology/test_language.py.
  • explainer/psychology/opendata.py gains the Natural Stories corpus's per-word reading times, pinned to one commit and checked by SHA-256.
  • The Ledger gains six rows; the Archive five datasets.
  • The course's interactive is a made-up language: watch a stream of syllables, then pick its words out of pairs, and see how you did against chance and against Psyche's learner.
Chapter notes
# Chapter What it does
0 Colorless green ideas Skinner and Chomsky; a sentence never said; a test on you; the questions; objectives
1 Levels and productivity Sounds, words, sentences and meaning; the wug test; Zipf's law in the novels and from a monkey
2 The mental lexicon Frequency and length against reading time in Natural Stories; the cohort of a spoken word
3 Recognizing a word Reicher's paradigm; the interactive activation model derived; letters helped by words, run
4 Sentences in real time Garden paths; eye movements at the breaking word; a trigram model's surprisal, and what it cannot see
5 The cost of a surprising word Surprisal derived as a change of belief; a story word by word; the fit to ten thousand words
6 Finding the words Saffran, Aslin and Newport; transitional probabilities derived; segmentation run; the meta-analysis
7 How children learn a language Milestones; the poverty of the stimulus, Gold's theorem and its answers; fast mapping and the input
8 Rules or associations? The U-shaped curve; a network that says goed; Pinker and Prince; words and rules
9 A critical period? Genie and late first languages; age of arrival; two-thirds of a million grammar quizzes
10 Language in the brain Broca and Wernicke; the language network, localized in each person; the N400 and the P600
11 Language and thought Whorf; Berlin and Kay; Russian blues; Pirahã numbers; the bilingual advantage
12 The Ledger Word superiority; statistical segmentation; surprisal; the critical period; colour words; bilingualism
13 In practice: speech, reading, aphasia Readability formulas computed; the teaching of reading; aphasia therapy; second languages
14 Frontier: what language models show Models' input against a child's; one child's video; better models fitting readers worse
Recap, problems, and the road ahead Ten lines; Kant's three objections; payoffs; problems; references; Part 24
NotesWhere the numbers come from
What Source
4,326,411 tokens and 59,639 word types in thirty novels; Zipf's exponent 1.20 (R² 0.994, top 10,000 types) The reading of AI, Built Part 1 (thirty Project Gutenberg novels); Psyche (language.zipf_fit), item zipf
A monkey typing 2,000,000 characters (space with probability 0.18): exponent 1.20, R² 0.79 (a staircase) Psyche (language.random_typing, after G. A. Miller 1957), item zipf
10,256 words of ten stories, read by a median of 84 people each; mean reading times by frequency (369 ms for the rarest eighth to 327 ms for the commonest) and by length Natural Stories (Futrell et al. 2021), processed_wordinfo.tsv, fetched by explainer.psychology.opendata and checked by SHA-256, item lexicon
The cohorts of elephant, candle and trespass as their letters arrive (for trespass 1,547, 346, 54, 4, 2) Psyche (language.cohort, on the novels' 30,361 commonest words, letters standing in for sounds), item lexicon
Letter and word activations in the interactive activation model, and two-choice accuracy against display time; K after WORK 0.534 against K alone 0.418 at the mask Psyche (language.InteractiveActivation, McClelland and Rumelhart's 1981 parameters, the novels' 1,500 commonest four-letter words), item ia
Surprisal word by word for three garden-path sentences; fell costs 13 bits in the reduced and the unreduced sentence alike Psyche (language.KneserNey, an interpolated Kneser-Ney trigram, discount 0.75, 30,000 words), item garden
Mean surprisal 8.66 bits (perplexity 405) on Natural Stories; reading time 324 to 361 ms across tenths of surprisal; 1.18 ms per bit on the next word (s.e. 0.08), about 0 on the word itself, −6.3 ms per tenfold frequency, 2.8 ms per letter; R² 0.116 Psyche (language.KneserNey, rt_regression), item surprisal
24 eight-month-olds, two minutes of a stream of four three-syllable words Saffran, Aslin and Newport (1996)
Transitional probabilities in a stream of Saffran-style words; segmentation by dips, perfect after 20 words; part-word scores 0.67 against 1 Psyche (language.syllable_stream, transitional_probabilities, segment), item stream
A small effect in close replications, none reliable across all designs Black and Bergmann (2017), the meta-analysis's abstract and results
65 irregular and 125 regular verbs; the early irregulars right 0.94 before the vocabulary grows, 0.83 at the dip, 0.92 at the end; over-regularization peaking at 0.12 Psyche (language.past_tense_learner, stems and endings as features, a softmax), item pasttense
Over-regularization in 4.2% of irregular past tenses across 25 children Marcus et al. (1992)
46 Chinese and Korean speakers, arriving at 3 to 39 Johnson and Newport (1989)
669,498 people; ability near its peak until about 17.4 Hartshorne, Tenenbaum and Pinker (2018)
891 effect sizes from 152 studies; a very small advantage before correcting for publication bias, none after Lehtonen et al. (2018)
Flesch's reading ease, about 75 for Natural Stories 1 and 5 and chapter 2 of The Maltese Falcon Psyche (language.flesch, a rough syllable count), item readability
About 61 hours of one child's head-camera video and speech, from 6 to 25 months Vong, Wang, Orhan and Lake (2024)
Notes
Finding Original Status
A letter in a briefly shown, masked word is reported more accurately than the same letter shown alone Reicher 1969 replicated
Infants can find the words of a continuous syllable stream from the transitional probabilities between syllables alone Saffran, Aslin and Newport 1996 replicated, smaller
The time a reader spends on a word grows linearly with the word's surprisal Smith and Levy 2013 replicated
There is a sharp age after which a second language's grammar cannot be fully learned Johnson and Newport 1989 contested
Speakers discriminate colours faster across a boundary their language names than within it Winawer and colleagues 2007 contested
Speaking two languages improves executive control Bialystok, Craik, Klein and Viswanathan 2004 failed

Shown without a row, with the reason recorded in explainer/psychology/ledger.py: Skinner and Chomsky (the history of a debate), Chomsky's sentence (an example, not a finding), Berko (a demonstration of productivity), Bever and Frazier and Rayner (garden paths, measured in the surprisal row), Gold, Horning and Chater and Vitányi (theorems), Carey and Bartlett and Hart and Risley (Part 54), Marcus et al. (a corpus count), Rumelhart and McClelland and Pinker and Prince (a model and its critique), Curtiss and Mayberry, Lock and Kazmi (a single case and a study of first languages), Broca and Wernicke (history), Fedorenko, Behr and Kanwisher and Kutas and Hillyard with Osterhout and Holcomb (Part 49), Whorf and Berlin and Kay (history), Frank et al. (one field study), the National Reading Panel and Breitenstein et al. (Part 54), Warstadt et al., Brown et al. and Vong et al. (Part 60), Oh and Schuler (the surprisal row's background).

Notes

Before the narrated master:

  • Marcus et al.'s 4.2% and Johnson and Newport's design are from summaries and the abstracts; no correlation from the 1989 paper is quoted.
  • Black and Bergmann's meta-analytic result and Lehtonen et al.'s 891 effect sizes and 152 studies are from the abstracts; read the papers' tables before quoting effect sizes.
  • Hart and Risley's 42 families and the "30 million" are as usually quoted; the film says the size of the gap is disputed.
  • Vong et al.'s 61 hours and 6 to 25 months, and Oh and Schuler's result, are from the papers' abstracts.
  • The Natural Stories files carry no licence: they are fetched on first use and never redistributed.
  • The eye-movement path, the critical-period curves, the ERP waves and the language-network bars are schematics and say so on screen.
  • The preflight's two text-overlap warnings in Levels (both editions) are the word wugs written into the blank of "There are two ___", as intended.

Companion material in this repository

The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
  1. Hook: Skinner (1957) and Chomsky's review (1959); "Colorless green ideas sleep furiously" and its reverse; a syllable stream on you, with the question held until Chapter 6; the questions; objectives.
  2. Levels and productivity: sounds, words, sentences, meaning and use, productive at each level; the wug test (Berko 1958); Zipf's law on thirty novels (exponent 1.20, R² .994) and on Miller's typing monkey (1.20, a staircase), a warning about what a law shows.
  3. The mental lexicon: frequency and length against reading time in the Natural Stories corpus (Futrell et al. 2021; 369 to 327 ms across eighths of frequency); a spoken word's cohort as it arrives (Marslen-Wilson 1987; trespass: 1,547, 346, 54, 4, 2).
  4. Recognizing a word: Reicher's paradigm (1969); the interactive activation model derived (McClelland and Rumelhart 1981) with a fourteen-segment font, and run: K after WORK .534 against K alone .418, an effect smaller than people's, said so.
  5. Sentences in real time: garden paths (Bever 1970); eye movements at the breaking word (Frazier and Rayner 1982, as a schematic); a trigram model's surprisal word by word, fell at 13 bits with and without that was: two words of context cannot see the syntax (Hale 2001 can).
  6. The cost of a surprising word: surprisal derived as a change of belief (Levy 2008); a story word by word; the fit to 10,256 words (a Kneser-Ney trigram of the novels, perplexity 405): 324 to 361 ms across tenths, 1.18 ms per bit on the next word and none on the word itself, with length and frequency held fixed (Smith and Levy 2013).
  7. Finding the words: Saffran, Aslin and Newport (1996); transitional probabilities derived (1 inside words, 1/3 across); segmentation by dips, perfect after 20 words; golabu against labubi answered; Black and Bergmann's meta-analysis (2017).
  8. How children learn a language: milestones; the poverty of the stimulus as a learnability claim, Gold's theorem (1967) and its answers (Horning 1969; Chater and Vitányi 2007); fast mapping (Carey and Bartlett 1978), Part 22's size principle, and the input (Hart and Risley 1995, with its dispute).
  9. Rules or associations? The U-shaped curve and Marcus et al.'s 4.2% (1992); a past-tense network (Rumelhart and McClelland 1986) run on Psyche's 65 irregulars and 125 regulars (.94, dip to .83, .92; over-regularization peaking at .12) and the vocabulary flood behind it; Pinker and Prince (1988); words and rules.
  10. A critical period? Genie (Curtiss 1977) and late first languages (Mayberry, Lock and Kazmi 2002); Johnson and Newport (1989); Hakuta, Bialystok and Wiley (2003); Hartshorne, Tenenbaum and Pinker (2018): 669,498 people, ability near its peak until about 17.4.
  11. Language in the brain: Broca (1861) and Wernicke (1874); the language network, localized in each person (Fedorenko, Behr and Kanwisher 2011); the N400 (Kutas and Hillyard 1980) and the P600 (Osterhout and Holcomb 1992).
  12. Language and thought: Whorf; Berlin and Kay (1969); Russian blues (Winawer et al. 2007) and their contested record; Pirahã numbers (Frank et al. 2008); the bilingual advantage and its meta-analysis (Lehtonen et al. 2018).
  13. The Ledger. 13. In practice: Flesch's formula computed (about 75 for two stories and a chapter of The Maltese Falcon) and why surprisal is better; the National Reading Panel (2000) and phonics; intensive aphasia therapy (Breitenstein et al. 2017); second languages. 14. Frontier: language models' input against a child's (BLiMP, Warstadt et al. 2020; BabyLM); one child's 61 hours (Vong et al. 2024); larger models' surprisal fitting readers worse (Oh and Schuler 2023).

Psyche: language: Zipf's law and the typing monkey; cohorts and Flesch; the interactive activation model with a fourteen-segment font; Saffran streams, transitional probabilities and segmentation; a past-tense learner whose vocabulary grows; an interpolated Kneser-Ney trigram and its surprisal; the reading-time regression with spillover. opendata: Natural Stories' per-word reading times, pinned to a commit and checked by SHA-256. On you: a syllable stream in the film; the interactive is a made-up language (watch the stream, then pick its words out of eight pairs; you against chance and Psyche). Ledger: word superiority (replicated); infant statistical segmentation (replicated, smaller); surprisal and reading time (replicated); a sharp critical period (contested); linguistic relativity for colour discrimination (contested); a bilingual advantage in executive control (failed). In practice: readability, reading instruction (Part 54), aphasia therapy, second-language teaching. Frontier: what language models' success shows about learnability; child-scale input; whether surprisal from larger models fits reading times worse. Reading: Chomsky 1959; Saffran, Aslin & Newport 1996; McClelland & Rumelhart 1981; Levy 2008; Pinker, The Language Instinct and Words and Rules; Rumelhart & McClelland 1986; Hartshorne et al. 2018; Traxler, Introduction to Psycholinguistics; Christiansen & Chater, The Language Game.

Build the film

python -m videos.psychology.psych23.compute        # the part's numbers, into .cache/psych23
python tools/build.py psych23                  # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py psych23 Hook   # one chapter, silent, with a contact sheet

Scenes: videos/psychology/psych23. Setup: see the course page. Source of these notes: the README and the scenes' narration.

Build it
python -m videos.psychology.psych23.compute            # every number (a few minutes; fetches Natural Stories once)
python tools/qa_scene.py psych23 Surprisal             # one chapter, silent, at 480p, with a contact sheet
EXPLAINER_TTS=silent python tools/build.py psych23 -q l   # the whole part, silent preview
python tools/build.py psych23                          # 1080p30 with narration
python tools/qa_scene.py psych23 Segmentation --lang zh   # the Chinese edition of one chapter
python tools/make.py psych23                           # both editions, with the checks a long build needs
python -m videos.psychology.labs 23                    # the lab: Zipf's law to surprisal and reading time
python tools/check_ledger.py psych23                   # every study shown has its Ledger row, or a reason
python -m pytest tests/psychology                      # Psyche's language module, the Ledger, the Archive

The language model learns from the thirty novels of AI, Built Part 1; if .cache/ai1/train.txt is missing, the compute builds it first (it downloads the novels from Project Gutenberg). The Natural Stories files carry no licence, so they are fetched on first use and never committed.

The Chinese edition is zh_lines.py (the narration, line by line) and the series table videos/psychology/psychology_text_zh.json (the text on screen); the terms are in PSYCHOLOGY_ZH_GUIDE.md.