Optimization of Bots position on Twitter for maximizing spread news
By: Vittorio Maggio
Tags: Artificial Intelligence, Autonomous Agent, Propaganda, Twiter, Analytics

Authors: Lidia Alecci, Andrea Guzzo, Vittorio Maggio, Manuel Zanaboni

Social Media has changed the way we consume news; a 2018 report from the Pew Internet Research Center has shown that 64% of the Italian population uses social media to get news and 81% use it to get opinions and reviews about brands or services. Another study shows how nearly 64.5% of Americans receive breaking news from Facebook, Twitter, YouTube, Snapchat, and Instagram instead of traditional media. To follow this trend, politics, brand, and companies have changed their modality to communicate and to spread information. In this scenario, a key role is assumed by bots that have the goal to maximize the spread of a post on social media.

We define a Bot as a node in a social graph that is an automatic or nonautomatic system that relaunches news to expose the higher possible number of nodes (users) of the graph at the news.

In this article, we will introduce a multi-agent-based method to find the best position of the bots in a social network graph for maximizing the number of users exposed to the news.

The graph

In order to try the efficiency of bots in spread news, we have to implement a simulation system that simulates the spread of news in a graph. Therefore, the first step is to obtain a social graph.

We have chosen the social graph of Twitter of the account of the president of the Italian council Giuseppe Conte (@GiuseppeConteIT), at the time of the study, it has 752,814 followers. Considering the totality of followers was computationally too expensive, so we have considered 4 graphs based on incremental fractions of the followers:

500 followers and 2 depth levels, for a total of 38.485 users;

and 2 depth levels, for a total of 38.485 users; 1000 followers and 2 depth levels, for a total of 105.774 users;

and 2 depth levels, for a total of 105.774 users; 1500 followers and 2 depth levels, for a total of 127.700 users;

and 2 depth levels, for a total of 127.700 users; 2000 followers and 2 depth levels, for a total of 215.910 users.

In order to download the followers, we have used a scraping tool, because the Twitter APIs were too limited in terms of requests per unit of time. The scraper that we have used is Twint.

We have also carried out a preliminary analysis to verify that the graphs obtained respected the property of scale invariance. The following table shows the number of nodes compared to the amplitude of the neighborhood (i.e. with how many neighbors a user is related to). As you can see, most nodes do not count more than 5 neighbors.

As further analysis are presented below graphic representations, scaled to display relevant data, which relate the number of nodes to the number of relationships, resulting in a negative exponential curve.

Multi-agent system

In order to simulate the spread of the news in the graph, we have used a multi-agent system. In particular, our simulations are based on SOIL that is an agent-based social simulator for social networks. The operating logic of SOIL is divided into two main components: the definition of the agents and the configuration of the simulations.

Agents: the description of an agent, is done by defining a class dedicated to implementing the agent’s behavior;

the description of an agent, is done by defining a class dedicated to implementing the agent’s behavior; Simulations configurations: includes various aspects of the simulation as number and type of agents, the topology of the net, name of the simulation, parameters of the environment, etc…

The following figure shows the schematized structure of SOIL operation:

Agents

We have defined three types of agents:

Opinion Leader : is the agent from which the diffusion of the news starts. In our case is the node of the president of the council;

: is the agent from which the diffusion of the news starts. In our case is the node of the president of the council; Bot : are the agents interested in expanding a news item by publishing content related to it;

: are the agents interested in expanding a news item by publishing content related to it; User: represent common users.

To model the spread of the news we have based our work on the epidemic model SEI (susceptible, exposed, infected) that we have adapted as follows:

Not exposed (or susceptible): the agent has not in any way come into contact with the news;

(or susceptible): the agent has not in any way come into contact with the news; Exposed : the agent has come into contact with the news but has not yet taken any action;

: the agent has come into contact with the news but has not yet taken any action; Infected: the user has not only been exposed but has also shown his interest in the news by performing an action (post, retweet, comment, etc...), making himself a potential source of exposure to other users.

The agents ‘Opinion leader’ and ‘Bot’ are in the infected state from the beginning of the simulation: they are the agents from which start the propagation of the news in the graph.

The agents ‘User’ initially are in the state ‘not exposed’, they can be exposed by infected agents (opinion leader, bot, or other users) and they could become infected based on a certain probability.

Assumptions

To establish the probability of exposure and infection we have made some assumptions:

The Opinion Leader has a greater influence on the network than the Bots;

Bots have a more scattered (wide) influence within the network;

The probability of infection between users is low;

The probability that the user takes an action (retweet, comment, etc…) after coming into contact with the news is low;

The probability of going from exposed to infected increases if many users in the neighborhood have also taken action with respect to the news.

Simulation Configuration

In terms of time, our simulation performs 4 steps: how much a step corresponds depends on the different areas of application but we have kept a low number of steps to avoid saturation, and therefore the validity of the proposed model.

For each graph size, we have performed three different simulations changing the position of the bots within the network. This in order to be able to compare the spread of the news as the position of the bots changes and to be able to determine which is the most effective configuration.

Bots positions

To establish the positioning of bots in the graph, we have considered three different measures of centrality, based on:

In-degree : is the number of incoming arcs of a node, it measures how much a user is followed.

: is the number of incoming arcs of a node, it measures how much a user is followed. Betweenness : is the number of times that a node acts as a bridge along the shortest path between 2 nodes, on a social network corresponds to the presence of a user on the communication paths between other users.

: is the number of times that a node acts as a bridge along the shortest path between 2 nodes, on a social network corresponds to the presence of a user on the communication paths between other users. Eigenvector: measures the importance of a node, a node is considered as such if pointed by other important nodes.

After calculating the centrality measurements we selected for each measurement the 10 nodes with the highest values. We notice that in our graphs the first 10 nodes with the highest In-degree correspond to the first 10 nodes with the highest Betweenness, so only one simulation was performed for both measurements.

For every graph, it has been moreover carried out a simulation positioning the 10 bots in a random way in order to be able to estimate eventual differences.

Simulations results

In this section are reported the results obtained by performing the different simulations. In particular, for each case study (Random, Betweenness, Eigenvector) are reported statistics related to the spread of information, providing an overview of the distribution of users not exposed, exposed and infected, and their respective types of infection (contagion from opinion leader, bot or user).

Bots position: Random

Graph: 500

Graph: 1000

Graph: 1500

Graph: 2000

The random selection of the position of the Bot has not carried some contribution regarding the propagation of the information because at the end of the simulation the percentage of not exposed users turns out significantly greater regarding that one of the exposed or infected users. These same results have been obtained independently from the variation of the topology of the graph considered.

Bots position: Betweenness

Graph: 500

Graph: 1000

Graph: 1500

The excessive computational complexity required in the Betweenness calculation has not allowed us to perform simulations on the graph of the 2000 followers.

The results of the simulations carried out considering the Betweenness as a measure of centrality for the choice of the position of the Bots show that this selective logic has a great influence on the propagation of information within the network. The Bots themselves have resulted as a major cause of exposure with a consequent increase in the percentage of infected and exposed users making this amount significantly greater than that of the not exposed users. These results are observable with any considered graph size.

Bots position: Eigenvector

Graph: 500

Graph: 1000

Graph: 1500

Graph: 2000

Selecting the Bots according to the centrality based on eigenvector we have unexpectedly similar results to those obtained by selecting the Bots randomly, contributing in such a way that minimum to the diffusion of the news inside the graph. As in the previous simulations referred to the random selection, the percentage of not exposed users is higher than the percentage of the

exposed or infected users.

Also in this case, the different topology of the graph has not influenced the results of the simulations.

Conclusion

Mean of not exposed, exposed, and infected users

As shown by the results obtained, the strategic positioning of bots within the network is fundamental to maximize the spread of news within it.

In particular, we have seen how in our network the best metrics tested, according to which positioning the bots, was the centrality based on Betweenness. In this case, the percentage of exposed and infected users to the end of the simulation is greater than the percentage of not-exposed users.

Positioning bots randomly or according to eigenvector centrality has contributed only minimally to the spread of the news. In fact in both cases, to the end of the simulation, the percentage of not exposed users exceeds that one of the exposed and infected users.

With regard to the different topology and size of the 4 graphs considered, the results showed that there are no significant differences with regard to diffusion. In fact, considering and comparing the results related to the equal selection logic of the Bots, it can be noted that the differences in propagation in percentage are minimal.

Validating the model is a very difficult task given the limitations of a scraper and therefore the excessive cost (in terms of computational and time) of finding real data on all the users involved.

Web App

In order to simplify the execution of all the phases of the simulations, we have developed a web app based on Streamlit. Functionality:

Download data from Twitter;

Graph Creation;

Bot positioning and SOIL simulation;

Visualization of graph evolution during steps;

News spread statistics.

Future developments

Future developments that can be made are many, here are some:

Expand user modeling with areas of interest, behavior, post frequency, etc…

with areas of interest, behavior, post frequency, etc… Characterization of news content with topic of the news, time of publication, etc…

content with topic of the news, time of publication, etc… Test other algorithms for Bots positioning.

Application ideas

Having found the best positioning for the Bots, a first idea of application in a real case is to try to place the accounts in the best possible position in the graph, but this could be very complex. Other ideas can be: identify the users already in the best positions and contact them to ask for sponsorship or create groups with them to discuss the topics you want to propagate to lead them to create related content.