As a starting point I used MatchZoo - a collection of text matching models https://github.com/faneshion/MatchZoo. It contains a set of model implementations in Keras as well as number of benchmark datasets. MatchZoo was created by authors of the main part of those models. It includes a lot of different examples, but configuration requires manual adjustment for each new task. I used MatchZoo implementation of CDSSM model as a baseline reference for my own implementation. With this baseline I was sure that the source of all possible errors is my model, not the shifted labels in dataset.