To simulate the proposed model and evaluate its efficiency, an environment is developed under Python language. This implementation is based on the networkx library. This section presents algorithms and principal simulation results.
a. Algorithms and python code
The social network is represented by a graph \(G(U,V)\) where \(U\) is a set of network users and \(V\) represents users relationships of the network. This graph is generated randomly, which is the result of the following Python code:
G = nx.gnm_random_graph(nb_nodes, nb_edges)
Next, users and posts features and users adopting each post at different levels are generated by the following Python code:
add_features_nodes("features_file_name")
data_generation(10, deep_netx)
graph_adopts_generation(deep_netx)
Then, posts trusties are calculated as follows:
posts_prob_level_i("proba_all_levels.txt", deep_netx)
Post trustiest
G(U,V) the social network;
Posts: posts diffused over G;
For post in Posts:
#according to post features and user profile
Initialize_trustes(post)
Update_Trustees_Post (post, G_post, level_i);
#where G_post is the subgraph of G infected by post
b. Network initialization
To evaluate the efficiency of the proposed model, a social network is generated. Here, a set of features is assigned to each user, which describes user specialization. Value of each feature is in range [0, 1], which can easily represents probability notion.
Figure 2 shows a graph \(G(10, 30)\) that simulates a social network of 10 users and 30 relationships. This network is generated randomly by the developed simulator, where users are numbered from 0 to 9 as well as for each user, their features as a percentage in the interval [0, 1].
Figure 3 represents another example of a social network to evaluate the proposed model using the power of user links. In this graph, consisting of 5 users and 8 relationships, the connections between users are labeled with a value ranging from 0 to 1. This value represents the strength of the link between the two users involved in such a relationship. For example, the relationship between the user at node 0 and the one at node 4 is very weak, whereas a very significant relationship can be observed between the same user and the one at node 3.
The histogram of Fig. 4 shows the influence of the user’s profile on the validity factor of the diffused post at level 0 (when the same post is broadcasted by different users of the network).
These results illustrate how the validity indicator varies depending on the characteristics of the disseminated information and the expertise of the author. At the moment of dissemination, these findings reveal that User 2 specializes in the subject matter of the information being shared, where the system assigns a validation probability of 0.51. In contrast, if User 3 disseminates the information, the system assigns a validation probability of 0.16.
Table 1 contains a social capital of 5 posts diffused by users of the generated network and the features of same post.
Table 1
Post’s ID, features and trusties at level 0
Post_ID
|
User_ID
|
F0
|
F1
|
F2
|
F3
|
Trust_level_0
|
0
|
2
|
0.7
|
0.9
|
0.2
|
1
|
0.51
|
1
|
0
|
0.7
|
0.9
|
0.2
|
1
|
0.45
|
2
|
3
|
0.7
|
0.9
|
0.2
|
1
|
0.16
|
3
|
1
|
0.7
|
0.9
|
0.2
|
1
|
0.188
|
4
|
4
|
0.7
|
0.9
|
0.2
|
1
|
0.335
|
This table shows the probability of validation, at the time of broadcasting, for 5 pieces of information with the same characteristics on the social network. For example, information 1, with the characteristics (0.7, 0.9, 0.2, 1), if broadcasted by user 0, will have a validity probability of 0.45.
c. Trusties supervision of posts over the network
Trusties’ supervision under the developed environment consists of displaying how indicator post’s evolves over the time for each post.
Example G(20,50):
To generate this graph (Fig. 5), this python code is executed:
G = nx.gnm_random_graph(nb_nodes = 20, nb_edges = 50)
Over the network of Fig. 5, Table 2 shows the evolution of the probability of validity of each post, according to the level of its propagation in the social network.
Table 2
Posts trusties at each level
|
deep0
|
deep1
|
deep2
|
deep3
|
post1
|
0.202
|
0.2083125
|
0.2175
|
0.237928571
|
post2
|
0.541
|
0.3803125
|
0.316944444
|
0.298871622
|
post3
|
0.40225
|
0.379166667
|
0.3476625
|
0.337692308
|
post4
|
0.466
|
0.416875
|
0.387096154
|
0.381377778
|
post5
|
0.209
|
0.206975
|
0.207607143
|
0.209595745
|
post6
|
0.10975
|
0.190958333
|
0.233590909
|
0.239518293
|
post7
|
0.115
|
0.09705
|
0.109592105
|
0.117756579
|
post8
|
0.12625
|
0.12375
|
0.112208333
|
0.104952703
|
post9
|
0.09675
|
0.25734375
|
0.279407407
|
0.283244565
|
post10
|
0.1035
|
0.233708333
|
0.268180556
|
0.287695946
|
The graph of Fig. 5 clearly shows the evolution of this probability according to the spread of the posts in the social media. For example, post2 has a behavior of suspicious fake news broadcasted by a user who specializes in this news field, where its truth indicator quickly decreases, where its truth indicator quickly decreases.
On the other hand, post10 behaves like a real post, broadcasted by a user who is not specialized in the content of this post. However, its probability (0.1035) at deep0 was visibly low, then it more than doubled at the next level (deep1), and continued to increase for the subsequent levels (deep2 and deep3). This can be justified by positive reactions of users at different levels (deep1, deep2, and deep3).
The graph of Fig. 7 is another representation of the evolution of the post’s trusty’s indicator. In this graph, it can be noticed that post1, post5, post7 and post8 have certain stability over the social network. This allows to deduce that these posts can be trusted.
Indicators of trusty for certain posts such as post1, post6, post9, and post10, continue to increase as they spread further through the social network. This increase signifies positive backing from participants within the social network for these posts, consequently classifying them as genuine.
On the other hand, trusties’ factor for posts post2, post3, post4, and post8 continues to decrease as they propagate through the network. This indicates the adverse responses from social media users during the dissemination of these posts through the social network.