This is the code used for the paper. Copy, use, ignore anything that is helpful to you.
Schluter, Natalie and Daniel Varab. (2018). When data permutations are pathological: the case of neural natural language inference. In Proceedings of EMNLP 2018.
Tested with python>=3.6 numpy, scipy, sklearn, TensorFlow 1.4.1, keras 2.1.2.