5D Library › The Thermodynamics of Desire · 中文
Chapter 2. Dopamine Prediction Error: The Arithmetic of Desire
The monkey and the juice
In the 1980s and 1990s, Wolfram Schultz and his colleagues in Fribourg recorded single dopamine neurons in the midbrains of monkeys while the animals learned a simple task. A light or a sound came on, and a few seconds later a drop of fruit juice arrived.
What the neurons did surprised almost everyone. At first, before the animal had learned what the light meant, the neurons fired a burst when the juice arrived. Once the animal had learned that the light predicted juice, the burst moved: the neurons now fired when the light came on, and hardly responded to the juice itself. And if the light came on and the juice did not follow, the neurons fell silent, below their resting rate, at the moment the juice should have arrived.
Evidence
Schultz, Peter Dayan and Read Montague showed in 1997 that this pattern is exactly what a learning rule from computer science predicts, if dopamine neurons report a reward prediction error: the difference between the reward received, together with the value of what comes next, and the reward that was expected (Schultz, Dayan, and Montague 1997). Later work confirmed that dopamine responses scale with the size of the error, positive when things are better than predicted and negative when they are worse (Schultz 2016).
The learning rule is called temporal-difference learning. At each moment the brain holds an estimate of how much reward the present situation promises. When the next moment arrives, it computes
the reward that just arrived plus the (discounted) value of the new situation, minus what it had expected. Then it nudges the estimate towards the truth, , with a small learning rate (Sutton and Barto 2018). The older Rescorla–Wagner rule from animal learning, , is the same idea without the time steps (Rescorla and Wagner 1972).
Calculation
The simulation below runs the monkey’s task three hundred times. A cue appears at an unpredictable moment, and a reward of 1 arrives ten steps later. It prints the prediction error at the cue and at the moment the reward is due, and finally runs one trial in which the reward is withheld.
alpha, gamma = 0.1, 1.0
T = 10 # reward arrives 10 steps after the cue
V = [0.0] * (T + 1) # value of "t steps after the cue"; V[T] is the end of the trial
def trial(reward=1.0, learn=True):
"""Return the prediction error at the cue and at the moment the reward is due."""
d_cue = gamma * V[0] - 0.0 # the cue comes at an unpredictable time: before it, value 0
for t in range(T):
r = reward if t == T - 1 else 0.0
d = r + gamma * V[t + 1] - V[t]
if learn:
V[t] += alpha * d
if t == T - 1:
d_reward = d
return d_cue, d_reward
print("trial delta at cue delta at reward")
for n in range(1, 301):
d_cue, d_rew = trial()
if n in (1, 10, 50, 100, 300):
print(f"{n:5d} {d_cue:12.2f} {d_rew:15.2f}")
d_cue, d_rew = trial(reward=0.0, learn=False)
print(f"omit {d_cue:12.2f} {d_rew:15.2f}")
# trial delta at cue delta at reward
# 1 0.00 1.00
# 10 0.00 0.39
# 50 0.02 0.01
# 100 0.54 0.00
# 300 1.00 0.00
# omit 1.00 -1.00Three facts in this table matter for everything that follows.
A predicted reward produces no signal. By trial 300, the juice is just as sweet as it was on trial 1, and the simulated animal receives exactly the same reward. But the prediction error at that moment is zero. Nothing about the juice has changed; what has changed is that it is no longer news.
The signal moves to whatever predicts the reward. The excitement now belongs to the cue. In human terms, it belongs to the sound of a key in the door, the name on the screen, the evening that has been planned.
An expected reward that fails to arrive produces a negative signal. Before learning, no juice was simply no juice. After learning, no juice is a loss.
Wanting is not liking
It is tempting to call dopamine “the pleasure chemical”. The evidence says otherwise.
Evidence
Kent Berridge and Terry Robinson reviewed the experiments in 1998 and concluded that dopamine is not needed for the pleasure of a reward (“liking”) but for the motivation to pursue it (“wanting”), which they called incentive salience. Rats whose dopamine had been almost entirely depleted no longer worked for sweet food, yet still showed the facial reactions that signal enjoyment when sugar was placed in their mouths (Berridge and Robinson 1998).
This distinction is the key to the rest of the chapter. Prediction errors drive learning and wanting. They are not a measure of how good something is. A long marriage can be full of liking, of comfort, warmth and trust, while producing very little of the dopamine signal that marked its first months. The two can come apart.
Love in the scanner
Evidence
When people in the early months of intense romantic love looked at a photograph of their beloved, brain imaging showed activity in the ventral tegmental area and the caudate nucleus, dopamine-rich regions of the reward system (Aron et al. 2005). A later study of people married for about twenty years on average who still reported intense love for their spouse found activity in the same reward regions, together with regions associated with attachment and calm (Acevedo et al. 2012).
The second study is important. It shows that long-term love does not have to be only habit: in some couples, after decades, the reward system still responds to the partner. The question is what those couples do differently, and the prediction-error model suggests where to look.
Why the same pleasure fades
Evidence
People adapt to good and bad fortune more than they expect. In a classic study, lottery winners were not significantly happier than people who had not won, and they took less pleasure in ordinary activities (Brickman, Coates, and Janoff-Bulman 1978). In a German panel that followed thousands of people for fifteen years, life satisfaction on average rose around the time of marriage and then returned towards its earlier level, although individuals differed a great deal (Lucas et al. 2003).
The learning rule explains why. If a good thing arrives day after day in the same form, expectation catches up with it, and the prediction error that accompanied it shrinks towards zero.
Calculation
The simplest version: each day brings a reward with an average of 1, expectation learns with rate per day, and the day’s prediction error is . In the first run every day is the same; in the second, days vary around the same average.
import random
from math import log
alpha = 0.05 # how fast expectation catches up, per day
print(f"half-life of the surprise: {log(2) / -log(1 - alpha):.1f} days")
def run(days, sd, seed=7):
rng = random.Random(seed)
E, out = 0.0, []
for day in range(days):
r = 1.0 + rng.gauss(0, sd) # what the day actually brings (mean 1)
delta = r - E # prediction error
E += alpha * delta
out.append(delta)
return out
for sd in (0.0, 0.5):
d = run(365, sd)
last = d[-90:]
pos = sum(x for x in last if x > 0) / len(last)
print(f"sd = {sd}: day 1 {d[0]:.2f}, day 30 {d[29]:.2f} | last 90 days: "
f"mean delta {sum(last) / len(last):+.2f}, mean positive surprise {pos:.2f}")
# half-life of the surprise: 13.5 days
# sd = 0.0: day 1 1.00, day 30 0.23 | last 90 days: mean delta +0.00, mean positive surprise 0.00
# sd = 0.5: day 1 0.87, day 30 0.81 | last 90 days: mean delta +0.01, mean positive surprise 0.24The numbers are illustrative; nobody knows the real learning rate of a human heart, and it surely differs between people and between pleasures. But the shape is general. When the days are identical, surprise decays to nothing. When the days vary, surprise never disappears. On average it is still zero, because a learner that is right on average cannot be pleasantly surprised on average, but positive surprises keep arriving, about a quarter of a “unit” per day here, balanced by negative ones.
This is the honest arithmetic of desire. Variety does not raise the average; it keeps the signal alive. And it cuts both ways: a life that keeps producing pleasant surprises also produces disappointments.
Evidence
Kennon Sheldon and Sonja Lyubomirsky’s hedonic adaptation prevention model holds that the gains from a positive change last longer when the change keeps producing varied experiences and when people continue to appreciate it rather than taking it for granted; their longitudinal study supported both points (Sheldon and Lyubomirsky 2012). Katherine Jacobs Bao and Lyubomirsky later applied the model to romantic relationships, proposing variety, surprise and appreciation as ways to slow adaptation to a partner (Bao and Lyubomirsky 2013).
What the end of surprise means
Put the pieces together and the “cooling” of the first chapter appears in a new light.
Hypothesis · not established · The transfer of desire
In a long relationship the partner does not stop being rewarding; the reward becomes predicted. Following the learning rule, the dopamine signal moves from the partner’s acts to the cues that predict them, and fades from both when everything is predictable. Three consequences follow, each testable:
- Asymmetry. In a predictable relationship, a habitual kindness that is omitted should cost more than the same kindness gains when it is added unexpectedly, and the asymmetry should grow with the length and regularity of the routine.
- Liking without wanting. Measures of warmth and trust (“liking”) should decline far less over the years than measures of desire and anticipation (“wanting”).
- Variety restores the signal. Couples whose shared life keeps producing varied, unpredictable positive experiences should show slower decline in the wanting measures, but not necessarily a higher average mood.
If omissions and additions are felt symmetrically, or if liking and wanting decline at the same rate, the hypothesis is wrong.
The model also explains a familiar trap. If the signal of desire is the prediction error, there are two ways to get it back. One is to make the shared life richer and less predictable. The other is to look for a new source of reward that has not yet been learned: a new partner, a new screen, a new feed. The second way works, briefly, for exactly the reason the first partner stopped “working”: the new source has not yet been predicted. Then the same arithmetic catches up with it.
Note
These are models, and simple ones. Dopamine does many things besides reporting prediction errors, love involves many brain systems besides dopamine, and nobody’s relationship is a reinforcement-learning task. The point of the arithmetic is not to reduce love to a number but to show that one familiar sadness, the fading of excitement, follows from how any learning system works, and is not proof that something is wrong with the people in it.
Chapter 3 asks the next question. If excitement fades and attention spreads out, what keeps an ordered system, a cell, a flame or a couple, in shape at all?
References
Fan, Y. (2026). The Thermodynamics of Desire: Entropy, Dopamine Prediction Error and Dissipative Structures in Human Bonds [欲望的热力学] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23682498 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).