# White blood cell subtype detection and classification

Nalla Praveen
Sanjay Kumar Sonbhadra
M. Syafrullah  Dept. of Information Technology
Indian Institute of Information Technology Allahabad
Prayagraj, India
<EMAIL_ADDRESS>Dept. of Information Technology
Indian Institute of Information Technology Allahabad
Prayagraj, India
<EMAIL_ADDRESS>Program of Master of Computer Science
Universitas Budi Luhur
Indonesia
<EMAIL_ADDRESS>Narinder Singh Punn
Sonali Agarwal
Krisna Adiyarta  Dept. of Information Technology
Indian Institute of Information Technology Allahabad
Prayagraj, India
<EMAIL_ADDRESS>Dept. of Information Technology
Indian Institute of Information Technology Allahabad
Prayagraj, India
<EMAIL_ADDRESS>Program of Master of Computer Science
Universitas Budi Luhur
Indonesia
<EMAIL_ADDRESS>
###### Abstract

Machine learning has endless applications in the health care industry. White
blood cell classification is one of the interesting and promising area of
research. The classification of the white blood cells plays an important part
in the medical diagnosis. In practise white blood cell classification is
performed by the haematologist by taking a small smear of blood and careful
examination under the microscope. The current procedures to identify the white
blood cell subtype is more time taking and error-prone. The computer aided
detection and diagnosis of the white blood cells tend to avoid the human error
and reduce the time taken to classify the white blood cells. In the recent
years several deep learning approaches have been developed in the context of
classification of the white blood cells that are able to identify but are
unable to localize the positions of white blood cells in the blood cell image.
Following this, the present research proposes to utilize YOLOv3 object
detection technique to localize and classify the white blood cells with
bounding boxes. With exhaustive experimental analysis, the proposed work is
found to detect the white blood cell with 99.2% accuracy and classify with 90%
accuracy.

###### Index Terms:

Image classification, White blood cell detection, Deep learning, YOLOv3.

##  I Introduction

Human blood is composed of the blood cells which accounts for 45% of the blood
tissue by volume, whereas the remaining 55% of the volume composed of plasma
(the liquid portion of the blood). There are three types of blood cells: red
blood cells (erythrocytes), white blood cells (leukocytes), platelets
(thrombocytes). White blood cells are produced in the lymphoid tissue and bone
marrow. These cells are classified into two types – granulocytes and
agranulocytes. Granulocytes are further classified into neutrophils, basophils
and eosinophils, whereas agranulocytes are classified into monocytes and
lymphocytes, as shown in Fig. 1. Each type of cells play a different role to
fight against the infections or diseases [1]. Neutrophils helps in healing the
damaged tissues and resolve infections. Unusual levels of basophils result in
severe types of blood disorders. Eosinophils are disease fighting white blood
cells. Whereas, lymphocytes fight against bacteria, virus and the cells that
threaten its functioning; monocytes fight against infections, remove dead or
damaged tissues, destroy cancer cells. Each of these WBCs differ in the shape
of nucleus, color and texture, thereby making it a challenging task for manual
analysis.

Figure 1: White blood cell sub types classification.

White blood cell count is done by the haematologist manually. Several
procedures are required to determine the location and classify the type of the
white blood cells. The current techniques to classify the white blood cells
are error prone and time consuming. To reduce the time taken for the blood
cell classification and reduce the human errors the computer aided techniques
are utilized to automatically classify and detect the location of the white
blood cells in the blood cell image. The image classification models such as
CNN [2, 3], VGG-16 [4], ResNet [5] are efficient and are widely used for
various applications and domain. The previous works proposed on the white
blood cells mainly focused on image segmentation [6] and classification.

The rest of the paper is structured as follows- Section II presents the
related work in the field of research, Section III presents the object
detection technique, YOLOv3 [2, 7], Section IV presents the proposed
methodology, section V presents the results, section VI presents the
conclusion of the present research work.

##  II Related Work

In the recent years, several deep learning methods have been proposed to
classify the white blood cells. Diouf et al. [8] proposed a seven layered
convolution neural network that uses standard convolution and max pooling
operations to distinguish the four types of white blood cells. The proposed
model was able to classify with 97% accuracy. Mu-ChunSu et al. [9] proposed a
new segmentation algorithm for segmenting a white blood cell from the smear
image. The proposed method involves three stages: (1) segmentation of WBC, (2)
extraction of features, (3) design of a classifier. The segmentation algorithm
finds the region of WBC on the HSI color space. In the second stage, three
kinds of features are extracted for classification: geometrical, color and
local directional pattern (LDP) features. Following this, three kinds of
neural network classifiers are used: multi layer perceptron [10], support
vector machine and hyper rectangular composite neural networks for
classification that achieved 99.1%, 97.5% and 88.9% accuracy respectively.
Ozyurt [11] proposed a fused CNN model for WBC detection with MRMR feature
selection and extreme learning machine. This approach is able to classify WBC
with an accuracy of 96%. Vatathanavaro et al. [12] explained the study of two
CNN architectures: VGG-16 and ResNet-50 to classify five types of white blood
cells. ResNet-50 is the best classifer and it achieved 88.3% accuracy. Theera-
Umpon [13] utilized a new set of features generated using the mathematical
morphology to extract nucleus features. Later, these features were used to
train the artificial neural network and Bayes classifer to identify the type
of WBC. The authors achieved promising and robust results by adapting the five
fold cross validation on blood cell images.

Recently, Almezhghwi et al. [14] proposed a generative adversarial network for
image augmentation and state-of-the-art deep neural network for classifying
the white blood cells. The proposed method classifies the white blood cells
with an accuracy of 98.8%. Madhumala et al. [15] proposed a systematic
approach to classify the white blood cells through statistical pattern
analysis. A Naive Bayes approach is used for the classification of the white
blood cells depending on the roundness, formfactor, solidity and compactness
shape features. The overall accuracy obtained using this approach is 83.2%.
Habibzadeh et al. [16] proposed a method to classify and divide the white
blood cells using K-means clustering, whereas SVM [17] and neural network were
used for classification. The authors achieved 80% accuracy in classifying
white blood cells. Liqun et al. [18] improved classification accuracy based on
the feature weight K-means clustering for extracting white blood cells.

However, it can be observed that the standalone classification of the WBCs is
not sufficient for further analysis. Following this context, the present
article proposes YOLOv3 based localization and classification of WBCs using
blood cell images.

##  III Materials and methods

###  III-A Dataset

The dataset used is publicly available Blood Cell Count Detection (BCCD)
dataset [19]. BCCD dataset consists of 364 images with annotations and labels
of lymphocyte, monocyte, neutrophil and eosinophil cells. The images are RGB
of size 320$\times$240$\times$3 and are in jpeg format. The data samples are
increased with the image augmentation techniques such as rotation, flip,
noise, etc. BCCD is MIT licensed dataset available in Kaggle. There are 2497
Eosinophil images, 2483 Lymphocyte images, 2487 Monocyte images and 2499
Neutrophil images in the training dataset. There are 574 Eosinophil images,
620 Lymphocyte images, 620 Monocyte images and 616 Neutrophil images in the
testing dataset.

###  III-B YOLOv3

YOLO [20] is shortened form of you only look once and it uses convolutional
neural network for object detection. YOLO can detect multiple objects on a
single image. Apart from predicting classes of the objects, YOLO also detects
the locations of the objects on the image. YOLO applies a single neural
network to the whole image that divides image into several regions and
produces the probabilities for every region. YOLO predicts the number of
bounding boxes that cover some regions on the image and chooses the best ones
according to the probabilities.

Figure 2: Schematic representation of the YOLOv3 network architecture.

YOLOv3 consists of 53 convolutional layers that are called as Darknet-u53. For
the detection task 53 more layers are added that gives the 106 layered
architecture for YOLOv3. The detections are made at 82, 94, 106 layers as
shown in Fig. 2, where the network downsamples the feature map by using
strides of 32, 16 and 8. To produce the desired output, YOLOv3 applies
1$\times$1 detection kernels at these layers in the network. The shape of the
detection kernels has its depth that is calculated by the expression
$(b\times(5+c))$, where b is the number of bounding boxes the YOLOv3 predicts
i.e 3 for every cell of the feature maps and $c$ is the number of classes.
Each bounding box has $(5+c)$ attributes such as width, height, center
coordinates of the bounding box, objectness score, list of confidence score
for every class that this cell in the bounding box might belong, as shown in
Fig. 3. There are no pooling layers in YOLOv3, instead convolutional layers
are used to down sample the feature maps and prevent the loss of the low-level
features that tend to improve the detection of the smaller objects.

Figure 3: YOLOv3: detection and classification work flow diagram.

In order to predict the bounding boxes, YOLOv3 uses the predefined bounding
boxes that are called anchors. These anchors are used to predict the real
width and real height of the bounding box. Nine anchor boxes are used i.e
three anchor boxes for each scale. To calculate the anchors k-means clustering
is used. Later, YOLOv3 calculates the offsets to these anchors and better fit
the region of interest with the bounding boxes and finally to compute the
center coordinates of the bounding boxes, YOLOv3 passes the outputs through
the sigmoid function. The below equations are used to find the width, height
and center coordinates of the bounding boxes:

$\mathcal{B}_{x}\,=\,\sigma(\mathcal{T}_{x})\,+\,\mathcal{C}_{x}$ (1)
$\mathcal{B}_{y}\,=\,\sigma(\mathcal{T}_{y})\,+\,\mathcal{C}_{y}$ (2)
$\mathcal{B}_{w}\,=\,(\mathcal{P}_{w})\,*\,exp(\mathcal{T}_{w})$ (3)
$\mathcal{B}_{h}\,=\,(\mathcal{P}_{h})\,*\,exp(\mathcal{T}_{h})$ (4)

where, $\mathcal{B}_{x},\mathcal{B}_{y}$ are the center coordinates of the
bounding box; $\mathcal{B}_{h},\mathcal{B}_{w}$ is the height and the width of
the bounding box respectively;
$\mathcal{T}_{x},\mathcal{T}_{y},\mathcal{T}_{w},\mathcal{T}_{h}$ are the
output of the neural network.; $\mathcal{C}_{x},\mathcal{C}_{y}$ are the
coordinates of the top left corner of the cell on the grid of the anchor box;
$\mathcal{P}_{w},\mathcal{P}_{h}$ are the width and height of anchor.

##  IV Proposed method

The proposed WBC classification and detection method is based on the YOLOv3
object detection algorithm. The proposed method mainly consists of two phases.
Phase 1 is WBC bounding box detection from the blood cell image, Phase 2 is
classification and detection of WBC subtypes.

###  IV-A Phase 1 - WBC bounding box generation

Phase 1 generates the bounding boxes that serves as the training set for phase
2. In phase 1 364 white blood cell images and their corresponding annotations
are used for training. The images are preprocessed along with the annotation
file that consists of bounding box coordinates to extract the white blood
cells. YOLOv3 uses these images and coordinates to generate the bounding boxes
around white blood cells. These generated bounding boxes along with confidence
score are considered as training set for phase 2. This phase can also be used
to count RBC, WBC, platelets from the blood cell images [21, 22]. This phase
detects the bounding box of a single class (WBC) as shown in Fig. 4. The shape
of the detection kernel is 3$\times$6 i.e calculated by the expression
$(b*(5+c))$, where $b=3$ and $c=1$ (for single class detection).

Figure 4: Phase 1: bounding box generation for detection of WBC work flow
diagram.

###  IV-B Phase 2- Classification and detection of WBC subtypes

It is a multi-class (four classes) classification problem. The input to the
phase 2 is the training dataset images and the bounding box of the respective
images that are generated by the output of phase 1. The output of this phase
is the class predicted, bounding box of the subtype of white blood cell in the
blood cell image, class probabilities and confidence score of the bounding
box.

The shape of the detection kernel is $3\times 9$ is calculated by the
expression $(b\times(5+c))$, where $b=3$ and $c=4$ (four class
classification). The overall workflow diagram is shown in Fig. 5.

Figure 5: Overall schematic representation of the proposed framework for
detection and classification of the WBC.

###  IV-C Evaluation with test data

For classification the considered evaluations metrics are accuracy, precision,
recall, f1-Score. The entire test dataset is used for evaluation of
classification task i.e 2430 images of four different classes. These metrics
are calculated by the following equations:

$Accuracy\,=\,\frac{TP+TN}{TP+TN+FP+FN}$ (5) $Precision\,=\,\frac{TP}{TP+FP}$
(6) $Recall\,=\,\frac{TP}{TP+FN}$ (7)
$F1\mathrm{-Score}\,=\frac{2*Recall*Precision}{Recall+Precision}$ (8)

The same metrics are used for evaluating the detection task. The part of the
dataset is used for testing the detection. For this, the 200 samples are
randomly selected with equal distribution of classes, manually draw the
bounding boxes representing WBC region in the images. The detection is true
positive if predicted class matches the actual class, bounding box confidence
is greater than 0.20 and the predicted bounding box intersection over union
(IoU) score is greater than 0.40. The detection is false positive if predicted
class does not match the actual class and the predicted bounding box IoU score
is less than 0.40. The detection is considered false negative if the detected
bounding box confidence is less than 0.20.

TABLE I: Comparison of classification results over two models. Classifier | WBC Type | F1-Score | Precision | Recall
---|---|---|---|---
YOLOv3 | Eosinophil | 0.93 | 0.90 | 0.97
Lymphocyte | 1.0 | 1.0 | 1.0
Monocyte | 0.85 | 0.99 | 0.74
Neutrophil | 0.82 | 0.76 | 0.90
Faster RCNN + VGG 16 | Eosinophil | 0.93 | 0.88 | 0.97
Lymphocyte | 0.99 | 0.98 | 1.0
Monocyte | 0.85 | 0.97 | 0.75
Neutrophil | 0.81 | 0.77 | 0.87
TABLE II: Comparison of detection results over two models. Detection | WBC Type | F1-Score | Precision | Recall
---|---|---|---|---
YOLOv3 | Eosinophil | 1.0 | 1.0 | 1.0
Lymphocyte | 1.0 | 1.0 | 1.0
Monocyte | 1.0 | 1.0 | 1.0
Neutrophil | 0.97 | 0.97 | 1.0
Faster RCNN + VGG 16 | Eosinophil | 0.97 | 0.96 | 1.0
Lymphocyte | 1.0 | 1.0 | 1.0
Monocyte | 1.0 | 1.0 | 1.0
Neutrophil | 0.90 | 0.87 | 1.0

##  V Results and discussion

The proposed model is able to classify white blood cells subtype with 90%
accuracy. The experimental results of YOLOv3 model compared to faster RCNN
using VGG16 for classification and detection tasks are shown in table I and
table II. The YOLOv3 was able to achieve better results due to its ability to
consider the contextual information about the available classes by analysing
the entire image in a single go, thereby also making it faster than any other
model. This also enables the network to effectively draw the localization and
identification of relatively smaller object.

##  VI Conclusion

In this paper, we discussed about detection or localization and classification
of white blood cell (WBC) subtypes using blood cell images. The proposed
approach utilizes YOLOv3 model divided into two phases, where in phase 1 WBC
bounding box is generated and in phase 2 WBC subtypes are classified and
detected. The phase 1 approach can also be extended for counting the number of
white blood cells, red blood cells and platelets from blood cell images. The
proposed approach outperforms the faster RCNN based VGG16 model in both
detection and classificaiton of WBC subtypes. The research can be further
extended trying different YOLO versions, fine tuning the model and augmenting
the dataset. As an extension to this proposed work more object detection and
classification techniques can be explored to achieve better results.

## Acknowledgment

We thank our institute, Indian Institute of Information Technology Allahabad
(IIITA), India and Big Data Analytics (BDA) lab for allocating the centralised
computing facility and other necessary resources to perform this research. We
extend our thanks to our colleagues for their valuable guidance and
suggestions.

## References

  * [1] D. Weatherspoon, “What to know about white blood cells,” https://www.medicalnewstoday.com/articles/327446, 2020, [Online; accessed February 10, 2021].
  * [2] J. Redmon and A. Farhadi, “Yolov3: An incremental improvement,” 04 2018.
  * [3] R. Chauhan, K. Ghanshala, and R. Joshi, “Convolutional neural network (cnn) for image detection and recognition,” pp. 278–282, 12 2018.
  * [4] S. Tammina, “Transfer learning using vgg-16 with deep convolutional neural network for classifying images,” p. p9420, 10 2019.
  * [5] A. Mahmood, M. Bennamoun, S. An, and F. Sohel, “Resfeats: Residual network based features for image classification,” 09 2017.
  * [6] L. Tyagi, “Review of various image segmentation techniques,” 01 2017.
  * [7] J. Redmon and A. Farhadi, “Yolo9000: Better, faster, stronger,” pp. 6517–6525, 07 2017.
  * [8] D. Diouf, M. Diop, and A. Ba, “Convolutional neural network and decision support in medical imaging: case study of the recognition of blood cell subtypes,” 11 2019.
  * [9] M.-C. Su, C.-Y. Cheng, and P.-C. Wang, “A neural-network-based approach to white blood cell classification,” p. 796371, 01 2014.
  * [10] D. M. Gunasekaran, K. Rajesh, and K. Subburathinam, “Adaptive neuro fuzzy inference system for white blood cell classification,” 01 2013.
  * [11] F. Özyurt, “A fused cnn model for wbc detection with mrmr feature selection and extreme learning machine,” 06 2020.
  * [12] S. Vatathanavaro, S. Tungjitnob, and K. Pasupa, “White blood cell classification: A comparison between vgg-16 and resnet-50 models,” 12 2018.
  * [13] N. Theera-Umpon, “Automatic white blood cell classification in bone marrow images using morphological features,” 03 2021.
  * [14] K. Almezhghwi and S. Serte, “Improved classification of white blood cells with the generative adversarial network and deep convolutional neural network,” pp. 1–12, 07 2020.
  * [15] M. Ghosh, D. K. Das, S. Mandal, C. Chakraborty, M. Pala, A. Maiti, S. Pal, and A. Ray, “Statistical pattern analysis of white blood cell nuclei morphometry,” 05 2010, pp. 59 – 66.
  * [16] M. Habibzadeh, M. Jannesari, Z. Rezaei, M. Totonchi, and H. Baharvand, “Automatic white blood cell classification using pre-trained deep learning models: Resnet and inception,” p. 105, 04 2018.
  * [17] S. Ibrahim, “Comparative analysis of support vector machine (svm) and convolutional neural network (cnn) for white blood cells’ classification,” pp. 394–399, 08 2019.
  * [18] L. Lin, W. Wang, and B. Chen, “Leukocyte recognition with convolutional neural network,” p. 174830181881332, 11 2018.
  * [19] Kaggle, “Blood cell images,” https://www.kaggle.com/paultimothymooney/blood-cells, 2018, [Online; accessed December 1, 2020].
  * [20] J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, “You only look once: Unified, real-time object detection,” pp. 779–788, 06 2016.
  * [21] N. Dhieb, H. Ghazzai, H. Besbes, and Y. Massoud, “An automated blood cells counting and classification framework using mask r-cnn deep learning model,” pp. 300–303, 12 2019.
  * [22] M. Islam and M. Alam, “A machine learning approach of automatic identification and counting of blood cells,” 05 2019.


# Understanding following patterns among high-performance athletes

Jorge P. Rodríguez<EMAIL_ADDRESS>Instituto de Física
Interdisciplinar y Sistemas Complejos (IFISC), CSIC-UIB, E-07122 Palma de
Mallorca, Spain  C.A. Illes Balears, Universidad Nacional de Educación a
Distancia (UNED), 07009 Palma de Mallorca, Spain  Lluís Arola-Fernández
Instituto de Física Interdisciplinar y Sistemas Complejos (IFISC), CSIC-UIB,
E-07122 Palma de Mallorca, Spain

###### Abstract

Professional sports enhance interaction among athletes through training
groups, sponsored events and competitions. Among these, the Olympic Games
represent the largest competition with a global impact, providing the
participants with a unique opportunity for interaction. We studied the
following patterns among highly successful athletes to understand the
structure of their interactions. We used the list of Olympic medallists in the
Tokyo 2020 Games to extract their follower-followee network in Twitter,
finding 7,326 connections among 964 athletes. The network displayed frequent
connections to similar peers in terms of their features including sex, country
and sport. We quantified the influence of these features in the followees
choice through a gravity approach capturing the number of connections between
homogeneous groups. Our research remarks the importance of datasets built from
public exposure of professional athletes, serving as a proxy to investigate
interesting aspects of many complex socio-cultural systems at different
scales.

Complex networks, social networks, directed networks, Olympic Games,
assortativity, gravity model

##  I Introduction

The structure of interactions frequently helps understand social dynamics.
Such structure is typically represented as complex networks [1], which are
often characterized by heterogeneity where a few individuals, known as hubs,
can concentrate a large fraction of the total number of interactions [2, 3].
Although cognitive constraints limit the amount of interactions that a person
can sustain, for example through the Dunbar numbers [4], new technologies
allow individuals to connect to a larger number of people. This is
particularly interesting in the case of directed social networks, where
interactions do not have to be reciprocal, and thus an individual can receive
information from other users that may not even know her. Such platforms drove
the emergence of _influencers_ , whose profiles in online social networks are
massively followed, and consequently institutions and companies frequently
choose them for their advertising campaigns. People placed in strategic
network locations, known as influential spreaders [5, 6] in the terminology of
complex networks, play a key role in the outcome of the global network
dynamics [7]. The driving force of influential spreaders often coexists with
the presence of strong assortative (_i.e._ , homophilic) patterns in the
social networks [8], observed when users tend to interact more with people
with shared preferences or that are similar to them, which can lead to
disadvantages for the minorities [9]. These assortative patterns also shape
global network dynamics [10, 11, 12], so characterizing them becomes another
key factor to understand how information spreads through networks in order to
design viral advertising strategies [13].

High-performance professional athletes are an example of users in social
networks that influence general population’s opinion and activities [14]. The
most popular are able to reach global audiences, becoming reference models for
many people, especially children, and attractive targets for commercial
advertising [15]. In online social media, these sport celebrities also engage
in interactions with their followers [16], potentially impacting, with their
opinions and activities, some aspects of the cultural evolution at a global
scale. Beyond online platforms, the Olympic Games represent the major sport
gathering in the world. Except for a few official supporters, other
advertising campaigns are not allowed during the event
111https://olympics.com/ioc/documents/international-olympic-committee.
However, the broad relevance of this competition has allowed athletes to
impact the spreading of relevant topics such as equality, democracy, peace or
job conditions throughout history [18].

The significant impact of world-class athletes enrolled in the Olympic Games
and their public exposure in online social platforms offers a great
opportunity to understand and quantify how information flows among these
highly influential spreaders. A microscopic analysis of the interaction
patterns among individual athletes can be complemented by a more macro-scale
view, where interaction can be analysed through groups of athletes sharing
features such as nationality, sport or sex, aiming to reveal assortativity
fingerprints among groups. In this work, we explore for the first time the
empirical network of following patterns on Twitter among the most influential
athletes, the Olympic medallists, by analysing the presence of super-
influential spreaders and homophily following patterns (assortativity) in the
network, and characterising cross-group interactions via a gravity model
approach.

##  II Results

Figure 1: Following network between Olympic medallists. Arrows in links point
from the followers to the followees and the node colours represent medallists
in sports displaying a meso-scale structure, including athletics (red),
basketball (olive), cycling (violet), handball (green), football (orange),
swimming (blue). Athletes practising other sports are represented in black.

###  II.1 A directed following network

We created a database composed of 1,052 medallists (from 76 countries in 36
sports) in the Tokyo 2020 Olympic Games who had a public Twitter account. The
use of this database to query the Twitter API led to the discovery of $E=7326$
following links (_i.e._ connecting a follower to a followee) between $N=964$
different individuals (representing 64 countries in 36 sports, including both
sexes). These links accounted for 2.4% of the total number of these athletes’
followees in Twitter (_i.e._ , the remaining 97.6% of links including these
athletes as followers were directed towards users that were not included in
our database). Interestingly, although the nodes in the network represented
specialized individuals, the network was sparse, as the links that we observed
represent only 0.79% of the possible $N(N-1)$ connections.

The network displayed a largest connected component, defined as the largest
component of nodes connected by links (ignoring their directness), of size 956
nodes, while the strongly connected largest component, which restricts the
largest component to the set of nodes displaying a return path following the
directed network between all possible pairs [19], had a size of 827 nodes. The
graphical representation of the network revealed the presence of meso-scale
structures with high density of links associated to specific sports, including
athletics, basketball, cycling, handball, football and swimming (Fig. 1).

Rank | Name | Sport | Country | $k_{\text{in}}$ | Medal(s)
---|---|---|---|---|---
1 | Kevin Durant | Basketball | United States | 69 | G
2 | Allyson Felix | Athletics | United States | 56 | G, B
3 | Teddy Riner | Judo | France | 54 | G, B
4 | Alex Morgan | Football | United States | 52 | B
5 | Simone Biles | Gymnastics | United States | 50 | S, B
6 | Megan Rapinoe | Football | United States | 48 | B
7 | Adam Peaty | Swimming | Great Britain | 46 | G, G, S
8 | Nikola Karabatic | Handball | France | 43 | G
9 | Noah Lyles | Athletics | United States | 40 | B
9 | Tom Daley | Diving | Great Britain | 40 | G, B
Table 1: Rank of the 10 most followed athletes. Athletes are sorted by
decreasing in-degree $k_{\text{in}}$. The considered medals are gold (G),
silver (S) and bronze (B) representing, respectively, the 1${}^{\text{st}}$,
2${}^{\text{nd}}$ and 3${}^{\text{rd}}$ positions in the podium.

The average degree of the network was $\langle k\rangle=E/N=7.60$. For
directed networks, this represents the total number of followers (as well as
the total number of followees), divided by the number of individuals included
in the network. However, the values for individual $i$ of the in-degree
$k_{i,\text{in}}$ (number of followers) and out-degree $k_{i,\text{out}}$
(number of followees), varied significantly from $\langle k\rangle$,
displaying broad distributions, with 32% of the individuals with the highest
$k_{\text{in}}$ being the targets (_i.e._ , followees) of 68% of the total
number of links, and 33% of the individuals with the highest $k_{\text{out}}$
being the source (_i.e._ , followers) of 67% of the links. We used the in-
degree to extract the 10 most popular athletes in the network, finding both
well-known athletes (for example, Kevin Durant, Simone Biles or Megan
Rapinoe), and interestingly also other athletes with high $k_{\text{in}}$ who
are not so popular among the general public (Table 1). Specially, we observed
a majority of athletes from the United States (US), with 6 individuals
included in this top-10 ranking.

The links in our network were directed, as the connections on Twitter are not
reciprocal, meaning that user A following user B does not imply that B follows
A. Considering the importance of this feature, we quantified it, finding that,
out of 4898 unique undirected links, 2428 (49.6%) were reciprocal (_i.e._ ,
almost half of the connections were two-way). This generic pattern displayed
remarkable differences at individual level. We used the Jaccard index, a
standard way to quantify the overlap between different sets, to estimate the
reciprocity for a given individual $i$, obtaining $J_{i}$ as the intersection
divided by the union of the set of her followers and the set of her followees.
Considering $a_{ij}=1$ when $i$ followed $j$ and 0 otherwise, the Jaccard
index was defined as

$J_{i}=\frac{\sum_{j}a_{ij}a_{ji}}{\sum_{j}(a_{ij}+a_{ji}-a_{ij}a_{ji})}$ (1)

Although the Jaccard index has been broadly used, in the context of our
directed network we observed that a small value of $J_{i}$ could be the result
of different scenarios, including: a) similar in and out-degrees, but low
intercept among the specific followers and followees, b) $k_{i,\text{in}}\gg
k_{i,\text{out}}$, or c) $k_{i,\text{in}}\ll k_{i,\text{out}}$. To distinguish
between such scenarios, we introduced the in-reciprocity $r_{i,\text{in}}$ as
the fraction of $i$’s followees that followed her back (_i.e._ , the potential
of $i$ to get a follow back when following a new user), and the out-
reciprocity $r_{i,\text{out}}$ as the fraction of $i$’s followers that $i$
followed. Mathematically, the in- and out-reciprocities were given by:

$\displaystyle r_{i,\text{in}}=\frac{\sum_{j}a_{ij}a_{ji}}{\sum_{j}a_{ij}}$
(2) $\displaystyle
r_{i,\text{out}}=\frac{\sum_{j}a_{ij}a_{ji}}{\sum_{j}a_{ji}}$ (3)

In fact, the Jaccard index $J_{i}$ was related to $r_{i,\text{in}}$ and
$r_{i,\text{out}}$ through the equation

$J_{i}^{-1}=r_{i,\text{in}}^{-1}+r_{i,\text{out}}^{-1}-1$ (4)

that is valid for $J_{i}\neq 0$ and, considering that
$r_{i,\text{in}},r_{i,\text{out}}\in[0,1]$, had a unique solution
$r_{i,\text{in}}=r_{i,\text{out}}=1$ for $J_{i}=1$ (_i.e._ , when the set of
$i$’s followers exactly matched the set of her followees). However, for
$J_{i}\neq 0,1$, the values of $r_{i,\text{in}}$ and $r_{i,\text{out}}$ were
undetermined, meaning that the solution of Eq. (4) was a curve in the
$(r_{\text{in}},r_{\text{out}})$ space (see the solutions for
$J=\\{0.25,0.5,0.75\\}$ represented as lines in Fig. 2). Consequently, we
decided to study the reciprocity in the $(r_{\text{in}},r_{\text{out}})$
space, depicting the Jaccard index as an orientative value in the colour of
each individual data point. At individual level, we detected frequent
observations of high values of the in-reciprocity and out-reciprocity (dots in
Fig. 2), but also a non-negligible amount of individuals that displayed an
intermediate behaviour between both. Interestingly, representing the in-degree
as the symbol size informed on the frequent behaviour of the most popular
athletes, who displayed a high in-reciprocity and low out-reciprocity, with
values, respectively, higher than 0.8 and lower than 0.45. Particularly, 4 out
of the 10 most popular athletes (Table 1) displayed the maximum in-reciprocity
(_i.e._ , $r_{\text{in}}=1$), and $r_{\text{out}}<0.45$. However, this was not
the case of all the athletes with high in-degree, as we observed two
individuals with high out-reciprocity (larger than 0.9) and variable in-
reciprocity. Specifically, $r_{\text{in}}$ was 0.54 for the individual with
the highest number of followees in the network, _i.e._ with the highest
$k_{\text{out}}$ and the in-reciprocity was 0.97 for an individual with
$k_{\text{in}}=k_{\text{out}}+1$ and a high overlap between her followers and
followees).

Figure 2: Reciprocity patterns in the network. For each ego node, we compute
the in-reciprocity $r_{\text{in}}$ (fraction of ego’s followees that follow
her) and the out-reciprocity $r_{\text{out}}$ (fraction of ego’s followers
that she follows). Symbol sizes depict the node’s in-degree (number of
followers in the network) and the colors represent the Jaccard index $J$
between the set of followers and the set of followees of each node. We have
represented all the possible combinations of $(r_{\text{in}},r_{\text{out}})$
on the solid lines for $J=\\{0.25,0.5,0.75\\}$, following Eq. (4).

###  II.2 Quantifying assortative patterns

Figure 3: Following patterns by sex. Representation of the number of links
between sources (followers) and targets (followees) by sex. Areas are
proportional to the number of links in each entry, where the shaded areas
depict the observed links, and the area enclosed by the red and blue dashed
lines stands for, respectively, the rewired and random directed network null
models, with two lines for each colour delimiting a standard deviation from
the average behaviour.

We used the individuals’ metadata, including the sex, country and sport, to
quantify the observed homophily in the network (_i.e._ , the likelihood of
following peers with similar features, known as assortativity in the context
of network science). In general, in terms of the observed links, 78.8% of them
connected two individuals winning medals in the same sport, 74.4% of them
occurred between representatives of the same country and 73.3% linked athletes
with the same sex, indicating the presence of highly assortative patterns in
the network.

Figure 4: Following patterns by country. Matrix representing how many
following links occurred between different pairs of countries, represented as
the $z$-score of the observed links with a reference to what would be expected
in a random scenario, which was given by 1000 realizations of the network
rewiring. The diagonal and non-diagonal terms span across different scales, so
the former are represented in the right bar.

Regarding the sex feature, we measured the total in- and out-degrees of each
sex, obtaining $k_{\text{in}}^{M}$, $k_{\text{in}}^{F}$, $k_{\text{out}}^{M}$
and $k_{\text{out}}^{F}$ by adding all the individual in- and out-degrees
according to the athlete’s sex. Then, we used the ratio between these in- and
out-degrees per sex to estimate the direction of the disassortative links in
the network, obtaining $k_{\text{in}}^{M}/k_{\text{out}}^{M}=1.05$ and
$k_{\text{in}}^{F}/k_{\text{out}}^{F}=0.96$. These results indicated that male
athletes had more followers than followees, implying that the disassortative
links where female athletes followed male athletes were more likely than
otherwise, which was confirmed by a matrix visualization of the observed links
considering the source (follower) and target’s (followee) sexes (Fig. 3).
First, this matrix highlighted the assortative patterns through the stronger
diagonal terms in contrast to the non-diagonal entries (shaded areas on Fig. 3
represented the number of observed links in each entry). To understand the
significance of this pattern and the non-diagonal terms, we proposed two
reference null models. First, we rewired the edges by considering pairs of
links and swapping their targets (_e.g._ , if we observed $a\rightarrow b$ and
$c\rightarrow d$, a rewire between these links would lead to $a\rightarrow d$
and $c\rightarrow b$); this reference model would keep fixed individual
properties such as the sex, $k_{\text{in}}$ and $k_{\text{out}}$. Second, we
created a random directed network with the same number of nodes, edges and
number of female/male athletes. Both reference models underestimated the
diagonal terms and overestimated the non-diagonal cases. In the diagonal, the
rewiring model displayed a higher number of male $\rightarrow$ male links than
the random network model; while we observed the opposite behaviour for the
female $\rightarrow$ female links. We understood this behaviour taking into
account that the number of links in the random network displayed minor
variations across the different matrix entries as the number of male and
female athletes was similar (475 male and 489 female), while for the rewired
network, the expected number of male $\rightarrow$ male links would be
proportional to $k_{\text{in}}^{M}k_{\text{out}}^{M}$ (and similarly for
female $\rightarrow$ female); thus, as $k_{\text{in}}^{F}k_{\text{out}}^{F}$
was 60% larger than $k_{\text{in}}^{M}k_{\text{out}}^{M}$, the rewiring
provided a higher estimate of female $\rightarrow$ female links than the
random network model, while this estimate was lower than the random network
model for male $\rightarrow$ male links.

Focusing on the athlete’s countries, we created a directed weighted network
described by the weights $w_{ij}$ that indicated how many following links
existed between athletes from countries $i$ (followers) and $j$ (followees).
Considering what we observed in the sex analysis, we chose the rewiring null
model as our reference, as this model kept the features (sex, country and
sport), together with the in- and out-degrees of the nodes. We performed
multiple realizations of the rewiring of the network at the individual athlete
level, obtaining from each realization $r$ the weights $w_{ij}^{r}$. This
allowed us to quantitatively compare the observed weights with the null model
through a $z$-score:

$z_{ij}=\frac{w_{ij}-\langle w_{ij}^{r}\rangle}{\sigma(\langle
w_{ij}^{r}\rangle)}$ (5)

where $\langle w_{ij}^{r}\rangle$ was the average weight over the multiple
rewiring realizations and $\sigma$ was its standard deviation. The
representation of these $z_{ij}$ for the 30 countries with highest in-degree,
as a matrix connecting source to target countries, revealed different scales
for the diagonal and non-diagonal entries (Fig. 4). To better visualize both
terms, we extracted the diagonal term, observing generally large values.
Particularly, all the countries had a diagonal $z$-score $z_{D}>10$ except for
Qatar ($z_{D}=-0.11$), indicating high homophily at country level. The highest
diagonal scores were those of Japan ($z=76.75$), Argentina ($z=74.12$) and
Mexico ($z=73.23$). The generic result in the non-diagonal entries was the
negative $z$-scores for the most popular countries, which we associate with
the increase of the in-degrees due to the diagonal interaction, leading to a
defect of interactions in the non-diagonal entries, together with a low
$z-$score pattern for the rest of countries (less diagonal, more random
interactions). However, we observed a few with high $z$-score, including
Poland $\rightarrow$ Qatar ($z=9.04$), Belgium $\rightarrow$ India ($z=8.24$),
Norway $\rightarrow$ Denmark ($z=8.18$) and Dominican Republic $\rightarrow$
Jamaica ($z=7.65$). Although these values are high $z$-scores, they did not
reach the typical values of the diagonal scores.

###  II.3 Modelling interactions

Figure 5: Modelling interactions between different groups. a, Number of
following links $E$, normalized by the scaled source (follower) and target
masses, $m_{s}^{\alpha}$ and $m_{t}^{\beta}$, respectively, as a function of
the distance between genotypes $d$, computed with the estimated weights from a
linear regression in semi-log scale. The data is shown for the seven possible
combinations of same or different sex, country and sport, with the solid line
representing an exponential regression, with the horizontal red line depicting
the median of the data for each $d$, the 25-75 percentiles represented in the
boxes, the whiskers representing the 25 (75) percentile minus (plus) 1.5 the
interquartile range, and the isolated dots showing the outliers. b, Top-5
edges in the genotype network with an excess of weight in the observed pattern
that the model cannot explain; these represented links obtained a $p$-value
(see Methods) of 0 after $10^{6}$ stochastic realizations of the model, and
they are sorted by the observed weight. c, Top-5 edges in the genotype network
with a defect of weight, sorted by decreasing $p$-value. The $x$-axis in b and
c represents the link weight, which is observed in the data (green arrows) or
predicted by the model (orange arrows). The $y$-axis labels report the source
and target’s sex and country, with the colour standing for their sex. Country
abbreviations are the following: United States (US), Canada (CA), Spain (ES),
France (FR) and Brazil (BR).

As we frequently observed links between individual athletes with similar
features (sex, country, sport), we developed a macroscopic model to
characterise the relative importance of such features in the homophilic
patterns that our network displayed. This model was based on an auxiliary
macroscopic network where the nodes were genotypes, introduced as the observed
unique combinations of the triad (sex, country, sport). Each genotype $i$ had
a mass $m_{i}$ that was the number of athletes with that genotype and at least
one link in the network. The macroscopic network was created considering the
genotypes with $m\geq 5$, did not include self-loops (_i.e._ , following links
within the same genotype), was directed (from followee to follower genotypes)
and weighted, where the weights were the number $E_{ij}$ of athletes with
genotype $i$ following peers with genotype $j$, representing 24.7% of the
observed links between individual athletes. We proposed a gravity-like
approach to model the interactions in this macroscopic network. Gravity models
mimic Newton’s law of gravitation [20], assuming that the flow between two
nodes in the network scales with the product of their masses and decays with
the distance between the nodes, and have been applied to traffic and human
mobility flows in many empirical contexts [21, 22]. In our approach, we
considered that $E_{ij}$ depended on the masses of genotypes $i$ (follower)
and $j$ (followee) and the distance $d_{ij}$ that reflected the difference
between these genotypes:

$E_{ij}=\frac{m_{i}^{\alpha}m_{j}^{\beta}}{f(d_{ij})}$ (6)

where $\alpha$ and $\beta$ were the scaling exponents for the masses of the
genotypes that acted as, respectively, follower and followee, and $f(d_{ij})$
was a monotonous function of the feature-based distance between genotypes.

First, we estimated the values of $\alpha$ and $\beta$ by selecting sub-
samples of this macroscopic network with a fixed distance. Particularly, we
checked the seven different combinations of similar/different sex, country and
sport (_i.e._ , as there are 2 possibilities, similar/different, and 3
features, there would be 8 combinations, but the combination with the same
features, the self-loop, was not considered in our network). For each of these
combinations, where all the links would have the same distance, we made the
linear regression of $\log E_{ij}=\alpha\log m_{i}+\beta\log m_{j}+K$, with
$K$ being a constant. After fitting this equation for each of the distance
combinations, we selected the values of $\alpha$ and $\beta$ from the
combination with largest correlation coefficient, which was $r=0.55$ for the
case of genotypes having the same country, the same sport and a different sex,
leading to $\alpha=0.50$ and $\beta=1.07$.

Second, we estimated the relative importance of each feature in the distance
between genotypes. Particularly, we introduced distance $d_{ij}$ between
genotypes $i$ and $j$ as

$d_{ij}=w_{\text{sx}}d_{ij}^{\text{sx}}+w_{\text{c}}d_{ij}^{\text{c}}+w_{\text{sp}}d_{ij}^{\text{sp}}$
(7)

where $w_{k}$ was the weight of feature $k$ on the distance, sx, c and sp
standing for, respectively, sex, country and sport, and $d_{ij}^{k}=0$ if the
feature $k$ was the same for the genotypes $i$ and $j$ and 1 otherwise. We
fitted the normalized weight $E_{ij}/(m_{i}^{\alpha}m_{j}^{\beta})$ as a
function of inverse powers of $d_{ij}$, observing that the correlation
coefficient increased with the exponent of $d_{ij}$, which suggested fitting
an exponentially decreasing function of the distance. Consequently, we fitted
$\log\frac{m_{i}^{\alpha}m_{j}^{\beta}}{E_{ij}}=w_{\text{sx}}d_{ij}^{\text{sx}}+w_{\text{c}}d_{ij}^{\text{c}}+w_{\text{sp}}d_{ij}^{\text{sp}}+K^{\prime}$,
with $K^{\prime}$ being a constant, to obtain $w_{\text{sx}}=0.053$,
$w_{\text{c}}=1.04$ and $w_{\text{sp}}=1.57$, with a correlation coefficient
$r=0.32$ (Fig. 5a). We measured the robustness of these weight estimates
through multiple fits, where we removed iteratively the data associated to one
of the seven possible combinations of same/different sex, country and sport
(_i.e._ , each iteration considered all the data except for that associated to
one combination), leading to the average values over different iterations
$\langle w_{\text{sx}}\rangle=0.07\pm 0.13$, $\langle
w_{\text{c}}\rangle=1.08\pm 0.19$, and $\langle w_{\text{sp}}\rangle=1.58\pm
0.16$.

With the estimated weights from the model, we forecasted the links between
every pair of genotypes with a mass higher or equal than 5 individuals.
Specifically, we distributed the empirically observed $E=\sum_{i\neq
j}E_{ij}=1808$ links among these pairs by computing the probability of a link
between an individual with genotype $i$ (source) and another with genotype $j$
(target):

$P_{ij}=E\frac{m_{i}^{\alpha}m_{j}^{\beta}\exp(-d_{ij})}{\sum_{i\neq
j}m_{i}^{\alpha}m_{j}^{\beta}\exp(-d_{ij})}$ (8)

Each link of the possible $m_{i}m_{j}$ links occurred with this probability.
After a realization, if the number of links $i\rightarrow j$ was higher than
the number of links of individuals with genotype $i$ following those with
genotype $j$, we increased the $p$-value associated with that connection (see
Methods). Consequently, high $p$-values were associated with a defect of
observed microscopic links with respect to the model, and low $p$-values with
an excess of observed links. After $10^{6}$ realizations, there were several
macroscopic links with $p=0$ (excess of observed links), so we ranked them
according to the number of observed microscopic links (Fig. 5b). The first
three were associated with connections between athletes from the United
States, practising the same sport (athletics and swimming), but with different
sexes, the fourth connected female athletes playing football from Canada and
the United States, while the fifth linked the Spanish male handball players to
the French, with the same sex and sport. The macroscopic links with the
highest $p$-values did not display any link in the observed data, and the
ranking according to the $p$-values matched the ranking according to the
number of predicted links. Particularly, the top-5 links with highest
$p$-values connected football players with different sex and from different
countries (Fig. 5c). Note that, for the case of football, links between
players from the same country would not be possible, as the medal-awarded
countries were different for male and female competitions. For these links,
while there were no observed links, the number of predicted links ranged
between 4 and 5, leading to high $p$-values due to the unlikelihood of a
realization leading to no links between those genotypes.

##  III Discussion

Complex networks are powerful tools to understand and simulate interacting
dynamics among populations. Consequently, the inference of such networks is
useful to extract the features underlying the temporal evolution of systems
composed of multiple coupled particles, which for example can be agents in a
social system. In this context, there are phenomena that strike quantitative
social scientists, such as why some discussion topics emerge at specific
moments. For example, considering the population of Olympic athletes, there
have been multiple attempts to discuss on the mental health problems
associated with sport, but this topic earned relevance on the Olympic Games of
Tokyo 2020 after Simone Biles decided not to compete in several disciplines.
The network that we inferred may explain the emergence of this topic during
this event, considering the high centrality (according to the in-degree) of
this athlete on the network. This particular example highlights the role that
influential spreaders play in the spread of information on top of complex
social networks, and shows that the analysis of the _rich-club_ subset of
Olympic medallists allows identifying key nodes that are able to reach a broad
audience and therefore influence the general opinion in a short time.

Complementing the key role of influential spreaders, dynamical models of
social phenomena frequently consider homophily as a driver of interaction, but
generally the lack of data leads to assumptions such as equal weighting across
different features [23, 24]. Our model of social interaction used a
macroscopic network to connect homogeneous groups, allowing us to quantify the
importance of the features in the choice of followees, which can be key for
informing dynamical models. Although the microscopic sex interactions
displayed a high assortativity (Fig. 3), the sex had a negligible role in the
macroscopic network, with a contribution to the distance that was two orders
of magnitude lower than the country and the sport, and even compatible with
the zero-weight scenario in our robustness test; this was highlighted in the
representation of the model regression and the data, where the sex differences
implied minor changes in the observed data (Fig. 5a). In contrast, the sport
was the most influential feature, having a weight that was 50% higher than
that of the country. We also estimated the scaling exponents of the source and
target masses to be, respectively, $\alpha=0.50$ and $\beta=1.07$. While the
$\beta$ value indicated a linear behaviour (_i.e._ , the probability of
creating a link to a group is proportional to the group size), $\alpha$
described a sub-linear process, where genotypes with large sizes had a
tendency to follow less frequently individuals with other genotypes. This
behaviour suggests that when groups become bigger, they are more likely to
create internal links rather than establishing links towards different
genotypes, agreeing with the high assortativity that we observed in the
microscopic network. However, we acknowledge that other factors such as the
prestige of the awarded medals, international or even personal relations may
influence the dynamics of this network creation, which highlight the presence
of other relevant dimensions that are neglected in our approach.

Here we have focused on the Tokyo 2020 snapshot of the follower-followee
network of Olympic medallists, as this represents the underlying structure of
the information flows among these athletes on Twitter at that time. In
addition to the structure, a more detailed approach to the information flows
should consider the algorithm that decides what posts from a user’s followees
are shown to them, which could be the reason for collective attention being
dominated by a few individuals [25]. Moreover, other works analysing Twitter
data have considered multiple kinds of interactions (and not only the
follower-followee scenario), highlighting its multilayer structure, for
example through the query of mentions (posts where a user tagged another) or
retweets (posts by another user that an individual shares with his followers)
[26]. Adding the temporal axis to our analysis may also capture important
aspects of the system, and a comparison between our dataset and the one of the
incoming Olympic Games in Paris 2024 would reveal more nuanced trends and add
more statistical evidence to the present findings.

Despite the aforementioned limitations, this work advances the understanding
of social dynamics by applying quantitative modelling techniques to empirical
network data that is available thanks to the high public exposure and global
impact of high-performance athletes. Besides the advantages in data
availability, this particular system has some interesting universal
properties, which are revealed by our modelling approach. We have shown that
the complex interaction patterns are strongly driven by metadata information
(sex, nationality and sport) which are in fact the most relevant individual
features in many other social dynamics beyond this particular context (if one
naturally interprets the sport feature as the occupation sector or speciality
of the individuals). Our gravity-like framework, using the macroscopic network
of genotypes and the concept of feature-based distances between genotypes, can
therefore be applied to other contexts, such as following networks of
politicians in institutions at different scales, potentially revealing and
quantifying subtle information flows, assortative biases and polarization
effects that may be currently underestimated. On the other hand, the presented
dataset offers an interesting metadata-enriched complex network, which can be
leveraged to design and test novel methodologies and hypothesis from
multidisciplinary perspectives. Taken all together, our analysis of the
following network of Olympic medallists provides a suitable proxy to better
understand the fingerprints of relevant network properties, such as
popularity, reciprocity and (metadata) assortative patterns, that emerge in
many large and interconnected socio-cultural systems at different scales.

##  IV Methods

Twitter network. We created a database with the Twitter usernames of 1052
medallists in the Tokyo 2020 Olympic Games (which took place on 2021),
according to the information available in Wikipedia
222https://en.wikipedia.org/wiki/List_of_2020_Summer_Olympics_medal_winners,
including only those with an open Twitter account and specifying their name,
Twitter username, sex, sport, country and which medal(s) they got. Introducing
this information in the Twitter API, we checked the accounts that each
medallist with a Twitter account followed, and created a database with the
accounts that belonged to other medallists, leading to the creation of a
complex directed network describing who followed whom. This network
illustrates the outcome of our queries to the Twitter API on January 2023.

Linear regression. We performed the multiple linear regression tests using the
LinearRegression function of the _sklearn_ package in Python.

$p$-value estimation to compare the model with empirical observations.
Considering the model fitted model parameters, represented in Eqs. (6,7), the
probability of an individual with genotype $i$ following another with genotype
$j$ was given by Eq. (8). We performed $R=10^{6}$ realizations of this link
random network generation. From each realization $r$ of this microscopic
network, we extracted the macroscopic network and compared, for each pair of
genotypes $i$ (source) and $j$ (target), the number of observed links $E_{ij}$
and the number of predicted links on the realization $E^{r,\text{pred}}_{ij}$,
increasing the $p$-value $p_{ij}$ in 1/$R$ when
$E^{r,\text{pred}}_{ij}>E_{ij}$, that is, when the model predicted an excess
of microscopic links with respect to the observed number of links.
Consequently, high $p$-values were associated with systematic excess of
predicted links, while low $p$-values likely represented a defect.

##  V Data and availability

Authors will make all the data (network and individual metadata) and codes
available on a public repository upon acceptance of the manuscript.

##  VI Author contributions

Conceptualization: J.P.R. Data: J.P.R. Software: J.P.R. Analysis: J.P.R. and
L.A.F. Visualization: J.P.R. Writing – Original draft: J.P.R. and L.A.F.

###### Acknowledgements.

J.P.R. was supported by the Juan de la Cierva Formación program (Reference No.
FJC2019-040622-I) funded by the Spanish Ministry of Science and Innovation,
acknowledges funding from the Spanish Research Agency MCIN/AEI/
10.13039/501100011033 via project MISLAND (PID2020-114324GB-C22), and by
Govern de les Illes Balears through the Vicenç Mut program. L.A.-F.
acknowledges funding from DYNDEEP (EUR2021-122007) from the Agencia Estatal de
Investigación MCIN/AEI/10.13039/501100011033. This research was supported by
María de Maeztu Excellence Unit 2023-2027 Ref. CEX2021-001164-M, funded by
MCIN/AEI/ 10.13039/501100011033.

## References

  * [1] S. Boccaletti, V. Latora, Y. Moreno, M. Chavez, and D.-U. Hwang, “Complex networks: Structure and dynamics,” _Physics Reports_ , vol. 424, no. 4-5, pp. 175–308, 2006.
  * [2] A.-L. Barabási and R. Albert, “Emergence of scaling in random networks,” _Science_ , vol. 286, no. 5439, pp. 509–512, 1999.
  * [3] A. D. Broido and A. Clauset, “Scale-free networks are rare,” _Nature Communications_ , vol. 10, no. 1, p. 1017, 2019.
  * [4] I. Tamarit, J. A. Cuesta, R. I. Dunbar, and A. Sánchez, “Cognitive resource allocation determines the organization of personal networks,” _Proceedings of the National Academy of Sciences_ , vol. 115, no. 33, pp. 8316–8321, 2018.
  * [5] M. Kitsak, L. K. Gallos, S. Havlin, F. Liljeros, L. Muchnik, H. E. Stanley, and H. A. Makse, “Identification of influential spreaders in complex networks,” _Nature Physics_ , vol. 6, no. 11, pp. 888–893, 2010.
  * [6] D. Chen, L. Lü, M.-S. Shang, Y.-C. Zhang, and T. Zhou, “Identifying influential nodes in complex networks,” _Physica A: Statistical Mechanics and its Applications_ , vol. 391, no. 4, pp. 1777–1787, 2012.
  * [7] S. Pei and H. A. Makse, “Spreading dynamics in complex networks,” _Journal of Statistical Mechanics: Theory and Experiment_ , vol. 2013, no. 12, p. P12002, 2013.
  * [8] M. McPherson, L. Smith-Lovin, and J. M. Cook, “Birds of a feather: Homophily in social networks,” _Annual Review of Sociology_ , vol. 27, no. 1, pp. 415–444, 2001.
  * [9] F. Karimi, M. Génois, C. Wagner, P. Singer, and M. Strohmaier, “Homophily influences ranking of minorities in social networks,” _Scientific Reports_ , vol. 8, no. 1, p. 11077, 2018.
  * [10] M. Yavaş and G. Yücel, “Impact of homophily on diffusion dynamics over social networks,” _Social Science Computer Review_ , vol. 32, no. 3, pp. 354–372, 2014.
  * [11] B. Steinegger, L. Arola-Fernández, C. Granell, J. Gómez-Gardenes, and A. Arenas, “Behavioural response to heterogeneous severity of covid-19 explains temporal variation of cases among different age groups,” _Philosophical transactions. Series A, Mathematical, physical, and engineering sciences_ , vol. 380, p. 20210119, 2022.
  * [12] G. Burgio, B. Steinegger, and A. Arenas, “Homophily impacts the success of vaccine roll-outs,” _Communication Physics_ , vol. 5, no. 70, pp. 1–7, 2022.
  * [13] A. Sheikhahmadi and M. A. Nematbakhsh, “Identification of multi-spreader users in social networks for viral marketing,” _Journal of Information Science_ , vol. 43, no. 3, pp. 412–423, 2017.
  * [14] A. Pegoraro, “Look who’s talking—athletes on twitter: A case study,” _International Journal of Sport Communication_ , vol. 3, pp. 501–514, 12 2010.
  * [15] C. Anagnostopoulos, P. Parganas, S. Chadwick, and A. Fenton, “Branding in pictures: using instagram as a brand management tool in professional team sport organisations,” _European Sport Management Quarterly_ , vol. 18, pp. 1–26, 01 2018.
  * [16] C. Gibbs, N. O’Reilly, and M. Brunette, “Professional team sport and twitter: Gratifications sought and obtained by followers,” _International Journal of Sport Communication_ , vol. 7, pp. 188–213, 06 2014.
  * [17] https://olympics.com/ioc/documents/international-olympic-committee.
  * [18] A. Tomlinson and C. Young, _National identity and global sports events: Culture, politics and spectacle in the Olympics and the football World Cup_. SUNY Series on Sport, Culture, and Social Reforms). State University of New York Press, 2005.
  * [19] S. N. Dorogovtsev, J. F. F. Mendes, and A. N. Samukhin, “Giant strongly connected component of directed networks,” _Physical Review E_ , vol. 64, no. 2, p. 025101, 2001.
  * [20] G. K. Zipf, “The p 1 p 2/d hypothesis: on the intercity movement of persons,” _American Sociological Review_ , vol. 11, no. 6, pp. 677–686, 1946.
  * [21] M. Lenormand, A. Bassolas, and J. J. Ramasco, “Systematic comparison of trip distribution laws and models,” _Journal of Transport Geography_ , vol. 51, pp. 158–169, 2016.
  * [22] P. Kaluza, A. Kölzsch, M. T. Gastner, and B. Blasius, “The complex network of global cargo ship movements,” _Journal of the Royal Society Interface_ , vol. 7, no. 48, pp. 1093–1103, 2010.
  * [23] R. Axelrod, _The Complexity of Cooperation: Agent-Based Models of Competition and Collaboration: Agent-Based Models of Competition and Collaboration_. Princeton University Press, 1997.
  * [24] K. Klemm, V. M. Eguíluz, R. Toral, and M. San Miguel, “Nonequilibrium transitions in complex networks: A model of social interaction,” _Physical Review E_ , vol. 67, no. 2, p. 026120, 2003.
  * [25] A. J. Morales, J. Borondo, J. C. Losada, and R. M. Benito, “Efficiency of human activity on information spreading on Twitter,” _Social Networks_ , vol. 39, pp. 1–11, 2014.
  * [26] J. Borondo, A. J. Morales, R. M. Benito, and J. C. Losada, “Multiple leaders on a multilayer social media,” _Chaos, Solitons & Fractals_, vol. 72, pp. 90–98, 2015.
  * [27] https://en.wikipedia.org/wiki/List_of_2020_Summer_Olympics_medal_winners.