On the Realization of Compositionality in Neural Networks