---
title: "Full-Waveform Inversion with the Adjoint Method and Cycle Skipping Interactive Lab | Sandbox Physics"
description: "Why does waveform inversion need low frequencies or a good starting model? Because the fit compares wiggles."
canonical_url: "https://sandboxphysics.com/labs/adjoint-waveform-inversion/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/adjoint-waveform-inversion/"
last_modified: "2026-10-31"
---

FR36-D · Adjoint gradients, frequency bands and held-out data

# Full-Waveform Inversion with the Adjoint Method and Cycle Skipping

**Why does waveform inversion need low frequencies or a good starting model?** Because the fit compares wiggles. If the starting model puts a predicted wave more than half a period away from the recorded one, the update lines up the wrong cycle and the fit stalls in a wrong model. Low frequencies have longer periods, so starting with them, or with a model already close to the truth, avoids this.

Sources above and receivers below a block that hides a fast disc. Each step fits the recorded waveforms using an adjoint gradient. Start at high frequency and the fit stalls; start low and the disc appears.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

Model assumptions

Two-dimensional constant-density acoustic waves on a 60 by 60 grid of 25 m cells with an absorbing layer, fourth order in space and second order in time. Observed data come from the same equation on a grid twice as fine in space and time, plus 2 % seeded noise, so the inversion does not reuse its own discretization. Every band uses a Ricker wavelet with the content below half its peak frequency removed, as field data lack the lowest frequencies. The gradient is the exact discrete adjoint of the solver (checked against finite differences). The optimizer is L-BFGS with a smoothing preconditioner and a backtracking line search; one receiver in four is held out and never used in the fit. Geometry follows the Camembert test of Yang, Engquist, Sun and Froese (2016), scaled down.

Data: observed and predicted waveforms, one shot

- observed
- observed, held out
- predicted, current model

Reconstruction: current speed model

- true disc outline

Misfit and model error by iteration

- misfit, used receivers
- misfit, held-out receivers
- model error

More readouts and the model record

- **Current band peak frequency**
- **Lowest frequency kept in the band**
- **Half period at the peak**
- **Iterations done**
- **Now computing**
- **Data noise**
- **Line search failed**

The record saves every iteration’s misfits and model error, plus the true and reconstructed speed grids.

[Continue the course: seismic imaging from waves to inversion](https://sandboxphysics.com/stories/seismic-imaging/)

Physics tutorial

## Full-Waveform Inversion with the Adjoint Method and Cycle Skipping

**Background** Travel-time tomography uses one number per ray. Full-waveform inversion uses every sample of every recorded trace, so it can see structure smaller than the ray picture allows. It adjusts the model until simulated waveforms match the recorded ones.

**Why it matters** The model has thousands of cells, so finite differences would need thousands of simulations per step. The adjoint method gives the whole gradient of the misfit $J$ from one extra simulation per source, run backwards in time.

Start with the essentials

- **Focus question**: Why does waveform inversion need low frequencies or a good starting model?
- **One-sentence intuition**: The least-squares waveform misfit has many valleys. If the predicted wave is more than half a period away from the observed one, the gradient points towards the wrong cycle. Lower frequencies or a better starting model widen the valley that holds the truth.

### Core mathematical model

#### Least-squares waveform misfit

$$
J(\mathbf v)=\tfrac12\sum_{s}\sum_{r}\sum_{n}\left(u_{s}(\mathbf x_r,t_n;\mathbf v)-d_{s}(\mathbf x_r,t_n)\right)^2
$$

The sum runs over sources $s$, fitted receivers $r$ and time samples $n$. Held-out receivers are left out of $J$ and used only to check the result.

#### Discrete adjoint and gradient

$$
\lambda^{n}=\left(2\mathbf I+\Delta t^2\nabla_h^2\mathbf K\right)(a\lambda^{n+1})-ab\,\lambda^{n+2}+r^{n},\qquad \frac{\partial J}{\partial\kappa}=\sum_n a\,\Delta t^2\,(\nabla_h^2u^n)\,\lambda^{n+1}
$$

The adjoint field $\lambda$ runs backwards in time, driven by the residuals $r^n$ at the receivers. $\mathbf K$ holds the squared speeds $\kappa=v^2$, and $a$, $b$ are the absorbing-layer factors. The scheme is the exact transpose of the time stepping, so its gradient matches finite differences to rounding error.

#### When cycle skipping starts

$$
\lvert\Delta t\rvert>\frac{T}{2}=\frac{1}{2f}
$$

A delay larger than half a period lets the predicted wave line up with the neighbouring cycle of the observed one.

### Common difficulties

#### A falling misfit is not a better model

**Typical misconception** If the waveform misfit goes down, the model must be getting closer to the truth.

**Better mental model** In the cycle-skipping preset the misfit falls while the model error grows. Held-out receivers and checks on the starting model are needed to tell the difference.

### Run the experiment

1. 01

   #### Start at high frequency

   Choose High frequency only: cycle skipping and watch the model error curve.

   **What to observe:** The misfit drops to about half its starting value, yet the model error climbs above where it began: the fit is sliding into a wrong valley.

2. 02

   #### Start low, then go high

   Choose Low, then high frequency and compare the reconstruction with the dashed disc.

   **What to observe:** The 4 Hz band recovers a smooth fast blob; the 10 Hz band then sharpens it, and the held-out misfit falls with the fitted one.

3. 03

   #### Give it a good start

   Choose Good starting model.

   **What to observe:** Starting from a blurred copy of the truth, 10 Hz alone converges, because the remaining delay is already much less than half a period.

Physical conclusion

Adjoint gradients make waveform inversion affordable; low frequencies or a good start make it trustworthy.

## Related experiments and articles

Seismic imaging · Reading path

### Seismic waves and imaging, from rock boundaries to tomography

Articles on this path that use this experiment, followed by the other experiments they suggest.

1. [Article **Adjoint gradients and cycle skipping in waveform inversion**](https://sandboxphysics.com/stories/seismic-imaging/adjoint-gradients-and-cycle-skipping/)

Motion & dynamics · Starter path

## From a falling ball to an orbit

Start by measuring gravity and splitting motion into components. Then add contact forces and collisions, and follow the same laws all the way to an orbit.

[Start here → **Free Fall & Measuring Gravity** Capture a few drops and fit the camera positions to estimate gravitational acceleration. Then add air damping and watch the fit drift from the truth. Observe · 14 min](https://sandboxphysics.com/labs/free-fall/)

1. [1 Free Fall & Measuring Gravity](https://sandboxphysics.com/labs/free-fall/)
2. [2 Projectile Flight Designer](https://sandboxphysics.com/labs/projectile-flight/)
3. [3 Inclined Plane & Friction](https://sandboxphysics.com/labs/inclined-plane/)
4. [4 One-Dimensional Collision Bench](https://sandboxphysics.com/labs/collision-bench/)
5. [5 Mass–Spring Oscillator](https://sandboxphysics.com/labs/mass-spring/)
6. [6 How Orbits Take Shape](https://sandboxphysics.com/labs/orbit/)

[View the full path →](https://sandboxphysics.com/topics/mechanics/#starter-path)
