A wide range of natural and engineered phenomena rely on large networks of
interacting units to reach a dynamical consensus state where the system
collectively operates. Here we study the dynamics of self-organizing systems
and show that for generic directed networks the collective frequency of the
ensemble is {\it not} the same as the mean of the individuals' natural
frequencies. Specifically, we show that the collective frequency equals a
weighted average of the natural frequencies, where the weights are given by an
out-flow centrality measure that is equivalent to a reverse PageRank
centrality. Our findings uncover an intricate dependence of the collective
frequency on both the structural directedness and dynamical heterogeneity of
the network, and also reveal an unexplored connection between synchronization
and PageRank, which opens the possibility of applying PageRank optimization to
synchronization. Finally, we demonstrate the presence of collective frequency
variation in real-world networks by considering the UK and Scandinavian power
grids