New method for comparing neural networks exposes how artificial intelligence works