What is Convolution?

An operation that time-reverses one of two sequences and, while shifting it, multiplies it by the other and adds up the products. In discrete time it is y[n] = Σx[k]h[n − k], and the output of an LTI system is the convolution of the input with the impulse response. Convolving sequences of lengths L and M gives a length of L + M − 1. Convolution on the time side becomes multiplication on the frequency side, so long convolutions can be computed quickly with the FFT. The "convolution" of convolutional neural networks is computed in many implementations as a cross-correlation without flipping the filter, but since the weights are learned, either definition works the same way after training.

Japanese name: 畳み込み

Convolution appears in 6 practice questions across 4 topics, including AI Hardware & Software Stack, Digital Signal Processing Basics, Metrology and analysis.

Field: Digital Signal Processing Basics

Try it: questions about Convolution

Why are convolutions in CNNs sometimes converted into matrix multiplications, for example with im2col?

  1. AConversion reduces the operation count tenfold
  2. BSo that highly optimized matrix-multiplication libraries and matrix units such as tensor cores can be used
  3. CConversion always reduces memory usage
Show answer and explanation

Answer: B. So that highly optimized matrix-multiplication libraries and matrix units such as tensor cores can be used

im2col builds a large matrix in which the input values of each convolution window are laid out as a column, then computes the convolution as a product with a matrix of filters. Overlapping windows duplicate input values and increase memory, but decades-optimized matrix-multiplication libraries and matrix units such as tensor cores can be used directly, so it is often faster overall. Some implementations achieve the same effect without materializing the duplicates.

Convolution in the explanations

Questions that mention Convolution (6)

  1. Why are convolutions in CNNs sometimes converted into matrix multiplications, for example with im2col?
  2. The sequence x[n] = {1, 2, 3} (n = 0, 1, 2) is applied to an LTI system with impulse response h[n] = {1, −1} (n = 0, 1). Which of the following are the outputs y[0] to y[3]?
  3. When measuring very narrow trenches or steep sidewalls with AFM, what tends to cause errors?
  4. Which describes the "weight-stationary" dataflow used in AI accelerators?
  5. Which orders the AI software stack from the layer closest to users down to the layer closest to hardware?
  6. A 28×28 single-channel image is convolved with a 5×5 filter (stride 1, no padding), followed by 2×2 max pooling (stride 2). What are the height and width of the output?

Books on Digital Signal Processing Basics Ad

As an Amazon Associate I earn from qualifying purchases.

Related terms

Convolutional neural network (CNN) Impulse response AFM (atomic force microscope) AI compiler Computational graph GPU NPU (neural processing unit) Decimation Difference equation Discrete Fourier transform

Back to the glossary