Siamese neural networks