Welcome to the VBNN Digital Library
Unlock a Vast Knowledge Ecosystem
Featuring over 30,000 books, academic papers, illustrations, and expert insights—continuously updated to support your research and professional growth.
Welcome to our library!
Here, you will find an exclusive collection created 100% by our own faculty, meaning you will not find these resources anywhere else. Over the last 20 years, our team has written much more than what is currently online, and we are actively working to upload our complete back catalog. We update our platform regularly, so be sure to check back from time to time. If you ever need help finding a specific resource, you can always contact us!
Maximize Your Access
Log in to instantly view and download tailored resources directly aligned with your specific program and curriculum.
Ready to begin? Sign in above to explore your personalized dashboard.
Please note: Login is only possible using your institutional email address; otherwise, the system will not recognize your account.
VBNN Library AI
Introducing our fully integrated Library AI. Designed to support your research, you may submit inquiries in any language and receive precise, evidence-based responses drawn exclusively from our published scholarly articles and textbooks.
Search...
Latest Publications:
Search this site
Results found for empty search
- Metamaterials and Cloaking (Manipulating Electromagnetic Waves)
Download the Book (PDF): Introduction Every lens ground before the twenty-first century worked on the same principle. Light slows down inside glass, and if the glass is thicker in the middle than at the edges, the part of a wavefront passing through the centre falls behind the parts passing near the rim. The wavefront curves, and the light converges to a focus. The lens maker's freedom was confined to two choices: the shape of the surface and the chemistry of the glass. Optical designers spent three centuries pushing those two variables to their limits, adding element after element, inventing new glasses doped with lanthanum and fluorite, aspherising surfaces with diamond tools. The camera in a modern smartphone, a stack of six or seven moulded plastic elements no taller than a few millimetres, is the end point of that long effort. A metamaterial abandons the premise that a material's optical behaviour must come from its chemistry. It starts instead from a fact about waves that is easy to state and surprisingly powerful once taken seriously: a wave cannot resolve detail much smaller than its own wavelength. Light with a wavelength of five hundred nanometres passing through a forest of pillars each eighty nanometres across, spaced two hundred nanometres apart, does not see pillars. It sees a medium with some average refractive index, an index set not by what the pillars are made of alone but by their size, shape, spacing and arrangement. Change the pillars and you change the material, without changing a single atom. Geometry becomes a substitute for chemistry. That substitution is the whole idea, and this booklet argues that it is both more powerful and more constrained than the popular account suggests. It is more powerful because geometry, unlike chemistry, can be specified point by point. A designer can make the effective index vary continuously across a surface, can make it different for different polarisations, can make it respond to magnetic fields at frequencies where no natural material does, and can, in principle, make it negative. It is more constrained because the same physics that lets a structure imitate a material also binds it to the rules every material obeys. Causality, the requirement that a response cannot precede its cause, ties a material's behaviour at one frequency to its behaviour at all others. Resonance, the mechanism by which small structures produce large effects, brings loss and narrow bandwidth with it. Energy conservation forbids a passive object from doing certain things however cleverly it is shaped. The controlling claim of what follows is simple: a metamaterial lets you buy almost any electromagnetic or acoustic property you can write down, but it always charges you in bandwidth, loss or size, and the technologies that have reached the world are precisely those whose users could afford the bill. Seen this way, the subject's apparent contradictions resolve. Physicists demonstrated a material with a negative refractive index in 2001, yet no product uses one. An "invisibility cloak" was built and tested in 2006, yet nothing has been hidden from anyone outside a laboratory. Meanwhile a flat lens patterned like a computer chip, an idea that attracted far less public excitement, has been shipping inside consumer electronics since 2022 and has been built into well over a hundred million devices. The difference is not that one group of engineers was more talented. The difference is that a depth sensor working at a single infrared wavelength does not need bandwidth, while a cloak that hides a tank from the eye needs all of the visible spectrum at once. What the reader will find here The booklet moves from mechanism to consequence. The first chapter explains how structure smaller than a wavelength behaves as a material: what permittivity and permeability are, why natural materials have so little magnetic response at high frequencies, and how John Pendry and colleagues at Imperial College London showed in the late 1990s that arrays of metal wires and split rings could supply the missing ingredients. The idea of the effective medium, and its limits, underpins everything later. The second chapter takes up negative refraction, the property that gave the field its name and its first notoriety. It traces the idea from Victor Veselago's 1967 thought experiment, through the microwave prism experiments at the University of California, San Diego, to the struggle to push negative index into visible light, where metals become lossy and the fabrication of three-dimensional structures becomes formidable. The third chapter examines the most striking promise of negative index, Pendry's "perfect lens", which would image detail finer than the wavelength, and explains why loss turned a perfect lens into a merely interesting one, and how the hyperlens and related ideas salvaged part of the vision. The fourth chapter turns to transformation optics, the 2006 insight that Maxwell's equations look the same in any coordinate system, so that a designer can bend space on paper and then build a material that makes light behave as if space were bent. This is where the invisibility cloak comes from, and the chapter follows its realisation from microwaves to the near infrared. The fifth chapter is the hinge of the argument: it sets out the physical bounds on cloaking, from the causality constraints that link bandwidth to performance, to the 2016 result of Francesco Monticone and Andrea Alù that broadband passive cloaking of large objects is impossible. It explains what remains possible after those bounds are respected. The sixth chapter carries the ideas from light into sound. Acoustic waves obey equations closely analogous to those of electromagnetism, and acoustic metamaterials have been built that bend ultrasound around objects underwater. The interest of navies in quieter, less detectable submarines is real and long-standing, but the chapter shows that the bounds that limit optical cloaks bite harder still at the low frequencies that matter for long-range sonar, where wavelengths are measured in metres. The seventh chapter introduces metasurfaces, the flattened, single-layer descendants of bulk metamaterials, and the generalised law of refraction that governs them. The eighth follows the metalens from a 2016 laboratory demonstration at Harvard to the semiconductor foundries that now manufacture it, and explains exactly where flat optics beat conventional lenses and where, for now, they do not. The conclusion draws the lessons together and argues what they imply for engineers, investors and anyone trying to judge the next headline about invisibility. How to read the claims Few fields have suffered more from their own press releases. The word "cloak" carries a fictional image of total, effortless invisibility that no device has ever approached, and laboratory demonstrations are routinely reported as though they were prototypes of that image. The opposite error is also common: because cloaks remain laboratory curiosities, the whole field is sometimes dismissed as hype. Both readings miss what is actually interesting. The physics is sound, the demonstrations are real, and the commercial impact is genuine, but each lives in a specific regime of frequency, scale and bandwidth, and moving outside that regime changes everything. Three questions will help the reader assess any claim about a metamaterial device, and the chapters return to them repeatedly. First, over what range of frequencies does it work, and how does that compare to the range the application needs? A device that performs at one wavelength may be useless across a band. Second, where does the energy go? A passive structure that redirects a wave must either store, absorb or re-radiate the energy it does not pass, and absorption means heat and lost signal. Third, how large is the device relative to the wavelength? Many effects that are easy for an object a fraction of a wavelength across become impossible for an object hundreds of wavelengths across, which is the size of most things a person might want to hide. A note on scope. The booklet concentrates on the classical, linear physics of electromagnetic and acoustic metamaterials, because that is where the controlling ideas live and where the products are. It touches only lightly on active and reconfigurable metasurfaces, on thermal and mechanical metamaterials, and on quantum applications, each of which deserves its own treatment. It uses no equations beyond what can be stated in a sentence, but it does not avoid the physics. An intelligent reader willing to follow an argument about waves will find that the core ideas are within reach, and that understanding them is the best defence against both disappointment and hype. Chapter 1: Structure as Substance A wave passing through matter is constantly being re-emitted. When light enters glass, the electric field of the wave pushes on the electrons bound to each atom, setting them oscillating. Each oscillating electron radiates a small wave of its own, and the sum of all those tiny secondary waves, added to the original, produces a wave that travels more slowly than light in a vacuum. The refractive index of glass, about 1.5, is a compact summary of that collective re-radiation. Nothing in the glass is literally slowing the light down; the forward-moving field is a superposition, and the superposition advances at two-thirds of the vacuum speed. This picture contains the seed of every metamaterial. If the optical properties of a material are a summary of how its constituents respond to a passing field, then any collection of small objects that respond to the field will have optical properties too. The constituents need not be atoms. They can be loops of copper wire, pillars of titanium dioxide, or holes drilled in a rubber sheet, provided they are small enough and closely enough spaced that the wave averages over them rather than scattering off each one individually. The engineered constituents are often called meta-atoms, and the material they make up is a metamaterial. Two numbers that describe a material For electromagnetic waves, almost everything about a material's linear response can be captured by two quantities. The permittivity, written with the Greek letter epsilon, describes how strongly the material's charges are displaced by an electric field, storing energy as they go. The permeability, written mu, does the same for magnetic fields, describing how the material's internal currents and magnetic moments respond. The refractive index is, roughly, the square root of their product, and the impedance, which governs how much of a wave is reflected at the boundary between two materials, depends on their ratio. A material that matched the ratio of free space would reflect nothing at normal incidence, however large its index. Both quantities depend on frequency, and the way they do so follows from a simple model that has served physicists since Hendrik Lorentz used it at the end of the nineteenth century. Treat each bound charge as a mass on a spring. Push it slowly and it follows the force in step, adding a positive contribution to the permittivity. Push it near its natural frequency and the response grows very large, limited only by friction. Push it faster than its natural frequency and the charge cannot keep up; it lags so far behind that it moves opposite to the force, and its contribution to the permittivity turns negative. Just above a resonance, in other words, a material can have a permittivity below zero. Metals are the limiting case. Their conduction electrons are not bound at all, so their natural frequency is zero, and below a characteristic value called the plasma frequency their permittivity is negative. A negative permittivity means a wave cannot propagate; its field decays exponentially within a short distance of the surface, and the wave is reflected. That is why metals are shiny. For silver and gold the plasma frequency lies in the ultraviolet, which is why they reflect visible light, and why their colours come from the details of where interband transitions add absorption. The magnetic side of nature is far poorer. Magnetic materials such as iron and ferrites respond strongly to magnetic fields at low frequencies, but the response comes from electron spins and domain walls that cannot follow fields oscillating much faster than a few gigahertz. At the frequencies of visible light, about five hundred terahertz, the permeability of every known natural material is, for practical purposes, equal to that of empty space. The optics of the visible world is the optics of permittivity alone. Lev Landau and Evgeny Lifshitz made this point in their classic textbook on the electrodynamics of continuous media: at optical frequencies the magnetic permeability ceases to have any physical meaning distinct from one. This asymmetry is the opening that metamaterials exploited. If natural materials offer the designer full control over only one of the two numbers, then a way of building magnetic response from non-magnetic ingredients would double the space of possible materials. Pendry's wires and rings The decisive work came from John Pendry, a theoretical physicist at Imperial College London, partly through a collaboration with the Marconi company on radar-absorbing materials in the mid-1990s. In 1996 Pendry and co-workers showed that a lattice of very thin metal wires behaves, for waves polarised along the wires, like a metal with a drastically lowered plasma frequency. Because the wires are thin, the electrons in them have to carry current through a small cross-section, which gives the current a large self-inductance. In the mass-on-a-spring language, the electrons behave as though they were enormously heavy, and heavy electrons oscillate slowly. A plasma frequency that in bulk metal lies in the ultraviolet can be pulled down to the gigahertz range simply by choosing the wire radius and spacing. Below that engineered frequency the wire array has negative permittivity, exactly as a metal does, but at microwave frequencies where the wires and their spacing are millimetres in size, comfortably smaller than the centimetre wavelength. In 1999 Pendry, A. J. Holden, D. J. Robbins and W. J. Stewart published the companion idea in the IEEE Transactions on Microwave Theory and Techniques, under the modest title "Magnetism from conductors and enhanced nonlinear phenomena". A loop of metal, they observed, acts as a magnetic dipole when a current circulates in it. A changing magnetic field threading the loop induces such a current. On its own a simple loop gives only a weak, diamagnetic response. But cut a gap in the loop and the gap acts as a capacitor; nest two such cut rings inside each other with their gaps on opposite sides and the gaps between the rings add further capacitance. The resulting split-ring resonator is an electrical circuit with inductance from the loop and capacitance from the gaps. It resonates at a frequency set by its geometry. Just above that resonance, by the same logic that gives the Lorentz oscillator its negative permittivity, an array of split rings has a negative permeability. What makes these structures metamaterials, and not merely clever antennas, is the ratio of their size to the wavelength. A split ring designed for ten gigahertz, where the free-space wavelength is three centimetres, can be a few millimetres across. The resonance is set by the circuit's inductance and capacitance rather than by the ring's physical size matching the wavelength, so the ring can be made much smaller than the wave it controls. The wave sees an array of rings as a continuous medium with an effective permeability, just as light sees glass as a continuous medium rather than a lattice of silicon and oxygen. The effective medium and its limits The notion that an array of structures can be described by a single effective permittivity and permeability is called homogenisation, and the conditions under which it holds deserve attention because many later disappointments come from violating them. The basic requirement is that the unit cell, the repeating block of the structure, be much smaller than the wavelength inside the material. A common rule of thumb asks for cells of a tenth of a wavelength or less. As the ratio grows towards a quarter or a half, the wave begins to resolve the individual cells, it diffracts from the lattice as X-rays diffract from a crystal, and the effective parameters become dependent on the direction of travel, on the thickness of the sample, and on where exactly the boundary of the sample is cut. At that point the structure is better described as a photonic crystal, a material whose behaviour comes from interference between waves scattered by a periodic lattice, rather than as a homogeneous medium. There is a tension here that runs through the entire subject. Resonant meta-atoms produce strong effects, but resonant structures tend to be a sizeable fraction of a wavelength across, because making a resonator much smaller than its wavelength requires packing in large inductance or capacitance. Split rings at microwave frequencies typically reach a tenth of a wavelength. At optical frequencies the problem worsens, because metals stop behaving as perfect conductors. The electrons in a nanometre-scale gold ring carry kinetic energy that adds an inductance of its own, and that kinetic inductance does not shrink as the ring does. Below a certain size the resonance frequency stops rising as the ring shrinks; it saturates somewhere in the near infrared to visible range, depending on the metal and the design. Scaling a microwave split ring down by a factor of a hundred thousand does not produce an optical split ring that works the same way. A second limit is spatial dispersion. Ordinary materials respond to the field at each point. When meta-atoms are not vanishingly small compared to the wavelength, their response at one point depends on the field at neighbouring points, and therefore on the direction and wavelength of the wave. The effective parameters stop being properties of the material alone and become properties of the material and the wave together. Careful researchers retrieve effective parameters from measured reflection and transmission, and the retrieval procedure developed by David Smith and colleagues at Duke University in the early 2000s became a standard tool, but they report alongside the numbers the conditions under which the numbers mean anything. The third limit, and the most important for the argument of this booklet, is that resonance and loss travel together. A resonance is strong because energy builds up in it over many cycles. Any dissipation, whether resistance in copper or absorption in gold, drains that stored energy, and the more energy a resonator stores the more it loses per cycle in absolute terms. Near the resonance, where the effective permittivity or permeability takes its most exotic values, the imaginary part of the parameter, which measures absorption, is also largest. The region of negative permeability in a split-ring array therefore coincides with the region where the array absorbs most strongly. This is not a defect of a particular design. It is a consequence of the mathematical link, discussed later in the booklet, between how strongly a passive material responds and how much it must absorb. With two independently adjustable parameters, each of which can be positive or negative, there are four broad classes of material, and it is useful to see where natural substances fall and what the engineered additions provide. Table 1 lays them out. Table 1. The four sign combinations of permittivity and permeability. Permittivity Permeability Wave behaviour Natural examples Engineered examples Positive Positive Propagates normally Glass, water, air Dielectric metasurfaces Negative Positive Evanescent, reflects Metals below plasma frequency Thin-wire arrays Positive Negative Evanescent, reflects Ferrites near magnetic resonance Split-ring arrays Negative Negative Propagates, backward phase None known Combined wire and ring arrays The first row is the world of ordinary optics. The second and third rows describe materials in which waves cannot travel; their fields decay away from the surface. The fourth row is the striking one. If both parameters are negative, their product is positive and a wave can propagate again, but, as Victor Veselago showed in 1967, it propagates in a very strange way: its phase fronts move towards the source while its energy flows away. The next chapter is devoted to that strangeness. The table also reveals a less obvious point. A great deal of practical metamaterial engineering takes place in the first row. The flat lenses described in the later chapters use no negative parameters at all; they use dielectric pillars whose geometry sets a positive effective index that varies from place to place. The exotic quadrant brought the field into existence and dominated its first decade of publicity, but the ability to tailor ordinary positive parameters with sub-wavelength precision turned out to be the more useful gift. Geometry as a design language Why does replacing chemistry with geometry matter so much in practice? Because geometry can be manufactured with a precision and flexibility chemistry cannot match. Developing a new optical glass with a particular combination of index and dispersion can take years of melt chemistry and still yield only a point in a constrained space. Changing the width of a nanopillar from 120 to 140 nanometres requires changing a number in a layout file. Semiconductor lithography, refined over decades to pattern billions of transistors, can draw billions of meta-atoms with each one different from its neighbour. That flexibility changes the design problem. A conventional optical designer chooses a few surface curvatures and glass types and lets the physics of refraction do the rest. A metamaterial designer chooses the response of every point in a structure independently, subject to the constraints of what a unit cell can do. The search space becomes vast, which is why computational inverse design, in which algorithms adjust the structure to optimise a target function, now plays a large role in the field. The designer specifies what the wave should do and lets the computer find a geometry that does it. The flexibility also changes what counts as a material property. Anisotropy, the dependence of response on the direction of the field, is a nuisance in many natural crystals and a resource in metamaterials. Elongated pillars respond differently to light polarised along and across them, so a surface of rotated pillars can treat each polarisation separately, a fact that the eighth chapter will show is now used to read polarisation in phone cameras. Gradients, smooth variations of the effective index across a component, are hard to make in glass and easy to make with pillars of graded width. Magnetic response at optical frequencies, absent in nature, can be approached with resonant structures, though with the losses already described. None of this abolishes the old physics. An effective medium is still a medium. It still obeys Maxwell's equations, still satisfies causality, still conserves energy, and still has a response that changes with frequency. The meta-atoms buy freedom over the values of the parameters at a chosen frequency, and the price is paid at other frequencies or in absorbed energy. Every subsequent chapter can be read as an exploration of one particular bargain struck between the designer's ambitions and those unchanging rules. It is worth noting why the first metamaterials were built for microwaves rather than light, because the reason explains the shape of the field's history. At ten gigahertz a unit cell a few millimetres across is a tenth of a wavelength, and it can be etched from copper on a circuit board with tools any electronics workshop owns. Copper at those frequencies is an excellent conductor, so resonances are sharp and losses tolerable. Measurement is straightforward with standard microwave equipment. Every early landmark experiment, from the first negative-index prism in 2001 to the first cloak in 2006, was performed at microwave frequencies for these reasons. Moving the same ideas to infrared and visible wavelengths demanded structures a hundred thousand times smaller, made from metals that at those frequencies behave like lossy plasmas rather than perfect conductors, fabricated in three dimensions with tools that are naturally two-dimensional. The difficulty of that transition, and the partial ways around it, form a recurring theme. The field's most successful optical devices ended up sidestepping it altogether: they abandoned metals in favour of low-loss dielectrics and abandoned bulk three-dimensional structures in favour of single patterned layers. The route from Pendry's copper rings to the meta-optics in a depth sensor runs through a series of such retreats, each of which gave up an exotic property in exchange for something that could be made and would work. Chapter 2: Bending Light the Wrong Way Put a straw in a glass of water and it appears bent at the surface. The bend has a direction: light passing from air into water swings towards the line perpendicular to the surface, the normal, but stays on the opposite side of that line from where it came in. Willebrord Snell described the rule quantitatively in 1621, and every refraction since has obeyed it with a positive index. A ray entering from the upper left continues to the lower right. In 1967 Victor Veselago, a physicist at the Lebedev Physical Institute in Moscow, asked what would happen if a material had both a negative permittivity and a negative permeability at the same frequency. His paper, published in Russian that year and in English translation in Soviet Physics Uspekhi in 1968, worked through the consequences with nothing but Maxwell's equations. The answer was that a ray entering such a material would bend to the same side of the normal it came from. A straw in a glass of such a liquid would appear to break backwards. Veselago called these "left-handed" substances, because the electric field, magnetic field and wave vector, which in ordinary materials form a right-handed set like the thumb and first two fingers of the right hand, would form a left-handed set instead. He could suggest no material with the required properties, and the paper was largely forgotten for three decades. The interest of the idea, as this chapter will show, was not that it overturned physics. It was that it followed entirely from physics everyone already accepted, and that it nonetheless predicted phenomena nobody had seen. Backward waves The core of Veselago's result is a separation between two things that in everyday materials point the same way: the direction in which the wave's crests travel, and the direction in which its energy flows. Phase velocity describes the motion of the crests. The energy flow is described by the Poynting vector, which depends on the electric and magnetic fields. In an ordinary material, flipping the sign of both permittivity and permeability leaves the Poynting vector pointing away from the source, as it must if the source is putting energy in, but it reverses the relationship between the fields and the wave vector. The crests therefore move towards the source while energy moves away. Such waves are called backward waves. Backward waves were not themselves new. Engineers had known them since the 1940s in certain periodic structures such as the backward-wave oscillator, a microwave tube, and in transmission lines built from series capacitors and shunt inductors. What Veselago noticed was that a homogeneous medium supporting backward waves in all directions would have a negative refractive index, and that negative index would turn familiar optical rules inside out. Snell's law, applied with a negative index, sends refracted rays to the wrong side of the normal. The Doppler shift reverses, so that a source approaching an observer inside the medium appears lower in frequency rather than higher. Cherenkov radiation, the cone of light emitted by a charged particle moving faster than light's phase velocity in a medium, points backwards. A flat slab with an index of minus one acts as a lens: rays diverging from a point on one side are bent back towards each other inside the slab and converge again on the far side. Each of these consequences sounds paradoxical, and each turned out to be a source of controversy once experiments made the question practical. None, carefully analysed, violates any physical law. The negative index is not a negative speed; it is a statement about the relation between phase and energy propagation, and it can exist only where the material is dispersive, meaning its properties change with frequency. Veselago himself pointed out that a negative-index material must be dispersive, since otherwise the energy stored in the fields would be negative, which is impossible. That dispersion is the first appearance of the bill this booklet keeps returning to. Negative index can exist only in a band of frequencies, near resonances, where loss is also present. The San Diego prism By the late 1990s Pendry's wire arrays and split rings offered separate recipes for negative permittivity and negative permeability. At the University of California, San Diego, a group led by Sheldon Schultz and including David Smith and Willie Padilla saw that the two could be combined. In 2000 they reported in Physical Review Letters a composite medium of interleaved copper split rings and wires that transmitted microwaves in a narrow band where, separately, each component would have blocked them. Transmission appearing where the wire array alone had a stop band was strong evidence that both parameters had gone negative together. Transmission alone did not prove negative refraction. The decisive test was a prism. In 2001 Richard Shelby, Smith and Schultz published in Science an experiment in which a wedge of their composite, built from circuit-board strips patterned with split rings and wires, was placed between two plates that confined a microwave beam to two dimensions. A beam entering the flat face of the wedge and leaving through the angled face would be deflected by an angle determined by the refractive index. For a Teflon wedge of the same shape the beam swung to one side of the normal, as expected. For the metamaterial wedge, at frequencies around ten and a half gigahertz, it swung to the other side, and the deflection corresponded to an index of roughly minus 2.7. The experiment was simple to describe and the result was visually unmistakable. Its logic is worth spelling out, because it is the logic of every refraction measurement since Snell. Light enters the flat face of the wedge head-on and is not deflected there. It meets the angled exit face obliquely, and the angle at which it leaves depends on the ratio of the index inside to the index outside. Measure the exit angle by sweeping a detector around the wedge, apply Snell's law, and the index follows. For a positive index the beam emerges bent towards the thin end of the wedge, on one side of the exit face's normal; for a negative index it emerges on the other side. The experiment therefore measured not just a number but its sign, and the sign could be read off the position of the detector. The response was not universally enthusiastic. Within a year several papers challenged the interpretation. One group, Prashant Valanju, Rodger Walser and Alaka Valanju, argued in Physical Review Letters in 2002 that negative refraction of a real signal, as opposed to an idealised single-frequency wave, would violate causality, because the group of waves making up a pulse would have to move faster than permitted. Others questioned whether the wedge's thickness, only a few unit cells, allowed it to be treated as a medium at all, and whether the measurement in the near field of the wedge could be distinguished from effects of absorption and diffraction. The disputes were productive. Detailed analyses showed that the causality objection confused the direction of phase with the direction of the signal; a pulse in a negative-index medium refracts negatively without any superluminal motion, provided the medium is dispersive, as Veselago had already required. Independent experiments followed. In 2003 a group at Boeing led by Claudio Parazzoli measured negative refraction with a larger wedge and with the detector placed far from the sample, and Andrew Houck, Jonah Brock and Isaac Chuang at the Massachusetts Institute of Technology measured it with both prisms and flat slabs in the same year. By 2004 the reality of negative refraction in microwave metamaterials was broadly accepted. Pushing towards light Demonstrating negative refraction at microwave frequencies was a proof of principle. The scientific and public imagination was drawn to optical frequencies, where negative index promised lenses, imaging and, eventually, cloaks for visible light. Getting there meant shrinking the meta-atoms by about five orders of magnitude and solving the problems previewed in the first chapter. The split ring did not survive the trip intact. As rings shrank to a few hundred nanometres, kinetic inductance from the electrons' inertia caused their resonance frequency to saturate, and losses grew. Researchers responded by redesigning the meta-atom. The most successful optical design was the so-called fishnet: two thin metal films separated by a dielectric layer and perforated with a rectangular grid of holes. The metal strips running in one direction act as wires, providing negative permittivity, while pairs of strips stacked one above the other, separated by dielectric, carry antiparallel currents that form a current loop and supply a magnetic resonance. In 2005 groups at Purdue University led by Vladimir Shalaev and at the University of New Mexico led by Steven Brueck reported negative index in the near infrared around 1.5 to 2 micrometres, the wavelengths used in fibre-optic telecommunications. These early optical negative-index structures were only one functional layer thick, which left them open to the same objection as the thin microwave prisms: a single layer is a surface, not a material. In 2008 Jason Valentine and colleagues in Xiang Zhang's group at Berkeley published in Nature a fishnet stacked into many alternating layers of silver and magnesium fluoride, milled into a prism with a focused ion beam. Light at near-infrared wavelengths around 1.5 micrometres was refracted negatively by the prism, the optical counterpart to the 2001 microwave experiment. In the same period researchers pushed the operating wavelength of fishnets into the red end of the visible spectrum. The near-infrared prism was a genuine achievement, but it also exposed the problem that ultimately stopped negative-index optics from becoming a technology. Metals at optical frequencies absorb. Silver, the least lossy of the common plasmonic metals in the visible, still dissipates a significant fraction of the energy in each cycle of oscillation, and the fishnet's magnetic resonance, which must be strong enough to drive the permeability negative, concentrates fields inside the metal where they are absorbed. Researchers report the trade-off with a figure of merit, the ratio of the real part of the refractive index to the imaginary part. A figure of merit of ten sounds respectable, but it means the wave's intensity falls to about a third of its starting value in less than one wavelength of travel inside the material. Optical negative-index metamaterials typically achieved figures of merit of a few, with the best stacked fishnets in the near infrared reaching a few more. Ordinary glass, by comparison, has a figure of merit in the millions. Two lines of attack were pursued. The first was to add gain: to incorporate dyes or semiconductor materials that amplify light, compensating loss with stimulated emission as in a laser. Several experiments demonstrated reduced loss in this way, but gain brings noise, requires pumping with an external light source, and raises its own stability problems; a medium with enough gain to cancel loss in a strongly resonant structure is close to the threshold of lasing on its own. The second line was to look for better metals. Researchers investigated transparent conducting oxides, metal nitrides such as titanium nitride, and doped semiconductors, each of which shifts the plasma frequency and changes the loss. None proved a clear winner across the visible spectrum. Jacob Khurgin, an electrical engineer at Johns Hopkins University, set out the underlying difficulty in a 2015 commentary in Nature Nanotechnology titled "How to deal with the loss in plasmonics and metamaterials". The essential point is that the strong, sub-wavelength field concentration that gives plasmonic metamaterials their power works by moving energy from the electromagnetic field into the kinetic energy of electrons, and in a metal that kinetic energy is lost through collisions in a few femtoseconds. Making the structure smaller to approach the effective-medium limit makes this worse, because a greater share of the energy then resides in the electrons. There is no design trick that separates the useful effect from the loss, because they are two faces of the same mechanism. Khurgin's practical recommendation was that plasmonic metamaterials should be used where loss is tolerable or even useful, such as in sensing, absorption and heating, rather than where low-loss transmission is the goal. What negative index taught No product today uses a bulk negative-index material to bend light, and it is reasonable to ask whether the effort was wasted. It was not, for three reasons that shaped what came later. First, the negative-index project forced the field to develop the language and tools for describing engineered media: effective parameter retrieval, homogenisation theory, and the habit of checking whether a structure is truly behaving as a medium. Those tools carried over directly to the positive-index metamaterials that later became useful. Second, the struggle with loss redirected attention towards dielectrics. If metals absorb too much at optical frequencies, the alternative is to build meta-atoms from high-index, low-loss materials such as silicon, titanium dioxide and gallium nitride, whose resonances arise from displacement currents in the dielectric rather than conduction currents in a metal. Dielectric resonators can produce magnetic responses too, through circulating fields inside a high-index particle, and they absorb very little. The flat lenses of the later chapters are built on this lesson. Third, the controversy over negative refraction taught the field a discipline about extraordinary claims. Each of the paradoxes Veselago predicted invited a claim that some physical law was being broken, and each such claim dissolved under careful analysis into a statement about dispersion, bandwidth or loss. That pattern, a dramatic property at a single frequency paid for by limitations across frequencies, recurs with the perfect lens and with the invisibility cloak. The microwave version of negative-index behaviour did find practical niches, though usually under other names. Transmission lines loaded with series capacitors and shunt inductors, studied in parallel by Christophe Caloz and Tatsuo Itoh at the University of California, Los Angeles, and by George Eleftheriades and Ashwin Iyer at the University of Toronto from around 2002, support backward waves and have been used for compact antennas, leaky-wave antennas whose beam sweeps from backward to forward as the frequency changes, and filters. At radio frequencies, where copper loss is modest and devices need to work only across a defined band, the bill for negative index is affordable. At optical frequencies across the visible spectrum it is not. The same physical idea is a practical tool in one regime and a laboratory curiosity in another, and the difference lies entirely in the cost of loss and bandwidth relative to what the application demands. The negative-index programme also produced an offshoot that has outlived it in the research literature: materials whose index is close to zero. If the permittivity, or both permittivity and permeability, pass through zero on their way from positive to negative, there is a narrow band in which the wave's phase barely changes as it travels. The wavelength inside the material becomes extremely long, and the whole sample oscillates nearly in step. Mário Silveirinha and Nader Engheta at the University of Pennsylvania showed in 2006 that a narrow channel filled with such an epsilon-near-zero material could squeeze electromagnetic energy through gaps and around bends that would ordinarily reflect it, an effect they called supercoupling, and microwave experiments confirmed it soon afterwards. In 2013 Parikshit Moitra, Jason Valentine and colleagues at Vanderbilt University reported in Nature Photonics a zero-index metamaterial for near-infrared light made entirely from silicon rods, without metals, in which the electric and magnetic responses both passed through zero at the same wavelength so that the material remained impedance-matched to its surroundings and did not simply reflect the light. Near-zero-index materials display the same bargain as their negative cousins. The zero crossing happens at one frequency; a little way off it, the index is no longer near zero and the exotic behaviour disappears. The zero-index regime is useful for exactly the kinds of tasks where one frequency suffices, such as coupling light between components on a photonic chip or enhancing nonlinear effects at a chosen wavelength, and its arrival in an all-dielectric form shows the field learning to trade metals for low-loss structures. The next chapter turns to the most ambitious promise of negative index, the perfect lens, where the stakes of loss became especially clear. Chapter 3: The Perfect Lens and the Price of Detail In 1873 the German physicist Ernst Abbe, working with Carl Zeiss on the design of microscopes, established the rule that has governed optical imaging ever since. A lens cannot resolve two points closer together than roughly half the wavelength of the light it uses, divided by the numerical aperture, a measure of how wide a cone of light the lens gathers. With green light and the best oil-immersion objective, that comes to around two hundred nanometres. Bacteria are visible; the proteins inside them are not. The limit is carved into a stone monument to Abbe in Jena, and for more than a century it was treated as a law of nature rather than a feature of conventional lenses. In October 2000 John Pendry published a four-page paper in Physical Review Letters titled "Negative refraction makes a perfect lens". It argued that a flat slab of material with a refractive index of exactly minus one would not merely focus light, as Veselago had noted, but would focus it with no limit on resolution at all. The paper became one of the most cited in the history of the field, and the story of what happened to its central promise is the clearest single illustration of this booklet's argument. Where the detail goes To see why Abbe's limit exists and how Pendry proposed to evade it, consider what an object does to light. An object illuminated by a wave scatters it into many components, each of which can be thought of as a wave travelling in a particular direction. Fine detail in the object corresponds to components with rapid variation across the object plane. Coarse detail, features larger than the wavelength, produces components that travel outward at modest angles and propagate freely to a lens. But detail finer than the wavelength produces components whose variation across the plane is too rapid to be matched by any freely propagating wave. Those components cannot travel. They exist only as evanescent waves, fields bound to the surface of the object that decay exponentially with distance, typically falling to insignificance within a fraction of a wavelength. A conventional lens sits many wavelengths away from the object. By the time light reaches it, the evanescent components have vanished, and with them the fine detail. No improvement in the lens can recover information that never arrived. This is the physical content of Abbe's limit: it is not a flaw in glass but a consequence of the information about sub-wavelength features being carried by fields that do not propagate. A worked example shows how severe the decay is. Suppose the object is a grating of fine lines repeating every 100 nanometres, illuminated with green light of wavelength 500 nanometres. The field component that carries the grating's pattern varies across the surface five times faster than any propagating wave of that colour can. Working through Maxwell's equations, its amplitude falls by a factor of e, about 2.7, every 16 nanometres or so of distance from the surface. Over 100 nanometres it shrinks to about one five-hundredth of its starting value; over a micrometre, to a number so small it has no physical meaning. A microscope objective, typically a fraction of a millimetre from the sample even at its closest, has no chance of receiving it. Coarser detail fares better and finer detail worse, which is why the cutoff is sharp: detail just above half a wavelength reaches the lens, detail just below does not. The same arithmetic shows what a perfect lens would have to do. To restore the 100-nanometre grating across a gap of 100 nanometres, it would need to boost that component by a factor of around five hundred, while boosting a 50-nanometre grating by a factor of hundreds of thousands, each in exactly the right proportion and with the right phase. Any device asked to amplify different components by such wildly different factors, without distorting their relationships, is being asked for extraordinary precision. There were, even in 2000, ways around this. Near-field scanning optical microscopes place a probe within a few tens of nanometres of a surface, close enough to catch evanescent fields before they decay, and build up an image point by point. Fluorescence techniques would later beat the limit by different means, and Stefan Hell, Eric Betzig and William Moerner shared the 2014 Nobel Prize in Chemistry for super-resolved fluorescence microscopy. Pendry's proposal was different in kind. It claimed that a passive slab of material could capture and transport the evanescent field across a gap and reconstruct a complete image, all at once, with every detail intact. Conventional optics had also long found ways to use evanescent fields without trying to amplify them, and these are useful benchmarks. Total internal reflection fluorescence microscopy, now routine in cell biology, illuminates a sample with the evanescent field that leaks a short distance beyond a glass surface when light is totally reflected inside the glass, so that only molecules within roughly a hundred nanometres of the surface light up. Solid immersion lenses, hemispheres of high-index material placed in contact with a sample, raise the effective numerical aperture by letting light that would be evanescent in air propagate in the high-index solid, a technique used in inspecting semiconductor chips through their silicon substrates. Each exploits the near field by accepting proximity, just as the superlens would have to. Amplifying a decaying wave The mechanism is subtle. In a slab with permittivity and permeability both equal to minus one, Pendry showed, evanescent waves do not decay as they cross the slab; they grow. Their amplitude rises exponentially across the slab by exactly the amount by which it decays across an equal thickness of the air on either side. If the object sits a distance in front of the slab and the slab is twice that thick, the evanescent field that decayed between object and slab is restored on the far side, and the image plane receives every component of the field just as it left the object. The propagating components, meanwhile, are refocused by negative refraction. The result is a perfect image. Growing evanescent waves sounds like getting something for nothing, and the claim was attacked on precisely those grounds. The resolution lies in the fact that evanescent waves carry no net energy forward; the growth is a near-field effect sustained by resonant surface waves, called surface plasmons in the electric case, that are excited at the slab's two interfaces. The slab is not amplifying energy in the sense of a laser. It is storing energy in resonant surface modes that reconstruct the field pattern. That storage is the key to both the effect and its fragility. The surface modes are resonant, and resonances are exquisitely sensitive to the material parameters. Pendry's perfection required the permittivity and permeability to be exactly minus one, with no absorption. Any deviation, and in particular any loss, damps the surface resonances. By 2003 David Smith and colleagues had analysed what loss does to the perfect lens. They found that resolution degrades severely: the finest detail the lens can recover depends only logarithmically on the loss, so that even a very small imaginary part of the index restores a limit on resolution, and reducing loss by a factor of ten improves the resolution only modestly. Viktor Podolskiy and Evgenii Narimanov later characterised the slab lens as "near-sighted": useful only when object, slab and image are all within a small fraction of a wavelength of one another, because the thicker the slab the more stringently perfect its parameters must be. There was a partial escape. Pendry had noted in his original paper that if the slab is very thin compared to the wavelength, electric and magnetic fields decouple, and for one polarisation only the permittivity matters. A thin film of metal with permittivity near minus one, which silver has in the near ultraviolet, could amplify the evanescent components of that polarisation without any magnetic response at all. This "poor man's superlens" needed no split rings, only a flat film of silver a few tens of nanometres thick. In 2005 Nicholas Fang, Hyesog Lee, Cheng Sun and Xiang Zhang at Berkeley reported in Science an experiment that realised this proposal. They wrote a pattern of fine chromium lines and letters, separated by a thin spacer from a silver film about thirty-five nanometres thick, and placed a layer of photoresist on the far side. Illuminated with ultraviolet light at a wavelength of 365 nanometres, the silver film transferred the pattern into the resist with features resolved down to about sixty nanometres, roughly one-sixth of the wavelength. Without the silver, the same arrangement produced a blurred image. A group at the University of Canterbury in New Zealand, led by Richard Blaikie, reported closely related results the same year. The superlens was a genuine demonstration of sub-diffraction imaging by evanescent-wave enhancement, and it was received as such. It also displayed every limitation the theory predicted. It worked at essentially one wavelength, where silver's permittivity happened to be near minus one. It worked for one polarisation. It formed an image only a few tens of nanometres from the object, in the near field, so that the image could be recorded only in a medium placed directly against the lens. And loss in the silver limited the resolution to a factor of a few beyond the diffraction limit, not the unlimited detail of the ideal case. A perfect lens had become a contact printer with improved resolution. The hyperlens: letting detail propagate The next idea attacked the near-field problem directly. If evanescent waves decay because they cannot propagate in ordinary materials, perhaps a material could be designed in which those same high-spatial-frequency components propagate as ordinary waves. In a strongly anisotropic material, one whose permittivity is positive in one direction and negative in the perpendicular direction, the relationship between a wave's spatial frequency and its ability to propagate changes shape. Instead of a closed curve, which caps the spatial frequencies that can propagate, it becomes an open hyperbola, which allows arbitrarily high spatial frequencies to travel. Such media are called hyperbolic metamaterials, and they can be made by stacking very thin alternating layers of metal and dielectric, or by embedding metal nanowires in a dielectric matrix. In a flat hyperbolic slab the fine detail propagates but does not get any coarser, so it still cannot escape into air. The trick, proposed in 2006 by Zubin Jacob, Leonid Alekseyev and Evgenii Narimanov and independently by Alessandro Salandrino and Nader Engheta, was to curve the layers into concentric half-cylinders. Waves carrying fine detail propagate radially outward through the layers, and as they move outward the pattern they carry spreads with the growing radius. By the time it reaches the outer surface, detail that started finer than the wavelength has been magnified until it is coarse enough to propagate into ordinary space and be imaged by a conventional microscope. The magnification is set by geometry: a hyperlens whose outer surface has four times the radius of its inner surface spreads the pattern by a factor of four, so that lines a hundred nanometres apart at the inner surface arrive four hundred nanometres apart at the outer one, comfortably within reach of an ordinary ultraviolet microscope objective. Greater magnification needs a thicker device, and a thicker device absorbs more of the light in its metal layers, so the familiar trade-off between performance and loss reappears in a new form. In 2007 Zhaowei Liu and colleagues in Zhang's group reported in Science a hyperlens made of alternating silver and aluminium oxide layers on a curved quartz substrate, which resolved pairs of lines separated by less than the diffraction limit at ultraviolet wavelengths and projected a magnified image into the far field. Igor Smolyaninov, Yu-Ju Hung and Christopher Davis published a related two-dimensional demonstration in the same issue. The hyperlens solved the near-field problem at the cost of the field of view. The object had to sit on the inner surface of the curved structure, within a region a few wavelengths across. The device still worked over a limited band, still absorbed in its metal layers, and needed fabrication of curved multilayers with nanometre precision. As a microscope, it was outcompeted by the fluorescence super-resolution methods that matured over the same decade, which work with conventional optics and require only suitable dyes. Hyperbolic metamaterials found other uses, notably in modifying how fast nearby emitters radiate and in thermal radiation engineering, but the hyperlens did not become a routine laboratory instrument. Where the idea did pay off The most practically fruitful descendants of the perfect lens operated at much lower frequencies, where loss is small and the wavelength is long enough that near-field operation is not a severe restriction. At radio frequencies, the magnetic part of the near field matters for magnetic resonance imaging. As early as 2001, Michael Wiltshire, Pendry and colleagues reported in Science a metamaterial made of "Swiss rolls", tightly wound spirals of insulated conductor that act as strong magnetic resonators, and showed that it could guide radio-frequency flux from a patient to a receiving coil in an MRI scanner. Since then a sizeable literature has explored metamaterial and metasurface inserts that concentrate the radio-frequency field in a region of interest to improve the signal-to-noise ratio of MRI scans. Here the wavelength of the radio signal inside the body is tens of centimetres to metres, the relevant structures are comfortably sub-wavelength, and the requirement is a single frequency set by the scanner's magnetic field. Every condition that made the optical perfect lens impractical is relaxed. The silver superlens also seeded a line of research in lithography. Because the superlens works as a contact printer for one ultraviolet wavelength, it suits exactly the task of transferring a mask pattern into photoresist placed against it. Several research groups, notably in China and the United States, have developed plasmonic lithography systems that use near-field enhancement in metal films and multilayers to print features well below the diffraction limit of the ultraviolet lamps they use, as a potential low-cost alternative to the very expensive extreme-ultraviolet machines used for leading-edge chips. Reviews of the field describe real progress in resolution, alongside persistent challenges in throughput, defects and the uniformity of the extremely thin gaps the method requires between mask and wafer. It is a domain where the superlens's limitations, one wavelength, one polarisation, near-field contact, are part of the specification rather than defects. At microwave frequencies, arrays of parallel wires, studied extensively by Pavel Belov and colleagues, have been used as "endoscopes" that transport near-field detail from one face of a slab to the other with sub-wavelength resolution, a mechanism related to the hyperbolic lens. Again, the frequencies are low, the metals are good conductors, and the bandwidth demanded is narrow. Pendry's paper was correct. A slab with permittivity and permeability of exactly minus one and no loss would form a perfect image. The difficulty is that no causal, passive material can have those parameters across more than a single frequency, and none can have them with zero loss. The perfection was a property of an idealised material, and the idealisation removed precisely the quantities that determine performance in practice. Every real implementation was then a negotiation with loss and bandwidth: accept one polarisation and one wavelength to get the silver superlens; accept a tiny field of view to get the hyperlens; move to radio frequencies to make loss negligible. The reader will see the same structure again. In the next chapter a new theoretical framework, transformation optics, will prescribe materials that make objects invisible. The prescriptions will be exact, and the materials they call for will, like the perfect lens, demand parameters that real structures can reach only at a single frequency and only with loss. The question in each case is not whether the physics is right but what the price is and who can pay it. Hashtags: #MetamaterialsAndCloaking #Metamaterials #ElectromagneticWaves #ElectromagneticCloaking #InvisibilityCloak #TransformationOptics #NegativeRefractiveIndex #NegativeRefraction #ElectromagneticEngineering #WaveManipulation #MaxwellsEquations #Permittivity #Permeability #SplitRingResonators #SubwavelengthStructures #EffectiveMediumTheory #Metasurfaces #Metalenses #FlatOptics #Nanophotonics #OpticalEngineering #PhotonicMetamaterials #Plasmonics #Superlens #Hyperlens #SuperResolutionImaging #AcousticMetamaterials #WavePropagation #OpticalPhysics #AdvancedMaterials
- Managing Diabetes in College (Navigating Dining Hall Diets and Independence with Confidence)
Download the Book (PDF): Introduction On the first night of college, most students worry about roommates, room keys, and whether they packed enough socks. A student with diabetes carries those worries too, and then a second list that nobody else in the hallway can see. Where will the insulin live in a room with a mini-fridge the size of a shoebox? Will the continuous glucose monitor alarm at three in the morning and wake a stranger in the next bed? What is actually in the pasta at the dining hall, and who will notice if something goes wrong at a party on Friday night? Behind all of these questions sits a larger one. For many students with type 1 diabetes, and for a growing number with type 2, diabetes has been a shared project. A parent refilled prescriptions, noticed the drift of a glucose trace, booked the endocrinology appointments, argued with the insurance company, and kept glucose tabs in the car. A pediatric clinic arranged its care around a family. The school nurse had a written plan. Then, over the course of one August drive, much of that scaffolding stays behind in a hometown and the student becomes, for the first time, the person in charge. This book is about that handover, and about doing it well. Its central claim is simple to state and harder to live: independence with diabetes does not mean doing everything alone. It means becoming the manager of a system that works even when you are tired, busy, distracted, sick, or low. The system includes technology, food habits, routines, supplies, paperwork, legal protections, and people. The student who thrives in college is not the one who never has a bad number. It is the one whose system catches the bad number before it becomes a bad night. Why the college years matter The years between roughly 18 and 25 are a well-documented pressure point for diabetes. In the T1D Exchange registry, one of the largest datasets on type 1 diabetes in the United States, mean HbA1c climbed from childhood to a peak in the late teenage years and only drifted back down toward the late twenties. In the 2016-2018 data, only about a fifth of adults were meeting the American Diabetes Association's A1C goal, and diabetic ketoacidosis was most common among adolescents and young adults.[1] Those numbers do not describe a failure of willpower. They describe what happens when the demands of diabetes collide with the most unsettled years of a person's life: new schedules, new food, new social pressures, less sleep, and a care system that is itself in transition. Type 2 diabetes in young people deserves its own attention. It is no longer a condition of middle age. Long-term follow-up of the TODAY study, which enrolled young people diagnosed with type 2 diabetes in adolescence, found that about 60 percent had at least one diabetes-related complication by young adulthood, roughly 15 years after diagnosis.[2] Youth-onset type 2 diabetes appears to progress faster than the adult-onset form, which makes the college years a genuine window in which careful management changes the future. The good news is that students arriving on campus now have better tools than any previous generation. Continuous glucose monitors (CGMs) send readings to a phone every few minutes. Automated insulin delivery systems, sometimes called hybrid closed-loop systems, adjust basal insulin on their own and can quietly prevent many overnight lows and highs. The American Diabetes Association's Standards of Care in Diabetes—2026 broadened its support for CGM use across treatment types and stated that automated insulin delivery should be offered to adults with type 1 or type 2 diabetes who use insulin.[3] Insulin costs have fallen for many people because of federal caps for Medicare and manufacturer programs for others. Federal disability law gives students a clear route to reasonable accommodations. The raw materials for a good system have never been better. What students still need is the know-how to assemble them. Who this book is for The main reader is a college student with type 1 diabetes, whether newly diagnosed or living with it since childhood. Much of the practical material, especially on insulin, hypoglycemia, and ketones, is written with type 1 in mind because that is where the day-to-day demands are heaviest. Students with type 2 diabetes will find their own path through the book: the chapters on the dining hall, exercise, stress, sick days, rights, and insurance apply fully, and the book flags where type 2 management differs, particularly for students on insulin, on medications that can cause lows, or on newer drugs such as GLP-1 receptor agonists. Students with other forms of diabetes, including monogenic diabetes and cystic fibrosis-related diabetes, will find the logistics and rights chapters directly relevant, though their medical plans will come from their own specialists. Parents, residence life staff, coaches, disability services professionals, and friends are the book's second audience. They will find explanations of what the student is managing and, just as usefully, what kinds of help actually help. A parent who understands why a daily phone call asking "What's your number?" can backfire is a better ally than one who does not. How to read it The chapters follow the arc of a student's year. Chapter 1 deals with the handover itself: what moves from parent to student, and how to move from pediatric to adult endocrinology without falling into the gap between them. Chapter 2 covers the numbers and the machines: glucose targets, CGMs, pumps, and automated delivery, and how to keep them running in a dorm. Chapter 3 is the dining hall chapter, the practical heart of the book, on counting carbohydrates when nobody hands you a nutrition label. Chapter 4 addresses hypoglycemia and glucagon, and how to teach the people around you to help. Chapter 5 takes on nights out: alcohol, cannabis, sleep deprivation, and driving. Chapter 6 is about exercise, from intramural soccer to the long walk across campus. Chapter 7 covers sick days, ketones, and mental health, including diabetes distress and disordered eating. Chapter 8 handles rights, accommodations, insurance, and prescriptions. The conclusion draws these threads into an argument about what confidence with diabetes really consists of. Throughout, the book uses short composite scenarios, clearly illustrative rather than case histories of real people, to show how principles play out on an ordinary Tuesday. It also uses a handful of tables where the material is genuinely tabular, such as glucose targets and the levels of hypoglycemia. A necessary note This book is written to inform, not to replace a clinician. It does not prescribe insulin doses, carbohydrate ratios, correction factors, or medication changes, because those are individual and belong in a plan you build with your diabetes care team. When the book mentions numbers such as glucose targets, it draws them from published guidance, chiefly the American Diabetes Association's Standards of Care, and your own targets may reasonably differ. If anything here conflicts with advice from your own team, follow your team and ask them about the difference. And in any emergency, such as a severe low, signs of diabetic ketoacidosis, or thoughts of harming yourself, the answer is never in a book: call 911 or your local emergency number, or in the United States call or text 988 for the Suicide & Crisis Lifeline. With that said, the aim is not caution for its own sake. It is freedom. The student who has a system in place is the one who can say yes to the late study session, the road trip, the semester abroad, and the pickup basketball game, because the plan for when things go sideways already exists. That is what confidence looks like with diabetes: not certainty that nothing will go wrong, but trust in your ability to handle it when it does. Chapter 1: The Handover Consider a first-year student who has lived with type 1 diabetes since she was nine. By any reasonable measure she is experienced. She has changed thousands of infusion sites, counted carbohydrates for most of her life, and could explain an insulin-to-carbohydrate ratio better than many medical students. And yet, three weeks into her first semester, she runs out of CGM sensors. She had always used them; she had never ordered them. The prescription was in her mother's name at the pharmacy portal, the refill went through a mail-order supplier she had never heard of, and the prior authorization had quietly expired over the summer. She spends two days on finger sticks, anxious and annoyed, before the problem is sorted out by phone from four hundred miles away. Nothing about this story involves poor diabetes knowledge. It involves invisible work: the dozens of administrative, logistical, and emotional tasks that surround diabetes and that, for most young people, have been done by someone else. The first job of independence is to make that invisible work visible, then decide deliberately who will do each piece from now on. Two kinds of diabetes work It helps to separate diabetes work into two layers. The first is the clinical layer: checking glucose, dosing insulin or taking medication, counting carbohydrates, treating lows, managing exercise. Most students who have lived with diabetes for years are competent at this layer, though college will test it in new ways. The second is the management layer: keeping prescriptions current, ordering supplies before they run out, understanding insurance, scheduling and attending appointments, arranging lab work, maintaining backup supplies, keeping a glucagon prescription unexpired, filing accommodation letters, and knowing who to call when something breaks. This layer is almost always invisible to the student until the day it fails. Families differ enormously in how they have divided these layers, and there is no single correct arrangement. Some students have managed their own pump settings and appointments since middle school. Others have had a parent do nearly all of it, sometimes because the student was busy and the parent was organized, sometimes out of worry, sometimes simply because nobody ever sat down and renegotiated an arrangement that began when the child was small. What matters for college is not how you got here but whether the division of labor has been made explicit before you leave. A useful exercise, ideally done in the spring or summer before college, is to list every recurring diabetes task and write next to each one who does it now and who will do it in the fall. Table 1 offers a starting framework. It is not a script, and some families will reasonably decide that a parent keeps some tasks, such as holding the insurance policy, for years to come. The point is that every task ends up with a named owner and a first step. Table 1. Mapping the handover: common diabetes tasks and how they shift at college. Task Often done at home by At college, owned by First step before move-in Ordering insulin and supplies Parent Student Log in to pharmacy and supplier accounts yourself Scheduling endocrinology visits Parent Student Book the winter visit before leaving home Watching CGM data Parent, via follow app Student; parent by agreement Agree on follow rules in writing Insurance questions and appeals Parent Shared Carry a photo of the card; learn the plan type Emergency training for others Parent, school nurse Student Pick two people to teach in week one Backup plan for device failure Parent Student Pack pens or syringes and a written backup regimen The follow-app question Few topics cause more friction between students and parents than CGM data sharing. Most modern CGM systems allow the wearer to share readings in real time with "followers" who receive alerts on their own phones. For a parent of a younger child this feature is a blessing. For a parent of an 18-year-old it can become something else: a stream of numbers that invites a text at every high, a call at every low, and a quiet sense on both sides that the student is being supervised rather than supported. There is no universally right answer, but there are better and worse ways to decide. The worse way is to leave the arrangement from high school running unexamined, or for the student to switch it off in September without discussion. The better way is to agree on explicit rules. Some families keep following but agree that the parent will act only on urgent low alerts that last longer than a set time, and otherwise will not comment on numbers. Some agree that the parent will stop following after the first month, or after the first successful semester. Some replace the follow app with a roommate or friend who opts in as a follower for overnight lows, which can be more useful because the friend is physically nearby. Whatever the arrangement, it should be framed around safety rather than performance. The most important thing a remote follower can do is recognize a prolonged, unanswered urgent low and know exactly whom to call: the student, then a named roommate or friend, then the residence hall staff, then campus police or emergency services. That call chain should be written down before the semester starts, with phone numbers, so that a worried parent at two in the morning is not trying to figure out who the resident assistant is. For parents, the harder task is emotional. A high reading after a dining hall dinner is information, not a verdict. Comments about numbers, even kindly meant, can teach a young adult to hide data or to feel judged by a device. Many adult endocrinologists will tell you that the most useful thing a parent can say about a glucose trace is nothing at all, unless asked. Moving from pediatric to adult care Most students with type 1 diabetes, and many diagnosed with type 2 in adolescence, began care in a pediatric endocrinology clinic. Pediatric clinics are built around families: appointments involve parents, educators and social workers are often on site, and the atmosphere is protective. Adult clinics tend to be built around individuals: shorter visits, more expectation that the patient arrives with questions and data, and less proactive outreach when someone misses an appointment. The move between these systems is a well-known danger zone. The American Diabetes Association's position statement on emerging adults, published with endorsements from pediatric and adult endocrinology bodies, described the period of transfer as one in which young people are at risk of being lost to follow-up, and recommended deliberate preparation during adolescence, a written summary passed from pediatric to adult providers, and attention to the psychosocial pressures of the period.[1] The Standards of Care continue to recommend that pediatric teams begin preparing young people for this transition well before it happens.[2] In practice, transitions go wrong in a handful of predictable ways. A student ages out of the pediatric clinic, but the adult clinic has a waiting list of several months. A student at college out of state cannot easily return home for visits, and the local adult clinic is not in the insurance network. A student assumes the pediatric endocrinologist will keep writing prescriptions indefinitely, and discovers at 19 that the clinic no longer can. Each of these failures produces the same result: months without routine care, prescriptions lapsing, and nobody reviewing CGM data with a professional eye. A good transition has a few elements. Ask your pediatric team, at least a year before you expect to transfer, when they plan to hand you on and whom they recommend. Request a transfer summary that includes your diagnosis date, current regimen, device settings, recent A1C results, any complications screening, and any history of severe hypoglycemia or diabetic ketoacidosis. Book the first adult appointment before your last pediatric one, so there is no gap. And decide where your "home" endocrinology practice will be. For students attending college near home, keeping one practice is straightforward. For students far away, the options include keeping a home practice and using telehealth for some visits (subject to state licensing rules, which can restrict a clinician from treating you by video while you are physically in another state), transferring to a practice near campus, or splitting care in a coordinated way. What the adult clinic will expect of you Adult endocrinology can feel abrupt to students used to a pediatric clinic, but it also offers something valuable: a professional relationship in which you are the principal. The clinician is speaking to you, not to your parent, and will usually expect you to lead. That shift is easier with a little preparation. Before each visit, make sure your CGM and pump data are uploading to the clinic's platform or bring the data on your phone. Write down three questions. They can be specific ("My overnight readings drop after I play basketball; what should I change?") or broad ("I am thinking about switching to an automated insulin delivery system; what are my options?"). Know your current regimen well enough to describe it without looking. Bring a list of any prescriptions you need renewed, with the pharmacy you want them sent to. Many young adults also appreciate learning that their visits are confidential. Once you are 18, your parents do not have an automatic right to your medical information. If you want a parent involved, you can sign a release allowing the clinic to speak with them, and many students do this as a practical safety net. If you prefer to keep some matters private, such as questions about sexual health, alcohol, or mental health, you can. A good adult clinician will ask about these subjects, and they are much easier to discuss when you know the conversation stays between you. If you have type 2 diabetes Students with type 2 diabetes face a version of the same handover with some differences worth naming. Many were diagnosed in adolescence by a pediatric endocrinologist and may be treated with metformin, a GLP-1 receptor agonist, basal insulin, or combinations. Some manage with no medication at all. The transition questions are the same: who orders the medication, where the prescriptions go, who the adult provider will be, and how glucose will be monitored. Over-the-counter CGM sensors cleared by the U.S. Food and Drug Administration in 2024 for adults who do not use insulin have made glucose data more accessible for many people with type 2 diabetes, and the 2026 Standards of Care explicitly broadened support for CGM use across treatment types.[2][3] What deserves extra emphasis for type 2 is the speed of the condition in young people. A major review of the NIH-funded youth-onset studies concluded that type 2 diabetes starting in youth follows a more aggressive course than adult-onset disease, with earlier complications.[4] That makes the college years not a time to put diabetes on hold but a time when regular care, including kidney, eye, and blood pressure screening, matters a great deal. It also means that students with type 2 diabetes sometimes face a particular kind of stigma, the assumption that their condition is a matter of personal failing. It is not. Type 2 diabetes in young people is shaped heavily by genetics, family history, and social circumstances, and students deserve the same respect and practical support as anyone else. Packing the system, not just the supplies The traditional college diabetes packing list is useful, and a version appears in several places later in this book. But the deeper preparation is for the system rather than the stuff. Before move-in, a student should be able to answer yes to a short set of questions. Do I have my own login to every pharmacy, supplier, device, and insurance account that matters, and do I know how to request a refill? Do I have at least a month of backup supplies, including a way to take insulin if my pump fails, such as pens or syringes and a written backup plan from my care team? Is my glucagon prescription current and physically in my room? Have I chosen a pharmacy near campus, and has my prescription been transferred there or set up for delivery? Do I know where campus health services is, and what it can and cannot do for diabetes? Have I registered, or at least made contact, with the disability services office? Have I decided with my family how data sharing and check-ins will work? Have I booked my next endocrinology appointment? None of these questions is difficult. What makes them powerful is that each one closes a gap through which a student can fall during the first chaotic weeks of college, when the schedule is new, the sleep is short, and there is no parent in the next room to notice that the sensor box is empty. Finding your people The handover is not only from parent to student. It is also from one support network to another. At home, the network was family, the clinic, perhaps a diabetes camp, perhaps a school nurse. At college, a new network has to be built, and it rarely assembles itself. One strong option is peer support. The Diabetes Link, the national organization formerly known as the College Diabetes Network, runs campus chapters and online resources for young adults with diabetes and has served students on hundreds of campuses.[5] Chapters vary, but the best of them offer exactly what a new student needs: someone who knows which dining hall posts nutrition information, which professor was difficult about accommodations, and how long the campus pharmacy takes to fill a pump supply order. Even students who have never wanted to join a "diabetes group" often find that one conversation with an older student saves weeks of trial and error. The second part of the network is the people you live with. Chapter 4 discusses in detail how to teach roommates and friends to recognize and treat a severe low. For now it is enough to say that one of the most important acts of independence is choosing, early and deliberately, who in your daily life will know about your diabetes. Telling people is not a failure of independence. It is part of building the system. The shape of a good first semester A realistic goal for the first semester is not perfect glucose numbers. It is a working system and a clear view of where it needs adjustment. Many students see their glucose patterns change in the first weeks of college: new food, irregular sleep, more walking, more stress, and alcohol all push in different directions, often at once. It is normal for a regimen that worked at home to need changes, and it is wise to plan an early check-in with your care team, by message or telehealth, about four to six weeks into the term, when those new patterns have emerged in your CGM data. That check-in is the handover's final stage. It is the moment when the student, not the parent, brings the data, describes what has changed, and works with a clinician to adjust. Students who reach that point in their first semester have done something more important than keeping any particular number in range. They have shown themselves that they can run the system. Chapter 2: Numbers, Sensors, and Pumps Diabetes management has always been a matter of numbers, but the numbers have changed. A generation ago, a person with type 1 diabetes might see four or five finger-stick readings a day and an A1C result every three months. A student today wearing a continuous glucose monitor sees a new reading roughly every five minutes, around 288 readings a day, delivered to a phone with arrows showing where glucose is heading. That abundance is a gift and a burden. Used well, CGM data lets a student anticipate lows before they happen, see exactly how the dining hall pizza behaves, and give a clinician a detailed picture of daily life. Used badly, it becomes a source of constant alarms, second-guessing, and anxiety. This chapter explains the main numbers that matter, the technology that produces them, and the practical realities of keeping devices running in a dorm room. It does not tell you which device to use or how to set it, which are decisions for you and your care team. It aims to make you a well-informed user. The numbers that matter A1C and why it is only half the story The A1C test, a measure of how much glucose has attached to hemoglobin in red blood cells, reflects average glucose over roughly the previous two to three months. The American Diabetes Association's Standards of Care suggest an A1C goal below 7 percent for many nonpregnant adults, with room for individual goals that are more or less stringent depending on a person's circumstances, including hypoglycemia risk.[1] For people who can safely reach lower levels without frequent lows, a lower goal may be appropriate. For people with a history of severe hypoglycemia or hypoglycemia unawareness, a less stringent goal is often wiser. The weakness of A1C is that it is an average. Two students can have the same A1C with very different lives: one with steady readings mostly in range, another swinging from frequent lows to long highs. The first is doing well. The second is at risk both of dangerous hypoglycemia and of the long-term effects of high glucose, and the A1C alone would not reveal it. Time in range Continuous glucose monitoring has given clinicians and patients a richer set of measures. The most widely used is time in range, the percentage of CGM readings between 70 and 180 mg/dL (3.9 to 10.0 mmol/L). An international consensus published in 2019, since incorporated into ADA guidance, set out targets for most adults with type 1 and type 2 diabetes, which are summarized in Table 2.[2] The key idea is that the goal is not only to spend a lot of time in range but also to keep time below range very low, because lows are the immediate danger. Table 2. Consensus CGM targets for most adults with type 1 or type 2 diabetes. Measure Glucose range Target share of readings Roughly per day Time in range 70-180 mg/dL More than 70% More than 16 h 48 min Time below range Below 70 mg/dL Less than 4% Less than 1 h Time below range, level 2 Below 54 mg/dL Less than 1% Less than 15 min Time above range Above 180 mg/dL Less than 25% Less than 6 h Time above range, level 2 Above 250 mg/dL Less than 5% Less than 1 h 12 min Source: Battelino et al., International Consensus on Time in Range, Diabetes Care 2019. Individual targets may differ. Two points about these targets are worth making plainly. First, they are goals for a clinician and patient to work toward over time, not a pass-or-fail grade for any single day. A day of travel, illness, or a birthday party can blow any number, and that is fine. Second, a student who improves time in range from 45 percent to 55 percent has made a real clinical improvement, even though the result is still short of the target. Progress counts. Many CGM apps now display these metrics automatically, along with a glucose management indicator, which estimates what A1C might be based on recent CGM data, and a measure of glucose variability. Learning to read your own report, usually summarized as an "ambulatory glucose profile," is one of the most useful skills a student can build. It turns a flood of readings into patterns: the late-night rise after the dining hall closes, the mid-afternoon drop on lab days, the high every Monday morning after a weekend of irregular sleep. The devices Continuous glucose monitors A CGM uses a small sensor inserted under the skin, usually on the arm or abdomen, which measures glucose in interstitial fluid and transmits readings to a phone, a dedicated receiver, a smartwatch, or an insulin pump. Current sensors typically last from about 10 to 15 days depending on the model. The main systems in the United States come from Dexcom, Abbott (the FreeStyle Libre family), and Medtronic, and several over-the-counter sensors cleared in 2024 are aimed at adults who do not use insulin.[3] Because interstitial glucose lags blood glucose slightly, CGM readings can trail reality by several minutes, especially when glucose is changing fast, such as during exercise or after treating a low. That lag is why many clinicians advise confirming with a finger stick when symptoms do not match the reading, when the reading seems implausible, or during the first day of a new sensor, and why every student with diabetes should keep a working meter and unexpired strips even if they rarely use them. The single most important CGM feature for a college student is the alert. A well-set low alert, and especially an urgent low alert, is a safety device. Students sometimes turn alerts down or off because they are annoying, embarrassing in class, or disruptive at night. It is far better to adjust alerts thoughtfully with your care team than to silence them. For example, some students keep an urgent low alert fully enabled at all times while making the high alert less sensitive so that it fires only when readings stay elevated for a sustained period. Most systems let you set alerts to vibrate during the day and sound at night, and some allow a short "snooze" that re-alarms if the problem persists. Consider the sophomore who silences her phone during a long evening exam and then goes straight to a study group. Her CGM notes a falling trend at 9 p.m., but the alert is muted. She notices only when she feels shaky and confused at 10:30. The lesson is not that she was careless; it is that her system had a single point of failure, the phone's silent mode. Many systems allow critical alerts to override the phone's silent setting. Checking that this setting is enabled takes a minute and may matter a great deal. Insulin pumps and automated insulin delivery An insulin pump delivers rapid-acting insulin continuously through a small cannula under the skin, either through tubing from a pager-sized device or from a tubeless "pod" worn on the body. The continuous background delivery (basal insulin) replaces a long-acting injection, and the user gives extra doses (boluses) for food and corrections. The most important change in diabetes technology over the past decade is the arrival of automated insulin delivery (AID) systems, which link a pump to a CGM and use an algorithm to adjust insulin every few minutes based on glucose readings and trends. Systems currently on the U.S. market include the Tandem Control-IQ technology, the Omnipod 5, the Medtronic MiniMed 780G, and the Beta Bionics iLet, among others; the market changes quickly. Most still require the user to announce meals and to bolus for carbohydrates, though some are designed to work with simpler meal announcements. The American Diabetes Association's 2026 Standards of Care state that AID should be offered to adults with type 1 or type 2 diabetes who use insulin.[4] For a college student, AID offers two things of special value. The first is protection overnight, when irregular schedules, alcohol, and late exercise can push glucose in unpredictable directions and when a sleeping student cannot respond. The second is resilience in the face of imperfect carbohydrate counting. An AID system cannot fully rescue a large underestimate at a buffet meal, but it can soften the consequences of small errors, which in a dining hall are inevitable. AID is not magic, and it comes with its own demands. The system depends on a working sensor, a working pump site, and a charged phone or controller. Infusion sites fail, and an occluded or dislodged cannula means that insulin is not being delivered. In type 1 diabetes, a pump failure can lead to rising glucose and ketones within hours, because there is no long-acting insulin on board. This is why every pump user needs a written backup plan from the care team, including how to switch temporarily to injections, and why rapid-acting pens or syringes, and a long-acting insulin prescription for emergencies if the team recommends it, should always be on hand. Injections and multiple daily doses Not every student uses a pump, and pumps are not the only good choice. Many people with type 1 diabetes do well on multiple daily injections of long-acting and rapid-acting insulin, and many prefer the simplicity of pens, especially if they dislike having a device attached to their body. Connected or "smart" insulin pens can record dose times and amounts and, in some cases, pair with CGM data and suggest doses based on settings from the care team. For a student juggling a chaotic schedule, simply knowing when the last dose was given can prevent the dangerous error of dosing twice. Students with type 2 diabetes may take basal insulin alone, oral medications, weekly injectable GLP-1 receptor agonists, or combinations. Each has its own logistics. Weekly injections need a consistent day. Some oral medications need to be taken with food. GLP-1 receptor agonists can reduce appetite and cause nausea, particularly after dose increases, which can make dining hall eating feel different. These are practical questions to discuss with your prescriber, not reasons to change medication on your own. Choosing, or changing, your technology Many students arrive at college with the devices they used in high school, chosen years earlier, sometimes by a parent and a pediatric clinic. College is a reasonable moment to ask whether those choices still fit. A student who picked a tubed pump at age twelve may now prefer a tubeless one that stays out of the way during sports. A student who has resisted a pump for years may find that automated delivery would take much of the overnight worry off a chaotic schedule. A student with type 2 diabetes who has never used a CGM may now qualify for one, or may find that an over-the-counter sensor answers questions a fingerstick meter never could. A few questions help structure the decision. What problem are you trying to solve: overnight lows, post-meal highs, the burden of injections, the anxiety of not knowing? How much do you want to interact with the device, and how much do you want it to work in the background? How will it fit into your life: sports, the shape of your clothes, how you feel about wearing something visible? What does your insurance cover, and through which benefit? And what support is available locally if something goes wrong? Device manufacturers generally offer training and around-the-clock technical support lines, which are worth saving in your phone before you need them. Timing matters. Starting a new pump or AID system involves a learning period, often several weeks of adjustments to settings, and the first days can bring surprises. Few clinicians would recommend switching systems during the first week of college or the week before finals. Winter or summer break, when you are near your care team and your schedule is calmer, is usually a better moment. Insurance approvals for new devices can take weeks, so the process may need to start well before the break itself. Finally, remember that no device is a permanent commitment. People move between injections, pumps, and different AID systems throughout their lives, as technology improves and circumstances change. The right choice for a nineteen-year-old in a residence hall may not be the right choice for the same person at twenty-five in a new job. What matters is choosing deliberately, with good information, and revisiting the choice when your life changes. Keeping the system running Living with devices in a dorm The practicalities of device life at college are unglamorous and important. Storage. Unopened insulin generally belongs in a refrigerator, and the insulin in use can typically be kept at room temperature for a limited number of days specified by the manufacturer. Dorm mini-fridges vary, and some freeze items near the cooling element, which ruins insulin. A cheap refrigerator thermometer and a spot away from the back wall solve most problems. If your room has no refrigerator, disability services can often help arrange one as an accommodation. Power. Pumps, receivers, and phones all need charging. A dead phone at the wrong moment can mean missed alerts, and for some AID systems a dead controller means the automation stops. A small portable battery in your backpack is part of the medical kit, not an accessory. Supplies. Keep a small "go kit" in the bag you carry every day: fast-acting glucose, a spare infusion set or pen needles, a backup insulin pen if you use a pump, and a meter with strips. Keep a larger reserve in your room, and track it. Many students set a calendar reminder to reorder supplies when they open the second-to-last box. Sharps. Used needles, lancets, and infusion sets need a sharps container, not the dorm trash. Many campuses have policies on sharps disposal, and campus health services or residence life can usually tell you where to drop off a full container. Airport and travel. The U.S. Transportation Security Administration permits diabetes supplies, including insulin and liquids needed for medical reasons, through security, though you should tell the officer and follow the device manufacturer's advice about scanners. Carry supplies in your carry-on, never in checked luggage, and bring double what you think you need. When technology fails, or when you need a break Devices fail at inconvenient times. Sensors fall off in the shower or during a soccer game, pumps display error messages, and phone updates sometimes break app connectivity for days. A student who knows how to operate without technology, with a meter, pens, and a written backup regimen, is never more than an inconvenience away from safety. Some students also go through periods of wanting a break from wearing devices at all. This is a real and common experience, sometimes called device fatigue or alarm fatigue. It is worth taking seriously and discussing honestly with a care team rather than simply abandoning the pump or CGM. There are safer ways to take a break, such as a temporary switch to injections with a clear plan for glucose monitoring, and the conversation may also reveal that the problem is not the device itself but the alerts, the site locations, or the feeling of being watched. Those are all fixable. Your data, your partner The final point about technology is that its greatest value lies in what it lets you and your clinician see together. Most modern systems upload data automatically to cloud platforms that your clinic can view. Make sure your devices are linked to your adult clinic's account, not just your old pediatric one. Before an appointment, look at your two-week report yourself. Notice one pattern you want to discuss. That small habit changes the character of the visit, from a clinician reviewing your numbers to two people solving a problem that one of them, you, understands better than anyone. Chapter 3: The Dining Hall Decoded At home, carbohydrate counting usually happens in a controlled environment. The same cereal box sits in the same cupboard; the rice is measured by someone who knows it will need to be counted; the family dinner rotates through a set of familiar meals whose carbohydrate content was worked out long ago. Then comes the dining hall. Twelve stations, a rotating menu, a pasta bar where portions depend on the mood of the server, a dessert table, a soft-serve machine, a stir-fry station where the sauce is ladled on generously, and not a nutrition label in sight. It is all-you-can-eat, open for hours, and shared with friends who can eat anything without doing arithmetic first. It is no exaggeration to say that food is where most students feel the change from home to college most sharply. It is also where the most practical progress can be made, because dining halls, for all their chaos, are highly repetitive. The same dishes return on a cycle, often every week or two. A student who learns the patterns of one dining hall in the first month has solved much of the problem for the rest of the year. This chapter is written for students who count carbohydrates to dose insulin, which is chiefly those with type 1 diabetes and those with type 2 diabetes on mealtime insulin. Students with type 2 diabetes managed without mealtime insulin will find a section addressed to them later in the chapter, but most of the practical advice on reading a dining hall applies to everyone. Estimating without a label Carbohydrate counting in a dining hall is less a matter of precise calculation than of good estimation, and estimation is a skill that improves with deliberate practice. The goal is not to be exactly right. It is to be consistently close, and to learn from the times you are not. Use the information that exists Start by finding out what information your dining service publishes. Many college dining operations now post menus with nutrition information online or through a campus dining app, often including carbohydrate counts per serving. The weakness of this information is the serving size: a listed serving of pasta may be much smaller or larger than what actually lands on your plate. Even so, a published figure gives you a reference point, and it tells you something important about a dish you have never seen before, such as whether a sauce is thickened with sugar or starch. Next, look for the people who hold the knowledge. Most campus dining services employ or contract with a registered dietitian, and many are willing to meet students with diabetes one on one. A dietitian can tell you which dishes use standardized recipes, what the typical portion sizes are at each station, and which items tend to carry hidden carbohydrates. Some will arrange a walk-through of the dining hall. This is an underused resource, and asking for it is entirely reasonable. Dining staff at the stations can also help: the person at the grill knows whether the burger buns are standard size, and the person at the stir-fry station knows whether the sauce contains sugar. Calibrate your eye The most useful single exercise for a new student is calibration. In the first weeks, take a measuring cup and a small food scale, if you have one, and actually measure some of the dining hall's recurring items in your room: a typical scoop of rice, a serving of pasta as you usually take it, a slice of the pizza, a bowl of cereal from the dispenser. Compare what you measure with what you would have guessed. Most people find that their estimates are systematically off in one direction for some foods, often underestimating starches like rice and pasta, which pile up deceptively. After calibration, many students switch to visual anchors. A clenched fist is roughly a cup; a cupped palm is roughly half a cup. These anchors are crude, but with calibration they become personal: you learn that your fist-sized scoop of the dining hall's rice is a particular amount, and you stop guessing from scratch each time. Photographing meals with your phone for a couple of weeks, alongside your CGM trace afterward, can speed the learning dramatically. Some carbohydrate-counting apps also include photo-based estimation features; treat their outputs as a second opinion rather than a verdict, because they share the dining hall's portion-size problem. Build a library of known meals The most powerful long-term strategy is to build a personal library of reliable meals: perhaps ten or fifteen combinations that you eat often, whose carbohydrate content you have estimated carefully, and whose effect on your glucose you have watched on your CGM. The oatmeal with a banana at breakfast. The grilled chicken wrap with a side salad. The stir-fry with a measured scoop of rice. A library does not mean eating the same things every day. It means having a set of meals that you can eat with confidence when you are busy, tired, or distracted, leaving your mental energy for the new dishes you want to try. Keep the library written down, in a notes app or a document. Include not only the carbohydrate estimate but anything you learned about timing. A pasta dish with a creamy sauce may raise glucose slowly over several hours; a bowl of sugary cereal may spike quickly. Over a semester, this record becomes one of the most valuable things you own. Reading the stations Different dining hall stations present different challenges, and a few principles help at each. Table 3 summarizes common stations and the strategies that tend to work. None of these strategies involves doses; the specifics of how and when to dose for particular meals belong in a plan from your care team. Table 3. Common dining hall stations and practical strategies. Station Main challenge Practical strategy Pasta and rice Portion sizes pile up Measure your usual scoop early; plate before dosing Pizza and fried foods Fat delays the rise Watch the CGM for late highs; ask your team about split or extended boluses Stir-fry and sauces Hidden sugar and starch Ask staff about sauces; choose lighter sauce portions Salad bar Dressings, dried fruit, croutons Count the add-ons, not just the greens Cereal and waffles Dispensers and quick absorption Use a bowl you have measured; consider timing Desserts and soft-serve Easy to add after dosing Decide on dessert before you dose, or dose again deliberately The fat and protein problem Some of the most common dining hall foods, pizza, fried chicken, burgers with fries, creamy pasta, and pastries, combine carbohydrates with a lot of fat. Fat slows stomach emptying, which can delay the rise in glucose. Many people with type 1 diabetes notice a familiar pattern: their glucose looks fine for an hour or two after pizza, then climbs steadily late in the evening or overnight. This is not a failure of carbohydrate counting. It is the physiology of mixed meals. Pump users can often address this with bolus features that deliver part of the insulin immediately and the rest over time, sometimes called extended, square-wave, or dual-wave boluses. Those using injections sometimes split a dose. Automated insulin delivery systems will increase insulin as glucose rises, which helps, though they may not fully cover a large, slow rise. How to handle high-fat meals is a strong candidate for discussion with your care team, ideally with a few CGM traces from real dining hall meals to show them. Timing and the buffet In many dining settings, insulin taken some minutes before eating works better than insulin taken at the first bite, because rapid-acting insulins take time to start working. Your care team may advise a particular timing. The difficulty in a dining hall is that you often do not know exactly what you will eat until you have walked the stations. A practical sequence many students use is to walk the dining hall first, fill the plate, sit down, estimate, and then dose, rather than dosing on the way in and building a plate to match. The sequence matters especially for the all-you-can-eat format, where the second trip is always tempting. If you plan on going back for more, it is usually safer to dose for what is on the plate and take additional insulin for the second helping, according to your plan, than to dose generously in advance for food you may not eat. Insulin taken for food that never arrives is a common cause of dining hall lows. Dessert, grazing, and the late-night slice The dining hall is also a social space. Students linger. They drift back for a cookie, then a bowl of cereal, then a scoop of ice cream, over an hour of conversation. This grazing pattern is difficult for insulin dosing, because each small addition may not seem worth a separate calculation, yet together they add up. There is no need to renounce dessert or social eating. The practical answer is to decide deliberately. Some students decide before they dose whether dessert is part of the meal. Others use a rule of thumb: anything eaten more than a short time after the main dose gets its own dose, as their plan allows. Still others find that automated insulin delivery handles small additions well enough for their purposes. What causes trouble is not dessert but uncounted dessert, repeated without noticing. Late-night eating is another campus institution, whether pizza delivered to a study session or a trip to the convenience store at midnight. Late eating adds to the risk of overnight highs, and a correction taken late at night, especially after drinking or exercise, can add to the risk of overnight lows. Neither risk is a reason to skip late food. Both are reasons to keep the CGM alerts on and to think before correcting in the small hours. Beyond counting Not every student with diabetes counts carbohydrates for dosing, and even those who do need more from food than accurate arithmetic. If you have type 2 diabetes Students with type 2 diabetes managed with lifestyle, metformin, GLP-1 receptor agonists, or basal insulin alone generally do not need to count carbohydrates to calculate doses, but the dining hall still matters a great deal. A widely used approach promoted by the American Diabetes Association is the diabetes plate method: fill half of a standard plate with nonstarchy vegetables, a quarter with lean protein, and a quarter with carbohydrate foods, and choose water or other zero-calorie drinks.[1] The dining hall is well suited to this method, because the salad bar, the grill, and the vegetable station usually offer the building blocks. Beverages deserve particular attention. Dining halls often have soda fountains, juice dispensers, sweetened teas, and specialty coffee drinks. Sugary drinks raise glucose quickly and add carbohydrate without making anyone feel full. Replacing them with water, unsweetened drinks, or diet versions is one of the simplest changes a student with type 2 diabetes can make. The same drinks are, of course, excellent treatment for a low in anyone who takes insulin or a medication that can cause hypoglycemia, which is a good reason to know which dispenser has regular juice. Students taking GLP-1 receptor agonists often notice that their appetite is lower and that they feel full sooner. Large dining hall meals may cause nausea or discomfort. Smaller, more frequent meals and slower eating often help. Any persistent vomiting or inability to keep food down is a reason to contact your prescriber, and Chapter 7 discusses sick days in detail. Meal plans, closures, and the stocked room Many colleges require first-year students living on campus to buy a meal plan. For most students with diabetes, the dining hall works well enough with the strategies above. For some, it genuinely does not: for example, a student with celiac disease and type 1 diabetes, a combination that occurs more often than chance, may find the dining hall's gluten-free options insufficient; or a student with gastroparesis may need foods the dining hall rarely provides. In such cases, federal disability law can require the college to make reasonable modifications, which might include specially prepared meals, access to a kitchen, a modified meal plan, or in some cases a release from the plan. The U.S. Department of Justice reached a well-known settlement with Lesley University in 2012 over students with celiac disease and food allergies who were required to buy a meal plan that did not meet their needs, and the case is often cited as a model for dining accommodations.[2] Chapter 8 explains how to request such accommodations. Dining halls also close: on weekends, during breaks, at odd hours during exam periods. A student who relies entirely on the dining hall may find that lunch simply is not available on a Sunday when the hall opens late. Keeping a modest stock of known foods in your room, foods whose carbohydrate content is printed on the package, gives you a fallback that requires no estimation at all. Packaged oatmeal, granola bars, nut butter, crackers, fruit, and shelf-stable milk are common choices. The same stash should include fast-acting glucose for treating lows, kept separate so that it is never eaten as a snack and found missing when it is needed. Food, weight, and a healthy relationship with eating College brings new pressures around food and body image, and diabetes can intensify them. Constant carbohydrate counting can make food feel like a problem to be solved rather than something to enjoy. Some students begin to restrict food or to feel guilty after eating. Some notice that high glucose leads to weight loss, which can create a dangerous temptation to take less insulin than needed. Chapter 7 discusses this in detail, because insulin restriction for weight control is a serious and recognized risk in type 1 diabetes. For now it is enough to say that the goal of dining hall strategy is freedom, not restriction. Eating pizza with friends on a Friday is part of college life, and a student with diabetes should be able to do it. The strategies in this chapter aim to make that possible with less worry and fewer surprises. If food has started to feel like an enemy, or if you find yourself skipping insulin to avoid weight gain, that is a signal to talk with a clinician, and it is nothing to be ashamed of. Consider a first-year student with type 1 diabetes who spends his first month frustrated by unpredictable highs after dinner. He starts photographing his plates and saving CGM screenshots. After two weeks, he notices that the highs come mainly on nights with pasta and pizza and that his estimates for pasta are consistently low. He measures the dining hall's pasta scoop, adjusts his estimates, and brings the pizza traces to a telehealth visit, where his clinician helps him set up an extended bolus pattern for high-fat meals. By the end of the semester his evenings look very different. He did not become a perfect carbohydrate counter. He learned how his dining hall works, and he built a system around it. Hashtags: #ManagingDiabetesInCollege #CollegeDiabetesManagement #DiabetesAwareness #Type1Diabetes #Type2Diabetes #StudentHealth #CollegeWellness #DiabetesSelfManagement #LivingWithDiabetes #DiabetesIndependence #DiningHallNutrition #CarbohydrateCounting #BloodGlucoseManagement #ContinuousGlucoseMonitoring #CGM #InsulinPumpTherapy #AutomatedInsulinDelivery #TimeInRange #HypoglycemiaAwareness #DiabetesTechnology #DiabetesMealPlanning #HealthyEatingOnCampus #DiabetesEmergencyPreparedness #DiabetesAndExercise #DiabetesMentalHealth #DiabetesDistress #CollegeHealthServices #DiabetesAccommodations #TransitionToAdultCare #DiabetesConfidence
- Generative Video and 3D AI (NeRFs and Diffusion for Visual Media)
Download the Book (PDF): Introduction In February 2024 OpenAI published a handful of short clips made by a model it called Sora. A woman in a leather jacket walked down a rain-slicked Tokyo street lined with neon signs; woolly mammoths kicked up snow in a meadow; a drone shot swept along a cliffside coastline. None of it had been filmed. Each clip had been produced from a paragraph of text, and several ran close to a minute. The reaction in the film and advertising industries was immediate and, in places, close to panic. Within days the American producer Tyler Perry said publicly that he had put an expansion of his Atlanta studio on hold after seeing what the system could do. Twenty-six months later OpenAI shut the Sora app down. The company announced in March 2026 that the consumer service would close at the end of April and the developer interface in September, and that the work would continue as a research effort on what it called world models. The technology had not failed. Competing systems from Google, Kuaishou, Alibaba, ByteDance, Runway and others were by then producing clips sharper and longer than the ones that had caused the panic, some with synchronised dialogue and sound. What had become clear was something subtler: making convincing moving pictures from text is a remarkable trick, but it is not, by itself, the same thing as automating visual production. This booklet is about the gap between those two things, and about the second, quieter technology that has been closing it. Two kinds of machine Two families of methods have reshaped how images of the world can be made by computer since 2020. They grew up in different research communities, solve different problems, and are usually discussed separately. They belong together. The first family reconstructs. Neural Radiance Fields, introduced in 2020, showed that a small neural network could be trained on a few dozen photographs of a real scene and then render that scene from viewpoints no camera had occupied, with reflections, translucency and fine detail that traditional photogrammetry struggled to capture. Within three years the idea had been reworked into 3D Gaussian Splatting, which does the same job in real time on ordinary graphics hardware. These methods do not imagine anything. They measure. What they produce is a persistent three-dimensional scene, something you can walk around inside, revisit tomorrow, and view from any angle without it changing. The second family generates. Diffusion models learn to turn random noise into images by reversing a gradual process of corruption, and they became the engine behind nearly every image and video generator of the 2020s. Extended through time, they produce video; guided by text, they produce video of whatever the prompt describes. These methods imagine everything. What they produce is a sequence of pixels: vivid and often physically plausible, but with no underlying object that persists when the camera turns away. Ask for the same character in a second shot and you get a cousin, not the same person. Each family has what the other lacks. Reconstruction gives persistence and control but no imagination; it can only show you what was photographed. Generation gives imagination but no persistence; it can show you anything, once, from one angle, and then forget it. The most interesting developments of the last three years, from text-to-3D asset generators to the interactive world models that research labs are now chasing, are attempts to combine the two: to use diffusion's imagination to fill a representation that behaves like a real, stable, three-dimensional world. The argument of this book The controlling claim of this booklet is that generative AI automates visual production only to the degree that it gives back what pixels alone lack: a persistent, controllable, three-dimensional state. Raw image quality, the thing that made the first text-to-video demonstrations so startling, turns out to be the easier half of the problem. The harder half, the one that decides whether a tool can be used to make a film, a game or a virtual-reality experience rather than a one-off clip, is whether the thing it generates can be revisited, edited, measured, lit, animated and handed to the next person in the pipeline. That claim explains a great deal that otherwise looks puzzling. It explains why professional studios adopted Gaussian splatting for set capture faster than they adopted text-to-video for final shots. It explains why the most useful video models now accept reference images, camera paths and depth maps as inputs rather than text alone. It explains why game developers greet image-to-3D generators with interest and then spend hours repairing the output. And it explains the direction the field is now heading, toward models that hold an explicit or implicit scene in memory and render it, rather than models that hallucinate each frame from scratch. How the book is built The first chapter sets out the problem: what traditional visual production actually involves, why it is so expensive, and why the choice of representation, pixels or geometry, is the central decision in automating it. The next two chapters cover reconstruction. Chapter 2 explains Neural Radiance Fields from first principles: how a scene can be stored as a function, how volume rendering turns that function into an image, and why the approach was both a breakthrough and impractical. Chapter 3 follows the move to Gaussian splatting and the capture economy it has created, from film sets and heritage sites to real-estate tours and headset-based virtual reality. Chapters 4 and 5 cover generation. Chapter 4 explains how diffusion works, in enough depth that the reader can reason about its strengths and failure modes. Chapter 5 adds time: how video diffusion models are built and trained, what changed between 2022 and 2026, and why consistency remains their defining weakness. Chapter 6 is where the two families meet, in the generation of 3D assets from text and images. It traces four successive approaches, from optimising a radiance field against an image model to native 3D diffusion, and is candid about why a beautiful generated object is often still not a usable game asset. Chapter 7 takes all of this into real pipelines: film previsualisation and virtual production, game development, and virtual and mixed reality. It asks where automation has actually landed and where it has not. Chapter 8 deals with the questions that now constrain every deployment: training data and copyright, provenance and labelling under new law, and the terms on which performers and artists work alongside these systems. The conclusion draws out what follows. If persistence and control are the real bottleneck, then certain investments, skills and standards matter far more than the headline model releases suggest, and certain fears and hopes are misplaced. What this book does not do It does not rank products. The field moves too fast for that, and any list of the best text-to-video tool would be out of date before it was printed. Where specific systems are named, it is because they mark a genuine turn in how the problem is approached, not because they are recommended. Nor does the book teach any particular software. It aims instead to give the reader a working mental model of how these systems function, deep enough to judge new announcements on their merits and to see where a given tool will and will not fit. The book assumes no mathematics beyond the idea that a function takes an input and returns an output, and no prior knowledge of computer graphics. Where technical terms are unavoidable they are defined where they first appear, and a short glossary at the back collects the ones that recur. One more note on timing. This book was written in late 2026, a period in which major model releases arrived every few weeks. The specific capabilities described will be overtaken. The underlying distinction, between systems that imagine pixels and systems that hold a world, will not, and it is the more useful thing to understand. Chapter 1: Pixels and Worlds Every image a computer shows you was produced by one of two strategies. Either the computer stores the picture itself, as a grid of coloured dots, or it stores a description of a world and computes what that world would look like from a particular point of view. A photograph on your phone is the first kind. A frame of a video game is the second. The distinction sounds technical, and it is, but it governs almost everything about what can be done cheaply and what remains expensive in visual production. It is also the right lens through which to understand what generative AI has and has not automated. What a production pipeline actually does Consider what it takes to produce a single shot in a contemporary effects-heavy film: a spaceship landing on an alien plain at dusk, say, with the hero walking out of the hatch. The work divides into stages that have remained recognisable for three decades even as the tools changed. Someone has to design the ship and the landscape, usually in drawings and paintings. A modeller then builds the ship as a mesh, a surface made of thousands or millions of small polygons stitched together at shared corners. Each polygon must be laid out flat onto a two-dimensional texture map, a step called UV unwrapping, so that a texture artist can paint colour, roughness, metallic sheen and small surface bumps onto it. Those painted maps describe how light interacts with every point on the surface, and in the physically based rendering systems that became standard in the 2010s they follow consistent physical rules so that the ship looks right under any lighting. If anything moves, a rigger builds an internal skeleton and defines how the surface deforms when the skeleton bends. Animators then pose that skeleton frame by frame, or clean up motion captured from a performer. Layout artists decide where the camera goes. Lighters place virtual lights. Effects artists simulate the dust kicked up by the landing gear. A renderer then computes, for every pixel of every frame, how light from those sources would bounce around the scene and reach the camera, a calculation that for a feature film can take hours of computer time per frame. Compositors combine the rendered layers with live-action plates of the actor, who was filmed against a blue screen or, increasingly, in front of a wall of LED panels displaying the environment in real time. Games follow a similar path with one decisive difference: the final rendering happens on the player's machine, sixty or more times a second, so every asset must be built to a strict budget of polygons, texture memory and shader complexity. A game character is often made twice, once in extravagant detail and once as a lean version onto which the detail is baked as texture. Virtual and mixed reality tighten the budget further. A headset must render two views, one per eye, at high frame rates, typically seventy-two to one hundred and twenty frames per second, because dropped frames in a headset cause discomfort rather than mere annoyance. The labour involved is enormous. Credits on major effects films routinely list well over a thousand visual effects artists. Large games can take five years or more and employ hundreds of people. A great deal of that labour goes into building the world description, the meshes, textures, rigs and layouts, rather than into the final image. Two strategies, two economies The pipeline just described is a world-first strategy. Its expensive output is not an image but a scene: a structured description of objects, materials, lights and cameras from which any number of images can be computed. That is why it costs so much up front and so little at the margin. Once the ship exists, rendering it from a new angle, in different weather, or in a sequel costs computer time, not artist time. Once a game level exists, a million players can each walk through it along a different path. The image-first strategy works the other way. A painting, a photograph or a frame of hand-drawn animation is cheap to start and expensive to vary. Want the same scene from the other side of the room? Paint it again. Want the character to turn her head? Draw another frame. Traditional animation studios employed armies of in-betweeners precisely because the image-first strategy offers no shortcut between one picture and the next. For most of the history of computer graphics, the world-first strategy won wherever variation mattered, which is to say in almost every commercial use. The reason was not that it produced better pictures. Painted matte backgrounds were, for decades, more convincing than rendered ones. The reason was persistence. A scene description persists: it holds its identity across views and across time. It can be edited in one place and the change propagates to every frame. It can be measured, so that a virtual camera matches a real one. It can be handed from a modeller to a rigger to an animator to a lighter, each adding a layer without disturbing the others. An old tension, not a new one The tension between the two strategies predates machine learning by decades, and its history is instructive. In the mid-1990s a branch of graphics research called image-based rendering set out to escape the cost of building scene descriptions by working directly from photographs. Apple's QuickTime VR, released in 1995, let users look around a scene by stitching photographs into a panorama, but only from the single point where the camera had stood. In 1996 Marc Levoy and Pat Hanrahan at Stanford, and in parallel a team at Microsoft Research, described the light field: a record of the light travelling in every direction through every point in a region of space, captured with dense arrays of cameras. From a light field, new views could be computed without any geometry at all. The idea was beautiful, and it ran straight into the problem of scale. A useful light field required thousands of images and enormous storage, and the viewer could not stray far beyond the volume the cameras had sampled. In the same year Paul Debevec, then a doctoral student at Berkeley, took a middle path in a system called Façade. An operator built a crude geometric model of a building from a few simple blocks, and the software refined the blocks and projected photographs onto them, so that the photographs supplied the realism and the geometry supplied the ability to move. Variations of that hybrid, rough explicit structure dressed with photographic appearance, became a staple of visual effects, used for the virtual cityscapes and camera moves of countless films over the following decades. The lesson that research community learned the hard way is the lesson of this book in miniature. Pure image-based approaches were cheap to start and limited in freedom; pure geometric approaches were free but expensive; the practical sweet spot lay in a representation that kept just enough structure to support the moves production needed. Neural reconstruction and generative models have changed the costs on both sides dramatically. They have not abolished the trade-off. One shot, two ways It helps to make the trade-off concrete. Return to the spaceship landing at dusk and imagine a director asking for three changes after seeing the first version: a lower camera angle, the sun a little further below the horizon, and a second ship landing in the background. In the world-first pipeline, the first request means moving the virtual camera and re-rendering; the second means moving a light and re-rendering; the third means duplicating the ship asset, placing it, perhaps adjusting its animation, and re-rendering. Each change costs computer time and some artist time, but none requires rebuilding anything. The ship that appears in the new angle is, by construction, the same ship. The dust still kicks up from the same landing gear. In a pure image-first pipeline built on a text-to-video generator, every one of those requests means generating a new clip. The new clip will have a lower camera if the prompt is followed, but the ship's design may drift, the landscape may rearrange itself, and the hero may arrive in a slightly different costume. Achieving the second ship without disturbing the first is, in most current tools, a matter of repeated attempts and luck. The cost of each attempt is small; the cost of converging on exactly what the director wants can be large, and sometimes the target cannot be reached at all. Neither column is free. But the costs fall in different places, and the image-first costs grow with every requirement for consistency. A thirty-second advertisement with no recurring elements suits the image-first approach well. A two-hour film with a recurring cast suits it badly. Most real productions sit somewhere between, which is why most real productions, as Chapter 7 shows, now use both. Where generative AI enters Generative image and video models, as they emerged in the early 2020s, are image-first machines of extraordinary power. A model such as Stable Diffusion, released publicly in August 2022, takes a text description and produces a grid of pixels. Video models extend that grid through time. Nothing in their output corresponds to a ship with a fixed shape, a material with fixed properties, or a camera with a known position. The model has learned statistical regularities about how such things look in photographs and films, and it reproduces those regularities convincingly. But ask for the same ship from behind, and the model must imagine it afresh, with no guarantee that the result is the same ship. This is not a minor defect awaiting a patch. It follows from what the model is. A model trained to produce pixels that look like the training data will produce pixels that look like the training data. Consistency across shots arises only to the extent that the model has somehow learned to represent, internally, the persistent structure that consistent images share. Some of the most interesting research of the last three years, discussed in Chapter 5, suggests that large video models do learn a surprising amount of such structure. But it remains implicit, buried in billions of numerical weights, and therefore hard to inspect, edit or guarantee. Neural reconstruction methods sit at the other pole. A Neural Radiance Field, the subject of Chapter 2, is trained on photographs of one specific scene and learns to represent that scene so faithfully that it can render new views of it. It is world-first in the strongest sense: what it stores is the scene, and images are computed from it. But it has no imagination at all. It cannot add a ship that was not photographed. Its descendants, such as Gaussian splatting, are faster and more practical, but share the same character. They capture worlds; they do not invent them. The real prize, and the subject of much of this book, is to get both properties at once: a system that can invent a world from a description and then hold it steady, so that every subsequent image is computed from the same underlying state. Text-to-3D asset generators are one attempt at this. So are the interactive world models that several laboratories have demonstrated since 2024, which generate an explorable environment frame by frame while trying to remember what lies behind the viewer. Representation is the decision It helps to be precise about what "a representation of a scene" can mean, because the vocabulary of the field turns on it and because the choice determines what automation is possible. A mesh is an explicit surface: a list of points in space and a list of the triangles or quadrilaterals that connect them. Meshes are what game engines, modelling tools and film renderers are built around. They are compact, editable, and support fast rendering through a process called rasterisation, in which each triangle is projected onto the screen and filled in. Their weakness is that many things in the real world are not well described by clean surfaces: hair, smoke, foliage, fur, glass, the fuzzy edge of a wool sweater. A point cloud is a set of coloured points sampled from surfaces, the raw output of a laser scanner or of photogrammetry software. It is easy to capture and hard to use, because it has no surface between the points. A voxel grid divides space into small cubes, like three-dimensional pixels, each of which may store density and colour. Voxels handle fuzzy and volumetric material naturally but consume memory in proportion to the cube of the resolution, which becomes prohibitive quickly. A neural field stores a scene as a function, computed by a neural network, that returns properties such as density and colour for any point in space you ask about. It is continuous rather than gridded, can be remarkably compact, and handles view-dependent effects such as reflections gracefully. It is also slow to query and difficult to edit, since the scene is distributed across the network's weights. A Gaussian splat representation stores a scene as millions of small, semi-transparent, coloured ellipsoids. It sits between point clouds and volumes, and it can be rendered very fast. Chapter 3 explains why this hybrid became the practical winner for captured scenes. Finally, a latent representation is a compressed internal code that a neural network uses to describe an image, a video or a 3D object. It is not designed for humans to read; it is designed for a model to generate efficiently. Most modern generative models, whether they produce images, video or 3D, work in a latent space and decode to pixels or geometry only at the end. Every automation story in this book is a story about moving between these representations. NeRFs move from photographs to a neural field. Splatting moves from photographs to Gaussians. Video diffusion moves from text to a video latent to pixels. Text-to-3D moves from text to images to a field or latent to a mesh. And in every case, the question that decides whether the result is useful in production is whether it lands in a representation that the next stage of the pipeline can work with. The tests that matter Because of this, judging a generative visual system by how good its sample outputs look is like judging a building material by how it photographs. The questions practitioners ask are different, and they will recur throughout this book. Can the output be revisited? If a director likes a generated shot and wants a reverse angle, can the system provide one that matches? If a game designer likes a generated rock, can it be rendered from every side? Can it be edited locally? If the colour of one character's coat is wrong, can it be changed without the whole shot shifting? Pixel-generating systems traditionally fail this test badly, because changing the prompt regenerates everything. Can it be measured and matched? Can a generated environment be aligned with a real camera's lens and position so that a live actor can be composited in? Can a generated object be scaled correctly relative to a human character? Can it be lit? Can the object or scene respond correctly when the lighting changes, or is its lighting baked into its colours, so that a sunlit statue stays sunlit when moved into a cave? Can it be animated? Does the generated character have a skeleton, or at least a surface clean enough to rig? Does a generated face have a mouth that opens? Can it be handed on? Does the output arrive in a format that existing tools read, with the structure, naming and scale conventions that the next artist expects? A system that passes these tests is a production tool even if its images are merely good. A system that fails them is a source of reference material, mood boards and occasional final shots, however spectacular its images. Most of the progress described in the rest of this book can be read as progress on these tests rather than on raw visual fidelity. Why this matters now It would be convenient if this distinction were a historical curiosity, settled by some breakthrough. It is not. The most capable systems of 2026 still divide roughly along this line, and the companies building them are making expensive bets about which side will win, or how the two will merge. One camp argues that sufficiently large video models will learn world structure implicitly, that consistency and control will emerge from scale in the way that grammar emerged in large language models, and that explicit 3D representations are a crutch to be discarded. The decision to rebrand Sora as a world-model research project points in this direction, as does Google DeepMind's Genie line of interactive environment generators, which produce explorable worlds frame by frame without any explicit geometry. The other camp argues that explicit structure will remain indispensable wherever control matters, and that the right architecture uses generative models to produce explicit 3D content, meshes or splats or structured latents, which conventional engines then render. The rapid growth of image-to-3D generators, and the decision by the Khronos Group, the consortium behind the glTF file format used across the 3D industry, to standardise how Gaussian splats are stored, point in this direction. The honest position is that both camps are partly right, and that the most productive systems now use both: generative models to imagine, explicit representations to hold. The chapters that follow explain the machinery on each side well enough for the reader to judge the trade-offs, starting with the method that first showed a neural network could hold a real world. Chapter 2: A Scene Stored as a Function In the spring of 2020 a team of researchers from the University of California, Berkeley, Google Research and the University of California, San Diego posted a paper with a modest title: "NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis." Ben Mildenhall, Pratul Srinivasan, Matthew Tancik and their co-authors showed results that people working in computer vision found hard to believe. From around a hundred photographs of a Lego bulldozer, a potted fern, or a pirate ship model, their method produced smooth, sharp, photorealistic fly-around videos from viewpoints no camera had occupied. Reflections slid across shiny surfaces correctly as the viewpoint changed. The fine fronds of the fern stayed crisp. The paper won an honourable mention for best paper at the European Conference on Computer Vision that year, and within two years it had been cited thousands of times. The task NeRF solved is called novel view synthesis: given images of a scene from some viewpoints, produce images from others. It was not a new problem. Photogrammetry, the craft of reconstructing 3D geometry from overlapping photographs, had been used in surveying and cultural heritage for decades and in film and games since the 2010s. What was new was the representation and the quality it unlocked. The idea: ask the scene a question Traditional photogrammetry works by finding the same small features, a corner, a spot, a crack, in multiple photographs, using the differences in their positions to triangulate where those features sit in 3D, and then fitting a mesh surface through the resulting points. It works well on matte, textured, solid objects. It struggles with anything that lacks distinctive features (a white wall), that looks different from different angles (a polished car door), that has no clear surface (hair, leaves, smoke), or that is partly transparent (a glass of water). NeRF does not try to find a surface at all. Instead it represents the scene as a function that can answer one question about any point in space: if you were looking at this point from this direction, how dense would the material here be, and what colour light would it send toward you? The function takes five numbers as input: three for the position of the point in space and two for the direction of view. It returns four: a density, which says how much the point blocks light, and three colour values for red, green and blue. Density depends only on position, since a solid wall is solid whichever way you look at it. Colour depends on both position and direction, which is what allows the representation to capture reflections and sheen, effects that change as you move. This function is computed by a neural network, specifically a multilayer perceptron, the simplest kind: a stack of layers, each of which multiplies its input by a matrix of learned numbers and applies a simple non-linear operation. In the original NeRF the network had around a million learned parameters, which made the stored scene, measured in megabytes, smaller than the photographs it was trained from. Rendering by marching through fog Having a function that tells you density and colour everywhere does not, by itself, give you a picture. To make an image from a chosen viewpoint, NeRF uses an old technique from scientific visualisation and medical imaging called volume rendering. Imagine looking through one pixel of a virtual camera into the scene. Trace a ray from the camera through that pixel and out into the world. Along the ray, pick a series of sample points, perhaps a hundred or two. At each one, ask the network for the density and colour. Now treat the scene as a kind of coloured fog. Near the camera, where there is empty air, density is close to zero and the samples contribute nothing. When the ray reaches the surface of an object, density rises sharply, and the colour at that point dominates what the pixel shows. Points behind the surface contribute little, because the material in front has already absorbed most of the light. The arithmetic is straightforward: walk along the ray, keep track of how much light has been blocked so far, and add up each sample's colour weighted by how dense it is and how much light still gets through to it. The result is the colour of the pixel. Repeat for every pixel and you have an image. The crucial property of this procedure is that every step of it is differentiable, which means that for any rendered pixel you can calculate how a tiny change to each of the network's parameters would change that pixel's colour. This is what makes training possible. Learning a scene from photographs To train a NeRF you need photographs of a scene and, for each one, the precise position and orientation of the camera that took it. The camera positions are usually recovered with a structure-from-motion program, most often the open-source tool COLMAP, which uses the same feature-matching techniques as photogrammetry but only to work out where the cameras were, not to build the final model. Training then proceeds by repetition. Pick a random batch of pixels from the training photographs. For each pixel, trace the corresponding ray through the scene, render its colour using the current network, and compare the rendered colour with the true colour in the photograph. Adjust the network's parameters slightly to reduce the difference. Do this hundreds of thousands of times. What emerges is remarkable. Nothing in the procedure tells the network where the surfaces are, what is solid and what is air, or which way light reflects. The network is only ever asked to reproduce the photographs. But the only way to reproduce a hundred photographs taken from different positions, all through one consistent function, is to arrange density and colour in 3D roughly as they are in the real scene. Geometry emerges as a by-product of consistency. This is the deep lesson of NeRF, and it recurs in later chapters: a model forced to be consistent across many views is forced to learn something like the world. Two tricks that made it work The basic recipe, a network plus volume rendering, had been tried in various forms before 2020 without producing sharp results. Two design choices in the NeRF paper made the difference. The first is positional encoding. Neural networks of the kind NeRF uses have a known bias: they learn smooth, slowly varying functions easily and sharp, rapidly varying ones with great difficulty. A network fed raw coordinates produces blurry scenes. The NeRF authors fed the network not the raw coordinates but a set of sine and cosine waves of those coordinates at many frequencies, from slow undulations to rapid oscillations. This gives the network ready-made building blocks for sharp edges and fine texture. A companion paper by several of the same authors, on what they called Fourier features, explained mathematically why this works. The second is hierarchical sampling. Most of any scene is empty space, and sampling it evenly wastes effort. NeRF trains two networks: a coarse one, sampled evenly along each ray, and a fine one, sampled densely where the coarse network found material. Effort is concentrated where it matters. What NeRF could not do For all its quality, the original NeRF was a research result, not a tool. Its limitations shaped the next three years of work. It was slow to train. A single scene took one to two days on a high-end graphics card. It was slow to render. Each pixel required hundreds of network evaluations, so a single high-resolution frame took tens of seconds or more. Interactive viewing, let alone virtual reality at ninety frames per second, was out of the question. It assumed a static world under fixed lighting. Anything that moved during capture, a person walking past, a cloud changing the light, produced ghostly artefacts, because the network tried to explain inconsistent photographs with one consistent scene. It worked best on bounded scenes with the camera circling an object. Unbounded outdoor scenes, where the background stretches to the horizon, gave it trouble. It was hard to edit. The scene lived in the network's weights, distributed across all of them, so there was no simple way to move a chair, delete a lamp or recolour a wall. And it produced no mesh. Production software built around surfaces could not use a NeRF directly. Surfaces could be extracted from the density field, but they were usually lumpy and lost much of what made the NeRF look good. The flood of improvements Because the core idea was simple and the code was released openly, NeRF set off one of the largest bursts of follow-up research computer vision has seen. A few strands matter for understanding where the field ended up. Speed came first. In 2021 and 2022 several groups showed that the slow part, the large neural network, could be largely replaced by an explicit data structure. Plenoxels, from Berkeley, dropped the network entirely and stored density and colour on a sparse voxel grid, reaching comparable quality in minutes. The decisive result came from Thomas Müller and colleagues at NVIDIA, whose 2022 paper on Instant Neural Graphics Primitives introduced a multiresolution hash encoding. In place of fixed sine waves, each point in space looks up learned feature vectors in a set of hash tables at different resolutions, and a tiny network turns those features into density and colour. Training time dropped from hours to seconds or minutes, and the paper's demonstration, in which a scene sharpened into focus almost as fast as a viewer could watch, made neural fields feel suddenly practical. The work received a best paper award at SIGGRAPH 2022, the field's main conference, and the accompanying code became a standard tool. Quality and scale came next. Jonathan Barron and colleagues at Google produced a series of refinements: mip-NeRF, which reasoned about each pixel as a cone rather than a thin ray to eliminate aliasing artefacts; mip-NeRF 360, which handled unbounded outdoor scenes by warping distant space into a bounded region; and Zip-NeRF, which combined these ideas with hash-grid speed. Block-NeRF, from Waymo and Google, stitched many NeRFs together to reconstruct several city blocks of San Francisco from vehicle-mounted cameras. NeRF in the Wild, also from Google, learned to separate a scene's fixed geometry from changing lighting and from transient objects, so that tourist photographs of a landmark, taken at different times by different people, could be combined into one model. Motion came too, in work that added time as an extra input or learned how each point moved from a canonical pose, so that dynamic scenes such as a person talking could be captured. These dynamic methods remained more fragile than static ones and still are. Practical tooling followed. Nerfstudio, an open-source framework from Berkeley released in 2023, packaged the best ideas into a usable pipeline, with a default method called Nerfacto that traded a little quality for robustness on real-world captures. Commercial apps such as Luma AI and Polycam let anyone capture a NeRF with a phone. Industry adoption arrived quietly. Google announced in 2023 that its Immersive View feature in Google Maps used neural radiance fields to turn photographs of restaurant and shop interiors into fly-through previews. Visual effects houses began experimenting with NeRF captures of sets and locations, and robotics and autonomous-driving groups adopted neural fields to build realistic simulation environments from real driving logs. What a good capture requires The quality of any reconstruction, NeRF or its successors, depends far more on the photographs than newcomers expect, and the reasons follow directly from how the method learns. Because the scene is recovered by demanding consistency across views, anything that makes the views inconsistent damages the result. The camera positions must be known precisely. A structure-from-motion program can only work out where the cameras were if consecutive photographs overlap heavily, commonly by well over half, and share plenty of distinctive detail. Blank walls, repeating patterns such as tiled floors, and shiny surfaces confuse it. When the recovered positions are slightly wrong, the network tries to reconcile photographs that do not truly agree, and the result is blur or doubled edges. Several follow-up methods learn to correct the camera positions during training, which helps but does not rescue a poor capture. Exposure and focus must be stable. If the camera automatically brightens as it turns toward a window and darkens as it turns away, the network sees the same wall in two different colours and must invent some explanation, usually a haze floating in mid-air. Professional capture teams therefore lock exposure, white balance and focus, and shoot with enough light to avoid motion blur. Coverage must match the intended use. A NeRF can render convincing views between and near the captured positions but degrades rapidly beyond them. An object to be seen from all sides must be photographed from all sides, at several heights. A room to be walked through must be captured along the paths a viewer will take, with attention to the corners and the undersides of furniture. What the cameras did not see, the reconstruction does not know, and unlike a generative model it will not guess plausibly. The scene must hold still. People, pets, moving foliage, passing cars and changing clouds all violate the assumption of a static world. Methods descended from NeRF in the Wild can learn to ignore some transient objects, but the cleanest results still come from empty, stable scenes. These requirements explain why capture became a craft rather than a button. They also explain why the most robust consumer apps guide users in real time, showing which areas have been covered and warning when movement is too fast, and why professional capture of sets and locations is now done by dedicated specialists on many productions. How quality is judged Research papers in this field report quality with a small set of numbers that are worth recognising, because product announcements borrow them. Each is computed by holding back some of the captured photographs, rendering the reconstruction from those held-back viewpoints, and comparing. Peak signal-to-noise ratio, or PSNR, measures pixel-by-pixel error on a logarithmic scale, so higher is better, and a difference of one or two units is visible. Structural similarity, or SSIM, compares local patterns of brightness and contrast rather than individual pixels and tracks human judgement somewhat better. LPIPS, a learned perceptual metric introduced in 2018, compares images using the internal features of a neural network trained on images and correlates best with what people notice, so lower is better. All three share a limitation that matters for production. They measure how well the reconstruction reproduces views close to the captured ones, which is exactly the situation in which reconstructions are strongest. They say little about how the scene behaves when the viewer wanders off the captured path, which is often what a game designer or headset user will do. Benchmark gains of a fraction of a unit can be scientifically real and practically irrelevant, and a method that scores slightly lower but fails more gracefully away from the cameras may be the better tool. What NeRF changed, and what it left undone By 2023 NeRF had established three things that the rest of this book relies on. It proved that differentiable rendering, the ability to compute how a change to a scene representation would change a rendered image, is a powerful way to recover 3D structure from 2D images. Every method in Chapter 3 and most of those in Chapter 6 use this principle. It proved that a learned, continuous representation could capture appearance that defeated mesh-based photogrammetry: reflections, translucency, thin structures, soft edges. Photorealism in reconstruction stopped being limited by how well a surface could be fitted. And it reframed what "a 3D model" could mean. Before NeRF, a 3D model in production almost always meant a mesh. After it, a 3D model could be a field, a grid, or, as the next chapter shows, a cloud of soft blobs, chosen according to what the next stage needed. What NeRF left undone was speed at display time. Even the fast variants needed to evaluate something at many points along every ray, every frame. For a film, where frames can be rendered offline, that was tolerable. For a game or a virtual-reality headset, it was not. The method that solved this problem, and that turned neural reconstruction from a research topic into an industry within two years, abandoned the ray-marching approach entirely. It is the subject of the next chapter. Chapter 3: From Fields to Splats In August 2023 a paper from Inria, the French national research institute for digital science, and the Max Planck Institute for Informatics was presented at SIGGRAPH under the title "3D Gaussian Splatting for Real-Time Radiance Field Rendering." Its authors, Bernhard Kerbl, Georgios Kopanas, Thomas Leimkühler and George Drettakis, showed reconstructions that matched or beat the best neural radiance fields in visual quality while rendering at well over a hundred frames per second at high-definition resolution on a single consumer graphics card. Training took tens of minutes rather than hours. The method spread faster than NeRF had. Within a year there were splat viewers for web browsers, plug-ins for Unreal Engine, Unity and Blender, phone apps that captured splats directly, and hundreds of follow-up papers. By February 2026 the Khronos Group had published a release candidate of an official extension to glTF, the most widely used open format for exchanging 3D content, to store Gaussian splats. Neural reconstruction had gone from a research curiosity to an industry format in under three years. A cloud of soft blobs The idea behind Gaussian splatting is to keep NeRF's insight, that a scene can be learned by making rendered images match photographs, while discarding the expensive part, evaluating a function at hundreds of points along every ray. Instead of a function, the scene is represented explicitly as a large collection of three-dimensional Gaussians. A Gaussian, named after the mathematician Carl Friedrich Gauss, is the familiar bell-curve shape extended into three dimensions: a soft ellipsoid that is densest at its centre and fades smoothly toward its edges. Each Gaussian in a splat scene carries a handful of properties. It has a position in space. It has a shape, stored as three scale values and a rotation, which lets it be a round puff, a flat disc, or a long thin needle. It has an opacity. And it has a colour, stored not as a single value but as a set of spherical harmonic coefficients, a compact mathematical way of letting the colour vary smoothly with viewing direction so that highlights and reflections shift as the viewer moves. In the standard configuration each Gaussian carries forty-eight colour coefficients plus its position, shape and opacity, which is why splat files are large. A typical captured room or outdoor scene contains between one and several million such Gaussians. Seen up close, a splat scene looks like a cloud of overlapping translucent smudges. Seen from a normal viewing distance, the smudges blend into a continuous, photographic image. Why it is fast Rendering a splat scene uses rasterisation, the same basic approach graphics cards have been built to do quickly for thirty years, rather than ray marching. Each Gaussian is projected onto the screen, where it becomes a soft two-dimensional ellipse, a "splat." The splats are sorted by depth and blended from front to back, each contributing its colour in proportion to its opacity and to how much light earlier splats have let through. This is the same front-to-back accumulation that NeRF performs along each ray, but done once per Gaussian rather than hundreds of times per pixel. The Inria implementation divides the screen into small tiles and sorts the Gaussians that overlap each tile in parallel on the graphics card. That engineering, as much as the representation, is what produced real-time frame rates. And because the whole procedure is differentiable, as NeRF's was, the Gaussians' properties can be learned by comparing rendered images with photographs and adjusting. How a splat scene is trained Training begins from the same structure-from-motion step NeRF uses. Running COLMAP or a similar tool on the input photographs yields the camera positions and, as a by-product, a sparse cloud of 3D points where image features were matched. Each of those points becomes an initial Gaussian. Training then runs the familiar loop: render a training view, compare it with the photograph, nudge every Gaussian's properties to reduce the difference. Alongside this, the method periodically adapts the population of Gaussians itself. Where the rendered image is persistently wrong in a region with too few Gaussians, small Gaussians are cloned to add detail. Where one large Gaussian is trying to cover fine structure, it is split into smaller ones. Gaussians whose opacity has fallen close to zero are deleted. This adaptive densification is what lets a scene start with a few hundred thousand rough points and end with millions of finely placed ones. The result is a representation that sits between the categories of Chapter 1. Like a point cloud, it is a list of explicit primitives at explicit positions. Like a volume, each primitive has soft, semi-transparent extent. Like a neural field, it was learned through differentiable rendering and captures view-dependent appearance. And like a mesh, it can be rasterised quickly. Trade-offs Table 1 compares the main families of reconstruction method on the properties that decide where each is useful. The figures are indicative orders of magnitude drawn from the original papers and common practice, not benchmarks. The weaknesses of splatting follow from its strengths. Because the scene is millions of independent blobs rather than a surface, files are large: hundreds of megabytes for a room-scale capture is common, which matters for delivery over a network or to a standalone headset. A great deal of follow-up work has gone into compression, cutting sizes by an order of magnitude or more by pruning redundant Gaussians, quantising their properties and sharing colour information. Table 1. Four approaches to reconstructing a real scene from photographs. Approach Typical training time Display speed Handles reflections and fine fuzz Output usable in standard engines Mesh photogrammetry Minutes to hours Real time Poorly Yes, directly Original NeRF (2020) One to two days Seconds per frame Well No, needs conversion Hash-grid NeRF (2022) Seconds to minutes Near interactive Well No, needs conversion 3D Gaussian splatting (2023) Tens of minutes Real time Well Increasingly, via plug-ins and glTF Source: Mildenhall et al. (2020); Müller et al. (2022); Kerbl et al. (2023). Because there is no surface, geometry is only implicit. A splat scene does not know where the floor is in the way a mesh does, so physics, collision detection and shadows from new light sources are awkward. Variants such as 2D Gaussian splatting, which flattens each Gaussian into a disc aligned with a surface, recover cleaner geometry at some cost in appearance. Because appearance is learned from photographs, lighting is baked in. A splat captured on a sunny afternoon stays sunny. Relighting, separating an object's true material properties from the light that happened to fall on it, remains an active research area for splats just as for NeRFs. And splats inherit capture artefacts. Regions the cameras saw poorly fill with "floaters," stray Gaussians hanging in mid-air, or blur into smears. Viewed from positions far outside the captured path, a splat scene degrades quickly. Splats are excellent within the envelope of the capture and unreliable outside it. The capture economy Despite these limits, splatting has created something like a new medium: the casual, photoreal, navigable 3D capture. Its uptake across industries illustrates the argument of this book. Splats succeeded commercially because they delivered persistence, a real place that holds still while you move through it, at a cost and speed that ordinary users could bear. In visual effects and virtual production, splats have become a fast way to capture sets, locations and props as reference and, increasingly, as usable backgrounds. A location scout can walk a site with a camera and produce a navigable reconstruction that a director, cinematographer and production designer can explore together back at the studio, choosing camera positions before anyone travels. Software developers in the effects industry added splat support to the tools artists already use, and companies offering virtual production stages experimented with displaying splat environments on the large LED walls that replaced green screens on many productions. In games, splats have so far been more useful as a reference and prototyping tool than as shipped content, mainly because of file size and the difficulty of integrating them with lighting and physics systems built for meshes. That is beginning to change as engine plug-ins mature and as hybrid approaches, splat backgrounds with mesh foregrounds, become workable. In virtual and mixed reality, splats fit the medium unusually well. A headset user can lean, crouch and walk, which exposes the flatness of a 360-degree photograph immediately, while a splat holds up because it is genuinely three-dimensional. Meta announced at its Connect conference in September 2025 a feature called Hyperscape Capture that let owners of its Quest 3 headsets scan a room and revisit it as a photoreal splat, and several independent applications let people share splat captures of places for others to visit in a headset. In mapping and geospatial work, splats offer a photorealistic complement to the large-scale mesh models used for city visualisation. The participation of Esri, Cesium and the Open Geospatial Consortium in the Khronos standardisation effort reflects that interest, and Cesium added support for the new glTF extension to its web and Unreal Engine tools in 2026. In cultural heritage, real estate, retail and insurance, splats provide a cheap way to record a space or object in a form that can be explored rather than merely viewed. Their attraction in each case is the same: a few minutes of video from a phone produces a model that feels like being there. Splats that move Everything so far concerns still scenes. Capturing a moving performance as persistent 3D, sometimes called volumetric video, is older than splatting: specialised studios have for years surrounded performers with dozens or more synchronised cameras and reconstructed each moment as a textured mesh, producing holographic-looking figures for music videos, museum installations and early virtual-reality experiences. The meshes were heavy, the hair and loose clothing often looked brittle, and the studios were expensive to run. Gaussian splatting gave this field a new representation. Researchers quickly extended the method through time, an approach often called 4D Gaussian splatting, either by letting each Gaussian's position, rotation and shape change over a sequence or by learning a deformation that carries a canonical set of Gaussians from frame to frame. Because splats handle hair, fabric and soft edges well, dynamic splat captures of people can look more natural than mesh-based volumetric video, and because they render quickly, they can be played back in a headset. The difficulties are the familiar ones, multiplied by time. A dynamic capture still needs many synchronised cameras, because a single moving camera cannot see every side of a performer at the same instant. Storage grows with duration, so compression across time is as important as compression across space. And editing a performance once captured, changing an expression or a gesture, remains far harder than with a conventional rigged character. Dynamic splats are, in effect, a superb recording medium rather than a puppet. That is valuable for preserving performances and documenting events, and it is one reason sports broadcasters and live-event producers have explored the technique for free-viewpoint replays, but it does not replace animation. Editing a cloud of blobs The other limitation that matters in production is editing. A splat scene is millions of unlabelled primitives. To move a chair, one first has to know which Gaussians belong to the chair. Researchers have attacked this by attaching meaning to the Gaussians. One family of methods projects the output of 2D segmentation models, such as Meta's Segment Anything, onto the Gaussians from many views, so that each Gaussian acquires a label and an object can be selected with a click. Another attaches language features, so that a user can type "the red mug" and the matching Gaussians light up. Once selected, a group of Gaussians can be moved, deleted, duplicated or recoloured, and diffusion-based inpainting can fill in the hole left behind. These methods work well enough to be useful and poorly enough to remind users what explicit structure was buying them. Selections have ragged edges where Gaussians straddle two objects. Moving an object reveals the floor beneath it, which the cameras never saw and which must be invented. Changing the lighting on one object leaves its reflections in its neighbours unchanged. A mesh-based scene built by artists has none of these problems because its structure was declared, not inferred. The practical pattern that has emerged is to treat a splat capture as a high-fidelity backdrop and to place editable, conventional assets in front of it. The splat supplies the real world's richness at low cost; the meshes supply the parts that must move, collide, or be lit dynamically. It is the same compromise Debevec's Façade struck in 1996, rebuilt with new materials. Why standardisation matters The Khronos announcement in February 2026 deserves a moment, because standards are where a technique stops being a research result and becomes infrastructure. The KHRgaussiansplatting extension defines how the core properties of a splat scene, positions, shapes, opacities and colours, are stored inside a glTF file, so that a splat produced by one tool can be opened by another. The companies named as contributors included Autodesk, NVIDIA, Esri, Cesium, Niantic Spatial and others, and the announcement noted coordination with the Alliance for OpenUSD, the Academy Software Foundation and the Open Geospatial Consortium. Ratification was expected later in 2026, with compression to follow as a separate extension. This matters for the argument of the book because interoperability is part of what makes a representation useful in production. A splat that only one viewer can display is a demonstration. A splat that every major engine and modelling tool can read is a building block, something that can be handed to the next person in the pipeline. The speed with which splats acquired that status, compared with the slower and more fragmented path of NeRF, owes much to the fact that splats are explicit. A list of blobs with properties is easy to write into a file format. A neural network's weights, tied to a particular architecture and code base, are not. Splats as a meeting point There is one more reason Gaussian splatting matters for the rest of this book. Because splats are explicit, fast to render and differentiable, they have become a favoured output format for generative 3D systems as well as for reconstruction. Several of the image-to-3D generators described in Chapter 6 can produce splats directly, and some generated-world systems export their environments as splats so that users can load them into conventional viewers and engines. This is the bridge between the two families introduced at the start of the book. Reconstruction showed that a scene could be learned as a cloud of Gaussians by making its renders match photographs. Generation, in the form of diffusion models, can produce the photographs, or something that plays their role, from nothing but a description. Put the two together and you have, in principle, a way to imagine a world and then hold it steady. To see how close that principle comes to practice, we first need to understand the machinery of generation itself. Hashtags: #GenerativeVideoAnd3DAI #GenerativeAI #NeuralRadianceFields #NeRF #DiffusionModels #VideoGeneration #TextToVideo #TextTo3D #ImageTo3D #3DGeneration #AIVideoGeneration #ComputerVision #ComputerGraphics #NeuralRendering #NovelViewSynthesis #3DGaussianSplatting #DifferentiableRendering #VolumetricRendering #LatentDiffusion #VideoDiffusionModels #NeuralSceneReconstruction #Photogrammetry #VirtualProduction #VisualEffects #VFX #3DAssetGeneration #WorldModels #VirtualReality #DigitalContentCreation #SpatialComputing
- Copyright in the Streaming Era (Royalties, Termination Rights, and Fair Use)
Download the Book (PDF): Introduction A song that someone plays on a phone at a bus stop sets off a chain of legal events that its listener never sees. Within a fraction of a second, a streaming service has reproduced a sound recording on a server, transmitted it across a network, and cached parts of it on a device. Each of those acts touches a right that the Copyright Act reserves to someone. Behind the recording sits a second copyright, in the musical composition, often divided among several songwriters and their publishers. By the end of the month, the service will have tallied that play alongside billions of others and paid out fractions of a cent through at least two, and often four or five, separate channels: to the record label that owns the recording, to a collective that pays the songwriters' mechanical royalties, to organisations that license public performances of the song, and, for some kinds of service, to a body that collects on behalf of performers who never signed a record deal at all. None of this was designed. It accreted. The Copyright Act of 1976 was drafted for a world of records, radio and photocopiers, and it was already straining when peer-to-peer file sharing arrived at the end of the 1990s. The streaming economy was then built on top of it, one license and one lawsuit at a time. The result is a body of law that most musicians, many lawyers and nearly all listeners find baffling, and whose effects on who gets paid are large enough to decide whether a songwriting career is viable. This book is about that body of law as it stands in late 2026. Its central claim is simple to state. In the streaming era, copyright in music and media has become less a property right that its owner can freely withhold and more a regulated income stream, whose value is set by rate courts, collective societies, statutory definitions and a handful of dominant platforms. The owner's traditional power to say "no" survives in only a few places. Where it does survive, as in the right of authors to terminate old grants and take their work back, it has become enormously valuable and fiercely contested. And where the law hands out permission without asking, through compulsory licensing, safe harbours, or the doctrine of fair use, the real fights have migrated to the definitions: what counts as a "bundle," what counts as "transformative," what an internet provider must "know" before it is responsible for what its users do. Seen this way, several things that look like unrelated disputes turn out to be versions of the same one. The long battle between songwriters and streaming services over mechanical royalty rates, the controversy over Spotify's decision in 2024 to treat its premium subscription as a bundle of music and audiobooks, the litigation over whether a recording artist from the early 1980s can recover the rights to her masters, the Supreme Court's 2026 decision that an internet provider was not liable for its subscribers' file sharing merely because it knew about it, and the lawsuits over whether artificial intelligence companies may train their systems on copyrighted recordings and books without permission, are all arguments about the same question: when the law will not let an owner refuse, who decides what the owner is paid? What the book covers The chapters move from the architecture of royalties to the specific battles fought over them, then to the two great exceptions and qualifications to the owner's rights, and finally to enforcement. Chapter 1 explains how the streaming economy is built on copyright's distinctive structure: two copyrights in every recorded song, a bundle of separate exclusive rights, and a century-old tradition of compulsory licensing for musical compositions that began with the player piano. Without this map, nothing that follows makes sense. Chapter 2 examines the Music Modernization Act of 2018, the most significant music copyright legislation in a generation. It created a blanket license for digital mechanical rights, a new collective to administer it, federal protection for recordings made before 1972, and a statutory path for record producers to be paid. It also traded away songwriters' ability to sue streaming services for past infringement in return for a promise of better data and better matching. Chapter 3 turns to the Copyright Royalty Board, the three-judge tribunal that sets the rates streaming services pay for mechanical rights, and to the "rate wars" of the last decade: the Phonorecords III determination that promised songwriters a 44 per cent raise, the appeal that nearly unwound it, and the settlement that fixed rates through 2027. Chapter 4 follows what happened next. When Spotify reclassified its premium tier as a bundle, it reduced its mechanical royalty payments under the very rules that songwriters had fought to secure. The resulting lawsuit, the direct deals that followed, and the opening of the Phonorecords V proceeding for 2028 through 2032 show how much of the streaming economy now turns on definitional drafting. Chapters 5 and 6 are about termination rights: the statutory power of authors and their heirs to cancel grants of copyright after thirty-five years (or, for older works, fifty-six) and recapture their work. Chapter 5 explains where the right came from and how it works. Chapter 6 examines the contests now raging over it, including whether sound recordings are "works made for hire" that can never be terminated, what happens to royalties from derivative works, and whether, after the Fifth Circuit's 2026 decision in Vetter v. Resnik, termination recaptures rights around the world. Chapter 7 addresses fair use, the doctrine that permits some unlicensed uses of copyrighted work. It traces the modern doctrine from Campbell v. Acuff-Rose Music through Andy Warhol Foundation v. Goldsmith, examines sampling and platform takedown systems, and then turns to the most consequential fair use question of the decade: whether training artificial intelligence on copyrighted works is lawful. Chapter 8 addresses piracy and its prosecution: the move from suing individual file sharers to prosecuting the operators of pirate services, the felony streaming statute enacted in 2020, the long pursuit of Megaupload's founder, and the Supreme Court's decision in Cox Communications v. Sony Music Entertainment, which reshaped the liability of internet providers for what passes through their pipes. The conclusion draws out what follows for creators, platforms and policymakers. A note on scope The book is written for intelligent readers who are not copyright specialists: musicians and their managers, writers and filmmakers, students, business people who work around media companies, and anyone who has wondered why a million streams can pay less than a month's rent. It focuses on United States law, because the Copyright Act, the Copyright Royalty Board and the federal courts are where most of the decisive streaming-era battles have been fought, and because much of the world's recorded music and film is licensed through American contracts. Where other countries have taken instructively different paths, as the European Union has on artist remuneration and on text and data mining, the book says so briefly. Music dominates the discussion. That is not because film, television, books and software lack streaming-era copyright problems; they have plenty, and several appear in the chapters on fair use and piracy. It is because music's royalty architecture is the most elaborate and the most regulated, and so shows most clearly what happens when copyright is converted from a right to exclude into a right to be paid. Legal rules change quickly in this field. The account here reflects developments through September 2026, including rulings, settlements and proceedings that were still unfolding when it was completed. The book explains the law for educational purposes and is not legal advice for any particular situation. Why it matters It would be possible to treat all of this as a technical dispute among well-resourced industries: labels against publishers, publishers against platforms, platforms against internet providers. Much of it is. But copyright's stated purpose, in the Constitution's words, is "to promote the Progress of Science and useful Arts" by securing to authors exclusive rights for limited times. Every doctrine examined here is a judgement about how best to do that: how much a songwriter should be paid when her work is streamed, whether a musician who signed a bad contract at twenty-two should get a second chance at fifty-seven, how much room later creators should have to borrow, and how far the law should reach to stop people from taking what they have not paid for. Those judgements are being made now, often in obscure proceedings that attract little public attention and that are dominated by parties with the resources to participate. A reader who understands the machinery is in a far better position to see what is being decided, and by whom. Chapter 1: Two Copyrights and a Compulsory License Every dispute in this book rests on three structural features of American copyright law that most people never encounter. The first is that a recorded song contains two distinct copyrighted works, owned by different people and licensed through different systems. The second is that copyright is not one right but a bundle of separate exclusive rights, each of which can be owned, licensed and priced separately. The third is that, for more than a century, the owners of one of those two works, the musical composition, have been unable to refuse permission for one particular use of it. Streaming did not create any of these features. It inherited them all and made each one more consequential. The song and the recording When a listener streams a track, two works are in play. The first is the musical work: the melody, harmony and lyrics as a songwriter composed them, which may exist as sheet music, as a demo, or only in a writer's head until it is recorded. The second is the sound recording: the particular fixed performance of that song, captured in a studio or on stage, with its arrangement, production and performers. The Copyright Act treats these as separate categories of work, listed separately in section 102, and the law's treatment of them diverges at almost every turn. The owners are usually different. The musical work is typically owned or administered by music publishers, who acquire rights from songwriters in exchange for advances and a share of income, traditionally half. The sound recording is typically owned by a record label, which paid for it to be made and which pays the recording artist a royalty under a contract. A single hit single might therefore involve three songwriters signed to three publishers, a featured artist signed to a major label, a producer with a contractual share, and several session musicians who were paid a flat fee. The histories are also different. Musical compositions have been protected by federal copyright since 1831. Sound recordings, by contrast, received federal protection only for recordings fixed on or after February 15, 1972, under the Sound Recording Amendment of 1971. Recordings made before that date were left to a patchwork of state laws, a gap that produced litigation for decades and was closed, in a qualified way, only by the Music Modernization Act of 2018. And the rights attached to each work differ. The Copyright Act gives the owner of a musical work the full set of exclusive rights, including the right to perform it publicly. The owner of a sound recording receives a narrower set. In particular, section 114 limits the public performance right in a sound recording to performances "by means of a digital audio transmission." That limitation, added by the Digital Performance Right in Sound Recordings Act of 1995, is why American AM and FM radio stations pay songwriters and publishers when they broadcast a song but pay nothing to the artists and labels who made the recording. The United States stands almost alone among major economies in this respect, and the recording industry has spent decades lobbying to change it, most recently through the American Music Fairness Act, reintroduced in both houses of Congress in 2025 and the subject of a Senate Judiciary hearing that December. Broadcasters have opposed it with equal persistence, and it had not been enacted as of this writing. The practical upshot is that the same stream generates income for two different sets of owners through two different systems, and the proportions between them are a constant source of friction. On the major on-demand services, the recording side has historically captured several times as much revenue as the composition side. Songwriters regard this disparity as a historical accident that the streaming economy has entrenched; labels regard it as a reflection of their far greater investment in making and marketing recordings. Neither side's view is simply wrong, which is part of why the dispute never ends. The bundle of rights Section 106 of the Copyright Act lists the exclusive rights of a copyright owner. For present purposes the important ones are the rights to reproduce the work, to distribute copies of it to the public, to prepare derivative works based on it, and to perform it publicly. These rights are divisible. An owner can license one without the others, license them for different territories or media, or transfer them to different people. Much of the complexity of music licensing follows from the fact that different rights ended up administered by different institutions. Consider an on-demand stream. It involves a public performance, because the work is transmitted to a member of the public. It also involves reproductions: the service makes server copies, and the listener's device makes temporary and sometimes cached copies. The music industry historically treated reproduction and distribution of a musical work in physical form, on vinyl or CD, as a "mechanical" use, a term that dates to the era of piano rolls and phonograph cylinders. When downloads arrived, a download was treated as a digital phonorecord delivery, also mechanical. Streaming raised the question whether an interactive stream was a performance, a reproduction, or both. The answer that the industry and the Copyright Royalty Board settled on was both: an on-demand service must obtain a performance license for the composition from the performing rights organisations, and a mechanical license from the publishers or, since 2021, from the statutory collective. Non-interactive services such as internet radio, where the listener cannot choose the specific track, have generally been treated as needing only performance licenses for the composition. The two-license structure for compositions matters because the two licenses are administered by different bodies under different legal regimes. Public performance rights in compositions are licensed in the United States mainly by four performing rights organisations. The two largest, ASCAP (founded in 1914) and BMI (founded in 1939), have operated since 1941 under antitrust consent decrees with the Department of Justice. Those decrees require them to license any user who asks and allow a federal "rate court" in the Southern District of New York to set a reasonable fee if the parties cannot agree. The Department reviewed the decrees in 2016 and again from 2019 to 2021 and left them in place. The two smaller organisations, SESAC and Global Music Rights, are not under comparable decrees, and their rates are set by negotiation. Mechanical rights, by contrast, are governed by a statutory compulsory license, to which we now turn. A century of compulsory licensing In 1908 the Supreme Court decided White-Smith Music Publishing Co. v. Apollo Co., holding that a perforated piano roll was not a "copy" of the sheet music it reproduced, because a person could not read the music from it. Under the law as it then stood, player piano manufacturers owed composers nothing. Congress responded the following year. The Copyright Act of 1909 gave composers a new right to control "mechanical reproduction" of their music, but with a crucial qualification. Once the owner had allowed a song to be recorded for the first time, anyone else could make their own recording on payment of a fixed royalty of two cents per copy. Congress's concern was monopoly: the Aeolian Company, a leading piano roll maker, had been buying up exclusive rights from publishers, and legislators feared a single firm would control the reproduction of the nation's music. This compulsory license, now codified in section 115 of the Copyright Act, is the root of the streaming royalty system. Its two cents stayed unchanged for sixty-nine years, until the 1976 Act raised it to 2.75 cents from 1978 and established an administrative body to adjust it thereafter. That body, after several reorganisations, is today's Copyright Royalty Board. The rate for physical copies and downloads reached 13.1 cents per song in 2026 after inflation adjustments. Three features of the compulsory license shape everything that follows. First, it removes the owner's power to refuse. A songwriter who dislikes a particular cover version, or who objects to a particular streaming service, cannot prevent it from using the song on the statutory terms once the song has been commercially released. (There are exceptions; the license does not permit a user to change the basic melody or fundamental character of the work, and it does not cover uses such as synchronising the song to film.) This is the reason Taylor Swift could withhold her recordings from Spotify for a period in the mid-2010s, as the owner or controller of the sound recordings acting through her label, while the songwriters and publishers of the compositions in her catalogue had no comparable power over mechanical licensing. Second, the statutory rate functions as a ceiling on direct negotiation. Because any user can obtain the compulsory license, no publisher can demand more than the statutory rate for the rights it covers. Direct licenses typically track or discount from it. Every fight before the Copyright Royalty Board is therefore, in effect, a fight over the maximum price songwriters can ever command for these rights. Third, the license historically came with an administrative trap. A user who wanted to rely on section 115 had to serve a "notice of intention" on the copyright owner. If the owner could not be identified from the Copyright Office's records, the user could file the notice with the Office instead. When streaming services began licensing tens of millions of tracks, they filed tens of millions of such "address unknown" notices, often by the bulk load, allowing them to use songs lawfully while the money owed to unidentified songwriters accumulated unpaid. How the Music Modernization Act dismantled this system is the subject of the next chapter. The recording side: negotiation and a second statutory license On the sound recording side, the regime is different again. There is no compulsory license for reproducing a sound recording or for on-demand streaming of it. A service like Spotify, Apple Music or Amazon Music Unlimited must negotiate directly with each label, or with the distributors that represent independent artists. Because three major label groups, Universal, Sony and Warner, control a large share of the most-streamed recordings, those negotiations are conducted between concentrated parties, and the terms, which reportedly include substantial advances, minimum guarantees and in some cases equity stakes, are confidential. For non-interactive digital transmissions, however, Congress created a second statutory license. The Digital Performance Right in Sound Recordings Act of 1995 and the Digital Millennium Copyright Act of 1998 set up the section 114 license, under which satellite radio, internet radio and similar services may perform sound recordings without negotiating with each label, paying rates set by the Copyright Royalty Board. The fees are collected by SoundExchange, a non-profit designated for the purpose, and distributed under a statutory formula: half to the owner of the recording, 45 per cent directly to the featured artist, and 5 per cent to funds for non-featured musicians and vocalists. The direct payment to artists is significant. It means that, for this category of use, the artist's share does not pass through the label's accounts, where it might otherwise be offset against unrecouped advances. The distinction between interactive and non-interactive services has been contested, as the Second Circuit's 2009 decision in Arista Records v. Launch Media illustrates. The court held there that a personalised internet radio service, which tailored playlists to user ratings but did not let users request particular songs, was not "interactive" and so could rely on the statutory license. The line matters because it determines whether a service can use the statutory license at all, or must strike deals with every label. The different routes for each right on a typical stream are summarised in Table 1, which also shows who sets the price in each case. Table 1. How the main rights in a streamed song are licensed in the United States. Right Typical service Licensing mechanism Who sets the rate Who collects Sound recording, on-demand stream Spotify, Apple Music Direct negotiated license Private negotiation Labels and distributors Sound recording, non-interactive digital performance Internet and satellite radio Section 114 statutory license Copyright Royalty Board SoundExchange Sound recording, AM/FM broadcast Terrestrial radio No right exists Not applicable Not applicable Composition, mechanical (stream or download) On-demand services Section 115 blanket license Copyright Royalty Board Mechanical Licensing Collective Composition, public performance All streaming and radio Blanket licenses from PROs Negotiation; rate court for ASCAP and BMI ASCAP, BMI, SESAC, GMR Why the structure produces conflict Three consequences of this architecture recur throughout the book. The first is that the regulated and unregulated sides of the market move at different speeds. Labels negotiate freely with services and can threaten to withhold their catalogues. Songwriters' mechanical income is set by a tribunal, and their performance income largely by consent decree. For years, songwriter advocates argued that the regulated rates were depressed relative to what a free market would produce, and that the unregulated label side captured the surplus. One provision of the Music Modernization Act responded directly by repealing a clause in section 114 that had forbidden the rate courts from considering sound recording royalty rates as evidence when setting composition performance rates. The second is that the flow of money depends on data. A stream generates royalties only if someone can identify which composition it embodies, who wrote it, and who now owns each share. Sound recordings carry a standard identifier, the International Standard Recording Code, supplied by labels to services. Compositions have their own identifier, the International Standard Musical Work Code, but historically there was no reliable, universally used link between the two. Where that link was missing, money went unpaid or, worse, was later distributed by market share to the largest publishers. The problem of "matching" recordings to compositions is the unglamorous centre of the streaming royalty system. The third is that the rules were written around categories that technology keeps dissolving. The 1909 Act's "mechanical reproduction," the 1995 Act's "digital audio transmission," the distinction between interactive and non-interactive services, the concept of a "bundle" of music and other products: each of these categories was meaningful when adopted and each has since been stretched. When services redesign their products, the question whether a given feature falls into one statutory category or another can move hundreds of millions of dollars. Streaming, in short, did not upend copyright law so much as expose how much of it is a machine for setting prices rather than a set of property rights that owners freely trade. For musical compositions, the price-setting machine is now housed in two institutions created or remade by the Music Modernization Act: the Mechanical Licensing Collective and a reformed Copyright Royalty Board. How those institutions came to exist, and what they were meant to fix, is where the modern story begins. Chapter 2: The Music Modernization Act and the Blanket License By the middle of the 2010s the mechanical licensing system for streaming was, by near-universal agreement, broken. The services said they could not find the owners of millions of songs and were being sued for failing to do so. The songwriters said the services were using their work without paying for it and hiding behind a paperwork loophole. Both were telling the truth. The Orrin G. Hatch–Bob Goodlatte Music Modernization Act, signed into law on October 11, 2018, after passing the House 415 to 0 and the Senate without dissent, was the rare piece of copyright legislation that nearly every industry constituency supported. It was a negotiated peace. Like most negotiated peaces, it bought something and gave something up, and understanding the exchange is the key to understanding the streaming royalty system that exists today. The problem the Act was built to solve Chapter 1 described the notice of intention that section 115 required. Before 2018, a streaming service that wanted a compulsory mechanical license had to identify the copyright owner of each composition and serve a notice on it, or, if the owner could not be found in the Copyright Office's registration records, file the notice with the Office. For a service offering a catalogue of tens of millions of recordings, song-by-song licensing was nearly impossible. The industry had no single authoritative database connecting recordings to compositions, and ownership of compositions changed constantly as catalogues were sold and shares divided among co-writers. The services' solution was the address-unknown filing. Amazon, Google and others filed notices with the Copyright Office in enormous volumes, and the Office's records for 2016 and 2017 show tens of millions of them. The effect was that services could claim to be licensed for songs whose owners had never received notice or payment. Royalties accrued in suspense accounts, the so-called "black box," with no mechanism to deliver them. Songwriters sued. In late 2015 the musician David Lowery, founder of the bands Cracker and Camper Van Beethoven, filed a class action against Spotify in federal court in California alleging that the service had reproduced and distributed compositions without mechanical licenses. A parallel suit by the singer-songwriter Melissa Ferrick followed in New York. The cases were consolidated and settled in 2017 for a fund of about $43.4 million. Then, on December 29, 2017, Wixen Music Publishing, which administers the catalogues of Tom Petty, Neil Young and others, sued Spotify for $1.6 billion. The filing date was chosen with care. The draft legislation then circulating in Congress would cut off statutory damages and attorney's fees for suits filed on or after January 1, 2018, against services that complied with the new regime. Wixen filed just before the door closed, and the case later settled on undisclosed terms. The litigation pressure gave the services a reason to support reform, and the publishers, who had spent years arguing that the Copyright Royalty Board's rate standard undervalued songs, had reasons of their own. The Act that emerged had three titles, of which the first is by far the most important for streaming. Title I: the blanket license and the collective The Musical Works Modernization Act, Title I of the MMA, replaced song-by-song compulsory licensing for digital uses with a single blanket license. From January 1, 2021, which the statute calls the "license availability date," any digital music provider that makes permanent downloads, limited downloads or interactive streams may obtain a blanket mechanical license covering every musical work available for compulsory licensing, by filing one notice with a new entity: the Mechanical Licensing Collective, known as the MLC. The service no longer needs to find individual owners. It sends monthly usage reports to the MLC and pays the royalties calculated under the Copyright Royalty Board's rates. The MLC's job is to identify which compositions were used, who owns them, and to pay them. The MLC is a private non-profit, but it holds its role by statutory designation from the Register of Copyrights. The Register designated it in July 2019 after competing proposals were submitted. By statute its board has fourteen voting members: ten representatives of music publishers and four professional songwriters. The Copyright Office retains oversight, issuing regulations on how the MLC must operate, and must review the designation every five years. Services do not pay for the MLC out of songwriters' royalties. They fund its operating costs through an administrative assessment set by the Copyright Royalty Board, coordinated on the services' side by a counterpart body, the Digital Licensee Coordinator. The statute imposed duties that address the old system's failures. The MLC must maintain a public database of musical works, their owners, and the sound recordings in which they are embodied, and make it freely available. It must attempt to match unmatched uses. It must hold royalties for unmatched works for a statutory holding period before they can be distributed by market share, and it must make efforts to publicise the existence of unclaimed royalties. When market-share distributions do occur, the statute requires that songwriters receive no less than half of what is paid out to publishers on the basis of market share, a provision aimed at ensuring that unclaimed money does not simply flow to the largest publishers' balance sheets. The trade-off for the services was the limitation on liability. A digital music provider that complied with the Act's transition requirements, including good-faith efforts to match works and paying the accrued royalties it had been holding, was protected against claims for anything other than those royalties for pre-2021 uses, in suits filed on or after January 1, 2018. In other words, songwriters gave up the prospect of statutory damages, which can reach $150,000 per work for willful infringement, in exchange for a functioning licensing system and a transfer of the black box. That transfer happened in February 2021, when some twenty services delivered roughly $424 million in accrued historical unmatched royalties to the MLC. Subsequent recalculations adjusted the figure to about $397 million. The MLC's subsequent record is mixed but, by its own measures and the Copyright Office's, substantially successful. By the time the Office completed its first periodic review of the designation in June 2026, the MLC reported distributing roughly $3.9 billion in royalties since it began operating and a match rate of about 92 per cent of royalties. Of the historical black box, around $160 million remained unmatched in mid-2026. The Office's 2026 review re-designated both the MLC and the Digital Licensee Coordinator but did not do so uncritically. It noted that matching performance was much weaker for low-earning works, with only about 63 per cent of works earning under $100 matched, which is where independent and self-published songwriters are concentrated. It urged the MLC to disclose match rates by royalty value, to broaden songwriter input into board appointments, and to address concerns from smaller publishers about representation. And it endorsed the MLC's plan to begin regular market-share distributions of long-unmatched royalties in early 2027. That last point illustrates the central tension of any collective licensing system. Holding unmatched money indefinitely helps no one; distributing it by market share inevitably rewards those who already earn the most. Rate standards and rate courts Title I also changed how rates are set. Before the MMA, the Copyright Royalty Board set section 115 mechanical rates under the standard in section 801(b)(1) of the Copyright Act, which directed it to achieve four policy objectives, including affording the copyright owner a fair return and minimising disruptive impact on the industries involved. Publishers argued that the "disruption" factor had been used to protect services at songwriters' expense. The MMA replaced this with the "willing buyer, willing seller" standard already used for the section 114 license: rates that "most clearly represent the rates and terms that would have been negotiated in the marketplace between a willing buyer and a willing seller." The Act also changed two features of the performance rights system for compositions. It repealed the sentence in section 114(i) that had barred the ASCAP and BMI rate courts from considering sound recording performance royalties as evidence, allowing publishers to argue that the much higher rates labels receive for the same streams are relevant to what songs are worth. And it replaced the practice by which a single judge in the Southern District of New York presided over each consent-decree rate court for life with random assignment of rate proceedings, to prevent any one judge's views from fixing rates across an industry for decades. Titles II and III: old recordings and the people behind the glass Title II, the Classics Protection and Access Act, dealt with sound recordings fixed before February 15, 1972, which, as Chapter 1 noted, fell outside federal copyright. The gap produced a remarkable litigation campaign in the mid-2010s by Flo & Eddie, Inc., the company of two founding members of the Turtles, which sued SiriusXM and Pandora in several states for performing the band's 1960s recordings without permission. A federal court in California ruled for Flo & Eddie in 2014 under California law, but the New York Court of Appeals held in 2016 that New York common law recognised no public performance right in pre-1972 recordings, and the Eleventh Circuit reached a similar result under Florida law. The outcome depended on which state's law applied, which is no way to run a national digital licensing system. The CLASSICS Act solved the problem by creating a new federal remedy, codified at section 1401, for unauthorised digital performance and other uses of pre-1972 recordings, while leaving them outside ordinary copyright. Services may use them under the statutory licenses on the same terms as post-1972 recordings. The Act also set end dates for protection that phased them into the public domain: recordings first published before 1923 entered the public domain at the end of 2021; those from 1923 to 1946 receive 100 years from publication; those from 1947 to 1956 receive 110 years; and those from 1957 to February 14, 1972, are protected until February 15, 2067. The practical effect is that the earliest recordings of American popular music are now leaving protection year by year, just as compositions from the same period already have. Title III, the Allocation for Music Producers Act, addressed a narrower gap. The section 114 statutory license pays 45 per cent of royalties directly to featured artists, but record producers, mixers and engineers are not featured artists, and had been paid their share only if the artist directed it to them. The AMP Act codified a procedure by which artists can instruct SoundExchange to pay a share of their royalties directly to a producer or engineer, and created a default allocation for producers of pre-1995 recordings who cannot obtain a letter of direction from an artist who cannot be found or has died. What the Act traded The MMA is often described as a win for songwriters, and in several respects it was. It ended the address-unknown loophole, created a single licensing and payment channel with a public database, delivered hundreds of millions of dollars in accrued royalties, and changed the rate standard in songwriters' favour. The first rate proceeding conducted after its passage produced rates higher than those songwriters had been receiving, as the next chapter describes. But the Act also made three choices whose consequences have become clearer since. First, it converted a copyright infringement problem into an administrative accounting problem. Before 2018 a songwriter whose song was streamed without a license could, at least in theory, sue for infringement and seek statutory damages. After the license availability date, the same songwriter is owed royalties through the MLC and has, for the most part, a claim for money calculated under a formula. The right to be paid replaced the right to exclude. Second, it concentrated enormous importance in the definitions that feed the formula. Because services pay a percentage of their revenue under the Copyright Royalty Board's rules, the question of what counts as revenue, what counts as a bundle, and how the revenue from a bundle is allocated between music and non-music components became a question worth hundreds of millions of dollars a year. The MLC was given authority to audit services and to sue them to enforce the license, which it did in 2024 over exactly this issue. Third, it left the market-share problem unsolved. Every collective licensing system that cannot perfectly identify owners must eventually decide what to do with the money it cannot match. The statute's holding period and its requirement that songwriters receive at least half of market-share distributions softened the problem without eliminating it. The Copyright Office's 2026 finding that nearly four in ten low-earning works go unmatched suggests where the residual losses fall: on the long tail of writers whose metadata is incomplete and who have the fewest resources to fix it. None of this makes the MMA a failure. It makes it a characteristic streaming-era statute: one that solves an intractable transaction-cost problem by replacing property rights with a regulated payment system, and in doing so moves the real contest to the rate-setting tribunal and to the fine print. That tribunal is where the next battle was fought. Chapter 3: The Rate Wars at the Copyright Royalty Board If the Music Modernization Act built the pipes through which songwriters' mechanical royalties now flow, the Copyright Royalty Board decides how much water goes into them. Its rate determinations are the single most important variable in songwriters' streaming income in the United States, and the proceedings that produce them are among the most expensive and technically demanding litigation in American copyright law. They are also nearly invisible to the public. A songwriter might spend her career never hearing of the Board while the percentage it sets determines, more than any other factor, what a million streams of her song are worth. An unusual tribunal The Copyright Royalty Board consists of three Copyright Royalty Judges, appointed by the Librarian of Congress, who sit for staggered six-year terms. It was created by the Copyright Royalty and Distribution Reform Act of 2004 to replace an earlier system of ad hoc arbitration panels, and it sets rates for the major statutory licenses: section 114 for non-interactive digital performances of sound recordings, section 115 for mechanical rights in musical works, and several others for cable, satellite and public broadcasting. Its constitutional status has been contested. In Intercollegiate Broadcasting System v. Copyright Royalty Board, decided in 2012, the D.C. Circuit held that the judges, who at that time could be removed by the Librarian only for cause, were principal officers of the United States whose appointment by the Librarian alone violated the Appointments Clause. Rather than invalidate the Board, the court cured the defect by striking the removal protection, making the judges removable at will by the Librarian. The episode matters because it shows how unusual the institution is. It is an adjudicative body housed in the legislative branch's library, exercising what is effectively rate-making power over a multi-billion-dollar industry, with appeals going directly to the D.C. Circuit. Rate proceedings follow a five-year cycle and resemble trials more than regulatory rulemakings. Participants file written direct statements with economic expert testimony, conduct discovery, cross-examine witnesses in hearings that can run for weeks, and submit proposed findings. The judges then issue a determination that can run to hundreds of pages. Parties can settle, in which case the Board publishes the settlement and, unless it finds that the settlement does not provide a reasonable basis for setting rates, adopts it as binding on everyone who uses the license, including those who did not participate. That feature, that a deal struck among the largest players binds the whole industry, is the source of repeated friction with independent songwriters who feel excluded from the negotiations. The mechanical rate proceedings are called Phonorecords, abbreviated Phono, and numbered. Phono I set rates for 2008 to 2012, Phono II for 2013 to 2017, Phono III for 2018 to 2022, Phono IV for 2023 to 2027, and Phono V, which began at the end of 2025, will set rates for 2028 to 2032. How a streaming mechanical rate is calculated The formula that the Board applies to on-demand streaming is intricate, and some understanding of it is needed to follow the fights over it. Its core is a percentage of the service's revenue, known as the headline rate. But that headline rate is subject to alternative calculations designed to protect songwriters if a service reports little revenue, for example because it discounts subscriptions heavily or gives music away to sell something else. In simplified terms, a service calculates an "all-in" royalty pool for musical works for each type of offering. The pool is the greater of the headline percentage of service revenue and the lesser of two alternatives: a percentage of what the service pays to record labels for the sound recordings, known as total content cost or TCC, and a per-subscriber minimum amount. The all-in pool covers both mechanical and performance rights in the compositions. From it, the service deducts what it pays to the performing rights organisations for public performance licenses. What remains is the payable mechanical royalty, which is then allocated among works by their share of plays and paid through the MLC. Three consequences follow from this structure. The mechanical royalty is a residual: when performance rates paid to ASCAP, BMI and the others rise, the mechanical portion falls, because the all-in pool is fixed. The definition of "service revenue" is critical, since the headline rate is a percentage of it. And the TCC prong ties songwriters' income to what labels negotiate, which is why publishers regard label deals as a relevant benchmark and services regard that linkage as a tax on their bargaining with labels. Offerings are divided into categories: standalone portable subscriptions, standalone non-portable subscriptions, family and student plans, free ad-supported tiers, bundled subscriptions, and so on. Each category has its own minima and its own rules about how revenue is measured. Family plans, for example, are counted as 1.5 subscribers rather than the actual number of users, and student plans as half a subscriber. For bundles, which combine music with some other product, the regulations prescribe how much of the bundle's price is attributed to music. Because the rules are category-specific, the same listener generates very different royalties depending on which category her subscription falls into. The next chapter describes how this became the focus of the largest royalty dispute of the decade. Phono III: the 44 per cent raise Going into Phono III, songwriters and publishers argued that the headline rate inherited from Phono I and II, 10.5 per cent, badly undervalued compositions. The streaming services, including Spotify, Amazon, Google and Pandora, argued for lower rates or for structures that would reduce their payments. Apple proposed a flat per-play rate. The labels, which control the other side of the services' costs, were not parties. In January 2018 the Board issued a divided determination. The majority adopted a phased increase of the headline rate from 10.5 per cent in 2018 to 15.1 per cent in 2022, which publishers and songwriters celebrated as a 44 per cent raise. It also removed a cap that had limited the TCC prong in earlier proceedings and set that prong at levels rising to about 26 per cent of label payments. The majority relied in part on Shapley value analysis, a method from cooperative game theory that allocates the surplus from a joint venture according to each participant's marginal contribution across all possible coalitions. The theory, roughly, was that because a streaming service cannot function without both the recordings and the songs, the songs should receive a share of the surplus much closer to that captured by the recordings. One of the three judges dissented, arguing among other things that the majority's approach lacked sufficient grounding in the record. The phase-in, and what followed from it, is set out in Table 2. Table 2. Headline all-in rate for musical works on on-demand streaming in the United States, 2018–2027 (per cent of service revenue; subject to the minima and TCC prongs described in the text). Year Proceeding Headline rate 2018 Phono III 10.5% 2019 Phono III 11.4% 2020 Phono III 12.3% 2021 Phono III 13.3% 2022 Phono III 15.1% 2023 Phono IV 15.1% 2024 Phono IV 15.2% 2025 Phono IV 15.25% 2026 Phono IV 15.3% 2027 Phono IV 15.35% Source: Copyright Royalty Board determinations in Phonorecords III (2018, as reaffirmed on remand) and Phonorecords IV (2022, adopting the parties' settlement). The appeal and the backlash Spotify, Amazon, Google and Pandora appealed to the D.C. Circuit. Apple did not. The appeal was procedurally and legally strong, and it was a public relations disaster for the appellants. Songwriters and publishers described it as streaming companies suing songwriters to cut their pay. Spotify, in particular, faced a public campaign that included songwriters removing themselves from a Spotify-sponsored songwriting event. The services responded that they were challenging legal errors, not the principle of paying songwriters fairly. In Johnson v. Copyright Royalty Board, decided in August 2020, the D.C. Circuit vacated parts of the determination and remanded. The case bears the name of George Johnson, an independent songwriter who represented himself in the proceeding and filed his own appeal, raising separate objections. The court's central holding was procedural. The majority's final rate structure, particularly the uncapped TCC prong combined with the headline rate, had not been proposed by any party, and the Board had adopted it without giving the services adequate notice or opportunity to address it. The court also found that the Board had not adequately explained certain changes, including to how bundles were treated and how service revenue was defined. It did not hold that the rates were too high. It held that the Board had not followed fair procedure or reasoned adequately in reaching them. The remand proceedings dragged on into the Phono IV period. The Board ultimately reaffirmed the Phono III headline rates and much of its structure, having now given the parties the opportunity to address them. Services owed songwriters the difference between what they had paid under the old rates during the appeal and what the reaffirmed rates required. The remand thus ended where the original determination had begun, but only after years of uncertainty and substantial litigation cost on both sides. Phono IV: a settlement and its discontents Having fought one expensive rate war, the major parties settled the next. In August 2022 the National Music Publishers' Association and the Nashville Songwriters Association International announced an agreement with the Digital Media Association, representing Amazon, Apple, Google, Pandora and Spotify, on streaming rates for 2023 to 2027. The headline rate would begin where Phono III ended, at 15.1 per cent, and rise gradually to 15.35 per cent. The TCC prongs and per-subscriber minima were increased, and the settlement revised the treatment of bundles and of promotional offers used to attract new subscribers. The Board adopted it. A separate settlement between publishers and the major record labels, reached earlier, covered physical recordings and permanent downloads, raising the per-song rate from 9.1 cents, where it had been frozen since 2006, to 12 cents, with annual cost-of-living adjustments beginning in 2024. By 2026 those adjustments had taken the rate to 13.1 cents. Both settlements drew criticism, most insistently from George Johnson and a small group of independent songwriters and their organisations. Two lines of objection were substantive. The first was that the settling parties did not represent all songwriters and had conflicts of interest: the major publishers are owned by the same corporate groups as the major labels, which raises the question whether a publisher negotiating against its sister label has every incentive to maximise songwriters' share. The second was that side agreements, not published with the settlements, might have changed the economic terms in ways that the Board and the public could not see. The Board ordered disclosure of certain supplemental agreements, and the settlements were eventually published in full. The criticisms did not stop the settlements, but they point to a structural problem that the willing buyer, willing seller standard does not solve. The market that the standard asks the Board to simulate is dominated by a small number of vertically integrated firms. When the Board adopts a settlement among them, it treats that settlement as evidence of what a willing buyer and a willing seller would agree. For songwriters whose publishers are affiliated with labels, and for the many independent writers who have no seat at the table, whether that inference is sound is exactly the question. What the rates mean in practice A headline rate of 15 per cent sounds substantial, and compared with where the industry stood in 2017 it is. But it is a percentage of service revenue attributable to musical works across the entire catalogue, net of performance royalties, allocated among millions of compositions by share of plays, and then divided among co-writers and between writers and publishers according to their contracts. A single stream's mechanical value is thus a small fraction of a cent, varying by service, by tier, by country of the listener and by month. What songwriters actually receive depends heavily on the variables that the formula leaves open: the revenue base, the category of offering, and what a service pays to labels and to performing rights organisations. That is why the Phono III victory proved less decisive than it first appeared. Rates can be raised in a courtroom and then eroded in a product meeting. A service that restructures its offerings, reprices tiers, adds non-music content or adjusts how revenue is reported can change its royalty obligations without the Board ever reconsidering the headline rate. The rate wars, in other words, did not end with the Phono IV settlement. They moved from the Board's hearing room to the definitions in its regulations, and the first great battle on that new front began in March 2024. Hashtags: #CopyrightInTheStreamingEra #CopyrightLaw #MusicCopyright #StreamingRoyalties #RoyaltyRights #TerminationRights #FairUse #IntellectualPropertyLaw #DigitalCopyright #MusicLicensing #CopyrightProtection #MusicModernizationAct #MechanicalRoyalties #PerformanceRoyalties #SongwriterRights #ArtistRights #CopyrightRoyaltyBoard #MechanicalLicensingCollective #CompulsoryLicensing #CopyrightTermination #CopyrightRecapture #WorksMadeForHire #FairUseDoctrine #TransformativeUse #DigitalMillenniumCopyrightAct #SoundRecordingRights #MusicPublishing #StreamingPlatforms #CopyrightInfringement #AICopyrightLaw
- Continuous Learning in AI (Overcoming Catastrophic Forgetting)
Download the Book (PDF): Introduction In 1989 two psychologists at Johns Hopkins, Michael McCloskey and Neal Cohen, ran an experiment that should have been unremarkable. They taught a small neural network the arithmetic facts that children learn first: one plus one, one plus two, and so on up to one plus nine. The network learned them. Then they taught it the next set, the twos: two plus one, two plus two, up to two plus nine. The network learned those too. But when they went back and checked the ones, they were gone. Not degraded, not a little rusty in the way a child's memory fades over a summer holiday, but largely erased. A handful of training passes on new material had overwritten what the network knew before. McCloskey and Cohen called this "catastrophic interference," and the more common name today, catastrophic forgetting, is no less dramatic. The word "catastrophic" is not hyperbole. A person who learns Spanish does not forget English. A doctor who learns a new surgical procedure does not lose the old ones. Human learning is cumulative: new knowledge settles alongside the old, sometimes interferes with it at the edges, but rarely wipes it out. The networks that McCloskey and Cohen studied did something no healthy brain does. They learned in a way that was, in the most literal sense, destructive. More than three decades later, the networks are vastly larger and the problem is still with us. It has changed shape, but it has not gone away. The largest language and vision models in use today are trained in one enormous, carefully mixed pass over a fixed body of data, and then they are, for most practical purposes, frozen. Their knowledge has a cut-off date. When they are updated, the update is usually a new training run, or a fine-tuning step whose side effects on everything else the model knows have to be measured and managed. Practitioners who fine-tune a model to follow a company's style guide, to speak a new language, or to master a narrow technical domain routinely discover that it has become worse at something else: at reasoning, at safety behaviour, at a skill nobody thought to check. The field has a name for one version of this, the "alignment tax," and another for the general phenomenon in large models, which is still simply forgetting. This booklet is about why that happens and what can be done about it. Its argument is that catastrophic forgetting is not a bug in the ordinary sense, a defect that a cleverer algorithm will one day patch. It is the direct consequence of the property that makes neural networks powerful in the first place. A neural network stores everything it knows in the same shared set of numbers, its weights, and it learns by nudging all of those numbers at once in whatever direction reduces its error on the data in front of it. That sharing is what lets a network generalize, transferring what it learned about cats to dogs and what it learned about French to Italian. It is also what makes learning one thing a threat to everything else. The same mechanism produces both the transfer and the interference. You cannot have one for free without risking the other. Once forgetting is understood this way, the many proposed remedies stop looking like a bewildering zoo of acronyms and start looking like a small number of answers to three questions. First, what should be protected? Some methods, of which elastic weight consolidation is the best known, try to identify which weights matter most to old knowledge and make them harder to change. Second, what should be rehearsed? Other methods keep a memory of old experience, real or generated, and mix it back into training so that the old and the new are learned together rather than in sequence. Third, where should new knowledge go? A third family gives new learning its own space, by growing the network, partitioning it, or attaching small modules that can be switched in and out. Every serious approach to continual learning is some combination of protection, rehearsal and allocation. Each pays a price, and the prices are different. There is a fourth question, which the field took longer to notice and which this booklet treats as equally important: can the system still learn at all? Networks trained for a long time on a changing stream of tasks can lose not only their old knowledge but their capacity to acquire new knowledge. This loss of plasticity, demonstrated at scale only in the last few years, means that forgetting is only half of the problem. A system that never forgets anything because it has become too rigid to change is not a lifelong learner; it is a fossil. The goal is a balance between stability and plasticity, and it is a moving balance. The chapters that follow build the argument in order. Chapter 1 explains the mechanism of forgetting precisely, in terms of shared weights and the geometry of learning, and connects it to the much older psychological literature on interference. Chapter 2 sets out the stability-plasticity dilemma and, just as importantly, how forgetting is measured, because many claims of progress in the field have turned out to depend on which of several quite different problems a method was tested on. Chapters 3, 4 and 5 take the three families of remedy in turn: regularization methods led by elastic weight consolidation; replay methods, from simple memory buffers to generative models that dream up their own rehearsal material; and architectural methods that give new knowledge its own room. Chapter 6 turns to loss of plasticity, the quieter failure that sits on the other side of the dilemma. Chapter 7 asks how all of this changes in the era of large pretrained models, where scale itself turns out to soften forgetting, where fine-tuning techniques such as low-rank adaptation trade learning for retention, and where retrieval offers a way to add knowledge without touching the weights at all. Chapter 8 draws the threads together into the practical question of how to build AI systems that adapt over a lifetime of use: what memory they need, how often they should consolidate, how to evaluate them, and what new risks arise when a deployed model is allowed to keep changing. A note on scope. "Continual learning," "lifelong learning" and "incremental learning" are used more or less interchangeably in the research literature, and this booklet uses them that way too. The emphasis throughout is on neural networks, because that is where catastrophic forgetting is acute and where nearly all modern AI lives. Some of the ideas, especially those drawn from neuroscience, reach further, but the booklet does not try to survey the brain science of memory; it borrows from it only where the borrowing has shaped how machines are built. Nor does it attempt a complete catalogue of methods. Several hundred continual-learning algorithms have been published, and most of them are variations on a few themes. The aim is to make those themes clear enough that a reader can place any new method in the landscape and ask the right questions of it: what does it protect, what does it rehearse, where does it put new knowledge, and what does it cost? The stakes are practical. An AI system that cannot learn after deployment has to be rebuilt, at great expense, every time the world changes. It cannot learn from the particular user it serves, the particular factory it monitors, or the particular hospital whose patients differ from the ones in its training data. It cannot correct its own mistakes in the field. The economic and technical pressure toward models that keep learning is intense, and in 2025 and 2026 several of the largest research laboratories began to describe continual learning openly as one of the main missing ingredients in today's systems. Understanding why it is hard, and which of the available tools actually work, is the first step toward building systems that do it well. Chapter 1: Why Networks Forget To understand why a neural network forgets, it helps to start with what it means for one to remember. A network has no files, no records, no address book in which each fact is stored in its own place. It has weights: a long list of numbers, often billions of them, that determine how an input is transformed, layer by layer, into an output. Everything the network knows, every pattern it can recognise and every association it has formed, is encoded in the particular values of those numbers taken together. A trained image classifier "knows" what a cat looks like only in the sense that its weights happen to be set so that pictures of cats push its output toward the word "cat." There is no cat neuron and no cat memory. There is a configuration. That configuration is found by gradient descent. The network is shown an example, it makes a prediction, and the prediction is scored by a loss function that measures how wrong it was. Calculus then tells us, for every weight, which direction of change would make the loss slightly smaller. All the weights are moved a small step in those directions. Repeat this millions of times over a dataset and the weights drift into a region where the loss is low across all the examples. Learning, for a neural network, is this long walk downhill. Two features of the process matter for forgetting. The first is that the weights are shared. The same numbers are used to process every input. A weight in an early layer of an image network may contribute to detecting edges that appear in cats, cars and handwritten digits alike. The second is that the update is greedy with respect to the data in front of it. Gradient descent knows only the loss on the current examples. It has no notion of what the network learned before, no ledger of which weights were important to which past skill. It will happily move any weight in any direction if doing so reduces the current error. Put these two features together and forgetting follows almost inevitably. Suppose a network has been trained on task A and its weights sit in a region where task A's loss is low. Now it is trained only on task B. Gradient descent begins walking downhill on task B's loss. Nothing in that walk keeps the weights inside the region that was good for A. If the low-loss region for B happens to overlap the low-loss region for A, the network may end up somewhere good for both, and forgetting will be mild. If the regions do not overlap, or if the path to B's region leads straight out of A's, the network will leave A behind. Because the walk is driven entirely by B, there is nothing to stop it. The geometry of interference It is worth making this picture more concrete, because the geometry explains several things that otherwise seem mysterious. Imagine the space of all possible weight settings. For a small network it might have a few thousand dimensions; for a large language model, hundreds of billions. Over that space, each task defines a loss surface: a landscape whose height at any point is how badly the network performs on the task with those weights. Training on a task means finding a low point in its landscape. What makes neural networks tractable at all is that these low regions are typically not isolated pits but broad, connected valleys and basins. There are many different weight settings that solve the same task about equally well. When the network moves from task A to task B, it starts at the bottom of A's valley and descends B's landscape. Whether it forgets depends on how the two landscapes relate. Three situations are worth distinguishing. In the first, the tasks are closely aligned. The directions that reduce B's loss also reduce, or at least do not increase, A's loss. Learning B makes A better or leaves it unchanged. This is positive transfer, and it is why pretraining on a broad dataset helps with almost everything afterwards. In the second, the tasks are unrelated but not opposed. The directions that matter for B are roughly orthogonal to those that matter for A. In a very high-dimensional space this is common: two randomly chosen directions in a space of a million dimensions are almost always close to perpendicular. Learning B moves weights that A barely cares about, and A survives. Some forgetting occurs, because the directions are never perfectly separate and because the network's internal representations shift as a whole, but it is modest. In the third, the tasks conflict. The directions that reduce B's loss increase A's. The simplest example is a pair of tasks that demand opposite outputs for similar inputs, but subtler conflicts are common: a task that rewards a network for attending to colour, followed by one that rewards it for ignoring colour, will push shared features in opposing directions. Here learning B actively dismantles A. This geometric view explains a finding that seemed surprising when it was first documented. In 2020, Seyed Iman Mirzadeh and colleagues showed that how a network is trained on the first task has a large effect on how much it later forgets, independent of any special continual-learning method. Networks trained with settings that lead them into wide, flat valleys, such as larger learning rates early on, dropout and smaller batch sizes, forgot substantially less when moved to a new task than networks that settled into sharp, narrow minima. The explanation is geometric. In a flat valley, the loss on A changes little when the weights move a moderate distance in most directions. In a narrow pit, almost any movement sends A's loss soaring. The width of the basin is a kind of tolerance for disturbance, and the training regime determines how much of it the network has. Distributed representations cut both ways The deeper reason for the conflict is that neural networks learn distributed representations. A concept is not stored in one weight or one unit but spread across many, and each unit takes part in representing many concepts. This is the source of a neural network's most valuable property, its ability to generalise. A network that has learned to recognise a hundred breeds of dog will recognise the hundred-and-first, because the new breed activates many of the same features as the old ones. Knowledge is not stored as a list of cases but as a set of overlapping, reusable parts. It is also why learning cannot be local. In a lookup table, adding a new entry never disturbs the old ones; each fact has its own row. In a distributed representation, there are no private rows. To learn a new concept, the network adjusts features that existing concepts also use. If the adjustment is consistent with the old concepts, nothing is lost. If it is not, the old concepts are disturbed, and there is no mechanism to notice. Robert French, whose 1999 review in Trends in Cognitive Sciences remains one of the clearest treatments of the problem, framed this as a fundamental trade-off. Representations that overlap heavily give good generalisation and severe interference. Representations that barely overlap, with each item stored in its own mostly separate set of units, give little interference and poor generalisation. French called the ideal a balance between "sensitivity" to new information and "stability" of the old, and noted that the brain appears to achieve it through architecture rather than through any single learning rule. That observation, as later chapters show, has shaped almost every serious attempt to solve the problem in machines. An early and influential demonstration of the trade-off came from Roger Ratcliff, who in 1990 tested standard multilayer networks on recognition-memory tasks modelled on human experiments. He found that the networks did not merely forget old items gradually as new ones were learned, which is roughly what people do; they forgot them abruptly. Learning a handful of new items could push recognition of the old ones close to chance. He also found that the networks' learned representations became less discriminating overall, so that new and old items became harder to tell apart. Both effects were at odds with the human data and both were traceable to the same cause: every new item was stored by adjusting the weights that held every old one. Forgetting in people and in machines The comparison with human memory is unavoidable, and it is instructive in both directions. People do suffer interference. Psychologists have studied it for more than a century, distinguishing proactive interference, where old learning gets in the way of new (the habit of driving on the right getting in the way when you first drive on the left), from retroactive interference, where new learning degrades old (a new phone number displacing an old one). In the classic paired-associate experiments of the mid-twentieth century, subjects who learned one list of word pairs and then a second list that reused the same cue words with new responses showed measurable loss of the first list. Retroactive interference is real, and it is the closest human analogue to what McCloskey and Cohen observed. What differs is the magnitude and the shape. In the human experiments, recall of the first list typically fell from near perfect to something like half or less, and the loss was partial; with a few reminders, people relearned the first list much faster than they had learned it originally, showing that a trace remained. In McCloskey and Cohen's network, performance on the first set of arithmetic facts collapsed after only a few presentations of the second set. Interference in people is a gradual erosion; in naive networks it is a demolition. That difference is what the word "catastrophic" marks. Interestingly, the human finding of rapid relearning has a counterpart in networks too. Even when performance on an old task has collapsed, retraining on it is often much faster than learning it from scratch. Ian Goodfellow and colleagues observed this in 2013 in one of the first studies of forgetting in modern deep networks, and later work has confirmed it repeatedly. The old knowledge is not entirely erased; the network's internal features retain some of their usefulness even when the final mapping from features to outputs has been overwritten. Much apparent forgetting in deep networks is concentrated near the top of the network, in the layers that turn features into decisions, while the lower layers that build generic features are more durable. This has practical consequences: some of the most effective continual-learning tricks work by protecting or recalibrating only the output layer. The comparison also suggests why the brain does better. Human learning does not proceed by presenting one task at a time in isolated blocks. New experience arrives interleaved with old, and old memories are revisited, consciously or not, continuously. The brain also appears to use two complementary systems: a fast-learning system, centred on the hippocampus, that rapidly stores specific episodes, and a slow-learning system in the neocortex that gradually extracts general structure. James McClelland, Bruce McNaughton and Randall O'Reilly argued in an influential 1995 paper in Psychological Review that this division exists precisely to solve catastrophic interference. The hippocampus captures new experiences quickly without disturbing the cortex. During rest and sleep, those experiences are replayed to the cortex, interleaved with reactivations of older memories, so that the cortex can integrate the new without overwriting the old. The slow cortex never learns in isolated blocks. It always learns from a mixture. That theory, known as complementary learning systems, made a prediction that later neuroscience supported: that the hippocampus replays recent experience during sleep. Matthew Wilson and Bruce McNaughton reported in Science in 1994 that patterns of activity in rat hippocampal neurons recorded during exploration recurred during subsequent sleep. Whether or not the full theory is right in every detail, it handed machine learning a design pattern that has proved durable: if sequential learning is destructive, make it less sequential by replaying the past. Chapter 4 follows that idea from its first simple form to its current, more sophisticated ones. The sequential learning problem McCloskey and Cohen gave their paper a subtitle that is in some ways more precise than its title: "The sequential learning problem." The difficulty is not that networks cannot learn many things. Trained on all of them together, they can learn a great deal. A modern language model learns to translate, summarise, write code, answer trivia and do arithmetic, all at once, from a single training run. The difficulty is specifically that they cannot learn those things one after another without special measures. This matters because the standard way of training neural networks quietly avoids the problem. A training dataset is shuffled. Each batch of examples is drawn at random from the whole, so every step of gradient descent sees a representative sample of everything the network is supposed to learn. Formally, the data is assumed to be independent and identically distributed: every example is drawn from the same fixed distribution. Under that assumption, there is no "old" and "new"; every step serves all tasks at once, and gradient descent finds a region that is good for all of them. The shuffling is not a minor implementation detail. It is the thing that makes deep learning work. Continual learning is, by definition, the setting where that assumption fails. Data arrives as a stream whose distribution changes over time. A robot moves from one room to another. A recommendation system faces new products and changing tastes. A medical model is deployed at a hospital with a different patient population. A language model must absorb events that happened after its training data was collected. In each case, the network sees one part of the world for a while, then another, and cannot go back and reshuffle everything it has ever seen. It must learn from the stream as it comes. Seen in this light, the simplest solution to catastrophic forgetting is obvious: store everything and retrain from scratch on the shuffled whole whenever new data arrives. In a sense this is what the industry does. Large models are periodically retrained on updated datasets, and the cost of doing so is part of why only a few organisations train them. But as a general answer it fails on every practical axis. It requires keeping all past data, which may be impossible for reasons of storage, privacy or law. It requires recomputing from scratch, at a cost that grows with every update. And it makes the system incapable of learning anything quickly, since every new fact waits for the next full retraining. Continual learning is the search for something better: methods that approach the quality of joint training on all data while touching only a small part of it. What forgetting is not Before going further, it is worth clearing away three things that are sometimes confused with catastrophic forgetting, because conflating them leads to bad diagnoses. The first is overfitting. A network that has memorised its training data and performs poorly on new examples has a generalisation problem, not a forgetting problem. Forgetting is the loss of performance on something the network once did well, caused by later learning. The two can coexist, and some of the same remedies, like regularisation, appear in both, but they are different failures. The second is distribution shift without learning. A model trained on summer photographs that performs worse on winter photographs has not forgotten anything; it never learned winter. This is the problem that motivates continual learning in the first place, but it is not forgetting. Forgetting only enters when the model is updated on winter photographs and then gets worse at summer ones. The third is deliberate unlearning or overwriting. Sometimes the world changes and old knowledge ought to go. A model that once knew that a particular person was a country's head of government should, after an election, know that someone else is. Updating that fact is not catastrophic forgetting; it is correct learning. The trouble comes when the update also disturbs unrelated facts, or when the model cannot update the fact at all without collateral damage. A good continual learner forgets selectively: what has been superseded, and nothing else. Distinguishing knowledge that should be revised from knowledge that should be preserved is one of the hardest open problems in the field, and Chapter 8 returns to it. Why the problem is getting more important For much of the 1990s and 2000s, catastrophic forgetting was a niche concern, studied mainly by cognitive scientists using neural networks as models of the mind. The deep learning revolution after 2012 brought it back, for a simple reason. As networks became useful enough to deploy, the question of how to update them after deployment became pressing. A research model trained once and published needs no updates. A deployed model in a car, a phone, a factory or a chat interface lives in a world that keeps changing. The 2017 paper by James Kirkpatrick and colleagues at DeepMind that introduced elastic weight consolidation, discussed at length in Chapter 3, opened its abstract with a sentence that captures the shift: "The ability to learn tasks in a sequential fashion is crucial to the development of artificial intelligence." Within a few years, continual learning had become an established subfield, with its own benchmarks, workshops and a steady flow of several hundred papers a year. Surveys by German Parisi and colleagues in 2019, by Matthias De Lange and colleagues in 2021, and by Liyuan Wang and colleagues in 2024 each catalogued the methods and tried to impose order on them. The arrival of large pretrained models changed the problem again. On one hand, scale and pretraining make networks more robust to forgetting than the small networks of the 1990s, for reasons Chapter 7 explains. On the other, the stakes are higher. Fine-tuning a large model is now one of the most common operations in applied AI, and the side effects of fine-tuning, which are a form of forgetting, show up as lost capabilities, degraded safety behaviour and models that become oddly worse at things nobody intended to change. The question of how a deployed model might keep learning from its users and its environment, rather than waiting months for the next training run, has moved from academic curiosity to a stated research priority of the largest laboratories. The mechanism has not changed since McCloskey and Cohen. Shared weights, greedy updates and a non-stationary stream of data still produce interference. What has changed is the size of the systems, the range of tools available for managing the problem, and the clarity with which the problem can now be stated. The next chapter makes that statement precise. Chapter 2: The Stability-Plasticity Dilemma and How to Measure It Every learning system, biological or artificial, faces a tension that Stephen Grossberg named in the 1980s the stability-plasticity dilemma. A system must be plastic enough to absorb new information quickly, and stable enough that new information does not destroy what it already knows. Push too far toward plasticity and the system forgets; push too far toward stability and it stops learning. There is no setting that maximises both, and the right balance depends on how fast the world is changing and how much the old knowledge is still worth. Grossberg's own answer, adaptive resonance theory, was a family of neural models in which new inputs either matched an existing category closely enough to refine it, or triggered the creation of a new category, so that new learning did not overwrite old categories that it failed to resemble. The models were influential in cognitive science but did not become the basis of mainstream deep learning. The dilemma itself, however, has become the organising frame for the whole field of continual learning. Almost every method can be described as a particular way of trading one side for the other, and almost every evaluation tries to measure where on that spectrum a method lands. This chapter does two things. It sharpens the dilemma into something measurable. And it explains why measuring it turned out to be harder, and more consequential, than the early literature assumed. A surprising amount of apparent progress in continual learning was later found to depend on testing methods in a setting easier than the one their authors believed they were addressing. Two sides of a single ledger Consider a network trained on a sequence of tasks, one after another. After training on each task, we can test it on every task it has seen so far and on some it has not. The result can be laid out as a grid: rows for the moment of testing, columns for the task being tested. Reading across a row shows how good the network is at everything at a given moment. Reading down a column shows how performance on one task evolves as later tasks are learned. From this grid, a handful of numbers capture most of what matters. Average accuracy after the final task is the simplest headline figure: across all tasks seen, how well does the network do at the end? It mixes stability and plasticity together, which is both its virtue and its limitation. Backward transfer, a term popularised by David Lopez-Paz and Marc'Aurelio Ranzato in their 2017 paper introducing gradient episodic memory, measures how learning later tasks has changed performance on earlier ones. For each earlier task, compare the accuracy just after the network learned it with the accuracy at the end. If later learning helped, backward transfer is positive. If it hurt, which is the usual case, backward transfer is negative, and its magnitude is a measure of forgetting. A closely related measure, simply called forgetting, takes the best accuracy a task ever reached and subtracts the final accuracy. Forward transfer measures the opposite direction: how much having learned earlier tasks helps with later ones. A network that has learned to recognise animals might learn to recognise vehicles faster than a network starting from scratch, because some of its features carry over. Forward transfer is the reward that sharing weights is supposed to earn, and a continual-learning method that eliminates forgetting by isolating every task completely will usually also eliminate forward transfer. Plasticity can be measured directly as the accuracy a network reaches on each new task when it is first learned, compared with what a freshly initialised network would reach on the same task. A method that prevents forgetting by freezing too much of the network will show declining plasticity: each new task is learned less well than the last. This measure was often omitted in early work, which focused on forgetting, and its absence hid a real cost. Finally, there are the resource costs: how much memory a method needs to store past data or extra parameters, how much computation each update requires, and whether these costs grow as tasks accumulate. A method that stores every past example and retrains on all of them has excellent average accuracy and an unbounded memory bill. A fair comparison has to fix the budget. These quantities together turn the stability-plasticity dilemma from a metaphor into a ledger. Stability is measured by backward transfer and forgetting; plasticity by learning accuracy and forward transfer; and the price by memory and compute. A good method improves the first two without exploding the third. Three scenarios that look alike and are not The most important clarification in the modern literature came from Gido van de Ven and Andreas Tolias, who in a 2019 paper, later developed with Tinne Tuytelaars into a 2022 article in Nature Machine Intelligence, distinguished three continual-learning scenarios that had been routinely confused. The distinction is subtle to state and dramatic in its effect. Take a standard benchmark called Split MNIST. The ten handwritten digits are divided into five tasks of two digits each: zero and one, then two and three, and so on. A network learns the tasks in order. What it is asked to do at test time defines the scenario. In task-incremental learning, the network is told at test time which task an input belongs to. Shown a digit from the third task, it knows the answer is either four or five, and need only choose between them. Because each task can have its own output head, the network never has to compare digits from different tasks. Forgetting in this scenario is real but manageable, since old tasks keep their own outputs and only the shared features can be disturbed. In domain-incremental learning, the network is not told which task it faces, but it does not need to know: the output space is the same across tasks. For Split MNIST, the question becomes "is this the first or the second digit of its pair?" regardless of which pair. A more natural example is a speech recogniser that must keep working as it is exposed to new accents. The labels do not change; the input distribution does. In class-incremental learning, the network is not told the task and must choose among all classes it has ever seen. Shown a four, it must say "four" rather than any of the other nine digits, even though it never saw fours and sevens in the same training batch. This is the scenario most real applications resemble: a system that keeps learning new categories and must recognise any of them. The three scenarios differ hugely in difficulty. In van de Ven and Tolias's experiments on Split MNIST, several well-known regularisation methods, including elastic weight consolidation, performed respectably in the task-incremental scenario and failed almost completely in the class-incremental one, scoring close to what a network with no protection at all achieved. Methods based on replay, by contrast, held up in all three. The reason is structural. In class-incremental learning, the network must learn to discriminate between classes that were never presented together. Protecting the weights that served old tasks does nothing to teach the network how a four differs from a seven, because that comparison was never part of any task's loss. Only a method that somehow brings old and new classes into the same training signal can learn it. The relationships among the three scenarios, and what each demands, are summarised in Table 1. Table 1. Three continual-learning scenarios. Scenario Task identity at test time Output space Typical real example Relative difficulty Task-incremental Given Separate per task Multi-skill robot told which skill to use Easiest Domain-incremental Not given, not needed Same across tasks Speech recogniser meeting new accents Intermediate Class-incremental Not given Grows with each task Classifier learning new product categories Hardest Before this distinction was widely appreciated, papers often reported results on a benchmark without specifying which scenario they used, or used the task-incremental version while claiming results relevant to class-incremental problems. Comparisons across papers were frequently meaningless. Sebastian Farquhar and Yarin Gal made a related argument in 2018, criticising the widespread use of benchmarks that made the problem artificially easy and calling for evaluations that resembled real deployment more closely. One of their targets was Permuted MNIST, in which each "task" is the same set of handwritten digits with the pixels shuffled by a fixed random permutation. Because the permuted images share no spatial structure, the tasks barely interfere in the first layer and are otherwise nearly identical, making Permuted MNIST a test of something rather different from what most applications need. Boundaries, labels and the shape of the stream The three scenarios are not the only axis along which continual-learning settings differ. Several other choices quietly change the difficulty of the problem. The first is whether the learner knows when the task changes. Many methods assume clear boundaries: the learner trains on task one, is told it is finished, consolidates what it has learned, and moves on. Elastic weight consolidation, for instance, computes its measure of weight importance at the end of each task. In many real streams, though, there are no announced boundaries. A self-driving car's environment drifts from motorway to city to rain without a notice. Rahaf Aljundi, Klaas Kelchtermans and Tinne Tuytelaars studied this "task-free" setting in 2019, and it has since become standard to ask whether a method can work without being told when to consolidate. The second is how many passes the learner gets over each task's data. In the most common academic setup, the network can train for many epochs on each task before moving on. In online continual learning, each example is seen once, as in a genuine stream. This is much harder, because there is no opportunity to fit each task thoroughly, and it is closer to what a deployed system would face. The third is whether labels are available. Most of the literature assumes that every example in the stream comes labelled. Real streams are mostly unlabelled, with occasional feedback. Continual self-supervised and semi-supervised learning are active areas, and they matter especially for large models, whose pretraining is itself self-supervised. The fourth is the type of change. Some streams introduce new classes; others shift the input distribution; others change the relationship between input and output, as when a fact becomes outdated. And some streams are gradual, with old patterns fading slowly, while others are abrupt. The CLEAR benchmark, released by Zhiqiu Lin and colleagues in 2021, was built to capture natural, gradual change: it organises roughly a decade of public web images into time periods, so that a classifier for categories such as "computer" or "camera" must keep up as the objects themselves evolve over the years. Benchmarks like this are closer to the real problem than splitting a static dataset into arbitrary chunks. The simple baseline that embarrassed the field A useful test of any research field is whether its sophisticated methods actually beat simple ones. In 2020, Ameya Prabhu, Philip Torr and Puneet Dokania published a paper with a deliberately provocative title, "GDumb: A Simple Approach that Questions Our Progress in Continual Learning." Their method did almost nothing clever. As data arrived, it greedily stored examples in a fixed-size memory, keeping the classes roughly balanced. When asked to make predictions, it trained a fresh network from scratch on whatever was in memory and used that. It did not learn from the stream in any continuous sense at all. GDumb matched or outperformed many published continual-learning methods across a range of benchmarks and settings. The lesson was not that continual learning is pointless, but that many evaluations had not compared against strong enough baselines, and that a small, well-managed memory of past examples was doing much of the work in the methods that succeeded. A similar point was made by results showing that simple experience replay, when tuned properly, was competitive with far more elaborate algorithms. Arslan Chaudhry and colleagues showed in 2019 that even a tiny episodic memory, with as little as one stored example per class, used for straightforward replay, substantially reduced forgetting and outperformed several methods specifically designed for the problem. These results reshaped the field's standards. Serious papers now report results across all three scenarios, specify the memory budget, compare against tuned replay baselines, and measure plasticity as well as forgetting. They also report the cost of an upper bound, usually called joint training, in which the network is trained on all tasks at once with shuffled data. Joint training is not a continual-learning method, but it shows how much performance is achievable in principle, and the gap between a method and the joint upper bound is the honest measure of how much of the problem it solves. The evaluation problem for large models All of this was developed for networks trained from scratch on modest image benchmarks. For large pretrained models, evaluation becomes harder in three ways. First, the set of capabilities that might be forgotten is enormous and only partly known. A small image classifier knows exactly the classes it was trained on. A large language model knows an open-ended range of facts and skills, many of which its developers have never tested. Fine-tuning it on a narrow task might degrade arithmetic, a particular language, a refusal behaviour or a style of reasoning, and the damage will only be visible if someone thinks to measure it. Evaluating forgetting in a large model therefore relies on broad batteries of held-out benchmarks covering general knowledge, reasoning, coding, safety and instruction following, and even these are a sample, not a census. Second, the boundary between "old" and "new" knowledge is blurred. When a language model is fine-tuned on medical texts, it is not learning a new task in the Split MNIST sense; it is shifting the balance among capabilities it already partly had. Forgetting shows up as erosion of the model's general competence rather than the loss of a discrete task. Third, some forgetting is wanted. A model updated with the result of an election should forget the previous result. Benchmarks for knowledge editing, which test whether a model can change specific facts while leaving everything else alone, measure both whether the targeted fact changed and whether neighbouring facts were damaged, which is to say they measure selective forgetting. The metrics have names like efficacy, generalisation and locality, but they are the same ledger in a new language: did the network learn what it should, and did it preserve what it should? Choosing the balance It would be convenient if there were a single correct point on the stability-plasticity spectrum, but there is not. The right balance depends on the application. A medical device that has been certified for safety should be highly stable; any change in its behaviour on previously validated cases is a regulatory and clinical risk, and plasticity is a cost to be minimised. A personal assistant that must keep up with a user's changing preferences should be highly plastic about those preferences and stable about its general competence. A robot that moves between factories should retain its core motor skills while adapting rapidly to each new layout. In each case the question is not "how do we stop forgetting?" but "what should be stable, what should be plastic, and how do we keep them apart?" The rest of this booklet examines the tools for answering that question. The first family of tools, discussed in the next chapter, tries to make the network itself stable where stability matters, by identifying the weights that hold important knowledge and resisting changes to them. Chapter 3: Protecting What Matters: Elastic Weight Consolidation and Its Descendants If a network forgets because gradient descent moves weights that old tasks depend on, the most direct remedy is to stop it moving those weights. The trouble is that a network has a great many weights, most of them involved to some degree in everything, and freezing them all would end learning altogether. The question is which weights matter, and how much. Elastic weight consolidation, introduced by James Kirkpatrick and colleagues at DeepMind in a 2017 paper in the Proceedings of the National Academy of Sciences, gave the first widely adopted answer, and it remains the reference point against which a whole family of methods is defined. The idea in plain terms Recall the geometric picture from Chapter 1. After learning task A, the network sits at the bottom of a valley in A's loss landscape. The valley is not equally steep in every direction. Along some directions in weight space, the floor is nearly flat: the weights can move a long way without A's loss rising much. Along others, the walls are steep: even a small move ruins performance on A. If we knew which directions were which, we could let the network move freely along the flat directions while learning task B, and hold it back along the steep ones. Elastic weight consolidation does a simplified version of this. For each weight individually, it estimates how steep A's loss is with respect to that weight. Then, while training on B, it adds a penalty to the loss: for every weight, the squared distance from its value after A, multiplied by that weight's importance. Unimportant weights carry a small penalty and can drift freely. Important weights carry a large penalty and stay close to their old values. The image the authors chose was a set of springs. Each weight is tethered to its old value by a spring whose stiffness is proportional to its importance for the old task. Learning B pulls the weights; the springs pull back; the network settles where the two forces balance. The name reflects a biological inspiration. In the mammalian brain, synapses that participate in an important memory appear to become more stable over time, a process called synaptic consolidation. Studies imaging dendritic spines in mice, such as those by Guang Yang, Feng Pan and Wen-Biao Gan published in Nature in 2009, showed that a fraction of the spines formed when an animal learned a new motor task persisted for months afterwards while others were pruned, and that the survival of these spines correlated with retention of the skill. Elastic weight consolidation is an algorithmic caricature of that idea: make the important connections stiff and leave the rest flexible. Where the importance comes from The interesting part is how to estimate importance cheaply. Computing the full curvature of a loss surface in millions of dimensions is out of the question; the matrix that describes it has a number of entries equal to the square of the number of weights. Kirkpatrick and colleagues used a quantity from statistics, the Fisher information, and took only its diagonal, one number per weight. The Fisher information has a concrete interpretation. For a given weight, it measures how much the network's predicted probabilities would change, on average over the training data, if that weight were nudged. It is computed from the squared gradients of the log-likelihood of the network's predictions, and it can be estimated with a pass over a sample of task A's data after training is complete. A weight whose small change would reshape the network's output distribution on A has high Fisher information; a weight that barely affects A's outputs has low Fisher information. There is also a principled justification, which is the reason elastic weight consolidation attracted theorists as well as practitioners. From a Bayesian point of view, learning task A means forming a posterior distribution over the weights given A's data. When we move to task B, that posterior should become the prior. Exact Bayesian updating would carry all of A's information forward. Elastic weight consolidation approximates A's posterior with a Gaussian centred on the trained weights, whose precision in each direction is given by the Fisher information. This is called a Laplace approximation, and under it, the logarithm of the prior is exactly the quadratic penalty the method adds. In other words, the springs are not an arbitrary heuristic; they are what Bayesian inference would prescribe if the posterior were Gaussian and its dimensions were independent. Those two "ifs" are where the method's limitations lie, but they did not stop it from working well on the problems it was first tested on. Kirkpatrick and colleagues showed that elastic weight consolidation substantially reduced forgetting on Permuted MNIST, and, more strikingly, that it allowed a single deep reinforcement learning agent to learn to play several Atari games in sequence while retaining much of its ability on earlier ones, where an unprotected agent lost each game as it learned the next. For a field that had treated catastrophic forgetting as largely intractable in deep networks, it was a clear demonstration that a simple, scalable penalty could make a difference. Siblings: other ways to measure importance Elastic weight consolidation computes importance once, at the end of each task, from the curvature of the loss. Within months, two other ways of measuring importance appeared, and they illuminate what the idea is really doing. Friedemann Zenke, Ben Poole and Surya Ganguli introduced synaptic intelligence at the International Conference on Machine Learning in 2017. Rather than computing curvature after the fact, synaptic intelligence keeps a running tally during training. Every time a weight is updated, it records how much that update reduced the loss. Summed over the whole of training on a task, this gives a measure of how much each weight contributed to learning the task: a weight that did a lot of the work is important; one that barely moved, or whose moves did little, is not. The appeal is that importance is computed online, as a by-product of training, without a separate pass over the data at the end. Rahaf Aljundi and colleagues introduced memory aware synapses in 2018. Their measure of importance does not depend on the loss or on labels at all. Instead, it asks how sensitive the network's output is to each weight, averaged over inputs. Because it needs no labels, it can be computed on unlabelled data, including data encountered after deployment, and it can be adapted to the specific inputs a system actually sees in use. The authors argued this makes it closer to the biological principle that synapses strengthen with use, sometimes summarised as "cells that fire together wire together." These three methods share a structure. Each assigns an importance to every weight, and each adds the same kind of quadratic penalty, scaled by importance, when the next task is learned. They differ only in how importance is estimated: from the curvature of the loss at the end of training, from the path taken during training, or from the sensitivity of the output. Experimental comparisons have generally found them to perform similarly, with the ranking depending on the benchmark. Table 2 places them side by side with two other approaches that are often grouped with them. Table 2. Regularisation approaches to continual learning. Method Introduced What it protects How importance is measured Needs task boundaries Elastic weight consolidation Kirkpatrick et al., 2017 Individual weights Diagonal Fisher information after each task Yes Synaptic intelligence Zenke, Poole and Ganguli, 2017 Individual weights Contribution to loss reduction during training Yes Memory aware synapses Aljundi et al., 2018 Individual weights Sensitivity of output, no labels needed Optional Learning without forgetting Li and Hoiem, 2016 The function's outputs Old model's predictions on new data Yes Gradient projection memory Saha, Garg and Roy, 2021 Directions in each layer's input space Principal subspace of past activations Yes Protecting functions instead of weights The weight-by-weight approach has a conceptual weakness. What we actually care about is not the values of the weights but the function the network computes: the mapping from inputs to outputs. Two very different weight settings can compute almost the same function, and a small change to the weights can, in some directions, change the function a great deal. Penalising movement in weight space is a proxy for penalising change in function space, and it is a leaky one. The alternative is to protect the function directly. Zhizhong Li and Derek Hoiem's learning without forgetting, presented in 2016 and published in a fuller version in 2018, is the canonical example. Before training on a new task, the method runs the new task's inputs through the old network and records its outputs for the old tasks. Then, while training on the new task, it adds a second loss that encourages the updated network to keep producing those same old-task outputs on the new inputs. This is a form of knowledge distillation, a technique developed by Geoffrey Hinton, Oriol Vinyals and Jeff Dean for compressing a large model into a small one, in which a "student" network learns to imitate a "teacher's" soft output probabilities rather than hard labels. In learning without forgetting, the teacher is the network's own past self. The idea has a pleasing economy: it needs no stored data from old tasks, only the old network's behaviour on the new data. Its weakness is that the new task's inputs may not exercise the old knowledge very much. If a network trained to recognise animals is updated on pictures of furniture, asking it to keep giving the same animal-class outputs on pictures of chairs constrains it only weakly. The old function is preserved on the new task's inputs, but not necessarily on the old task's. Distillation turns out to be most powerful when combined with a small replay memory, so that the old function is preserved on inputs that actually resemble the old tasks; several of the strongest class-incremental methods, discussed in the next chapter, do exactly this. Protecting directions instead of weights A different refinement keeps the geometry of weight space but improves on treating each weight independently. The diagonal approximation in elastic weight consolidation ignores correlations: it assumes the loss is steep or flat along each weight's axis separately, when in reality the steep directions are typically combinations of many weights. Hippolyt Ritter, Aleksandar Botev and David Barber showed in 2018 that a richer approximation of the curvature, using a structured form called a Kronecker-factored approximation, gave better results than the diagonal one, at moderate extra cost. A more radical step is to stop penalising movement in important directions and simply forbid it. Methods in this family modify the gradient itself before applying it. Mehrdad Farajtabar and colleagues proposed orthogonal gradient descent in 2020, which projects each new gradient so that it is perpendicular to directions that would change the network's outputs on past examples. Gobinda Saha, Isha Garg and Kaushik Roy's gradient projection memory, presented at the International Conference on Learning Representations in 2021, made the idea scale. For each layer, it stores a compact description of the space spanned by the inputs that layer received during past tasks, found by a matrix factorisation of the layer's activations. Updates for new tasks are then restricted to the directions orthogonal to that space. If a layer's inputs from the old task all lie in some subspace, and the update to the layer's weights is orthogonal to it, the layer's outputs on old inputs do not change at all. This is a strong guarantee, and in the task-incremental scenario gradient projection methods perform very well. The cost is that the protected subspace grows with each task. Eventually the network runs out of free directions in which to learn, and plasticity declines. The method makes the stability-plasticity trade-off explicit: every direction reserved for the past is a direction unavailable to the future. What goes wrong Elastic weight consolidation and its siblings are elegant, cheap and easy to add to existing training code. They are also, in their pure form, weaker than their early results suggested, for reasons that have become clear over the years since 2017. The first problem is the class-incremental scenario. As the previous chapter explained, protecting weights cannot teach a network to distinguish classes it never saw together. In van de Ven and colleagues' evaluations, regularisation-only methods offered little or no benefit in that scenario on standard image benchmarks. They are much more useful in task-incremental and domain-incremental settings, where old tasks keep their own outputs or the label space does not change. The second is accumulation. With many tasks, each with its own penalty, the springs multiply. The original method kept a separate penalty for each past task, which grows linearly in cost. Ferenc Huszár pointed out in a 2018 note that the Bayesian derivation actually implies a single, cumulative penalty, updated after each task, and Jonathan Schwarz and colleagues' "progress and compress" framework the same year adopted an online version of elastic weight consolidation that maintains one running importance estimate with a decay factor. That fixed the cost but not the deeper issue: as importance accumulates, more and more weights become stiff, and the network becomes progressively harder to train. Regularisation trades forgetting for a slow loss of plasticity. The third is the quality of the approximation. The Gaussian approximation is local. It describes the loss surface well near the old solution and poorly far away. If the new task requires the weights to move a long way, the penalty no longer reflects what would actually happen to the old task's loss. The diagonal approximation compounds this by ignoring correlations. In practice, the strength of the penalty becomes a hyperparameter that has to be tuned, and the best value often depends on knowledge of the tasks to come, which in a real continual-learning setting is not available. The fourth is dependence on task boundaries. Most of these methods consolidate at the end of each task. Without announced boundaries, they need a way to decide when to compute importance and update the penalty. Variants exist that consolidate periodically or when a change is detected, but they add complexity and fragility. Where regularisation earns its keep None of this makes elastic weight consolidation a failure. Its contribution to the field was conceptual as much as practical. It established that forgetting could be attacked by reasoning about what the network already knows, and it connected continual learning to Bayesian inference in a way that inspired a line of more principled methods, such as variational continual learning, proposed by Cuong Nguyen and colleagues in 2018, which maintains an approximate posterior over weights and updates it task by task. In practice, regularisation has found three durable roles. It works well when tasks share an output space and differ moderately, as in domain-incremental problems. It combines well with replay: a small memory buffer handles the class-incremental part of the problem, while a regularisation term or a distillation loss steadies the shared features. And it has been absorbed, often without the name, into the fine-tuning of large models. When practitioners fine-tune a language model with a penalty on how far its weights or its output distribution may move from the original, as is standard in reinforcement learning from human feedback, where a penalty on the divergence from the reference model is a routine part of the objective, they are applying exactly the idea of anchoring a network to its past self. The lesson of this family is that protection alone can only go so far. A network that refuses to change in the places that matter will remember, but it cannot integrate the new with the old, because it never sees them together. That requires the second family of remedies: bringing the past back into the present by replaying it. Hashtags: #ContinuousLearningInAI #ContinualLearning #CatastrophicForgetting #LifelongLearning #IncrementalLearning #ArtificialIntelligence #MachineLearning #DeepLearning #NeuralNetworks #CatastrophicInterference #StabilityPlasticityDilemma #ElasticWeightConsolidation #EWC #ExperienceReplay #GenerativeReplay #MemoryReplay #SynapticIntelligence #MemoryAwareSynapses #LearningWithoutForgetting #GradientProjectionMemory #KnowledgeDistillation #NeuralPlasticity #RepresentationLearning #TaskIncrementalLearning #DomainIncrementalLearning #ClassIncrementalLearning #BackwardTransfer #ForwardTransfer #ParameterEfficientFineTuning #AdaptiveAISystems
- Brain-Computer Interfaces (BCI): Motor Cortex Decoding and Signal Processing
Download the Book (PDF): Introduction In 2004 and 2005, a young man named Matthew Nagle, paralysed from the neck down after a knife attack, opened an email, changed the channel on a television and drew a rough circle on a computer screen. He did these things without moving. A grid of 96 silicon needles, each thinner than a hair and 1.5 millimetres long, had been pressed into the surface of his motor cortex, and a computer was listening to the electrical crackle of a few dozen neurons near their tips. When Nagle thought about moving his hand, the pattern of that crackle changed, and software turned the change into the movement of a cursor. The study, published in Nature in 2006 by Leigh Hochberg, John Donoghue and their colleagues, was the first clinical demonstration of what is now called the BrainGate system [6]. Twenty years later the same basic recipe has produced results that would have sounded like science fiction in 2006. A man with amyotrophic lateral sclerosis, Casey Harrell, speaks through a computer at conversational pace with roughly 97 percent word accuracy, his attempted speech decoded from four small electrode arrays in his cortex [22]. A Dutch man, Gert-Jan Oskam, walks with crutches after a cycling accident left him paralysed, because an implant over his motor cortex talks wirelessly to a stimulator on his spinal cord [23]. Companies with venture funding, regulatory designations and manufacturing lines now compete to put such devices in patients. By January 2026 Neuralink alone reported 21 people enrolled in its trials worldwide. The phrase "brain-computer interface" itself is older than any of these results. Jacques Vidal of the University of California, Los Angeles, used it in 1973 to describe a programme of research into whether EEG signals could be used to control a computer [2]. For three decades the idea remained mostly a laboratory curiosity; what changed was not the concept but the quality of signals, decoders and evaluation. It is easy to read these headlines as evidence that machines have learned to read minds. They have not, and the gap between that impression and the reality is the subject of this book. A brain-computer interface, or BCI, is a measurement instrument followed by a chain of inference. It records a physical quantity, usually voltage, at some distance from the neurons that produced it. It strips away whatever in that voltage did not come from the brain process of interest. It summarises what remains into a handful of numbers. It maps those numbers onto a command. And it shows the result to a human being, who adapts, sometimes in ways the designer did not intend. Each link in the chain loses information, and no algorithm downstream can recover what was never captured upstream. The argument of this book The controlling idea of what follows is simple to state and surprisingly easy to forget: what a brain-computer interface can do is bounded by the physics and physiology of the signal it records, and the craft of building one consists of respecting that bound at every step, from electrode to classifier to the person using it. Machine learning matters enormously, but it works inside limits set by tissue, bone, distance and noise. The most useful interfaces, especially the non-invasive ones that could reach millions of people rather than dozens, come from engineers who choose the least invasive sensor whose signal can actually carry the information a user needs, clean that signal honestly, and design the human into the loop instead of treating them as a source of labelled data. That idea decides what is in this book and what is left out. It concentrates on the motor system, because motor intent is where BCIs have worked best and where the link between physiology and decoding is clearest. It treats electroencephalography (EEG), recorded from the scalp, and electrocorticography (ECoG), recorded from the brain's surface, in depth, and uses intracortical implants mainly as a benchmark: they show what becomes possible when signal quality stops being the bottleneck. It has little to say about consumer headbands that promise to measure focus or mood, about speculative "cognitive enhancement", or about interfaces that write information into the brain through stimulation, except where stimulation closes a motor loop. How the book is built The chapters follow the signal. Chapter 1 begins inside the motor cortex, with what neurons there actually encode, how population activity represents movement, and why imagining a movement produces a measurable change in brain rhythms. Chapter 2 follows that activity outward through tissue, cerebrospinal fluid, bone and skin, and explains why EEG, ECoG and intracortical electrodes see such different versions of the same events. Chapter 3 deals with noise: the eye blinks, jaw clenches, mains hum and electrode drift that can be a hundred times larger than the signal, and the filtering and spatial methods that separate them. Chapters 4 and 5 are the computational heart of non-invasive motor decoding. Chapter 4 covers feature extraction, from band power through common spatial patterns to the Riemannian geometry of covariance matrices that has quietly become one of the strongest tools in the field. Chapter 5 covers classification, including the deep-learning methods that now dominate conference programmes, and the evaluation mistakes that make published accuracies look better than any user will experience. Chapter 6 turns from classifying snapshots to controlling something continuously: cursor velocity, a robotic arm, a wheelchair. It explains Kalman filters and closed-loop recalibration, and argues that the user's learning is as important as the machine's. Chapter 7 surveys what implanted systems have achieved, from BrainGate to the current commercial field, and draws out the lessons that transfer to non-invasive design. Chapter 8 brings everything together in the practical problem of building assistive technology people will actually use: for communication in late-stage ALS, for rehabilitation after stroke, and for control of the environment around a person with severe paralysis. It also addresses who owns the data an interface collects. A few technical terms recur throughout and are gathered in a short glossary at the end. Numbers in square brackets point to the notes, which list the published sources for specific claims. A word about expectations Two misunderstandings tend to frame public conversation about BCIs, and both obstruct good engineering. The first is that non-invasive interfaces are a crude, temporary stage on the road to implants, to be abandoned once surgery becomes safe enough. In fact, for the large populations who could benefit, such as stroke survivors in rehabilitation, an EEG cap has advantages no implant can match: no surgery, no infection risk, a cost measured in thousands rather than hundreds of thousands of dollars, and no long-term question about what happens when the company that made the device stops supporting it. The relevant question is never "invasive or not?" but "what signal does this task require, and what is the least burdensome way to get it?" The second misunderstanding is that the decoder is the whole story: that with enough data and a large enough neural network, any signal can be made to yield any intention. Decoders do matter, and the progress in speech decoding over the past five years owes a great deal to modern language models. But a scalp electrode over the hand area of motor cortex is summing the activity of tens of millions of neurons through a centimetre of tissue and bone. It cannot tell you which finger a person is thinking of moving with the reliability of an electrode sitting among the neurons that control that finger, no matter how clever the model. Knowing why is the beginning of building something that works. The reader this book has in mind is intelligent and curious but not necessarily a neuroscientist or an engineer: a clinician considering a BCI trial for a patient, a student choosing a field, an investor trying to tell substance from hype, a person with a disability or a family member weighing what is real. Nothing here requires mathematics beyond the idea of an average and a ratio, though several mechanisms are worked through step by step because the details are where the truth lives. The aim is that by the end, when you read a claim about a new interface, you will know the questions to ask: where was the electrode, what was the signal, what was removed, how was accuracy measured, and who was in the loop. Chapter 1: What the Motor Cortex Actually Says Every brain-computer interface for movement rests on a bet: that somewhere in the brain there is activity that changes reliably when a person intends to move, and that this change can be measured. The bet is a good one, but the form the activity takes is not what most people imagine. There is no "move left" neuron, no tidy map from thought to command. There is a vast, distributed, noisy population of cells whose combined behaviour carries information about movement in ways that were only worked out over the past half century. Understanding that behaviour is the first step to decoding it, because every design decision downstream, from where to put an electrode to which frequency band to filter, follows from what the motor cortex is actually doing. A strip of cortex and its map The primary motor cortex, often called M1, is a strip of tissue running roughly from the top of the head down each side toward the ear, just in front of the central sulcus, the deep groove that separates the frontal from the parietal lobe. In the 1930s and 1940s the Canadian neurosurgeon Wilder Penfield stimulated this strip with small electrical currents in awake patients undergoing epilepsy surgery and recorded which body parts twitched. The result was the famous motor homunculus: an orderly but distorted map in which the legs and feet lie near the top of the head, folded partly into the groove between the two hemispheres, the hand and fingers occupy a generous stretch further down the side, and the face, lips, tongue and larynx lie lowest, near the Sylvian fissure. The distortion matters. The hand and the mouth, the body's most finely controlled parts, receive disproportionately large territories. For an interface designer this is good news: the regions controlling the most useful outputs, the hand for manipulation and the speech articulators for communication, are large and lie on the outer surface of the brain where electrodes can reach them. The feet are harder. Their representation sits on the medial wall, facing the other hemisphere, which is why foot-related signals at the scalp appear near the very top of the head, at the electrode position conventionally labelled Cz, rather than over either side. Modern imaging and recording have blurred Penfield's map without overturning it. Representations of neighbouring body parts overlap; a single small patch of cortex may influence the wrist, the elbow and several fingers at once; and the map is plastic, shifting after amputation or injury. Recent work by Evan Gordon and colleagues, published in Nature in 2023, even found regions interleaved with the classic effector zones that seem to coordinate whole-body action and posture rather than any single limb. The practical lesson is that motor cortex is organised enough to target but not so tidy that one electrode maps to one muscle. M1 also does not act alone. In front of it lie the premotor cortex and the supplementary motor area, which are more involved in planning, sequencing and preparing movements than in executing them. Behind the central sulcus, the somatosensory cortex receives touch and limb-position information and is tightly coupled to motor areas. Further back, the posterior parietal cortex transforms visual information about targets into plans for reaching. Several of the most successful implanted interfaces have recorded from these areas rather than M1 itself, and many of the scalp signals used in non-invasive interfaces are a blended sum of activity from all of them. How neurons encode movement The modern understanding of motor coding began with a deceptively simple experiment. In the early 1980s Apostolos Georgopoulos and his colleagues at Johns Hopkins trained monkeys to move a handle from a central position toward one of eight lights arranged in a circle, while they recorded the firing of individual neurons in the arm area of motor cortex [3]. Each neuron fired most vigorously for movements in one particular direction, its preferred direction, and progressively less for directions further away, with a profile that closely followed a cosine curve. A neuron preferring movements up and to the right might fire at 40 spikes per second for that direction, 25 for straight up, 10 for straight left, and barely at all for down and to the left. Taken alone, any one of these neurons is a poor guide to what the arm is doing. A rate of 25 spikes per second is consistent with straight up, straight right, or a weaker version of the preferred direction. But Georgopoulos realised that a population of such neurons, each with a different preferred direction, could be combined. Treat each neuron as casting a vote in its preferred direction, weight the vote by how much the neuron's firing exceeds its baseline, and add the votes as arrows. The resulting population vector pointed, with remarkable accuracy, in the direction the monkey was about to move. Published in Science in 1986, the result established the principle that has guided motor BCIs ever since: information about movement is distributed across many neurons, each broadly tuned, and is recovered by combining them. A worked example makes the mechanism concrete. Suppose four neurons have preferred directions of right, up, left and down, and each fires at 20 spikes per second at baseline. During a movement up and slightly right, they fire at 30, 38, 12 and 4 spikes per second. Subtract the baseline: +10, +18, -8, -16. The right-pointing neuron votes 10 units right; the up neuron votes 18 units up; the left neuron's negative vote is equivalent to 8 units right; the down neuron's negative vote is equivalent to 16 units up. The total is 18 units right and 34 units up, an arrow pointing up and somewhat to the right. With four neurons the estimate is rough; with a hundred, spread around the circle and with independent noise, the errors average out and the estimate sharpens. This is why electrode count matters so much for intracortical interfaces, and why the first BrainGate array, recording a few dozen usable neurons, could already steer a cursor. The population vector turned out to be a first approximation. Over the following three decades researchers found that motor cortex neurons are tuned not only to direction but to speed, force, posture, and the state of the limb; that their tuning changes over time and with context; and that many neurons do not fit a cosine at all. A more recent view, developed in large part by Krishna Shenoy, Mark Churchland and their colleagues at Stanford, treats motor cortex as a dynamical system: a network whose population activity evolves along structured trajectories, with preparation setting an initial state from which the movement unfolds [5]. In a 2012 Nature paper they showed that population activity during reaching rotates through a low-dimensional space in a consistent way, even when individual neurons look idiosyncratic. This dynamical view has a practical consequence for decoding. If the activity of hundreds of neurons is largely confined to a much smaller number of underlying patterns, sometimes called a neural manifold, then a decoder can work in that smaller space, which is more stable over days and less sensitive to losing or gaining individual neurons as electrodes shift. Juan Gallego and colleagues reported in 2020 that these latent dynamics remain stable for months and even years in monkeys performing the same task, even as the particular neurons recorded change [31]. Much of the current work on decoders that need less frequent recalibration builds on this idea. Rhythms, desynchronisation and the signal at the scalp A scalp electrode cannot hear individual neurons. What it can detect is the summed, synchronised activity of very large populations, and that activity has a striking feature: when the motor system is idle, much of it oscillates in rhythm. Hans Berger, who first recorded the human EEG and published it in 1929 [1], described the alpha rhythm, an oscillation of roughly 8 to 12 cycles per second that is strongest over the back of the head when a person's eyes are closed. Later researchers identified a rhythm of similar frequency over the sensorimotor cortex, sometimes called the mu rhythm, which behaves differently. It is not much affected by opening the eyes, but it shrinks, sometimes dramatically, when a person moves, prepares to move, or even watches someone else move. Alongside it runs a faster beta rhythm, roughly 13 to 30 cycles per second, with a related pattern. Gert Pfurtscheller and his colleagues in Graz spent several decades characterising these changes and gave them names that have stuck [4]. A decrease in rhythmic power in a band, relative to a resting reference period, is an event-related desynchronisation (ERD). An increase is an event-related synchronisation (ERS). The terms describe the mechanism. When large numbers of neurons in an area are idle, they tend to fire together under the influence of rhythmic input from the thalamus, producing large, coherent oscillations that sum to a strong signal at the scalp. When the area becomes engaged in processing, the neurons begin doing different things, their activity falls out of step, and the summed oscillation shrinks, even though the neurons are, if anything, more active. A useful analogy is a stadium crowd: when everyone chants in unison the sound carries for miles; when each person turns to talk with a neighbour, the total activity is greater but the coherent sound outside the stadium collapses. The spatial pattern of ERD is what makes it useful. Movement of the right hand produces a mu and beta desynchronisation most strongly over the left hemisphere's hand area, near the scalp position C3; left-hand movement desynchronises the right hemisphere near C4. Foot movement shows its main effect at the midline near Cz. After a movement ends, the beta rhythm often overshoots its resting level for half a second or so, a burst of ERS known as the post-movement beta rebound, which is one of the most robust signals in motor EEG. Then comes the observation that made non-invasive motor BCIs possible. Imagining a movement, without performing it, produces a similar pattern of desynchronisation over the same areas, usually weaker but clearly measurable. Motor imagery, as it is called, engages the premotor cortex and supplementary motor area strongly and M1 to a lesser degree. A person asked to imagine squeezing a ball with their right hand, vividly and from the inside rather than as a picture of a hand, will typically show a drop in mu or beta power over C3 within a second or so. The drop is small compared with the background variability, often a reduction of 20 to 40 percent in band power in a responsive user, and it varies from trial to trial. But it is there, it is lateralised, and it can be detected by an algorithm. Left hand versus right hand, hands versus feet, and occasionally tongue form the classic vocabulary of motor-imagery BCIs. Attempted movement, imagined movement and paralysis One subtlety matters greatly for assistive technology. Most people who need a BCI cannot move, and so the relevant mental act is not quite imagery as an able-bodied student volunteer experiences it. For a person with a spinal cord injury or advanced ALS, the motor cortex is usually intact, but its commands do not reach the muscles. Asking such a person to attempt the movement, to try to move their hand as if it would respond, often produces stronger and more natural cortical activity than asking them to imagine it. Most of the recent high-performance implanted results, including the handwriting and speech decoders discussed in Chapter 7, used attempted rather than imagined movement. There is evidence that motor cortex representations persist for years after paralysis or amputation. People with long-standing tetraplegia implanted with intracortical arrays have shown neurons tuned to attempted movements of hands and arms that they have not moved for a decade or more. This persistence is not guaranteed, and the quality of the signal varies from person to person, but it is the reason implanted interfaces in people paralysed for many years work at all. Stroke is a different case and an important one for non-invasive interfaces. A stroke damages brain tissue directly, often in or near the motor areas or the fibres leaving them. The cortex surrounding the lesion may still produce ERD during attempted movement of the affected hand, but the pattern may be weaker, displaced, or shifted toward the opposite hemisphere. Chapter 8 returns to this, because the goal of a rehabilitation BCI is not to bypass the damage permanently but to encourage the brain to rebuild the connection, and that changes what the decoder needs to detect. What this means for decoding Three consequences follow from the physiology, and they recur throughout the book. First, the information is distributed. Whether the signal is spikes from a hundred neurons or band power from a dozen scalp electrodes, no single channel carries enough to decode reliably. Every successful method combines many channels, and the art lies in combining them well. Second, the useful information comes in different forms at different scales. At the level of single neurons, movement is encoded in firing rates that change within tens of milliseconds and can specify direction, speed and even individual finger or speech-articulator movements. At the level of large populations seen through the skull, the main signal is a change in the power of slow rhythms, unfolding over half a second to a second, and distinguishing broadly separated body parts such as left hand, right hand and feet. The scalp signal is not a blurry version of the neuronal code; it is a different measurement of a different aspect of the same activity. A decoder cannot extract finger-level detail from mu-rhythm desynchronisation because that detail is not represented in mu-rhythm desynchronisation. Third, the signal varies, and some of the variation is the user. Desynchronisation strength depends on attention, fatigue, the vividness of imagery and practice. Neuronal tuning drifts over days. A person who is frustrated by a failing interface will generate a different, often worse, signal than one who is succeeding. The motor cortex is a learning organ, and the moment a person begins using an interface the system becomes two learners adapting to each other. That theme, which Chapter 6 develops, is perhaps the deepest difference between building a BCI and building any other kind of classifier. Before any of that, the signal has to leave the brain and reach a sensor. The route it takes, and what it loses on the way, is the subject of the next chapter. Chapter 2: From Skull to Sensor The motor cortex speaks in two dialects: the fast, precise firing of individual neurons, and the slower collective rhythms of large populations. Which dialect an interface hears depends almost entirely on where its electrodes sit. Move a sensor from inside the cortex to its surface and then out through the skull to the scalp, and the signal does not simply grow fainter. It changes character, losing fine spatial detail and high frequencies, and picking up contamination from everything else in the head. Understanding this transformation is not optional background. It is the single most important factor in deciding what an interface can do. Where electrical signals in the brain come from Neurons communicate with electrical pulses, but the voltage an electrode records is not the pulses themselves. It is the effect, at the electrode's location, of currents flowing across neuronal membranes into and out of the surrounding fluid. Two kinds of current dominate. The first is the action potential, or spike: a sharp, roughly one-millisecond reversal of membrane voltage that travels along a neuron's axon. Around the cell body of a firing neuron, the spike produces a brief local current that an electrode within about a tenth of a millimetre can detect as a deflection of perhaps 50 to a few hundred microvolts. Further away, the field from a single spike falls off rapidly. Because spikes are so brief and so local, and because nearby neurons rarely fire in perfect synchrony, the spikes of thousands of neurons largely cancel each other out by the time their fields reach any distance. The second kind is the synaptic current. When a neuron receives input, ions flow across its membrane at the synapse and return through other parts of the cell, forming a small current loop, a dipole. Synaptic currents are slower than spikes, lasting tens of milliseconds, and so they overlap in time far more. In the cortex, the large pyramidal neurons that send motor commands are arranged in parallel, their long apical dendrites all pointing toward the surface like trees in a planted forest. When thousands of them receive synchronised input, their dipoles line up and add rather than cancel. Gyorgy Buzsáki, Costas Anastassiou and Christof Koch reviewed this physics in 2012: the slower field potentials recorded from the cortical surface and scalp are dominated by these aligned synaptic currents, not by spikes [33]. This explains why the rhythms of Chapter 1 are visible at the scalp at all. Mu and beta rhythms are produced by large patches of cortex receiving rhythmic, synchronised input. When those patches desynchronise during movement, the aligned dipoles fall out of step and the field collapses. It also explains a geometrical quirk. Because the cortex is folded, the orientation of the pyramidal neurons depends on where they sit. On the crown of a gyrus, the outer ridge of a fold, they point toward the scalp and produce a radial dipole that EEG sees well. In the wall of a sulcus, they point sideways and produce a tangential dipole whose field at the scalp is distributed differently. Much of the primary motor hand area lies in the anterior wall of the central sulcus, so its activity reaches the scalp as a blend of orientations, contributing to the broad and sometimes counterintuitive spatial patterns seen in motor EEG. Three distances, three signals Consider an electrode at three distances from the same piece of motor cortex. Inside the cortex. An intracortical microelectrode, such as one shank of the Utah array used in BrainGate or a thread of the Neuralink device, sits within a fraction of a millimetre of individual neurons. It records at sampling rates of around 30,000 samples per second and can see individual spikes, which software sorts by waveform shape or, more commonly in modern BCIs, simply counts as threshold crossings without attributing them to specific cells. It also records the local field potential, the slower summed synaptic activity of the surrounding few hundred micrometres. The spatial resolution is cellular, the temporal resolution is sub-millisecond, and the information content about movement is the highest of any modality. The price is penetrating brain tissue, which triggers an immune response that gradually encapsulates electrodes in scar tissue and degrades recordings over months to years. On the cortical surface. An electrocorticography (ECoG) electrode is a small disc, typically a few millimetres across in clinical grids and well under a millimetre in newer high-density thin-film arrays, resting on or just beneath the dura, the tough membrane covering the brain. It does not penetrate tissue. Each electrode sums field potentials from a patch of cortex a few millimetres across, so it cannot resolve individual neurons. But it sits close enough, with nothing but a thin membrane and fluid in the way, to record a broad range of frequencies with signal amplitudes of tens to hundreds of microvolts, and crucially it captures the high-gamma band, roughly 70 to 150 cycles per second and above. High-gamma power in ECoG correlates closely with the average spiking of neurons beneath the electrode, so ECoG gets a blurred but real view of local firing, not just of rhythms. Clinical ECoG has historically come from patients with epilepsy who have grids implanted for a week or two to locate the source of their seizures, which is how much of the foundational ECoG BCI research was done. Long-term ECoG implants are newer. On the scalp. An EEG electrode sits on the skin, separated from the cortex by cerebrospinal fluid, the skull and the scalp itself, a total distance of roughly one to two centimetres. Amplitudes at the scalp are a few to perhaps a hundred microvolts. Each electrode sees a weighted sum of activity from a broad region of cortex, many square centimetres, and the high-frequency activity that tracks local spiking is so attenuated that it is effectively lost beneath muscle noise. What survives clearly are the large, synchronised rhythms below about 40 cycles per second, and slow potentials such as those evoked by a stimulus. EEG is safe, cheap, portable and requires no surgery. It is also, in information terms, the poorest of the three. Why the skull matters so much The skull is the villain of non-invasive recording, and the reason is conductivity. Brain tissue and cerebrospinal fluid conduct electricity reasonably well; bone conducts it poorly, with estimates of the brain-to-skull conductivity ratio ranging widely across studies, from around 15 to 80. When current from a cortical dipole reaches the inner surface of the skull, it cannot pass straight through. Instead it spreads sideways along the more conductive tissue beneath before leaking out across a wide area. By the time it reaches the scalp, the field from a source the size of a fingertip has been smeared across a region several centimetres in diameter. This smearing is called volume conduction, and it has three consequences that dominate EEG decoding. First, neighbouring electrodes see highly correlated signals, because each one is picking up mostly the same mix of sources. Thirty-two electrodes do not provide thirty-two independent views of the brain; they provide perhaps a handful of independent views, heavily overlapped. Second, small or deep sources become nearly invisible, overwhelmed by larger, nearer ones. Third, the smearing acts as a spatial low-pass filter that also attenuates high temporal frequencies, because fast activity tends to be spatially local and therefore cancels when blurred. The physicist Paul Nunez, who with Ramesh Srinivasan wrote the standard text on the electric fields of the brain, has long emphasised that scalp EEG is dominated by synchronous activity spread over patches of cortex measured in square centimetres; studies comparing simultaneous scalp and intracranial recordings of epileptic spikes have found that a source typically needs to involve on the order of 10 square centimetres of cortex before it is reliably visible at the scalp. The hand area of motor cortex for one hand is only a few square centimetres. A scalp electrode at C3 is therefore recording the hand area plus a great deal of surrounding sensory, premotor and parietal cortex, plus activity volume-conducted from further away, plus everything outside the brain. A worked comparison illustrates the scale. Suppose a person attempts to move their right index finger. An intracortical array in the hand area might record 40 neurons whose firing changes, each in a characteristic way, within 100 milliseconds; a decoder can tell index from middle finger with high accuracy. A high-density ECoG grid over the same area might show high-gamma increases at three or four electrodes, centred slightly differently for different fingers; finger identity is decodable, with more errors. At the scalp, the attempted index-finger movement produces a mu and beta desynchronisation over C3 that is almost indistinguishable from a middle-finger or thumb movement, because all three engage overlapping cortex within one blurred footprint. What EEG can reliably tell is that the right hand is involved, and even that only after averaging power over half a second or more. Choosing a modality Table 1 sets the main recording approaches side by side. The values are typical ranges from the research literature and device documentation, not hard limits; individual systems vary. Table 1. Main recording approaches for motor brain-computer interfaces. Modality Sensor location Approximate spatial scale Most useful signals Surgical risk Scalp EEG On the skin Several centimetres Mu and beta rhythms, evoked potentials None Endovascular (Stentrode) Inside a vein over motor cortex Several millimetres to centimetres Band power, including some high-frequency Catheter procedure, no open surgery ECoG On the brain surface, above or below dura Millimetres Rhythms plus high-gamma Craniotomy Intracortical Penetrating cortex, about 1–1.5 mm deep Single neurons Spikes and local field potentials Craniotomy and tissue penetration Two other non-invasive technologies appear in BCI research and deserve brief mention. Functional near-infrared spectroscopy shines light into the head and measures changes in blood oxygenation; it is relatively immune to electrical noise but responds to the slow haemodynamic response, which takes several seconds to peak, so it is too sluggish for fluent control. Magnetoencephalography measures the magnetic fields of neural currents, which pass through the skull with less distortion than electric fields, giving better spatial resolution than EEG. Conventional MEG requires a magnetically shielded room and sensors cooled with liquid helium, which confines it to laboratories. Newer optically pumped magnetometers work at room temperature and can be worn close to the scalp, and research groups have demonstrated wearable MEG systems, but they still need heavy magnetic shielding and remain far from practical assistive use. The endovascular approach in Table 1 deserves explanation because it is the most surprising entry. The Australian-American company Synchron developed the Stentrode, a small self-expanding mesh tube, similar to the stents used to hold open blood vessels, carrying 16 electrodes. A surgeon threads it through the jugular vein in the neck up into the superior sagittal sinus, a large vein running along the top of the brain between the hemispheres, where it lies against the vessel wall adjacent to motor cortex [24]. No hole is drilled in the skull. The electrodes record through the vessel wall, closer to the brain than EEG but not in contact with it. The signal quality sits between EEG and ECoG, enough for a small number of reliable "clicks" rather than continuous fine control, and the procedure resembles routine interventional cardiology more than neurosurgery. The electrode itself Even at a fixed location, the quality of the recording depends on the junction between electrode and tissue. This is especially important for EEG, where the skin is a poor conductor. Clinical and research EEG traditionally uses wet electrodes: silver/silver-chloride discs with conductive gel or saline that soaks through the outer dead layer of skin and lowers the electrical impedance between electrode and scalp, often to below 10 kilohms. Low, stable impedance matters because any electrical noise in the environment couples into the recording in proportion to the impedance, and because differences in impedance between electrodes turn common interference into differential signals that the amplifier cannot reject. Gel is messy, takes time to apply, dries out over hours, and requires washing hair afterwards; for a person with paralysis, depending on a caregiver to apply and clean a gel cap every day is a real barrier. Dry electrodes, usually small spring-loaded pins or conductive polymer combs that push through the hair to touch the scalp, avoid the gel but have impedances often ten to a hundred times higher and are more sensitive to movement. Modern amplifiers with very high input impedance and active electrodes, which place a tiny amplifier directly at each sensor, compensate substantially, and several commercial systems now produce research-usable data with dry sensors. They remain more prone to artifacts and less comfortable over long sessions. Semi-dry electrodes, which release a small amount of saline from a reservoir, are a compromise. Choosing among them is not a detail: for a non-invasive assistive system, setup time and comfort can determine whether the device is used at all. At the other end of the scale, implanted electrodes face the opposite problem. Their contact with tissue is intimate, but the body treats them as foreign objects. Penetrating electrodes stiffer than brain tissue cause micromotion damage as the brain pulses with each heartbeat and breath, and immune cells gradually wall them off. Utah arrays have recorded useful signals for more than five years in some BrainGate participants, but the number of channels with good spikes typically declines over time. Neuralink's flexible polymer threads, Precision Neuroscience's thin-film surface arrays and Paradromics' dense microwire bundles are each, in different ways, attempts to engineer around this biological reaction. The information budget It helps to think of each modality as offering an information budget: an upper limit on how many distinct, reliable choices per second the signal can support, before any decoder touches it. The budget depends on how many independent signals the sensors capture, how fast those signals change in ways that relate to intent, and how large the intent-related changes are compared with the noise. For scalp EEG motor imagery, the budget is small. A few largely independent spatial sources, a usable bandwidth of a few cycles per second in the envelope of the mu and beta power, and an intent-related change of perhaps 20 to 40 percent buried in substantial background fluctuation. Practical motor-imagery interfaces typically achieve information transfer rates in the range of a few to perhaps 20 or 30 bits per minute, a figure Chapter 6 explains how to calculate. That is enough to select a letter every several seconds, steer a wheelchair through a handful of discrete commands, or drive a rehabilitation device, but not to type fluently or control a robotic hand's individual fingers. For ECoG the budget is substantially larger, and for intracortical arrays with hundreds of channels it is larger still. Speech decoders using 256 intracortical electrodes have reached dozens of words per minute. No amount of algorithmic sophistication applied to EEG has reached anything close, and the reason is not that EEG researchers are less clever. It is that the information is not in the signal. This is not an argument against non-invasive interfaces. It is an argument for matching the task to the budget. A stroke rehabilitation system needs to detect one thing reliably, the attempt to move the affected hand, and pair it with feedback at the right moment; EEG's budget is entirely sufficient. A communication system for someone in a completely locked-in state may need only a binary yes or no. The engineer's job is to know what the task requires, what each modality can provide, and to choose accordingly. The next step is making sure the budget is not squandered on noise. Chapter 3: Cleaning the Signal Open a raw EEG recording from someone performing motor imagery and the first thing you will see is not brain activity. You will see the slow wander of the baseline as sweat changes the electrode contact, the regular hum of the mains supply, huge deflections every few seconds as the person blinks, and bursts of fuzz whenever they swallow, clench their jaw or shift in the chair. The mu-rhythm desynchronisation the interface is meant to detect is a modest change in an oscillation of a few microvolts. A single eye blink can produce a deflection of 100 microvolts or more at frontal electrodes. Jaw clenching contaminates almost every channel with broadband muscle activity larger than the brain's own signal. Cleaning this is not a cosmetic step. A motor-imagery classifier trained on uncleaned data will happily learn to use whatever distinguishes the classes most reliably, and if a user unconsciously tenses their right shoulder when imagining right-hand movement, the classifier may be detecting muscle, not brain. Published results have been inflated this way, and real users have been given interfaces that work in the lab and fail at home. The goal of preprocessing is not a pretty trace. It is to ensure that what reaches the decoder is, as far as possible, the brain process of interest. A catalogue of contamination Noise in BCI recordings comes from three broad sources: the environment, the equipment, and the body. Table 2 summarises the most common forms, with their typical signatures and the usual remedies. Table 2. Common contaminants in motor EEG and how they are usually handled. Contaminant Source Frequency signature Spatial pattern Typical remedy Line noise Mains wiring and devices Narrow peak at 50 or 60 Hz and harmonics All channels, varies with impedance Notch filter, good grounding, low impedance Electrode drift Sweat, gel drying, skin potentials Below about 0.5 Hz Individual channels High-pass filter Eye blinks and movements Corneo-retinal dipole, eyelid Mostly below 4 Hz, large amplitude Strongest frontally ICA or regression with eye channels Muscle (EMG) Jaw, forehead, neck, scalp muscles Broadband, dominant above 20 Hz Temporal and peripheral sites Rejection, ICA, task design Electrode pops Sudden contact changes Step or spike Single channel Detect and interpolate Cardiac Heart's electrical activity About 1 Hz pulses Varies, often left side or near vessels ICA, reference choice Each deserves a closer look, because the remedy depends on understanding the cause. Line noise is the easiest to recognise: a sharp spectral peak at exactly 50 cycles per second in Europe, Asia and much of the world, or 60 in the Americas, with smaller peaks at multiples. It arises because the human body acts as an antenna, capacitively coupled to the mains wiring in walls, lights and devices. The amplifier measures the voltage difference between each electrode and a reference, and if the interference were identical at both, it would cancel. It is not identical when electrode impedances differ, which is why careful preparation reduces line noise more effectively than any filter. For motor imagery, line noise is less dangerous than it looks, because the mu and beta bands lie well below 50 Hz, but it matters for any analysis using higher frequencies. Electrode drift is slow wandering of the signal, caused by changes in the electrochemical potential at the skin-electrode junction as gel dries or sweat accumulates. It can reach hundreds of microvolts over minutes. Because it is slow, a high-pass filter that removes everything below about half a cycle per second eliminates most of it without touching the motor rhythms. Ocular artifacts come from the eye itself, which is electrically polarised, positive at the cornea and negative at the retina. When the eye moves or the lid closes over it, the field shifts, and this spreads across the front of the head and, more weakly, further back. Blinks dominate frontal electrodes but can reach central sites with amplitude comparable to the mu rhythm. Because their energy lies mostly at low frequencies, a band-pass filter for the 8 to 30 Hz range reduces them considerably, but not completely. Muscle artifacts are the most insidious. Muscles produce electrical activity (electromyography, EMG) with broad frequency content, concentrated above about 20 Hz but extending into the beta band. The temporalis muscles at the sides of the head, the frontalis on the forehead and the neck muscles at the back sit close to EEG electrodes. A study by Emma Whitham, Kenneth Pope and colleagues at Flinders University, in which participants were temporarily paralysed with a neuromuscular blocking drug while conscious, demonstrated in 2007 that a substantial share of scalp EEG power above about 20 Hz in normal recordings comes from muscle rather than brain, even at central sites when the person is relaxed. For motor BCIs this is a direct threat: the beta band overlaps with EMG, and attempting or imagining movement often recruits small, unconscious muscle contractions. Filtering in time The first line of defence is temporal filtering, which removes frequencies outside the band of interest. A filter is a rule for computing each output sample from a weighted combination of current and past input samples (and sometimes past outputs). Different rules suppress different frequencies. For motor imagery the standard choice is a band-pass filter covering roughly 8 to 30 cycles per second, the span of mu and beta. A worked example shows what this does. Suppose a channel at C3 contains, superimposed, a slow drift of 200 microvolts at 0.1 Hz, a blink of 80 microvolts concentrated around 2 Hz, a mu rhythm of 8 microvolts at 11 Hz, line noise of 15 microvolts at 50 Hz, and broadband muscle noise. A well-designed 8 to 30 Hz band-pass filter attenuates the drift and blink by factors of hundreds to thousands, leaves the mu rhythm essentially intact, and reduces the line noise by a large factor. What remains is the mu rhythm, the beta rhythm and the portion of muscle noise and residual blink energy that falls within the band. The signal-to-noise ratio has improved enormously, but not to perfection, because nothing a temporal filter does can separate brain from muscle within the same band. Two details matter more than they seem. The first is the choice between filter types. Finite impulse response (FIR) filters have a fixed, symmetric response and can be designed to delay all frequencies equally, preserving the shape of waveforms; they need many coefficients for sharp cut-offs. Infinite impulse response (IIR) filters, such as the widely used Butterworth design, achieve sharp cut-offs cheaply but delay different frequencies by different amounts. In offline analysis, running an IIR filter forwards and then backwards cancels the distortion, but that requires future samples. In a real-time interface it is not possible, and the filter's delay adds directly to the system's latency. A steep band-pass filter on a low band can add a delay of a hundred milliseconds or more, and in a closed-loop system, delay degrades control. The second detail is that offline and online filtering must match. A common mistake is to train a classifier on data filtered forwards and backwards with zero phase, then deploy it with a causal online filter that behaves differently. The features shift and accuracy drops for reasons that have nothing to do with the user. Filtering in space Temporal filters cannot separate sources that share frequencies. Spatial filters can, by exploiting the different patterns that sources produce across the electrode array. A spatial filter computes a new signal as a weighted sum of the channels at each instant. The simplest is the choice of reference. Every EEG voltage is a difference between an electrode and a reference point. Recording against a single electrode, at the earlobe or mastoid for instance, means any activity at that reference appears in every channel. The common average reference subtracts the average of all channels from each one, which removes activity common to the whole head, including some line noise and widespread artifacts, and approximates a reference-free measurement when the electrode coverage is dense and even. More powerful for motor imagery is the surface Laplacian, introduced to EEG by Bo Hjorth in 1975. The idea is to estimate the local current flowing through the scalp under each electrode by subtracting the average of its immediate neighbours. For C3, a small Laplacian subtracts the mean of the four surrounding electrodes, roughly FC3, C1, CP3 and C5 in the extended 10-10 system. Activity that is broad and shared, such as volume-conducted alpha from the back of the head or a widespread artifact, cancels out; activity that is focal beneath C3 survives. Dennis McFarland and colleagues at the Wadsworth Center in New York showed in 1997 that a Laplacian derivation substantially improved the detectability of mu-rhythm control compared with a standard ear reference. The Laplacian is cheap, requires no training data, and remains a sensible default for simple motor interfaces with few channels. Fixed spatial filters, however, cannot adapt to an individual head. The next step is to learn the weights from data, and the family of methods for doing this, especially common spatial patterns, is the subject of Chapter 4. Here the concern is the use of learned spatial filters for cleaning rather than for classification. Separating sources: independent component analysis Independent component analysis, or ICA, rests on a simple observation. Each EEG channel is a mixture of contributions from many underlying sources, brain and non-brain, and if those sources are statistically independent of each other, it is possible to find a set of spatial filters that unmixes them. Anthony Bell and Terrence Sejnowski published an influential algorithm for this in 1995, and Scott Makeig, Tzyy-Ping Jung and colleagues at the Salk Institute and the University of California, San Diego, adapted it for EEG, later packaging it in the EEGLAB toolbox [28], which became one of the most widely used EEG analysis environments in the world. Applied to a 32-channel recording, ICA produces 32 components, each with a time course and a scalp map showing how strongly it projects to each electrode. Some components look unmistakably like eye blinks: large slow deflections whose map is concentrated at the front of the head. Others look like muscle: high-frequency activity with a map focused at the temples or neck. Others look like brain sources: rhythmic activity with smooth, dipole-like maps over motor or visual areas. Removing the artifact components and projecting the rest back to the electrodes yields a cleaned recording. ICA is powerful but has real limitations for online interfaces. It needs a substantial amount of data to estimate reliably, typically several minutes for a modest number of channels. Deciding which components are artifacts traditionally required an expert's judgement, though automatic classifiers such as ICLabel, trained on thousands of expert-labelled components, now do this reasonably well. ICA assumes the mixing is stationary, so if electrodes shift or the head moves, the decomposition degrades. And because its components are statistical constructs, it can split one physiological source across several components or combine several into one. In practice, many BCI systems compute ICA during a calibration session, identify the eye and muscle components, and then apply the fixed unmixing weights in real time during use. A related online method, artifact subspace reconstruction (ASR), developed by Christian Kothe and colleagues, learns the statistics of a clean calibration segment and then, in sliding windows during use, detects components whose variance exceeds those statistics by a set multiple and reconstructs them from the clean subspace. It handles large, transient artifacts such as head movements and electrode pops better than ICA, and is designed to run in real time. What cleaning cannot do, and what it can do wrong The temptation with artifact removal is to keep adding steps until the data look clean. Each step, though, has costs. Aggressive artifact rejection throws away trials, and for a user generating many artifacts, perhaps someone with involuntary movements or spasticity, it may throw away most of them. The interface then works only when the person is unusually still, which is not how life works. Some designs instead make the classifier robust to artifacts by including them in training, or by detecting artifacts and simply withholding a command when they occur, which is more honest than pretending they did not happen. Cleaning can also remove brain signal. ICA components classified as muscle may contain some neural activity; a high-pass filter set too high distorts slow potentials that some paradigms rely on; a Laplacian over a sparse montage can amplify noise at individual electrodes. And cleaning methods tuned on one dataset may behave differently on another. Most important, cleaning does not guarantee that the decoder uses brain activity. The definitive test is to check what the trained classifier actually relies on: its spatial weights, the frequency bands that matter, and whether its accuracy survives when obvious artifact sources are controlled. If a supposedly motor-cortex classifier puts most of its weight on temporal electrodes at frequencies above 30 Hz, it is probably decoding jaw tension. Electromyography electrodes placed on relevant muscles during calibration, even in a paralysed user who may still produce small contractions, help confirm that the cortex, not the periphery, is driving control. For an assistive device, this is not academic: a system that depends on residual muscle activity may fail as a disease progresses, exactly when the person needs it most. A practical pipeline Putting this together, a reasonable preprocessing pipeline for a non-invasive motor-imagery interface looks like this. Prepare electrodes to low and balanced impedance, check signals visually, and record a few minutes of rest with eyes open and closed, plus deliberate blinks, eye movements and jaw clenches, for calibrating artifact methods. Apply a causal band-pass filter, roughly 8 to 30 Hz, or a bank of narrower bands, with a known and acceptable delay; add a notch filter if line noise is severe. Apply a spatial reference: common average with dense coverage, or a Laplacian around the motor sites with sparse coverage. Remove ocular and muscle components using ICA or ASR weights estimated from calibration data, and flag windows with residual extreme values. Pass the cleaned, windowed data to feature extraction. This sequence has nothing exotic in it. Each step is decades old. Done carefully, it consistently matters more to the eventual performance of a non-invasive interface than the choice between one sophisticated classifier and another. Done carelessly, it produces impressive numbers that do not survive contact with a real user. With a cleaner signal in hand, the question becomes what to measure from it, which is where the mathematics of motor decoding begins. Hashtags: #BrainComputerInterfaces #BCI #MotorCortexDecoding #NeuralSignalProcessing #BrainMachineInterface #Neurotechnology #NeuralEngineering #ComputationalNeuroscience #MotorCortex #MotorImagery #Electroencephalography #EEG #Electrocorticography #ECoG #IntracorticalRecording #NeuralDecoding #BrainSignalAnalysis #SignalPreprocessing #EEGArtifactRemoval #EventRelatedDesynchronization #SensorimotorRhythms #MuRhythm #BetaRhythm #CommonSpatialPatterns #IndependentComponentAnalysis #MachineLearningForBCI #NeuralProsthetics #AssistiveTechnology #BrainGate #Neurorehabilitation
- The Generative Enterprise (Deploying LLMs for Competitive Advantage)
Download the Book (PDF): Introduction: The Model Is Rented, the Advantage Is Owned In February 2024 the Swedish payments company Klarna announced that an AI assistant built on a large language model had handled 2.3 million customer conversations in its first month, two-thirds of all its customer service chats. The company said the assistant was doing work equivalent to about 700 full-time agents, and that it resolved errands in under two minutes where human agents had taken eleven. The announcement became one of the most cited examples of what generative AI could do inside a business. Fifteen months later, Klarna's chief executive was telling reporters that the company would hire human agents again, because an over-emphasis on cost had lowered the quality of service, and customers needed to know they could always reach a person. Both halves of the story are instructive, and neither cancels the other. The first half shows that a language model, wired into a company's systems and policies, can absorb a large share of a real workflow at a fraction of its former cost. The second shows that absorbing a workflow is not the same as improving it, and that the decisions which determine whether a deployment creates lasting value are mostly not decisions about the model at all. They are decisions about which work to hand over, what knowledge the system is allowed to draw on, how its output is checked, what it costs to run at scale, and where human judgement stays in the loop. This booklet is about those decisions. Its argument can be stated in one sentence: the language model is a rented commodity, and competitive advantage comes from what an organization owns around it — its proprietary knowledge, structured so a model can use it; its redesigned workflows; and its discipline over the cost and quality of inference. Companies that treat the choice of model as the strategic decision will find that their rivals can make the same choice next quarter, at a lower price. Companies that invest in the surrounding assets will find that those assets compound, and that every improvement in the underlying models makes them more valuable rather than less. Why the model is not the moat It is easy to see why so much executive attention goes to the model. The models are what improved so dramatically between 2022 and 2026; they are what the press covers, what vendors sell, and what produces the startling first demonstration in a boardroom. But consider the economics from the buyer's side. The capabilities of frontier models from different laboratories have tended to converge within months of one another. Open-weight models trail the frontier by a margin that has generally narrowed rather than widened. And the price of a given level of capability has fallen faster than almost any input in modern business: the Stanford AI Index reported in 2025 that the cost of querying a model performing at roughly the level of the original GPT-3.5 fell more than 280-fold between late 2022 and late 2024. An input that every competitor can buy, that improves on someone else's schedule, and that gets cheaper every quarter is a wonderful thing to have access to. It is not a source of differentiation. The differentiating question is what you can do with it that a competitor buying the same tokens cannot, and the answer almost always lies in three places. The first is context. A general model knows a great deal about the world and nothing about your contracts, your product configurations, your incident history, your pricing exceptions, or the undocumented rule your best underwriter applies to waterfront properties. Retrieval-Augmented Generation (RAG) — the practice of fetching relevant material from an organization's own stores and placing it in front of the model at the moment it answers — is the mechanism by which that knowledge becomes usable. But retrieval is only as good as what it retrieves from. An enterprise whose knowledge sits in forty thousand unlabeled PDFs and a dozen disconnected databases has very little a model can reliably use. One that has built a structured representation of its entities and their relationships — a knowledge graph, in the broad sense this booklet uses the term — has an asset no rival can buy. The second is workflow. The value of a generative system depends far less on its raw capability than on where in a process it sits, what it is asked to do, and how cheaply its output can be verified. Two companies with identical models will get very different returns depending on whether they bolted a chat window onto an existing process or redesigned the process around what the model is good and bad at. The third is operating discipline: the ability to measure quality, contain risk, and control the cost of inference as usage scales from a pilot used by forty people to a production system answering millions of queries. This is unglamorous engineering and management work, and it is where many promising pilots die. What changed, and what did not Organizations did not discover artificial intelligence in November 2022. Banks had used machine learning for credit scoring and fraud detection for decades; retailers forecast demand with it; manufacturers predicted equipment failure. What arrived with large language models was a different kind of output. Predictive systems produce a number or a label: a probability of default, a forecast, a classification. Generative systems produce artifacts: a drafted letter, a summary of a case file, a block of code, a structured extraction from a messy invoice, a plan. That difference sounds modest and is not. It moves AI from informing a decision a human then executes to performing a large share of the execution itself, and it changes almost everything about how such systems should be selected, evaluated, governed, and paid for. What did not change is the underlying lesson of every previous wave of enterprise technology: that tools diffuse fast and complementary investments diffuse slowly, and that the slow investments are where the returns concentrate. Economists studying electrification, computing, and enterprise software reached the same conclusion repeatedly — the productivity gains arrived only once firms reorganized work around the new capability. There is no reason to think generative AI is exempt, and some good evidence, discussed in the chapters that follow, that it is not. How this booklet is organized The first chapter sets out what is genuinely new in the shift from predictive to generative AI, because many deployment mistakes come from treating a generative system as if it were a better classifier. The second makes the economic case that the model is a commodity input and draws out what that implies for strategy, vendor choice, and architecture. The third turns to workflow: how to choose the work worth handing to a model, using the cost of verifying its output as the central criterion. The next three chapters concern knowledge, the most durable of the three assets. Chapter 4 explains how Retrieval-Augmented Generation works and, more usefully, how it fails. Chapter 5 describes how to build the proprietary knowledge graph that makes retrieval reliable, and when a graph is worth its cost. Chapter 6 deals with the problem that defeats most knowledge initiatives after launch: keeping the corpus accurate, permissioned, and owned. Chapter 7 is about money — the economics of inference, why costs behave differently from those of conventional software, and the levers that cut them by an order of magnitude without hurting quality. Chapter 8 covers evaluation, risk, and governance, including the legal and regulatory frame now in force. Chapter 9 looks at agentic systems and at the organizational changes that determine whether any of this produces returns. The conclusion draws out what follows from the argument as a whole. The booklet is written for executives, product and operations leaders, and technical managers who must make or influence these decisions. It assumes no background in machine learning, explains its terms where they first appear, and avoids code except where a short literal example makes a point clearer than prose could. It does not survey every model or vendor, because that information dates within months. It aims instead at the structure of the problem, which changes far more slowly. One caution before beginning. Much of what is written about generative AI in business is either promotional or dismissive, and both kinds age badly. The evidence is still accumulating, the technology is still moving, and honest practitioners disagree about a good deal. Where the evidence is solid this booklet says so; where it is thin, or where the answer depends on circumstances, it says that too. The reader who finishes it should be better equipped not to predict the future of the technology, which nobody can do reliably, but to make sound decisions about it in the meantime. CHAPTER 1 From Prediction to Generation A credit model at a mid-sized bank takes a loan application and returns a number between zero and one: the estimated probability that the borrower will default within a year. A human underwriter, or a policy rule, then decides what to do with that number. The model never writes anything, never talks to a customer, never takes an action. Its entire contribution is a score, and the organization has spent years learning how to validate that score, monitor its drift, explain it to regulators, and fold it into decisions. Now place a large language model in the same bank. Asked to help with the same loan, it can read the application, the applicant's bank statements, and the relevant credit policy; summarize the risk factors in plain English; flag the clause in the policy that applies to self-employed applicants; draft the request for missing documents; and write the first version of the credit memo the committee will read. It still produces nothing that could be called a decision. But it has produced several artifacts, each of which a person would previously have spent time creating, and each of which could be wrong in ways that a probability score cannot. That contrast is the subject of this chapter. Generative AI is not a better version of predictive AI. It is a different kind of tool, with different economics, different failure modes, and different requirements for safe use. Organizations that understand the difference make better choices about where to deploy it; organizations that do not tend to repeat one of two errors — expecting generative systems to be as checkable as classifiers, or expecting classifier-style accuracy from systems that were never designed to deliver it. What predictive systems do well Predictive machine learning, in the sense that dominated enterprise practice from roughly 2005 to 2022, learns a mapping from inputs to a narrowly defined output using historical examples. A churn model learns which customer behaviors preceded cancellation. A fraud model learns which transaction patterns preceded chargebacks. A demand model learns how past sales responded to price, season, and promotion. In each case the output is tightly specified, the training data is labeled with the correct answer, and success can be measured with a single number on held-out data. These properties made predictive systems governable. Because the output was a score or a class, it could be compared directly with what actually happened. Because the task was narrow, the model's behavior outside its domain mostly did not matter — nobody asked the fraud model to write a poem. Because the model was usually trained on the organization's own data, its knowledge was the organization's knowledge, for better and worse. Model risk management in regulated industries, codified in documents such as the US Federal Reserve's SR 11-7 guidance of 2011, grew up around exactly these characteristics: define the purpose, validate against outcomes, monitor for drift, document limitations. The economic model was also distinctive. Building a predictive system was expensive — data engineering, feature design, labeling, specialist staff — but running it was nearly free. Scoring a transaction cost a fraction of a cent in compute. The business case therefore depended on scale of use and on the value of the decision being improved, and the dominant cost sat at the front of the project. Agrawal, Gans, and Goldfarb captured the strategic logic of this era in Prediction Machines, arguing that AI's economic effect was to make prediction cheap, which raised the value of the complements to prediction: data, judgement, and action. That framing remains useful. What it did not anticipate was a technology that would make a different input cheap — not prediction of a label, but production of language and structured content. What generative systems do differently A large language model is, mechanically, a predictor too: it predicts the next token (a word or word fragment) given everything before it, and generates text by doing so repeatedly. But the consequences of that design are so different from a classifier's that it is more useful to think of the two as different tools. The first difference is generality. A model trained to predict text across a large fraction of the written internet, books, and code acquires broad competence at tasks it was never explicitly trained for: summarizing, translating, extracting fields from documents, classifying sentiment, writing code, answering questions, following multi-step instructions. A single model can therefore serve hundreds of use cases in one organization. The fixed cost of building it is borne by the laboratory that trained it, and the organization pays per use. The second is open-ended output. A generative system's answer is not one of a fixed set of labels; it is a sequence of text that could take an effectively unlimited number of forms. This is what makes it useful and what makes it hard to check. There is often no single correct answer to compare against. Two summaries of the same contract can both be good while sharing few words. A response can be fluent, well-organized, mostly correct, and contain one fabricated figure that matters more than everything else. The third is external knowledge. A predictive model knows only what is in the organization's training data. A language model arrives knowing a great deal about the world — and nothing about the organization, except what is placed in front of it. Its general knowledge is frozen at a training cutoff and may be outdated or wrong. This is why the question of how the organization's own knowledge reaches the model at answer time, the subject of Chapters 4 through 6, is central rather than incidental. The fourth is interaction. Predictive systems are typically embedded silently in a pipeline. Generative systems are often conversational: they receive instructions in natural language, can be redirected mid-task, and increasingly can call tools, query databases, and take actions. That makes them adaptable, and it opens a new class of risk, since anyone who can write to the model can try to instruct it — including, as Chapter 8 discusses, anyone who can write text into a document the model will later read. The fifth is cost structure. The economics invert. The organization usually does not pay to build the model, but it pays every time the model runs, in proportion to how much text goes in and comes out. A predictive system that scored a hundred million transactions a year cost little more than one that scored a million. A generative system that answers a hundred million questions costs, roughly, a hundred times one that answers a million. Inference — running the model — becomes the dominant and recurring cost, which is why Chapter 7 is devoted to it. These differences can be compared directly, as Table 1 sets out. Table 1. Predictive and generative AI compared on the attributes that matter for deployment. Attribute Predictive ML Generative LLM Typical output Score, label, forecast Text, code, structured extraction, plan Scope per model One narrow task Hundreds of tasks Source of knowledge Organization's labeled data Pretraining plus supplied context How quality is judged Single metric against outcomes Rubrics, sampled review, task-specific tests Dominant cost Building and training Running (per-token inference) Characteristic failure Drift, biased features Fluent but wrong output, instruction hijacking The shift in what AI does inside a process The most important practical consequence of these differences concerns where AI sits relative to the work. Predictive AI almost always informed a decision; a person or a rule then acted. Generative AI performs part of the action itself: it writes the email, drafts the clause, produces the code, fills in the form. In the language of operations, it moves from decision support into production. That move has three implications that shape the rest of this booklet. First, the unit of value changes. A predictive model's value was measured by the improvement in decisions — fewer bad loans, less fraud, better inventory. A generative system's value is measured mostly by labor: the time saved in producing an artifact, the throughput increase of a team, the speed of a response. Those are real gains, but they convert into financial value only if the organization does something with the freed capacity — handles more volume, serves customers faster, redeploys staff to higher-value work, or reduces cost. A drafting assistant that saves every lawyer in a firm forty minutes a day produces no financial return if billing, staffing, and workflows stay unchanged. Second, verification becomes the binding constraint. When AI informs a decision, the human who makes the decision is the check. When AI produces the artifact, someone must establish that the artifact is right, and the cost of doing so can approach the cost of producing the artifact from scratch. A first draft of a market report that takes an analyst an hour to fact-check may save almost nothing over writing it. A first draft of a customer email that takes ten seconds to read and approve saves a great deal. Chapter 3 develops this into the principal criterion for choosing which work to automate. Third, responsibility becomes harder to locate. A credit score is an input; the institution owns the decision. A chatbot's statement to a customer is, legally and reputationally, the organization speaking. The case of Moffatt v. Air Canada, decided by British Columbia's Civil Resolution Tribunal in February 2024, made this concrete. The airline's website chatbot told a grieving customer that he could apply for a bereavement discount retroactively, within ninety days of travel; the airline's actual policy said otherwise. When he applied and was refused, Air Canada argued in part that the chatbot was responsible for its own statements. The tribunal rejected the argument, holding that the company was responsible for all information on its website whether it came from a static page or a chatbot, and ordered it to pay the difference in fare plus interest and fees. The sums were small. The principle was not: a generative system acting in a customer-facing role speaks for the company. Two persistent misconceptions Organizations moving from predictive to generative AI tend to carry over assumptions that no longer hold. Two are especially costly. The first is that accuracy is a property of the model. In predictive work this was close enough to true: a fraud model had a measurable precision and recall, and those numbers were reasonably stable within its domain. With generative systems, quality is a property of the whole system — the model, the instructions it receives, the context it is given, the tools it can call, the checks applied to its output, and the human review around it. The same model can be nearly flawless at extracting invoice fields when given the invoice and a clear schema, and badly unreliable at answering policy questions when it must rely on its general knowledge. Asking "how accurate is this model?" is like asking how accurate a new employee is without saying at what task, with what training, and under what supervision. The useful question is how accurate this system is at this task, under these conditions, and how we would know if that changed. The second misconception runs in the opposite direction: that errors make generative systems unusable for serious work. People who encounter a confident fabrication early tend to generalize from it. But every useful production process tolerates error; what matters is the rate, the cost of each error, and whether errors can be caught before they do damage. Human analysts, clerks, and junior lawyers make mistakes at measurable rates, and organizations have long since built review processes around them. The right comparison for a generative system is not perfection but the realistic alternative — including the human process it supplements — and the right design question is how to arrange the work so that the system's errors are cheap to catch. What the early evidence shows Rigorous evidence on generative AI in real workplaces has accumulated steadily since 2023, and while it is still incomplete, it supports a reasonably consistent picture. The most careful field study is by Erik Brynjolfsson, Danielle Li, and Lindsey Raymond, who studied the staggered introduction of a generative AI assistant to more than five thousand customer support agents at a software company. Published in the Quarterly Journal of Economics in 2025, the study found that access to the assistant increased issues resolved per hour by about 14 percent on average. The gains were concentrated among less experienced and lower-skilled agents, whose productivity rose by around a third, while the most experienced agents saw little benefit and possibly a small decline in quality. The authors' interpretation was that the system disseminated the tacit practices of the best agents to everyone else. Customer sentiment improved, and agent attrition fell. A second study, by Fabrizio Dell'Acqua and colleagues with Boston Consulting Group, gave 758 consultants realistic tasks with and without access to GPT-4. For tasks within what the authors called the "jagged technological frontier" — the uneven boundary of what the model could do well — consultants using AI completed more tasks, faster, and at substantially higher quality. For a task deliberately chosen to fall just outside that frontier, consultants using AI were markedly less likely to reach the correct answer than those without it. They trusted fluent output on a problem where it was wrong. These two studies frame the opportunity and the hazard with unusual clarity. Generative systems can raise the performance of a workforce substantially, and they compress the gap between novices and experts. They can also degrade performance when people rely on them for tasks they handle badly, and the boundary between the two is not obvious from the outside. The same model that excels at one subtask may fail on an adjacent one that looks, to a human, no harder. Prediction does not go away None of this means predictive systems are obsolete. In most organizations the two kinds of system turn out to work best together, and some of the most productive deployments are hybrids that use each for what it does well. The first combination runs from generative to predictive. A great deal of the information that would improve predictive models has always been locked in unstructured text: the free-text notes an adjuster writes on a claim, the description a customer gives of a fault, the narrative section of a credit application, the comments in a maintenance log. Extracting usable features from such text used to require specialized and fragile language-processing pipelines, so most predictive models simply ignored it. A language model can read those notes and produce structured fields — the type of damage, the presence of a prior complaint, the stated cause of failure, the urgency expressed — that a conventional model can then use. The predictive model keeps its governable, measurable character; the generative system widens what it can see. The second combination runs the other way. A predictive score can decide where generative work is safe and where it needs scrutiny. A fraud model's score can route a claim either to a fully automated generative pathway, where the system drafts the settlement letter and the claim pays out, or to a human investigator, with a generative summary of the file to speed the investigation. A churn model can decide which customers receive a generated retention offer and which are passed to an account manager. In each case the predictive system supplies a calibrated, testable judgement of risk, and the generative system supplies the labor. The third combination is subtler. Language models can themselves be used as classifiers — asked to assign a support ticket to a category, or to judge whether an email is a complaint — and for many such tasks they perform well with no training data at all, simply from a description of the categories. This makes them useful for quickly standing up classification where none existed. But for high-volume, stable classification tasks where labeled data is plentiful, a conventional model trained for the purpose is often cheaper to run, faster, and easier to validate. A common and sensible pattern is to use a language model to bootstrap a classifier — labeling an initial dataset that humans then check — and then to train a small conventional model on those labels for production use. The point is not that one kind of system is better. It is that each has a distinct profile of strengths, costs, and risks, and a well-designed enterprise architecture assigns work to each accordingly. Organizations that frame their AI strategy as a migration from the old kind to the new kind tend to lose the virtues of the old: its measurability, its cheapness at scale, and the decades of governance practice built around it. The strategic upshot If the shift from predictive to generative AI had merely added a more capable model to the toolkit, strategy could stay roughly where it was: identify high-value decisions, build or buy models, integrate them. But the shift changes what is scarce. In the predictive era, the scarce inputs were labeled data and the expertise to build models. In the generative era, the model's general capability is abundant and purchasable. What becomes scarce is the specific context that makes that capability useful in a particular organization, the redesigned processes that convert it into value, and the operational ability to keep quality high and cost low at scale. This explains a pattern visible in many enterprises since 2023: a burst of pilots, a large number of impressive demonstrations, and a much smaller number of deployments that show up in the income statement. A demonstration needs only the model. A deployment needs the rest. The remaining chapters of this booklet are about the rest — beginning, in Chapter 2, with why the model itself cannot be the source of advantage, and what an organization should do about that. CHAPTER 2 Where the Advantage Isn't In March 2023 Bloomberg published a paper describing BloombergGPT, a fifty-billion-parameter language model trained on a mixture of general text and a very large corpus of financial documents drawn from the company's own archives. The logic was compelling on its face. Bloomberg possessed decades of proprietary financial data that no competitor could match; a model trained on it should understand finance better than any general model, and that understanding should be a durable advantage. Within months the logic looked weaker. Newer general-purpose models, trained by laboratories with no special access to financial data but with far more compute and better methods, matched or exceeded BloombergGPT on many of the financial language tasks it had been built to excel at. Independent evaluations of GPT-4 on financial text analysis found it competitive with or better than domain-specific models. Bloomberg had not made an obviously foolish decision — it had real data and a real thesis. What it had underestimated was the speed at which general capability would improve, and the extent to which that improvement would wash over specialized training. The lesson generalizes. For nearly every organization, the model itself is not where competitive advantage will come from. That is not a counsel of despair; it is a clarifying observation that tells an organization where to spend its money and attention. This chapter sets out why the model behaves like a commodity input, what that implies for strategy and architecture, and where the narrow exceptions lie. The economics of a commoditizing input An input becomes a commodity when it is available from several suppliers at broadly similar quality, when switching between suppliers is feasible, and when its price falls toward the cost of producing it. Large language models in 2026 satisfy all three conditions to a degree that would have seemed improbable in early 2023. Several laboratories now offer frontier models — Anthropic, Google, OpenAI, and others — and their capabilities have tended to converge within months on most business tasks, even as each holds temporary leads in particular areas such as coding, long-document reasoning, or multimodal input. Behind the frontier sits a deep field of open-weight models, whose weights can be downloaded and run on an organization's own infrastructure: Meta's Llama family, Mistral's models, Alibaba's Qwen series, and DeepSeek's models among them. In January 2025 the release of DeepSeek's R1 reasoning model, which approached the performance of leading proprietary systems at a reported fraction of their training cost and was published with open weights, briefly wiped close to $600 billion from Nvidia's market value in a single day. Whatever one makes of the cost claims, the episode demonstrated how fast frontier capability can diffuse. Prices have fallen accordingly. The cost of a given level of capability has declined by roughly an order of magnitude a year since 2022, according to analyses by Epoch AI, Andreessen Horowitz, and the Stanford AI Index, with the AI Index reporting a more than 280-fold drop between late 2022 and late 2024 in the price of querying a model at roughly GPT-3.5's level. Prices at the very top of the frontier have fallen less steeply, because each new generation of more capable models launches at a premium. But for any fixed task that a model could already do, the cost of doing it has collapsed and continues to fall. Switching costs, meanwhile, are lower than in most enterprise software. Most model providers expose similar programming interfaces: send text (and sometimes images or files) in, receive text out, with similar conventions for instructions, tool calls, and structured output. A well-architected application can change providers by changing a configuration and re-running its evaluation suite. The friction that remains — differences in how models respond to the same instructions, provider-specific features, contractual terms — is real but manageable, and far smaller than migrating an enterprise resource planning system. Put these together and the strategic position is clear. Any capability an organization obtains by choosing a particular model, a competitor can obtain by choosing the same model, usually within weeks. Any advantage from being early to a new model lasts until the next release. And the money spent on model access is a cost that will fall regardless of what the organization does. None of this makes the model unimportant — a weak model will sink an otherwise sound system — but it makes the model a necessary input rather than a differentiating one. The temptation to build or train Faced with this, many organizations feel a pull toward building something proprietary at the model layer, as Bloomberg did. The pull usually takes one of three forms. The first is pretraining a model from scratch on the organization's own data. For almost every enterprise this is a poor use of capital. Training a competitive model requires compute budgets in the tens or hundreds of millions of dollars, specialized teams that are scarce and expensive, and enormous quantities of data — far more than any single company's documents. Even organizations with the resources to attempt it face the BloombergGPT problem: by the time the model is trained, evaluated, and deployed, general models have usually caught up on the tasks that motivated it. The exceptions are organizations whose core business is building models, and a small number with genuinely unique data modalities — certain scientific, genomic, or sensor domains — where general text models offer little. The second is fine-tuning: taking an existing model and continuing its training on a smaller, task-specific dataset so that it adopts a particular style, format, or behavior. Fine-tuning is far cheaper and has legitimate uses. It can teach a model to produce output in a consistent house format, to follow a complex classification scheme reliably, or to behave well in a narrow task with fewer instructions — which also reduces the cost of each call. It can be used to distill the behavior of a large, expensive model into a smaller, cheaper one for a specific task, which Chapter 7 returns to as a cost lever. What fine-tuning does poorly is teach a model facts. Knowledge introduced through fine-tuning is hard to update, hard to audit, hard to attribute to a source, and prone to being blended with or overridden by what the model learned in pretraining. When a policy changes, a fine-tuned model must be retrained; a retrieval system needs only an updated document. The third is treating the choice of a single vendor as the strategy: signing a large, exclusive agreement, building tightly around one provider's proprietary features, and declaring the organization's "AI platform" chosen. This can be a sensible procurement decision, especially when it brings security assurances, data residency, and volume pricing. It is a mistake when it hard-wires the organization to one supplier's roadmap in a market where leadership shifts every few months. A useful test for any proposed investment at the model layer is to ask what happens to its value when the next generation of general models arrives. If the investment becomes less valuable — because the new model does natively what the fine-tune was built to do — it is a depreciating asset with a short life. If it becomes more valuable — because a better model can make better use of the same knowledge, data, or workflow — it is the kind of asset worth building. Assets that appreciate when models improve That test points to the three assets introduced at the start of this booklet, and it is worth seeing why each passes it. Proprietary knowledge, structured for use. A well-maintained corpus of an organization's policies, contracts, product data, case histories, and expert judgements, organized so a model can retrieve the right piece at the right moment, becomes more valuable as models improve. A stronger model draws better inferences from the same retrieved material, handles longer and more complex context, and makes fewer errors in synthesis. The knowledge asset is model-agnostic: it can serve whichever model is best this quarter. And it is genuinely hard for a competitor to copy, because it is built from the organization's own operations. Redesigned workflows. A process that has been rebuilt around generative capability — with clear handoffs between model and human, verification steps sized to the risk, and data captured for continuous improvement — becomes more productive with every model upgrade, because the slots in the process where the model works can take on more. The redesign itself, including the organizational learning, trained staff, and changed incentives it embodies, is slow and difficult for competitors to replicate. Evaluation and operating capability. An organization that can measure the quality of its generative systems on its own tasks, quickly and reliably, can adopt better or cheaper models the week they are released, because it can establish within days whether the new model is fit for each use. One that lacks this capability must either stay with what it has or switch on faith. The evaluation suite — a set of realistic test cases with known good answers or scoring rubrics, drawn from the organization's actual work — is one of the least appreciated strategic assets of the generative era. Chapter 8 discusses how to build one. There is a fourth asset worth naming, though it is less a separate item than a byproduct of the others: proprietary feedback data. Every time a human reviews a model's output and approves, edits, or rejects it, the organization learns something about what good output looks like for its specific work. Captured systematically, this record becomes training and evaluation data that no competitor possesses. Most organizations discard it, because their interfaces do not record the edit, or because nobody owns the job of collecting it. Architecture for a commodity input If the model is a commodity, the system around it should be built to treat it as one. Several architectural principles follow. Put an abstraction layer between applications and models. Applications should call an internal gateway rather than a specific provider's interface directly. The gateway handles routing to different models, authentication, logging, rate limits, cost attribution, and fallbacks when a provider is unavailable. When a better or cheaper model appears, it can be adopted behind the gateway for the use cases where evaluation shows it performs well, without changing each application. Many organizations built such gateways in 2024 and 2025, sometimes on open-source components, sometimes as part of a cloud platform. Keep knowledge outside the model. Facts, policies, and data should live in retrieval stores and knowledge graphs that any model can draw on, not in fine-tuned weights. This keeps the knowledge auditable, updatable, permissioned, and portable across models. Keep prompts and instructions under version control, with tests. The instructions that tell a model how to perform a task are a form of code. They should be versioned, reviewed, and tested against the evaluation suite whenever they or the underlying model change, because a model upgrade can change how a given instruction is interpreted. Use more than one model. Different tasks have different requirements. A complex reasoning task on a high-value contract may justify the most capable and expensive model; classifying ten million support tickets by topic does not. Mature deployments typically route tasks to several models of different sizes and prices, and the routing decision is itself a source of large cost savings, as Chapter 7 shows. Treat data handling as a first-class requirement. Because model access usually means sending data to a third party, the contractual and technical terms of that transfer matter: whether inputs may be retained or used for training, where processing occurs, what certifications apply. Most enterprise agreements with major providers now exclude training on customer data by default, and many providers offer regional processing. Where data is sensitive enough that it cannot leave the organization's control, open-weight models running on owned or dedicated infrastructure become attractive, at the cost of taking on the operational burden of serving them. The embedded copilot problem A second, quieter form of commoditization is under way at the application layer, and it deserves separate attention because it affects even organizations that never think of themselves as choosing a model. Since 2023 nearly every major enterprise software vendor has added generative features to its products: assistants inside office suites, email and meeting summarization in collaboration tools, drafting and forecasting assistants inside customer relationship management systems, code assistants inside development environments, and natural-language query inside analytics platforms. These features are often genuinely useful, and for many routine tasks they are the fastest and cheapest way to get value from generative AI. A team that wants its meeting notes summarized should not build a custom system to do it. But the features that come bundled with a widely used product are, by construction, available to every customer of that product. They raise the baseline for everyone; they do not differentiate anyone. An insurer whose underwriters use the same office-suite assistant as every other insurer's underwriters has gained the same productivity increment as its rivals, and nothing more. The embedded copilot is the purest case of the commodity input: useful, necessary to keep up, and incapable by itself of producing advantage. There is a further subtlety. Embedded assistants are only as good as the knowledge they can reach, and each vendor's assistant naturally reaches best into that vendor's own data. The assistant in the customer relationship system knows the customer records but not the contract repository; the one in the document suite knows the documents but not the operational databases. An organization that relies entirely on embedded assistants ends up with its knowledge fragmented along vendor boundaries, each assistant seeing one slice of the business. Questions that cut across systems — which are often the valuable ones — fall between them. The practical response is to separate two categories of use. For generic productivity tasks that look the same in every company, embedded features are usually the right choice, and the decision is a procurement one. For tasks that depend on the organization's distinctive knowledge and workflows — where the advantage is meant to lie — the organization should own the knowledge layer itself, structured and governed independently of any one application vendor, and expose it to whichever models and interfaces suit the task. Increasingly, standard protocols for connecting models to data sources, discussed in Chapter 9, make it possible for an organization's own knowledge services to feed into vendors' assistants as well as into custom applications, which reduces the tension between the two approaches. What matters is that the knowledge itself, and the right to decide how it is structured, remain the organization's. The narrow exceptions There are organizations for which the model layer is a legitimate place to invest, and it is worth being precise about who they are. Companies whose product is a model, or whose product depends on capabilities no general model provides, obviously belong here. So do organizations with data of a fundamentally different kind from text — protein sequences, seismic readings, medical images at scale, industrial sensor streams — where specialized models trained on that data can do things general models cannot. A few very large organizations with massive, repetitive, well-defined workloads may find that training or heavily fine-tuning their own smaller models produces material savings in inference cost, provided they have the evaluation discipline to know when a general model has overtaken their specialized one. For everyone else, the useful posture toward models is that of a sophisticated buyer of a fast-improving commodity: maintain the ability to evaluate and switch, negotiate sensibly, avoid unnecessary lock-in, and direct investment to the assets that grow in value as the commodity improves. The next chapter turns to the first of those assets — the redesign of work — and to the question every deployment must answer first: which work should a model do at all? CHAPTER 3 Choosing the Work Most enterprise generative AI programs begin with an inventory of use cases. A steering committee solicits ideas from every function, receives several hundred, scores them on a grid of value and feasibility, and funds the top twenty. Two years later a handful are in production, a few more are in perpetual pilot, and the rest have quietly lapsed. The scoring grid was not wrong so much as blind to the factor that decides whether a generative deployment pays: how much it costs to know that the output is right. This chapter offers a different way to choose the work. It starts from the observation, made in Chapter 1, that generative systems produce artifacts rather than scores, and that every artifact must be trusted before it is used. The economics of a deployment therefore depend on three quantities — how much effort the model saves in producing the artifact, how much effort it takes to verify the artifact, and how much damage an unverified error would cause. Everything else is secondary. The verification equation Consider a task that a skilled person currently completes in time P, the production time. A generative system can produce a draft of the same artifact almost instantly. But someone must then check and correct it, taking time V, the verification time. The saving is roughly P minus V. If verification takes nearly as long as production, the system saves almost nothing, however impressive its output looks. If verification is fast relative to production, the saving is large. This crude arithmetic explains a great deal. It explains why code generation has been among the most successful enterprise uses: writing a function may take an engineer an hour, while running its tests and reading it takes minutes, and the tests do much of the verifying automatically. It explains why drafting routine customer correspondence works well: an agent can read and approve a two-paragraph reply in seconds. And it explains why some apparently attractive uses disappoint. A model that drafts a forty-page regulatory submission saves little if a specialist must then check every claim against source documents line by line; the production time was mostly the time spent establishing facts, and that work has not gone away. Verification time is not fixed. It can be reduced by design, and much of the craft of deploying generative systems lies in doing so. Four techniques recur. Make the output checkable against a source. A summary that cites the specific passages it draws from can be checked by following the citations; one that does not must be checked against the entire underlying document. Systems that show their sources, and that are designed to say nothing they cannot attribute, cut verification time dramatically. This is one of the main practical benefits of the retrieval architectures discussed in Chapter 4. Constrain the output's form. A model asked to extract twelve named fields from an invoice into a fixed schema produces output that can be validated automatically: dates must parse, totals must equal the sum of line items, supplier identifiers must exist in the vendor master. Free-form output resists such checks. Wherever a task can be framed as producing structured data rather than prose, verification becomes cheaper and partly automatic. Verify by exception. If a system can attach a reliable signal of its own uncertainty — or if independent checks can flag suspect output — then humans need to review only the flagged fraction. A claims-processing system that routes eighty-five percent of routine claims straight through and sends fifteen percent for review saves far more than one that requires a human to look at everything. The hard part is making the routing trustworthy, which requires measuring how often the unflagged output is actually wrong. Split the task so that the hard part stays human. Many tasks contain a small judgement-heavy core surrounded by a large volume of routine assembly. A model can assemble the case file, draft the standard sections, and pull the relevant precedents, leaving the expert to make the judgement and write the critical paragraph. Verification of the routine parts is quick, and the expert's time goes where it matters. The cost of an unverified error The second quantity is the cost of the errors that get through. No verification is perfect, and some deployments deliberately verify only a sample. The question is what happens when a wrong answer reaches the world. Errors differ by orders of magnitude in cost. A wrong product recommendation in an online store costs a missed sale. A wrong answer about a refund policy, as Air Canada learned, costs the refund and some reputation. A wrong figure in a public financial statement, a wrong dosage in clinical guidance, or a wrong clause in a binding contract can cost far more, and some errors — in safety-critical operations, for example — are not recoverable at any price. A practical way to use this is to sort candidate tasks along two dimensions: the cost of a single error, and how easily errors are caught downstream before they cause harm. Tasks with low error costs and natural downstream catches — internal drafts that colleagues will read, search over internal documentation, coding with test suites, first-pass triage of support tickets that agents will see anyway — are the natural starting point. Tasks with high error costs and no downstream catch — final customer commitments, regulatory filings, automated actions in financial or physical systems — demand either very strong verification or should stay with people until the organization has a track record. This sorting tends to surprise steering committees, because the most valuable use cases on a conventional scoring grid are often in the dangerous corner. The temptation is to start with the high-value, high-risk application because it makes the strongest business case. Organizations that do so usually stall, because the verification burden is so heavy that the savings evaporate, or because a visible early error destroys confidence in the whole program. Those that start in the safe corner build the evaluation tools, operating skills, and organizational trust that later make the harder applications feasible. Finding the work: tasks, not jobs Generative systems do not do jobs; they do tasks. Research on the exposure of occupations to language models, such as the study by Tyna Eloundou and colleagues published in Science in 2024, assessed occupations task by task and found that a large share of the US workforce had at least some tasks exposed — but far fewer had most of their tasks exposed. The practical implication is that the unit of analysis for deployment should be the task within a workflow, not the role. A sound method for finding the work proceeds in three steps. First, map a workflow end to end — not the official process diagram, but what people actually do, including the searching, copying, reformatting, and waiting. In knowledge-intensive processes a surprising share of time goes to finding information, assembling it into a usable form, and translating it from one format to another. These are often exactly the tasks generative systems handle well, and they are frequently invisible on official process maps. Second, characterize each task by its production time, its verification time with and without design changes, its error cost, and its volume. Volume matters because the investment in building, evaluating, and governing a generative component is substantial and must be spread across many executions. A task performed fifty times a year rarely justifies a dedicated system, even if each instance is laborious; a task performed fifty thousand times a year often does, even if each instance is quick. Third, look for chains. The largest gains come not from automating isolated tasks but from rebuilding sequences of tasks so that information flows through them without manual handoffs. A procurement process in which a model reads an incoming supplier quote, extracts the terms, compares them against the contract framework and the approved vendor list, drafts the approval memo, and routes exceptions to a buyer, saves far more than five separate tools that each automate one step while leaving people to carry outputs between them. The jagged frontier in practice The Dell'Acqua study described in Chapter 1 introduced the image of a jagged frontier: models perform well on some tasks and poorly on others in a pattern that does not track human intuitions about difficulty. A model may write sophisticated analysis of a strategic problem and then make an error in simple arithmetic within the same response; it may summarize a hundred-page contract accurately and then misread a table on page three. For deployment, the jaggedness means that capability must be established empirically for each task, using the organization's own material, rather than inferred from public benchmarks or vendor demonstrations. Benchmarks measure performance on curated tasks that may resemble yours only superficially. Demonstrations are selected to succeed. The only reliable guide is a test set drawn from the actual work, scored against what a competent person would have produced. This testing need not be elaborate at the outset. A team considering a contract-review assistant can assemble fifty real contracts with known issues, run the system over them, and have a lawyer score the results in a few days. That exercise will reveal more about the system's fitness than any amount of reading about model capabilities, and the test set becomes the seed of the evaluation suite that later protects the deployment against model changes. The jaggedness also argues for designs that keep humans engaged rather than complacent. The consultants in the Dell'Acqua study who did worst on the outside-the-frontier task were those who accepted the model's plausible answer without scrutiny. Interfaces that present output as a draft to be worked on rather than a finished product, that highlight uncertain or unsupported claims, and that make verification the natural next step help people stay alert. The goal is to calibrate trust, not to maximize it. Augment, automate, or transform Tasks chosen for generative support fall into three broad patterns, and it helps to be clear at the outset which pattern a given deployment follows, because they differ in how value is measured and captured. Augmentation gives people a tool that makes them faster or better at work they continue to own: a drafting assistant, a research aide, a coding copilot. The human remains responsible for the output. Value shows up as time saved or quality improved, and it converts into financial results only if the organization redeploys the saved time. Augmentation is the easiest pattern to start with and the hardest to measure, because the gains are diffuse and depend on how individuals use the tool. Automation hands a task to the system end to end, with humans handling exceptions and auditing samples. Invoice extraction, ticket classification, routine document generation, and first-line customer responses often follow this pattern. Value is easier to measure — cost per transaction, throughput, error rate — but the verification design must be strong, because most output is never seen by a person before it takes effect. Transformation redesigns a process or offering around capabilities that did not previously exist. An insurer that can now give brokers a fully reasoned quote in minutes rather than days, or a manufacturer that can let customers configure complex products in natural language with engineering validation in the loop, is not merely saving labor on an existing process; it is changing what it offers. Transformation carries the highest potential value and the highest execution risk, and it almost always depends on the knowledge and workflow assets this booklet emphasizes. Most organizations should expect to move through these patterns in sequence within a given domain, using augmentation to learn where the model is reliable, automation to capture the gains in well-understood tasks, and transformation once the knowledge assets and operating capability are mature. Four traps in choosing use cases Even with a sound method, use-case selection goes wrong in recognizable ways. Four traps account for a large share of stalled programs. The first is demonstration bias. Use cases are often chosen because a demonstration was impressive, and demonstrations are impressive for reasons that have little to do with production value. A model that drafts an elegant strategy memo in thirty seconds makes a powerful impression in a meeting; whether anyone needs more strategy memos, and whether verifying them would take less time than writing them, does not come up. Good selection asks of every compelling demonstration: how often does this task occur, how long does it take now, and how long would checking the output take? The second is the chat-window default. Because the most familiar generative interface is a conversational assistant, many deployments take that form whether or not it suits the work. A chat window places the burden on the user to know what to ask, to phrase it well, and to carry the result into wherever it is needed. For many processes the better design is invisible: the model runs inside the existing workflow, triggered by an event — a document arriving, a ticket opening, a form being submitted — and its output appears where the person already works, as a pre-filled field, a flagged issue, or a draft ready for approval. Embedded designs are harder to build than a chat interface, and they are usually where the large gains lie. The third is pilots without baselines. A surprising number of pilots are launched without measuring how the work is done today: how long tasks take, how many errors occur, what the cost per case is. At the end of the pilot, participants report that the tool was helpful, but nobody can say by how much, and the business case for scaling rests on enthusiasm. Measuring the baseline before the pilot begins costs little and is the only way to know whether the pilot worked. Where possible, a comparison group that continues without the tool, as in the Brynjolfsson study's staggered rollout, gives far more reliable evidence than before-and-after comparisons, which are confounded by everything else that changes over the same period. The fourth is the long tail of small tools. When use-case selection is decentralized and every team funds its own small assistant, the organization ends up with dozens of tools, each serving a narrow purpose for a few people, each with its own prompts, its own copy of some documents, its own costs, and its own governance gaps. None is large enough to justify proper evaluation or maintenance, and together they produce a fragmented landscape that is expensive to secure. The remedy is not to forbid experimentation, which is how organizations learn, but to graduate successful experiments onto shared infrastructure and to concentrate investment on a smaller number of workflows where the volume justifies doing it properly. A worked example: commercial insurance underwriting To see how these principles fit together, consider a commercial property insurer whose underwriters receive submissions from brokers: an application form, a schedule of properties, loss history, inspection reports, and assorted correspondence, often as a bundle of PDFs and spreadsheets in inconsistent formats. Underwriters spend much of their time reading and reorganizing this material before they can exercise judgement on price and terms. Mapping the workflow reveals several tasks: classifying the incoming submission and checking it for completeness; extracting property attributes, values, and construction details into the rating system; summarizing loss history; comparing the risk against underwriting guidelines; researching the insured's business; making the pricing and terms decision; and drafting the quote letter. Applying the verification lens sorts these quickly. Classification and completeness checks are high-volume, low-error-cost, and easy to verify, so they are good candidates for automation with sampled review. Extraction into the rating system is high-volume and verifiable against the source documents and against automated plausibility checks, so it suits automation with exception routing. Summarizing loss history and comparing against guidelines is augmentation: the model drafts, cites sources, and flags guideline issues, and the underwriter reviews. The pricing decision stays with the underwriter. The quote letter is drafted by the model from the decision and reviewed in seconds. The guideline comparison is where the insurer's proprietary knowledge enters. A general model knows nothing about this insurer's appetite, its exclusions for certain construction types, or the informal rules senior underwriters apply. Making that knowledge available — structured, current, and attributable — is what turns a generic document reader into a tool that encodes the company's underwriting practice. It is also the part no competitor can buy. The next three chapters turn to how that is done. Hashtags: #TheGenerativeEnterprise #GenerativeAI #EnterpriseAI #LargeLanguageModels #LLMDeployment #AICompetitiveAdvantage #AITransformation #DigitalTransformation #AIForBusiness #EnterpriseAIArchitecture #RetrievalAugmentedGeneration #RAG #KnowledgeGraphs #EnterpriseKnowledgeManagement #ProprietaryData #WorkflowAutomation #BusinessProcessOptimization #AIProductivity #AIImplementation #AIAdoption #AIModelEvaluation #AIInferenceOptimization #AIROI #AIInvestmentStrategy #AgenticAI #AIWorkflowDesign #HumanInTheLoop #ResponsibleAI #AIGovernance #BusinessInnovation
- Service Mesh Architecture (Istio, Linkerd, and Envoy Proxies)
Download the Book (PDF): Introduction Every organization that breaks a monolith into services discovers the same thing, usually about eighteen months in. The individual services are fine. Each one is small enough for a team to understand, test, and deploy on its own schedule. What nobody understands any more is the space between them. A single customer request now crosses twelve network hops instead of twelve function calls, and each of those hops can be slow, can fail, can be intercepted, and can be misrouted. The code that used to live in a call stack now lives in a distributed system, and distributed systems fail in ways that call stacks never did. The first response is almost always a library. Somebody writes a shared HTTP client with retries, timeouts, and a circuit breaker. Somebody else adds tracing headers. A third team bolts on TLS. Within a year the organization has three versions of the library in production, two languages that cannot use it at all, and a security audit that asks a simple question nobody can answer: which services are allowed to talk to which other services, and can you prove that the traffic between them is encrypted? A service mesh is the architectural answer to that question. It takes the networking concerns that every service shares — encryption, identity, routing, retries, timeouts, load balancing, telemetry — and moves them out of application code into a dedicated infrastructure layer. That layer is made of proxies that sit in the path of every request, and a control plane that tells those proxies what to do. The application opens a plain connection to another service by name. The mesh turns that connection into an authenticated, encrypted, observed, policy-checked, retried, load-balanced exchange, without the application knowing. That description sounds like a free lunch. It is not, and the central argument of this booklet is that a service mesh is worth running only when you account for it honestly as a product your platform team owns, with real costs in compute, latency, operational attention, and failure surface. The history of the technology over the past decade is largely the history of the industry learning what those costs are and redesigning the mesh to lower them. The early pattern of putting a full proxy next to every single application instance — the sidecar — delivered the capabilities but charged a per-pod tax that many organizations decided was not worth paying. The current generation of designs, including Istio's ambient mode and the steady standardization of configuration around the Kubernetes Gateway API, is the result of that lesson. The three names in the title Three projects dominate any serious discussion of service mesh architecture, and they are not three versions of the same thing. Envoy is a proxy. It was written at Lyft, open-sourced in 2016, and became one of the earliest graduated projects of the Cloud Native Computing Foundation. Envoy is a high-performance, programmable layer 4 and layer 7 proxy written in C++, whose defining feature is that it can be reconfigured entirely at runtime through a set of streaming APIs collectively called xDS. Envoy by itself is not a mesh. It is the engine that several meshes, API gateways, and load balancers are built from. Istio is a mesh. It was announced in 2017 by Google, IBM, and Lyft, uses Envoy as its proxy, and graduated in the CNCF in 2023. Istio is the most feature-rich of the widely deployed meshes and, historically, the most complex. It is also the project that has done the most to rethink the data plane, with its ambient mode reaching general availability in version 1.24 in November 2024. As of autumn 2026 the current release line is 1.31. Linkerd is also a mesh, and the oldest of the three ideas. Buoyant, the company behind it, coined the term "service mesh" around its first version. The current generation, Linkerd 2.x, deliberately does not use Envoy. It uses a purpose-built proxy written in Rust, called linkerd2-proxy, and its design philosophy is to do fewer things with less configuration and a smaller resource footprint. Linkerd graduated in the CNCF in 2021. Its release model changed significantly in 2024, when the open-source project stopped publishing stable releases and moved stable builds into a commercial distribution; this booklet explains what that means in practice in its later chapters. Understanding the relationship among these three — one proxy and two meshes with opposite philosophies — is the key to most of the architectural decisions a platform team faces. What this booklet covers The book moves from the problem, to the mechanism, to the operating reality. Chapter 1 sets out the problem the mesh solves: why networked services fail differently from local code, what organizations tried before meshes, and where the boundary sits between what belongs in the mesh and what belongs in the application. Chapter 2 opens up the architecture: the split between data plane and control plane, how Envoy is built, how xDS distributes configuration, and how Istio and Linkerd each assemble those parts. Chapter 3 covers sidecar injection and traffic interception in concrete detail: the admission webhooks that rewrite pod specifications, the iptables rules that capture traffic, the CNI plugins that replace them, and the startup and shutdown races that cause most first-week mesh incidents. Chapter 4 is about identity and mutual TLS: how a mesh issues cryptographic identities to workloads, how certificates rotate, how to migrate a running cluster from plaintext to strict mTLS without an outage, and how identity becomes the foundation for authorization policy. Chapter 5 deals with traffic management and resilience: routing rules, timeouts, retries, circuit breaking, and outlier detection, and the ways these features cause outages when configured without thought. Chapter 6 focuses on traffic splitting for canary releases and progressive delivery, including automated analysis tools that promote or roll back a release based on what the mesh observes. Chapter 7 covers observability: the golden metrics a mesh produces for free, the distributed tracing it can only half produce for free, and the cost of telemetry at the scale of hundreds of services. Chapter 8 examines the move beyond the sidecar: Istio's ambient mode with its node-level ztunnel and optional waypoint proxies, the Gateway API and its mesh extension, and how these developments are reshaping the choice between products. Chapter 9 is about operating a mesh at scale: choosing between Istio and Linkerd, upgrading without downtime, managing configuration across hundreds of services and multiple clusters, and the failure modes that show up only in production. The conclusion draws out what follows from all of this for teams deciding whether, when, and how to adopt a mesh. Who this is for The intended reader is an engineer, architect, or technical leader who knows what a container, a Kubernetes pod, and an HTTP request are, and who wants to understand service meshes well enough to make decisions about them. No prior experience with Istio, Linkerd, or Envoy is assumed. Configuration snippets appear where they teach something specific; they are written against current APIs as of late 2026, but the argument of each chapter is carried by the prose, and the snippets illustrate it rather than replace it. One scope note matters. The mesh concept is not limited to Kubernetes — Istio and Consul both support virtual machines, and Envoy runs anywhere — but in practice the overwhelming majority of mesh deployments run on Kubernetes, and all three of the projects discussed here are designed around it. This booklet therefore assumes Kubernetes as the substrate unless it says otherwise. A mesh is not magic and it is not mandatory. Many organizations with dozens of services run perfectly well without one. But for organizations operating hundreds of services across multiple teams, languages, and clusters, with security requirements that demand encryption and authenticated identity on every internal connection, the mesh has become the standard answer. The rest of this booklet is about how it works, what it costs, and how to run it well. Chapter 1: The Problem Between Services A function call inside a single process has properties that programmers take for granted. It either returns or throws. It takes nanoseconds. Nobody can read its arguments in transit. It cannot reach the wrong function because a DNS record went stale. When it fails, the stack trace tells you where. Split that same function into a separate service behind a network call and every one of those properties disappears. The call can hang forever. It can succeed on the server and fail on the client, so you do not know whether to retry. It takes milliseconds rather than nanoseconds, and those milliseconds vary wildly. Anyone with access to the network path can read or modify the payload. And when it fails, the evidence is scattered across two machines' logs, with clocks that disagree. In the 1990s, engineers at Sun Microsystems summarized these traps as the fallacies of distributed computing: the network is reliable, latency is zero, bandwidth is infinite, the network is secure, topology does not change, there is one administrator, transport cost is zero, and the network is homogeneous. Every one of those fallacies is something a microservice architecture forces you to confront dozens or hundreds of times over, once for every pair of services that talk to each other. What every service ends up needing When you look at what mature organizations bolt onto their services to cope with the network, the list is remarkably consistent. Service discovery and load balancing. A caller needs to find a healthy instance of the service it wants. In Kubernetes, a Service object gives a stable virtual IP, and kube-proxy spreads connections across the pods behind it. But kube-proxy balances at the level of TCP connections, not requests. A client that opens one long-lived HTTP/2 or gRPC connection will send every request down that one connection to one pod, no matter how many replicas exist. Request-level balancing, with algorithms that account for latency or queue depth, requires something that understands the protocol. Timeouts. Every remote call needs an upper bound, or one slow dependency will exhaust the threads or connections of everything upstream. Timeouts need to be coordinated: a caller with a two-second budget that calls a service with a five-second internal timeout will give up long before the callee does, wasting work. Retries. Transient failures — a pod that is shutting down, a connection reset, a momentary overload — are often survivable by trying again. But retries are dangerous. They are only safe for idempotent operations, they multiply load during exactly the moments when a system is already struggling, and when every layer of a deep call chain retries three times, a single failure at the bottom can produce dozens of requests at the top. Circuit breaking and outlier detection. When a dependency is failing, the kind thing to do is stop sending it traffic for a while so it can recover, and fail fast in the meantime. When one instance among many is bad, the useful thing is to eject that instance from the load-balancing pool. Encryption and authentication. Traffic inside a data center or cloud network used to be treated as trusted. That assumption has not survived contact with modern threat models, compliance regimes, or the reality of multi-tenant clusters. Encrypting internal traffic and authenticating both ends of each connection is now an explicit requirement in many regulated industries, and is a core component of what the US National Institute of Standards and Technology describes as zero trust architecture in its Special Publication 800-207. Authorization. Once you know who is calling, you want to decide whether they are allowed to. The payments service should accept calls from checkout, not from the marketing recommendation engine. Telemetry. For every service-to-service call you want request rates, error rates, and latency distributions, and for complex requests you want a trace that follows the request across every hop so you can see where the time went. None of these concerns has anything to do with the business logic of the service. They are the same for a payments service and a recommendations service. That sameness is the opening that a service mesh exploits. The library era and its limits Before meshes, the standard approach was a shared library. The most influential examples came from companies that hit the microservices wall early. Twitter built Finagle, a Scala RPC library that handled load balancing, retries, timeouts, and service discovery. Netflix built a family of Java libraries: Eureka for discovery, Ribbon for client-side load balancing, and Hystrix for circuit breaking and isolation. Google's internal Stubby RPC framework, which later inspired gRPC, played a similar role. These libraries worked. Netflix and Twitter ran enormous systems on them. But they carried three structural problems that became more painful as organizations grew. The first is language lock-in. A Java library helps Java services. When a team wants to write a service in Go, Python, Node.js, or Rust, it either goes without the protections or someone must port and maintain the library in that language, with identical semantics. Retries and circuit breakers that behave subtly differently in different languages are a source of bugs that are almost impossible to find. The second is upgrade coupling. A fix to the retry logic, a new TLS cipher requirement, or a change to the service discovery protocol means every team must rebuild and redeploy every service. In an organization with hundreds of services owned by dozens of teams, fleet-wide library upgrades take months, and there is always a long tail of services that never get done. Netflix eventually put Hystrix into maintenance mode in 2018, and the reasons it gave included a shift toward more adaptive approaches; the deeper point is that resilience logic compiled into every binary is hard to evolve. The third is ownership confusion. When networking behavior lives inside the application, the application team owns it, whether or not they understand it. A platform team that wants to enforce a security policy — every call must be encrypted, every service must present an identity — has no way to do it except by asking every application team to adopt and correctly configure the library. The sidecar proxy is the move that resolves all three problems at once. Instead of linking networking code into the application, you run it in a separate process next to the application. The application talks plain HTTP or gRPC to localhost, or simply to the destination's normal address, and the proxy intercepts the connection and does everything else. The proxy is language-agnostic because it operates on the wire protocol. It can be upgraded by the platform team without rebuilding the application. And it is owned by the platform team, which can enforce policy uniformly. That is the core idea of a service mesh. The term, popularized by Buoyant around its first Linkerd release, describes the network of proxies that results when every service has one: a mesh of proxies through which all service-to-service traffic flows, configured and coordinated from a central control plane. A short history of the mesh The lineage is worth knowing because it explains design decisions that persist today. Linkerd's first version, released in 2016, was built directly on Finagle and ran on the Java Virtual Machine. It brought Twitter's library-era capabilities to any language by putting them in a proxy. It worked, but the JVM made it heavy — hundreds of megabytes of memory per instance — so it was typically deployed one per host rather than one per pod. Envoy was open-sourced by Lyft in September 2016. Matt Klein and his colleagues had built it to replace a tangle of load balancers and libraries in Lyft's own architecture. Envoy's key innovations were architectural rather than feature-level: it was written in C++ for predictable performance and memory, it treated observability as a first-class output, and above all it was designed to be configured dynamically through APIs rather than through files and reloads. That last property made it an ideal building block for a control plane to drive. Istio was announced in May 2017 as a collaboration among Google, IBM, and Lyft. It paired Envoy sidecars with a control plane that, in its early versions, was split into several separate components: Pilot for traffic configuration, Mixer for policy and telemetry, and Citadel for certificates. Mixer in particular became notorious, because it sat in the request path or close to it and added latency and resource cost to every call. Istio's 1.5 release in 2020 consolidated the control plane into a single binary, istiod, and moved telemetry into Envoy itself. That consolidation was the first of several major simplifications in Istio's history, and the decision to make it was an admission that the original architecture had put too much in the request path. Buoyant rewrote Linkerd from scratch in 2018 as Linkerd 2, with a control plane in Go and a new data plane proxy in Rust. The Rust proxy was small, fast, and memory-safe, and was designed only to be a sidecar for Linkerd — not a general-purpose proxy. That narrowness was the point: by giving up Envoy's generality, Linkerd could make the proxy smaller and the configuration surface far simpler. Other meshes appeared in the same period. HashiCorp's Consul added a mesh mode, Consul Connect, that could use Envoy. AWS launched App Mesh, also on Envoy; AWS later announced it would discontinue App Mesh, with the service ending in September 2026, and pointed customers toward its Amazon ECS Service Connect and VPC Lattice offerings. Cilium, the eBPF-based Kubernetes networking project, added service mesh features that push as much as possible into the Linux kernel and use Envoy only for layer 7 processing. Kuma, created by Kong and donated to the CNCF, offered an Envoy-based mesh with a multi-zone focus. For most organizations evaluating a mesh in 2026, though, the realistic choice comes down to Istio or Linkerd, with Cilium as an option for organizations that already run it as their network plugin. This booklet focuses on Istio and Linkerd for that reason, and on Envoy because so much of the mesh world, including Istio, is built on it. Where the mesh stops and the application begins A mesh does not remove the need for applications to think about the network. It changes which parts they need to think about. Getting this boundary right is one of the most important design decisions in a mesh adoption, and getting it wrong is behind many disappointed mesh projects. The mesh is good at things that can be decided from the outside, looking at the wire. It can see that a request to the inventory service returned HTTP 503 and retry it. It can enforce that only workloads with the identity of the checkout service may call the payments service. It can measure that the 99th percentile latency between two services rose from 40 to 400 milliseconds. It can send 5 percent of requests to a new version. The mesh is bad at things that require understanding what a request means. It cannot know whether a POST request that timed out was applied on the server, so it cannot know whether retrying it is safe. Only the application can make an operation idempotent, for example by attaching an idempotency key and deduplicating on the server. The mesh cannot decide what a degraded response should look like when a dependency is down: whether the product page should show stale recommendations, no recommendations, or an error. It cannot propagate a trace across a service boundary unless the application copies the trace headers from incoming requests onto its outgoing ones, a point Chapter 7 explains in detail. And it cannot authorize at the level of business objects: it can say that the orders service may call the billing service, but not that a particular user may see a particular invoice. A useful rule is that the mesh owns transport-level policy, and the application owns semantic policy. Encryption, identity, connection-level authorization, load balancing, safe retries of clearly transient failures, timeouts as a last line of defense, and telemetry belong to the mesh. Idempotency, fallback behavior, business authorization, deadline propagation tied to user experience, and trace context propagation belong to the application, or to a thin library that the application uses. Organizations that expect the mesh to solve semantic problems end up configuring aggressive retries that duplicate payments, or circuit breakers that turn a partial failure into a total one. What a mesh costs Every capability described above has a price, and an honest assessment starts by naming each one. Compute and memory. In a sidecar mesh, every pod gets an extra container. Istio's own published performance figures, measured on version 1.24, put an Envoy sidecar at about 0.20 vCPU and 60 MB of memory when handling 1,000 HTTP requests per second with 1 KB payloads. That is modest for a single pod. Multiply it across several thousand pods, many of which handle far less traffic but still pay the baseline memory cost, and the mesh can account for a meaningful percentage of a cluster's total resource requests. Linkerd's Rust proxy is generally smaller, which is one of its main selling points, but it is not free either. Latency. Every request in a sidecar mesh passes through two proxies: one on the client side and one on the server side. Each adds parsing, policy evaluation, and, with mTLS, encryption. For most services the added latency is a small fraction of a millisecond at the median and a few milliseconds at the tail, which is negligible against business logic and database calls. For latency-sensitive services making long chains of calls, it can matter. Operational complexity. A mesh is a distributed system that sits in the path of every request. It has its own upgrades, its own configuration language, its own failure modes, and its own security advisories. When it breaks, everything breaks. Somebody has to understand it deeply, and that somebody must be available at 3 a.m. Debugging indirection. When a request fails in a meshed system, there are now more places the failure could originate: the client application, the client proxy, the network, the server proxy, or the server application. Engineers who used to read one log now need to know how to read proxy logs, interpret proxy-specific response flags, and query the control plane's view of configuration. Configuration risk. The mesh's power to change traffic behavior centrally is also a power to break traffic centrally. A single bad routing rule, applied mesh-wide, can take down every service at once. None of these costs is a reason not to run a mesh. They are reasons to run one deliberately: to adopt it for specific problems you can name, to staff it as the critical infrastructure it is, and to measure whether it is delivering. The remaining chapters explain how each part of the mesh works so that those decisions can be made with eyes open. The first step is to look inside the machine: the proxies, the control plane, and the protocol that connects them. Chapter 2: Anatomy of a Mesh Every service mesh, whatever its branding, has the same two-part structure. The data plane is the set of proxies that actually touch traffic: they accept connections, parse requests, encrypt bytes, pick backends, and emit metrics. The control plane is the set of components that do not touch traffic at all: they watch the cluster, compute what each proxy should be doing, distribute that configuration, and issue the certificates the proxies need. The distinction matters operationally because the two planes fail differently. If the control plane goes down, the data plane keeps running with its last known configuration; traffic keeps flowing, but nothing changes — new pods are not discovered, new certificates are not issued, and new routing rules do not take effect. If the data plane fails, traffic fails. This chapter looks at each plane in turn, with Envoy as the reference data plane, then shows how Istio and Linkerd assemble the pieces. Inside Envoy Envoy is the most widely deployed mesh proxy, and its internal model shapes how Istio and many other systems express configuration. Understanding four of its concepts — listeners, filter chains, routes, and clusters — explains most of what a mesh can do. A listener is a socket that Envoy binds and accepts connections on. In a sidecar deployment, Envoy typically has one listener capturing all outbound traffic from the application and another capturing all inbound traffic to it, plus virtual listeners for specific ports and destinations. Each listener has one or more filter chains. When a connection arrives, Envoy selects a filter chain based on properties such as the destination port, the TLS server name, or the application protocol negotiated during the TLS handshake. The chain is a pipeline of network filters. The most important is the HTTP connection manager, which turns a byte stream into HTTP requests and runs them through a second pipeline of HTTP filters: authentication, authorization, rate limiting, fault injection, compression, and finally the router. The router filter consults a route configuration: a list of virtual hosts, each with ordered rules that match requests by path, headers, method, or query parameters and decide what to do with them. A route can forward to a destination, redirect, return a direct response, rewrite the path, add or remove headers, set a timeout, and apply a retry policy. The destination of a route is a cluster: a named group of upstream endpoints that Envoy treats as interchangeable. A cluster carries the load-balancing algorithm (round robin, least request, ring hash, Maglev, and others), connection pool limits, circuit breaker thresholds, outlier detection settings, health checking, and the TLS settings for connecting upstream. The individual addresses inside a cluster are endpoints, grouped by locality so that Envoy can prefer nearby backends. Envoy's threading model is part of why it performs well. A main thread handles configuration and administration. A set of worker threads, usually one per CPU core allotted to the process, each runs its own event loop and owns its connections for their whole lifetime. Connections do not migrate between threads, so the hot path needs very little locking. Configuration updates are published to workers by swapping thread-local pointers, which is how Envoy can change its routing tables while serving traffic without dropping requests. Envoy also produces an extraordinary amount of telemetry. It keeps counters, gauges, and histograms for every listener, cluster, and route, and it can write detailed access logs. One field in those logs deserves special mention because it is the single most useful debugging tool in an Envoy-based mesh: the response flags. When Envoy itself, rather than the upstream service, is responsible for a failure, it records a short code explaining why. UF means upstream connection failure. UO means upstream overflow, which is to say the circuit breaker tripped. NR means no route was configured for the request. URX means the request was rejected because the retry limit was reached. UH means there were no healthy upstream hosts. An engineer who sees a 503 in an Envoy access log should read the response flag before doing anything else, because it distinguishes between "the service returned 503" and "the proxy decided not to send the request at all". Envoy can be extended with filters compiled into the binary, with Lua scripts, with WebAssembly modules, and with external processing services that receive request data over gRPC. Istio exposes these extension mechanisms through its own APIs; Istio 1.30 introduced a unified TrafficExtension resource intended to replace its older WasmPlugin API for configuring Wasm and Lua extensions across sidecars, gateways, and waypoint proxies. xDS: how the control plane talks to proxies Envoy can be configured from a static YAML file, but in a mesh it never is. Instead, at startup it is given a minimal bootstrap configuration that tells it where its control plane is, and everything else arrives over a set of gRPC streaming APIs collectively known as xDS, short for "x Discovery Service", where the x stands for the type of resource being discovered. The core members of the family map directly onto the concepts above: • LDS, the Listener Discovery Service, delivers listeners. • RDS, the Route Discovery Service, delivers route configurations. • CDS, the Cluster Discovery Service, delivers clusters. • EDS, the Endpoint Discovery Service, delivers the endpoints inside each cluster. • SDS, the Secret Discovery Service, delivers TLS certificates and keys. In practice meshes usually multiplex all of these over a single connection, called the Aggregated Discovery Service, or ADS, which lets the control plane control the ordering of updates. Ordering matters. If a new route that points to a new cluster arrives before the cluster itself, Envoy will briefly route requests to a destination it does not know about and return errors. The xDS protocol specifies a "make before break" sequence — clusters, then endpoints, then listeners, then routes — that avoids this. xDS has two variants. In the original "state of the world" mode, every update for a resource type contains the full set of resources of that type. In a large mesh, that means a single endpoint change might cause the control plane to resend thousands of cluster definitions to every proxy. The newer incremental or delta mode sends only what changed. This distinction is not academic: the cost of pushing configuration is one of the main factors limiting how large a mesh can grow, and Chapter 9 returns to it. The xDS protocol has outgrown Envoy. Its API definitions are now maintained in a separate repository under the CNCF, and gRPC itself can act as an xDS client. A gRPC application can be configured to fetch routing and load-balancing policy directly from a mesh control plane without any sidecar at all, a pattern called proxyless gRPC. Istio supports it experimentally. It trades the language-agnostic property of the sidecar back for zero proxy overhead, which makes sense for a narrow class of high-throughput gRPC services. How Istio assembles the parts Istio's control plane today is a single binary, istiod, which combines what used to be three separate components. It watches the Kubernetes API server for Services, Endpoints (in their modern EndpointSlice form), Pods, and Istio's own custom resources. It translates all of that into Envoy configuration and serves it over xDS to every proxy in the mesh. It acts as a certificate authority, signing certificates for each workload's identity. And it runs the admission webhook that injects sidecars into new pods. Istio's configuration is expressed through custom resources that sit at a higher level than raw Envoy configuration. The most important traditional ones are: • VirtualService, which defines routing rules for traffic addressed to a host: match on path or header, split by weight, set timeouts and retries, inject faults. • DestinationRule, which defines policy applied after routing: load-balancing algorithm, connection pool limits, outlier detection, TLS mode, and named subsets of a service (for example, the pods labeled version: v2). • Gateway, which configures proxies at the edge of the mesh for ingress and egress. • ServiceEntry, which adds external services to the mesh's internal registry so that policy can apply to traffic leaving the cluster. • Sidecar, which, despite the confusing name, restricts which parts of the mesh a given workload's proxy needs to know about — a crucial tool for scaling. • PeerAuthentication, RequestAuthentication, and AuthorizationPolicy, which control mTLS modes, end-user token validation, and access control. Alongside these, Istio now fully supports the Kubernetes Gateway API, whose HTTPRoute, GRPCRoute, and related resources can be used both for ingress and for traffic between services inside the mesh. The project's stated direction is for the Gateway API to become the primary way to configure Istio traffic, and its ambient mode relies on it. Chapter 8 explains the Gateway API and why its emergence matters. Istio's data plane has two modes. In sidecar mode, an Envoy proxy runs in every application pod, managed by a small agent called pilot-agent that bootstraps Envoy and handles certificate requests. In ambient mode, there are no sidecars; a per-node proxy called ztunnel, written in Rust, handles layer 4 traffic and mTLS, and optional Envoy-based waypoint proxies handle layer 7 features for the services that need them. Istio supports running both modes in the same mesh, which makes gradual migration possible. How Linkerd assembles the parts Linkerd's control plane is a small set of Go services, each with a narrow job. The destination service answers proxies' questions about where to send traffic and what policy to apply. The identity service is a certificate authority that issues workload certificates. The proxy injector is an admission webhook that adds proxies to pods. Extensions provide additional functions: the viz extension for metrics dashboards, the multicluster extension for linking clusters, and the jaeger extension for tracing. Linkerd's data plane is linkerd2-proxy, a Rust program built on the Tokio asynchronous runtime and the Tower and hyper libraries. It is not a general-purpose proxy and is not configured with a general-purpose language. The proxy talks to the control plane with a Linkerd-specific gRPC API rather than xDS, and most of its behavior is automatic: it detects protocols, upgrades connections between meshed pods to mTLS, balances requests using an exponentially weighted moving average of latency, and reports metrics, all without configuration. Where configuration is needed, Linkerd increasingly uses standard Kubernetes Gateway API resources rather than its own types. Routing and traffic splitting are expressed with HTTPRoute and GRPCRoute. Authorization uses Linkerd's own Server, AuthorizationPolicy, and MeshTLSAuthentication resources. Retries and timeouts are configured with annotations on routes or services. Linkerd's newest stable versions as of 2026 — 2.19, released in October 2025, and 2.20, released in June 2026 — continued to refine this model, with 2.19 moving the proxy's cryptography to the aws-lc library and enabling the post-quantum ML-KEM-768 key exchange by default for traffic between meshed pods, and 2.20 focused on reducing control plane memory consumption. Seeing what the proxy sees Because the data plane executes configuration that the control plane computed, the first question in almost any mesh investigation is whether the two agree. A routing rule applied in Kubernetes is only an intention. What matters is whether it reached the proxy, and what the proxy made of it. Istio provides two commands for this. istioctl proxy-status lists every proxy connected to istiod and reports, for each xDS type, whether the proxy has acknowledged the latest configuration the control plane sent. A proxy marked STALE for clusters or routes has not accepted an update, which usually means either a connectivity problem between the proxy and istiod or a configuration that Envoy rejected. A rejected update is reported back over xDS as a negative acknowledgment, and istiod logs it; the proxy then keeps running its previous configuration. That behavior is a deliberate safety property — a bad push cannot crash every proxy — but it also means a misconfiguration can sit unnoticed, with some proxies on new configuration and others on old. istioctl proxy-config then shows the configuration a specific proxy actually holds, broken down by Envoy concept: listeners, routes, clusters, endpoints, and secret for certificates. A common investigation runs like this. A team reports that requests from the frontend to a new version of the cart service are not being split as configured. Running istioctl proxy-config routes against a frontend pod shows the route for the cart host, and whether it contains the expected weighted clusters. If it does not, the rule has not been applied to that proxy — perhaps because a Sidecar resource limits which hosts the frontend's proxy knows about, or because the rule was created in a namespace from which it is not exported. If the route is correct, istioctl proxy-config endpoints filtered to the canary's cluster shows whether that cluster has any healthy endpoints. A route that points at a cluster with no endpoints produces 503 errors with the UH response flag, and the cause is usually a label selector that matches no pods. Envoy itself exposes an administration interface, in Istio on port 15000 inside the pod, with endpoints that dump the complete configuration, current statistics, active clusters and their health, and the server's own state. The /config_dump endpoint returns the full running configuration as JSON — often tens of thousands of lines in a large mesh, which is itself a useful signal that configuration scoping is needed. Linkerd's diagnostic model is different because there is much less configuration to inspect. The linkerd check command validates the control plane and data plane installation, including certificate validity and expiry. linkerd diagnostics proxy-metrics dumps a proxy's raw metrics, and linkerd diagnostics endpoints shows what the destination service reports for a given authority, which answers the same "does the proxy know where to send traffic?" question that proxy-config endpoints answers in Istio. The viz extension's tap command streams live requests passing through a chosen workload, with method, path, status, and latency, which is often the fastest way to confirm what traffic a service is actually receiving. The general lesson applies to any mesh: when traffic misbehaves, check the proxy's actual state before reasoning about the intended state. Most mesh debugging time is lost by engineers who reread their YAML instead of asking the proxy what it received. Choosing between the two models The difference between Istio and Linkerd is not mainly a difference of features, though Istio has more. It is a difference of philosophy about where complexity should live. Istio exposes almost the full power of Envoy through its APIs. If you need to match requests on an arbitrary header, rewrite paths, inject faults for chaos testing, run a WebAssembly filter, route egress traffic through a dedicated gateway with TLS origination, or tune a dozen connection-pool parameters, Istio can do it. The cost is a large configuration surface, more ways to make mistakes, and a heavier data plane. Linkerd exposes much less. Its proxy does the right thing by default for most traffic, and its configuration is deliberately minimal. The cost is that when you need something it does not do, you may simply not be able to do it. Table 1 summarizes the most significant structural differences among the three projects. It describes architecture rather than features, because features change with every release while architectural choices change rarely. Table 1. How Envoy, Istio, and Linkerd differ structurally. Aspect Envoy Istio Linkerd What it is General-purpose proxy Mesh built on Envoy Mesh with its own proxy Proxy language C++ C++ (Envoy), Rust (ztunnel) Rust Control plane None; driven by any xDS server istiod (Go) destination, identity, injector (Go) Config protocol xDS xDS Linkerd-specific gRPC API Data plane modes Any deployment pattern Sidecar or ambient Sidecar Config philosophy Everything explicit Rich APIs, broad surface Minimal, defaults first Two practical consequences follow from these structural choices. First, Istio operators who need to debug deeply will end up reading Envoy configuration directly, using tools such as istioctl proxy-config, which dumps listeners, routes, clusters, and endpoints for a given pod. Envoy knowledge is part of the job. Linkerd operators rarely look at proxy internals at all; they rely on the linkerd command-line tool's diagnostic commands and the proxy's metrics. Second, because Envoy is shared across Istio, many API gateways, and other products, Envoy expertise is portable in a way that linkerd2-proxy expertise is not. Neither model is right in general. The right choice depends on what an organization needs the mesh to do, how much operational capacity it has, and how much it values flexibility against simplicity. Chapter 9 returns to that decision with a fuller comparison. Before it can be made sensibly, though, it helps to understand the mechanisms in detail, starting with the most visible and most frequently misunderstood: how a proxy gets into the path of traffic in the first place. Chapter 3: Sidecar Injection and Traffic Interception The promise of a sidecar mesh is that applications do not change. A team deploys the same container image it deployed yesterday, and the mesh appears around it. Delivering on that promise requires two pieces of machinery. The first is injection: getting a proxy container into every pod without anyone writing it into their deployment manifests. The second is interception: making traffic that the application sends to some other service's address arrive at the proxy instead, and making traffic addressed to the application arrive at the proxy first. Both mechanisms are invisible when they work and baffling when they do not, and the majority of problems teams hit in their first weeks with a sidecar mesh come from them. How injection works Kubernetes has a hook called a mutating admission webhook. When anyone asks the API server to create an object, the server can send the object to an external service before storing it, and that service can return a modified version. Both Istio and Linkerd register a mutating webhook that watches pod creation. When a pod is created in a namespace marked for injection, the webhook receives the pod specification and returns a patched version that includes the proxy container, its configuration, the volumes it needs for certificates and bootstrap configuration, and — unless a CNI plugin is in use, as discussed below — an init container that sets up traffic redirection. Opting in is done with labels or annotations. In Istio, labeling a namespace with istio-injection=enabled turns on injection for every new pod in it; a pod-level label sidecar.istio.io/inject can override it in either direction. When using revision-based upgrades, discussed in Chapter 9, the namespace instead carries istio.io/rev= to select which control plane version injects it. In Linkerd, the annotation linkerd.io/inject: enabled on a namespace or a pod's template does the same job. apiVersion: v1 kind: Namespace metadata: name: checkout labels: istio-injection: enabled --- apiVersion: v1 kind: Namespace metadata: name: payments annotations: linkerd.io/inject: enabled Three facts about injection catch people out. First, injection happens only at pod creation. Labeling a namespace does nothing to pods already running in it. Those pods must be restarted, typically with kubectl rollout restart, before they join the mesh. The same applies to proxy upgrades: upgrading the control plane changes what new pods get, but running pods keep their old proxies until they are recreated. A mesh therefore always has a population of proxies of mixed versions, and both Istio and Linkerd support a skew of at least one minor version between control plane and proxies for exactly this reason. Second, the webhook is in the critical path of pod creation. If the webhook service is down and its failure policy is set to fail closed, no pod can be created in an injected namespace. That includes pods that would replace crashed ones and pods that a node failure has evicted. A control plane outage that blocks the webhook can thus turn a single-node failure into a capacity crisis. Running the control plane with multiple replicas, pod disruption budgets, and appropriate priority is not optional. Third, injection changes the pod in ways other tools notice. Resource requests increase because of the added container, which affects scheduling and quota. Liveness and readiness probes that call the application's HTTP port would now pass through the proxy, which could reject them under strict mTLS; Istio rewrites probes by default so that the kubelet's checks are redirected through the agent, and Linkerd's proxy treats probe traffic specially. Tools that inspect a pod's containers, from log collectors to security scanners, now see an extra container they may not expect. How interception works: iptables Once the proxy is in the pod, traffic must flow through it. Applications have no idea the proxy exists. A service calls http://inventory:8080/items, the cluster's DNS resolves inventory to the Service's cluster IP, and the application opens a TCP connection to that IP. Something has to divert that connection to the proxy. In a Kubernetes pod, all containers share a single network namespace: the same interfaces, the same IP address, and the same routing and firewall rules. That shared namespace is what makes interception possible. The classic mechanism is a set of iptables rules installed in the pod's network namespace, using the NAT table to redirect connections. In Istio's sidecar mode, the rules redirect all outbound TCP traffic from the application to port 15001, where Envoy's outbound listener is bound, and all inbound TCP traffic to the pod to port 15006, Envoy's inbound listener. Envoy recovers the connection's original destination using the SO_ORIGINAL_DST socket option, looks up what that address corresponds to in its configuration, and proceeds. Linkerd works the same way with different ports: 4140 for outbound traffic and 4143 for inbound, with the proxy's administration endpoint on 4191. An obvious problem arises: the proxy's own outbound connections would also be captured, creating an infinite loop. The solution is to run the proxy as a specific user ID and add a rule that exempts traffic from that user. In Istio, the proxy runs as UID 1337; in Linkerd, as UID 2102. If the application container happens to run as the same UID, its traffic will bypass the mesh entirely — a rare but bewildering source of "mTLS isn't working for this one service" bugs. Not all traffic should be captured. Calls to the cloud provider's instance metadata endpoint, connections to databases outside the mesh that use their own TLS, and certain ports used by the application for clustering protocols are common exceptions. Both meshes support annotations to exclude specific outbound IP ranges or ports, and inbound ports, from interception. The iptables rules are traditionally installed by an init container that runs before the application and the proxy start. Because modifying a network namespace's firewall requires elevated Linux capabilities — NET_ADMIN and NET_RAW — that init container needs them. Many security-conscious organizations forbid application pods from requesting those capabilities, and Kubernetes Pod Security Standards at the restricted level reject them. The CNI alternative The fix is to move the setup out of the pod. Kubernetes networking is configured by Container Network Interface plugins, which run on each node with node-level privileges when a pod's network namespace is created. Both Istio and Linkerd ship a CNI plugin that chains onto the cluster's primary network plugin — Calico, Cilium, the cloud provider's plugin, or whichever is in use — and installs the redirection rules as each pod is set up. The init container disappears, the pod no longer needs elevated capabilities, and the privilege lives in a node-level DaemonSet that the platform team controls. The CNI approach introduces its own race. If a pod is scheduled onto a node before the mesh CNI plugin has been installed there — for example, on a brand-new node in an autoscaled cluster — the pod's network may be set up without redirection, and the pod will run outside the mesh without complaint. Both meshes include mitigations: Istio's CNI agent can detect and repair such pods, and both projects document node taints that keep application pods off a node until the CNI plugin is ready. In Istio's ambient mode the CNI plugin takes on a larger role, which Chapter 8 describes: rather than redirecting traffic to a proxy inside the pod, it arranges for traffic to be redirected to the node's ztunnel, while still preserving each pod's network namespace for identity purposes. Startup and shutdown ordering The most common sidecar bugs are not configuration errors but timing errors. A pod with a sidecar has two processes that must cooperate, and for most of Kubernetes' history there was no way to tell the platform which should start first or stop last. Consider startup. The application container starts and immediately tries to connect to its database or fetch configuration from another service. The iptables rules are already in place, so the connection is redirected to the proxy port. But the proxy has not started yet, or has started but not yet received its configuration and certificates from the control plane. The connection is refused or times out. The application crashes, Kubernetes restarts it, and eventually things settle — or the application, written to fetch configuration once at startup, comes up in a broken state and stays there. Consider shutdown. Kubernetes sends a termination signal to every container in the pod at the same moment. If the proxy exits before the application has finished draining its in-flight requests, those requests fail. If the application makes an outbound call during its shutdown hook, there is no proxy to carry it. Consider batch jobs. A Kubernetes Job is complete when its containers exit. The application exits when its work is done, but the sidecar proxy, being a long-running server, does not. The Job never completes. For years the standard workaround was for the application to make an HTTP call to the proxy's shutdown endpoint when it finished, which meant changing the application — exactly what the mesh had promised to avoid. The meshes accumulated workarounds for these problems. Istio added an option, holdApplicationUntilProxyStarts, that reorders containers so the proxy starts first and the application waits for the proxy to be ready. Linkerd added a similar mechanism using a post-start hook. Both added termination drain periods. The proper fix came from Kubernetes itself. The native sidecar containers feature lets a container be declared as an init container with restartPolicy: Always. Such a container starts before the regular application containers, and Kubernetes waits for it to be running — and for its startup probe to pass, if one is defined — before starting them. It keeps running alongside them, is shut down only after they have exited, and does not block Job completion. The feature was introduced as alpha in Kubernetes 1.28 and reached general availability in 1.33. Both meshes have adopted it. Istio made native sidecar mode the default starting with version 1.27, on clusters that support it. Linkerd 2.19 promoted its native sidecar support to beta, enabled per workload with the config.beta.linkerd.io/proxy-enable-native-sidecar annotation. On a modern cluster, enabling native sidecars eliminates whole categories of startup race and Job hang, and it should be the first thing a team checks if it sees those symptoms. Protocol detection and the server-speaks-first problem Once the proxy has the connection, it has to decide what protocol is being spoken, because HTTP traffic gets routing, retries, and per-request metrics while opaque TCP gets only connection-level handling. Both meshes try to detect the protocol automatically by reading the first bytes the client sends. An HTTP/1.1 request starts with a method name; an HTTP/2 connection starts with a fixed preface; a TLS connection starts with a ClientHello. Automatic detection works well for client-speaks-first protocols. It fails badly for server-speaks-first protocols, where the client connects and waits for the server to send a greeting. MySQL and SMTP are the classic examples. The proxy waits for the client to send something so it can detect the protocol; the client waits for the server; nothing happens until a detection timeout expires, adding seconds of latency to every connection, or the connection fails outright. The cure is to tell the mesh the protocol explicitly. Istio uses the Service port's appProtocol field or a naming convention on the port name (http-, grpc-, tcp-, mysql-). Linkerd uses the config.linkerd.io/opaque-ports annotation to mark ports that should be treated as raw TCP without detection, and maintains a default list that includes common database ports. Linkerd 2.18 also introduced support for using the Service's appProtocol field to declare protocols. Declaring protocols explicitly, for every port, is a habit worth building from the first day of a mesh rollout. It removes guessing from the proxy's behavior, and the cost is a line of YAML per port. A worked example: the database that slowed down The interaction of these mechanisms is easiest to see in a concrete case, of a kind that recurs in nearly every mesh rollout. A team meshes a namespace containing an order-processing service. The service talks to a MySQL database running in the same cluster, also in a meshed namespace. Immediately after the restart that injects sidecars, the order service's startup time jumps from four seconds to over twenty, and its health checks begin to fail intermittently under load. Nothing in its code or configuration has changed. The first clue comes from the order service's own logs, which show each new database connection taking several seconds to establish. The second comes from the proxy: the client-side proxy's access log shows the outbound connections to the database port being handled as TCP after a delay, rather than immediately. MySQL is a server-speaks-first protocol. When a client connects, the MySQL server sends a greeting packet before the client says anything. The client's proxy, seeing a new connection on a port it has no protocol declaration for, waits for the client to send bytes so it can detect the protocol. The client is waiting for the server's greeting. The two wait until the proxy's protocol detection timeout expires, after which the proxy gives up and treats the connection as opaque TCP. Every new connection pays that timeout. During startup, when the service opens its connection pool, the delays add up. The fix is a one-line declaration. In Istio, the database Service's port is named with a mysql or tcp prefix or given appProtocol: mysql; in Linkerd, port 3306 is already on the default list of opaque ports, but a database listening on a non-standard port would need the config.linkerd.io/opaque-ports annotation. Once the protocol is declared, the proxy skips detection and the connection proceeds immediately, still protected by mTLS between the two meshed pods. The intermittent health check failures turn out to have a different cause. The order service's readiness probe checks the database connection, so while connections were slow to establish, readiness flapped. Once the protocol was declared, that symptom vanished too. A second, rarer case shows how interception can fail silently. A team notices in the mesh's metrics that one workload, a legacy reporting service, never appears as a source of mTLS traffic, although its pod clearly has a sidecar. Investigation shows the reporting service's container image was built to run as user ID 1337 — the same UID Istio's proxy uses. The iptables rule that exempts the proxy's own traffic from redirection matches on that UID, so it also exempts the application's traffic, which leaves the pod in plaintext straight past its own sidecar. Changing the container's user resolves it. The case is unusual, but it illustrates a general principle: a mesh's coverage should be verified from its telemetry, never assumed from the presence of sidecars. What injection teaches about the sidecar model Looking at injection and interception closely reveals both the strength and the weakness of the sidecar model. The strength is isolation. Each pod has its own proxy, with its own configuration, its own certificate, its own resource limits. A bug that crashes one proxy takes down one pod. The security boundary is clear: the proxy holds the pod's private key and nothing else does. The weakness is coupling. The proxy's life is bound to the application's. Upgrading the proxy means restarting the application. The proxy's resources are reserved per pod even when the pod is idle. Startup and shutdown require careful choreography. And every pod carries the full weight of a layer 7 proxy even if all it needs is mTLS. It was precisely this coupling that led Istio's maintainers to design ambient mode, which separates the layer 4 concerns that every workload needs from the layer 7 concerns that only some workloads need, and moves both out of the application pod. That design is the subject of Chapter 8. Before getting there, the next chapter examines the capability that, for many organizations, is the primary reason to adopt a mesh in the first place: cryptographic identity and mutual TLS. Hashtags: #ServiceMeshArchitecture #Istio #Linkerd #EnvoyProxy #ServiceMesh #MicroservicesArchitecture #CloudNativeArchitecture #Kubernetes #DistributedSystems #ServiceToServiceCommunication #DataPlane #ControlPlane #SidecarProxy #IstioAmbientMesh #EnvoyXDS #MutualTLS #MTLS #ZeroTrustSecurity #WorkloadIdentity #TrafficManagement #IntelligentLoadBalancing #CircuitBreaking #RetryPolicies #CanaryDeployments #ProgressiveDelivery #ServiceMeshObservability #DistributedTracing #KubernetesGatewayAPI #CloudNativeSecurity #PlatformEngineering
- Nature on Campus (Harnessing the Mental Health Benefits of Outdoor Green Spaces)
Download the Book (PDF): Introduction Most university campuses were built around a quiet promise. Look at almost any of them from above and you will see buildings arranged around lawns, courtyards shaded by trees, paths that cut across open grass, perhaps a stream, a botanical garden, a playing field, a stand of old oaks that predates the institution itself. The planners who laid out these places, often a century or more ago, believed that learning needed room to breathe. They put green space at the centre of the campus, not at its edges. Then the students went indoors. This is not a moral failing, and it is not only a modern one. But the pattern is now hard to miss. A typical week for many students runs from a residence hall to a lecture theatre to a library carrel to a dining hall and back, with the walks between them spent looking at a phone. Reading lists are on screens. Lectures are recorded and watched at a desk. Social life happens partly in group chats. The lawns remain, beautifully maintained, crossed at speed by people on their way somewhere else. A student can spend an entire semester on one of the greenest campuses in the country and hardly be in it for more than a few minutes a day. At the same time, student mental health has become one of the defining concerns of higher education. Surveys in many countries have recorded high and in some cases rising levels of anxiety, low mood, loneliness and stress among university students over the past two decades, and campus counselling services commonly report demand that outstrips what they can supply. The causes are many and the solutions must be too: good clinical care, reasonable workloads, financial security, friendship, sleep. None of that is replaceable by a walk under trees. This book makes a narrower and, I think, more useful claim. It is that the green space already on your campus is one of the most underused mental health resources available to you, and that its benefits depend far less on how much nature you can reach than on how deliberately you use it. The research on nature and wellbeing does not describe a miracle cure. It describes a set of modest, reliable, repeatable effects: attention that recovers, stress that eases, rumination that loosens its grip, mood that lifts. These effects are strongest when contact with nature is frequent, brief enough to fit into ordinary days, and undertaken with at least some attention to what is around you. A weekend hiking trip once a term is lovely. Twenty minutes on the quad three or four times a week, with your phone in your bag, is what the evidence most consistently supports. That is the controlling idea of everything that follows: nearby nature, used on purpose. The phrase "nearby nature" belongs to the environmental psychologists Rachel and Stephen Kaplan, whose work in the 1980s and 1990s showed that ordinary green settings, the kind you can see from a window or reach in a few minutes' walk, carry much of the psychological value that people usually associate with wilderness. The phrase "on purpose" is my own emphasis. Most students already walk past trees every day. What changes outcomes is turning incidental exposure into chosen, regular, attentive time. Why students in particular There are good reasons to think that students stand to gain more from this than most people. First, study is an unusually heavy user of what psychologists call directed attention, the effortful capacity to focus on something that does not naturally hold your interest while suppressing everything that does. Reading dense material, solving problem sets, writing an essay against a deadline: these draw on the same limited resource, and it tires. One of the best supported findings in environmental psychology is that natural settings help that resource recover. For people whose work is attention, that matters. Second, the student years are a period of high stress and frequent transitions: leaving home, new relationships, financial strain, exams, uncertain futures. Some of the clearest experimental work on nature and mental health concerns exactly the kinds of states students report most often, including physiological stress and repetitive negative thinking about oneself. Third, students often have more access to green space than they realise, and more flexibility over their time than most working adults. A campus with lawns, gardens and tree-lined paths is a concentration of nearby nature that many people will never have so close to where they live and work again. A gap of an hour between classes is an opportunity most office workers do not get. Finally, habits formed at university tend to last. A student who learns to use outdoor time as a tool for focus and recovery is building a skill for a working life that will probably be spent largely indoors and on screens. What this book is and is not The chapters that follow take a single line of argument and follow it through. The first chapter looks at how student life became so indoor-bound and why people consistently underestimate how much a little time outside will help them. The second sets out what the research actually shows, including its limits, because a reader who knows where the evidence is thin is better equipped than one who has been sold a slogan. The third and fourth chapters look at the two main pathways by which nature seems to help: the restoration of attention, which bears directly on studying, and the easing of stress and rumination, which bears on how you feel. The fifth chapter teaches you to read your own campus, identifying which spaces offer the qualities that matter. The sixth deals with the practicalities of studying outside, and the seventh with how to relax in green space in ways that actually work. The eighth faces the barriers honestly: weather, darkness, safety, accessibility, and the feeling some students have that outdoor spaces are not really for them. The conclusion asks what follows for students and institutions once the whole case is on the table. You will find concrete suggestions throughout, and a small number of tables where a comparison is genuinely easier to take in that way. You will also find composite scenarios, such as a second-year chemistry student or a first-year commuter, which are illustrative sketches rather than accounts of real individuals. The Notes at the end of the book give full references for every study discussed, so that you can read the work yourself. A necessary word of caution. This is an educational book, not a clinical one, and it is not a substitute for individual medical or psychological advice. Time in green space can support mental health, but it does not treat depression, anxiety disorders, eating disorders, trauma or any other condition on its own. If you are struggling, your campus counselling or health service, or your own doctor, is the right place to start, and nothing here should delay you from reaching out. If you are ever in immediate danger or thinking about ending your life, contact emergency services straight away. In the United States you can call 911, or call or text 988 to reach the 988 Suicide & Crisis Lifeline; other countries have their own emergency numbers and crisis lines, and your university can tell you which apply where you are. A different way of looking at the lawn It is worth ending this introduction with a small exercise, because the argument of this book is ultimately practical. The next time you cross your campus, notice where the green spaces are. Not the famous ones on the prospectus, but the ordinary ones: a bench under a single large tree behind the engineering building, a strip of meadow planting beside a car park, a courtyard with a fountain nobody seems to use, the edge of the sports fields where the grass gives way to hedgerow. Notice how many of them are within five minutes of where you spend most of your day. Notice how many of them are empty. Those places were put there, in part, for you. The rest of this book is about how to use them well. Chapter 1: The Indoor Semester Consider a second-year chemistry student in the middle of an autumn term. She wakes in a residence hall, checks her phone before she is fully awake, and walks eight minutes to a nine o'clock lecture with earbuds in. The lecture runs for fifty minutes under fluorescent light in a room with no windows. She has a lab from eleven to two, eats a sandwich in the building's atrium, then goes to the library to work through a problem set until early evening. She walks back in the dusk, eats in the dining hall with friends, and spends the evening at her desk, alternating between lecture notes and a stream of messages. It has been a productive day. She is tired in a way that sleep does not quite fix, a little flat, a little irritable, and she cannot say exactly why. Nothing in that day is unusual, which is the point. If you added up the time she spent outdoors, it would come to perhaps half an hour, nearly all of it in transit, nearly all of it with her attention somewhere else. Multiply that day by a semester and you have a very particular kind of life: highly demanding on attention, heavily screen-mediated, spent almost entirely inside buildings, and lived a few metres from lawns and trees that go almost unnoticed. This chapter is about how that pattern arises and why it is so hard to see from the inside. The short answer is that the indoor semester is the default, not a choice, and that people are poorly equipped to predict how much a small change to that default would improve how they feel. An indoor species Human beings in industrialised countries now spend the overwhelming majority of their time inside. The most widely cited evidence comes from the US National Human Activity Pattern Survey, a large study of daily time use published in 2001 by Neil Klepeis and colleagues. It found that respondents spent, on average, around 87 percent of their time in enclosed buildings and around 6 percent in enclosed vehicles, leaving only a small fraction of the day outdoors. Those numbers come from the general American population in the 1990s rather than from students today, and there is no reason to think the balance has shifted toward the outdoors since then. If anything, the spread of smartphones, streaming, remote learning and online social life has given people more reasons to stay in. Students are in some ways a special case of this general trend. The core activities of academic life, reading, writing, calculating, attending lectures, working in labs, all take place in buildings designed for them. Campus architecture since the mid twentieth century has tended to favour large, deep-plan buildings in which many rooms have no direct view outside. Libraries have become 24-hour spaces with good heating and fast wifi. Many universities have added covered walkways, underground connections between buildings, and indoor social spaces that make it possible to move through a whole day without stepping outside at all, particularly in cold climates. Each of these decisions makes sense on its own. Together they produce a campus that can be navigated entirely indoors while its green spaces sit visible through the glass. There is also a subtler force at work. For most of history, time outdoors was built into daily life by necessity: walking to places, working the land, doing chores. Modern life removes most of that necessity. Outdoor time now has to be chosen, and like anything that has to be chosen, it competes with everything else. For a student with a deadline, going outside for twenty minutes can feel like an indulgence, or even like procrastination. The indoor semester is what happens when that choice is never actively made. What the indoor day takes from you It is worth being precise about what is lost, because the loss is not obvious. The indoor semester does not usually make people ill. It wears them down in ways that are easy to attribute to something else. The first cost falls on attention. A day like the chemistry student's is a long sequence of tasks that demand sustained, effortful focus: following a lecture, running a procedure accurately, working through problems that do not solve themselves. Each of those tasks draws on the capacity to hold attention on something while suppressing distractions. Psychologists increasingly treat that capacity as something that fatigues with use and recovers with rest, and chapter 3 looks at the evidence for that view in detail. The point here is simply that the indoor semester offers few settings in which that recovery can happen easily. The breaks in the day are spent in environments that continue to demand attention, crowded atriums, noisy dining halls, and above all the phone, which is designed to capture attention rather than to rest it. The second cost is to stress regulation. A student's day contains many small stressors: an assignment returned with a disappointing mark, a difficult email from a supervisor, a friend's message that could be read two ways, the constant low hum of things not yet done. Stress responses are a normal and useful part of life, but they are meant to rise and then fall. Recovery requires moments in which the body can settle. Indoor environments, particularly busy or cluttered ones, provide fewer cues of safety and calm than many outdoor settings do, and the evidence reviewed in chapter 4 suggests that natural environments in particular support faster physiological recovery. The third cost is to light. Indoor lighting is far dimmer than daylight. Typical indoor environments are lit to a few hundred lux, while daylight outdoors ranges from thousands of lux on an overcast day to tens of thousands or more in direct sun. The human circadian system, which governs the daily rhythm of sleep and wakefulness, is set largely by light, and bright light in the morning and daytime is one of its strongest signals. In a well known study published in Current Biology in 2013, Kenneth Wright and colleagues found that when a small group of adults went camping for a week with only natural light, and no electric light or screens, their internal clocks shifted substantially earlier and aligned closely with sunrise and sunset. People who spend their days indoors and their evenings under bright screens are, in effect, living in a permanent dim daytime and a bright artificial evening, which tends to push sleep later. For students already prone to late nights, that matters. The fourth cost is harder to measure: a gradual narrowing of experience. A life lived almost entirely indoors and on screens is a life with fewer surprises, fewer changes of scale, fewer reminders of seasons and weather and living things other than people. Some of the research on nature connectedness, discussed in chapter 7, suggests that people who feel more connected to the natural world report greater wellbeing, and that this sense of connection can be cultivated. The indoor semester works against it quietly, day by day. None of these costs is dramatic. That is exactly why they matter. They accumulate in the background, producing the kind of tired, flat, slightly frayed state that many students describe by the middle of a term and attribute to workload alone. Why we underestimate the fix If time in nature helps, and green space is close by, why don't more students use it? Part of the answer is time pressure and habit. But there is also a well documented quirk of human judgement that makes the benefits of nearby nature easy to overlook. In 2011 the psychologists Elizabeth Nisbet and John Zelenski published a set of studies in Psychological Science with the telling title "Underestimating nearby nature." They asked university students to walk either along an indoor route through the campus tunnel system or along a comparable outdoor route through the green edges of campus, and in some conditions asked others to predict how they would feel on each route. The people who walked outside reported feeling happier than those who walked indoors. The people who only predicted how they would feel expected a smaller difference than the walkers actually experienced. In other words, participants systematically underestimated how much a short walk in nearby nature would lift their mood. Psychologists call this kind of mistake an affective forecasting error: a failure to predict accurately how something will make us feel. It is a small finding from a small number of studies, and it should not be overstated. But it fits everyday experience remarkably well. Almost everyone has had the experience of reluctantly going outside, perhaps to run an errand or walk a dog, and returning in a noticeably better state than expected. What the forecasting research adds is that the reluctance is not just laziness. It is partly a genuine misjudgement. When you are sitting at your desk deciding whether to take a walk, your prediction of how much it will help is probably too low. This has an important practical consequence. If you wait until you feel like going outside, you will go outside less than would be good for you. The decision to use nearby nature is better made in advance, as a plan or a routine, than in the moment, when the forecasting error is at work. Much of the practical advice later in this book follows from that one observation. There is a second reason the benefits are underestimated, which is that they are relative rather than absolute. A walk on the quad does not usually produce euphoria. It produces a shift: from tense to calmer, from scattered to more focused, from low to a little better. Those shifts are easy to dismiss because they are modest. But across a semester, a regular modest improvement in how you feel and how well you concentrate is not a small thing. It is the difference between finishing a term depleted and finishing it in reasonable shape. The phone in your pocket Any honest account of the indoor semester has to deal with the device that goes everywhere with students, including outdoors. The smartphone complicates the picture in an important way: it means that being outside and being mentally present outside are no longer the same thing. A student can sit on a sunlit lawn for half an hour and spend twenty-five minutes of it reading messages, checking a feed, or watching short videos. Physically, she is in nature. Attentionally, she is in the same place she would be at her desk. The research on how nature helps, discussed in the next three chapters, points strongly toward attention as the channel through which much of the benefit flows. Natural settings seem to work partly by drawing attention gently outward, to moving leaves, birdsong, changing light, and away from the effortful demands and self-focused loops that tire us. A screen interrupts exactly that process. It pulls attention back into a narrow rectangle filled with content engineered to hold it. This does not mean the phone must be banished. Some students use their phones outdoors to identify plants or birds, to photograph things they find beautiful, or to listen to something that helps them relax, and some of these uses may well deepen engagement with the setting rather than undermining it. The distinction that matters is between using the device as a tool for noticing the environment and using it as a way of leaving the environment while your body stays put. A practical rule of thumb, developed further in chapter 7, is that the phone should come out on purpose, if at all, rather than by reflex. It is also worth recognising that the phone is part of why the indoor semester feels so full. Every gap in the day can now be filled with something. Before smartphones, a ten-minute wait between classes was often simply empty, and an empty ten minutes outdoors has a way of turning into a small rest whether you intend it or not. Now those minutes are rarely empty. Reclaiming a few of them, deliberately, is one of the simplest changes available to any student. Return for a moment to the chemistry student. Suppose that, without changing her workload at all, she makes three small alterations to her day. She takes the slightly longer route to her nine o'clock lecture, along a tree-lined path rather than beside the main road, and leaves her earbuds out. She eats her sandwich on a bench in the courtyard outside the lab building rather than in the atrium, weather permitting, and spends ten minutes of her lunch break looking at the trees rather than at her phone. And at the midpoint of her library session, instead of scrolling, she walks a loop around the nearby botanical garden before sitting back down. These changes add up to perhaps forty minutes a day, most of which she was already spending on transit and breaks. They do not require a car, special equipment, or a free afternoon. What they require is intention: the decision to treat outdoor time as a tool rather than an accident. The research reviewed in the following chapters suggests that changes of this kind, repeated across weeks, are likely to leave her somewhat less tired, somewhat less stressed, and somewhat better able to concentrate in the hours she spends at her desk. Not transformed, but better. It is important not to romanticise this. Some days it will be raining. Some days she will be too stressed to leave the library. Some weeks the whole plan will collapse under deadlines. And no amount of outdoor time will substitute for adequate sleep, manageable workloads, supportive relationships, or professional help if she develops a genuine mental health problem. The claim of this book is not that nature solves the indoor semester. It is that the indoor semester has a readily available, low-cost, evidence-supported partial remedy, sitting in plain view, that most students are not using. The first step toward using nearby nature on purpose is to see how little of it you currently use. This is harder than it sounds, because outdoor time is so easily absorbed into transit that it disappears from memory. A simple approach is to keep a rough log for one ordinary week. You do not need an app or a spreadsheet. At the end of each day, write down approximately how many minutes you spent outdoors, and then how many of those minutes were spent somewhere green, and how many of those you were actually paying attention to your surroundings rather than to a screen or to your own thoughts. Most students who do this find the three numbers shrink sharply from left to right. A day with forty-five minutes outdoors may contain twenty in green settings and perhaps five of genuine attention to them. It is also worth noting, alongside the log, how you felt at a few points in the day: your energy, your mood, your ability to focus. You are not conducting a scientific study, and the relationship you observe may be muddied by a dozen other things. But paying attention to your own patterns has two benefits. It makes the indoor default visible, which is the precondition for changing it. And it helps correct the forecasting error described above, because you start to accumulate your own evidence about what outdoor time does for you. The log also reveals where the opportunities lie. For most students, the obvious openings are the journeys between buildings, the gaps between classes, lunch, the midpoint of long study sessions, and the transition between the end of academic work and the start of the evening. These are moments that already exist in the day and are already, in principle, available. The question is simply what they are spent on. That question is at the heart of this book. Before turning to practice, though, we need to be clear about what the research actually shows, because a student deciding how to spend scarce time deserves better than slogans. The next chapter sets out the evidence, what it supports strongly, what it supports tentatively, and where it remains uncertain. Chapter 2: What the Evidence Actually Says Claims about nature and mental health circulate widely, and many of them are overstated. Articles promise that a walk in the woods will "reset your brain" or "cure anxiety"; wellness influencers describe forest bathing as though it were a medical treatment. A student deciding whether to invest scarce time in outdoor routines deserves a more careful account. This chapter sets out what the research shows, which theories try to explain it, and where the limits of current knowledge lie. The honest summary is encouraging but measured: the benefits of contact with nature are real, fairly consistent, and generally modest in size, and they are best understood as one useful contributor to wellbeing rather than a treatment for illness. A window onto trees The modern scientific study of nature and wellbeing is often dated to a short paper published in Science in 1984 by Roger Ulrich, then an architecture and planning researcher. Ulrich examined the records of patients who had undergone gallbladder surgery at a hospital in Pennsylvania between 1972 and 1981. Some had been assigned to rooms whose windows looked out onto a small stand of deciduous trees; others to otherwise similar rooms whose windows faced a brown brick wall. Comparing matched pairs of patients, he found that those with the tree view had shorter postoperative hospital stays, received fewer negative comments in nurses' notes, and took fewer doses of strong pain medication. The study was small, observational, and confined to one hospital, and Ulrich himself was careful about its implications. But it did something important. It suggested that even a passive view of nature, not a hike or a garden or an immersive experience, could be associated with measurable differences in how people recovered from a stressful event. It opened a field. In the decades since, researchers have studied the effects of natural environments using a wide range of methods: laboratory experiments in which people watch videos or look at photographs of natural and urban scenes; field experiments in which people are sent on walks through parks or along busy streets; studies of physiological markers such as heart rate, blood pressure and the stress hormone cortisol; brain imaging; and large population studies relating the amount of green space near people's homes, or the time they spend in nature, to their health. Each method has strengths and weaknesses, and it is the convergence of findings across them, rather than any one study, that makes the case credible. Two theories of restoration Two theoretical frameworks dominate the field. They are not rivals so much as complementary accounts of different parts of the same phenomenon, and understanding both helps make sense of the practical advice in later chapters. Table 1 summarises how they differ. Table 1. Two leading explanations of why nature restores us. Feature Attention Restoration Theory Stress Reduction Theory Associated with Rachel and Stephen Kaplan Roger Ulrich What is depleted Directed attention (effortful focus) Physiological and emotional calm How nature helps Soft fascination lets effortful attention rest Rapid, largely automatic calming response Typical outcomes studied Working memory, attention tasks Heart rate, cortisol, mood Most relevant for students Focus during study Recovery from pressure and worry Attention Restoration Theory was developed by Rachel and Stephen Kaplan and set out most fully in their 1989 book The Experience of Nature and in a 1995 paper by Stephen Kaplan in the Journal of Environmental Psychology. It builds on a distinction that goes back to the psychologist William James between two kinds of attention. One kind is voluntary and effortful: the attention you use to keep reading a difficult text when you would rather do something else. The Kaplans called this directed attention and argued that it is a limited resource that becomes fatigued with sustained use. The other kind is involuntary: attention captured by things that are intrinsically interesting. The theory holds that natural settings are rich in what the Kaplans called soft fascination, things like clouds, moving water, rustling leaves and the play of light, which hold attention gently and effortlessly without demanding anything. In such settings directed attention can rest and recover. The Kaplans identified four qualities that make an environment restorative: a sense of being away from everyday demands; extent, meaning the setting feels rich and coherent enough to be a world of its own; fascination; and compatibility between the setting and what the person wants to do. Chapter 5 uses these four qualities as a practical tool for reading a campus. Stress Reduction Theory, developed by Ulrich in the early 1980s and tested most famously in a 1991 study in the Journal of Environmental Psychology, takes a different starting point. It holds that human beings respond quickly and largely automatically to certain features of environments, and that natural settings with features such as vegetation, water and open but sheltered views tend to evoke a rapid calming response. In the 1991 study, Ulrich and colleagues showed participants a stressful film about workplace accidents and then showed them videos of either natural or urban settings. Those who watched the natural scenes recovered more quickly and more completely, as measured by physiological indicators and by self-reported mood. Ulrich's explanation drew on evolutionary reasoning: settings that signalled safety and resources to our ancestors may still trigger physiological relaxation today. That evolutionary part of the account is harder to test directly and remains more speculative than the observed effects themselves. A related and broader idea is the biophilia hypothesis, popularised by the biologist E. O. Wilson in his 1984 book Biophilia, which proposes that humans have an innate tendency to seek connection with living things. It is an evocative idea and a useful frame, but it is a hypothesis about human nature rather than a tested mechanism, and it is best treated as background rather than as evidence. Later reviews have added further pathways. In an influential 2014 review in the Annual Review of Public Health, Terry Hartig and colleagues grouped the ways nature might benefit health into several routes, including better air quality, more physical activity, more social contact, and stress reduction. A 2017 review led by Iana Markevych in Environmental Research proposed a similar organising scheme: green space may reduce harm (for example by lowering exposure to noise and heat), restore capacities (attention and stress recovery), and build capacities (by encouraging exercise and social connection). For students on a campus, the restoration pathways are probably the most important, but it is worth remembering that time outdoors often also means more walking, more daylight and more incidental social contact, each of which has benefits of its own. What the studies consistently find With the theories in place, what does the evidence show? On attention, the most frequently cited experiment is a 2008 study by Marc Berman, John Jonides and Stephen Kaplan, published in Psychological Science. Participants completed a demanding task designed to fatigue attention, then went for a walk of about fifty minutes either in an arboretum or along busy city streets in Ann Arbor, Michigan. Afterwards, those who had walked in the arboretum performed better on a test of working memory and attention, repeating sequences of digits in reverse order, than those who had walked in the city. The same study found a similar effect when people simply looked at photographs of nature rather than urban scenes. A 2016 systematic review by Heather Ohly and colleagues, which pooled results from studies of attention restoration, found some support for improvements in measures of working memory, attentional control and cognitive flexibility after exposure to natural environments, while noting that effects were modest and that the studies varied considerably in quality and method. A later review by Matt Stevenson and colleagues in 2018 reached a broadly similar conclusion: there is evidence for an attention benefit, clearest on certain types of task, with considerable variation between studies. On stress and mood, the evidence is broader. Many field experiments have found that walks in natural settings are followed by better mood and lower self-reported stress than comparable walks in urban settings. Some have also measured physiological markers. A 2019 study by MaryCarol Hunter and colleagues, discussed in chapter 4, found that urban residents who spent time in a nature setting of their own choosing showed reductions in salivary cortisol, with the most efficient reduction per minute occurring with visits of roughly twenty to thirty minutes. A 2015 study by Gregory Bratman and colleagues in the Proceedings of the National Academy of Sciences found that a ninety-minute walk in a natural area, compared with a walk along a busy road, reduced self-reported rumination, the tendency to dwell repetitively on negative thoughts about oneself, and reduced activity in a region of the brain associated with it. At the population level, the most useful single study for our purposes is a 2019 analysis in Scientific Reports by Mathew White and colleagues, which drew on survey data from about 20,000 people in England. It found that people who reported spending at least 120 minutes in nature in the previous week were significantly more likely to report good health and high wellbeing than those who reported no time in nature. Benefits appeared to level off beyond a few hours a week, and it did not seem to matter much whether the 120 minutes came from one long visit or several shorter ones. The finding held across different age groups, occupations and ethnic groups, and among people with and without long-term illness. The study is cross-sectional and cannot prove cause and effect, but it has become a widely used reference point for how much time in nature might be worth aiming for. Larger syntheses tell a similar story. A 2018 meta-analysis by Caoimhe Twohig-Bennett and Andy Jones in Environmental Research pooled more than a hundred studies of green space and health and reported associations between greater green space exposure and a range of favourable outcomes, including lower salivary cortisol and heart rate and better self-reported health. And a 2020 scoping review by Genevive Meredith and colleagues in Frontiers in Psychology, which focused specifically on college-aged people, concluded that as little as ten to twenty minutes, and up to about fifty minutes, of sitting or walking in a range of natural settings was associated with improvements in measures of mental wellbeing. As a scoping review, it mapped the existing studies rather than pooling their results statistically, so its numbers are best read as a practical range rather than a precise threshold. That review is especially relevant to this book, because its population is students and its doses are ones a student can realistically fit into a day. Where the evidence is thin It would be easy to stop there and declare the case closed. A responsible account must also say what the research cannot yet tell us. First, effect sizes are generally modest. Nature exposure tends to produce improvements that are noticeable and meaningful but not dramatic. It will not turn a very bad day into a good one. Its value lies in reliability and repetition rather than in size. Second, many studies are small. Field experiments often involve a few dozen participants, frequently university students, which is convenient for this book but limits how confidently results can be generalised. Small studies are more prone to chance findings, and fields with many small studies are vulnerable to publication bias, the tendency for positive results to be published and null results to sit in file drawers. Third, population studies cannot rule out self-selection. People who spend more time in nature may differ in many ways from those who do not: they may be healthier to begin with, have more free time, have dogs, live in wealthier areas. Researchers try to adjust for these differences statistically, but some confounding almost certainly remains. Fourth, expectations may play a role. Many people believe that nature is good for them, and it is difficult to design a study in which participants do not know whether they are in the "nature" condition. Some of the measured benefit may reflect what people expect to feel. From a practical standpoint that is not necessarily a problem, since a benefit is still a benefit, but it matters for understanding mechanisms. Fifth, "nature" is not one thing. Studies have used everything from photographs of forests to walks in city parks to weeks in wilderness. A mown lawn, a biodiverse meadow and an old woodland may not have the same effects, and the research on which features matter most is still developing. Finally, and most importantly for anyone struggling with their mental health, most of this research concerns wellbeing in general populations rather than treatment of mental illness. There is growing interest in nature-based interventions, sometimes called green care or nature prescriptions, as supports alongside conventional treatment, but the evidence for them as treatments in their own right is much less developed. Nothing in this book should be read as suggesting that a student with depression or an anxiety disorder can manage it with walks alone. These limits suggest a useful habit of mind for reading claims about nature and health, which you will meet constantly in news stories and on social media. Suppose you see a headline announcing that "a walk in the park cuts anxiety in half." A few questions will usually tell you how much weight to give it. Was the study an experiment, in which people were assigned to a nature or a comparison condition, or an observational study relating green space to health in a population? Experiments tell you more about cause and effect; observational studies tell you more about real life at scale, but with more room for hidden differences between groups. How many people took part, and who were they? A striking result from thirty undergraduates at one university is interesting, but it is a starting point rather than a settled fact. What was the comparison? Nature compared with a busy traffic-filled street is a different claim from nature compared with a quiet indoor room. What exactly was measured, and for how long? A change in mood on a questionnaire immediately after a walk is not the same as a lasting reduction in clinical anxiety. And does the claim in the headline match the finding in the study? Very often the study reports a modest change on a specific measure, and the headline reports a transformation. Applying those questions does not make you a sceptic about the field. It makes you a better user of it. The strongest conclusions are the ones that recur across different methods and populations, and those are exactly the conclusions this book relies on: brief, regular contact with natural settings tends to improve mood, ease stress and support attention, by modest but worthwhile amounts. The weakest are precise numerical promises and claims of cure. When a source offers you the second kind, the first kind is still there underneath. Put together, the evidence supports a clear and practical conclusion. Regular, brief contact with natural settings, of the kind available on most campuses, is likely to help attention recover, ease stress, lift mood and reduce rumination, by amounts that are modest on any given day but meaningful over weeks. The doses that seem to matter are measured in tens of minutes, not in days. The benefits appear to be available from ordinary green spaces, not only from spectacular ones. And the effects seem to depend partly on what you do with your attention while you are there. That last point is where the research leaves off and practice begins. The next two chapters look more closely at the two main pathways, attention and stress, because understanding how each works tells you how to use campus green space for different purposes: sharpening focus before or during study, and recovering from pressure after it. Chapter 3: Attention as a Resource Every student knows the moment. You have been working on something difficult for an hour or two, and at some point you realise you have read the same paragraph three times. Your eyes are moving across the page but nothing is going in. You check your phone without deciding to, find yourself thinking about dinner, feel a rising irritation at a noise in the corridor that you did not notice earlier. You push on, because the deadline has not moved, and the next half hour produces very little. What has happened is not a failure of willpower or intelligence. It is something closer to fatigue, and like other kinds of fatigue it responds to the right kind of rest. This chapter looks at attention as a resource that is spent in study and replenished in certain environments, and it argues that campus green space is among the most efficient places to replenish it. For a student, whose work consists largely of focused thinking, this may be the single most practical reason to use nearby nature on purpose. What tired attention looks like Attention Restoration Theory, introduced in the previous chapter, holds that the effortful, voluntary kind of attention, what the Kaplans called directed attention, draws on a limited capacity that becomes depleted with sustained use. The notion of a depletable mental resource has been debated vigorously in psychology, and some related ideas, particularly the strong version of "ego depletion" applied to self-control, have not held up well in large replication efforts. It is worth being clear that Attention Restoration Theory makes a narrower claim, focused on the kind of effortful focus involved in concentration, and that the evidence for restoration after nature exposure comes from its own body of research rather than depending on the broader self-control literature. Even so, the precise mechanism by which attention tires and recovers remains a matter of scientific argument. What is well established, both in research and in ordinary experience, is the pattern: sustained concentration becomes harder over time, performance declines, and certain kinds of break help it recover better than others. The Kaplans and those who followed them described a cluster of signs that tend to accompany depleted directed attention, and it is useful to know them, because they are easy to misread as something else. Concentration becomes patchy and requires more effort. Distractions that you would normally ignore start to capture you. Irritability rises, and small frustrations feel larger than they should. Planning and decision making become harder; you find yourself unable to choose which task to do next, or switching between tasks without finishing any. Impulsive choices become more tempting, whether that means a snack, a social media check, or abandoning work for the evening. Students often interpret these signs as laziness, lack of motivation, or even as evidence that they are not suited to their subject. More often they are simply signs of a tired system. The crucial insight is that not all rest is equal. If directed attention is the tired faculty, then a break that continues to demand directed attention will not help much. Scrolling a phone is the obvious example. It feels like a break because the content is different from your work, but it keeps attention narrowly focused, constantly switching, and subject to a stream of small decisions: read this, skip that, reply or not. A break in a noisy, crowded space also asks attention to work, filtering out conversations and navigating around people. What the tired system needs is a setting that holds attention gently without demanding anything, so that effortful focus can idle. That is precisely what the theory claims natural settings provide. Evidence from students Much of the evidence on attention restoration comes, conveniently for this book, from studies of university students. One of the earliest was a 1995 study by Carolyn Tennessen and Bernadine Cimprich, published in the Journal of Environmental Psychology, which looked at students living in university residence halls. Students whose dormitory windows looked out on more natural views tended to perform better on a set of attention measures and to rate their own attentional functioning more favourably than students whose views were mostly built. It was a correlational study, and students were not randomly assigned to rooms, so it cannot establish cause and effect. But it pointed in a direction that later experiments would pursue: even the view from where you live and work may matter. The 2008 experiment by Berman, Jonides and Kaplan, described in chapter 2, provided stronger evidence. By first tiring participants' attention with a demanding task and then sending them on either a nature walk or an urban walk, the researchers could compare recovery under controlled conditions. The nature walkers showed greater improvement on a backward digit span task, a standard test of working memory and attention in which you hear a string of numbers and repeat them in reverse. The finding that simply viewing photographs of nature produced a similar, if smaller, advantage was notable too, because it suggests the effect is not solely about exercise or fresh air. Perhaps the most striking result for students concerns how little time may be needed. In 2015, Kate Lee and colleagues at the University of Melbourne published a study in the Journal of Environmental Psychology with the memorable title "40-second green roof views sustain attention." University students performed a monotonous attention task that required them to press a key in response to most numbers on a screen and to withhold their response for one particular number, a task that tends to produce more mistakes as people lose focus. Partway through, they were given a forty-second break during which they viewed an image of a city rooftop that was either covered with a flowering meadow or bare concrete. Those who saw the green roof made fewer errors of omission and showed steadier performance after the break than those who saw concrete. The study used images rather than real outdoor time, and a single experiment should not carry too much weight, but it supports an intriguing possibility: that very brief micro-breaks involving a glance at greenery may help sustain attention during long tasks. Research on creativity adds another thread. In 2012, Ruth Ann Atchley, David Strayer and Paul Atchley reported in PLoS ONE that people who had been backpacking in the wilderness for four days, without access to phones or other devices, performed substantially better on a test of creative problem solving than a comparison group who had not yet started their trip. The design has obvious limitations. The participants were self-selected hikers, the setting was far from a campus lawn, and the study could not separate the effects of nature from those of disconnecting from technology, exercise, or simply being on holiday. It is best read as suggestive: immersion in natural settings away from constant digital input may help the kind of loose, associative thinking that creative work depends on. Taken together with the systematic reviews discussed earlier, these studies support a cautious but useful conclusion. Exposure to natural settings, even briefly and even through a window or an image, tends to help attention recover after it has been depleted. The effects are modest and vary between tasks and people. But for students, who spend so much of their lives in a state of depleted attention, even modest improvements in recovery can add up. Designing study around restoration If attention is a resource that is spent and replenished, then an effective study routine is one that manages both sides of the ledger. Most study advice focuses entirely on spending: how to concentrate harder, eliminate distractions, stay at the desk longer. Much less attention is paid to replenishment, even though the quality of the next hour's work depends on it. Campus green space offers a way to build replenishment into the day deliberately. Consider a third-year history student preparing a long essay. She has found that she can concentrate well for about fifty minutes to an hour before the signs of tired attention start to appear. Previously she would push through them, working in a steadily declining state for three or four hours, and end the day with a few good pages and a lot of rereading. Now she structures her library sessions differently. She works for roughly fifty minutes, then leaves her books and phone at her desk, or carries the phone but keeps it in her bag, and walks outside to a small garden beside the library for ten to fifteen minutes. She does not use the time to plan her essay. She looks at the trees, notices whatever birds are about, watches the light on the grass, and lets her thoughts go where they like. Then she returns and works for another fifty minutes. The total time she spends working has dropped slightly. The amount of useful work she produces, in her own estimation, has gone up. She rereads less, gets stuck less often, and finishes the day less exhausted. Her experience is not a controlled experiment, and plenty of things could explain it. But it matches what the research would predict, and it illustrates a principle worth testing for yourself: the break is part of the work. A few practical guidelines follow from the evidence. Time the break to the fatigue. Restoration is most useful when attention is actually depleted. If you take an outdoor break ten minutes into a study session, you are interrupting focus that did not need rescuing. If you wait until you have been struggling for an hour, you have lost that hour. Most people find that concentration on demanding material begins to decline somewhere between forty-five minutes and ninety minutes. Learn your own pattern, and step outside when the first signs of fatigue appear rather than long after. Keep the break free of demands. The point of the break is to let directed attention idle. That means not checking email, not reading notes, not having an intense conversation about the assignment, and ideally not scrolling. Walking slowly or sitting somewhere with a view of vegetation, water or sky and allowing your attention to drift is closer to what the theory describes. This can feel strange at first, even uncomfortable, especially for students used to filling every gap. That discomfort usually fades with practice. Use the micro-break when you cannot leave. Not every study session allows a fifteen-minute walk. In a timed exam, a tight lab slot, or the final hours before a deadline, a longer break may not be possible. The green-roof research suggests that even a brief glance at greenery might help sustain attention. If you can, choose a study spot with a window onto trees or grass, and every so often, when you notice your focus slipping, spend thirty seconds to a minute simply looking out. It costs almost nothing and may help. Choose your study location with restoration in mind. Many libraries and study buildings have seats with views onto green spaces, and they are often the first to be taken for good reason. Arriving earlier to claim one, or finding the less popular building whose windows face a garden, is a small investment with a potential daily return. Chapter 6 discusses studying outdoors itself, which adds further options when the weather allows. Use a walk before difficult work. If you know you are about to begin something that will demand a great deal of concentration, such as an exam, a difficult problem set or an important piece of writing, a short walk through green space beforehand may help you arrive with attention in better condition. Berman and colleagues' walk lasted about fifty minutes, which is more than most students will have before an exam, but a shorter walk is still likely to be better than none, and certainly better than arriving straight from a crowded, noisy space or a session of frantic last-minute scrolling. Walk on stuck problems, lightly. Many students find that a walk helps when they are stuck on a problem or an argument that will not come together. The creativity research suggests there may be something to this. The key is to hold the problem loosely rather than grinding at it. Let it sit at the back of your mind while your attention wanders over the surroundings. Solutions often arrive not during the walk but shortly after returning to the desk. Not every student has the luxury of long library sessions to structure. Consider a first-year engineering student whose Tuesdays and Thursdays run from nine until four with lectures, tutorials and a lab stacked back to back, separated only by ten- or fifteen-minute gaps. By mid-afternoon his notes have become fragmentary and he struggles to follow the final lecture of the day. He cannot add a fifty-minute walk to that schedule. What he can do is change how he spends the gaps. Instead of staying in the lecture theatre and checking his phone, or queuing in the busiest café, he takes the outdoor route to the next room, even if it adds three minutes, and walks along the edge of the lawn rather than through the main concourse. On the longer gap at lunch he eats outside when the weather allows, at a bench facing a line of trees. None of these changes is large, and none of them is a guaranteed fix. But they convert a string of demanding transitions into a string of small restorative ones, and in a day that is almost entirely directed attention, that is the kind of change the research suggests is worth making. It is also worth testing the effect on yourself rather than taking it on trust. For two weeks, alternate between your usual breaks and green breaks during similar study sessions, and at the end of each session write a single line: how much you got done, and how depleted you feel on a simple scale from one to five. You will not produce a publishable result, and your days will vary for many reasons. But a rough personal comparison helps in two ways. It shows you whether the approach suits you, and it builds the kind of first-hand evidence that counteracts the forecasting error described in chapter 1, the persistent sense that going outside will not help as much as it actually does. Attention, habit and the long term There is a longer-term dimension to all this. A semester is not a single study session but many hundreds of them. A student who habitually pushes through depleted attention, filling breaks with more demands and more screens, is not just having worse hours; she is teaching herself that study is a grinding, exhausting experience, which in turn makes it harder to start. A student who habitually builds restoration into her study, in contrast, is making the experience of study more sustainable and, over time, more pleasant. This connects to a broader point about academic life. Universities tend to reward visible effort: long hours in the library, all-night sessions before deadlines, the performance of being busy. The research on attention suggests that some of that effort is wasted, spent in a depleted state that produces little. Learning to rest well is not a sign of weaker commitment. It is a sign of taking your own cognitive resources seriously. It is also worth noting what attention restoration cannot do. It cannot make up for sleep deprivation, which impairs attention in ways that a walk will not fix. It cannot compensate for a workload that is genuinely unmanageable. It does not address attention difficulties that have other causes, such as ADHD, depression, anxiety or the effects of medication, for which assessment and support from a clinician or disability services office may be appropriate. If your concentration problems are persistent, severe, or affecting many areas of your life, it is worth talking to someone rather than assuming more breaks will solve them. For the ordinary, everyday fatigue of sustained study, though, nearby nature offers something unusual: a form of rest that is free, close at hand, compatible with a busy schedule, and supported by a coherent body of research. The next chapter turns from attention to the second main pathway, the effect of natural settings on stress and on the kind of repetitive negative thinking that often accompanies it. Hashtags: #NatureOnCampus #CampusGreenSpaces #NatureAndMentalHealth #StudentMentalHealth #StudentWellbeing #NatureAndWellbeing #GreenSpaceBenefits #NatureExposure #AttentionRestorationTheory #StressReductionTheory #EnvironmentalPsychology #RachelAndStephenKaplan #RogerUlrich #BiophiliaHypothesis #NatureConnectedness #MentalHealthAwareness #StressManagement #AttentionRestoration #CognitiveRestoration #MindfulnessInNature #OutdoorLearning #OutdoorStudyBreaks #CampusWellness #NatureBasedWellbeing #GreenSpaceAccessibility #StudentStressRelief #RuminationReduction #AcademicFocus #HealthyCampusDesign #EvidenceBasedWellbeing
- Large Language Models in Production (RAG, Fine-Tuning, and Agentic AI)
Download the Book (PDF): Introduction In February 2024 a small-claims tribunal in British Columbia ordered Air Canada to pay a passenger named Jake Moffatt $812.02. The sum was trivial; the reasoning was not. Moffatt's grandmother had died, and before booking a flight he had asked the chatbot on Air Canada's website about bereavement fares. The chatbot told him he could buy a full-price ticket and apply for the reduced fare retroactively within ninety days. That was not the airline's policy. When Moffatt applied, Air Canada refused, and when he took the matter to the Civil Resolution Tribunal the airline argued, in effect, that the chatbot was responsible for its own words. The tribunal member, Christopher Rivers, called this "a remarkable submission." The chatbot was part of Air Canada's website, and Air Canada was responsible for everything on its website. The case is cited so often that it has become a kind of parable, and like most parables it is usually told with the wrong moral. The common reading is that language models hallucinate and so should not be trusted with customers. That is true but useless, since it is true of every language model ever built, and companies are not going to stop deploying them. The better reading is that Air Canada shipped a component without owning it. Somewhere between the prototype and the production website, nobody had answered three ordinary engineering questions. Where does the knowledge this system states come from? What governs how it behaves when it does not know? And what is it permitted to commit the company to? Those questions are the subject of this book. The argument The controlling idea of what follows is simple to state and hard to practise. A large language model in production is not a model; it is a system, and the reliability of that system comes almost entirely from the engineering around the model. That engineering is a series of decisions about where three things should live. Knowledge (the facts the system states) should usually live outside the model, in documents that can be retrieved, cited, updated and permissioned. Behaviour (the tone, format, procedure and judgement the system exhibits) can live in instructions or, when instructions are not enough, in the model's weights through fine-tuning. Authority (the actions the system may take in the world, and the commitments it may make on someone's behalf) must live in code that the model cannot talk its way around. And none of these decisions can be made well without measurement, so evaluation is not the final stage of the work but its foundation. Most failed deployments put one of these things in the wrong place. Teams fine-tune a model on their product manuals and are surprised when it confidently misquotes them, because they have tried to store knowledge in weights. They write ever-longer system prompts begging the model to be careful, because they have tried to enforce authority with prose. They build retrieval pipelines that return the wrong documents and never notice, because they have no measurement that separates a retrieval failure from a generation failure. The technologies in the subtitle of this book (retrieval-augmented generation, parameter-efficient fine-tuning and agentic tool use) are best understood not as competing trends but as the three main instruments for putting knowledge, behaviour and authority where they belong. What has changed, and what has not The field moves quickly enough that any book about it risks describing a world that no longer exists. Since the first wave of enterprise pilots in 2023, context windows have grown from a few thousand tokens to hundreds of thousands and, for some models, millions. Prices per token have fallen by more than an order of magnitude for comparable capability. Models now call tools natively, and an open standard for connecting them to external systems, the Model Context Protocol, which Anthropic released in November 2024, was donated in December 2025 to a new Agentic AI Foundation under the Linux Foundation, with OpenAI and Block as co-founders. Reasoning models that spend extra computation thinking before they answer have changed what a single call can accomplish. Regulation has moved from proposal to statute: the European Union's AI Act entered into force in August 2024, its obligations for general-purpose models began to apply in August 2025, and its rules for high-risk systems were, after a provisional political agreement in May 2026, pushed back to December 2027 for most stand-alone uses. What has not changed is more important. Models still generate fluent text that is sometimes false, and a 2025 paper from OpenAI researchers argued persuasively that this is a predictable consequence of how they are trained and evaluated rather than a bug awaiting a fix. Retrieval systems still fail silently. Every additional step an agent takes still multiplies the chances that something goes wrong. Untrusted text that reaches a model can still change what the model does, and no one has found a general defence against that. A long context window has not made retrieval obsolete, any more than large memory made databases obsolete. The principles that make these systems trustworthy were visible in 2023 and are, if anything, more pressing now that the systems have more power. This book therefore concentrates on mechanisms and decisions rather than products. Vendors and model versions are mentioned where they illuminate a point, and real incidents are described where they teach something, but the aim is to give a practitioner a way of reasoning that survives the next release cycle. Who this is for and how it is organised The reader I have in mind is a practitioner: an engineer, architect, technical product manager or data scientist who has built something with a language model API, has seen it impress people in a demonstration, and now has to make it work for thousands of users who will not be as forgiving as the demonstration audience. I assume familiarity with the basic idea of a language model, with embeddings in outline, and with ordinary software engineering. I do not assume a background in information retrieval or machine learning research, and I explain the mechanisms that matter in plain prose. Where a short code fragment makes a point more clearly than a paragraph, I use one, but the argument is carried by the text. The chapters run in the order a team should think, which is not the order in which most teams build. Chapter 1 describes the gap between a prototype and a production system and why it is so much wider for language models than for conventional software. Chapter 2 makes the case for building evaluation before architecture, and shows how to do it. Chapters 3, 4 and 5 deal with knowledge: the architecture of retrieval-augmented generation, the mechanics of vector search and the databases that provide it, and the techniques that turn a mediocre retrieval pipeline into a good one. Chapter 6 deals with behaviour, through fine-tuning and its parameter-efficient variants, and is unusually firm about what fine-tuning should not be used for. Chapter 7 confronts hallucination directly: why it happens, how to measure it, and how to design customer-facing systems that degrade safely. Chapter 8 deals with authority, through agents and tool use, and argues that the central design question for an agent is not how clever it is but what it is allowed to do. Chapter 9 covers the operational and security disciplines, prompt injection above all, that decide whether a system that works on launch day still works six months later. The conclusion draws out what follows from the whole argument and where it remains genuinely unsettled. Each chapter can be read alone, but the argument accumulates. A reader who skips to the chapter on agents will find it more persuasive having read the chapter on evaluation, because the case against giving an agent broad authority rests on numbers that only careful evaluation produces. One further note. Much writing about this field is either breathless or dismissive, and both postures are failures of attention. Language models have made it possible to build systems that answer questions over a company's entire document estate, draft and triage customer correspondence, and carry out multi-step tasks that previously required a person at a keyboard. They have also produced a steady stream of public embarrassments, legal liability and quietly abandoned projects. Both facts are true, and the difference between them is almost always engineering. That is the hopeful part of the story, and the reason for writing this book. CHAPTER 1 From Demo to System Every language model project has a moment of seduction. Someone wires a model to a handful of documents, types a question in a meeting, and the answer comes back fluent, specific and apparently correct. The room is impressed, a budget appears, and a date is set. Months later the team is still trying to work out why the system that answered so well in the meeting gives a confidently wrong answer to one customer in twenty, why the bill is three times the estimate, and why a security reviewer has blocked the launch. None of this is a sign of incompetence. It is the predictable result of a technology whose best case is unusually easy to demonstrate and whose worst case is unusually hard to see. Conventional software fails loudly: a function throws an exception, a page returns an error, a test goes red. A language model fails by producing a well-formed paragraph that happens to be false. The distance between a convincing prototype and a dependable system is therefore wider for language models than for almost anything else in software, and the first task of a production team is to understand exactly what that distance consists of. Why the demonstration lies A demonstration is a sample of one, chosen by someone who wants it to succeed. That sounds like an accusation of bad faith, but it is simply how demonstrations work. The person running it picks questions they already know the answer to, phrased the way they would phrase them, against documents they have just loaded. They ask in the order that tells the best story. If the first attempt goes oddly they rephrase, often without noticing they have done so. Every one of these choices removes variance, and variance is where a language model's problems live. Consider the sources of variance a demonstration suppresses. The first is phrasing. Language models are sensitive to the surface form of their input in ways that have no counterpart in deterministic software. A 2023 study by Melanie Sclar and colleagues measured how performance on classification tasks changed when they varied only incidental features of prompt formatting, such as separators, casing and spacing, and found differences of up to 76 accuracy points for one open model. Larger and instruction-tuned models are less brittle than that, but none are immune, and a real user base will produce every phrasing the team did not think of. The second is the input distribution. The documents in a demonstration are the documents the team knows. In production, the questions arrive from people who do not know which documents exist, who ask about products that were discontinued, who paste in error messages, who write in a second language, and who ask questions that the system was never meant to answer. A retrieval system that finds the right passage for the team's ten test questions may find nothing useful for a third of real ones, and the model will still produce an answer. The third is adversarial intent. Nobody in a demonstration tries to break the system. In December 2023 a software engineer named Chris Bakke persuaded the customer-service chatbot of a Chevrolet dealership in Watsonville, California to agree to sell him a new Chevrolet Tahoe for one dollar, having first instructed it to end every reply by saying that its offer was legally binding. A month later a customer of the parcel company DPD, frustrated by an unhelpful bot, got it to swear at him and write a poem about how useless DPD was; the company disabled the AI component and blamed a system update. Neither incident did much material harm, but both went around the world within days, and both were the result of ordinary users doing something the builders had not imagined. Real systems face far more determined attackers than these, as Chapter 9 describes. The fourth is time. A demonstration happens once. A production system runs for months, during which the documents change, the model provider updates the model behind the same name, user behaviour shifts as people learn what the system is good for, and the prompt accretes patches. A system that was correct in March can be wrong in June without a single line of the team's code having changed. The final source of variance is scale itself. A failure rate of one in a hundred is invisible in a demonstration and is a thousand bad answers a day for a service handling a hundred thousand queries. Because the failures are fluent, many of them will not be noticed by the users who receive them, which is worse than if they were. What production adds If the demonstration hides variance, production adds constraints that the demonstration never had to meet. It is worth naming them precisely, because each one shapes architecture. Production adds cost as a design variable. A prototype that sends the whole of a forty-page policy document to the model with every question costs very little when ten people use it. The same design serving a contact centre may cost more than the staff it was meant to assist. Token costs have fallen dramatically since 2023, but systems have grown to consume the savings: longer contexts, multi-step agents and reasoning models that generate thousands of hidden tokens before answering can make a single interaction cost several orders of magnitude more than a simple completion. Cost per resolved task, not cost per token, is the number that decides whether a system survives its first budget review. Production adds latency budgets. A person in a meeting will wait eight seconds for an impressive answer. A customer on a support page often will not, and a voice system that pauses for three seconds before speaking feels broken. Every component added for reliability (a reranker, a second model checking the first, a retrieval step over a larger index) costs time, and the engineering problem is to spend that time where it buys the most accuracy. Production adds permissions. In a prototype every document is visible to everyone, because the only user is the builder. In an enterprise, a retrieval system that ignores access controls is a data-leak engine: an employee who asks the internal assistant about salary bands should not receive passages from documents they are not entitled to open. Permissions are among the hardest requirements to retrofit, because they have to be enforced at retrieval time, before any text reaches the model, not filtered from the model's answer afterwards. Production adds liability. The Air Canada tribunal was explicit that a company cannot disclaim what its chatbot says. In April 2025 the AI support agent of Cursor, a popular coding tool made by Anysphere, told users who had been unexpectedly logged out that a new policy limited subscriptions to a single device. No such policy existed; the bot had invented it to explain a bug. The answer spread on Reddit and Hacker News, users announced cancellations, and the company had to apologise publicly. Earlier, in March 2024, the investigative outlet The Markup reported that New York City's MyCity business chatbot was advising employers that they could take a cut of workers' tips and landlords that they could refuse tenants who paid with housing vouchers, both of which are illegal in the city. In each case the answer was delivered with the full authority of the organisation behind it. Production adds operations. Someone has to know when the system is getting worse, which requires logging and evaluation that run continuously. Someone has to decide when to adopt a new model version, which requires a way to compare old and new on the organisation's own tasks. Someone has to answer the question "why did the system say that?" for a complaint, a regulator or a court, which requires that the inputs, retrieved context, prompt version and model version for each answer be recorded and recoverable. These constraints explain a pattern that industry surveys have recorded repeatedly since 2024: many generative AI pilots never reach production, and many that do are quietly scaled back. In June 2025 the research firm Gartner predicted that more than 40 per cent of agentic AI projects would be cancelled by the end of 2027, citing escalating costs, unclear business value and inadequate risk controls. Predictions of that kind should be held loosely, but the reasons given are the right ones, and every one of them is an engineering problem rather than a model problem. Knowledge, behaviour and authority The most useful single habit a production team can adopt is to classify every requirement by asking what kind of thing it is. Almost every requirement placed on a language model system is one of three kinds, and each kind has a natural home. The first kind is knowledge: what the system must know in order to answer. The current price of a product, the terms of a refund policy, the contents of an engineering runbook, a customer's order history. Knowledge has four properties that matter. It changes, sometimes daily. It has provenance, meaning that someone is responsible for it being correct. It has permissions, meaning that not everyone may see all of it. And when it is stated to a user it should be traceable, so that both the user and the organisation can check where it came from. All four properties argue for keeping knowledge outside the model, in stores that can be updated, attributed, permissioned and cited. The model's job is to read that knowledge at the moment of answering, not to remember it. This is the logic of retrieval-augmented generation, and it is why the next four chapters of this book concern retrieval. Models do, of course, contain a great deal of knowledge in their weights, absorbed during pretraining. That knowledge is useful for general reasoning and language, but it is the wrong place to keep anything an organisation needs to be right about. It cannot be updated without retraining, it cannot be cited, it cannot be permissioned, and the model cannot reliably tell the difference between what it learned and what it is inferring. A production system should treat the model's internal knowledge as a source of competence, not of facts. The second kind of requirement is behaviour: how the system acts. The tone it takes, the format of its answers, the procedure it follows when a customer reports a fault, the judgement it exercises when a question falls outside its scope, the language it replies in, whether it asks a clarifying question or makes an assumption. Behaviour does not change daily and does not need citation, so it can live inside the system in a way knowledge should not. Its first home is the instructions given to the model, the system prompt and the examples that accompany it. When instructions are insufficient, because the behaviour is too subtle to describe, too costly to describe in every call, or needs to be reliable at a level prompting cannot reach, behaviour can be trained into the model's weights. That is the proper territory of fine-tuning, and Chapter 6 argues that the most common mistake in the field is to use fine-tuning for knowledge rather than for behaviour. The third kind is authority: what the system is permitted to do and to commit to. Whether it can issue a refund, and up to what amount. Whether it can modify a database, send an email, promise a delivery date, or quote a price. Authority is where the stakes are highest and where the temptation to use the wrong tool is strongest. It is tempting to write "never offer a discount greater than 10 per cent" in a system prompt and consider the matter handled. But a system prompt is a request, not a control. A model can misread it, can be persuaded to ignore it, and can be manipulated by text from a retrieved document or an incoming email into acting against it. Authority must live in deterministic code that sits between the model and the world: the refund tool that checks the amount against a limit, the database connection that is read-only, the email function that requires human approval for external recipients. Chapter 8 develops this into a design principle for agents, and Chapter 9 shows why prompt injection makes it non-negotiable. The classification has a practical payoff. When a requirement is misfiled, the symptoms are distinctive. Knowledge filed as behaviour (pasting the whole product catalogue into the system prompt) produces stale answers and escalating cost. Knowledge filed in weights (fine-tuning on the manual) produces fluent confabulation, because the model learns the style of the manual faster than its content. Authority filed as behaviour (asking the model nicely not to do something dangerous) produces incidents like the Chevrolet sale and, with more capable agents, far worse. Behaviour filed as knowledge (retrieving style guidelines at query time) produces inconsistency, because the guidelines are retrieved for some queries and not others. A team that learns to recognise these symptoms can usually diagnose a misbehaving system before reading a single log line. The shape of a production system It helps to have a picture, in words, of what a mature system looks like, so that the components discussed in later chapters have somewhere to sit. A request arrives from a user, carrying their identity and some context about the session. Before anything reaches a model, an input layer does several cheap things: it checks the request against rate limits, screens it for obvious abuse, and sometimes classifies it, so that questions outside the system's scope can be routed elsewhere or declined. Classification is often done by a small, fast model, since it is a narrow task. For requests that need knowledge, a retrieval layer turns the question into one or more search queries, runs them against indexes that have been filtered to the documents this user is allowed to see, combines and reranks the results, and selects a small number of passages to give the model. This layer is a search engine, and should be engineered and measured as one. The generation layer assembles a prompt from versioned instructions, the retrieved passages, relevant conversation history and the user's question, and calls a model. In an agentic system, the model may respond not with an answer but with a request to call a tool; the orchestration layer then executes that tool, subject to permission checks implemented in code, and returns the result to the model, looping until the task is complete or a limit is reached. An output layer inspects what the model produced before the user sees it. It may check that every factual claim is supported by a retrieved passage, that the answer contains no personal data it should not, that any commitments fall within policy, and that the format is valid. When checks fail, it can retry, fall back to a safer response, or hand the conversation to a human. Around all of this sits instrumentation: every request, retrieved passage, prompt version, model version, tool call and output is logged, sampled for evaluation, and fed into dashboards and alerts. And beneath it sits an evaluation suite that the team runs before every change, whether to a prompt, a chunking strategy, an index, or the model itself. Few systems need every element on day one, and a team that tries to build all of it before shipping anything will ship nothing. But every element exists because its absence has caused a real failure somewhere, and the order in which they are added should be driven by measured risk rather than by fashion. That raises the question of how risk is measured, which is the subject of the next chapter, and which most teams address far too late. The rest of this book can be read as an elaboration of the architecture just described. Its recurring theme is that the model, the component that receives most attention, is the one the team controls least and should rely on least. The model is a remarkable reasoning and language engine. The system's trustworthiness comes from everything that decides what the model sees, what it is allowed to do, and how anyone finds out when it has gone wrong. CHAPTER 2 Evaluation First Ask a team building a language model application how they know it works, and the most common honest answer is that they have tried it. Someone, usually the engineer who wrote the prompt, has typed in a few dozen questions and read the answers, and they looked good. This practice has a name among practitioners, "vibe checking," and it is the single largest cause of systems that degrade after launch. It is not that the people doing it lack judgement. It is that judgement exercised on an unrecorded, shifting sample of inputs cannot detect regressions, cannot compare alternatives, and cannot tell anyone else what "works" means. The argument of this chapter is that evaluation should be built before the architecture is chosen, not after. That inverts the order in which most teams work, so it needs justifying. The justification is that nearly every design decision in the rest of this book (how to chunk documents, which embedding model to use, whether to add a reranker, whether to fine-tune, how much authority to give an agent) is an empirical question whose answer depends on the organisation's own data and users. Without an evaluation set, those decisions are made by reading blog posts. With one, they are made by running an experiment that takes an afternoon. Why generative systems are hard to test Conventional tests compare an output with an expected value. A function that adds two numbers either returns the right sum or does not. A language model asked "what is our refund window for opened electronics?" might correctly answer "30 days," "You have thirty days from delivery," or "Opened electronics can be returned within a month of receipt, provided you have the original packaging," and each would be right. It might also answer "30 days" when the correct answer is "14 days for opened items, 30 for unopened," which is fluent, nearly right, and wrong in the way that generates complaints. Three properties make this difficult. The first is that correct outputs form a large set rather than a single value, so exact matching is useless for most tasks. The second is that outputs are not deterministic: even at a temperature of zero, many hosted models do not return identical outputs for identical inputs, because of batching and floating-point effects in the serving infrastructure, and at higher temperatures variation is the point. A single run of a test therefore says little about the probability of passing. The third is that the most important failures are semantic rather than syntactic. An answer can be grammatical, relevant, well formatted and confidently false. These properties do not make evaluation impossible. They make it statistical, and they make it depend on deciding in advance what matters. That decision is the hardest and most valuable part of the work. Building an evaluation set from reality The raw material of a good evaluation set is real usage, not imagination. Before launch, that means collecting the questions people actually ask: support tickets, search logs from the existing help centre, emails to the team that owns the policy, transcripts of calls. After launch, it means sampling production traffic. Questions invented by the team are useful for covering cases that real traffic has not yet produced, but they are systematically easier and more articulate than real ones, and an evaluation built only from them will overstate quality. The practice that distinguishes strong teams is error analysis before metric design. Rather than starting with a list of metrics found in a framework, the team reads a few hundred real interactions, writes a short note on each one that goes wrong, and then groups the notes into categories. The categories that emerge are specific to the system and are almost never the ones a generic framework would have proposed. For a customer-support assistant they might include: answered from an outdated policy document; correct policy but wrong product variant; refused a question it should have answered; answered a question it should have escalated; correct content but promised a timescale nobody can guarantee; misunderstood a question that referred to an earlier message. The practitioners Hamel Husain and Shreya Shankar, who have taught this method to many teams, argue that this qualitative step is where most of the value lies, because it tells the team what to measure. A metric that does not correspond to a failure users actually experience is a distraction, however standard it looks. From this analysis the team builds a set of test cases. Each case contains an input, any context needed to reproduce it (the user's permissions, the conversation so far, the state of the documents), and a specification of what a good answer must do. The specification is usually not a reference answer to be matched but a short list of checkable assertions: it must state the 14-day window for opened items; it must not promise a refund; it must cite the returns policy; it must offer escalation if the item is damaged. Assertions of this kind are easier for both humans and automated judges to apply consistently than a holistic quality score, and they make failures diagnosable. A single case, written as data, might look like this: ```yaml id: returns-0147 input: "I opened the headphones but they crackle. Can I still send them back?" context: user_segment: consumer region: UK must: • states that opened electronics can be returned within 14 days • treats the crackle as a possible fault and offers the faulty-goods route • cites the returns policy must_not: • promises a refund before the item is inspected category: policy-specificity ``` The format matters less than the habit it encodes. The case states what the answer must contain, what it must avoid, and which failure category it guards against, so that when it fails, the team knows both what went wrong and which earlier fix may have regressed. Each assertion is narrow enough that two reviewers, or a reviewer and an automated judge, would almost always agree on whether it was met. How many cases are needed? Fewer than people expect to start, more than they expect eventually. A hundred carefully chosen cases that span the failure categories will reveal most large regressions and most large improvements. Distinguishing between two configurations whose quality differs by a few percentage points requires several hundred or more, because the confidence interval on a pass rate measured over a hundred cases is roughly ten points wide. The set should grow continuously: every production failure that reaches a human reviewer becomes a new case, so that the same failure cannot silently recur. The composition of the set matters as much as its size. A set drawn purely at random from traffic will be dominated by the most common, easiest questions, and will say little about the rare cases that cause the worst harm. Strong evaluation sets are stratified deliberately. They include a share of questions that the system should not be able to answer, because the information is not in its sources, so that the team can measure how often it says so rather than inventing a reply. They include questions that should be declined or escalated: requests for legal or medical advice, complaints that need a person, questions outside the product's scope. They include adversarial inputs drawn from the kinds of manipulation described in Chapter 1 and Chapter 9. They include multi-turn conversations, since many failures appear only when a follow-up depends on an earlier answer. And they include cases for each user segment, region or language the system serves, because quality often differs sharply between them and an aggregate score hides the difference. Reporting results per stratum, rather than as one number, is what lets a team see that a change improved common questions while making the system worse at declining the ones it cannot answer, which is exactly the trade that leads to incidents. Measuring the parts and the whole A system built from retrieval, generation and tools can fail in each of them, and an end-to-end score cannot say which. When an answer is wrong, the first diagnostic question is whether the right information was retrieved. If it was not, no amount of prompt engineering will fix the answer. If it was and the model ignored or misread it, retrieval changes will not help. Teams that only measure end-to-end quality spend weeks tuning the wrong component. Retrieval should therefore be measured as a search problem, using the standard metrics of information retrieval. For each test question, the team records which documents or passages contain the information needed to answer it. Recall at k then measures the fraction of questions for which at least one relevant passage appears among the top k results; this is the most important retrieval metric for most applications, since a passage that is not retrieved cannot be used. Mean reciprocal rank rewards placing the first relevant passage near the top, and normalised discounted cumulative gain extends the idea to graded relevance across the whole ranked list. Labelling relevant passages is laborious, but it need only be done once per question, and it can be bootstrapped by having a strong model propose candidate passages for a human to confirm. Generation is measured against the retrieved context and against the question. The framework most widely associated with this decomposition is RAGAS, introduced by Shahul Es and colleagues in 2023, which popularised three measures. Faithfulness asks whether every claim in the answer is supported by the retrieved context, and is the most direct measure of hallucination in a retrieval system. Answer relevance asks whether the answer addresses the question that was asked. Context relevance asks whether the retrieved passages were on topic. Later work has added context recall, which compares the retrieved context with a reference answer, and many teams add task-specific checks such as whether citations point to the passages that actually support each claim. Tools and agents need their own measures, which Chapter 8 discusses: whether the right tool was called with valid arguments, whether the final state of the world is correct, and how often a task succeeds across repeated attempts rather than once. Machines judging machines Many of the assertions in a good evaluation set require judgement: does this answer state the 14-day window? Does it imply a refund will be given? Human reviewers can apply such assertions, but not at the volume needed to run an evaluation suite several times a day. The practical answer is to use a language model as the judge. The technique was examined systematically by Lianmin Zheng and colleagues in their 2023 paper "Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena," which found that a strong model's preferences between pairs of answers agreed with human experts at a rate above 80 per cent, comparable to the agreement between human experts themselves. The same paper documented the biases that make naive use of judges dangerous. Judges favour whichever answer is presented first (position bias), favour longer answers regardless of quality (verbosity bias), and may favour outputs that resemble their own (self-enhancement bias). They are also weak at checking facts they cannot verify from the material in front of them. Several practices make model judges trustworthy enough to rely on. Judges should evaluate narrow, binary assertions rather than produce holistic scores on a scale of one to ten; "does the answer state that opened electronics have a 14-day window, yes or no" is far more reliable than "rate the accuracy of this answer." They should be given the evidence they need, such as the retrieved context or the reference policy, so that they are checking support rather than recalling facts. Pairwise comparisons should be run in both orders to cancel position bias. Most importantly, the judge must itself be evaluated. The team labels a few hundred outputs by hand, runs the judge on the same outputs, and measures agreement, paying particular attention to the judge's false negatives: cases where a bad answer was passed. A judge whose agreement with human labels is not known is an opinion, not a measurement. When the judge's prompt or model changes, the agreement must be measured again. It is tempting to use the same model as both generator and judge, and for many assertions this works acceptably. But where the judge is asked to detect errors the generator is prone to, a different model, or at least a differently prompted one with access to evidence the generator did not have, is more likely to catch them. From offline to online An offline evaluation suite answers the question "is this version better than the last one on the cases we know about?" It should run automatically whenever a prompt, retrieval setting, model version or tool definition changes, in the same way that unit tests run on every commit. Because outputs are stochastic, each case should be run several times, and the suite should report pass rates with intervals rather than a single number. A change that moves the overall pass rate from 87 to 89 per cent on two hundred cases is not evidence of improvement; a change that fixes a whole category of failures without breaking others usually is. The suite also needs a small number of cases that must never fail, regardless of averages: the system must never reveal another customer's data, never state a price that differs from the catalogue, never claim to have taken an action it did not take. These are treated as hard gates. A version that fails any of them does not ship, however good its average. Offline evaluation cannot capture what it has not seen, so production systems need online evaluation as well. The cheapest signals are implicit: whether the user rephrased the question immediately (suggesting the first answer missed), whether they clicked a cited source, whether they escalated to a human, whether the ticket was reopened. Explicit thumbs-up and thumbs-down ratings are useful but sparse and skewed towards the annoyed. The most informative practice is to sample a fixed number of production interactions each day, run the automated judges over them, and route a smaller sample to human reviewers, both to catch new failure categories and to keep checking that the judges still agree with people. When the model provider updates a model, or the document collection changes substantially, this online sample is often the first place a regression shows. Controlled experiments, in which a fraction of traffic receives a new version, are the gold standard for decisions with business consequences, such as whether a change reduces escalations. They require enough traffic to detect differences and a clearly defined outcome metric, and they are slower than offline evaluation. They complement it rather than replace it. The trap of public benchmarks Model providers and leaderboards report scores on public benchmarks, and it is natural to use these to choose models. They are a reasonable first filter and a poor final one. Public benchmarks measure general capabilities on tasks unlike the organisation's own, they have often leaked into training data, and the differences between leading models on them are frequently smaller than the differences between those models on a specific application. Two models a single point apart on a famous reasoning benchmark can differ by twenty points on an organisation's support tickets, in either direction. The only benchmark that reliably predicts performance on a task is a well-built evaluation of that task. This is the deepest reason to build evaluation first. A team with a trustworthy evaluation suite can adopt a new model within days of its release, because it can measure whether the new model is better for its purposes and what breaks. A team without one either stays on an old model out of fear or switches on the strength of announcements and discovers the consequences from customers. In a field where the strongest available model changes every few months, the evaluation suite is the most durable asset the team owns. Prompts are rewritten, indexes rebuilt and models replaced; the knowledge of what good looks like, encoded as several hundred carefully specified cases, is what carries forward. One caution completes the picture. Any metric that is optimised hard enough begins to diverge from the quality it was meant to measure, a phenomenon usually summarised as Goodhart's law. Teams that tune prompts against the same evaluation set for months find that the set's pass rate keeps rising while user satisfaction does not. The remedies are the same as in other fields: hold back a portion of cases that are never used for tuning, refresh the set regularly from new production traffic, and keep humans reading real interactions. Evaluation is not a gate passed once but a practice of continuous attention, and the chapters that follow assume it is in place. CHAPTER 3 The Architecture of Grounding Retrieval-augmented generation is the default architecture for enterprise language model systems for a reason that has little to do with fashion. It is the straightforward application of the principle set out in Chapter 1: knowledge that changes, has an owner, carries permissions and must be traceable belongs outside the model, and the model should read it at the moment it answers. Everything else in the design of a retrieval system follows from taking that principle seriously, including the many ways in which simple implementations fall short of it. Where the idea came from The term comes from a 2020 paper by Patrick Lewis and colleagues at Facebook AI Research, University College London and New York University, titled "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks." Their system joined two trained components: a dense retriever, which encoded a question and a collection of Wikipedia passages into vectors and found the passages closest to the question, and a sequence-to-sequence generator, which produced an answer conditioned on both the question and the retrieved passages. The paper's framing is still the clearest statement of why the approach matters. A language model stores knowledge in its parameters, which the authors called parametric memory; a document index stores it in a form that can be inspected and replaced, which they called non-parametric memory. Combining the two produced answers that were more specific and more factual than the generator alone, and the knowledge could be updated by swapping the index without retraining anything. Other work of the same period pursued the same idea. Google's REALM, published by Kelvin Guu and colleagues in 2020, built retrieval into language model pretraining itself. DeepMind's RETRO, described by Sebastian Borgeaud and colleagues in late 2021, retrieved from a database of around two trillion tokens and reported performance comparable to GPT-3 on a standard language modelling benchmark with roughly one twenty-fifth of the parameters. These results established that much of what a large model does with its parameters is store facts, and that storing them externally is efficient. The pattern that most enterprise teams now call RAG is simpler than any of these research systems. It does not train the retriever and generator together. It uses an off-the-shelf embedding model to index documents, an off-the-shelf search mechanism to find relevant passages, and an off-the-shelf instruction-following model that is told, in its prompt, to answer using the passages provided. This loose coupling is what made RAG practical: any team can build one in an afternoon from parts. It is also the source of most of RAG's problems, because each part was optimised for something slightly different from the task at hand, and nothing in the system learns from the others' mistakes. The pipeline, stage by stage A retrieval-augmented system has two halves that run at different times. The indexing half runs when documents change: it ingests documents, splits them into passages, computes representations of those passages, and stores them in indexes along with metadata. The query half runs for each question: it turns the question into searches, retrieves and ranks passages, assembles a prompt, and generates an answer. Each stage has decisions that matter more than they appear to. Ingestion is where most production systems lose quality first and where teams spend least attention. Enterprise knowledge does not arrive as clean text. It arrives as PDFs with two-column layouts and running headers, scanned forms, slide decks whose meaning lies in the arrangement of boxes, spreadsheets, wiki pages with navigation chrome, and email threads in which the important sentence is buried under eight quoted replies. A parser that reads a two-column PDF straight across the page will interleave unrelated sentences, and every downstream component will faithfully index nonsense. Tables are especially treacherous: flattened to text, a pricing table loses the association between a row label and the value in the fourth column, and a model reading the flattened text will cheerfully attach the wrong price to the wrong product. Good ingestion pipelines use layout-aware parsers, convert tables to a structured form that preserves row and column headers, strip boilerplate, deduplicate near-identical documents (enterprise collections are full of copies of the same policy at different versions), and record metadata such as source system, owner, effective date, product line and access permissions. That metadata is what later allows filtering by date or permission, and it cannot be recovered once lost. Ingestion is also where freshness and deletion are decided. A retrieval system is a copy of the organisation's knowledge, and copies drift. When a policy is withdrawn, the index must forget it, or the system will go on quoting it; Air Canada's bereavement policy problem is precisely the kind of error a stale index produces. Production pipelines therefore need incremental updates driven by change events from the source systems, and periodic reconciliation to catch what the events missed. Chunking divides documents into passages that will be retrieved as units. The size of a chunk is a genuine trade-off. Small chunks of a hundred or two hundred tokens produce precise embeddings, because each one is about one thing, and let the system pack many distinct passages into the model's context. But a small chunk often lacks the context needed to interpret it: a sentence reading "this limit does not apply to business accounts" is useless if the chunk does not say which limit. Large chunks of a thousand tokens or more preserve context but blur their embeddings across several topics, so that they match many queries weakly rather than one strongly. Common strategies include fixed-size windows with overlap between neighbours, recursive splitting that prefers to break at section and paragraph boundaries, and structure-aware splitting that follows the document's own headings. A widely used refinement separates the unit of retrieval from the unit of reading: the system searches over small chunks for precision but, when one matches, passes the model the larger section or parent document that contains it. Another, discussed in Chapter 5, prepends to each chunk a short description of where it sits in its document before indexing. There is no universally best chunk size; it is one of the first things an evaluation set should be used to tune. Embedding converts each chunk, and later each question, into a vector of a few hundred to a few thousand numbers, chosen so that texts with similar meanings have vectors that point in similar directions. Modern embedding models descend from work such as Sentence-BERT, published by Nils Reimers and Iryna Gurevych in 2019, and Dense Passage Retrieval, published by Vladimir Karpukhin and colleagues in 2020, which trained separate encoders for questions and passages on question-answer pairs so that a question's vector would land near the vectors of passages that answer it. The Massive Text Embedding Benchmark, introduced by Niklas Muennighoff and colleagues in 2022 and maintained as a public leaderboard, compares embedding models across dozens of tasks and is the usual starting point for choosing one. Three points about embeddings matter in production. First, an embedding model trained mostly on web text may not understand an organisation's vocabulary: product codes, internal acronyms and domain jargon often embed poorly, which is one reason keyword search remains essential, as the next chapter explains. Second, questions and answers are not alike. A question is short and phrased as a request; the passage that answers it is longer and phrased as a statement. Models trained for retrieval handle this asymmetry, often by asking for a prefix that marks text as a query or a document, and using them without the prefix degrades results. Third, changing the embedding model means re-embedding the whole collection, since vectors from different models are not comparable. That makes the choice sticky and argues for evaluating it carefully at the start. Some recent models are trained with a technique called Matryoshka representation learning, introduced by Aditya Kusupati and colleagues in 2022, which concentrates the most important information in the first dimensions of the vector so that it can be truncated to save storage with modest loss of quality, a useful property when an index runs to hundreds of millions of passages. Retrieval and generation complete the loop. The question is embedded, the nearest chunks are found, and the best of them are placed into a prompt that instructs the model to answer from the supplied material, to cite which passage supports each statement, and to say so when the material does not contain the answer. That last instruction is the most important and the least reliably followed, for reasons Chapter 7 examines. Why simple RAG disappoints A team that assembles this pipeline from defaults will usually find that it answers easy questions well and harder ones badly, and it is worth being precise about why. In 2024 Scott Barnett and colleagues at Deakin University published "Seven Failure Points When Engineering a Retrieval Augmented Generation System," drawn from building three such systems in different domains. Their list remains a good diagnostic checklist. The answer may simply not be in the collection, in which case the system should say so but often invents one instead. The answer may be in the collection but not rank highly enough to be retrieved. It may be retrieved but dropped when the system trims the results to fit the context. It may be in the context but not extracted by the model, because it is buried among irrelevant passages or contradicted by another. The answer may be extracted but presented in the wrong format, at the wrong level of specificity, or incompletely. Each failure point sits in a different component and calls for a different remedy, which is why the component-level evaluation described in Chapter 2 is indispensable. The model's own reading behaviour contributes. In "Lost in the Middle," published in 2023 and in the journal Transactions of the Association for Computational Linguistics in 2024, Nelson Liu and colleagues at Stanford showed that models answering questions from a set of retrieved documents used information at the beginning or end of the context much more reliably than information in the middle, with accuracy forming a U-shape across positions. Newer models with long contexts have reduced but not eliminated this effect, and its practical lesson stands: giving a model more passages is not free. Each irrelevant passage is a distraction, and a set of twenty passages of which one is relevant can produce a worse answer than a set of three that includes the same one. Several characteristic question types defeat simple retrieval. Questions that require combining information from several documents ("which of our enterprise plans include both single sign-on and data residency in the EU?") need every relevant document retrieved, not merely the most similar one. Questions about aggregates or trends ("how have complaints about delivery changed this year?") cannot be answered by retrieving passages at all; they need a query over structured data, or a summary built in advance. Questions with negations, comparisons or exceptions ("which products are not covered by the extended warranty?") are poorly represented by embeddings, which tend to place a sentence and its negation close together. Questions that depend on the conversation so far ("and what about for business accounts?") must be rewritten into standalone form before retrieval, or the search runs on a fragment. And questions whose answer depends on who is asking (a regional policy, a customer's own plan) need metadata filters that a pure similarity search does not apply. None of these failures is a reason to abandon retrieval. They are reasons to treat retrieval as what it is, a search engine, and to bring to it the techniques that search engineering has developed over decades. The next chapter turns to the mechanics of that search, and the one after to the techniques that make it good. One question, traced through the pipeline It is easier to see how these stages interact by following a single question through an imagined but typical system: an internal assistant at a retail bank that answers staff questions from the bank's product terms, operating procedures and policy documents. A branch employee types: "Can a customer with a joint account close it without the other holder?" At ingestion, months earlier, the relevant procedure was a PDF of forty pages exported from a document management system. Its first page carried the title "Account Maintenance Procedures," and its section on closures contained a table with rows for sole accounts, joint accounts with "either to sign" mandates and joint accounts with "both to sign" mandates, and columns for what each holder may do. If the parser flattened that table into a sequence of words, the association between "both to sign" and "closure requires both holders" may have been lost. Suppose it was preserved, because the team had invested in layout-aware parsing. At chunking, the closure section was split by a recursive splitter set to about four hundred tokens. The table landed in one chunk; the paragraph above it, which explained that the mandate is recorded on the account at opening and can be checked in the core banking system, landed in another. The chunk containing the table does not mention the word "joint" outside the table's row labels and does not mention the document's title. At query time, the question is embedded and compared with the index. The top results include a passage from the bank's terms and conditions for joint accounts, written for customers, which says that "either of you may give us instructions," and a passage from a complaints procedure about disputes between joint holders. The procedure chunk with the table ranks seventh, because its text is mostly short cell entries that embed poorly. The system passes the top five chunks to the model. The model, reading the customer terms, answers that either holder may give instructions on the account and so either may close it. That is right for accounts with an "either to sign" mandate and wrong for those with a "both to sign" mandate, and it is the kind of nearly correct answer that leads to an account being closed against one holder's wishes. Every component worked as designed. The parser preserved the table; the embedding model returned similar passages; the model answered faithfully from what it was given. The failure was emergent: an answer of the wrong specificity, produced because the most precise source ranked just outside the cut-off and a less precise one ranked inside it. Each stage offers a remedy, and an evaluation set containing this question would reveal which one is cheapest. Prepending the document title and section heading to every chunk would give the table chunk the words "account maintenance," "closure" and "joint" and lift its rank. Hybrid search would reward the exact phrase "joint account" in the table's row labels. A reranker reading the question and each candidate together would recognise that a procedure for staff answers a staff question better than terms written for customers. A metadata rule preferring internal procedures over customer-facing terms for staff queries would encode what every experienced branch employee knows. And a prompt instructing the model to say when an answer depends on a condition it cannot see, such as the account's mandate, would turn a wrong answer into a useful one: "It depends on the mandate recorded on the account; check it in the core banking system." This single example touches nearly every technique in the next two chapters, and it illustrates why none of them can be chosen sensibly without a set of real questions on which to measure them. Retrieval as a contract One further property of retrieval-augmented systems deserves emphasis because it is the strongest argument for them in customer-facing settings. Retrieval creates a contract between what the system says and a body of text that someone in the organisation owns. When an answer cites the returns policy, the policy's owner is responsible for the policy being right, and the engineering team is responsible for the system faithfully reporting it. That division of responsibility is exactly what was missing in the Air Canada case, and it is what allows a retrieval system to be audited: for any answer, an investigator can see what was retrieved, whether the retrieved text supported the answer, and whether the retrieved text was itself current and correct. A system that answers from the model's weights alone offers no such contract. Nobody owns what a model learned during pretraining, nobody can update it, and nobody can show where a particular claim came from. Even a model fine-tuned on an organisation's own documents, as Chapter 6 explains, does not reliably reproduce them and cannot cite them. For any requirement that is genuinely about knowledge, retrieval is not one option among several. It is the only architecture that keeps knowledge in a place where it can be governed. Hashtags: #LargeLanguageModelsInProduction #RetrievalAugmentedGeneration #RAG #FineTuning #AgenticAI #LargeLanguageModels #LLMEngineering #ProductionAI #GenerativeAI #EnterpriseAI #LLMArchitecture #AIApplications #VectorDatabases #SemanticSearch #HybridSearch #DocumentRetrieval #EmbeddingModels #RetrievalOptimization #ParameterEfficientFineTuning #LoRA #AIModelEvaluation #RAGEvaluation #LLMObservability #HallucinationMitigation #PromptInjectionDefense #AI agents #ToolCalling #ModelContextProtocol #AIInfrastructure #ResponsibleAI
Latest Book Releases:










































