1. A method for clustering a plurality data graphs, wherein the plurality of data graphs are comprised of primitives and relations, said method comprising: generating, by a processing device, a graph lattice comprised of a graph of related subgraphs, wherein subgraphs of degree 1 are the primitives and each subgraph of degree i>1 is comprised of a subgraph of degree i−1 and one of the primitives; using, by a processing device, the graph lattice to generate feature vectors for the plurality of data graphs; and, clustering, by a processing device, the plurality of data graphs according to similarity between the generated feature vectors.