# When should we use separable convolution?

I was reading the "Deep Learning with Python" by François Chollet. He mentioned separable convolution as following

This is equivalent to separating the learning of spatial features and the learning of channel-wise features, which makes a lot of sense if you assume that spatial locations in the input are highly correlated, but different channels are fairly independent.

But I could not understand what he meant by saying "correlated spatial locations". Can some explain what he means or the purpose of separable convolutions? (except performance-related part).

Edit: Separable convolution means that first depthwise convolution is applied then pointwise convolution is applied.

• To explain this part "spatial locations in the input are highly correlated", i.e. that pixels in some neighbourhood of a certain channel are likely to be correlated, imagine that in some neighbourhood of the channel you have the face of a person, then it should be clear that all pixels that belong to this face are correlated, in the sense that they will have very similar intensity value (for the respective channel). I can't answer why channels would be independent without more context. Maybe they would be independent because they are not encoding the RGB values but something else. – nbro Oct 16 at 22:56
• @nbro It does not have to be RGB, lets say we apply separable convolution as second layer. In this context channel number comes from number of filter we applied as you probably know? The example you gave did not clarify the problem. – Enes Erdogan Oct 17 at 13:47
• Why doesn't my example clarify what the authors mean by "spatial correlation"? – nbro Oct 17 at 15:25

Context of the question

This is a link to the text cited in the question.

It refers to the usage of SeparableConv2D (tf, keras name). A related question on StackOverflow is "What is the difference between SeparableConv2D and Conv2D layers". This answer points to this excellent article by Chi-Feng Wang:

A Basic Introduction to Separable Convolutions