Face-to-face interaction is a fundamental human behavior, shaping how people build and maintain social groups by segregating themselves from others1,2,3,4. This segregation can generate or exacerbate intergroup inequality in networks, producing unequal opportunities in different aspects of people’s lives, such as education, employment, and health5,6,7,8,9, especially when individuals tend to interact with similar others10. Though crucial to a just society, however, our understanding of the interplay between group dynamics and the emergence of inequalities in social gatherings remains limited and quantitatively unexplored.

With deep roots in sociology and anthropology1,2,3, the study of face-to-face interaction has advanced considerably in recent years, mainly because of new tracking devices providing fine-grained data on human interaction11,12,13,14,15. This data has enabled researchers to uncover several properties in the way people interact with others16,17,18,19,20,21. For example, in a social gathering, individuals tend to interact with an average number of individuals, a quantity that depends on the social occasion21. Though this number exhibits a trend across individuals in a gathering, the duration of each interaction lacks a central tendency—it might last from a few seconds to a couple of hours17,18,19. These two properties have been found universally in many distinct social situations, such as schools and workplaces, indicating the existence of fundamental mechanisms underlying face-to-face interaction.

Simple social mechanisms can explain these properties as a result of local-level decisions based on individuals’ attributes22,23,24,25. One crucial attribute in face-to-face situations is the so-called attractiveness. People with high attractiveness are more likely to stimulate interaction with others. This principle, together with individuals’ social activity, constitutes a mechanism that explains well the properties found in empirical data23 and has been extended to describe other features in face-to-face interaction, such as people’s tendency to engage in recurrent interaction22,25. However, focusing solely on individuals’ attractiveness neglects the crucial role of pairwise interactions and social groups. For example, an attractive individual might feel unwelcome in a community if this person is an outsider of that particular social group.

How social groups interact can define the position of individuals in networks, particularly when groups have unequal sizes. For instance, the smallest group (i.e., the minority group) in a network can have a systemic disadvantage of being less connected than larger groups, depending on the group mixing26. Having a lower number of connections poses several disadvantages to individuals, such as low social capital27, health issues28, and perception biases29. Yet, the mechanisms underlying group dynamics and their relation to degree inequality in social gatherings are still unexplored.

Here we show numerically, empirically, and analytically that degree inequality in face-to-face situations can emerge from group imbalance and mixing. We present a mechanism—the attractiveness–mixing model—that integrates mixing dynamics (i.e., pairwise preferences) with individual preferences, expanding the established attractiveness paradigm. While attractiveness is an intrinsic quality of the individual, mixing dynamics manifest between pairs of individuals; together, they form what we call social attractiveness. The mechanism reproduces the intergroup degree inequality found in six distinct data sets of face-to-face gatherings. With the analytical derivation of our model, we further demonstrate the impact of group imbalance on degree inequality, finding a critical minority group size that changes the system qualitatively. When the minority group is smaller than this critical value, higher cohesion among its members leads to higher inequality. Finally, we expose the under-representation of minorities in degree rankings and propose a straightforward method to reduce bias in rankings.


We study the dynamics of social gatherings using six different data sets30, four from schools11,19,31 and two from academic conferences14. Each data set consists of the individuals’ interactions captured via close-range proximity directional sensors that individuals wore during each gathering. With these data sets, we construct the social network of each gathering, where a node is an individual and an edge exists if two individuals have been in contact (i.e., face-to-face interaction) at least once during the study (Table 1). In these networks, the degree distributions exhibit a single peak at the center (see Supplementary Note 1). The data further contain gender information on individuals, which allows us to define two groups in each network; we refer to social groups as a group of people who share similar social traits32. In this paper, a social group refers to individuals who share the same gender. In all considered data sets, there are fewer female participants than male participants. We refer to the smallest group as the minority group, and we denote 0 as the label for the minority group and 1 for the majority. In our manuscript, we define group mixing as the systematic preference of group members to interact with individuals from specific social groups (including their same group).

Table 1 The social networks from six different studies.

Degree inequality and mixing in face-to-face interaction

To characterize the connectivity of the groups in the networks, we measure the average degree of individuals in each group, finding a systematic degree inequality among groups (Fig. 1a). The minority group exhibits a lower average degree than the majority group in School 1, School 2, and School 3, whereas the opposite occurs in Conference 2 and School 4, and both groups have the same average degree in Conference 1. Though this degree inequality arises in face-to-face situations, an intrinsic-attractiveness model of face-to-face interaction23 fails to explain the group differences (dashed line in Fig. 1a) because it ignores group mixing in social gatherings.

Fig. 1: Face-to-face interaction: degree inequality and group mixing.
figure 1

a The average degree of the minority and majority groups in six empirical data sets of face-to-face interaction. Systematically, some groups have a higher average degree than others. An intrinsic-attractiveness model (dashed lines) is unable to explain these differences. The error bars are the standard error of the mean. b The intra- and intergroup interaction in these social gatherings. The z score values correspond to the comparison against the null model: the higher the value, the more often groups interact. In most cases, individuals are more likely to interact with individuals from the same group. c The estimated mixing matrix H from the data sets. The matrix describes the likelihood of groups connecting among themselves. With the estimated mixing matrix, we simulate the attractiveness–mixing model and (a) show that the model (symbols with black outline) reproduces the degree inequality observed in the data.

To understand how groups mix in the networks, we examine the inter- and intragroup ties by comparing them with the configuration model (see “Methods”). We find that individuals were more likely to interact with individuals from the same group, indicating that homophily33 plays a significant role in face-to-face situations. In most of the networks, our results show that intragroup ties are more frequent than what one would expect by chance (Fig. 1b).

However, this group mixing cannot emerge in the intrinsic-attractiveness paradigm because it lacks relational attributes. In this paradigm, systematic variations in individuals’ attributes can lead to group differences, but they fail to form mixing patterns as observed in data. For example, consider a social gathering in which the members of the minority group have lower intrinsic attractiveness than the majority group. In this scenario, according to the intrinsic-attractiveness paradigm, the minority group would tend to interact with the majority group, boosting the majority group average degree. This setting would explain group degree inequality. However, in this same setting, the members of the minority group would be less prone to interact with their own group—the opposite of what occurs in the data, where intragroup mixing is significant (Fig. 1b; see also Supplementary Note 2). In other words, variations in individuals’ attractiveness are insufficient to explain the degree inequality and group mixing observed in the data. To uncover the underlying mechanism of these social dynamics, we need to disentangle the individuals’ intrinsic attractiveness and the relational attributes in face-to-face interaction.

Modeling mixing in social interaction

We present the attractiveness–mixing model that incorporates (i) intrinsic attractiveness of individuals and (ii) relational attributes between groups. We show that these ingredients are sufficient to explain the degree inequality observed in social dynamics with minority groups. In the model, each individual has an intrinsic attractiveness and belongs to a group. The members of a group share the same mixing tendency, which regulates the pairwise interactions. In general, individuals move across space and form social ties depending on their group membership and the composition of their surroundings (see Fig. 2a, b). In the attractiveness–mixing model, an individual i has three attributes: a group label bi [0, B − 1], where B is the number of groups; an intrinsic attractiveness ηi [0, 1]; and an activation probability ri [0, 1]. The mixing patterns in this system are encoded in the B × B mixing matrix H. Each row of H can be seen as a probability mass function that weighs the likelihood of group interaction. In this model, N individuals perform random walks in a two-dimensional L × L periodic space and move based on the composition of their vicinity. We define \({{{{{{{{\mathcal{N}}}}}}}}}_{i}(t)\) as the set of individuals who are within radius d of individual i at time t. We denote nb as the size of a group b and fb = nb/N as the group fraction. The individuals move only probabilistically. At each time step t, each individual i moves with probability

$${\alpha }_{i}(t)=1-\mathop{\max }\limits_{j\in {{{{{{{{\mathcal{N}}}}}}}}}_{i}(t)}\{{\eta }_{j}\}$$

and a step of constant length v along a random direction of angle ξ (0, 2π]. With the complementary probability, individual i does not move and has the chance to interact with individuals in the vicinity depending on the group mixing likelihood. Precisely, individual i interacts with their neighbors of highest mixing likelihood with probability

$${\beta }_{i}(t)=\mathop{\max }\limits_{j\in {{{{{{{{\mathcal{N}}}}}}}}}_{i}(t)}\{{h}_{{b}_{i}{b}_{j}}\},$$

where \({h}_{{b}_{i}{b}_{j}}\) is an element of H and denotes the mixing probability between bi and bj (see Supplementary Note 3 for pseudocode). Overall, an individual interacts with other individuals depending on their intrinsic attractiveness and social group mixing; together these two ingredients form the social attractiveness. Finally, individuals can be active or inactive; they only move and interact with others if they are active. An inactive individual i becomes active with probability ri, whereas an active but isolated individual i becomes inactive with probability 1 − ri. In this study, we assume that the intrinsic attractiveness ηi and the activation probability ri come from a continuous uniform distribution in [0, 1].

Fig. 2: The attractiveness–mixing model: the micro- and macro-level behavior.
figure 2

a A schematic description of the micro-level interaction among individuals in the attractiveness–mixing model. Each individual moves across space and forms social ties based on their group membership and the composition of their vicinity. In the figure, nodes represent individuals, and their colors denote group membership, where gray indicates inactive nodes (i.e., non-interactive nodes). b In this illustrative example, the probability of same-group mixing is h = 0.8, and the nodes’ labels are their intrinsic attractiveness. At this time step t, individual k moves with probability αk(t) = 0.6 because of their vicinity of radius d, as defined by Eq. (1); with the complementary probability, this individual does not move and then interacts with their neighbors with probability βk(t) = 0.8, as defined by Eq. (2). Similarly, individual j moves with probability αj(t) = 0.2; otherwise this individual stays and interacts with probability βj(t) = 0.2. c Two examples of the model's macro-level behavior. When the probability of same-group mixing is low (h = 0.2), the minority group tends to connect to the majority group, and vice versa. In this scenario, group imbalance leads minority members to interact with more individuals (i.e., higher degree) than the majority members. In the plots, p(k) is the degree distribution. High same-group mixing probability (h = 0.8) leads minority members to attract individuals from the minority group. In this case, majority members have a higher degree centrality than the minority group.

The mixing matrix H and the group sizes have a significant impact on the model dynamics, affecting the connectivity of individuals, especially when groups have different sizes. For example, in a system having two groups, a minority group with proportional size f0 = 0.2 and a majority group with f1 = 0.8, the mixing dynamics lead the system to different regimes that affect the groups’ average degree (Fig. 2c). When intragroup interaction is less likely than intergroup interaction (i.e., h < 0.5), the system is in a heterophilic regime, and the minority group has a higher degree than the majority. This degree disparity arises because of the majority group favoring interaction with a small number of people (i.e., the minority group), thereby reducing the majority group connectivity. The opposite occurs in a homophilic regime, where intragroup interaction is more likely than intergroup interaction (i.e., h > 0.5), which results in the minority having a low average degree.

To investigate group degree inequality, we derive the model analytically to uncover the impact of mixing dynamics and group sizes on inter- and intragroup edges. Without loss of generality, we focus on the case of two groups, B = 2, finding the closed-form expressions for the normalized group edge matrix, ers = Ers/E, and the mixing matrix H (see “Methods” for details). The normalized intragroup edges are given by




and similar expressions exist for the intergroup edges (see “Methods”). With these expressions, not only can one study the model dynamics, but one can also estimate the mixing matrix from empirical networks and assess the model’s ability to explain data.

Estimating the mixing matrix from data

To compare the attractiveness–mixing model with the empirical data, we simulate the model with the parameters as estimated from the data. Our results show that the model reproduces the average degree inequality observed in the networks (Fig. 1a). We use Eq. (3) and Eq. (4) to estimate the mixing matrix H from the data (Fig. 1c; see “Methods”). This matrix tells us the tendency of groups to interact among themselves in each face-to-face opportunity. With the estimated matrices, we simulate the model using the same number of nodes and group sizes in each data set. We show that mixing dynamics and group imbalance enable the emergence of the group disparities observed in the data by using Kolmogorov–Smirnov test (see Supplementary Note 5). In addition, the model reproduces other properties found in face-to-face gatherings such as the distributions of interaction duration, inter-interaction time, and weight distribution (see Supplementary Note 6).

We highlight that the degree inequality can favor the minority or majority group. For example, in the School 4 and Conference 2 data sets, the smallest group tends to have more connections than the largest group. The model exhibits the same tendency. From a model perspective, this phenomenon can occur because of the asymmetry in the group mixing. To understand such cases better, we delve into the model and its regimes.

Mixing dynamics, asymmetry, and minority size

To uncover the regimes and scenarios of group inequality in the model, we characterize the impact of mixing and group sizes on average group degree. First, we study the trivial symmetrical mixing when h00 = h11 = hrr, and then we examine the impact of mixing asymmetry (i.e., h00 ≠ h11) on the social dynamics. In the asymmetrical case, we define the intergroup mixing as the complementary probabilities h01 = 1 − h00 and h10 = 1 − h11.

In the symmetrical case, we find that homophily and heterophily manifest themselves as two distinct regimes determining the position of the minority group in the network. We analyze the average degree of the groups given different values of group mixing hrr and minority fraction f0. First, we simulate the model and measure the average degree of the minority 〈k0〉 and majority 〈k1〉 groups (see “Methods”). Then, we separately compare 〈k0〉 and 〈k1〉 to the average degree 〈k〉 of the whole network using their z scores (Fig. 3a). Our results show that the members of the minority group have an advantage or disadvantage depending on the model parameters.

Fig. 3: The minority (dis)advantage in networks.
figure 3

a The distance of groups' average degree to the overall average degree (z score) with different minority fraction f0 and at varying levels of symmetrical mixing (i.e., h00 = h11 = hrr). The minority members have a degree advantage or disadvantage if the system is, respectively, at a heterophilic (hrr < 0.5) or homophilic (hrr > 0.5) regime. b The distance of the minority group degree to the overall average degree, denoted k0 − 〈k〉, at different levels of asymmetrical mixing (i.e., h00 ≠ h11). The majority mixing h11 explains much of the variance of k0 − 〈k〉. c The variation of k0 − 〈k〉 with changes in the minority mixing h00, with fixed h11 = 0.5 and different minority fraction f0. The minority mixing can have opposite impacts on degree inequality depending on the minority fraction, which suggests a qualitative transition in the system. d The derivative of k0 − 〈k〉 as a function of f0. The zero of this function represents the critical minority fraction, denoted \({f}_{0}^{* }\), at which the qualitative transition occurs. In the plot, same-color curves represent varying levels of minority mixing, from h00 = 0 to h00 = 1. e Two regimes delineated by \({f}_{0}^{* }\), with initial h00 = 0.5. These regimes mean that the minority group degree may either increase or decrease with a raise of h00. f The parameter space of critical minority fraction. Given h00, the upper limit of \({f}_{0}^{* }\), denoted \(\overline{{f}_{0}^{* }}\) (dashed line), represents the smallest minority size allowing higher minority homophily without decreasing group average degree, regardless of the majority mixing.

Homophily (i.e., hrr > 0.5) leads the minority group to be decoupled from a substantial part of the network. In this case, minority group members have a lower average degree compared to the average. In the heterophilic regime (i.e., hrr < 0.5), the minority group has high visibility, which leads its members to have a higher degree than average. The existence of these two contrasting regimes implies that the very interpretation of a minority group depends on the group mixing in the network. When studying a minority group, one has to account for inter- and intragroup dynamics to understand its position in a network.

To characterize the impact of asymmetrical mixing on degree inequality, we examine the whole parameter space of the mixing matrix H numerically. We find that the majority mixing h11 substantially contributes to degree inequality. First, we estimate the average minority degree for different values of h00 and h11, given specific minority fraction values f0. Then, we measure the distance of the minority group degree to the overall average degree using z scores, denoted k0 − 〈k〉 (see Fig. 3b). Our results show that the majority mixing h11 explains much of the variance of k0 − 〈k〉. While adjusting h11 can change the position of the minorities from advantage to disadvantage, modifying h00 can attenuate this inequality only slightly.

Strategies for minority groups to alleviate degree inequality

To uncover the ways the minority group can attenuate inequality, we investigate how k0 − 〈k〉 varies with changes in the minority mixing h00. We find that the size of the minority group modifies the system qualitatively, revealing that changes in the minority mixing can have opposite impacts on degree inequality. For instance, given a constant value of h11 = 0.5, increasing h00 can reduce or accentuate degree inequality, depending on the minority fraction f0 (see Fig. 3c). To characterize this transition, we examine the derivative of k0 − 〈k〉 with respect to h00 as a function of f0 (Fig. 3d). Precisely, we are interested in the zero of this function, which tells us the critical minority fraction \({f}_{0}^{* }\) at which the qualitative transition occurs. We find that this transition depends on the mixing dynamics of the system; its analytical form is given in Supplementary Note 7. Because the exact analytical form is too intricate, we approximate it by assuming that the values of h00 and h11 are not at their extremes, finding that:

$${f}_{0}^{* }=\frac{{h}_{11}}{2({h}_{01}+{h}_{11})}.$$

This equation demonstrates the control of the majority mixing over the minority group. The critical minority fraction \({f}_{0}^{* }\) delineates two regimes where k0 may either increase or decrease with a raise of h00, given a fixed h11 (see Fig. 3e).

These regimes translate into two strategies to increase the minority average degree, which depends on the minority group size. First, when the minority group corresponds to more than \({f}_{0}^{* }\) of the network, increasing h00 leads to an increase in the average minority degree. In this scenario, a more cohesive minority group is beneficial to its average degree. Second, in the case of a smaller minority group, increasing h00 decreases its degree; a more cohesive minority comes with the cost of a less connected minority. In this case, decreasing h00 helps in increasing the average degree of the minority group.

To find when increasing minority homophily is always beneficial to the minority group, we characterize the upper limit of \({f}_{0}^{* }\). This upper limit, denoted as \(\overline{{f}_{0}^{* }}\), represents the smallest minority size in which the minority group can increase its homophily without detriment to its average degree, regardless of the majority mixing. We note that \(\overline{{f}_{0}^{* }}\) is equivalent to the critical size \({f}_{0}^{* }\) when h11 = 1 (see Fig. 3e), so its exact analytical form is:

$$\overline{{f}_{0}^{* }}=\frac{1}{2-{h}_{00}+\sqrt{3+2\,({h}_{00}-2){h}_{00}}}.$$

For example, in the case of h00 = 0.5, when the minority represents more than 36.7% of the population, the group increases its average degree by being more homophilic, regardless of how the majority group mixes.

Emergence of ranking misrepresentation

From the model’s viewpoint, mixing dynamics can inflate individuals’ degrees because these dynamics tune individuals’ intrinsic attributes. We show that group mixing can also lead social groups to be misrepresented in degree ranking. This misrepresentation is evident when we compare individuals’ degrees with their intrinsic attractiveness in heterophilic, neutral, and homophilic symmetrical regimes (see Fig. 4). Systematically, degree centrality disguises intrinsic attractiveness in nonneutral regimes. In a heterophilic scenario, minority members with low intrinsic attractiveness tend to have a higher degree than members of the majority group. In a homophilic situation, highly attractive minority members tend to have a lower degree than their majority counterparts. Because intrinsic attractiveness is hidden behind degree centrality, group members can be misrepresented in degree rankings.

Fig. 4: Same intrinsic attractiveness but different degree centrality.
figure 4

The intrinsic attractiveness of individuals versus their degree in different symmetrical regimes (i.e., h00 = h11 = hrr). In the neutral case (hrr = 0.5), individuals with higher intrinsic attractiveness have a higher degree regardless of their group membership. In nonneutral regimes, however, degree centrality disguises intrinsic attractiveness. In a heterophilic regime (hrr = 0.2), minority members have a higher degree compared to their majority counterparts with the same intrinsic attractiveness. In a homophilic regime (hrr = 0.8), highly attractive minority members do not have similar degree centrality to that of their majority counterparts.

To characterize minority representation in rankings, we compare degree-based rankings against rankings based on intrinsic attractiveness. We show that minority members are underrepresented in homophilic regimes, whereas they are overrepresented in heterophilic regimes. First, we rank individuals separately by degree and intrinsic attractiveness, and then we measure the minority percentage in each ranking as we increase the rank length (i.e., the top-k rank; see Fig. 5a for a homophilic network). In the case of intrinsic attractiveness, we expect that the number of minority members in the top-k rank is proportional to the minority size, since intrinsic attractiveness is uniformly distributed. This ranking displays this exact behavior (Fig. 5a). In the case of the degree ranking, however, the minority group has a substantially lower chance of appearing in the top ranks than what we expect from their attractiveness. These results indicate that degree ranking incorporates the mixing dynamics of the system (see Supplementary Note 8 for a heterophilic case). This effect raises the question of how to decrease ranking misrepresentation. This type of ranking adjustment would be valuable, for example, when algorithms are used to rank and recommend individuals; the minority’s visibility could be penalized in rankings despite their potential high intrinsic attractiveness.

Fig. 5: Adjusting for group mixing decreases misrepresentation in degree rankings.
figure 5

a The percentage of minority members in rankings of increasing lengths. Each curve represents a different type of ranking regarding a system with minority fraction f0 = 0.3 and at a symmetrical homophilic mixing hrr = 0.8. In this case, degree rankings underrepresent minority members; at heterophilic regimes, minority members are overrepresented (see Supplementary Note 8). The adjusted ranking decreases this misrepresentation by accounting for individuals' group membership. b The adjusted ranking versus the degree ranking at different regimes. As expected, heterophily promotes minority members to higher positions in the degree ranking, whereas homophily pushes the minority down. In the plot, dashed lines represent the case of identical rankings. c The Spearman correlation between the intrinsic attractiveness and the adjusted and degree ranking. The adjusted ranking tends to agree with the intrinsic attractiveness except in the extreme cases of hrr = 0 and hrr = 1. In the plot, the bars represent one standard deviation.

Decreasing ranking misrepresentation

To adjust the degree ranking, we need to account for the group sizes and mixing. Given that group mixing affects groups’ average degree, we must compare only the degrees of individuals of the same group, thereby excluding the influence of group mixing. We show that this approach can balance degree rankings to contain a representative number of group members. First, we calculate the z score degree of each individual with respect to their average group degree; then, we rank all individuals based on their z score. Our results reveal that the adjusted degree ranking better represents the minority group, similar to what we would expect in the attractiveness ranking (Fig. 5a). Furthermore, the adjusted ranking also helps expose misrepresentation in degree rankings in different regimes. To that end, we compare individuals’ positions in each ranking (Fig. 5b). As expected, heterophily promotes minority members to higher positions in the degree ranking, whereas homophily pushes the minority down. To characterize this misrepresentation, we analyze the correlation between the intrinsic attractiveness and the adjusted and degree rankings. We measure the Spearman correlation between the rankings and intrinsic attractiveness of nodes in different regimes (Fig. 5c). We find that the adjusted ranking tends to agree with attractiveness except in the extreme cases of hrr = 0 and hrr = 1. With the adjusted degree ranking, we decrease the misrepresentation bias in rankings.


Face-to-face interaction is arguably a primary mechanism for the transmission and affirmation of culture3. When people interact with others, they construct a social world and participate in shaping the identity of social groups. In this work, we show that systemic degree inequality emerges in social gatherings from the way group members interact in imbalanced scenarios. Previous research has overlooked this inequality, suggesting that mainly the individuals’ intrinsic attractiveness governs their connectivity. Our results indicate, however, that group dynamics modulate individuals’ intrinsic attractiveness, forming what we have called social attractiveness in face-to-face situations.

In social gatherings, social attractiveness entangles with space and time variables, which restricts opportunities for face-to-face interaction, leading to systemic degree inequality. To interact, individuals must have opportunity availability (i.e., available place and time) and space–time convergence (i.e., individuals must agree on where and when to interact). In confined situations, such as conferences and workplaces, spatiotemporal constraints are critical to interaction opportunities. For example, there exists a limited number of opportunities for interaction at conferences (e.g., coffee breaks). When an individual uses an opportunity to interact with someone, fewer opportunities remain for interacting with other individuals. In imbalanced scenarios, when a majority member interacts with someone from the majority, fewer opportunities remain for this individual to interact with minorities, thereby decreasing minority connectivity. Such a decrease means that in the majority group position, creating homophilic ties comes at the cost of promoting inequality in group connectivity.

From a group-level perspective, mitigating this inequality depends primarily on the mixing of the majority group and its size—the minority group can only slightly reduce inequality, exhibiting a qualitative transition in the strategy for this reduction. Our results show that the majority group mixing explains most of the variance in connectivity inequality. To attenuate inequality, the minority group needs to follow a strategy that depends on its size. When the minority size is below a critical proportion of the network, homophilic minority interaction decreases minority connectivity. However, if the minority group size is sufficiently large, homophilic minority interaction helps in increasing minority connectivity. In this case, the minority group has proportionally enough individuals to interact with and decrease the disparity between groups. This critical mass allows the minority group to be a strong, tightly connected group; without this critical mass, a stronger minority implies higher inequality. This result is somewhat related to the critical mass for social change, as recently shown34, in which committed groups with size higher than 25% are sufficient to change social conventions.

To summarize, we have investigated numerically, empirically, and analytically the emergence of group inequality in social gatherings. In contrast to previous works, our mechanistic model captures the properties of face-to-face dynamics while reproducing degree inequalities found in empirical data. The model is distinct from network models, such as stochastic block models or Barabási–Albert model, in that we consider the spatiotemporal constraints in social gatherings, which leads to the emergence of fundamental properties in face-to-face interaction. Our approach creates research opportunities to understand face-to-face situations. For example, the model can be used to explore how group mixing affects dynamic processes in social gatherings. Further research will help clarify dynamic aspects of group inequality as well as latent groups in data. Likewise, the spatial aspect of social gatherings will be better understood when richer data containing spatial information is available. Moreover, though we have focused on a binary attribute, our model can also be used to investigate multiple and continuous-valued attributes. In the future, it would also be interesting to empirically estimate the model parameters, such as the activation probability and intrinsic attractiveness, which would enable researchers to understand the role of these individual-level properties in social gatherings.

In this article, we understand the concept of minority quantitatively: A minority group is the smallest group in a social gathering. Nevertheless, in the social sciences, the concept is often associated with the critique of inequality, deprivation, subordination, marginalization, and limited access to power and resources35. Performing a quantitative analysis of the structural mechanisms of mixing, exclusion, and interaction by no means implies ignorance about these issues. This work sheds light on how inequality can emerge from social interaction, building computational opportunities to understand and alleviate disparities in our society.


Group mixing analysis

To characterize how groups mix, we compare the inter- and intragroup edges in data with the configuration model. This approach enables us to assess whether the mixing patterns found in data would occur just by chance. With the configuration model, we generate random networks that preserve the degree of each node in a given network and reshuffle the links, which we can use to compare against the actual data36. For each data set, first, we generate 500 random instances of the network and count the number of edges \({E}_{rs}^{\prime}\) between groups r and s in each instance; then, we count the actual number of edges Ers in the data; finally, we compare Ers to \({E}_{rs}^{\prime}\) via z scores, defined as \({z}_{sr}=({E}_{sr}-{\overline{E}}_{sr}^{\prime})/s\,[{E}_{sr}^{\prime}]\), where \({\overline{E}}_{sr}^{\prime}\) and \(s\,[{E}_{sr}^{\prime}]\) are, respectively, the mean and standard deviation of \({{E}^{\prime}}_{sr}\) over the 500 instances. The z score zsr reveals the number of standard deviations by which Ers differs from the random case (see also Supplementary Note 1).

Model and simulation analysis

To analyze the symmetrical case of the attractiveness–mixing model, we first simulate the model with different values of hrr and f0 and then measure the average degree of the whole network 〈k〉 and the average group degree of the minority, denoted as 〈k0〉, and majority, 〈k1〉. We compare each group r with the whole network using z scores, defined as (〈kr〉 − 〈k〉)/s[k], where s[k] is the standard deviation of k. In the simulations, we used the following parameters: L = 100, d = 1, v = 1, and N = 200. In the case of the simulations using the data estimates, we run the model until the total number of edges is the same as the number of edges in the data. In all analyses, we average the results over 50 different simulations of our model.

Analytic derivation of the model

Here we derive the attractiveness–mixing model analytically for the case of two groups, B = 2, denoted as group 0 and group 1. We show that we can calculate the normalized group edge matrix analytically. To simplify the derivation, we assume a situation of low spatial density of agents; thus, almost all situations of potential interaction involve only two individuals, and non-pairwise interactions are negligible (i.e., dilute system hypothesis). Due to the activation process, the average number of active nodes at one time t is \({N}_{a}= < {r}_{i} > N\), since we do not expect a correlation between ri and the presence of isolated individuals. Therefore, the number of active nodes in each group is N0 = f0Na and N1 = f1Na. We note that the attractiveness–mixing model generates a temporal network in which nodes are the individuals and interactions between them are edges that are created and destroyed as time passes. Let E be the number of edges created during a time step Δt. Since the interaction mechanism is time-independent, the total number of edges in the network after a time T is given by ET = E × Tt.

To express the number of new edges created at time t in each component, first, we focus on edges between two individuals from group 0. The probability p0 to find an individual j from group 0 in the vicinity of individual i relates to the surface of the vicinity and the density ρ0 of individuals from group 0 on the field, expressed by:

$${p}_{0}={\rho }_{0}S=\frac{{N}_{0}}{{L}^{2}}\pi {d}^{2}=\,\frac{{f}_{0}{N}_{a}}{{L}^{2}}\pi {d}^{2}=\,{f}_{0}{\rho }_{a}\pi {d}^{2},$$

where ρa is the density of active individuals. To have an interaction, both individuals must be available and not move away. In our case, the probability for one individual to be available is the attractiveness of the other individual; thus, the probability of having both is the product ηiηj, whose average value is a constant \(\gamma = < {\eta }_{i}{\eta }_{j} > \). We note that three situations can lead to the creation of an edge between an individual i and an individual j: (1) only individual i initiates the creation, (2) only individual j initiates the creation, or (3) both individuals initiate the creation. Therefore, the probability for the edge to appear is thus:

$${p}_{ij}={p}_{i\to j}+{p}_{j\to i}+{p}_{i\leftrightarrow j}.$$

In the case of two individuals from the group 0, this probability is on average:

$$\begin{array}{rc}{p}_{ij,00}&={f}_{0}{\rho }_{a}\pi {d}^{2}\times \gamma \times \left[{h}_{00}(1-{h}_{00})+(1-{h}_{00}){h}_{00}+{h}_{00}^{2}\right]\\ &={f}_{0}{\rho }_{a}\pi {d}^{2}\gamma \left(1-{h}_{01}^{2}\right).\end{array}$$

Thus, the number of intragroup edges created during one time step for group 0 is:

$${E}_{00}=\frac{{N}_{a}^{2}\pi {d}^{2}}{2{L}^{2}}\gamma {f}_{0}^{2}\left(1-{h}_{01}^{2}\right),$$

where the 1/2 factor takes into account double counting. With a similar approach, we find that

$${E}_{11}=\frac{{N}_{a}^{2}\pi {d}^{2}}{2{L}^{2}}\gamma {f}_{1}^{2}\left(1-{h}_{10}^{2}\right).$$

Furthermore, this procedure also enables us to find that

$${E}_{10}=\frac{{N}_{a}^{2}\pi {d}^{2}}{{L}^{2}}\gamma {f}_{1}{f}_{0}\left(1-{h}_{00}{h}_{11}\right)$$


$${E}_{01}=\frac{{N}_{a}^{2}\pi {d}^{2}}{{L}^{2}}\gamma {f}_{0}{f}_{1}\left(1-{h}_{00}{h}_{11}\right),$$

where the 1/2 factor is not required in these cases because they do not have double-counting. Finally, since E = E00 + E01 + E10 + E11 by definition, the share of intragroup edges for group 0 is given by:


By following analogous procedure, we can find e11 as written in Eq. (4). In addition, e01 and e10 can be written as


We verify that these equations predict the model behavior well by comparing them with simulations (see Supplementary Note 4). In order to assess group mixing in empirical data, we use Eq. (4), Eq. (3), and Eq. (15) to estimate h00 and h11 from data via numerical optimization. First, we calculate the empirical share of intra- and intergroup edges in the networks, then we use an optimization algorithm to find the corresponding values for h00 and h11.