Chapter 4: Similarity and Complementarity
“It is widely believed that ingredients sharing flavor compounds are more likely to taste well together than ingredients that do not.” — Yong-Yeol Ahn, Sebastian E. Ahnert, James P. Bagrow & Albert-László Barabási, Flavor network and the principles of food pairing, Scientific Reports (2011)
RUNNING EXAMPLE — BLUMENTHAL’S CAVIAR
Bray, Berkshire, around the turn of the millennium. Heston Blumenthal is standing in the kitchen of The Fat Duck with a tin of Oscietra caviar in one hand and a bar of white chocolate in the other, and by every law of received culinary wisdom this is an absurd thing to be holding. Caviar is the apex of savory: cold, briny, marine, faintly metallic. White chocolate is the apex of sweet: warm, fatty, vanillic, cloying. They occupy what any chef would call opposite corners of taste. To put them on the same spoon is the kind of thing a child does to provoke disgust.
But Blumenthal has been reading flavor-compound analyses, and he has noticed something the tongue cannot tell you and the nose can barely articulate: caviar and white chocolate are both rich in trimethylamine and related amines, the same class of volatile nitrogen compounds that give them each a particular high, animalic top note. On paper — in the chemistry — they are not opposite at all. They are neighbors. They point, in the high-dimensional space of their volatile constituents, in nearly the same direction.
He tries it. It works. Not as a novelty, not as a provocation, but as a genuine pairing — the sweetness rounds the brine, the brine cuts the fat, and the shared amine note bridges the two so that the mouth reads them as a single coherent thing rather than two warring foods. The dish never goes on the menu in this exact form, but the discovery becomes the founding anecdote of a whole movement: food pairing by shared compounds. And the claim underneath the anecdote is, although Blumenthal does not put it this way, a geometric one. Two foods that share volatiles are close in compound space. Closeness predicts compatibility. Cosine similarity, made edible.
Two Ways for Things to Go Together
There are exactly two reasons two things belong together, and they are opposites. Either they are alike — they reinforce, they echo, they say the same thing more loudly — or they are different in a way that completes, each supplying what the other lacks. A choir is the first kind of harmony; a chord is the second. Gastronomy has always known both: the strawberry with the strawberry tart is the harmony of likeness; the strawberry with black pepper is the harmony of difference. Every cook works with both daily, usually without naming them, and the central confusion in the popular science of food pairing is the failure to keep them apart.
This chapter argues that the two principles are not vague intuitions but precise geometric relations between flavor vectors, and that the difference between them is the difference between two operations any student of linear algebra already knows. Similarity is small angle: two flavor vectors $\mathbf{f}_1$ and $\mathbf{f}_2$ that point nearly the same direction, so that their cosine similarity $\cos\theta = \langle \mathbf{f}_1, \mathbf{f}_2\rangle / (\|\mathbf{f}_1\|\,\|\mathbf{f}_2\|)$ is near one. Complementarity is orthogonality: two vectors at right angles, $\langle \mathbf{f}_1, \mathbf{f}_2\rangle \approx 0$, each occupying dimensions of $\mathcal{F}$ the other leaves empty. The food-pairing hypothesis that made Blumenthal famous is a claim about the first. The cuisines of East Asia, it turns out, are organized around the second. Neither is right; they are two different theorems about the same space, and a complete theory needs both.
We move from the chemistry that launched the hypothesis (§4.1), through the network that made it quantitative (§4.2), to the cultural asymmetry that complicated it (§4.3), and then build the geometric machinery — orthogonality (§4.4), the pairing sum (§4.5), and curvature (§4.6) — that resolves the complication. We close (§4.7) by re-running Ahn’s analysis with the perceptual embeddings of Chapter 2, where the asymmetry sharpens rather than softens. Throughout, the load-bearing idea is the one Blumenthal stumbled into with a tin of caviar: compatibility is geometry, and the geometry was always measurable.
4.1 The Flavor Pairing Hypothesis
The hypothesis is simple enough to state in a sentence, which is part of why it spread so fast: ingredients that share flavor compounds tend to taste good together. It was articulated as a working principle around the turn of the millennium by Heston Blumenthal at The Fat Duck and François Benzi of the flavor house Firmenich, and it has the enormous virtue of being chemically checkable. You do not need a sensory panel to ask whether strawberry and tomato share volatiles; you need gas chromatography and a database.
[Empirical.] The chemical facts are real and often startling. Strawberry and tomato share a substantial set of esters and aldehydes. Chocolate and blue cheese share a remarkable inventory of methyl ketones and short-chain fatty acids — the compounds that read as “creamy-funky” in both. Coffee and beef, jasmine and pork liver, banana and clove: each pair, dismissed by intuition, turns out to overlap heavily in its volatile fingerprint. And caviar and white chocolate share the amines that started this chapter. These are not coincidences cherry-picked for shock value; they are dense regions of overlap in a sparse chemical space, and overlap is exactly what the hypothesis says should predict success.
The geometric translation is immediate and is the point of this section. Represent each ingredient not yet by its perceptual flavor vector $\mathbf{f}$ but by a more primitive object: its compound vector $\mathbf{c} \in \{0,1\}^{N}$, where $N$ is the size of the compound database (FlavorDB lists on the order of $\sim\!2{,}000$ shared volatiles across common ingredients) and $c_k = 1$ if the ingredient contains compound $k$. Strawberry is a sparse binary vector with ones in a few hundred positions; caviar another; white chocolate another. The food-pairing hypothesis is then precisely the claim that the pleasantness of a pairing increases with the cosine similarity of the two compound vectors,
$$ \text{pair-quality}(\,i, j\,) \ \propto\ \cos\theta_{ij} \ =\ \frac{\langle \mathbf{c}_i,\ \mathbf{c}_j\rangle}{\|\mathbf{c}_i\|\,\|\mathbf{c}_j\|} \ =\ \frac{|\text{shared compounds}|}{\sqrt{|i|}\,\sqrt{|j|}}. $$
The numerator counts shared compounds; the denominator normalizes for promiscuity, so that an ingredient with hundreds of compounds (which would share something with everything) is not unfairly advantaged. This is the cosine, the same quantity a search engine computes between two documents. The food-pairing hypothesis is information retrieval applied to the kitchen. That is its strength — computable, falsifiable, scalable to thousands of ingredients — and also the source of its incompleteness, because a single scalar angle cannot capture the difference between echoing and completing.
4.2 The Ahn et al. Flavor Network
The hypothesis became science in 2011, when Yong-Yeol Ahn, Sebastian Ahnert, James Bagrow, and Albert-László Barabási published “Flavor network and the principles of food pairing” in Scientific Reports. They did the obvious and necessary thing: they built the graph.
[Empirical.] Take $\sim\!380$ ingredients as nodes. Draw an edge between two ingredients weighted by the number of flavor compounds they share, drawn from a database of $\sim\!1{,}021$ compounds. The result is the flavor network: a weighted graph in which heavily shared pairs (the egg–wheat–butter–milk cluster of baking; the garlic–onion alliums) sit densely connected, while isolated ingredients hang at the periphery. Then — the decisive step — overlay $\sim\!56{,}000$ recipes scraped from recipe repositories across several regional cuisines, and ask: do real recipes preferentially combine ingredients that the network says are similar, or dissimilar?
In the geometric reading of Chapter 1, the flavor network is the compound space of §4.1 made into a metric graph. Each node is a compound vector $\mathbf{c}_i$; each edge weight is (essentially) the unnormalized inner product $\langle \mathbf{c}_i, \mathbf{c}_j\rangle$; and the graph is a discrete sampling of the geometry of $\mathcal{F}$ restricted to the ingredient manifold. A recipe is then a small set of nodes — a clique we will treat in §4.5 as a sum of vectors — and the question Ahn et al. asked is whether real cuisines prefer tight cliques (high mutual similarity) or loose ones. They quantified this with a single statistic, the mean shared-compound count of ingredient pairs co-occurring in recipes, compared against a null model of randomly assembled recipes controlling for ingredient frequency.
The answer was not one answer. It was two, split along a fault line that runs through the world’s kitchens, and that split is the subject of the next section. But the methodological achievement should be marked first: Ahn and colleagues converted a chef’s anecdote into a measurement over tens of thousands of recipes — they turned Blumenthal’s spoon of caviar into a hypothesis test. Whatever one concludes about the food-pairing hypothesis — and we will conclude that it is half a theory — the flavor network is the object that made the geometry of pairing empirical, and every analysis in this chapter descends from it.
4.3 The Western/Eastern Asymmetry
Here is the fault line. When Ahn et al. compared real recipes to the null model, North American and Western European cuisines used ingredient pairs that shared more compounds than chance — a positive food-pairing effect, exactly as Blumenthal’s hypothesis predicts. But East Asian cuisines, and Southern European to a lesser degree, used pairs that shared fewer compounds than chance: a negative effect. The hypothesis was not merely unconfirmed in East Asia; it was reversed.
[Empirical.] The numbers were robust and the mechanism diagnosable. Western recipes are pulled toward shared-compound pairings largely by a handful of high-frequency “hub” ingredients — milk, butter, egg, vanilla, wheat — that share compounds with almost everything and appear in vast numbers of dishes; remove these hubs and the Western effect weakens dramatically. East Asian recipes, by contrast, are pulled the other way by their own signature ingredients — soy sauce, scallion, sesame oil, ginger, garlic — which co-occur constantly yet share few compounds, deliberately combining dissimilar profiles. The same statistical machine, run on two recipe corpora, returns opposite signs. This is one of the most reproduced and most argued-over results in computational gastronomy, and its mere existence is fatal to any version of the food-pairing hypothesis that claims to be a universal law.
Geometrically, the asymmetry is a statement about where in $\mathcal{F}$ each tradition places its pairings, and it is cleanest to picture in the matrix of pairwise cosines. Arrange all ingredients along both axes and shade each cell by $\cos\theta_{ij}$. Western cuisine concentrates its recipes near the diagonal — pairing like with like, high-cosine combinations, the choir. East Asian cuisine concentrates off the diagonal — low-cosine, near-orthogonal combinations, the chord. Two cultures, having explored the same flavor space for millennia, settled into opposite regions of it: one optimizing similarity, the other optimizing complementarity. The food-pairing hypothesis is not false. It is a description of one region of $\mathcal{F}$ — the Western region — mistaken for a description of the whole. The next three sections build the geometry that contains both.
BLUMENTHAL’S CAVIAR, REVISITED — A WESTERN MOVE ON THE DIAGONAL
Notice now what kind of pairing the caviar discovery actually is. Blumenthal did not reach for two ingredients that fill complementary gaps; he reached for two that secretly share a compound — the amines — and the whole rhetorical force of the discovery is the surprise that two foods which seem opposite are in fact alike underneath. This is a diagonal move, the purest possible instance of the food-pairing hypothesis: maximize $\cos\theta$. It is, in the deepest sense, a Western pairing, and it is no accident that it was discovered in a Berkshire kitchen steeped in French technique rather than in a kitchen in Osaka. An East Asian flavor logic would never have prized the shared amine; it would have prized the briny–sweet contrast itself, the orthogonality, and reached for the gap. The same spoonful can be read two ways — as echo or as contrast — and which reading a cuisine prefers is which region of $\mathcal{F}$ it has chosen to live in.
4.4 Complementarity as Orthogonality
If similarity is small angle, complementarity is its geometric opposite: the right angle. Two ingredients are complementary when their flavor vectors are orthogonal, $\langle \mathbf{f}_1, \mathbf{f}_2\rangle \approx 0$, meaning each carries flavor energy in dimensions of $\mathcal{F}$ where the other carries none. They do not overlap; they tile.
[Modeling Axiom.] A pairing is complementary to the degree its ingredients’ flavor vectors are mutually orthogonal in the perceptual space $\mathcal{F}$, and the perceptual fullness of the combination is measured by how much of the relevant subspace the pair jointly spans. Where similarity asks “do they point the same way?”, complementarity asks “do they together cover more directions than either alone?” Formally, the dimension of $\text{span}\{\mathbf{f}_1, \mathbf{f}_2\}$ is two when the vectors are independent and collapses toward one as they align. Complementary ingredients maximize the spanned volume; similar ingredients minimize it.
This is why the East Asian logic is not a failure of the food-pairing hypothesis but a different optimization entirely. Soy sauce is a tower of umami and salt with dark roasted aromatics; ginger is a bright, pungent, terpene-and-gingerol axis; sesame oil is nutty, fatty, low and round. Pairwise their cosines are small — they share almost nothing — but precisely because they share almost nothing, their sum fills the taste simplex of Chapter 1 and a wide swath of the olfactory manifold without redundancy. The dish is complete not because its parts echo but because they tile the space. The classic Western flavor base of soffritto or mirepoix works the same orthogonal way underneath its hubs: the sweet-allium of onion, the earthy-terpene of carrot, the green-anisic of celery occupy three near-perpendicular directions.
The crucial point — and it is the resolution of §4.3 — is that both similarity and complementarity are good, and they are good for different reasons. Similarity yields coherence: a pairing that reads as one thing, deepened (caviar and white chocolate fusing on the shared amine). Complementarity yields completeness: a pairing that reads as a balanced whole, no dimension left empty (soy, ginger, sesame). A cuisine is a policy for trading these off. And neither can be captured by the single scalar $\cos\theta$, because cosine collapses two distinct geometric facts — alignment and span — into one number, the very dimensional collapse this series exists to refuse. We need the full vector, and we need to add it up. That is the next section.
4.5 Pairing as a Sum
What is a dish, geometrically? To first approximation it is the sum of its ingredient vectors. Place $n$ ingredients with flavor vectors $\mathbf{f}_1, \dots, \mathbf{f}_n$ in proportions $a_1, \dots, a_n$, and the dish vector is
$$ \mathbf{f}_{\text{dish}} \ =\ \sum_{i=1}^{n} a_i\,\mathbf{f}_i \ \in\ \mathcal{F}. $$
This is the operation that underlies all pairing: combining ingredients is vector addition (with coefficients), the same operation the line cook performed in Chapter 1 when she wrote a fix as $\mathbf{f}_0 + \alpha\,\mathbf{v}_{\text{lime}} + \beta\,\mathbf{v}_{\text{miso}}$. Chapter 8 will develop the full recipe-as-program reading, with order and transformation; here we want only the static sum and the geometry of when that sum is balanced.
[Modeling Axiom.] A dish is balanced when its flavor vector $\mathbf{f}_{\text{dish}}$ lands inside a target region of $\mathcal{F}$ — the balance manifold of Chapter 6 — and the route to that region depends entirely on whether the summands are similar or complementary. The two pairing principles correspond to two distinct geometries of the sum:
- Similar summands (small angle) add nearly colinearly. Their sum has large norm in a single direction: $\|\mathbf{f}_1 + \mathbf{f}_2\| \approx \|\mathbf{f}_1\| + \|\mathbf{f}_2\|$ when $\theta \approx 0$. The result is intensity along an axis — more of the same thing. Caviar plus white chocolate, sharing the amine direction, sums to a reinforced amine note: the pairing reads as deeper, not wider.
- Complementary summands (right angle) add by the Pythagorean rule: $\|\mathbf{f}_1 + \mathbf{f}_2\| = \sqrt{\|\mathbf{f}_1\|^2 + \|\mathbf{f}_2\|^2}$, and crucially the sum points in a new direction that neither summand alone occupied. The result is coverage — the dish reaches a region of $\mathcal{F}$ inaccessible to either ingredient. Soy plus ginger plus sesame sums to a point central in the simplex that none of them is near alone.
This is the precise sense in which the Western and Eastern strategies are geometrically dual. Western diagonal pairing builds dishes by lengthening the resultant along a coherent direction; Eastern off-diagonal pairing builds dishes by steering the resultant into the interior of the balance region through orthogonal contributions. Balance, in the first strategy, is achieved by choosing a direction worth amplifying; in the second, by choosing contributions whose vector sum lands on target. Both are addition. They differ only in the angles between the things being added — which is to say, they differ only in geometry. The scalar cosine sees the angle but not the resultant; the vector sum sees both, and that is why we need it.
4.6 Synergy and Antagonism
So far the sum has been linear: $\mathbf{f}_{\text{dish}} = \sum a_i \mathbf{f}_i$, addition in a flat space. But the kitchen knows that combinations are not linear. A little salt makes glutamate’s umami leap — far more than the salt’s own contribution; this is the salt–umami synergy we met in Chapter 1 as a bulge in the metric. And bitterness with sweetness partly cancels — tonic water carries sugar precisely because the sweet suppresses the quinine bitter, so the sum is less than its parts. The first is synergy (superlinearity), the second antagonism (sublinearity), and both mean the same thing geometrically: the flavor space is curved.
[Empirical.] The interactions are well documented and receptor-grounded. Sodium ions potentiate the T1R1/T1R3 umami receptor’s response to glutamate, so $f_{\text{umami}}$ of the mixture exceeds the sum of the separate umami contributions — superlinear. Sucrose suppresses T2R bitter-receptor signaling centrally and peripherally, so $f_{\text{bitter}}$ of a sweet–bitter mixture falls below the sum — sublinear. Sourness enhances perceived saltiness at low concentration; fat blunts capsaicin heat. None of these are addition; all of them are the off-diagonal structure of the flavor metric that Chapter 3 makes formal.
To capture this we promote the linear sum to a second-order model. Write the perceived flavor of a pairing not as $\mathbf{f}_1 + \mathbf{f}_2$ but as
$$ \mathbf{f}_{\text{dish}} \ =\ \mathbf{f}_1 + \mathbf{f}_2 \ +\ \mathbf{B}(\mathbf{f}_1, \mathbf{f}_2), $$
where $\mathbf{B}$ is a symmetric bilinear interaction term. [Modeling Axiom.] When $\mathbf{B}$ adds magnitude along a perceptual axis the pairing is synergistic (umami + salt: $\mathbf{B}$ pushes $+f_{\text{umami}}$); when it subtracts, antagonistic (bitter + sweet: $\mathbf{B}$ pulls $-f_{\text{bitter}}$). The bilinear term is exactly the curvature of $\mathcal{F}$: in a flat (Euclidean) flavor space $\mathbf{B} = 0$ and all pairings are mere sums, but the real space is Riemannian, and $\mathbf{B}$ is its second fundamental form sampled at the pairing’s location. Geodesics in a curved space do not add like arrows in a plane, and neither do flavors.
This has a sharp consequence. Synergy and antagonism are not symmetric between similar and complementary pairings: the strongest synergies (salt–umami) live among complementary, near-orthogonal taste dimensions — different receptors potentiating one another — which is one more reason the Eastern orthogonal strategy is so powerful. It does not merely tile the space additively; it lands in regions where curvature amplifies the sum. The strongest antagonisms (sweet–bitter cancellation) can suppress a defect or, mishandled, flatten a dish into muddy nothing. The cook who balances a dish navigates not a flat sum but a curved surface where some directions of combination are rewarded superlinearly and others punished. Chapter 6 makes this the basis of seasoning as an operator algebra; here it is enough to see that curvature is the third geometric fact of pairing, after angle (§4.1–4.4) and resultant (§4.5), and that a scalar similarity score is blind to all of it.
4.7 Experimental Validation
The original flavor network was built on a binary, presence/absence compound vector $\mathbf{c} \in \{0,1\}^N$ — does the ingredient contain trimethylamine, yes or no? This is a crude encoding, and its crudeness was the standing objection to Ahn et al.: presence is not perception. A compound present at threshold contributes nothing to flavor; a compound present in milligrams may dominate. The binary cosine ignores concentration, ignores odor-detection thresholds, and ignores that the perceptual axes of $\mathcal{F}$ are not the raw compound axes but the receptor-weighted combinations of Chapter 2. What happens when we re-run the analysis with a perceptual embedding instead of a binary one?
[Empirical.] The reanalysis marries this chapter with Chapter 2’s receptor basis and Chapter 10’s flavor embeddings. Replace the binary compound vector with a perceptual vector $\mathbf{f}_i = \mathbf{R}\,(\mathbf{w} \odot \mathbf{c}_i)$, where $\mathbf{c}_i$ is weighted by concentration and odor threshold ($\mathbf{w}$) and projected through the receptor-affinity matrix $\mathbf{R}$ of §2.3 into the $\sim\!10$–$30$ perceptual dimensions. Recompute every pairwise cosine $\cos\theta_{ij}$ in this space and rerun Ahn’s contrast against the recipe corpora. Two findings emerge consistently.
First, the Western/Eastern asymmetry sharpens rather than washes out. The hub effect — milk, butter, egg dominating the Western signal — partly survives the reweighting because those hubs really do share perceptually salient compounds (the lactones and diacetyl of dairy), not merely trace ones. And the East Asian negative effect strengthens: soy, ginger, and sesame are even more perceptually orthogonal than their binary vectors suggested, because the compounds they nominally share are below threshold and drop out of the projection. The diagonal/off-diagonal split is not a database artifact. It is a real feature of the perceptual geometry, and a better encoder makes it cleaner.
Second, the scalar cosine continues to under-predict pairing quality in both cuisines, and predictably so — by §4.4–4.6, it must. Cosine sees alignment but not span and not curvature. When the perceptual cosine is supplemented with a complementarity term (the spanned volume of §4.4) and a synergy term (the bilinear $\mathbf{B}$ of §4.6), the combined model tracks recipe co-occurrence and sensory-panel ratings substantially better than cosine alone. [Conjecture.] We state the conclusion as a conjecture, the cross-corpus validation being still partial: pairing quality is a function of three geometric quantities — alignment, span, and curvature — and any single-number summary (cosine similarity, shared-compound count) is a contraction that discards two of the three. This is the Scalar Irrecoverability that the sibling Volume 4: Geometric Economics proves for GDP — that a single index is a contraction of a richer tensor and cannot be inverted back to it — transplanted to the kitchen: one number cannot carry what three dimensions hold.
From Pairs to Manifolds
We began with a tin of caviar and a bar of white chocolate, two foods that the tongue calls opposite and the chemistry calls neighbors, and we end with a three-part geometry of why anything goes with anything: alignment (the small angle of similarity, the choir, the Western diagonal), span (the orthogonality of complementarity, the chord, the Eastern off-diagonal), and curvature (the synergy and antagonism that make the combination more or less than its sum). The food-pairing hypothesis captured the first and mistook it for the whole; the Ahn network measured it; the Western/Eastern asymmetry exposed the limit; and the vector sum, orthogonality, and bilinear interaction term recovered what the scalar cosine had thrown away.
But we have treated “goes together” as if it were a property of the pair alone. It is not. Whether a pairing is pleasant depends on a human palate with evolved and learned preferences — caviar-and-chocolate works for a Fat Duck diner steeped in a certain culinary education and might revolt someone else. The set of combinations humans find good is itself a region of $\mathcal{F}$, with its own shape, its own boundary, its own novelty frontier where the surprising-but-wonderful pairings live. That region is the hedonic manifold, and mapping it — asking not “are these two close?” but “is their sum somewhere a person would want to be?” — is the work of Chapter 5. The geometry of pairing tells us how vectors combine; the geometry of harmony will tell us which combinations a mind, shaped by biology and culture, reaches for. The angles were always real. The single similarity score was always insufficient.