Structural Learning For Visual Inferences