What the brain does

The cancellation is exact and cheap to lose

CIECAM16 has no crispening, and adding one was expected to be expensive: the background's exactness in a corresponding colour comes from its being a common exponent, and a function of the sample's own level is not one. It is expensive in kind and not in size. A term that raises a straddling pair's lightness difference by half moves a corresponding colour by five thousandths of a tristimulus unit — a thousandth of what stating the background differently at the two ends already costs.

Assumes A dark background moves every difference and no match, A viewing condition is an argument and The appearance model has no slot for it.

A dark background moves every difference and no match reduced CIECAM16’s background to one exponent and then asked what the exponent was worth. It was worth a great deal: lightness and hue order survive any change of background without a single inversion, and a corresponding colour computed with the same background stated at both ends is invariant to that background to the last bit of a double. It also established what the background cannot do. Crispening — discrimination sharpest where the sample’s own level meets the background’s — cannot arise from four constants computed before the sample is looked at, and does not.

That left a design question rather than a result. Crispening is a relation between the sample and the background; the exactness above comes from the background being a quantity common to every sample; and the two look incompatible by construction. What has not been asked is the size of the incompatibility.

A crispening term puts the peak where the background is. How much lightness the model returns for a small change in the sample's level, against the sample's level measured as a log ratio to the background's — so that all three backgrounds share one axis and a peak at the background is a peak at zero. The pale curves are CIECAM16 as it stands, which has no peak anywhere: they rise slowly and monotonically because a background that enters as four constants fixed before the sample arrives cannot know where the sample sits relative to it. The solid curves are the same model with a term of amplitude 6 and width 0.5 added to lightness. Each peaks at zero to within 0.000 of a log unit, and the peak's height is 12.00 lightness units per log unit of level — the amplitude divided by the width, exactly.
Fig. 1 How much lightness the model returns for a small change in the sample’s level, against the sample’s level as a log ratio to the background’s. The pale curves are the model as it stands and have no peak anywhere. The solid ones carry a term of amplitude 6 and width 0.5, and each peaks at its own background.

Expensive in kind, negligible in size

A crispening term breaks every invariance the plain background has, and the breaks are between two and four orders of magnitude smaller than errors the same model already tolerates without comment.

  • A term worth half a lightness difference on a pair straddling the background moves a corresponding colour by a median of 0.005 tristimulus units and at worst 0.149. Stating the background differently at the two ends of the same computation moves it by a median of 5.1.
  • The reason is that a corresponding colour nearly preserves the sample’s luminance factor, which is the only quantity the term reads — so a term that has no algebraic reason to cancel very nearly cancels anyway.
  • Where the two ends differ in adapting luminance, it stops nearly cancelling: a booth against a dim room costs a median of 0.033 and at worst 0.285.
  • Lightness order, which the plain model preserves exactly at every background, is lost 24 times in 84,168 pairs — never more than five hundredths of one per cent at any pair of backgrounds.
  • The one thing genuinely lost is the closed form. The term is a function of the luminance factor the inverse is solving for, so recovering a stimulus takes a bisection: 40 steps to a tolerance of a ten-billionth in lightness.

The term has two numbers in it and no more

Crispening is stated in the literature as an effect on discrimination, and the variable it is an effect in is the ratio of the sample’s level to the background’s rather than their difference. Writing that ratio as a logarithm, u = ln(Y / Yb), and adding a bump in it to the plain model’s lightness — J_c = J + α · tanh(u / σ) — gives a term with exactly two parameters. The amplitude α is half the lightness the term adds across its whole range; the width σ is how far in log level it takes to get there. Everything else follows. The slope of lightness against log level — which is what a discrimination experiment measures — gains (α/σ)·sech²(u/σ), whose maximum is α/σ and sits at u = 0, which is the background.

The figure above is that identity computed rather than read off. At backgrounds of 5, 20 and 60 the added slope peaks within a ten-thousandth of a log unit of zero, and its height is 11.994 against the 12.000 the ratio predicts. The parameters are a height and a spread rather than two quantities that have to be fitted against each other, which matters for what follows: every result below can be reported as a function of the height, and the width can be swept separately.

The term is added to lightness and to nothing else. Chroma keeps the plain J inside it, so that what is measured below is the price of the lightness effect alone rather than of a second modelling decision made alongside it.

What the plain curves show is worth pausing on, because it is not what the same measurement looked like in the linear variable. Read against luminance factor, CIECAM16’s sensitivity falls steeply from the darkest sample at every background, and an added peak would be a bump on a cliff. Read against log level it is nearly flat — 11.5 lightness units per log unit at a background of 5, 23.0 at 20, 46.3 at 60 — because a power law in level is a straight line in log level, which is what a lightness scale mostly is. The log variable is where a crispening peak is legible, and it is also the variable the effect is defined in.

What the term is worth

A price needs something bought, and the quantity bought has to be one an experiment could return.

What the term is worth to the experiment that would measure it. A pair of greys separated by a fixed 0.4 of a log unit in level — about a fifth lighter and a fifth darker than its own centre — walked past a background of 20. The pale line is the lightness difference CIECAM16 returns for that pair as it stands, which changes only slowly across the whole range. The solid line is the same pair with the term in. Where the pair straddles the background the difference rises from 9.15 to 13.71 lightness units, 1.50 times what it was; three log units away it is 1.0001 times, which is nothing. That difference between the two ends is crispening stated as the quantity a discrimination experiment returns rather than as a description of one.
Fig. 2 A pair of greys separated by a fixed 0.4 of a log unit in level, walked past a background of 20. The pale line is the lightness difference the model returns as it stands; the solid line is the same pair with the term in.

A pair straddling the background reads 13.71 lightness units apart with the term in against 9.15 without, a factor of 1.50. The same pair three log units below the background reads 1.00007 times what it always did, which is nothing. That gap between the two ends is crispening as a number: a pair that is hard to place against a mid grey becomes easy when the surround is the grey between them, and becomes ordinary again once the surround is far from both.

Half a lightness difference again is a substantial effect. It is roughly the size the phenomenon is described as having, and it is far larger than several effects the model does carry — the hue shift with brightness that the model has a hue shift it was never given found the model reproducing without being asked to is worth a few degrees. So the term is not a token; it is a real change to what the model says a person sees.

The rest of this is what that change costs, in each of the four currencies the plain background pays nothing in.

The invariance, and how little of it there is to spend

The sharpest of the four is the corresponding colour. A studio computing what a colour under one light must be under another runs the model forward under the first condition and backward under the second, and the plain model’s answer does not depend on the background at all provided the same background is used at both ends. The exponent is applied going in and undone coming out; the two powers compose to one.

The invariance the term spends, and how little of it there is to spend. Each row is a background. The bar is how far that background's corresponding colours — computed across a change of light from daylight to an incandescent lamp, with the background stated at both ends — sit from the answers the reference background of 20 gives. The scale is logarithmic and runs from a hundredth of a femtounit to one tristimulus unit, because the two columns are that far apart. Without the term the largest move over every background and every surface is 2.2e-13, which is the arithmetic's own noise: the exponent is applied going in and undone coming out. With the term it is 0.149, with a median of 3.4e-3 — real, and four orders of magnitude below the 5.1 tristimulus units that stating the background differently at the two ends already costs.
Fig. 3 For each background, how far its corresponding colours sit from the answers the reference background of 20 gives, with the background stated at both ends. The scale is logarithmic and runs over sixteen decades, because the two columns are that far apart.

Without the term the largest move over every background and every surface is 2.2 × 10⁻¹³ tristimulus units, which is a few units in the last place of a double. With the term it is 0.149, with a median of about 0.005. The invariance is gone, exactly as the algebra says it must be: what the term adds is a function of the sample’s own level, the forward pass adds it at one condition and the backward pass removes a different one, and nothing composes to the identity.

So the qualitative claim is right. The quantitative one is the finding. Five thousandths of a tristimulus unit is not a small effect on a large one; it is not an effect at all at the resolution anything downstream works to. The same essay that raised the objection measured what an inconsistent background costs the plain model — a mid-grey card at one end and a dark surround at the other, which is the ordinary arrangement rather than an unusual one — and got a median of 5.1 tristimulus units and a worst case of 8.2. The structure the term was said to break is broken first, and by a thousandfold larger margin, by a mismatch nobody records.

Why a term with no reason to cancel nearly cancels

The reason is worth isolating, because it is a property of what a corresponding colour is rather than of this particular term.

The term reads one thing about the sample: its luminance factor. A corresponding colour across a change of light holds lightness, chroma and hue fixed and solves for the stimulus that produces them under the second condition. Lightness is very nearly a function of luminance factor alone, and the two conditions here differ only in their white — so the corresponding colour comes back at very nearly the luminance factor it went in at, and the term’s argument is very nearly unchanged. A function of an unchanged argument returns an unchanged value, and subtracting what was added is the cancellation the exponent achieved by algebra.

That is a coincidence of the arrangement rather than a guarantee, and the way to see which it is, is to break it.

The term costs most where the two ends are lit differently. Four pairs of rooms a corresponding colour is actually computed between, and how far the term moves the answer in each. The dark bar is the median over the surfaces and the pale one the worst. Where both ends are at the same adapting luminance the term nearly undoes itself — a median of 0.0023 tristimulus units — because a corresponding colour across a change of light very nearly preserves the sample's luminance factor, and the sample's luminance factor is the only thing the term reads. Change the adapting luminance between the two ends and that stops being true: a booth against a dim room costs 0.0325 at the median and 0.285 at worst. Every number here is small. The largest is 0.288 against the 5.1 a mismatched background costs already.
Fig. 4 Four pairs of rooms a corresponding colour is actually computed between, and how far the term moves the answer in each. The dark bar is the median over the surfaces and the pale one the worst.

Both ends at the same adapting luminance: a median of 0.0023. A booth at 100 candelas a square metre against a desk at 20: 0.021. Against a dim room at 5: 0.033, with a worst surface at 0.285. Changing the adapting luminance changes the model’s compression, so a colour matched in lightness across the change is not matched in luminance factor, and the term’s argument moves. Its cancellation moves with it, by about a factor of fourteen.

Fourteen times nearly nothing is still nearly nothing. The worst number anywhere in this essay is 0.29 tristimulus units, against the 8.2 the plain model already accepts from a background stated twice. What the accident buys is not the result; the result survives without it. What the accident explains is the size, and knowing the mechanism says where to look if the term were ever changed: a crispening term that read chroma as well as level, or that read a local rather than a global background, would have no such coincidence protecting it.

Order, which the plain background cannot break at all

The second currency is the one a dark background moves every difference and no match was most emphatic about. A monotone function applied to every sample’s own background-free ratio cannot change which of two samples is lighter, so the plain model produces no lightness inversions between any two backgrounds, ever. That is what makes a match survive a background while a difference does not.

Samples that change places in lightness, which the model as it stands cannot produce. Six pairs of backgrounds, and how many of the 14028 sample pairs are ordered one way in lightness at the first background and the other way at the second. The plain model gives zero at every pair and must: the background is one exponent applied to a ratio that does not contain it, and a monotone function of a common quantity cannot reorder anything. With the term in there are 3, 4, 7, 5, 1, 4 — 24 in all, and never more than 0.05 per cent of the pairs. They are rare because the term saturates: for a sample several widths from either background it is a constant offset, and a constant preserves order. What changes places sits between the two backgrounds.
Fig. 5 Six pairs of backgrounds, and how many of the 14,028 sample pairs are ordered one way in lightness at the first background and the other way at the second. The plain model gives zero at every pair.

With the term in there are 3, 4, 7, 5, 1 and 4 inversions — 24 in all, out of 84,168 pairs. They exist, which settles the qualitative question, and they are vanishingly rare, which is the interesting part and has a cause.

What the term adds to a sample depends on the background, so changing the background changes it. But the change it makes is not monotone in the sample’s level: it is the difference of two saturating curves centred at different places, which is a dip, deepest half way between the two backgrounds in log level and flat on both sides of them. Outside that dip the term’s change is a constant offset applied to every sample alike, and a constant cannot reorder anything. The term saturates, and saturation is what preserves the order everywhere except in a narrow band.

The band is where the inversions are. The widest of them turns a lightness gap of 0.170 units at a background of 5 into a gap of 0.571 the other way at a background of 40, between two samples whose luminance factors are 35.0 and 37.4 — which is to say between two nearly identical greys, at a size no observer would report and no specification would notice. A reversal that has to be hunted for at the third decimal place is a break in a guarantee rather than a defect in a prediction, and the two are worth distinguishing, as a stated lightness is two requirements had to distinguish a target from a tolerance.

The exchange rate, which is not a rate

With something bought and something paid, the trade can be drawn. It is not the straight line an exchange rate would be.

What the term buys against what it spends, at eight strengths. Across is the lightness the term adds to a pair straddling the background; up is the median distance its corresponding colours move from the plain model's. The dashed line is what a constant exchange rate would look like, drawn through the weakest term. The measured curve falls below it: 12 times the effect costs 7.2 times the drift, a factor of 1.7 in the buyer's favour, because a bounded function of the sample's level saturates first for the samples furthest from the background and those are the samples whose corresponding colours move most. The whole vertical axis spans 0.008 tristimulus units.
Fig. 6 Across is the lightness the term adds to a pair straddling the background; up is the median distance its corresponding colours move. The dashed line is what a constant rate would look like, drawn through the weakest term.

Twelve times the effect costs 7.2 times the drift — a factor of 1.7 in the buyer’s favour — and the curve bends the same way over its whole length. The mechanism is the saturation again, from the other side. What the term buys is measured on a pair at the background, where it is in its linear part and every increase of amplitude is felt in full. What it costs is decided by the samples furthest from the background, where it has already run into its own bound and an increase of amplitude moves the bound rather than the answer.

That is a pleasant shape for a modelling decision to have. A parameter whose benefit is linear and whose cost is sublinear has no interior optimum to be argued about: the answer is to set it from the measurement it is meant to reproduce and stop, because nothing downstream is bidding against it. The reason to keep the term small is that crispening is small, not that the model cannot afford a large one.

The width behaves differently, and it is the dial that would need an experiment.

The second dial: the term's width, at one peak height. The peak of the added slope is held at 12 lightness units per log unit throughout, which means the amplitude rises with the width — from 3.0 at a width of 0.25 to 18.0 at 1.5. What that buys on the straddling pair rises from 3.98 to 4.77 lightness units and then stops, because once the term is wider than the pair the pair is inside its linear part and sees the peak itself. What it costs rises to 0.0059 and comes back down, because a very wide term is nearly a straight line in log level and a straight line in log level is very nearly what the model's own lightness already is. The cheapest useful term is the widest one that still counts as local.
Fig. 7 The peak of the added slope held at 12 lightness units per log unit while the width is swept, so the amplitude rises with the width. What the term buys rises and levels off; what it costs rises and comes back down.

Widening the term from 0.25 to 1.5 log units, at a fixed peak, takes what it buys from 3.98 to 4.77 lightness units and takes what it costs from 0.0023 to 0.0059 and back to 0.0040. The rise in what it buys stops once the term is wider than the pair being measured, because a pair inside the term’s linear part sees the full peak and nothing more. The fall in what it costs sets in once the term is wide enough to be nearly a straight line in log level over the whole range of surfaces — and a straight line in log level is very nearly what the model’s lightness already is, so a very wide term is a small reparameterisation of something the model has rather than a new thing bolted onto it.

The practical reading is that the cheapest useful term is the widest one that still deserves the name. How wide that is, is the one parameter here an experiment would have to set, and the experiment is the one a dark background moves every difference and no match described: a lightness-difference scaling run at several surround levels with samples on both sides of each returns the peak’s height and its width together.

The closed form, which is genuinely lost

The fourth currency is the only one where the loss is not a decimal place, and it is the one the trade above cannot price because it is not a quantity.

The plain model’s inverse is a formula. Lightness gives the achromatic response by a power, the response gives the opponent pair, and the opponent pair gives the stimulus. With the term in, the equation to be solved is J_plain(Y) + α · tanh(ln(Y / Yb) / σ) = J_c, where Y is the luminance factor of the very stimulus the inverse is producing. That is implicit, and no rearrangement makes it otherwise, because tanh and a power law do not compose into anything invertible.

What saves it is monotonicity. Both parts of the slope of lightness against level are positive everywhere — the plain model’s because it is a power law, and the term’s because sech² is — so the forward map is strictly increasing in level and the solution exists and is unique at every strength of the term. A bisection finds it in 40 steps to a tolerance of a ten-billionth in lightness, which is the honest measure of what the closed form was worth: not correctness, and not stability, but 40 evaluations of the plain inverse instead of one.

Whether that matters depends entirely on where the model sits. A colour-management pipeline converting a few million pixels through an inverse appearance model would notice a fortyfold cost and would reach for a table, which is what such pipelines do anyway — a profile is a table is the whole of that argument, and a tabulated inverse is indifferent to whether the thing it tabulated had a formula. A model used to predict what an observer reports evaluates its inverse a few thousand times in a study and would not notice at all.

Which of the two uses the term is for

The design question this began with was whether a model of this shape can carry crispening, and the answer is that it can, cheaply, with one consequence that is not about size.

For a pipeline the term is affordable and pointless. Every number it moves is below the pipeline’s own noise — 0.005 tristimulus units against the 5.1 an unrecorded background already costs, 24 order inversions at the third decimal place — so adding it changes no conversion any reader could see, while making the inverse a solve. A pipeline gains nothing it can use and pays the one cost that is real.

For a model of what a person sees the term is worth having and the accounting above is the reason. The objection to adding it was structural, and structural objections are the kind that do not come with a magnitude attached; this one, measured, turns out to be worth a few thousandths of a unit. The thing that made it look expensive — that the term is not a common exponent, so it cannot cancel by algebra — is true and is not the same statement as it does not cancel.

That distinction is the whole result. An appearance is not always a stimulus found a different kind of gap between what a model guarantees and what it does, and the shape is the same: a guarantee is a statement about every input, and losing it says nothing about the inputs anybody has.

How the term and its price were computed

The samples are the widened surface family under D65 at full density — 168 surfaces spanning seven band centres and four reflectance levels, with luminance factors from 2.6 to 81.8 — against the 24 the exponent argument used, because the questions here are about how often something happens rather than whether it happens at all.

Every reading holds the adapting luminance at 100 candelas a square metre and the surround at average unless the room pair says otherwise, so that only the background moves. The corresponding colours run from D65 to illuminant A through the model’s own inverse, with the background stated at both ends and equal at both ends; the invariance measured is how far each background’s answers sit from the reference background’s. The crispened inverse bisects on the plain lightness between a millionth and 100, to a tolerance of 10⁻¹⁰, and reports the number of steps it took.

The straddling pair is two greys separated by 0.4 of a log unit in level, which is about a fifth lighter and a fifth darker than its own centre, walked from three log units below the background to three above. The slope measurements use a step of 0.02 in log level for the curves and 10⁻⁵ for the check on the peak’s height, since the second is a claim about an identity and the first about a shape.

What this does not settle

The term’s shape is a choice. A tanh in log level is the simplest bounded, odd, smooth function with a single peak in its derivative, and several others would do — a scaled error function, a logistic, a difference of two power laws. The results that depend on boundedness would survive all of them and the exact numbers would not.

Nothing here fits the term to data. The amplitude and width are a working point, every result is reported as a function of them, and the experiment that would set them is named above and has not been run. The exchange rate is a rate between two computed quantities, not a claim that the effect is 4.6 lightness units.

The term is added to lightness only. Crispening in chroma is a separate phenomenon with its own literature, and a dark background moves every difference and no match noted that the background’s contribution to chroma is not a pure exponent, so the algebra that makes the lightness case clean does not transfer. A chroma term’s price would have to be measured rather than inferred from this one.

And the background here is one number, as the model requires. Crispening is measured against a surround a sample sits on, and a real surround is a field with structure in it; a patch is not a scene is the standing objection to every per-patch model, and a term that depends on the sample’s level relative to a single background number inherits it whole.

Still open: the width, which only a booth can set

Both parameters are free here and only one of them can be got from the peak. The height of the added slope is what a discrimination experiment reports directly — the ratio between a straddling pair’s lightness difference and the same pair’s difference far from the surround — and any such experiment pins α/σ. It does not pin either one.

The width is what decides how far from the surround the effect reaches, and it is the parameter the price is most sensitive to: at a fixed peak, a term of width 0.25 costs 0.0023 tristimulus units and one of width 0.7 costs 0.0059, with what they buy differing by a sixth. An experiment that measured the same pair at several distances from the surround, rather than at several separations straddling it, would return the width directly as the distance at which the enhancement has half gone.

That experiment is a small extension of the one already described and it would settle the whole parameterisation, because the peak and the width together are the term. Its most useful possible outcome is a wide one: if the enhancement survives a log unit away from the surround, then the term is nearly a reparameterisation of the model’s own lightness scale, and the honest conclusion would be that CIECAM16’s exponent was fitted to data that already had crispening in it.

A structural objection is not a magnitude

The habit is about what follows from an argument that shows two properties cannot both hold exactly.

Such arguments are easy to make and they are almost always right. Two quantities with different algebraic forms will not cancel; a function of a local relation cannot be a global constant; an approximation cannot satisfy an identity. Each of those is a proof that something is lost, and none of them is a statement about how much.

The move is to compute the loss in the units the system already fails in. A model that is exact in one place and carries five units of unrecorded error in another is not made worse by an addition costing five thousandths, whatever the addition does to the exactness — and the comparison takes one measurement, which is usually already lying about in the essay that raised the objection.

The failure mode is to treat exactness as a quantity. An invariance that holds to the last bit of a double is worth exactly as much as the thing it protects, and here the thing it protects is already being spent, by a factor of a thousand, on a background nobody writes down.

Named alongside this one

Essays reaching for the same objects. Nobody chose these; they are what the index of named objects makes visible.

The objects this essay names

Each one links to every other essay that touches it.

CIECAM16Colour appearanceColour differenceCorresponding coloursCrispeningInvarianceLightnessModelling assumptionSimultaneous contrastViewing condition