(B) Figure 1 : Study design. (A) We study Twitter accounts that posted at least one COVID-19-related tweet that received at least 10 retweets + likes during the week of 6-12 May 2020 (account sampling period, shaded gray). We create a sample of these accounts, categorize them into 13 categories (cf. legend), and collect their entire Twitter timelines from 1 January to 31 May 2020. The first 14 days serve as a baseline period (shaded green), and the remaining 4.5 months, as the study period. Inverse probability weighting (see SI 1.3) is used throughout all analyses to make the sample representative. Lines in (A) represent the percentage of tweets related to COVID-19 per category for the sampled accounts (7-day moving averages; giving every account equal weight). Starting March 2020, a substantial fraction of tweets refers to the pandemic. (B) Distribution over categories among all accounts in the account sampling period, estimated from the manually categorized, representative sample.
Based on the first full week of the COVID-19 stream (6-12 May 2020; "account sampling period" in Fig.  1A ), we constructed a sample of 14, 200 Twitter accounts that each had posted at least one COVID-19-related tweet with at least 10 retweets or likes (henceforth, "engagements"), and annotated each account in the sample with its category using crowdsourcing (SI 1.2.3). The sample was constructed to be representative of the overall population (SI 1.2.1). The distribution over account categories is plotted in Fig. 1B . We then queried Twitter's application programming interface (API) to collect all tweets-regardless of whether they contained a COVID-19 keyword-for the 14,200 sampled accounts during the 5-month period from 1 January to 31 May 2020. The first 2 weeks were used as a "baseline period" to calibrate accounts' behavior, which was tracked during the following 4.5 months ("study period" in Fig. 1A ).
First, in Fig. 1A , we track the fraction of tweets containing a COVID-19 keyword, macro-averaged over all accounts per category. Whereas all categories posted very small fractions (0%-2.5%) of COVID-19-related content during the baseline period in early January 2020, the topic became more prevalent in late January and peaked between mid March and early April, when up to 1 in 5 tweets contained a COVID-19 keyword for some categories, with the highest peaks observed for categories of direct relevance for the pandemic: Government & Politics (peak 21%), NGOs (19%), News Media (18%), Public Services (17%), and Healthcare (17%). Less directly relevant categories also referred to COVID-19 in considerable fractions of their posts, e.g., Religion (12%), Sports (11%), and Arts & Entertainment (10%). This first result highlights the deep impact the COVID-19 pandemic has had on the Twitter ecosystem.
Next, we investigate whether the studied accounts have changed their overall tweeting frequency during the COVID-19 pandemic. This analysis considers all tweets posted by the studied accounts, regardless of whether they contain a COVID-19 keyword or not. We calibrated an account's tweet volume during the baseline period and computed, for each subsequent week, the percentage change over the baseline (SI 1.1). The results, visualized as blue curves in Fig. 2 , show that tweet volume increased considerably for all categories, compared to the pre-pandemic baseline. The most notable cases are Religion, which peaked at +207%, and Healthcare, at +175%. Even the least affected categories showed a strong increase, with News Media peaking at +63%, and Arts & Entertainment, at +73%. Weekly percentage increase over the early-January baseline (cf. Fig. 1A ) with respect to the number of tweets posted (blue) and engagements (retweets + likes) received (red) (macro-averages over accounts; estimated from the representative sample of accounts, cf. Fig. 1A ; with 95% confidence intervals). In all categories, tweet volumes (blue) rise far above baseline, particularly starting mid March 2020, when lockdowns are imposed worldwide. Engagement (red) behaves more heterogeneously, rising more for categories of particular structural importance to the pandemic (related to health, science, government, politics In order to determine to what extent the increase in tweeting is associated with an increase in being noticed, we also measured the engagement (retweets + likes) received by each account, again calibrated against the pre-pandemic baseline. The results, visualized as red curves in Fig. 2 , show that engagement volume behaved more heterogeneously than tweet volume. Some categories saw substantial increases in engagement-much larger than the respective increases in tweet volume (red above blue in Fig. 2 ). In particular, for Government & Politics, the increase in engagement peaked at +402%, whereas the increase in tweet volume peaked at only +102%. Similar effects were observed for Healthcare (+319% vs. +175%), Science (+281% vs. +89%), and Political Supporters (+359% vs. +76%). Accounts in these categories thus became, on average, more "effective" at tweeting, with a higher number of engagements per tweet than at baseline. Conversely, for other categories, engagement per tweet decreased with the pandemic (red below blue in Fig. 2 ). Most notably, Religion saw little increase in engagement (peak +49%), despite having increased its tweet volume most out of all the categories (peak +207%). Similar effects were observed for Sports (+55% vs. 119%) and Adult content (+2% vs. +86%). It is noteworthy that, among the "effective" categories, two distinct patterns emerge: on the one hand, for Healthcare and Science, the blue curve in Fig. 2 To directly compare categories to each other, we computed two global rankings of accounts (both computed 1-4 June 2020, when account timelines were collected), one with respect to engagement counts, the other with respect to follower counts. Average ranks (normalized such that 1 and 0 correspond to top and bottom, respectively) are plotted for all categories in Fig. 3 . We will discuss the follower-count ranking (x-axis) later, and for now focus on the engagement ranking (y-axis). Average engagement ranks were significantly (p < 0.05, two-sided KS tests) higher for tweets from the study period (end points of arrows) than for tweets from the baseline period (starting points of arrows) for Healthcare, Science, Government & Politics, Political Supporters, Public Services, and News Media, whereas the effect was reversed for Religion, Sports, Adult content, and Business. While these results echo the findings from Fig. 2 , they also add nuance: as all accounts participated in the rank computations, Fig. 3 may be considered a "zero-sum game", in the sense that one account's increase must be offset by another account's decrease. Viewed in this light, Fig. 3 suggests that Healthcare, Science, Government & Politics, etc., have gained attention relative to Religion, Sports, and Adult content.
Follower counts on Twitter vary widely across accounts (18) . The intuitive expectation that a larger follower count is associated with more engagement is overall confirmed by Fig. 3 , with a category-level Spearman rank correlation of 0.71 (p = 0.0067, t(11) = 3.33) in the baseline period, and 0.62 (p = 0.024, t(11) = 2.62) in the study period. Some important exceptions, however, emerge: Healthcare accounts on average rank lowest with respect to follower count during the study period (12 out of 12 when ignoring the "Other" category), but rank in the upper half (6 out of 12) with respect to engagement. The opposite effect is observed for Sports, Arts & Entertainment, and Adult content, which are in the top half with respect to follower count, but in the bottom half with respect to engagement. These findings suggest that the increased attention to categories that are most directly important in the fight against the pandemic is not merely a consequence of the size of their follower base.
In conclusion, our work shows that Twitter accounts associated with structurally important roles are "boosted" during the pandemic. While accounts in all categories on average increased their tweet volume, accounts related to Science, Healthcare, and Government & Politics saw the largest boosts in engagement. Despite the overall surge in produced content, which could be symptomatic of an infodemic, our findings imply that users selectively promote information from structurally relevant sources during the crisis. The ways in which accounts from different structurally important categories are boosted seem to differ. As the crisis is shifting from a health crisis to a societal crisis, accounts related to healthcare and science receive progressively less attention, whereas attention to governments and politicians remains high. A caveat to our analysis is that it is based on self-declared account descriptions on Twitter and does not take into account the content of messages. This is an important direction for future work, since within categories, the quality of specific messages and the alignment with the scientific consensus could vary. Ultimately, while concerns about the spread of misinformation and the associated fears of an "infodemic" deserve our continued attention, we show that, to date, Twitter users have disproportionately paid attention to experts and authorities in the COVID-19 crisis. Figure 3 : Rank-based comparison of account categories. The y-axis shows normalized ranks with respect to the number of engagements (retweets + likes) received for tweets posted during the baseline period (arrow starting points) and for tweets posted during the study period (arrow end points), averaged over the accounts in the respective category. The x-axis shows ranks with respect to follower counts (as observed after the end of the study period, 1-4 June 2020). Ranks were normalized such that 1 and 0 correspond to top and bottom, respectively. Disk radius is proportional to the number of tweets posted by the category in the study period. Categories of particular structural importance to the pandemic (related to health, science, government, politics, news) have risen (upward arrows), whereas Religion, Sports, and Adult have fallen (downward arrows). Healthcare, Government & Politics, Public Services, and NGOs are particularly much engaged-with, relative to their follower counts (position above diagonal).
Fig. S 4 presents a diagram with all the original and derived data sources used. We employ Twitter's complete COVID-19 streaming endpoint, 1 which was made available to researchers upon request (Dataset A). The endpoint includes all tweets containing one of several multilingual keywords -curated by Twitter -related to COVID-19, as well as all retweets and replies to those tweets. 2 We focus on COVID-19 tweets posted during the week from May 6th to May 12th, 2020, written in ten major languages: English, Japanese, Spanish, Portuguese, French, German, Italian, Arabic, Indonesian and Hindi. The language of a tweet is detected by Twitter and obtained directly from the tweets object. We limit our analysis to accounts that tweeted at least one popular COVID tweet during the week of sampling (a tweet that received at least 10 retweets). We then perform sampling and annotation according to our taxonomy, to produce Dataset B: the annotated sample.
Next, we get the timelines for all such accounts in the collected sample, collecting all the tweets they posted in 2020, and we study all of their tweets posted between Jan 1st and May 31st, 2020 (Dataset C). To do so, we employ Twitter's API 3 (for accounts with less than 3200 tweets between 01/01/2020 and 31/05/2020), and Twint 4 , a crawler that uses a Web UI for scraping (for accounts with more than 3200 in this time frame).
Additionally, we leverage the annotated sample to train a machine learning classifier which is used to expand the labels by classifying the remaining accounts in the entire week for the COVID-19 stream, to produce Dataset D.
Overall, we start our analysis from 467.36k tweets that received at least 10 retweets, posted during the seven account sampling period days in May, by 196.95k unique accounts (Dataset A). After sampling (Dataset B) and enriching the timelines, our the dataset C consists of 11.47M tweets (736.73k out which contain a COVID-19 keyword, using the list of COVID-19 keywords curated by Twitter).
In our analyses, we calibrate an account's tweet volume and engagement during the baseline period and compute, for each subsequent week, the percentage change over the baseline. To account for the possibility that some days of the week (Monday, Tuesday, etc.) might generally see higher tweet volumes, calibration is done by the day of the week, for the day level analyses.
To better understand the attention patterns on Twitter amidst the COVID-19 crisis, we develop a taxonomy of account categories and then proceed to annotate tens of thousands of accounts using Amazon Mechanical Turk. We devise our taxonomy based on techniques from grounded theory, building a robust categorization scheme of Twitter accounts who participate in COVID-19 discussions. In what follows, we describe: 1) how the account sampling was done (subsection 1.2.1); 2) how the taxonomy was developed (subsection 1.2.2); 3) how we annotated 14,200 accounts using crowdsourcing (subsection 1.2.3).
For both iterative development of taxonomy and crowdsourced annotation, we first select a subsample of the accounts who posted at least one 10-retweets or more tweet about COVID-19 between the 6th and the 12th of May and who tweeted in one of the 10 most popular languages in the sample: English, Japanese, Spanish, Portuguese, Italian, Arabic, German and French, Hindi and Indonesian (Table S 3). 1. First, we restrict ourselves to studying only those accounts which posted at least one popular tweet in the 7 days. A tweet is popular if it has received at least 10 retweets. This requirement ensures that sampled accounts received a non-negligible amount of attention. Such accounts comprise 1.96% of all accounts, 1.73% of all tweets, and 84.05% of all retweets, in the COVID-19 stream during the account sampling period.
2. Second, for each language (Table S 3), we calculate quintiles for the number of followers and number of retweets. By doing so, for each language, we have split accounts into 25 "buckets" where each bucket corresponds to a different combination of quintiles for the number of followers and of retweets.
3. Third, we sampled the same number of accounts from each bucket. We sample accounts across languages proportional to the log of the number of tweets in that language, so that accounts tweeting in bigger languages are not over-represented.
4. Lastly, we translated all account metadata from accounts that were not tweeting in English into English using Google's translation API.
Overall, tweets that got at least 10 retweets obtain 84.05% of all retweets on COVID tweets, so in this way, we capture the majority of the engagement COVID tweets receive in total.
Next, we explain the steps taken to develop the taxonomy.
Stage 1: Building the initial taxonomy. Before inspecting the data, the authors discussed broad relevant categories of individuals and entities likely to play a significant role in the COVID-19 online debate. It was determined that categories have to either represent concrete occupations (researcher, medical doctor, and similar) disparately affected or in other ways essential in the context of the pandemic; or, groups of individuals or institutions that shape public discourse. Also, categories had to be significantly represented in the data. However, this was only considered at the end of each iteration, when considering which labels to incorporate to the taxonomy.
Stage 2: Initial inspection. Three researchers (all authors of the paper) independently explored three different random samples of account descriptions in English, consisting of a hundred accounts each. This was done to build a common understanding of the type of descriptions prevalent in the data. We defer explaining how the samples were generated to Subsection 1.2.3. For each account, researchers assessed the information about how the account presents itself: the description of the account, Twitter handle, and name. Researchers carefully analyzed the account descriptions considering the categories and wrote notes about the applicability of categories. After that, researchers shared their observations, discussed the initial categories, and adapted them.
Stage 3: Iterative Coding. Iterative coding was done as follows. In each iteration, three researchers (all authors of this paper) annotated the same set of 100 accounts, with the possibility of expanding the category set. Each account was to be assigned any number of categories, which were determined based on accounts' self-declaration on Twitter (we did not inspect any other information beyond the description, the account name, and the screen name). At the end of each round, researchers individually discussed all disagreements and the overall appropriateness of the categories. Then, they made changes to the categories when necessary, adding new categories or tweaking the definitions of existing categories. Before starting the iterative coding, the researchers agreed on the criteria for stopping the iterations. All of the following three criteria had to be satisfied: 1) Average pairwise Fleiss Kappa agreement is greater than 0.6; 2) Researchers agree that the categories are not ambiguous;
3) The difference in the prevalence of Other between two subsequent iterations is smaller than 5%.
We repeated this annotation process three times before satisfying all three criteria, the rounds yielded inter-annotator agreements of 0.6, 0.65, and 0.67, respectively. We depict the final taxonomy in Tables S 1 and S 2. Notice that during the analyses in the paper, we collapsed some of the categories together as some were rather sparse, and as their joint interpretation was useful.
Orthogonal to categories, annotators were also asked to identify for each account, whether the account belonged to an individual or an institution. For this annotation, in the iterative coding stage, inter-annotator agreement scores were of 0.63, 0.89, and 0.83, respectively.
We detail the crowdsourcing annotation process, where we annotate 14,200 sampled accounts. This amounts to 7.2% of all accounts adhering to our restrictions, a total of 14,200 accounts out of 196,948. The human intelligence task (HIT) design is shown in Figure S 5. Crowdsourced workers were paid 0.50 USD per HIT, and each HIT consisted of a batch of 10 different account annotation tasks. According to our estimates, it took 2-3 minutes to complete a single HIT, which made the compensation for the task substantially above US federal minimum wage of 7.25 $/h. Annotators had to select the categories from small boxes, each of which contained a description of the category, as well as a couple of explained examples (an account bio, and the reason why it would fit in a given category).
To study the feasibility of the annotation through crowdsourcing we ran a pilot where crowd-workers had to annotate the same tasks as the researchers did in their last iteration (when the categories were already set). We found that the results were satisfactory, majority vote label of crowd workers agreeing with the majority vote category of researchers 82% of the time. For the type of account (individual vs. institution) the agreement was of 91%. Once the feasibility was established, we proceeded to annotate the accounts collecting 3 independent annotations per account. For accounts for whom there was no clear agreement on the category (i.e., there is no single most frequent annotation of type or category attributed by multiple workers), we collected annotation by an additional fourth annotator. In total, we annotate 14,200 accounts belonging to 10 languages. We report the inter-annotator agreement for each language in Table S 4 .
For an account, we determine its dominant category as the most frequent annotation marked by at least two workers. If there are multiple most frequent annotations assigned by multiple workers, we break the tie randomly to choose one dominant (4.65% of accounts). If there is no agreement, i.e., there is no most frequent category annotation given by at least two workers, we don't assign a dominant category annotation (7.26% of accounts).
Finally, we limit our analysis to accounts tweeting in English, Japanese, Spanish, Portuguese, Italian, Arabic, German and French, and discard Hindi and Indonesian, as we spotted lower inter-annotator agreement compared to the other languages (less than 0.2), likely due to poorer automated translation quality.
In all the conducted analysis, we had to extrapolate the distribution of categories we observed in the sampled data to all the accounts. Recall that we divided all the tweets into 25 buckets and sampled, for each language, the same amount of accounts for each bucket. However, the buckets did not have the same amount of accounts each, and thus it may be that we over-represented some of the buckets and under-represented others.
To address this issue, we perform an Inverse Probability Weighting scheme where we calculate the probability of being sampled, ps, at each bucket k as:
and use the inverse value, that is ps −1 k as the weight for all accounts in that bucket. Intuitively, this means that if we proportionally sampled twice from one of the buckets, these accounts will receive half the weight.
Let 1 {cat,acc} be an indicator variable that indicates, for a given account and given category, whether most annotators thought the account belonged to the category. To calculate the probability of a given category for a given language, we simply calculate, for all accounts of that language, the average of the indicator variable 1 {cat,acc} weighted according to the bucket the account was in.
To obtain a confidence interval, we bootstrap this calculation 1000 times. That is, we generate a random sample for each language obtaining k accounts from each bucket (thus simulating the original sampling procedure) and then calculate the category distribution. We repeat it 1000 times to obtain 95% confidence intervals.
This procedure is used to obtain representative weights for Figures 1, 2, and 3 in the main text. We use the same methodology to provide supplementary view on the category and type prevalence across languages in Table S 1: The COVID-19 Twitter accounts taxonomy: category of account. Account category: Please select the category that best describes this account. Use your judgement and choose the one that is the most suitable. In case multiple categories apply, select all that apply.
Media: News Accounts related to media outlets, publishers, TV shows, radio shows, podcasts, and also personal accounts of journalists and other communicators associated with the media outlets. Professionals employed by large media outlets and also accounts associated with those. Media: Scientific News Accounts related to media outlets, publishers, TV shows, radio shows, podcasts, and also and Communication personal accounts of journalists and other communicators associated with the media outlets. Professionals employed by outlets more specific to science communication and also accounts associated with those. Media: Other Media Accounts related to media outlets, publishers, TV shows, radio shows, podcasts, and also personal accounts of journalists and other communicators associated with the media outlets. Individuals and entities broadly related to media, but not with news. For example, podcast hosts or fashion magazines would be in this category. Business
Accounts associated with business such as stores, bars, restaurants, and private services like hair salons or gyms, and individuals associated with businesses. Government and Politics Accounts associated with local or national governments, political parties, and individuals who are closely involved with these institutions.
Accounts associated with public services such as high schools or police departments. NGO Non-governmental political organization, and users who are closely involved with these institutions. Notice that individuals in these categories are likely to be a subset of OPS, so if there is a clear NGO that individuals support, there is no need to also label them as OPS.
Individual accounts associated with political movements.
Accounts associated with notable religious figures and religious leaders/priests as well as religious institutions and entities, tightly associated with these individuals such as temples, congregations, and online sources of religious content. Science: Engineering
Researchers, scientists, professors, graduate students, professionals, or entities representing and Technology or tightly associated with these individuals. Students who are receiving education in a corresponding branch of science (except pre-med, who are categorized as healthcare). Expertise in engineering, computer science or other technology related fields. Science: Life
Researchers, scientists, professors, graduate students, professionals, or entities representing Sciences or tightly associated with these individuals. Students who are receiving education in a corresponding branch of science (except pre-med, who are categorized as healthcare). Expertise in the study of biology, health and environment. Science: Social Researchers, scientists, professors, graduate students, professionals, or entities representing Sciences or tightly associated with these individuals. Students who are receiving education in a corresponding branch of science (except pre-med, who are categorized as healthcare). Expertise in the study of human societies, policies, economics. Science: Other Researchers, scientists, professors, graduate students, professionals, or entities representing Sciences or tightly associated with these individuals. Students who are receiving education in a corresponding branch of science (except pre-med, who are categorized as healthcare). Expertise in other fields. If the field of expertise is unclear, it should also be assigned to this category. Healthcare Professionals that are employed by healthcare institutions, and that directly or indirectly take part in healthcare providing services to patients. Also includes entities representing or tightly associated with these individuals. Includes students of medicine (e.g., premed).
Musicians, actors, plastic artists, writers and entities representing or tightly associated with them. Notice that, similarly to sport, individuals whose hobby is art are not included. If an account belongs to an individual, art is the individual's main occupation. Sports Athletes and entities representing or tightly associated with them, such as clubs, championships or fan accounts. E-sports are also included, so if someone is a professional video-game player, they should also be included. If an account belongs to an individual, sport is the individual's main occupation. People whose hobby is sport are not included, e.g. having "runner" in a bio does not suggest that the individual belongs to the category.
Accounts associated with lewd content. Producer of amateur porn, porn actors or actresses, websites related to porn, and similar.
Users whose description is not written in English. When labelling these please do not specify the type of account, that is tag them as unclear. Other
Please select this category when none of the others apply. 
We provide a set of alternative views on the analysis discussed in Figure 2 . First, in Fig. S 7, we show how the topic of tweets-whether they are COVID-19-related or not-plays a role in determining the degree of engagement they received during the pandemic, with COVID-19-related tweets consistently receiving more engagement for Healthcare, Government & Politics and Political Supporters. We support this analysis with regression modelling, presented in Fig. S 8 and Fig. S 9 .
In Fig. S 10, we provide an alternative view of Fig. 2 , where each week of the Study Period corresponds to a point connected by an arrow with the previous week. In Fig. S 11 , we provide the results for the Other category, which is excluded in the analysis. Similarly, in Fig. 12 , we examine the robustness of our findings by evaluating the impact of users joining the platform during the Studied Period.
Lastly, we provide additional information about a set of supplemental experiments, with the goal of understanding, first, the degree of automated activity within the studied accounts, and second, the between-category interactions that drive the trends in engagement. In order to measure which categories retweet which other categories, we use an automated method for label expansion, detailed below.
To assess the degree of bot activity in our data, we used the tool Botometer 5 . Botometer uses a supervised Machine Learning approach to estimate the so called complete automation probability (CAP), for which a value of 1 indicates complete automation. Botometer extracts features from recent tweets in the account's timeline, such as temporal activity patterns, social networks and sentiment, among others. In this work, we use a CAP threshold of 0.25 in order to decide whether a account is presumed to be a bot. The bot activity data was collected via the Botometer API between July 22 and July 27, 2020. By using the method above on a sample of 5000 accounts in our annotation dataset (dataset A), we find around 3.3% of presumed automated accounts. Bot activity in the annotation dataset was significantly higher for accounts annotated as "other" (4.6% bots) for the category labels and "unclear" (5.3%) in the type of account labeling (that is, when annotators had to classify accounts as belonging to an individual or an institution). Testing was performed using a one-tailed binomial test at significance level α = 0.5 (before Bonferroni correction). Based on these numbers, bots seem to only have a marginal influence on the overall validity of the results which are based on the sampled user accounts (dataset B).
In Fig. S 13 , we looked at all tweets and retweets produced in the week of interest. Recall that here we take advantage of the fact that the data obtained from the stream is complete, that is we are certain to have all the retweets of a given tweet. We deploy an automatic classifier described better in Section 1.3, to automatically label the category of all accounts in the week of interest. Excluded are accounts with user descriptions of less than 3 characters, yielding labels for a total of 39.2M users. With the labels generated by the classifier, we build a retweet digraph G. Each node u in this graph is an account, assigned to a single category (the most likely according to the classifier). Each (u, v) edge in this graph stands for a retweet from account u to account v. That means that an edge only exists if the tweet by account v was retweeted more than 10 times.
Given this graph, we proceeded to explore the number of retweets between categories. This can be thought of as a collapsed graph G where all nodes with the same category are collapsed into one. Looking at this graph we analyze, for each category, where are the sources of the incoming edges.
We also obtain a null model with this graph. This null model assumes that each category is equally likely to connect to any other category. Thus, suppose we want to calculate the percentage of incoming edges from category X to category Y . Let Out(X) be the number of outgoing edges from category X and In(Y ) be the number of incoming edges from category Y . Also, let B be the total number of edges in the graph. Notice that In(Y )/B is the fraction of all edges that are incoming edges towards Y . If the assignment of edges from category X is really independent of other categories, we would expect Out(X) In(Y ) B edges between X and Y . This what we consider to be our category-agnostic random null model.
Lastly, to obtain confidence intervals over this analysis we bootstrap the whole process, we choose a random sample of the edges in the original graph G to "collapse" generating the category-graph G . We repeat this procedure 1000 times, and obtain confidence intervals for the expected value and the observed value for each category.
In Fig. S 13 , we used label expansion, a method in which a Machine Learning classifier is trained on the subset of annotated data to predict the labels for the full data set. The account descriptions consist of unstructured text, including frequent use of emojis, and special Unicode characters. Furthermore, the entire COVID-19 Twitter stream data is multilingual, covering 41 languages from very diverse language families. Given this complexity, two major approaches were tried using the FastText library 6 and models based on the BERT family (Bidirectional Encoder Representations from Transformers) 7 .
BERT is a general-purpose language understanding model which can be used, among other applications, for text classification. BERT models are pretrained on large bodies of plain text (e.g. from Wikipedia) in an unsupervised way. Pretrained models can then be used in a supervised downstream task, such as text classification, in a process called finetuning.
In this work, we started with the pretrained multilingual cased BERT model (bert-multilang), a BERT model which was simultaneously pretrained on the Wikipedia corpora of 104 languages. However, our target domain (Twitter account descriptions) is very different from text found in Wikipedia. Therefore, an additional step of unsupervised pretraining, also called domain-specific pretraining, was conducted on our existing corpus of account descriptions. account descriptions from dataset A of at least 3 characters length, which were not contained in the annotation dataset (dataset B), were combined into a dataset of 52M account descriptions, comprising of a total of 697M tokens. The data was preprocessed by replacing account names, URLs, and email addresses with generic fillers. Furthermore, emojis were replaced by textual versions (e.g. the American flag emoji would be replaced by :flag-us:), using the Python emoji library 8 . From this dataset 593M training examples were generated. Training was run for roughly 1 epoch (600k steps) at a batch size of 1024 and a constant learning rate of 2e-5. Training took roughly 2 days on a TPU v3-8 (8 cores, 128 GB of memory), and resulted in a new model, which we refer to as bert-multilang-pt.
A similar procedure was applied for a English-only model, in which pretraining was conducted with account descriptions in English (251M training examples, 21M account descriptions), and pretraining was started from the English BERT-large uncased (whole word masking) variant (bert-english). Training for this variant was conducted with the same batch size and learning rate, but for roughly 2 epochs (roughly 5 days of training). We will refer to this variant as bert-english-pt.
FastText is a lightweight library for text classification and representation learning. It is a shallow model that uses subword information to enrich word vectors. Similar to BERT, it is possible to fine-tune pretrained word representations for text classification purposes. In contrast to BERT, which heavily relies on training on GPUs, it can be trained on a large dataset using multicore CPUs in a matter of minutes. Also, FastText models are much more compact than BERT (in our case, 125 MB vs 700 MB).
For FastText models, we only used account descriptions in English language. Preprocessing was conducted by normalizing texts, replacing accoun tnames, URLs and emails and removing emojis. We then pretrained a FastText skipgram model for 5 epochs, with a learning rate of 0.1, context window size of 5, and n-gram size between 3 and 6. We will refer to the pretrained FastText model as fasttext-english-pt .
Eventually all pretrained models were finetuned on the type (3 classes) and category (13 classes) tasks. The annotation data was deduplicated (accounts may have identical descriptions), and preprocessed in the same way the the pretraining data was prepared for the respective model type. The preprocessed annotation data (100%, n category = 9913, n type = 10725) was split into a training (64%), development (16%), and test set (20%) for both type and category, respectively. Multilingual models were fine-tuned on the original training data, whereas English models were fine-tuned on the translated versions of the account descriptions. Model selection was performed by optimizing the respective F1-macro score on the development set.
BERT-like models were fine-tuned in 10 epochs, using a learning rate of 1e-5 (using 10% warm-up with linear decay) and training batch sizes of 32.
FastText models were fine-tuned using built-in hyperparameter autotuning available for supervised training with a vector dimension of 100.
Based on the pretrained models described above, we compare downstream classifier performance scores in Fig. S 16. Unexpectedly, BERT models trained on English-only data outperform the multilingual BERT model. Generally, we also see a performance boost due to domain-specific pretraining. The best English-only model (bert-english-pt) gives a F1-macro score of 0.71 and 0.62, on the category and type datasets, respectively. The smaller FastText models (fasttext-english-pt) perform comparably to other models on the type dataset but give slightly lower scores on the category dataset. The best multilingual model (bert-multilang-pt) yields F1-macro scores of 0.56 (category) and 0.63 (type).
For further analysis we focus on the multilingual BERT model (bert-multilang-pt), which was the final model used for label expansion in this work. When inspecting the confusion matrices ( Fig. S 14 and Fig. S 15) , classifier scores for this model are generally satisfying. Certain classes for which only very few observations are present show lower scores in comparison. In particular, this is concerning the classes "Religion" and "Public Services" (for category) and "Unclear" (for type). The smallest error rates can be expected for the classes "Healthcare", "News Media", and "Government and Politics". No significant deviations from the mean accuracy could be observed for individual languages. Testing was performed using a two-sided binomial test at significance level α = 0.5 (before Bonferroni correction). . We compare this value to a category agnostic null model that assumes each category receives engagement at random, proportionally to their size. The figure shows arrows that start from the expected value, according to the null model, and end at the observed value. Where differences are not significant (p>0.05), arrow ends are replaced by gray circles. The Other category, while being numerically larger, is a net retweeter of the remaining categories and gets retweeted less frequently than expected. We also observe a strong homophily: all categories retweet significantly (p < 0.05) more tweets from their own category than predicted by the null model. The one exception are Political Supporters retweeting Science more than Science retweeting itself. Confusion matrix on the held out test set for the multilingual BERT category classifier (fine-tuned version of bert-multilang-pt). The y-axis represents the true label (as per annotation data) and the x-axis represents the label predicted by the classifier. Confusion matrix on the left shows absolute counts, whereas on the right normalized counts are shown. Most errors were made by predicting a account description as "other" (which was the most frequent category). The weakest categories are "religion" (often predicted as "other"), and "public_services" (often predicted as "politics"). These categories also have had few training and test examples. Confusion matrix on the held out test set for the BERT type classifier (fine-tuned version of bert-multilang-pt). The y-axis represents the true label (as per annotation data) and the x-axis represents the label predicted by the classifier. Confusion matrix on the left shows absolute counts, whereas on the left normalized counts are shown. Predictions for "individual" and "institution" are very accurate. "Unclear" represents a relatively small class, therefore leading to a higher relative error. Overall, best results are achieved for English-only models. Models which underwent domain-specific pretraining, as indicated by the "pt" suffix, generally outperform the default pretrained models. The model used for the analysis is bert-multilang-pt.