Local averaging smooths a one-dimensional signal by replacing each value with an average of nearby values. Uniform, normalized convolution weights preserve the broad trend while reducing short-term fluctuations and noise. section 10.1.1
A kernel with equal weights performs a weighted local average at every position. In one dimension, a three-value window illustrates the operation; in two dimensions, each output pixel averages neighboring pixels such as a 3 × 3 region. This behavior corresponds to low-pass filtering: high-frequency variation is reduced while longer-term structure remains. section 10.1.1 section 10.3.1
Local averaging is useful for:
- Making broad trends easier to see by suppressing local fluctuations. section 10.1.1
- Denoising images before analyzing meaningful content such as text. section 10.3.1
Fixed-weight 1D convolution
In PyTorch, a three-element weight tensor such as [0.33, 0.33, 0.33] can be assigned to Conv1d with stride 1 and no bias. Reshaping the input and weights supplies the convolution interface; disabling gradients makes the kernel a fixed averaging operator. section 10.1.4
Figure 10.5 Graph of the input array solid) and output array (dashed) from figure 10.1. Note that the averaged) version of the input. Such local soothing captures the low-frequency (long-term) broad trend of the function by eliminating high-frequency (short-term) noise.
Compare the fluctuating input curve with the smoother output curve to see local averaging capture the broad trend. section 10.1.1






