Mini-batch graphs for robust image classification