TransWikia.com

Why are Convolutional Networks not using cross-correlation

Data Science Asked by Hakim on March 29, 2021

To my knowledge cross-correlation is used to measure the similarity of certain values, like to images. Same applies to the process of feature extraction in CNNs, where input matrices are multiplied by filters. So it seems odd to me that they are call Convolutional Networks.

The Pytorch documentation for Conv2d even says that it is using the cross-correlation operator.

So why are CNNs called convolutional when they are actually using cross-correlation?

One Answer

That's a very interesting question. I started looking into it recently while trying to understand better convolutional neural networks.

In short: yes! They are called convolutional while in actual practical terms using the cross-correlation operator. So this is a case of a misnomer.

I think the important thing to understand is that correlation and convolution differ only because of a flip that is present in the convolution. So they differ only because of a sign.

Correlation: correlation operation between F and I

Convolution: Convolution

The main difference in practical terms is that the convolution is associative. This means that

associative property

This is not true for the correlation operator.

When training a neural network though, the difference in the sign in front of the i, does not matter because you will adjust your weights in order to optimise your objective function.

This is also explained in another post:

Convolution and Cross Correlation in CNN

In this post, it is also explained that what is actually used for CNN is the cross-correlation operator and not the convolution one.

I hope this helps.

PS Also, see the notes on convolution from the David Jacobs CS course.

Correct answer by Raf on March 29, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP