### abstract ###
One property of networks that has received comparatively little attention is hierarchy, ie , the property of having vertices that cluster together in groups, which then join to form groups of groups, and so forth, up through all levels of organization in the network
Here, we give a precise definition of hierarchical structure, give a generic model for generating arbitrary hierarchical structure in a random graph, and describe a statistically principled way to learn the set of hierarchical features that most plausibly explain a particular real-world network
By applying this approach to two example networks, we demonstrate its advantages for the interpretation of network data, the annotation of graphs with edge, vertex and community properties, and the generation of generic null models for further hypothesis testing
### introduction ###
Networks or graphs provide a useful mathematical representation of a broad variety of complex systems, from the World Wide Web and the Internet to social, biochemical, and ecological systems
The last decade has seen a surge of interest across the sciences in the study of networks, including both empirical studies of particular networked systems and the development of new techniques and models for their analysis and interpretation~ CITATION
Within the mathematical sciences, researchers have focused on the statistical characterization of network structure, and, at times, on producing descriptive generative mechanisms of simple structures
This approach, in which scientists have focused on statistical summaries of network structure, such as path lengths~ CITATION , degree distributions~ CITATION , and correlation coefficients~ CITATION , stands in contrast with, for example, the work on networks in the social and biological sciences, where the focus is instead on the properties of individual vertices or groups
More recently, researchers in both areas have become more interested in the global organization of networks~ CITATION
One property of real-world networks that has received comparatively little attention is that of  hierarchy , i e , the observation that networks often have a fractal-like structure in which vertices cluster together into groups that then join to form groups of groups, and so forth, from the lowest levels of organization up to the level of the entire network
In this paper, we offer a precise definition of the notion of hierarchy in networks and give a generic model for generating networks with arbitrary hierarchical structure
We then describe an approach for learning such models from real network data, based on maximum likelihood methods and Markov chain Monte Carlo sampling
In addition to inferring global structure from graph data, our method allows the researcher to annotate a graph with community structure, edge strength, and vertex affiliation information
At its heart, our method works by sampling hierarchical structures with probability proportional to the likelihood with which they produce the input graph
This allows us to contemplate the ensemble of random graphs that are statistically similar to the original graph, and, through it, to measure various average network properties in manner reminiscent of Bayesian model averaging
In particular, we can   search for the maximum likelihood hierarchical model of a particular graph, which can then be used as a  null model  for further hypothesis testing,  derive a consensus hierarchical structure from the ensemble of sampled models, where hierarchical features are weighted by their likelihood, and  annotate an edge, or the absence of an edge, as ``surprising'' to the extent that it occurs with low probability in the ensemble
To our knowledge, this method is the only one that offers such information about a network
Moreover, this information can easily be represented in a human-readable format, providing a compact visualization of important organizational features of the network, which will be a useful tool for practitioners in generating new hypotheses about the organization of networks
