Pulse Echo
Differentiable ultrasound simulation · JAX · live optimizer

Designing the ultrasound imaging system by gradient descent

One JAX program calculates the B-mode image from the scatterers. Each step of this program is differentiable. The optimizer calculates the gradient of an image metric for each system parameter. Then it changes the parameters to improve the metric. The parameters are the element pitch, the transmit and receive apodization, and the assumed speed of sound.

Connection to the optimizer…
Echogenicity map of the phantomPHANTOM
B-mode image before optimizationBEFORE
B-mode image during and after optimizationAFTER
Image size: 38 mm wide, 5 mm to 40 mm deep. Dynamic range: 45 dB.
ITERATION0
gCNR–
PARAMETER–
MS PER STEP–

Image metrics during the run

The plots show the exact value of each metric for each frame. ↑: a higher value is better. ↓: a lower value is better. Optimized: the objective contains this metric (as a smooth approximation). Held out: the optimizer does not use this metric. We only measure it.

gCNR ↑
FWHM mm ↓
Coherence ↑
Brightness
this runinitial image
Fixed aperture · precomputed

Element pitch and grating lobes

In this sweep, the aperture stays at 38 mm. Only the element pitch changes. If the pitch is more than about 0.78 λ, the array samples the wavefield too coarsely. Then grating lobes move echoes from the surrounding tissue into the dark cysts. At a pitch of λ/2, the grating lobes go away. The resolution does not change, because the aperture does not change.

The pitch parameter in the optimizer is different. It keeps 128 elements. Thus the aperture decreases when the pitch decreases, and the optimizer must balance grating lobes against resolution.

Each frame is a full RF simulation of the same scatterers with a different array.

B-mode image for the selected element pitch

gCNR as a function of element pitch

gCNR0.78 λ
15 phantoms · precomputed with the same engine

Results on 15 phantoms

We optimized each parameter for gCNR on each of the 15 random phantoms. We used 40 iterations. Each parameter improves the phantom that we optimized it on. The important question is different: does the result also improve a phantom that the optimizer did not see?

  • Speed of sound: yes. The speed of sound is a property of the medium, not of one phantom.
  • Apodization with one weight per element: no. The weights fit the speckle of the tuned phantom. On other phantoms, the gCNR decreases a little.
  • Smooth receive apodization: yes. The gain on unseen phantoms is positive.
  • Transmit apodization: no, with both shapes. With smooth weights, most of the gain goes away. Thus the gain came from the speckle and the cyst positions of the tuned phantom.

Transmit apodization

Receive apodization

Speed of sound

Joint

Speed of sound from three initial values

initial valuevalue after 50 steps
Objective design

A metric can improve while the image becomes worse

The speckle brightness objective moves the transmit energy to a small number of elements. The brightness value increases. The cysts become less dark, and the gCNR decreases.

A strong SSIM anchor (3 or more) stops this. But then the weights almost do not change. Thus a heavier anchor does not solve the problem. The objective must be different.

Initial imageINITIAL
Brightness objective without anchorNO ANCHOR
Brightness objective with an anchor of 3ANCHOR 3
Method

Signal chain

1. PhantomA grayscale echogenicity map gives about 164,000 point scatterers (phantom generator).
2. AcousticsA frequency-domain simulation of a linear array calculates one echo for each transmit element. A 270 MB basis stores these echoes.
3. TransmitThe transmit apodization weights add the echoes of the elements linearly.
4. BeamformingDelay-and-sum uses the assumed speed of sound and the receive apodization weights.
5. MetricSmooth versions of gCNR, FWHM, coherence or brightness, plus an SSIM anchor. One reverse-mode pass calculates all gradients.