  We study a mean field model of a complex network, focusing on edge and
triangle densities. Our first result is the derivation of a variational
characterization of the entropy density, compatible with the infinite node
limit. We then determine the optimizing graphs for small triangle density and a
range of edge density, though we can only prove they are local, not global,
maxima of the entropy density. With this assumption we then prove that the
resulting entropy density must lose its analyticity in various regimes. In
particular this implies the existence of a phase transition between distinct
heterogeneous multipartite phases at low triangle density, and a phase
transition between these phases and the disordered phase at high triangle
density.
