Part II: Geometry of Feeling

The Geometry of Affect

0:00 / 0:00
An engraved face from a drawing manual, the features set to show one passion
Charles Le Brun, Expressions of the Passions of the Soul, c. 1668, engraved 1727Le Brun gave painters a table of the passions, each fixed by the angle of the eyebrows. An early try at coordinates.

Affects are structural motifs. An affect is what it is by how it relates to every other affect. Joy is defined by its distance from suffering, its nearness to curiosity along some axes, its opposition to boredom along others. Know how a state relates to every other possible state and you know the state. There is nothing left to characterize.

The affect space A\mathcal{A} is the space of possible qualitative states, with its geometry fixed by those similarity relations. The measures below are coordinates on it, not the space itself. They are projections, useful for reading out particular aspects. Valence tells you where a state sits on the viability gradient; integration tells you how unified it is; together they triangulate a position. The list is open. A new coordinate earns its place when the existing ones fail to tell two different feelings apart.

Read the recurring measures as five plus one. Five describe the system's relation to the world it models: valence, arousal, integration, effective rank, counterfactual weight. The sixth, self-model salience, is one member of a larger family of entity-directed salience, the special case where the entity is the self. The same family includes salience toward a known other, toward a particular child, rival, or institution. Self-salience is the diagonal of an entity-indexed field, the same field the ascription axis α(x)\alpha(x) ranges over later in this part.

Why these. Each is the answer to a question that a controller's state already answers whether or not anyone asks. Which way is it heading relative to the edge of what it can survive: valence. How fast is it revising: arousal. How much does it work as one thing: integration. How many independent directions is it using: rank. How much of its work is about what is not the case: counterfactual weight. How much is about itself, or about some particular other: salience. I have no proof that the list is complete, or that no two of them collapse into one. The felt axes the introduction named land on them like this:

Felt axisFormal counterpart
ValenceVal\valence, rate of change of estimated margin
IntensityAr\arousal, with the steepness of the estimated margin ∣∇m^∣|\nabla \hat{m}|
ClarityPrecision of the belief state; governed by gain γ\gamma, below
AgencySelf-effect ratio ρ\rho and causal self-salience σcausal\sigma_{\text{causal}}
Temporal horizonPlanning horizon HH and counterfactual weight CF\mathcal{CF}
FrictionControl cost, defined next
Social permeabilityScope, and ascription α(other)\alpha(\text{other})
Meaning densityCoupling κ\kappa

Friction is the one with no counterpart among the six, so here is one. Let π0\policy_0 be the system's default policy, what it does when nothing is asked of it, habit. Let πt\policy_t be the policy the moment demands. Friction is how far the second is from the first:

frictiont=KL(πt ∥ π0)\text{friction}_t = \KL\left( \policy_t \,\|\, \policy_0 \right)

Flow is low friction: what the moment wants is what the system does anyway. Effort is high friction: every step overrides a default. Skill is the slow movement of π0\policy_0 toward what is usually demanded, which is why the same task grinds in the first year and glides in the tenth.

One warning before the coordinates, because this book draws radar charts and talks about distances. The affect space is not flat, and its distances are not symmetric. Modes twist into one another at high coupling, so the real distance between two affects runs along a curved surface, not a straight line through Rn\mathbb{R}^n. Transitions are not reversible at equal cost: fear slides into anger far more easily than anger relaxes back into fear, and a system tipped from joy into suffering does not retrace the path out. The right object is an asymmetric divergence on a curved manifold, with forward and reverse costs computed separately. Every distance written in this book is a local chart of that object, fine for nearby comparisons and wrong for the global picture. I don't have the global metric. Nobody does yet.

A second warning, about measurement. Comparing two systems by correlating their coordinate-wise similarity matrices depends on the coordinates you chose. A critic can say that valence, arousal, and the rest are what any controller has, so of course they show up everywhere. Fair. Having the coordinates is true by definition and shows nothing. The content is in the relations: which states sit near which, which transitions are cheap and which are blocked. So a comparison between systems should be made on similarity structure in a way that does not care about coordinates, with rotation-invariant dissimilarity matrices and Gromov-Wasserstein distance, and a match that appears in only one basis should be read as a fact about the basis.

The measures that recur. Not all of them matter for every affect.

Valence (Val\valence)
Rate of change of the system's own estimate of its margin. Nearly universal; most affects have valence.
Arousal (Ar\arousal)
Rate of belief or state update. Separates activated from quiescent states.
Integration (Φ\intinfo)
Irreducibility of cause-effect structure. Unified versus fragmented experience.
Effective rank (reff\effrank)
How many degrees of freedom are active. Expansive versus collapsed experience.
Counterfactual weight (CF\mathcal{CF})
Resources spent on non-actual trajectories. Anticipation, regret, planning.
Self-model salience (SM\mathcal{SM}, split into σattention\sigma_{\text{attention}} and σcausal\sigma_{\text{causal}})
How the self figures in processing, as the object of attention and as the driver of action. The two come apart. The diagonal of the entity-directed salience field.

Valence: Gradient Alignment

Let V\viable be the system's viability manifold and m(x)m(\mathbf{x}) its margin from Part I: the log of the expected time to dissolution, positive in the interior and zero on the boundary. Let x^t+1:t+H\hat{\mathbf{x}}_{t+1:t+H} be the trajectory the system predicts under its current policy. No system has access to its true margin. What a controller carries is an estimate m^\hat{m}, learned or evolved from whatever has predicted survival in its history: sweetness, warmth, rank, a parent's approval. Valence is the rate at which the predicted trajectory gains or loses margin as the system itself estimates it:

Valt=1H∑k=1Hγk ∇xm^(x)∣x^t+k⋅dx^t+kdt\valence_t = \frac{1}{H} \sum_{k=1}^{H} \gamma^k \, \nabla_{\mathbf{x}} \hat{m}(\mathbf{x}) \bigg|_{\hat{\mathbf{x}}_{t+k}} \cdot \frac{d\hat{\mathbf{x}}_{t+k}}{dt}

Here γk\gamma^k is a discount on the future, not the gain axis introduced later. Positive valence means the system reads its predicted trajectory as moving into the viable interior. Negative valence means it reads the trajectory as approaching the boundary. Since ∇m^⋅x˙\nabla \hat{m} \cdot \dot{\mathbf{x}} is just dm^/dtd\hat{m}/dt, the quantity is the same in any coordinates.

So there are two rates, and the book needs both. The rate of change of the true margin is how the system is doing. Valence is how the system reads itself as doing. Their difference is miscalibration:

et=dm^dt−dmdte_t = \frac{d\hat{m}}{dt} - \frac{dm}{dt}
A ship rowed through a narrow strait; the captain is tied to the mast while bird-bodied sirens circle
John William Waterhouse, Ulysses and the Sirens, 1891It sounds like things are getting better. He had himself tied to the mast because he knew the estimate would be wrong.

Where ete_t is near zero, feeling good and doing well are one event. Where it is large and positive the system feels itself gaining while it loses: the drug, the feed, the flattering lie. Where it is large and negative it feels itself losing while it gains: the surgery, the hard conversation, the first month of training. These cases are the standard objection to any account that ties feeling to survival, and they are why the definition sits on the estimate. They also block an inference that accounts like this one invite. That something feels good is evidence about m^\hat{m}. It is evidence about your life only as far as m^\hat{m} was fitted to a world like the one you are in, and an estimate fitted to scarcity, small groups, and slow information is being read in a world with none of those.

In reinforcement-learning terms, let the reward be the change in estimated margin, rt=m^(xt+1)−m^(xt)r_t = \hat{m}(\mathbf{x}_{t+1}) - \hat{m}(\mathbf{x}_t). Then valence has two parts, and they are worth keeping apart. The tonic part is the drift the system expects under its own policy. The phasic part is the surprise, the temporal-difference error, how much better or worse this step went than expected:

Valttonic=Eπ[m^(xt+1)−m^(xt)],Valtphasic=rt+γVπ(st+1)−Vπ(st)\valence^{\text{tonic}}_t = \E_{\policy}\left[ \hat{m}(\mathbf{x}_{t+1}) - \hat{m}(\mathbf{x}_t) \right], \qquad \valence^{\text{phasic}}_t = r_t + \gamma V^{\policy}(\state_{t+1}) - V^{\policy}(\state_t)

It is tempting to call valence the expected advantage of the current action. That quantity is zero for every policy, because the advantage averages to nothing over the policy's own choices. What is left to feel is the drift and the surprise. I think mood is the first and the pang is the second: a person can be sinking slowly through a day full of small pleasant surprises, or climbing steadily through a run of disappointments.

The rate of change of valence carries information of its own. Along the predicted trajectory,

Val˙t=dValdt∣x^t:t+H\dot{\valence}_t = \frac{d\valence}{dt}\bigg|_{\hat{\mathbf{x}}_{t:t+H}}

is positive when things are getting better faster and negative when the slide toward the boundary is accelerating. Relief and dread are both about Val˙\dot{\valence}, not Val\valence.

Phenomenal Correspondence

Positive valence: the trajectory descends the free-energy landscape, affordances expand, the system moves toward states it can sustain. Negative valence: the trajectory climbs toward constraint violation and possibilities contract.

The Gradient All the Way Down

Force is the negative gradient of potential energy:

F=−∇V\mathbf{F} = -\nabla V

A ball rolls downhill because the gradient of gravitational potential points downhill, and the steeper the slope the stronger the force. The same form runs through chemistry, where chemical potential μ=∂G/∂n\mu = \partial G / \partial n drives every reaction down a free-energy surface; through biology, where chemotaxis follows a nutrient gradient and homeostasis follows a set-point gradient; and through learning, where a network descends a loss surface. Valence as defined above is a gradient on the viability manifold, a potential surface over information-theoretic coordinates rather than spatial ones. The form is the same. Whether the dynamics are literally the same mathematics is an open question I would not bet on; what I would bet on is that the form is why the vocabulary of pushes and pulls fits feeling so well.

Emotional intensity is the steepness of the landscape, ∣∇m^∣|\nabla \hat{m}| in the terms above. Near the viability boundary the landscape is usually steep, because the margin is on a log scale and a small change of state there makes a large proportional change in expected survival: every state change matters, and emotions are intense. Deep in the interior it flattens: many configurations are about equally viable, and affect is mild. Panic near the boundary overwhelms because the gradient is large; contentment in the interior is gentle because it is small.

Motivational strength is force. The direction of the gradient is the direction of motivation and its magnitude is the urgency. When people say they feel driven, pulled, or pushed, they are describing a gradient. No separate theory of motivation is needed.

The energy partition maps onto affect. Mechanics splits total energy into potential, position on the landscape, and kinetic, rate of movement through it. Valence is the force from the potential surface. Arousal, the rate of state change, is the kinetic term. A system can have a steep gradient and no motion: frozen with fear. Or high kinetic energy on a flat gradient: restless agitation going nowhere. You need both numbers to know where a system is and how fast it is moving.

So qualities can be quantified. The usual objection is that formalizing values destroys them, that dignity is not 0.8 of anything. Correct about scalars, wrong about geometry. Qualities are shapes: gradient directions, landscape curvatures, basin topologies, containment relations between manifolds. Shapes can be measured, compared, and tested against actual trajectories. The alignment between a leader's viability gradient and that of the people they govern, where it holds at no benefit to the leader, is compassion in the only units compassion comes in. The ascription a person runs toward another, α(other)\alpha(\text{other}), is the structural basis of dignity. Part IV uses both.

Valence in Discrete Substrate

In a cellular automaton valence is exactly computable:

  • V\viable = configurations where the pattern persists
  • ∂V\partial\viable = configurations where the pattern dissolves
  • m(x)m(\mathbf{x}) = minimum Hamming distance to a non-viable state, the crudest margin available. A pattern with no model carries no estimate, so here the margin stands in for m^\hat{m} and miscalibration is zero by construction
  • Trajectory = sequence of configurations x1,x2,…\mathbf{x}_1, \mathbf{x}_2, \ldots
Valt=m(xt+1)−m(xt)\valence_t = m(\mathbf{x}_{t+1}) - m(\mathbf{x}_t)

Positive when the pattern moves away from dissolution, negative when it approaches, zero when it holds its margin. A glider cruising through empty space has Val≈0\valence \approx 0. A glider approaching a collision has Val<0\valence < 0. A pattern that just escaped a near-collision has Val>0\valence > 0.

Arousal: Update Rate

Arousal is how fast the system is revising its world model. The natural form is the KL divergence between successive belief states:

Art=KL(bt+1 ∥ bt)=∑xbt+1(x)log⁡bt+1(x)bt(x)\arousal_t = \KL\left( \belief_{t+1} \,\|\, \belief_t \right) = \sum_{\mathbf{x}} \belief_{t+1}(\mathbf{x}) \log \frac{\belief_{t+1}(\mathbf{x})}{\belief_t(\mathbf{x})}

In latent-space models two cheaper versions work:

Art=∥zt+1−zt∥2orI(ot;zt+1∣zt,at)\arousal_t = \| \latent_{t+1} - \latent_t \|^2 \quad \text{or} \quad \MI(\obs_t; \latent_{t+1} \mid \latent_t, \action_t)
Phenomenal Correspondence

High arousal: large belief updates, far from any attractor, the system actively navigating. Low arousal: near a fixed point, low surprise, the system at rest in a basin.

Twelve frames of a galloping horse and rider, each a fraction of a second apart
Eadweard Muybridge, The Horse in Motion, 1878Twelve updates in half a second.

Integration: Irreducibility

Coloured discs of many sizes float and overlap on a black ground around one large blue circle
Wassily Kandinsky, Several Circles, 1926Cover any one disc and the others shift. That the parts cannot be taken separately is what integration measures.

As defined in Part I, integration is the cost of cutting the system in two:

Φ(s)=min⁡partitions PD[p(st+1∣st) ∥ ∏p∈Pp(st+1p∣stp)]\intinfo(\state) = \min_{\text{partitions } P} D\left[ p(\state_{t+1} \mid \state_t) \,\|\, \prod_{p \in P} p(\state^p_{t+1} \mid \state^p_t) \right]

In practice a proxy does the work: the prediction loss you pay for partitioning,

Φproxy=ΔP=Lpred[partitioned]−Lpred[full]\intinfo_{\text{proxy}} = \Delta_P = \mathcal{L}_{\text{pred}}[\text{partitioned}] - \mathcal{L}_{\text{pred}}[\text{full}]

A warning I learned the expensive way. A proxy for integration returns a number for anything, noise included. Before a number from any estimator means something, the estimator has to pass three checks. It has to read near zero on independent noise with the same marginals. It has to give the same answer when the units inside a part are relabeled or rotated. And it has to rise when coupling is added by hand to a system built to have none. An estimator that fails any of these is measuring itself. The appendix states the checks formally.

Phenomenal Correspondence

High integration: the experience is unified; its parts cannot be separated without loss. Low integration: the experience is fragmentary or modular.

Integration in Discrete Substrate

For a small pattern in a cellular automaton Φ\intinfo is directly computable:

  1. Define the pattern as cells {c1,c2,…,cn}\{c_1, c_2, \ldots, c_n\}
  2. For each bipartition P=(A,B)P = (A, B) compute D(p(xt+1∣xt) ∥ pA⋅pB)D(p(\mathbf{x}_{t+1} \mid \mathbf{x}_t) \,\|\, p_A \cdot p_B)
  3. Φ=min⁡PD\intinfo = \min_P D

High Φ\intinfo means you cannot cut the pattern without losing predictive power. A five-cell glider will score modestly. A pattern with tightly coupled components can score high. Whether high Φ\intinfo goes with survival, behavioral complexity, or adaptive response is open.

Effective Rank: Concentration vs. Distribution

The dimensionality of a system's active representation is the effective rank of its state covariance CC:

reff=(tr⁡C)2tr⁡(C2)=(∑iλi)2∑iλi2\effrank = \frac{(\tr C)^2}{\tr(C^2)} = \frac{\left(\sum_i \lambda_i\right)^2}{\sum_i \lambda_i^2}
A large abstract canvas crowded with colliding shapes and colors, no single center
Wassily Kandinsky, Composition VII, 1913Many directions active at once and none in charge.

When reff≈1\effrank \approx 1 all variance sits in one dimension and the system is maximally collapsed. When reff≈n\effrank \approx n variance is spread evenly across every available dimension and the system is maximally expanded.

Phenomenal Correspondence

High rank: many degrees of freedom active; distributed, expansive experience. Low rank: collapsed into a narrow subspace; concentrated, focused, or trapped.

Collapsedreff​  ≈ 1BetweenExpandedreff​  ≈ neigenvalues of C, largest first
Effective Rank in Discrete Substrate

Record a pattern's trajectory x1,x2,…,xT\mathbf{x}_1, \mathbf{x}_2, \ldots, \mathbf{x}_T, each configuration a point in {0,1}n\{0,1\}^n, and compute the covariance of those vectors treated as points in Rn\R^n. A glider's trajectory lies on a manifold of three or four effective dimensions out of nn cells: position, position, phase. A complex evolving pattern explores many more. The prediction for phenomenology: joy is high reff\effrank, many active possibilities; suffering is low reff\effrank, trapped in a narrow manifold.

Counterfactual Weight

The coordinates above describe the system's current state. Counterfactual weight describes its temporal orientation: how much processing goes to possibilities rather than actualities. Let R\mathcal{R} be the set of imagined rollouts and P\mathcal{P} present-state processing. Then

CFt=Computet(R)Computet(R)+Computet(P)\mathcal{CF}_t = \frac{\text{Compute}_t(\mathcal{R})}{\text{Compute}_t(\mathcal{R}) + \text{Compute}_t(\mathcal{P})}

is the fraction of computation spent modeling what is not the case. In a model-based agent with explicit planning this is literal:

CFt=FLOPs in rollout/planningFLOPs in rollout+FLOPs in perception/action\mathcal{CF}_t = \frac{\text{FLOPs in rollout/planning}}{\text{FLOPs in rollout} + \text{FLOPs in perception/action}}
Phenomenal Correspondence

High counterfactual weight: the mind is elsewhere, planning, worrying, fantasizing, anticipating. Low counterfactual weight: present-focused, reactive, in the moment.

This is where two modes of being a mind separate. Low CF\mathcal{CF} is reactive experience: the system runs on present-state associations, and its processing decomposes by channel. High CF\mathcal{CF} is understanding: the system holds several possible futures at once, and the quality of that holding, which possibilities, how compared, what they recommend, cannot be decomposed. Weighing options is not a sum of separate valuations. The comparison itself is the experience. Part III returns to this as the difference between reactivity and understanding.

Counterfactual Weight in Discrete Substrate

For most cellular-automaton patterns CF=0\mathcal{CF} = 0. They follow their dynamics without simulating anything. But Life contains universal computers, patterns that can simulate arbitrary computations including Life itself. Imagine a pattern B\mathcal{B} containing a simulator subregion that runs a model of possible futures and a controller that adjusts behavior on the simulator's output. Then

CF=∣simulator cells∣∣B∣\mathcal{CF} = \frac{|\text{simulator cells}|}{|\mathcal{B}|}

is the fraction of the pattern devoted to counterfactual reasoning. Such patterns are rare and large. They should outlive simple patterns in hostile environments because they can anticipate threats and spot opportunities. That is a prediction: patterns with CF>0\mathcal{CF} > 0 survive longer under threat.

A woman in a blue jacket stands by a table reading a letter, a map on the wall behind her
Johannes Vermeer, Woman in Blue Reading a Letter, c. 1663She is standing in this room. Most of her is somewhere the letter describes.
A worn woman looks past the camera, hand at her mouth, two children hiding their faces against her shoulders
Dorothea Lange, Migrant Mother, 1936Florence Owens Thompson, Nipomo, California. Nothing is happening in the frame. Everything in her face is about what might.

Self-Model Salience

The last member of the entity-directed family measures how the self figures in the system's own processing. "Figures how" hides a fork, and the fork matters, because two different quantities get run under one symbol and they come apart on the clearest example there is.

The first is causal self-salience, σcausal\sigma_{\text{causal}}, the fraction of action entropy explained by the self-model:

σtcausal=I(ztself;at)/H(at)\sigma^{\text{causal}}_t = \MI(\latent^{\text{self}}_t; \action_t) / \entropy(\action_t)

The second is attentional self-salience, σattention\sigma_{\text{attention}}, how prominently the self appears as an object in current processing, how much the system is thematizing itself:

σtattention=dim(zself)dim(ztotal)⋅activity(ztself)\sigma^{\text{attention}}_t = \frac{\text{dim}(\latent^{\text{self}})}{\text{dim}(\latent^{\text{total}})} \cdot \text{activity}(\latent^{\text{self}}_t)
A boy kneels at the edge of dark water, arms braced, staring at his reflection
Caravaggio, Narcissus, c. 1597–1599The self fills the whole field. The rest of the world has gone dark.

Flow is the proof that these dissociate. In flow the skilled self drives everything, so σcausal\sigma_{\text{causal}} is high. But the self is not thematized; it has vanished from attention, so σattention\sigma_{\text{attention}} is low. Shame is high on both: the self drives behavior and is the object of a harsh regard. Depersonalization is low on both: the self neither drives nor is noticed. Where this book writes SM\mathcal{SM} without a subscript, read it as σattention\sigma_{\text{attention}} unless the formula makes the causal reading explicit. Whether the two run together or apart is set by the coupling axis κ\kappa introduced below: high κ\kappa binds attention and causation, low κ\kappa lets them separate, which is what flow exhibits.

Phenomenal Correspondence

High attentional self-salience: self-focused, self-conscious, the self the primary object of attention. Low attentional self-salience: self-forgotten, absorbed in environment or task, fully compatible with the self-model still driving the behavior.

"I" is not a secret interior, though shame and secrecy can shape it. "I" is the stable locus of integrated cause-effect structure the world model relies on most for prediction, the component other components reference when computing expected futures. A predictive structure, not a hidden essence: the system's most reliable attractor for anticipating its own behavior. This is why depression feels like losing yourself. The world model can no longer predict what "I" will do or want, self-reference breaks down, and coherence goes with it. It is also why an identity crisis is a dynamical event and not a mood: the attractor that was "I" has destabilized, and the system has to pay the expensive bill of finding a new one.

Self-Model Salience and Scope in Discrete Substrate
A nude woman lies with her back to us and looks into a mirror held by Cupid; her blurred face looks out of the mirror
Diego Velázquez, The Toilet of Venus (The Rokeby Venus), 1647–51She is looking at herself, and the mirror is angled so that she is also looking at you looking.

In a cellular automaton a pattern's "behavior" is its evolution. Let zself\latent^{\text{self}} be the cells that track the pattern's own state. Then

SM=I(ztself;st+1)H(st+1)\mathcal{SM} = \frac{\MI(\latent^{\text{self}}_t; \state_{t+1})}{\entropy(\state_{t+1})}

High SM\mathcal{SM}: the pattern's evolution is dominated by self-monitoring. Low: external factors dominate and the self-model exists but does little. This mutual-information readout tracks σcausal\sigma_{\text{causal}}; a separate readout of self-tracking-cell activity tracks σattention\sigma_{\text{attention}}, and the two need not move together. A pattern "in flow" has its self-tracking cells decoupled from monitoring while its self-model still steers.

Beyond salience there is scope: what the self-model includes. Let S(θ)S(\theta) be the self-model parameterized by its boundary scope θ\theta, and V(S)\viable(S) the viability manifold it induces. Two gliders whose trajectories have become coupled can each carry a narrow self-model, V={configs where THIS pattern persists}\viable = \{\text{configs where THIS pattern persists}\}, or an expanded one, V={configs where BOTH persist}\viable = \{\text{configs where BOTH persist}\}. The observable difference: a narrow-scope glider sacrifices the other to save itself; an expanded-scope glider may sacrifice itself to save the pair.

The same parameter runs in us. With θnarrow\theta_{\text{narrow}} the self includes only this biological trajectory, ∂V\partial\viable sits at biological death, and the gradient near it is persistently negative. With θexpanded\theta_{\text{expanded}} the self includes patterns that persist beyond the body, the boundary recedes, and the gradient can stay positive as death approaches. If the viability manifold is defined by what the system preserves, and what it preserves is set by its self-model, then scope reshapes V(S(θ))\viable(S(\theta)) directly. Expanding identification changes the existential gradient. It does so by changing what the estimate m^\hat{m} is an estimate of. The body's margin goes to zero on the same schedule either way, and the one who feels the gradient ends with the body. What widens is the thing being regulated for, and the relief is accurate about that thing: a family, a work, a cause really can outlast you. It turns into miscalibration only when it is taken as news about the experiencer. High salience with narrow scope is existential anxiety: trapped in awareness of a bounded self approaching its boundary. High salience with expanded scope is closer to what contemplatives call witnessing. Part V follows this parameter as far as it goes.