Graph Classification via Topological and Label Attributes
Geng Li, Murat Semerci
†
, Bülent Yener, and Mohammed J. Zaki
Rensselaer Polytechnic Institute, Troy, NY
†
Bogazici University, Istanbul, Turkey
{lig2,yener,zaki}@cs.rpi.edu, semercim@gmail.com
ABSTRACT
Graph classification is an important data mining task, and
various graph kernel method s have been proposed recently
for this task. These methods have proven to be effective,
but they tend to have high computational overhead. In this
paper, we p ropose an alternative approach to graph clas-
sification that is based on feature-vectors constructed from
different global topological attributes, as well as global la-
bel features. The main idea here is that the graphs from
the same class should have similar topological and label at-
tributes. Our method is simple and easy to implement, and
via a detailed comparison on real benchmark datasets, we
show that our topological and label feature-based approach
delivers better or competitive classification accuracy, and is
also substantially faster than other graph kernels. It is the
most effective method for large unlabeled graphs.
1. INTRODUCTION
With the proliferation of graph data, there has b een a
lot of interest in recent years to develop effective methods
for classifying graph objects [13]. Applications range from
chem-informatics [21, 19] (e.g., compounds that are active
or inactive for some target) and bioinformatics [5, 2] (e.g.,
classifying proteins into different families, classifying tissue
samples), to telecommunication networks (e.g., classifying
customers based on their calling behavior) and social net-
works (e.g., classifying users based on their feeds on Twitter,
Faceb ook, etc.).
The graph classification problem can be stated as follows:
There is a d ataset of graphs G
i
∈ D, with i = 1, . . . , N.
Each graph G
i
= (V
i
, E
i
) is given as a collection of vertices
V
i
= {v
i1
, . . . , v
in
} and edges E
i
= {(v
a
, v
b
)|v
a
, v
b
∈ V
i
}.
The graph G
i
may h ave labels on the no des and edges, drawn
from some common set of labels Σ for the entire dataset D.
Finally, each graph G
i
has a corresponding class y
i
∈ C,
where C is the set of k categorical class labels, given as
C = {1, . . . , k}. The goal of graph classification is to learn
a model f : D → C that predicts the class label for any
Permission to make digital or hard copies of all or part of this work for
personal or classroom use is granted without fee provided that copies are
not made or distributed for profit or commercial advantage and that copies
bear this notice and the full citation on the first page. To copy otherwise, to
republish, to post on servers or to redistribute to lists, requires prior specific
permission and/or a fee.
MLG ’11 San Diego, CA, USA
Copyright 2011 ACM 978-1-4503-0834-2 ...$10.00.
graph. Typically the model is learned from a training set of
graphs with known class labels. The model is then evaluated
on a testing set of graphs. The accuracy of the classification
mod el can be tested by comparing the predicted output ˆy
i
=
f(G
i
) with the tru e class label y
i
(provided it is known).
The main challenge in classifying graphs is how to convert
the discrete graph objects into numeric features or similar-
ities for effective classification. Graph kernel method s have
attracted a lot of attention due to their ability to represent
the graph data as a N × N symmetric, positive semi-definite
kernel matrix K = {κ(G
i
, G
j
)}
N
i,j=1
that records the pair-
wise similarities between graphs in D. Conceptually, the ker-
nel function κ(G
i
, G
j
) represents an inner-product between
the vectors corresponding to the two graphs G
i
and G
j
in
some N-dimensional feature space; see [23] for more details
on kernel methods. Once the kernel matrix has been con-
structed, it is p ossible to classify the graphs with a Support
Vector Machine (SVM) [27], using the supplied kernel ma-
trix K. There has been a lot of research activity in trying to
develop more effective and efficient graph kernel functions κ.
These met hods can broadly be classified into methods based
on random walks [10, 15], shortest paths [4], cycles [12] sub-
trees [22, 21, 24], and subgraphs [25, 17, 26]. Despite the
research above, it is fair to say that efficient and effective
graph classification still remains a challenge, especially for
large graphs.
In this paper we propose an alternative approach to con-
structing a feature-vector for graph classification. Instead
of relying on “patterns” like path, cycles, subtrees and sub-
graphs, we comput e several global topological and label at-
tributes from each graph G
i
∈ D. The values for these
attributes yield a numeric feature-vector F
i
= (f
i1
, . . . , f
ip
).
The set of feature vectors F
i
and the corresponding class
labels y
i
are then used to construct an SVM classifier. We
show that our approach is both effective and scalable com-
pared to state-of-the-art graph kernel methods. We con-
duct an extensive set of experiments over several real graphs,
representing chemical compounds, proteins, and cell-graph
datasets. We demonstrate that our approach yields b et ter
or competitive accuracy in a fraction of the time taken by
other kernels. Our method is particularly effective in clas-
sifying large unlabeled graphs, since it is able to effectively
capture the structural differences among the classes.
2. RELATED WORK
Graph kernels compute the similarity between pairs of
graphs in D, based on the common patterns they share. The
patterns can range from the simple to the complex. Specif-