But what is a convolution?

3Blue1Brown

But what is a convolution? by 3Blue1Brown

The "But what is a convolution?" video explains that convolutions involve combining two lists of numbers or functions, which cannot be achieved by simple arithmetic operations. Convolution is used in diverse applications such as probability, image processing, and differential equations. The video presents various examples of discrete convolution, including rolling dice, creating a moving average, and blurring images. The speaker notes that convolutions are equivalent to multiplying two different polynomials, and introduces the discrete Fourier transform as a more efficient algorithm for convolution. The video concludes by hinting at the next topic: the continuous case and probability distributions. The fast Fourier transform is also introduced as an efficient algorithm reducing computational complexity.

00:00:00

In this section, the speaker explains that a convolution is a way to combine two different lists of numbers or functions, and such an operation can't be achieved by merely adding or multiplying the two lists/functions together. The speaker explains that convolutions are found in probability, image processing, differential equations, and are fundamental to solving certain mathematical problems. The primary focus of the video is on discrete cases and an unexpected yet clever algorithm for computing convolutions. The speaker illustrates the concept by using the example of rolling a pair of dice to determine the likelihood of various sums to occur, and how the probability changes if one of the dice is no longer uniform.

00:05:00

In this section, we learn about the process of convolution, which involves multiplying elements in a pair of sequences and adding them together to generate a new sequence. One application of convolution is to produce probabilities for values in a new sequence generated by a mix of two given sequences. Another example is the use of a sliding window convolution process to create a moving average, which results in a smoother version of the original data. Additionally, a two-dimensional analog of this process can be used to blur an image by multiplying each value in a grid of values by the corresponding pixel and then averaging them. These examples illustrate how convolution can be applied in various contexts to generate new sequences or images.

00:10:00

In this section, the video explores different ways in which convolutions can be used to process images. One example is blurring, which is achieved by choosing a different grid of values, such that the center value is much bigger than the ones towards the edges. These values are sampled from a bell curve known as a Gaussian distribution, and are multiplied with the corresponding pixel they are on top of, to give a much more authentic blurring effect that simulates being out of focus. Another example is edge detection, which picks up on variations in pixel values as you move from left to right, and can be achieved by choosing a different kernel that detects vertical edges. The length of the output can be adjusted to match the original image, and programmers should be aware of flipping the kernel around, which is inherited from pure math context, in order to achieve faster algorithms.

00:15:00

In this section of the video, the presenter explains that convolutions are the same as multiplying two different functions or polynomials, or sampling their values at some inputs. The algorithm involved in performing convolutions can be quite complex since it requires many steps. However, the presenter suggests a way to make the algorithm simpler by treating two different lists of numbers as coefficients of two polynomials, sampling those polynomials at enough outputs, multiplying those samples pointwise, and then finding the convolution. The discrete Fourier transform provides the presenter with a foolproof plan that works efficiently to solve the convolution problem by selecting a special set of complex numbers. These numbers are the roots of unity, which provide the user with a friendlier system with a lot of redundancy in the different terms calculated.

00:20:00

In this section, the speaker talks about the existence of a fast algorithm that can reduce the number of operations needed to compute convolutions from O(N²) to O(N log N). This algorithm is known as the fast Fourier transform (FFT) and it opens the doors for more efficient calculations involving probability distributions among other applications. The speaker encourages the audience to think about the core step of basic multiplication, which is a convolution between the digits of the numbers being multiplied, and explains that the FFT can be applied to algorithmically multiply very large integers requiring O(N log N) operations. The section concludes by hinting at the next topic of discussion: the continuous case and probability distributions.

More from
3Blue1Brown

No videos found.

Related Videos

No related videos found.

Trending
AI Music

No music found.