Neural logical reasoning models for graphs and vision