1. Introduction
Trust, a complex social phenomenon, is one of the basic components of social interactions. If users readily accept information from a source, this indicates trust in that source [
1]. Trust plays a central role in data exchange, which carries unknown risks, for example, from whom information can be accepted, from whom it cannot, or with whom information can be shared [
2]. Therefore, modeling or expressing trust is important in many areas, especially in social network analysis. Trust is the relationship established between a trusting person (or truster) and a trusted person (or trustee), taking into account the direction of the relationship. Trust is subjective, asymmetric, non-transitive, propagative, context-dependent, composable, dynamic, self-reinforcing, and fragile [
3].
Trust in social networks has been studied not only as a structural or probabilistic phenomenon but also as a socio-technical construct. Foundational works in the trust literature conceptualize trust as a multidimensional relationship shaped by ability, integrity, and benevolence [
4], by users’ perceptions in technology-mediated interactions [
5], and by institutional and interpersonal dimensions in online environments [
6]. Incorporating these perspectives shows that our algorithmic approach only addresses one layer of trust: its structural–probabilistic dimension. However, it remains complementary to socio-technical foundations that emphasize cognitive, affective, and contextual factors.
The main objectives are to identify trustworthy entities to share information in social networks, to keep untrustworthy entities away from the network, and to prevent information from being misused [
7]. Trust in social networks arises as a result of social interaction and resource sharing between entities. Entities can decide whether to trust the data they receive and spread it to other entities with a trust measure. The concept of distrust between entities negatively affects the interactions of entities. If social networks can offer sufficient and stable trust, they can provide entities with a well-established platform of collaboration and network expansion, effectively attract entities, and promote the consensus of the social network [
8,
9]. If trust relationships are found, clustering and group decision-making can also be performed in light of these data [
10,
11].
To reveal the trust score (degree of trust) of an entity’s relationship with another entity is the purpose of trust inference in the social network. Generally, this score is derived from the trusted interactions of mutual friends of entities. In addition, common interests, etc., are also used.
Traditional trust detection methods are insufficient for inferring common trust, as they consider each entity as an independent entity. However, in reality, entities are not independent entities but communities connected by social relations such as relationships of trust and distrust [
12]. Many studies [
13,
14,
15] ignore some connections or nodes in the network, leading to incomplete trust assessments. This study addresses these shortcomings by proposing a trust inference approach that utilizes the full graph structure without omitting any relationships and calculates trust levels efficiently using linear algebra-based methods instead of traditional path enumeration techniques.
In the context of a simple undirected graph G, let A denote the adjacency matrix of G. When a process similar to the Markov process is applied to matrix A, the resulting matrix can be treated as a probability transition matrix. The kth power of this matrix represents the trust between node pairs at k distance in G. When the first, second, …, kth powers of the matrix are taken and summed, the trust score between node pairs at max k distance in G is found. Finding the trust scores in this way incurs a high time cost of . In order to eliminate these time costs and obtain secure results without thinning or losing data, the trust calculation between entities has been performed using a low-cost linear algebra method. This is the main source of inspiration and motivation for this study.
While trust in social networks is a multifaceted phenomenon encompassing semantic, contextual, and temporal dimensions, this study focuses specifically on its structural–probabilistic layer. The present algorithm treats trust as a property emerging from the topology of interactions expressed through graph-based and algebraic computations. The proposed method provides a scalable basis for measuring structural trust scores.
2. Related Work
Graph algorithms such as shortest path, maximum flow, and node traversal are frequently used while finding the trust path [
13]. TidalTrust is one of the most typical algorithms for finding the trust ratio between two users in a social network [
14]. The TidalTrust algorithm determines a threshold based on the trust values obtained from the shortest paths between two users and eliminates the paths that it deems unimportant. Although the elimination of most trust paths has accelerated the operation of the algorithm, the accuracy of the trust score found is debatable. Taherian et al. developed the RN-Trust algorithm, which models trust as if it were a resistive network, in determining the trust scores of entities who are not directly connected to the social network [
15]. This algorithm finds trust values with circuit likeness analysis, and while doing this, all paths are taken into account. Mao and his colleagues [
13] use the trust-spreading strategy and weighted subject similarity to find trust paths between two users. While choosing the strong ones among the found trust paths, the decision is based on “small world” theory, and a depth restriction is applied.
The issue of trust in social networks is a widely studied topic, especially in recommendation systems, and it is based on the principle that users generally listen to the recommendations of their trusted friends. An entity gives relatively better and more reliable advice to entities that are closely related to it, compared to entities that have no social relationship with it [
16]. Liu and his colleagues constructed a trust-sensitive recommendation system that combined explicit and implicit trust relationships [
17]. Chen and his colleagues have redeveloped traditional trust spreading strategies such as TrustRank and Appleseed as a system that is sensitive to different issues to provide accurate recommendations in different categories according to users’ preferences [
18]. To find trusted recommendations, Liu et al. applied a spread of trust model to the network, determined the trust relationship between pairs of unknown experts, and obtained subjective and objective weights [
19]. In [
20], a trust-based system using heterogeneous graphs of user–user, user–item, and item–item is presented. TTDNN (trust- and tag-aware deep neural network) is a recommendation system that calculates user similarity using users’ social links and tags [
21]. In addition, a recommendation system that uses trust scores to provide location recommendations to users has been developed, and thus, more accurate and personalized recommendations have been provided to users [
22]. As another example of a recommendation system, KTPGN (knowledge-enhanced trust propagation graph neural network) overcomes the limitations of traditional group recommendation methods by using social trust propagation in recommending groups to users [
23].
In group decision-making (GDM) processes, trust also comes into play when evaluating the opinions of entities/experts in choosing the most appropriate alternative [
24,
25,
26,
27]. Xing et al. model how trust relationships among experts change over time and how these relationships can be fostered through interaction in order to increase consensus in group decision-making processes [
24].
It has been seen that studies that find the trust score produce solutions with approaches such as probability, cloud modeling, machine learning, and fuzzy analysis [
8]. Most of the trust inference algorithms in the social network use the trust values at the edges and the topological information of the network to find the trust scores. These algorithms, which are graph-based, make a restricted traversal and path selection. Finally, the trust scores are found using aggregation strategies. In addition to these, semantic information such as social distance between users is also used when finding the trust score [
13]. Jethava and Rao have studied the prediction of trust using characteristics such as trait similarity of adjacent users, similarity of preferences made by nonadjacent users, and social proximity [
28]. Acharjee and Panicker also showed that trust depends on the size of the network and the interactions between users [
29].
While proposed method focuses on structural–probabilistic trust inference, other approaches in the literature address complementary aspects of trust. For example, overlapping community detection methods based on symmetric nonnegative matrix factorization provide insights into how community structures affect trust propagation [
30], while emotion-driven frameworks employing BERT [
31] capture the semantic and affective layers of trust in social media content.
Unlike all these studies, our proposed algorithm determines the trust score without any restriction and regardless of the path. In this paper, a relational probability-based calculation is performed for trust analysis in social networks. These calculations are grounded in a transition probability matrix, which naturally reveals the structural differences and trust dynamics among entities within a social network.
4. Proposed Method: Social Trusty Algorithm
The establishment of a relationship with an element of the network is dependent upon the reliability of that element being clearly expressed numerically and concrete evidence being presented. Such evidence would facilitate the determination of a relationship based on reliability and would also enable careful action to be taken. The present study investigates the relationship between entities in a social network by determining numerical trust values. The entities that an entity in the network trusts the most and trusts the least are identified. Furthermore, the method also identifies the most trusted and least trusted entities in the network.
When interactions are used to obtain the trust score between two entities on social networks, a score matrix (P) similar to a Markov probability matrix is first obtained using the adjacency matrix. This matrix provides the trust score between all pairs of entities at a distance of 1 step. By taking the powers of the matrix, the trust ratios at distances of 1, 2, …, k steps are found. If all of these are found and summed, an upper bound for the trust scores is obtained. This process is quite computationally expensive. Therefore, the eigenvalues and eigenvectors of the P matrix are found, and trust scores for individual pairs are determined by applying orthogonal operations to them. The powers of the eigenvalues are taken in order and summed. Then, the resulting expression is multiplied by the eigenvector. The approach applied in this study is summarized in
Figure 1.
In this study, the process begins with the construction of a model of the social network. During the construction of the model, which is a ratio-based graph model, graph theory is used. A social network is modeled as a weighted or unweighted and undirected graph. The next step is to find the adjacency matrix of the graph.
In
Figure 2, a simple social network is modeled and shown as a graph.
Table 1 shows the adjacency matrix formed by the nodes and edges of this weighted graph.
Then, by applying the trust score model to the graph, a trust scores matrix (probability transition matrix), which is the representation of inter-entity relations, in which the sum of each row is 1 (probability sum), is formed (
Table 2). As a result, the reliability problem in social networks can be considered as a Markov process [
36,
37].
Social networks are modeled as graphs where the adjacency matrix represents the structure of a weighted or unweighted graph. Therefore, Definition 4 gives us the trust score for adjacent nodes. In this way, a social network graph model can be used to obtain the trust score matrix for a step. This means that a social network can be modeled as a trust score matrix process in order to obtain the trust score between two adjacent nodes.
Definition 4. Trust degree (Td)
expresses the degree of trust (trust score) between entities defined in the
range (0 ≤ Td ≤ 1). If = 0, it is said that X and Y do not trust each
other at all. If = 1, it is said that X and Y are very closely
related and they trust each other very absolutely. Equation (1) gives the
formula for finding trust scores for adjacent nodes. To calculate the trust score of entities in social networks, paths are found between two related nodes, and the degree of trust is obtained by using these paths. If the aim is to find the degree of trust of only two entities to each other, it is shown by the method developed in this study that calculating all paths is a costly process, and there is no need for this. For this purpose, after obtaining the transition scores matrix of a social network, the degree of trust is calculated according to the distance between entities. In this context, in the proposed method, after obtaining the transition score matrix for the trust process of the social network, when the strength of this matrix is taken according to distance and summed, each element of the resulting matrix gives the trust level of the entities in the relevant indices.
Before the proposed method is explained in detail, it is necessary to give information about linear algebra.
Assume that P is the proportion matrix. P
equality is provided, where P is a square matrix and x is a column vector, and for this equality, the value of λ is called the eigenvalue and the column vector corresponding to this eigenvalue is the eigenvector x. Matrix P has n eigenvalues and n eigenvectors if it is an
matrix. Eigenvalues and eigenvector pairs can be given as
. In this case, the following Equation (2) can be written.
Computing by direct multiplication requires O(). It is an arithmetically costly operation, and the eigenvalues and eigenvectors of the matrix can be used to reduce the multiplication and addition operations here.
The power k of matrix
can be calculated as in (3).
Figure 3 illustrates the matrix product vector and scaler product vector.
In this step, when the powers of the scalar numbers are taken, the kth power of the
matrix is calculated with
scalar products. At this aim,
where
should be computed.
Figure 3.
Matrix, eigenvalues, and eigenvector relations.
Figure 3.
Matrix, eigenvalues, and eigenvector relations.
In order to model a system as a trust process, the transition scores between the states of that system are calculated and the transition scores matrix is obtained. The matrix given in
Table 2 is used as the transition score matrix for the trust process. The transition score matrix P is calculated as follows.
The
value of the
matrix represents the scores of going from state i to state j in one step. The transition score matrix (
Table 2) obtained from the social network can be used in this way, and in this case, the value
will show the trust of entity i in entity j. In a trust process, whose transition scores matrix is given as P, the scores of transitioning from one state to another after k steps will be the value transition scores represented by the relevant indices after taking the k power of the P matrix (5).
The value of r in the matrix gives the scores of starting from state i and being in state j at the end of k steps. If there is a probability of staying in the same state for this matrix, then it is taken into account. When the values given in
Table 2 are evaluated as one-step trust degrees, it will be seen that the diagonal values are zero. This means that it will not stand on itself and cause repetition. When
Table 2 is represented as a matrix, let this matrix be represented as
. The
matrix shows the degree of trust of entities who are directly connected to each other in the relevant social network. When the
matrix is squared, the degree of trust of entities with a distance of 2 to each other is calculated. If the
power of this matrix is taken, the degree of trust between entities at a distance of k is obtained. As a result, the degree of trust of entities in each other is calculated (
Figure 4).
Figure 4 depicts the matrix power relation with eigenvalues and eigenvectors relations. This method gets rid of finding all paths by using breadth first search or other technique like breadth first search. For this purpose, the powers of the
matrix will need to be taken, and this is a costly operation (more multiplication operations). In the present model, eigenvalues and eigenvectors have been used to calculate the powers of the transition score matrix. The eigenvalue and eigenvector pairs of the
matrix are
and are shown in (6).
The degree of trust of entities with a distance of 2 to each other is shown in (7).
In cases where entities are at a distance of 3 from each other, their degree of trust is calculated with the following Equation (8).
When the distances of entities from each other are k, the relation in (9) finds the degree of trust.
After all, to calculate the degrees of trust of entities in each other, it is necessary to sum the degrees of trust on all roads with distances of 1, 2, …, k. As a result, the maximum values of the degree of trust of entities to each other can be calculated with the following relation (10), and in this case, there will be no need to find all the paths between entities (
is the trust matrix). This operation requires the trust scores of all entities to a specific entity.
Any power of the matrix is multiplied by a column vector; however, to compute the trust score, the power of matrix is required. To obtain the trust score of any length, the corresponding power of should be computed. There are two ways to compute these values:
1st way: Any power of should be computed by using matrix multiplication. This step requires many arithmetic operations.
2nd way: .
The working steps of the developed method are given as pseudocode in Algorithm 1:
Algorithm 1 Social Trusty Algorithm |
1. Start 2. G = (V, E) //Convert social network to graph 3. //Find transition scores matrix 4. // Find P’s eigenvalues and eigenvectors 5. 6. // eigenvector matrix 7. 8. 9. 10. End |
In step 7, trust between entity pairs is expressed by finding the max and min values on a row-by-row basis. The resulting Td matrix is summed on a column-by-column basis, and as seen in step 9, the most trusted and least trusted entities across the entire network are identified using the max and min values.
The steps of the method based on linear algebra can be briefly explained as follows:
Step 1: The adjacency matrix of the given social network is taken as input. The transition probability matrix is obtained.
Step 2: All powers of the transition probability matrix from 1 to the (n − 1) are calculated.
Step 3: All the resulting matrices are summed and the (i, j) element of the total matrix will give the trust of node i to node j. Since calculating the powers of the matrix is costly, the eigenvalues and eigenvectors of the matrix whose power will be calculated are calculated. After the powers of the eigenvalues are calculated, the product of the matrix whose main diagonal consists of these values and the eigenvectors matrix will give the power of the corresponding matrix.
Step 4: The resulting matrix gives the trust scores for all pair nodes.
5. Simulation Results
When all processes in the Social Trust Algorithm are applied to the graph in
Figure 2, the matrix in
Table 3 is obtained. As shown in this matrix, trust scores are clearly distinguishable. To illustrate this, consider node
, which shows maximum trust in
with a score of 3.716654. Conversely, node
has the lowest level of trust in
, with a score of 2.179268.
The results for each entity of the example graph in
Figure 2 are shown in
Figure 5.
It can be seen in
Figure 5 that
’s most trusted entity in the network is
, and its least trusted entity is
. Similarly, it can be seen that
’s most trusted entity in the network is
, and her least trusted entity is
and vice versa.
When the algorithm is applied to the social network, a Td matrix is obtained. The trust score of each entity can be obtained by adding up the columns of the Td matrix. In addition, an inference can be made about the overall network. The entity with the lowest trust score is designated as the most distrusted, while the entity with the highest score is regarded as the most trusted.
Table 4 illustrates the results obtained when the Social Trusty Algorithm is run on real networks. The datasets we used are Windsurfers, Zachary Karate Club, Dolphins, Les Misérables, etc., which are frequently used in social network analysis. For example, Lesmis is a weighted graph in which the characters in Victor Hugo’s novel. Les Misérables are represented as nodes, and the relationships of these characters with those in the same chapter of the book are represented as edges. The graph consists of 77 nodes and 254 edges. While the most trusted entity of the network is Bossuet, the most distrusted is Bahorel.
The graph in
Figure 6 shows the runtimes of the algorithms while finding the trust scores on various datasets. The datasets used are 17-node Kangaroos, 34-node Zachary Karate Club [
38], 43-node Windsurfers [
38], 77-node Les Misérables [
38], and 1000-node R1000.1 [
39]. In this study, a comparison was made between the proposed method and the RN-Trust [
15] and TidalTrust [
14] algorithms. A comparative analysis was conducted on the three distinct methods in terms of their execution times on various datasets. The results indicated that the proposed method exhibited superior performance in all instances. It is evident that as the number of nodes in the dataset increases, the superiority of the proposed algorithm becomes more pronounced. This discrepancy is particularly pronounced in the “Les Misérables” dataset.
6. Conclusions
This paper emphasizes the importance of trust in social networks and can find the trust score and label users in the network as trustworthy or untrustworthy. Most solutions to the problem of finding a trust score work within a limited search range, such as the shortest path. Trust degradation and path dependency emerge as common issues in trust propagation. Considering these issues, a Markov process-like method has been developed to find the trust score without applying any constraints or without explicit path enumeration.
As the proposed algorithm is an approach method, soundness and completeness are not sought. Since the initial scores of other algorithms differ from ours, the resulting numerical trust scores are also different, making them unsuitable for direct comparison. Therefore, a comparative analysis was conducted with other algorithms in terms of runtime and data loss. The experimental results demonstrate that our algorithm achieves lower runtime complexity compared to RN-Trust and TidalTrust, particularly in larger networks. Moreover, by preserving all transition probabilities, it avoids the structural information loss inherent in pruning-based approaches. While eigendecomposition provides a computationally efficient way to compute matrix powers, it does not yield formal guarantees of soundness or completeness. As such, the Social Trusty Algorithm should be regarded as a computational shortcut that emphasizes efficiency and structural preservation, rather than a fully rigorous model.
Although the present method is able to conceptualize trust as a structural and probabilistic construct, it does not encompass the semantic, contextual, or temporal dynamics of trust that have been emphasized in the broader information systems literature. Despite these limitations, this study provides a valuable methodological contribution. The Social Trusty Algorithm can support a range of applications, from identifying malicious actors in social networks to enhancing recommender systems, improving information security, and informing governance in digital platforms. Once trust scores are obtained, users can establish relationships with trustworthy users, share information, and interact with them, while taking necessary precautions against untrustworthy users.
In this paper, a method for inferring trust in social networks has been designed and its applicability demonstrated. In the future, the dynamic structure of social networks will be taken into account to obtain dynamic trust inference. This method will be expanded to provide a multidimensional trust assessment by integrating online social networks and additional social factors.