An Apriori-Based Algorithm for Mining Frequent Substructures from Graph Data