Spatial Gain Compensation (SGC) utilizes iterative optimization with automatic differentiation to provide ultrasound image normalization via distributed attenuation estimation.

(1) First, an initial estimate of the attenuation map is made which is used to develop a spatially-varying over-unity apodization pattern. (2) A synthetic-aperture ultrasound image is beamformed using these apodization profiles. (3) A novel log-difference subaperture image quality metric is computed. Here, with proper spatial gain compensation, all sub-aperture reconstructions should be similar (despite differences in "views from different sub-apertures"). (4) Sub-aperture image differences are effectively loss values that can be backpropagated through the differentiable beamformer to update the attenuation map.