For any finite colored graph we define the empirical neighborhood measure,
which counts the number of vertices of a given color connected to a given
number of vertices of each color, and the empirical pair measure, which counts
the number of edges connecting each pair of colors. For a class of models of
sparse colored random graphs, we prove large deviation principles for these
empirical measures in the weak topology. The rate functions governing our large
deviation principles can be expressed explicitly in terms of relative
entropies. We derive a large deviation principle for the degree distribution of
Erd\H{o}s--R\'{e}nyi graphs near criticality.Comment: Published in at http://dx.doi.org/10.1214/09-AAP647 the Annals of
Applied Probability (http://www.imstat.org/aap/) by the Institute of
Mathematical Statistics (http://www.imstat.org