Fear and Sadness
How do fear and sadness go wrong, and what do the treatments act on?
In 1967 dogs given shocks they could not escape later lay down and took shocks they could escape; fifty years later the authors reversed the explanation: passivity is the default, and what is learned is control. The part builds anxiety and depression from the learning models of earlier acts: Mowrer's two factors and an avoidance loop that never unlearns, extinction as context-bound learning and the return of fear, the anxiety disorders and the panic spiral, attention to threat and the failed bias-modification trials, depression's cognitive accounts, helplessness as a belief about control, and a model of momentary mood fitted to a gambling task. Then the serotonin story and the 2022 review, Kirsch's analysis and the 522-trial network meta-analysis, life events and the gene-by-stress finding that did not survive large samples, lithium, and why suicide cannot be predicted well for individuals.
What you need. Part 16's Rescorla-Wagner model, Part 17's prediction errors, Part 29's emotion and Part 39's base rates; logarithms, geometric series and least squares.
- Hook
- dogs that did not jump
- Ideas, models and mathematics
- anxiety as learning, extinction and exposure, learned helplessness revised, the cognitive model, the monoamine story, antidepressant trials, trauma, OCD, bipolar disorder, suicide prediction
- Psyche gains
- a helpless learner; an avoidance loop
- On you
- an attentional-bias probe
What you will be able to do
Psych 101 and the major
- Explain Mowrer's two factors, why avoidance preserves fear, and why exposure works.
- Describe the cognitive, helplessness and reward accounts of depression and the evidence on each.
- Interpret the drug-placebo difference as an effect size and a number needed to treat, and explain why suicide risk cannot be predicted well for individuals.
Graduate
- Simulate avoidance and response prevention on a Rescorla-Wagner learner, and renewal after context-bound extinction.
- Model the triadic design as a Beta belief about control.
- Fit Rutledge and colleagues' model of momentary mood and show what blunted prediction errors do.
Research
- Design a study that separates liking, learning and effort in anhedonia, with the parameter each hypothesis predicts will differ.
Practice
- Map a treatment onto the model it acts on, and judge a claimed effect by its size and the base rate.
Contents
Each chapter has a home level. Choose a track to see what to read and watch: Psych 101 and the major 22 min · Graduate 25 min · Research 26 min · Practice 23 min.
- 01967: dogs that stopped tryingPsych 101 and the major3 min
- 1On you: a dot, and four numbersPsych 101 and the major1 min
- 2Fear that never unlearnsPsych 101 and the major1 min
- 3Exposure, and the return of fearPsych 101 and the major2 min
- 4The anxiety disorders in one framePsych 101 and the major2 min
- 5Attention to threatPsych 101 and the major1 min
- 6Depression and thoughtPsych 101 and the major1 min
- 7Helplessness and controlPsych 101 and the major1 min
- 8Reward and moodGraduate2 min
- 9The chemical storyPsych 101 and the major1 min
- 10Do antidepressants work?Psych 101 and the major1 min
- 11Stress, life events and genesPsych 101 and the major1 min
- 12Bipolar disorder, lithium, and suicidePsych 101 and the major2 min
- 13The LedgerPsych 101 and the major
- 14In practice: treatments as modelsPractice1 min
- 15Frontier: subtypes, speed and computationResearch1 min
- 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.
1967: dogs that stopped tryingPsych 101 and the major3 min
Before we start. This part is about anxiety and depression, and it touches on suicide. It's education, not diagnosis or treatment. If any of it touches your own life, talk to a doctor, a counsellor, or someone you trust. If you're in danger now, call your local emergency number. In the United States you can call or text nine eight eight. In the UK and Ireland, Samaritans are on one one six, one two three. And find a helpline dot com lists free, confidential lines in other countries.
In 1967 Martin Seligman and Steven Maier ran an experiment that became a theory of depression. Three groups of dogs. One could stop shocks by pressing a panel. One received exactly the same shocks, with no control. One received none. A day later they were put in a shuttle box, where jumping a low barrier ended the shock. Most of the dogs from the inescapable group lay down and took it. The dogs that had had control, and those with no shock, learned to escape. The theory: they had learned that nothing they did mattered. Learned helplessness became one of the founding models of depression.
Fifty years later its own authors turned it around. In 1967 the idea was that animals learn they have no control, and so become passive. In 2016, after decades of tracing the brain circuits in rats, Maier and Seligman concluded the opposite. Passivity is the default response to prolonged threat. What's learned is control, and control switches the passivity off. The circuits ran the other way from the theory. The authors reversed their own explanation. The finding, that control protects, still stands.
So this part asks what anxiety and depression are made of, and what treatments act on. It builds anxiety from the conditioning of Part 16: fear that avoidance keeps alive, and exposure that removes it. It builds depression from reward and control: helplessness, anhedonia, and a model of mood. It asks what the drugs act on, and what the trials say they do. And it turns to stress, genes and life events, to bipolar disorder, and to why suicide is so hard to predict.
This is Part 40 of Psychology, Built: fear and sadness. We'll treat anxiety as learning: avoidance, exposure, and the return of fear. We'll put the anxiety disorders in one frame, and look at attention to threat. We'll take depression through cognition, helplessness and control, then through reward, with a model of momentary mood. We'll weigh the serotonin story and what antidepressant trials show. And we'll end with stress and genes, lithium, and the limits of predicting suicide.
What it does: The care card; the triadic design; fifty years later; the question; objectives
1On you: a dot, and four numbersPsych 101 and the major1 min
First, a trial from a classic task. Look at the cross. Two words flash, one above and one below. They vanish, and a dot appears where one of them was. Your job is to say where the dot is, as fast as you can. If your attention was already drawn to the threatening word, you find the dot a little faster when it replaces that word. That speed-up is called attentional bias to threat. Nothing is scored here. This only shows how the task works.
Now four numbers to write down before the part answers them. One: a network meta-analysis compared twenty-one antidepressants with placebo. How many trials did it combine? Two: on a fifty-two-point depression scale, how far apart were antidepressant and placebo, on average, in the trials sent to the American regulator? Three: a famous finding said that a serotonin gene variant makes stress more likely to cause depression. Did it hold up in tens of thousands of people? And four: after fifty years of research, how much better than chance is the prediction of suicidal behaviour from risk factors? Pause here, and write them down.
What it does: A dot-probe trial; four predictions
2Fear that never unlearnsPsych 101 and the major1 min
Start with anxiety, and the learning of Part 16. In 1947 O. Hobart Mowrer proposed two factors. First, fear is learned by Pavlovian pairing: a signal, then shock. Then avoidance is learned by reward. Escaping the feared signal brings relief, and relief reinforces escaping. Here's the trap. Each avoided trial is a trial in which the person never finds out that nothing bad would have happened. So the fear is never tested, and never unlearned.
Here's the loop in Psyche. A Rescorla-Wagner learner gets twenty pairings of a signal with shock, then sixty trials with no shock at all. Allowed to avoid, it escapes the signal on of trials. The few full exposures barely dent the fear, which ends almost where it began. Made to stay, exposure with response prevention, it learns that no shock comes, and fear falls to nearly nothing. That's the logic of exposure therapy: stay with the feared thing long enough to learn that it's safe.
What it does: Two factors; the loop, computed
3Exposure, and the return of fearPsych 101 and the major2 min
If exposure works, why does fear come back? Mark Bouton's answer: extinction doesn't erase the fear. It adds a second, inhibitory memory, and that memory is tied to the context where it was learned. In Psyche, fear is learned in context A and extinguished in context B. Tested in B, no fear. Back in A, or in a new place, C, the fear returns. That's renewal. Fear also comes back with time, spontaneous recovery, and after a single shock, reinstatement. Relapse after therapy is what these predict.
If extinction is new learning, it can be learned better. Michelle Craske and colleagues set out the principles. Design each exposure to test a specific feared outcome, and let it not happen. Practise in many places, so the new learning isn't tied to the clinic. Drop safety behaviours: carrying a pill, or a phone to call for help, is a small avoidance. And use retrieval cues that carry what was learned back into the old contexts. Exposure-based treatments are among the best-supported in all of psychology.
Psyche can test the second principle. Suppose the inhibition learned in extinction is tied to a context's features, and any new place shares a quarter of its features with each place where extinction happened. Extinguished in one place, the fear in a new one comes back at about three quarters of its peak. Spread over six places, it comes back at under a fifth. Each new place retrieves more of what was learned. It's a toy model of Craske's second principle, and trials that vary the setting of exposure test it in people.
What it does: Extinction is new learning; making exposure last; many places, computed
4The anxiety disorders in one framePsych 101 and the major2 min
The anxiety disorders share one frame: something feared, and something that keeps the fear going. In a specific phobia, an object or situation is feared, and avoiding it keeps the fear alive. In panic disorder, what's feared is the body's own sensations, read as catastrophe. In social anxiety, others' judgment, kept going by safety behaviours and self-focus. In generalized anxiety, many possible futures, with worry felt as a way to be prepared. In obsessive-compulsive disorder, intrusive thoughts, with compulsions that bring relief and become habits, the goal-to-habit shift of Part 17. And in post-traumatic stress disorder, reminders of a trauma, with avoidance of the memory, so it's never reprocessed, the memory of Part 21.
Panic shows how a belief closes the loop. In 1986 David Clark proposed that in panic disorder, a racing heart, breathlessness or dizziness is misread as a sign of a heart attack, suffocation, or going mad. The misreading raises anxiety, which raises the sensations, which confirm the misreading. Cognitive therapy tests the misreadings, for example by bringing on the sensations deliberately, and seeing that nothing happens. It's exposure, aimed at a belief.
Compulsions add a twist. In Part 17, two systems controlled action: goal-directed control, which acts for what the action brings, and habit, which acts because the cue is there. Practice shifts control from one to the other. In 2011 Claire Gillan and colleagues found that people with obsessive-compulsive disorder kept responding for outcomes that had been made worthless, more than controls did: a tilt toward habit. In 2016, in large online samples, Gillan and colleagues found that weaker goal-directed planning went with a dimension of compulsivity that cuts across diagnoses, not with OCD alone. So a compulsion may be a habit that has slipped free of its goal, and exposure with response prevention retrains it.
What it does: What is feared and what keeps it going; the panic spiral; compulsion as habit
5Attention to threatPsych 101 and the major1 min
Back to the dot-probe trial. Anxious groups, on average, find the dot faster where a threat word was. Their attention is drawn to threat. But one person's bias score barely correlates with their own score a week later. As Part 3 showed, a measure that unreliable can't diagnose anyone. Attention-bias modification tried to train the bias away, by always putting the dot where the neutral word was. In 2015 Ioana Cristea and colleagues meta-analysed the trials. The small effects on anxiety disappeared after correcting for bias in the literature. A group difference isn't an individual measure, and a mechanism isn't yet a treatment.
What it does: A bias, a measure and a treatment
6Depression and thoughtPsych 101 and the major1 min
Now sadness. Depression's symptoms span mood, interest, sleep, appetite, energy, concentration, guilt and thoughts of death, and Part 39 showed how varied the combinations are. In 1967 Aaron Beck described a negative triad: a negative view of the self, the world and the future, kept going by biased interpretation. In 1978 the helplessness theory was reformulated around attributional style: explaining bad events as caused by oneself, as lasting, and as pervasive. And rumination: dwelling on one's distress and its causes, which prolongs low mood. Cognitive therapy targets these, with evidence of benefit. Whether such thoughts cause depression, or simply come with it, is harder to show.
What it does: Three cognitive accounts
7Helplessness and controlPsych 101 and the major1 min
Psyche runs the triadic design as a belief about control. A learner believes, to some degree, that its actions control the shock, and tries to escape as often as it believes. Trying updates the belief. With escapable shock first, the belief in control is strong, and it escapes at once. With inescapable shock first, trying never worked, so it rarely tries, and never finds out that the new box is different. The learner with no shock first sits between, and learns. The 2016 revision puts the default the other way round: in rats, prolonged shock triggers passivity by default, and detecting control, in prefrontal cortex, switches it off. Control is what's learned. In depression, the question becomes what makes people stop detecting control.
What it does: The triadic design, computed
8Reward and moodGraduate2 min
Depression is also a problem of reward. Anhedonia, the loss of interest or pleasure, is one of its two core symptoms. In Part 17, dopamine carried a reward prediction error: how much better or worse things went than expected. Anhedonia could be a blunted response to those errors, less learning from good outcomes, or less willingness to spend effort for reward. The three predict different things, and tasks that tell them apart are a frontier of computational psychiatry, in Part 59.
Mood itself can be modelled. In 2014 Robb Rutledge and colleagues had people rate their happiness every few trials of a gambling task. Happiness was explained by a decaying sum of recent certain rewards, expected values, and above all reward prediction errors. It held in the lab and in thousands of people playing on smartphones. Psyche simulates ninety trials and fits the model. The prediction-error weight comes back close to its true value. Now blunt the prediction errors to forty percent. The mood swings shrink: a flat mood that good news barely moves. It's one way anhedonia might look from the inside.
Low mood can also trap itself, the way avoidance trapped fear. In Psyche, each day brings a choice: an activity whose rewards can only be known by trying it, or rest, with a small reward it already knows. After a loss, its estimate of acting is low, so it rests, and never tests the estimate. In the last month it's hardly ever active. Now schedule the activity for two weeks, whatever the mood. The estimate is corrected, and it stays active. That's behavioural activation: act first, and let the learning follow. In trials it does about as well as cognitive therapy, which Part 42 weighs.
What it does: Anhedonia; momentary mood, modelled; the trap of doing less, computed
9The chemical storyPsych 101 and the major1 min
The drugs came first, by accident. In the 1950s, reserpine, a blood-pressure drug that depletes monoamines, was reported to bring on low mood in some patients. And iproniazid, a tuberculosis drug that blocks the enzyme that breaks monoamines down, was reported to lift patients' spirits. From these came the monoamine hypothesis: depression is a shortage of noradrenaline or serotonin, and antidepressants correct it. It became the public story of depression as a chemical imbalance, repeated in advertising and in clinics.
Does the evidence support it? In 2022 Joanna Moncrieff and colleagues published an umbrella review of the research on serotonin and depression. They found no consistent evidence that depression is associated with, or caused by, lower serotonin activity. Critics replied that serotonin may still matter for some people, and that the drugs' benefit doesn't depend on the deficit story. The logical point stands either way. That a drug relieves a condition doesn't show the condition is a shortage of what the drug changes. Aspirin relieves headaches, and headaches aren't a shortage of aspirin. The Ledger marks the serotonin deficit account, as stated, as failed.
What it does: Two accidents and a hypothesis; what the evidence on serotonin shows
10Do antidepressants work?Psych 101 and the major1 min
How well do the drugs work? In 2008 Irving Kirsch and colleagues analysed the trials of four newer antidepressants submitted to the American regulator, published or not. Both groups improved a lot. The average difference between drug and placebo was about one point eight points on the fifty-two-point Hamilton scale. The gap was larger for the most severely depressed, mainly because they responded less to placebo. Much of the improvement on a drug is improvement that would have happened on placebo, which is itself a treatment of attention, hope and time.
The largest analysis came ten years later. In 2018 Andrea Cipriani and colleagues combined five hundred and twenty-two trials, a hundred and sixteen thousand people, comparing twenty-one antidepressants. Every one was more effective than placebo for adults with major depression, with odds ratios from about one point four to two point one. A real average effect, modest in size. The Ledger marks antidepressants beating placebo as replicated, and small. What's open is who benefits most, how to choose a drug for a particular person, and what happens over years, since most trials last about eight weeks.
What it does: Drug, placebo, and the gap; 522 trials
11Stress, life events and genesPsych 101 and the major1 min
Depression often follows something. In 1978 George Brown and Tirril Harris reported interviews with women in a London borough. Severe life events, above all losses and humiliations, often came before the onset of depression. And vulnerability factors, such as lacking a close confiding relationship, made depression after such an event more likely. It's the diathesis-stress frame of Part 39, in a community. Who the stress lands on matters as much as the stress.
Then came a gene. In 2003 Avshalom Caspi and colleagues reported from the Dunedin cohort that stressful events predicted depression more strongly in carriers of a short variant of the serotonin transporter gene. It became a celebrated gene-by-environment interaction, cited thousands of times. But in 2018 Robert Culverhouse and colleagues pooled data on more than thirty-eight thousand people, and in 2019 Richard Border and colleagues tested the candidate genes in large samples. Neither found support. It's Part 9's lesson. Depression is highly polygenic, and single candidate genes of large effect didn't survive large samples.
What it does: Social origins; a gene, stress, and a failed interaction
12Bipolar disorder, lithium, and suicidePsych 101 and the major2 min
Mood can go the other way too. Bipolar disorder brings episodes of depression and of mania, with high energy, little sleep and risky confidence, separated by periods of being well. In 1949 the Australian psychiatrist John Cade reported that lithium salts calmed patients with mania, a chance discovery from experiments on animals. Lithium is still a first-line treatment for preventing episodes, and it needs blood monitoring, because the effective and toxic doses are close. It's a case where a treatment came long before any account of how it works.
Finally, suicide, and what research can and can't do. In 2017 Joseph Franklin and colleagues meta-analysed three hundred and sixty-five studies covering fifty years of research on risk factors for suicidal thoughts and behaviours. Every known risk factor predicted only slightly better than chance, and prediction hadn't improved over the fifty years. Part of the reason is the base-rate problem of Part 39. In any short period, suicide is rare, so even a strong risk factor flags far more people than will act. So care doesn't rest on prediction. Asking someone directly about suicidal thoughts is safe, and it helps, and support is offered to everyone who is struggling. If that's you, the numbers are on the screen.
Here's the base-rate problem in numbers. Take a risk factor that's right eighty percent of the time both ways, for an outcome with a yearly rate of one in two thousand. In ten thousand people, five will die by suicide in the year, and the factor flags four of them. It also flags nearly two thousand of the people who won't. So of everyone flagged, about one in five hundred will die in that year. Which is why care is offered to everyone who is struggling, and not rationed by a score.
What it does: Highs and lows; why suicide is so hard to predict; the base rate in natural frequencies
13The LedgerPsych 101 and the major
The tally. What holds: exposure, the return of fear, helplessness, and a small advantage of antidepressants over placebo. What failed: attention training, the serotonin-deficit story, a celebrated gene-by-stress interaction, and predicting suicide from risk factors. The learning models hold up better than the chemical and genetic stories.
What it does: Eight rows and the tally
14In practice: treatments as modelsPractice1 min
In practice, each treatment acts on one of these models. Exposure acts on the avoidance loop of chapter two: stay, and learn that the danger doesn't come. Behavioural activation schedules rewarding activities, to restart the learning from reward that depression slows. Cognitive therapy tests the beliefs of chapters four and six against evidence. Medication has a modest average effect: choose it with the person, watch the side effects, and review it over weeks, not days. And screening follows Part 39's base rates: a positive screen leads to an assessment, not a label. Whether these treatments work, and how well, is Part 42.
What it does: Each therapy acts on a model
15Frontier: subtypes, speed and computationResearch1 min
At the frontier, three ideas. Subtypes: if depression is many conditions, as Part 39 suggested, treatments may work for some and not others. Finding the subtypes, from symptoms, biology or course, has proved hard. Speed: most antidepressants take weeks, but ketamine, a drug acting on glutamate, can lift mood within hours in some people, which a slow monoamine story can't explain. And computation: fitting learning models like chapter eight's to each person's choices, to measure what differs in that person. That's Part 59. Each promises treatment matched to the person. None has yet delivered it reliably.
So, open questions. How can exposure's gains be made to last outside the clinic? Is anhedonia a problem of liking, learning or effort, and does it differ between people? Who benefits from an antidepressant, and can that be known before starting? What does a fast-acting treatment act on, if not a monoamine shortage? And how can people at risk of suicide be helped without relying on prediction?
What it does: Three frontiers; open questions
Recap, problems, and the road aheadAll tracks3 min
First, your four numbers. Trials in the network meta-analysis: five hundred and twenty-two. Drug against placebo on the fifty-two-point scale: about one point eight. The gene-by-stress finding in thirty-eight thousand people: it didn't hold. And predicting suicidal behaviour from risk factors: only slightly better than chance. The learning models hold. The simple chemical and genetic stories didn't.
Part forty in eleven lines. Control protects, and the explanation of helplessness was reversed. Avoidance keeps fear alive by preventing the test. Exposure works, and because extinction is new, context-bound learning, fear can return. Anxiety disorders differ in what is feared and share what maintains it. Attention to threat is a group effect, not a measure or a treatment. Depression brings negative thinking, lost control and blunted reward. Momentary mood tracks recent reward prediction errors. The serotonin-deficit story failed as stated. Antidepressants beat placebo, modestly, on average. Stress matters, and the celebrated gene didn't. And suicide can't be predicted well for individuals, so care must not wait on prediction.
Kant's wager. The first objection, that mathematics can't apply to the mind, met Rescorla-Wagner avoidance, context-bound extinction, a belief about control, and a model of mood. The second, that the mind can't be experimented on, met exposure trials, shuttle boxes and five hundred and twenty-two drug trials. And the third, about introspection: mood rated moment by moment is fitted by a model, though the ratings remain reports. Amber.
Where this comes back. Psychosis, addiction and development are next, in Part 41. Whether therapy works, and which, is Part 42. Symptoms tracked day by day are Part 47, and computational psychiatry Part 59.
Seven problems, with full solutions in this part's README. One counts the exposures avoidance allows. One writes the renewal model. One updates a belief about control. One computes a mood. One turns a drug-placebo gap into an effect size and a number needed to treat. One works the base rate for a suicide risk factor. And the last, with the star, asks you to design a study that could tell liking, learning and effort apart. Pause here if you'd like to try them.
The books and papers behind this part are listed here and in the README. Barlow, Durand and Hofmann's textbook covers the disorders; Beck's book is the founding statement of cognitive therapy; and Brown and Harris's Social Origins of Depression is still the model of how to study life events.
Act Ten continues. This part built fear and sadness from learning, reward and control. The next takes the same models further: psychosis as inference gone wrong, addiction as reward learning gone wrong, and the conditions of development. Part 41: psychosis, addiction and development.
Where it goes next. Psychosis, addiction and development are Part 41, the evidence for therapy Part 42, symptoms tracked day by day Part 47 and computational psychiatry Part 59.
Key results
The part's results in one place, for revision.
Try it
Lab 40 · Fear and Sadness
Let a Rescorla-Wagner learner avoid a feared signal and watch its fear survive; prevent the response and watch it fall; extinguish fear in one context and test it in others; run the triadic design as a belief about control; and fit a model of momentary mood, then blunt its prediction errors.
python -m videos.psychology.labs 40
needs numpy, scipy, matplotlib · download lab40.py ·
source on GitHubfear after 60 trials without shock: allowed to avoid (median of 21); response prevention 0.78; 0.01
full exposures to bring fear from 0.9 below 0.3 at extinction rate 0.08 14
fear at test: context B (extinction); A (acquisition); C (new) 0.00; 0.99; 0.99
share escaping across 10 test trials: escapable first; inescapable first; no shock first 98%; 11%; 68%
Beta(1, 1) after 10 failures; after 10 successes: probability of trying 0.083; 0.917
fear in a new place after extinction in 1, 3 and 6 contexts 0.74; 0.42; 0.18
share of active days in the last month: left alone; activity scheduled for 14 days 0%; 97%
mood model: true and fitted prediction-error weight; fitted forgetting; R squared 0.60, 0.52; 0.55; 0.60
SD of happiness: normal; prediction errors blunted to 40% 0.37; 0.26
H_10 when every prediction error is 0.5 (gamma 0.7, w0 0.5, w3 0.6) 1.47
Avoidance protects fear from the test that would extinguish it; extinction learned in one context leaves fear intact in others; a learner that finds its actions do nothing stops trying; and a model of mood built on recent prediction errors fits momentary ratings, with blunted errors flattening mood.
The code (92 lines; it asserts its own result)
"""Lab 40: Mowrer's avoidance loop and response prevention, renewal after context-bound extinction, the triadic
design as a belief about control, and a model of momentary mood fitted to a gambling task."""
import numpy as np
from videos.coursekit import labs
from explainer.psychology.psyche import clinic as K
TITLE = "Fear and Sadness"
GOAL = ("Let a Rescorla-Wagner learner avoid a feared signal and watch its fear survive; prevent the response and "
"watch it fall; extinguish fear in one context and test it in others; run the triadic design as a belief "
"about control; and fit a model of momentary mood, then blunt its prediction errors.")
TASKS = [
"Raise the avoidance threshold from 0.3 to 0.6. How much fear is left after 60 trials, and why?",
"In the renewal model, extinguish in two contexts in turn and test in a third. Which version of the model would "
"predict less renewal, and what would it need?",
"Give the inescapable group 16 pretreatment trials instead of 64. How much of the helplessness remains?",
]
def run(seed=0):
out = labs.Lab()
runs = [K.avoidance(seed=seed + s) for s in range(21)]
finals = np.array([r["fear"][-1] for r in runs])
prevent = K.avoidance(prevent=True)
out.row("fear after 60 trials without shock: allowed to avoid (median of 21); response prevention",
f"{np.median(finals):.2f}; {prevent['fear'][-1]:.2f}")
assert np.median(finals) > 0.5 and prevent["fear"][-1] < 0.05
exposures = int(np.ceil(np.log(0.3 / 0.9) / np.log(0.92)))
out.row("full exposures to bring fear from 0.9 below 0.3 at extinction rate 0.08", str(exposures))
assert exposures == 14
r = K.renewal()
out.row("fear at test: context B (extinction); A (acquisition); C (new)",
f"{r['test']['B']:.2f}; {r['test']['A']:.2f}; {r['test']['C']:.2f}")
assert r["test"]["B"] < 0.05 and r["test"]["A"] > 0.9
groups = {p: K.helplessness(p, seed=seed) for p in ("escapable", "inescapable", "none")}
out.row("share escaping across 10 test trials: escapable first; inescapable first; no shock first",
"; ".join(f"{100 * groups[p].mean():.0f}%" for p in ("escapable", "inescapable", "none")))
assert groups["escapable"].mean() > groups["none"].mean() > groups["inescapable"].mean()
out.row("Beta(1, 1) after 10 failures; after 10 successes: probability of trying",
f"{1 / 12:.3f}; {11 / 12:.3f}")
ctx = K.renewal_contexts()
out.row("fear in a new place after extinction in 1, 3 and 6 contexts",
"; ".join(f"{ctx['fear'][i]:.2f}" for i in (0, 2, 5)))
stuck = np.median([K.activation(0, seed=seed + s)["active"][-30:].mean() for s in range(21)])
freed = np.median([K.activation(14, seed=seed + s)["active"][-30:].mean() for s in range(21)])
out.row("share of active days in the last month: left alone; activity scheduled for 14 days",
f"{100 * stuck:.0f}%; {100 * freed:.0f}%")
assert stuck < 0.2 and freed > 0.8
d = K.mood_task(seed=seed)
f = K.fit_mood(d)
b = K.mood_task(seed=seed, rpe_scale=0.4)
out.row("mood model: true and fitted prediction-error weight; fitted forgetting; R squared",
f"{d['true_w'][3]:.2f}, {f['w'][3]:.2f}; {f['gamma']:.2f}; {f['r2']:.2f}")
out.row("SD of happiness: normal; prediction errors blunted to 40%",
f"{np.std(d['happy']):.2f}; {np.std(b['happy']):.2f}")
assert np.std(b["happy"]) < np.std(d["happy"])
h10 = 0.5 + 0.6 * 0.5 * (1 - 0.7 ** 10) / (1 - 0.7)
out.row("H_10 when every prediction error is 0.5 (gamma 0.7, w0 0.5, w3 0.6)", f"{h10:.2f}")
out.note = ("Avoidance protects fear from the test that would extinguish it; extinction learned in one context "
"leaves fear intact in others; a learner that finds its actions do nothing stops trying; and a model "
"of mood built on recent prediction errors fits momentary ratings, with blunted errors flattening "
"mood.")
fig, ax = labs.figure(3, size=(13, 4.0))
k = int(np.argsort(finals)[len(finals) // 2])
ax[0].plot(runs[k]["fear"], color=labs.RED, label="allowed to avoid")
ax[0].plot(prevent["fear"], color=labs.GREEN, label="response prevention")
ax[0].axvline(20, color="grey", ls=":")
ax[0].set(title="Avoidance keeps fear alive", xlabel="trial", ylabel="fear V")
ax[0].legend(fontsize=8)
for p, c in (("escapable", labs.GREEN), ("none", labs.BLUE), ("inescapable", labs.RED)):
ax[1].plot(np.arange(1, 11), groups[p], "o-", color=c, label=p)
ax[1].set(title="The triadic design", xlabel="test trial", ylabel="share escaping", ylim=(0, 1.05))
ax[1].legend(fontsize=8)
ax[2].plot(d["happy"], color=labs.GOLD, alpha=0.6, label="ratings")
ax[2].plot(f["fit"], color=labs.BLUE, label="model")
ax[2].plot(b["happy"], color=labs.RED, alpha=0.5, label="blunted")
ax[2].set(title="Momentary mood", xlabel="trial", ylabel="happiness")
ax[2].legend(fontsize=8)
out.fig = fig
return out
if __name__ == "__main__":
print(run())
Now change it
- Raise the avoidance threshold from 0.3 to 0.6. How much fear is left after 60 trials, and why?
- In the renewal model, extinguish in two contexts in turn and test in a third. Which version of the model would predict less renewal, and what would it need?
- Give the inescapable group 16 pretreatment trials instead of 64. How much of the helplessness remains?
Problems, with solutions
Try each problem before opening its solution.
-
Exposures avoidance allows. A Rescorla-Wagner learner has fear \(V = 0.9\) and avoids on every trial with probability \(0.95\,\sigma(10(V - 0.3))\). With extinction rate \(0.08\), how many full exposures does it take to bring \(V\) below 0.3, and roughly how many trials will that take?
Solution
Each full exposure multiplies V by 0.92. From 0.9, V < 0.3 needs n with 0.9 × 0.92ⁿ < 0.3, so n > ln(1/3)/ln(0.92) ≈ 13.2: 14 exposures. While V is high the learner avoids on 95% of trials, so one exposure comes about every 20 trials: roughly 280 trials (fewer as V falls and avoidance weakens).
-
Renewal. In the renewal model, excitation \(E\) is expressed everywhere and inhibition \(I\) only in context B. Write the fear in A, B and C after extinction, and suggest one way to make extinction generalize.
Solution
After extinction, fear in B is E − I ≈ 0, in A and in C it is E. Extinction generalizes better when it is practised in several contexts, or when retrieval cues from the extinction context are carried into others.
-
Belief about control. A learner starts with a Beta(1, 1) belief about control. After 10 tries that all fail, what is its probability of trying? After 10 that all succeed?
Solution
Beta(1, 1) after 10 failures is Beta(1, 11): it tries with probability 1/12 ≈ 0.08. After 10 successes, Beta(11, 1): 11/12 ≈ 0.92.
-
A mood. Happiness \(H_t = w_0 + w_3 \sum_j \gamma^{t-j} \delta_j\). If every prediction error is 0.5 for ten trials, find \(H_{10}\) for \(\gamma = 0.7\), \(w_0 = 0.5\), \(w_3 = 0.6\).
Solution
H₁₀ = 0.5 + 0.6 × 0.5 × (1 − 0.7¹⁰)/(1 − 0.7) = 0.5 + 0.3 × 0.9718/0.3 ≈ 0.5 + 0.97 = 1.47.
-
Effect size and NNT. A drug and a placebo improve depression by 9.6 and 7.8 points, with SD 8 in both groups. What is the standardized effect size, and how many people need to be treated for one extra response if response rates are 50% and 40%?
Solution
d = (9.6 − 7.8)/8 ≈ 0.23. With response rates 50% and 40%, the number needed to treat is 1/(0.5 − 0.4) = 10.
-
A risk factor's yield. A risk factor has sensitivity 0.8 and specificity 0.8 for suicide death within a year, where the base rate is 1 in 2{,}000. What share of people it flags will die by suicide in that year?
Solution
Per 2,000 people, one dies; the factor flags 0.8 of that person and 0.2 × 1,999 ≈ 400 others: the share of flagged people who die is 0.8/400.6 ≈ 0.2%, about 1 in 500.
-
★ Liking, learning or effort. Design a study that could tell whether a person's anhedonia is a problem of liking, of learning or of effort.
Solution
Measure hedonic ratings of rewards as received (liking); fit a learning model to choices in a probabilistic reward task (learning rate and reward sensitivity); and offer choices between low-effort small rewards and high-effort large ones (effort). A person whose ratings are normal but whose learning is blunted differs from one whose effort is the problem; preregister which parameter each hypothesis predicts will differ, and test it in people with and without anhedonia.
Notes and sources
Sources
- M. E. P. Seligman and S. F. Maier, Journal of Experimental Psychology 74 (1967) 1-9; S. F. Maier and M. E. P. Seligman, Learned helplessness at fifty, Psychological Review 123 (2016) 349-367.
- O. H. Mowrer, On the dual nature of learning, Harvard Educational Review 17 (1947); J. Wolpe, Psychotherapy by Reciprocal Inhibition (1958).
- M. E. Bouton, Context, ambiguity, and unlearning, Biological Psychiatry 52 (2002) 976-986; M. E. Bouton and R. C. Bolles, Learning and Motivation 10 (1979); B. Vervliet, M. G. Craske and D. Hermans, Annual Review of Clinical Psychology 9 (2013); M. G. Craske et al., Behaviour Research and Therapy 58 (2014) 10-23; J. K. Carpenter et al., Depression and Anxiety 35 (2018).
- D. M. Clark, A cognitive approach to panic, Behaviour Research and Therapy 24 (1986) 461-470.
- C. M. Gillan et al., Disruption in the balance between goal-directed behavior and habit learning in obsessive-compulsive disorder, American Journal of Psychiatry 168 (2011) 718-726; C. M. Gillan, M. Kosinski, R. Whelan, E. A. Phelps and N. D. Daw, Characterizing a psychiatric symptom dimension related to deficits in goal-directed control, eLife 5 (2016) e11305.
- D. A. Richards et al., Cost and outcome of behavioural activation versus cognitive behavioural therapy for depression (COBRA), Lancet 388 (2016) 871-880.
- C. MacLeod et al., Journal of Abnormal Psychology 111 (2002); I. A. Cristea, R. N. Kok and P. Cuijpers, British Journal of Psychiatry 206 (2015) 7-16.
- A. T. Beck, Depression (1967); L. Y. Abramson, M. E. P. Seligman and J. D. Teasdale, Journal of Abnormal Psychology 87 (1978); S. Nolen-Hoeksema, Journal of Abnormal Psychology 100 (1991).
- R. B. Rutledge, N. Skandali, P. Dayan and R. J. Dolan, A computational and neural model of momentary subjective well-being, PNAS 111 (2014) 12252-12257.
- J. J. Schildkraut, American Journal of Psychiatry 122 (1965); J. Moncrieff et al., The serotonin theory of depression, Molecular Psychiatry (2022).
- I. Kirsch et al., PLoS Medicine 5 (2008) e45; A. Cipriani et al., Lancet 391 (2018) 1357-1366.
- G. W. Brown and T. Harris, Social Origins of Depression (1978); A. Caspi et al., Science 301 (2003) 386-389; R. C. Culverhouse et al., Molecular Psychiatry 23 (2018); R. Border et al., American Journal of Psychiatry 176 (2019).
- J. F. J. Cade, Lithium salts in the treatment of psychotic excitement, Medical Journal of Australia (1949); A. D. Pokorny, Archives of General Psychiatry 40 (1983); J. C. Franklin et al., Psychological Bulletin 143 (2017) 187-232.
About this partfrom its README
The part opens with the care card: this is education, not diagnosis or treatment, and here is where help is found; it touches on suicide, under safe-messaging rules (no method detail, help on screen). In 1967 dogs that had received shocks they could not escape later lay down and took shocks they could escape. The finding became a theory of depression, and fifty years later its own authors reversed the explanation: passivity is the default, and what is learned is control. The part builds anxiety and depression out of the learning and choice models of Acts IV and V, and weighs what trials say about the drugs.
The hook is Seligman and Maier's triadic design and the 2016 revision; the viewer sees a dot-probe trial (unscored) and predicts four numbers. Then Mowrer's two factors and an avoidance loop that never unlearns (computed); extinction as context-bound learning, renewal (computed) and the principles for making exposure last; the anxiety disorders in one frame and the panic spiral; attention to threat, the unreliable dot-probe score and the failed bias-modification trials; depression's cognitive accounts; the triadic design as a belief about control (computed); anhedonia and Rutledge and colleagues' model of momentary mood (simulated and fitted); the monoamine story and the 2022 umbrella review; Kirsch's analysis and the 522-trial network meta-analysis; life events, and the gene-by-stress finding that did not survive large samples; and bipolar disorder, lithium, and why suicide cannot be predicted well for individuals. The practice chapter maps treatments onto the models; the frontier is subtypes, fast-acting treatments and computational phenotyping.
What is computed and built
explainer/psychology/psyche/clinic.pygains Mowrer's avoidance loop, Bouton's context-bound extinction and extinction spread over several contexts, the triadic design as a belief about control, the trap that behavioural activation breaks, and Rutledge and colleagues' model of momentary mood with its fit. Tested intests/psychology/test_clinic.py.- The Ledger gains eight rows.
- The course's interactive is the dot-probe: twenty trials with neutral and threat words, timed, with the bias shown only as the group-level idea it is (no score is given, as the series' care rules require).
Chapter notes
| # | Chapter | What it does |
|---|---|---|
| 0 | 1967: dogs that stopped trying | The care card; the triadic design; fifty years later; the question; objectives |
| 1 | On you: a dot, and four numbers | A dot-probe trial; four predictions |
| 2 | Fear that never unlearns | Two factors; the loop, computed |
| 3 | Exposure, and the return of fear | Extinction is new learning; making exposure last; many places, computed |
| 4 | The anxiety disorders in one frame | What is feared and what keeps it going; the panic spiral; compulsion as habit |
| 5 | Attention to threat | A bias, a measure and a treatment |
| 6 | Depression and thought | Three cognitive accounts |
| 7 | Helplessness and control | The triadic design, computed |
| 8 | Reward and mood | Anhedonia; momentary mood, modelled; the trap of doing less, computed |
| 9 | The chemical story | Two accidents and a hypothesis; what the evidence on serotonin shows |
| 10 | Do antidepressants work? | Drug, placebo, and the gap; 522 trials |
| 11 | Stress, life events and genes | Social origins; a gene, stress, and a failed interaction |
| 12 | Bipolar disorder, lithium, and suicide | Highs and lows; why suicide is so hard to predict; the base rate in natural frequencies |
| 13 | The Ledger | Eight rows and the tally |
| 14 | In practice: treatments as models | Each therapy acts on a model |
| 15 | Frontier: subtypes, speed and computation | Three frontiers; open questions |
| Recap, problems, and the road ahead | Your numbers; eleven lines; Kant's three objections; payoffs; problems; references; Part 41 |
NotesWhere the numbers come from
| What | Source |
|---|---|
| A Rescorla-Wagner learner with 20 signal-shock pairings, then 60 trials without shock: allowed to avoid (at most 95% of trials, extinction rate 0.08) it avoids 95% of trials and its fear ends at 0.78 (median of 21 runs); with response prevention, fear ends at 0.01 | Psyche (clinic.avoidance), item avoid |
| Fear learned in context A and extinguished in B: about 0 in B, back near 1 in A and in a new context C | Psyche (clinic.renewal), item renewal |
| Extinction spread over 1 to 6 contexts, each sharing a quarter of its features with a new place: fear in the new place falls from 0.74 to 0.18 of its peak | Psyche (clinic.renewal_contexts), item contexts |
| A risk factor with sensitivity and specificity 0.8, for a death with a yearly base rate of 1 in 2,000, in 10,000 people: 5 deaths, 4 flagged, 1,999 others flagged; 0.2% of those flagged | Psyche (clinic.screen), item suicide |
| The triadic design as a Beta belief about control, 200 animals per group: escapable first 98% escaping across 10 test trials, inescapable first 13%, no shock first 69% and rising | Psyche (clinic.helplessness), item helpless |
| The behavioural-activation trap: 90 days choosing between an activity (reward 0.6 on average, learned only by doing it, estimated at -0.5 after a loss) and rest (0.2, known); left alone the median run is active on 0% of the last 30 days, with the activity scheduled for the first 14 days on 97% | Psyche (clinic.activation), item activation |
| A 90-trial gambling task with happiness simulated from Rutledge and colleagues' model (weights 0.5, 0, 0.25, 0.6; forgetting 0.65): the fit recovers the prediction-error weight as 0.55 with forgetting 0.70 (R² 0.70); blunting prediction errors to 40% cuts the SD of happiness from 0.46 to 0.29 | Psyche (clinic.mood_task, fit_mood), item mood |
| Every published number on screen | the studies listed under Sources, quoted as reported |
Schematic panels (the dot-probe test-retest cloud, the drug and placebo bars, the odds-ratio forest, the gene-by-stress lines, the mood course in bipolar disorder) are labelled as schematic on screen; where a value is shown on them, it is the published value.
Notes
| Finding | Original | Status |
|---|---|---|
| Treatments built on exposure reduce anxiety more than control conditions | Wolpe 1958 | replicated |
| Extinguished fear returns with a change of context, with time, or after a reminder | Bouton and Bolles 1979 | replicated |
| Animals given uncontrollable shock later fail to escape, because they learned responding does not matter | Seligman and Maier 1967 | replicated |
| Training attention away from threat reduces anxiety | MacLeod and colleagues 2002 | failed |
| Depression is caused by a shortage of serotonin | Schildkraut and the monoamine hypothesis 1965 | failed |
| Antidepressants relieve depression more than placebo | Kirsch and colleagues 2008 | replicated, smaller |
| Stressful events cause depression more often in carriers of the short 5-HTTLPR allele | Caspi and colleagues 2003 | failed |
| Known risk factors predict which individuals will attempt suicide with useful accuracy | Pokorny 1983 | failed |
Shown without a row, with the reason recorded in explainer/psychology/ledger.py: Mowrer; Craske and colleagues;
Clark; Beck and Abramson, Seligman and Teasdale; Schildkraut; Brown and Harris; Cade.
Notes
The web-search budget for this session was spent on earlier parts, so the facts in this part come from the standard literature and were not re-checked online today; each is listed here to be checked against its source: Seligman and Maier's design and result; Maier and Seligman's 2016 conclusions; Mowrer's two factors; Bouton's account and Bouton and Bolles's renewal; Craske et al.'s principles; Clark's model; MacLeod et al. (2002) and Cristea et al.'s conclusion; the dot-probe's low test-retest reliability (the schematic r ≈ 0.15 is illustrative); Beck, Abramson et al. and Nolen-Hoeksema; Gillan et al.'s two studies (the devaluation result in OCD, and the transdiagnostic compulsivity dimension in online samples); behavioural activation's equivalence to cognitive behavioural therapy (Richards et al., 2016); Rutledge et al.'s model and its smartphone replication; the reserpine and iproniazid history; Moncrieff et al.'s conclusion and the replies; Kirsch et al.'s 1.8 points and severity finding; Cipriani et al.'s 522 trials, 116,477 people, 21 drugs and odds ratios 1.37 to 2.13; Brown and Harris's findings; Caspi et al. (2003), Culverhouse et al.'s 38,802 people and Border et al.'s conclusion; Cade's discovery; Pokorny's study (about 4,800 patients); Franklin et al.'s 365 studies and conclusion; the evidence that asking about suicidal thoughts does not increase them; ketamine's rapid effect; and every page range in Sources.
Companion material in this repository
The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
- Hook: Seligman and Maier (1967), and the 2016 revision.
- Anxiety as learning: fear conditioning (Part 16); Mowrer's two factors: fear is acquired by pairing and maintained by avoidance, which prevents extinction (computed: the loop that never unlearns).
- Exposure: extinction as new learning explains relapse (renewal, reinstatement); inhibitory-learning principles for making exposure last.
- The anxiety disorders in one frame: phobia, panic (catastrophic misinterpretation of bodily signals), social anxiety, generalized worry, OCD (compulsions as avoidance; goals and habits, Part 17), PTSD (memory, Part 21).
- On you: a dot-probe trial. Attentional bias to threat, and why this task's scores are too unreliable to diagnose anyone (Part 3).
- Depression: the symptoms; one disorder or many (Part 39).
- Cognitive theory: Beck's triad; attributional style; rumination. Learned helplessness as a reinforcement learner with a low estimate of control (computed).
- Reward: anhedonia as blunted prediction error or reduced effort; momentary mood as a running average of reward prediction errors (Rutledge et al. 2014), fitted.
- The chemical story: reserpine, iproniazid, the monoamine hypothesis; what the 2022 umbrella review of serotonin did and did not show; that a drug works does not show the deficit.
- Do antidepressants work? Kirsch's meta-analyses; the 2018 network meta-analysis of 522 trials (a real and modest average effect); the debate over who benefits.
- Stress, life events and genes: Brown and Harris; diathesis–stress; the fallen gene-by-environment finding (Part 9).
- Bipolar disorder and lithium (Cade 1949); suicide: what is known about risk, and why prediction of individual attempts is barely better than chance (told under §1.2).
Psyche: clinic: an avoidance loop on Part 16's learner; extinction with renewal; a helplessness learner; the
mood model fitted to open data.
On you: a dot-probe demonstration (unscored).
Ledger: exposure therapy's efficacy (replicated); renewal of extinguished fear (replicated); learned
helplessness (replicated; explanation revised); attentional-bias modification as treatment (failed); the
serotonin-deficit account (failed as stated); antidepressants beating placebo on average (replicated, small);
5-HTTLPR × stress (failed); suicide prediction from risk factors (failed at useful accuracy).
In practice: how exposure, behavioural activation and cognitive therapy map onto these models; prescribing
decisions; screening.
Frontier: depression subtypes; fast-acting treatments and what they imply about mechanism; computational
phenotyping (Part 59).
Reading: Maier & Seligman 2016; Mowrer 1947; Bouton 2002; Craske et al. 2014; Beck 1967; Clark 1986; Rutledge et
al. 2014; Cipriani et al. 2018; Moncrieff et al. 2022; Franklin et al. 2017; Barlow, Durand & Hofmann.
Build the film
python -m videos.psychology.psych40.compute # the part's numbers, into .cache/psych40
python tools/build.py psych40 # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py psych40 Hook # one chapter, silent, with a contact sheet
Scenes: videos/psychology/psych40. Setup: see the course page. Source of these notes: the README and the scenes' narration.
Build it
python -m videos.psychology.psych40.compute # every number (a few seconds)
python tools/qa_scene.py psych40 Avoid # one chapter, silent, at 480p, with a contact sheet
EXPLAINER_TTS=silent python tools/build.py psych40 -q l # the whole part, silent preview
python tools/build.py psych40 # 1080p30 with narration
python tools/qa_scene.py psych40 Mood --lang zh # the Chinese edition of one chapter
python tools/make.py psych40 # both editions, with the checks a long build needs
python -m videos.psychology.labs 40 # the lab: avoidance, renewal, control, mood
python tools/check_ledger.py psych40 # every study shown has its Ledger row, or a reason
python -m pytest tests/psychology # Psyche's clinic module, the Ledger, the Archive
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.