Hierarchical organization is widespread in the societies of humans and other animals, both in social structure and in decision-making contexts. In the case of collective motion, the majority of case studies report that dominant individuals lead group movements, in agreement with the common conflation of the terms "dominance" and "leadership." From a theoretical perspective, if social relationships influence interactions during collective motion, then social structure could also affect leadership in large, swarm-like groups, such as fish shoals and bird flocks. Here we use computer-vision-based methods and miniature GPS tracking to study, respectively, social dominance and in-flight leader-follower relations in pigeons. In both types of behavior we find hierarchically structured networks of directed interactions. However, instead of being conflated, dominance and leadership hierarchies are completely independent of each other. Although dominance is an important aspect of variation among pigeons, correlated with aggression and access to food, our results imply that the stable leadership hierarchies in the air must be based on a different set of individual competences. In addition to confirming the existence of independent and context-specific hierarchies in pigeons, we succeed in setting out a robust, scalable method for the automated analysis of dominance relationships, and thus of social structure, applicable to many species. Our results, as well as our methods, will help to incorporate the broader context of animal social organization into the study of collective behavior.collective animal behavior | hierarchy | high-throughput ethology | leadership | dominance network F or a group of humans or nonhuman animals, networks can be constructed from a number of different types of interaction and across a range of contexts, including association, aggression, courtship, and leadership (1-4). This aspect of interaction networks raises the question as to whether network structure is maintained across contexts because of stable relationships or underlying individual differences, or whether network structure reorganizes in every new situation, where the same individuals may have different competences. For example, does social dominance routinely endow individuals with leadership roles within the group? By leadership, we refer to an individual's degree of influence over a group's decision: in the case of collective travel, this largely concerns the timing or direction of the group's movements (5). Dominance signifies the consistent winning of agonistic interactions (6). Most studies of the relationship between leadership and social structure have focused on mammals, especially primates. In species with highly asymmetrical dominance relationships, such as gray wolves (7), mountain gorillas (8), and chacma baboons (9), there is a consistent trend for dominants to lead. This effect may be mediated by factors other than dominance, such as the central position of dominants in the association network (10) or their greater metabo...