Member-only story

Solving JigSaw Puzzle Using Neural Nets

Can Neural Net solve a 2x2 Jigsaw Puzzle?

Shiva Verma
7 min readJul 29, 2020
Photo by Ashkan Forouzani on Unsplash

Training a Neural Net on permutation invariant data is difficult. And a jigsaw puzzle is one of those.

What is Permutation Invariance?

A function is a permutation invariant if its output does not change by changing the ordering of its input. Here is an example below.

1) f(x,y,z) = ax + by +cz2) f(x,y,z) = xyz

The output of the 1st function will change if we change the input order, but the output of the 2nd function will not change. So 2nd function is permutation invariant.

Weights of the neural net maps to specific input units. When the input changes, the output will change too. So in order to learn this symmetry, weights should be such as that final output is unchanged even after changing the input. Which is not easy to learn by the feed-forward network.

A jigsaw puzzle is also permutation invariance. No matter what the ordering of puzzle pieces are the output would always be fixed. Here is an example of a 2x2 grid puzzle, which we would be trying to solve in this project.

--

--

Shiva Verma
Shiva Verma

Written by Shiva Verma

Machine Learning Engineer | Available for consultancy | shivajbd@gmail.com

Responses (2)