Text from the interactive explanation
Localization Coefficients of Functions with Applications in Partial Differential Equations
Karamehmedović, Mirza, Triki, Faouzi
Original paperLocalization coefficients · Karamehmedović & Triki · 2025
Pull the towers apart. One ruler notices, one never moves.
Auto-demo · drag a tower to steer
Light, sound and electrons can trap themselves in small regions. Physicists call it localization , and engineers would like to design it. First you need a ruler for “concentrated”.
This paper’s idea: treat the wave as sand and measure the least work needed to rake it flat.
Sand on a tray
Every wave has an intensity at each point: how bright the light is, how loud the sound, how likely the electron is to be found there. Pour that intensity onto a tray as sand, scaled so that there is exactly one unit of sand in total.
A wave that fills its whole space evenly becomes a perfectly flat layer (the dashed line), the least concentrated sand there can be. A localized wave becomes a tall, narrow pile.
Below is one of the paper’s own test families, a smooth bump whose width σ you control (their eq. 7). Narrow it and watch the two rulers from the top of the page. The next two chapters explain how each one works.
Here both rulers agree. So what’s the problem?
Curves: each ruler against σ, scaled to its own range. Computed on this page from the paper’s equations.
The ruler that only reads heights
The most common localization score is the participation ratio α2,4. In plain words, it compares two averages of the sand’s heights: one that weighs tall spots very heavily (built from height4) and one that weighs them less (built from height2). If a few spots tower over the rest, the first average wins by a mile and the score climbs. We show it as 1/α2,4, so that higher means more concentrated.
Notice what it never asks: where the tall spots are. Here a lumpy pile is cut into 40 slices, each coloured by where it started.
Predict first. If we scatter the slices across the tray, what will the height ruler say?
Any score built only from heights sees just that sorted staircase, the decreasing rearrangement . That includes the participation ratio and the other classic tool, the “mass concentration comparison”. Mathematicians call functions made of the same slices equimeasurable ; such scores always rate them a tie (the paper’s Proposition 2 and Remark 1).
That is the paper’s first point, and its two-tower example is the scene at the top of this page: pull the towers apart and every height-only score stays exactly where it was, although the sand has clearly spread out.
Measure the work instead
Karamehmedović and Triki propose a score that looks at positions. Compare the sand with the flattest possible layer on the same tray and ask: what is the least effort needed to rake one into the other?
Effort is the average of (distance each grain moves)2, using the cheapest possible plan, so moving sand twice as far costs four times as much. This is the Wasserstein-2 distance of optimal transport; the paper calls the result β (its Definition 2). More concentrated sand has to travel farther, so β is larger.
Along a line the cheapest plan has a simple shape: grains never overtake each other . The leftmost grain goes to the leftmost spot, the next to the next, and so on. Watch the colours stay in order, in the tray and in the route map beneath it.
Drag across the tray to draw your own pile, or pick a preset. It becomes your pile and follows you through the next chapters.
Route map: top = where grains start, bottom = where they end. Slanted lines are long trips.
Which pile is more concentrated?
In every round the two piles are cut from exactly the same slices, so the height ruler gives them the same score. Trust your eyes, pick, then watch the sand flatten.
Make your pick.
A shortcut: count the crossings
Planning every grain’s route is expensive. In one dimension the authors prove a shortcut (their Lemma 1 ).
Stand at any point x of the tray. To your left lies U(x) of the sand, its running total. Once the sand is flat, only x of it may stay there. So exactly U(x) − x of the sand must cross your point on its way, to the right if positive, to the left if negative.
Square that crossing flow, add it up along the tray and take the square root. The result is β, exactly, for any pile. Below, the two numbers come from the two separate formulas, moving every grain versus counting crossings.
It is the same maths as steady heat flow in an insulated rod: piles act as heaters, gaps as coolers, nothing leaks out of the ends, and the crossing flow is the heat flux.
–
Computed on this page from the paper’s equations.
Write the sand as a probability density u on (0, 1) and solve
−g″(x) = u(x) − 1, g′(0) = g′(1) = 0
(“no flow through the walls”). Integrating once gives −g′(x) = U(x) − x, the crossing flow, and Lemma 1 states
β2 = W2(u, 1)2 = ∫01 (U−1(y) − y)2 dy = ∫01 (U(x) − x)2 dx = ‖g′‖2.
The middle integral moves each grain (ranked by y) from its place U−1(y) to its flat-layer slot y; the last one counts crossings point by point. In this language β is a homogeneous Sobolev norm, ‖u − 1‖ in Ḣ−1. In two and three dimensions the two are no longer equal. Adapting results of Peyre, the paper bounds one by the other: the transport distance is at most twice the Sobolev norm, and at least a fraction of it that depends on the pile’s peak height. Sharpening these bounds is the authors’ stated future work.
Why a shortcut matters
To compute β directly you solve a transport problem between every pair of grid points. For a pile sampled at n points the paper quotes a cost growing like n3 (plus n2d to tabulate distances), with n ≈ Nd for N points per side in d dimensions.
That matters because designing a localized wave means adjusting a model and re-scoring it again and again inside an optimisation loop. The shortcut replaces the transport problem by one sparse equation with n unknowns , in which each point only talks to its neighbours.
Order-of-magnitude arithmetic from the scaling quoted in the paper; constant factors ignored.
The wall problem
β has a quirk that the authors point out themselves (Section 3.3). Sand piled against a wall can only spread one way, so it has farther to go, and β rises, even when the sand looks no more concentrated to us. In a truly closed box that is fair. But often the wall is only where a computation stopped, cutting a bigger world short.
Predict first. As the towers separate, the sand is less concentrated, so the score should only fall. Which tray gets that right?
Plot: each tray’s score against the gap d, divided by its value when the towers touch (d = 0.1), so that the shapes can be compared. Computed on this page from the paper’s equations.
In two dimensions: change what moving costs
Streaks follow the flow field of the shortcut equation: where the sand has to go.
In two dimensions the authors try a third remedy: change what moving costs. With the cost c(x, y) = dist(x, ∂Ω) + dist(y, ∂Ω), each grain is charged for how deep inside the shape it starts and ends ; sand hugging a wall is cheap to settle.
Slide the two bumps apart. The upper one soon nears the wall. The shortcut-equation score (the 2D cousin of β from Chapter 4) first falls, then rises again as the bump nears the wall. The distance-to-wall score keeps falling steadily .
The paper reports the same steady fall for its own two-dimensional example (its Fig. 14) and notes that this kind of fix “seems to perform well in dimension two”, while the authors found it worked poorly in one dimension.
Domain and bumps are our recreation in the spirit of the paper’s Figs. 12–13; both scores computed on this page.
A string with a soft patch
Now some real waves. The paper revisits a vibrating string with fixed ends whose stiffness changes along its length, p(x) = tanh(40x − 10) + 1.1: very soft below x ≈ 0.25 (thin teal), stiff after (thick). Mathematically it is a Sturm–Liouville problem, −(p φ′)′ = λφ.
Each vibration pattern, or mode , φn is a wave. Its intensity |φn| becomes sand on the tray below the string, and both rulers score it.
1. Find the most concentrated mode.
2. Now compare modes 1 and 8: which is more evenly spread?
Height ruler: most concentrated mode 2, least mode 1. Transport ruler: most concentrated mode 2, least mode 8.
Modes recomputed here from the paper’s equation (finite differences, 4000 cells). Vibration slowed down for viewing.
Both rulers agree that mode 2 is the most concentrated of the first 40: it is trapped in the soft patch. They disagree about the least concentrated. The height ruler picks mode 1 ; the transport ruler picks mode 8 , whose humps cover the whole string evenly, while mode 1 still leans towards the soft patch. In the authors’ words, β “detects the extrema of localization more robustly than α2,4”.
Patterns that cling to sharp tips
–
Outlines drawn from the paper’s formula; highlighted points are the sharpest bends, computed here. The eigenfunction results are reported by the authors (their Figs. 9–11), not recomputed on this page.
The authors also score patterns that live on the outline of a flat shape: eigenfunctions of the Neumann–Poincaré operator, which govern transmission and resonance problems between two materials, such as a particle and its surroundings. They take three outlines from the “superformula” (their eq. 16), compute such patterns on each, and score each pattern with both rulers.
Reported by the authors
β behaves much like 1/α2,4 overall.
β spans a larger range of values and is especially better at telling apart the first few most localized patterns.
The most localized patterns concentrate mainly near high-curvature points of the outline, the sharp tips.
Back to the beam
Height-only scores tie whenever the slices are the same. β, the least work to rake the sand flat, tells them apart.
Counting crossings gives β exactly, cheap enough to re-evaluate inside a design loop.
Sand near a boundary costs more to flatten. Wider trays, rings or distance-aware costs can compensate.
Why does this matter? A photonic nanojet is a narrow, intense beam of light that forms just behind a tiny transparent sphere, and the paper cites work on steering such jets for super-resolution microscopy. Yet, the authors note, “defining the size of a photonic nanojet often involves some degree of arbitrariness”.
A ruler that is justified, robust and quick to compute could change that. The authors anticipate that their framework “will facilitate advances in the design of PDE-governed and localization-sensitive physical phenomena, such as photonic nanojets”. That is an outlook, not yet a result.
The open question they name: in two and three dimensions, transport and the shortcut equation are only known to agree within fixed factors. Sharper links between the two are the next step.
Your pile, one last time
Draw another pile in Chapter 3 and come back.
Source
Mirza Karamehmedović and Faouzi Triki, “Localization Coefficients of Functions with Applications in Partial Differential Equations”, arXiv preprint arXiv:2504.12033v1 [math.AP], 16 April 2025. arxiv.org/abs/2504.12033
Results in the paper are mathematical proofs (Propositions 1–2, Lemma 1) and numerical examples.
About this page
All simulations and plots on this page are recomputed from the equations in the paper; no figures from the paper are reproduced. The two-dimensional domain in Chapter 5 is our recreation. Chapter 7 summarises results reported by the authors.
Typefaces: Fraunces, Inter and JetBrains Mono, under the SIL Open Font License.
Topics in this iPaper
Mathematics
we prove the equality of this measure with a suitable Sobolev norm in dimension one
Abstract, page 1
optimal transport
we shall show how the Wasserstein-2 distance is related to the optimal transport between measures
Section 3.1, page 6
wasserstein distance
a novel localization measure for functions on bounded subsets of Rd , d = 1, 2, 3, . . . , based on a Wasserstein metric
Abstract, page 1
sobolev spaces
We now establish the equality of the Wasserstein-2 distance and the Sobolev Ḣ −1 metric in dimension one
Section 3.2, Lemma 1, page 8
partial differential equations
Localization is a phenomenon in solutions of differential equations across quantum mechanics, electrodynamics, acoustics, and other fields
Section 1, page 1
sturm liouville theory
Localization of eigenfunctions of a Sturm-Liouville operator
Section 4.1, page 11
neumann poincare operator
Localization of Neumann-Poincaré eigenfunctions on curves
Section 4.2, page 12