1. A system for classifying a test image, said system comprising: at least one processor programmed to: receive a data graph of the test image; receive a graph lattice, the graph lattice including a plurality of nodes, each of the plurality of nodes including a subgraph, a weight and at least one mapping of the subgraph to data graphs of a plurality of training images, the plurality of training images corresponding to a plurality of classes; map the data graph of the test image by the subgraphs of the plurality of nodes; compare mappings between the graph lattice and the data graphs of the training images with mappings between the graph lattice and the data graph of the test image to determine, for each of the training images, a weighted vote of similarity between the data graph of the training image and the data graph of the test image, the weighted vote based on the weights of the plurality of nodes; and, determine a class of the test image from the weighted votes of the training images, the class of the test image being the class of the training image with the highest weighted vote above a threshold number of votes.