A central debate when studying ecological communities concerns the relative importance of selective processes relative to stochastic ones. This has significance for understanding the dynamic behaviour of these systems, for assessing features such as fragility and resilience, and ultimately, for determining how to correctly approach them. At the core of dealing with this challenge is the need to link ‘observed patterns’ with the ‘underlying processes’ that created them; this is a long-standing well known challenge in the arenas of ecology and evolution. The application of networks in ecological theory can provide a useful perspective and toolkit for dealing with this challenge. Indeed, in many cases the selective forces acting on individual species are frequency dependent and hence need to be placed in a community framework in order to understand their ecological role as it depends on the rest of the network, and how the functioning of the whole network depends on them.
Diversity has played a central role in most studies that address the relationships between structure and function in ecological-network. Here I discuss different views on the concept of diversity, both as an indicator of system functioning and as an emergent property of these systems. As a case study I specifically focus on pathogen communities, where ecological and evolutionary feedbacks act on short time scales.