Reasoning over visual knowledge