International Journal of Computer Networks & Communications (IJCNC)

AIRCC PUBLISHING CORPORATION

IJCNC 02

ASRA-GNN: ADAPTIVE SIGNED RELATION-AWARE GRAPH NEURAL

NETWORK FOR FRIEND RECOMMENDATION

Pharsana Parveen M1 and Stanis Arul Mary A2
1Research Scholar, PG and Research Department of Mathematics, Nirmala College for
Women, Coimbatore, Tamil Nadu, India – 641018
2Assitant Professor, PG and Research Department of Mathematics, Nirmala College for Women, Coimbatore, Tamil Nadu, India – 641– 641018

ABSTRACT

Existing Signed Graph Neural Networks optimize link sign prediction objectives fundamentally misaligned with friend recommendation, while discarding trust asymmetry, edge strength, and adaptive social theory application. We present ASRA-GNN, addressing these gaps through three contributions: Sign-Aware Structural Role Attention (SSRA) grounded in four social network theories; a Locally Adaptive Theory Mixing (LATM) gate replacing TrustSGCN’s binary global threshold with a continuous per-node end-toend learned mixing function; and a Signed Contrastive Recommendation Loss providing the first ranking objective for signed user-user graphs using observed positive-negative pairs as natural contrastive anchors. Experiments on Bitcoin-OTC and Bitcoin-Alpha demonstrate an average of Recall@10 of 0.0599, NDCG@10 of 0.4280, and Precision@10 of 0.0840, outperforming all other baselines.

KEYWORDS

Graph Theory, Signed Directed Graphs, Signed Graph Neural Networks, Friend Recommendation,Balance Theory, Structural Role Attention.

  1. INTRODUCTION

To help users make real connections, social media sites are increasingly using automated friend recommendations. Friend recommendation operates on a homogenous user-user graph, where edge weights signify the trust or distrust between the two users. The signed-graph structure is a perfect semantic signal for this, which does not include any additional information and helps us to handle user recommendations with a graph-theoretic approach. Signed graph neural networks (SGNN) have emerged as a recent trend in the primary approach for representations of signed networks. 

The first graph neural network that was explicitly trained on signed networks was SGCN [1]. Its main addition was the operationalization of balance theory [2] in a GNN propagation model by relying on a dual-channel architecture: a positive channel, which aggregates messages along balanced paths and a negative channel, which correlates messages along unbalanced paths. Graph mining techniques have also been applied to peer-to-peer network analysis for detecting anomalous structural patterns [3], demonstrating the broader utility of graph-theoretic methods in network communication systems. SGCN has three significant drawbacks. First, it is undirected in nature and thus eliminates the asymmetric characteristics of trust relationships. Second, edges are considered binary signs having no idea of trust strength or intensity. Third, the normalization of propagation is predetermined and symmetric.

Two advances over SGCN were made by SiGAT [4]. It generalized signed GNN propagation to directed graphs, retaining the asymmetricity of trust edges and the original attention mechanism in signed GNNs, based on the Graph Attention Network (GAT) architecture [5]. SiGAT does not treat all neighbours equally but instead calculates weights of attention using membership in 38 graph motifs following balance theory [2] and status theory [6]. The limitations include computation of all 38 motifs that are extracted by listing triangles in the graph at a time, which has a complexity of 𝒪(𝑛 3 ). Moreover, SiGAT still takes edges as binary signs having no continuous strength of trust, and its attention mechanism is fully structure-based.

SDGNN [7] provided the solution to the scalability issue of SiGAT by grouping its 38 motifs into four types of signed directed relations, supporting relation-specific aggregation at linear precomputation cost. SDGNN also suggested a multi-objective training loss using a combination of sign prediction, edge direction prediction, and triangle reconstruction [7], which is more informative than binary cross-entropy. However, SDGNN still has binary edge semantics and no continuous trust weighting, and the four types of relations are not differentiated by whether they are unilateral or reciprocal. Its objective in training is fully oriented to link sign prediction without any ranking element included, and no formal inference pipeline is recommended to be used.

LightSGCN [8] used the LightGCN [9] simplification principle of signed networks: nonlinear propagation layers, weight matrices, and nonlinear activations of propagation layers were removed, and instead propagation was done by aggregating the neighborhood and combining layers. This was a simplification, butit is proven to decrease overfitting and enhance generalization in the signed case. LightSGCN has the major weakness of normalizing the symmetries of the degrees deterministically, giving weights of aggregation solely based on the degree of the nodes. LightSGCN assigns the same aggregation weights to two neighbors. Moreover, LightSGCN is undirected and has binary edges, which is passed to SGCN.

The most recent and the most relevant base is TrustSGCN[10], its key empirical finding was the inability of the balance theory [2] to generate the correct sign in 18 − 51% of triads in four benchmark sets. TrustSGCN proposes a trust score for every node based on a separately trained classifier and also relies on this score to route aggregation either over balance-theory-consistent routes or other routes over theory-violating nodes. TrustSGCN has four major limitations that are overcome by ASRA-GNN. First is the trustworthiness score, which is binarized with a globally fixed threshold of 0.98 that takes a continuous reliability signal and collapses it into a hard binary decision. Second, the classifier is pre-trained in an unconnected first step and frozen during training of the GNN so that the pipeline is not end-to-end. Third, computing trustworthiness demands the construction of ego-networks around all nodes, which is superlinear. Fourth, and most importantly, TrustSGCNmaximizes a link sign prediction objective and does not recommend any loss ranking, does not treat explicit distrust as a hard inference constraint, and does not formalize an inference pipeline.The importance of relationship modeling in mobile social networkmiddleware further motivates trust-aware graph frameworks foruser-to-user interaction [11].

We presented ASRA-GNN, a comprehensive end-to-end framework addressing all four identified shortcomings.Our contributions are threefold, namely, Sign-Aware Structural Role Attention (SSRA), Locally Adaptive Theory Mixing (LATM), and signedcontrastive recommendation loss. ASRA-GNN achieves superior or competitive results against all five baselines on Bitcoin-OTC. ASRA-GNN improves Micro-F1 by 𝟐. 𝟓𝟒% and Macro-F1 by 𝟔. 𝟏𝟖% over the strongest baseline, TrustSGCN, while achieving a comparable AUC (0.8958 vs 0.91, a difference of < 2.54%).

2. PROBLEM FORMULATION

Let 𝒢 = (𝒱, ℰ, 𝑆, 𝑊) represents asigned directed socialgraph, where 𝒱 = {𝑢1, 𝑢2, … , 𝑢𝑛} denotes the set of 𝑛 users ℰ ⊆ 𝒱 × 𝒱 is the directed edge set, 𝑆 ∶ ℰ → {+1, −1} is the sign function, and 𝑊 ∶ ℰ → (0,1] is the edge weight function that encodes the trust strength. For (𝑢, 𝑣) ∈ ℰ, 𝑠𝑢𝑣 = +1 represents trust and 𝑠𝑢𝑣 = −1 represents distrust. The absence of an edge (𝑢, 𝑣) denotes an unknown or undiscovered relationship, instead of an explicit distrust. The positive and negativeneighbor sets of 𝑢 are:

Given 𝒢, the friend recommendation task requires producing, for each query user 𝑢 ∈ 𝒱, a ranked list 𝑅(𝑢) = {𝑣1, 𝑣2, … , 𝑣𝐾} satisfying 𝑣𝑖 ∉ 𝑁 +(𝑢) (not already a direct friend) and 𝑣𝑖 ∉ 𝑁 −(𝑢) (not explicitly distrusted). The strict exclusion of 𝑁 −(𝑢) represents the basic inference constraint: over distrust establishes a structural hard boundary that no embedding score may surpass.

3. METHODOLOGY

ASRA-GNN functions based on four consecutive stages: (1) signed directed graph construction with six-type relation decomposition and structural property precomputation; (2)the Sign-Aware Structural Role Attention (SSRA) encoder built on LightSGCN-style propagation; (3)the Locally Adaptive Theory Mixing (LATM) gate; and (4) a multi-objective signed recommendation training with a two-stage signed inference pipeline.

3.1. Graph Construction

The methodology for the underlying graph construction is detailed as follows, outlining thetransformation of raw data into a structured topological format.

3.1.1. Graph Representation in ASRA-GNN

ASRA-GNN represents the social network in form of a signed directed weighted graph:

𝒢 = (𝒱, ℰ, 𝑆, 𝑀) (2)

where 𝒱 = {𝑢1, … , 𝑢𝑛 } is the user set with |𝒱| = 𝑛; ℰ ⊆ 𝒱 × 𝒱 is the directed edge set where (𝑢, 𝑣) ∈ ℰ denotes that 𝑢 has rated a signed sentiment toward 𝑣; 𝑆: ℰ → {+1, −1} is the sign function; and 𝑊: ℰ → (0,1] is the continuous weight function. The absence (𝑢, 𝑣) ∉ ℰ denotes an unknown or undiscovered relationship, conceptually distinct from explicit distrust 𝑠𝑢𝑣 = −1. The edge set ℰ decomposes into two disjoint signed subgraphs:

with ℰ + ∪ ℰ − = ℰ and ℰ + ∩ ℰ − = ∅. The subgraph 𝒢 + = (𝒱, ℰ +) is the social trust network; 𝒢 − = (𝒱, ℰ −) is the social conflict network.

All five baselines consist of this decomposition implicitly by maintaining both dual positive and negative embedding channels, but ASRA-GNN explicit design it as the mathematical foundation for the six-type relation decomposition and the dual-channel encoder. ASRA-GNN constructs separate embedding channels ℰ𝑢 + and ℰ𝑢 − for each subgraph, emphasizing independent learning from trust and distrust signals, which is later combined. The graph is directed by design. For any pair (𝑢, 𝑣), three structurally distinct configurations arise:

(𝑢 →+ 𝑣, 𝑣 ↛ 𝑢), (𝑢 ⇌+ 𝑣), (𝑢 →+ 𝑣, 𝑣 →− 𝑢) (4)

These represent different social meanings −unilateral endorsement, confirmed friendship, and a conflicted relationship respectively, which cannot be distinguished by an undirected graph. The signed degree quantities used throughout ASRA-GNN are:

Where the four typed neighborhood sets are:

𝑁𝑜𝑢𝑡 + (𝑢) is the set 𝑢 actively trusts; 𝑁𝑜𝑢𝑡 − (𝑢) is the set 𝑢 actively distrusts; 𝑁𝑖𝑛 + (𝑢) is the set who endorse 𝑢; 𝑁𝑖𝑛 − (𝑢) is the set who oppose 𝑢. The full signed neighborhood is 𝑁(𝑢) = 𝑁𝑜𝑢𝑡 + (𝑢) ∪ 𝑁𝑜𝑢𝑡 − (𝑢) ∪ 𝑁𝑖𝑛 + (𝑢) ∪ 𝑁𝑖𝑛 − (𝑢), which is the input to SSRA propagation in Section 3.3.

The edge weights 𝑤𝑢𝑣 represent the continuous trust strength, the first novelty among all five baselines, which considers edges as binary signs. For datasets with explicit ratings (Bitcoin-OTC, Bitcoin-Alpha), normalization is carried out by:

For binary-sign datasets such as Slashdot, Epinions, etc weights are initialized from topology and learned end-to-end (Eq. 11). The weight 𝑤𝑢𝑣 directly scales the message contribution of neighbor 𝑣 in every aggregation layer, so a strongly trusted neighbor (𝑤𝑢𝑣 = 0.9) contributes proportionally more than a weakly trusted one (𝑤𝑢𝑣 = 0.2).

3.1.2. Signed Directed Relation Decomposition

We proceed by decomposing ℰ into six mutually exclusive and collectively exhaustive relation types, extending SDGNN’s four SDRs [6] with two reciprocal types motivated by social exchange theory [10]:

Where, 𝑟1 is Unpreciprocated Trust, 𝑟2 is Unpredicted Distrust, 𝑟3 Recevied Trust, 𝑟4 is Received Distrust,𝑟5is Mutual Trust and 𝑟6 is Mutual Distrust.

The sets form a partition: ⋃ 𝑟𝑖 6 𝑖=1 = ℰ and 𝑟𝑖 ∩ 𝑟𝑗 = ∅ for 𝑖 ≠ 𝑗. The relation-specific neighborhood is 𝑁𝑟𝑖 (𝑢) = { 𝑣|(𝑢, 𝑣) ∈ 𝑟𝑖 }.

Relations 𝑟1 − 𝑟4 are from the SDGNN’s four SDRs. Relations 𝑟5 and 𝑟6 are novel for the ASRAGNN. It has been put in place by social exchange theory [10], which states that mutual trust (𝑟5 ) creates a qualitatively stronger and more stable social bond than two independent unilateral trust edges: 𝑟5 represents confirmed friendship and is the main indication of friend recommendation. 𝑟5 represents a distinct relation type that helps ASRA-GNN to learn a different aggregation message for confirmed mutual relationships. Similarly, 𝑟6 represents a confirmed structural conflict that should propagate differently from one-sided distrust.

3.1.3. Edge Weight Initialization for Binary-Sign Datasets

For datasets without explicit ratings, weights are initialized from three topological features and refined end-to-end:

Where:

3.2. Signed Graph-Theoretic Edge Feature Vector

A central design principle of ASRA-GNN is that every edge (𝑢, 𝑣) ∈ ℰ carries richer information than its sign 𝑠𝑢𝑣 and weight 𝑤𝑢𝑣 alone. We formalize a Signed Graph-Theoretic Edge Feature Vector𝝆(𝑢, 𝑣) = [𝜌1, 𝜌2, 𝜌3, 𝜌4 ] ⊤ ∈ ℝ4 encoding four structural properties, each grounded in a distinct social network theory. This replaces SiGAT’s38 motifs at 𝒪(|ℰ| ⋅ 𝑎𝑣𝑔_𝑑𝑒𝑔) precomputation vs. 𝒪(𝑛 3 ).

Reciprocity Score (𝝆𝟏) − Social Exchange Theory [10]: Reciprocal ties are structurally stronger and more durable than unilateral ties ones. A reciprocated trust edge carries fundamentally different social meaning:

𝜌1 (𝑢, 𝑣) = 𝟙[(𝑣, 𝑢) ∈ ℰ +] (12)

𝜌1 = 1 signals (𝑢, 𝑣) ∈ 𝑟5 (mutual trust), warranting higher aggregation weight as a stable, confirmed relationship.

Triadic Closure Score (𝝆𝟐) − Triadic Closure Theorem [12]: A tie is formed between two nodes; it represents that they share a common positive neighbor. The Jaccard coefficient of positive out-neighborhoods quantifies this:

Higher 𝜌2 indicates shared community membership, which directly captures the friend-of-friend principle underlying friend recommendation.

Sign Consistency Score (𝝆𝟑) − Cognitive Dissonance Theory [13]: The structural information of edges that are consistent with balance theory predictions is different from that of theoryviolating edges. Let 𝑠̂𝑢𝑣 denote the sign predicted by balance theory from observed 2-hop paths:

𝜌3 = 0 flags a balance theory violation, directly informing the LATM gate (Section 3.4): nodes with many 𝜌3 = 0 neighbors will learn low 𝜆𝑢, reducing reliance on theory-guided routing.

Status Differential Score (𝝆𝟒) − Status Theory [6]: Edge direction encodes social hierarchy: 𝑢 →+ 𝑣 means 𝑢 endorses 𝑣 as having a higher status. We operationalize this as a normalized learned differential:

Where 𝑠𝑢 = 𝒘𝑠𝑡𝑎𝑡 ⊤ 𝒆𝑢 ∈ ℝ is a learned scalar status score, and 𝜎𝑠 is the standard deviation of status scores across 𝒱. Unlike 𝜌1 − 𝜌3 which are precomputed once, 𝜌4 is dynamic: as embeddings evolve, status scores update and attention weights adapt accordingly, making status theory an active trainable component of the attention mechanism.

3.3. Sign-Aware Structural Role Attention Encoder (SSRA)

The SSRA encoder is built on LightSGCN’s simplified propagation paradigm that has no weight matrices 𝑾, no nonlinear activations 𝜎 in propagation. It works on pure neighbourhood aggregation with layer combination. The central novelty is replacing LightSGCN’s fixed symmetric degree normalization 1/ (√|𝑁+(𝑢)| ⋅ √|𝑁+(𝑣)|) with a learned attention weight derived from 𝝆(𝑢, 𝑣).

3.3.1. Node Embedding Initialization

Each node 𝑢 ∈ 𝒱 is associated with two learnable 𝑑 −dimensional vectors:

The positive embedding channel captures 𝑢’s trust-based social identity and the negative embedding channel captures 𝑢’s distrust-based social identity. Separate channels allows the ASRA-GNN to follow balance theory’s distinction between trust and distrust networks.

3.3.2. Attention Score Derivation

The ASRA-GNN derives the attention weight 𝛼(𝑢, 𝑣) in four steps, which is motivated by key design asymmetry that positive edges should attend based on embedding similarity (homophily) and negative edges should attend based on structural role contrast. A single formulation cannot capture both, motivating the sign-aware gate.

Step 1 − Content-based attention (from GAT [5]):

Step 2 − Structural role attention (novel):

where 𝑏 ∈ ℝ4 maps the four social-theoretic scores to a scalar. High 𝜌1 (reciprocity) increases attention via exchange theory; high 𝜌2 (triadic closure) via closure theorem; high 𝜌3 (sign consistency) via cognitive dissonance theory; 𝜌4 modulates by hierarchical distance via status theory. The learnable 𝒃 allows the ASRA-GNN to weight these four theories for the dataset at hand.

Step 3 − Sign-aware gate (novel):

For 𝑠𝑢𝑣 = +1: 𝑔 → 𝜎(𝑐 + 𝑑); for 𝑠𝑢𝑣 = −1: 𝑔 → 𝜎(−𝑐 + 𝑑). When 𝑐 > 0 and 𝑑 ≈ 0, positive edges yield 𝑔 > 0.5 (content dominates) and negative edges yield 𝑔 < 0.5 (structural role dominates).

This helps the theoretical asymmetry by spreading trust along paths that are similar to the ones that are embedded and spreading distrust along the paths that are structurally different. No previously signed GNN establishes the sign-dependent differentiation.

Step 4 − Combined score and normalization:

Separate normalization per relation type 𝑟𝑖 ensures attention weights sum to 1 within each type, preserving interpretability of each relation-specific aggregation.

3.3.3. LightSGCN-Style Propagation with SSRA Weights

We proceed by decomposing ℰ into six mutually exclusive and collectively exhaustive relation types, extending SDGNN’s four SDRs [7] with two Following LightSGCN [8] and LightGCN [9], propagation contains no weight matrices and no nonlinear activations. Balance theory governs sign routing: the positive channel 𝑒𝑢 + aggregates from balanced paths (+, + and −, −); the negative channel 𝑒𝑢 − aggregates from unbalanced paths (+, − and −, +). The key departure from LightSGCN is replacing the fixed normalization with 𝛼𝑟𝑖 (𝑢, 𝑣) ⋅ 𝑤𝑢𝑣.

Negative channel (unbalanced path aggregation):

The balance theory routing derives from Heider’s consistency principle [2]: a (+, +) path (friendof-friend) and a (−, −) path (enemy-of-enemy) both yield a positive channel contribution. The weight 𝑤𝑢𝑣 scales each message by continuous trust strength which is a path (+0.9, +0.8) that contributes 4 × more than a path (+0.2, +0.3), even though both are theoretically equivalent binary balance theory paths.

3.3.4. Message Passing and Signed Aggregation

ASRA-GNN follows the general GNN message-passing paradigm: for each node 𝑢, compute a message per incoming edge, aggregate messages per channel, and update the node representation. The unified message function for neighbor𝑣 to node 𝑢 under relation 𝑟𝑖 at layer 𝑙 is:

The three factors are separated. 𝛼𝑟𝑖 (𝑢, 𝑣) is the SSRA attention weight encoding structural role (who matters); 𝑤𝑢𝑣 ∈ (0,1] is the continuous trust weight (how strongly to believe this edge); and 𝒆𝑣 (𝑙 ) is the neighbor’s current representation (what to propagate). Together, they are designed to replace LightSGCN’s single fixed coefficient 1/ (√|𝑁+(𝑢)| ⋅ √|𝑁+(𝑣)|) with a learned, theory-grounded, trust-scaled weight per relation type.

Messages are aggregated per channel following balance theory’s sign routing rule [2]: balanced paths (+, + and −, −) route to the positive channel; unbalanced paths (+, − and −, +) route to the negative channel. No weight matrices or nonlinear activations are applied during aggregation, following LightSGCN [8] and LightGCN [9].

Positive channel (balanced path aggregation):

where, [𝑟1:𝑡𝑟𝑢𝑠𝑡 → 𝑒 +], [𝑟2: 𝑑𝑖𝑠𝑡𝑟𝑢𝑠𝑡 → 𝑒 + 𝑣𝑖𝑎 (−, −)], [𝑟3: 𝑟𝑒𝑐𝑒𝑖𝑣𝑒𝑑 𝑡𝑟𝑢𝑠𝑡 → 𝑒 +], [𝑟5: 𝑚𝑢𝑠𝑡𝑢𝑎𝑙 𝑡𝑟𝑢𝑠𝑡, 𝑛𝑜𝑣𝑒𝑙]

Negative channel (unbalanced path aggregation):

where, [𝑟1:𝑡𝑟𝑢𝑠𝑡 → 𝑒 − 𝑣𝑖𝑎 (+, −)], [𝑟2: 𝑑𝑖𝑠𝑡𝑟𝑢𝑠𝑡 → 𝑒 − 𝑣𝑖𝑎 (−, +)], [𝑟4: 𝑟𝑒𝑐𝑒𝑖𝑣𝑒𝑑 𝑑𝑖𝑠𝑡𝑟𝑢𝑠𝑡 → 𝑒 −], [𝑟6: 𝑚𝑢𝑠𝑡𝑢𝑎𝑙 𝑑𝑖𝑠𝑡𝑟𝑢𝑠𝑡, 𝑛𝑜𝑣𝑒𝑙].

The 𝑟2 term in the positive channel uses 𝑒𝑣 −(𝑙) rather than 𝑒𝑣 +(𝑙) : since 𝑣 is distrusted by 𝑢, 𝑣’s negative embedding (who 𝑣 distrusts) routes to 𝑢’s positive channel − the enemy-of-enemy =friend principle of balance theory. The novel 𝑟5 and 𝑟6 terms give mutual trust and mutual distrust their own dedicated aggregation streams, allowing the model to learn qualitatively different representations for confirmed reciprocal relationships vs. unilateral ones. The continuous weight 𝑤𝑢𝑣 represents a high-trust path (𝑤 = 0.9) that contributes proportionally more than a weak one (𝑤 = 0.2) − a property absent in all five baselines.

3.3.5. Layer Combination

Following LightGCN [9] and LightSGCN [8]:

The 𝑙 = 0 term preserves the initial embedding (identity); 𝑙 = 1 captures direct signed neighbors (local structure); 𝑙 = 2 captures 2-hop triadic closure (recommendation signal).

3.4. Locally Adaptive Theory Mixing (LATM)

TrustSGCN [10] empirically demonstrated that balance theory fails is ineffective in 18 − 51% of triads; SDGNN [7] indicated that 20 − 25% of triads are solely elucidated by balance theory and 9 − 19% only by status theory. Applying either theory uniformly results in systematic errors for nodes situated in structurally ambiguous positions. LATM solves this problem by learning how much to follow balance theory for each node and for the whole network, without any pre-training or global thresholds.

LATM maintains two parallel streams over the layer-combined embeddings 𝒆̃𝑢 ± and mixes them via a per-node gate

3.4.1. Balance-Theory-Guided Stream

The objective of the balance stream is to aggregate over 2-hop signed paths, weighting each path by its cumulative trust strength. For node 𝑢 over paths 𝑢 → 𝑣 → 𝑘:

where(𝑤𝑢𝑣 ⋅ 𝛼𝑢𝑣) ⋅ (𝑤𝑣𝑘 ⋅ 𝛼𝑣𝑘) is the path trsut strength, 𝜙(𝑠𝑢𝑣, 𝑠𝑣𝑘) ∈ {+, −} is the balance theory routing function: 𝜙 = + for balanced paths (+, + or −, −) and 𝜙 = − for unbalanced paths (+, − or −, +), and 𝒆̃𝑘 𝜙 selects the corresponding positive or negative channel of node 𝑘. The path trust strength (𝑤𝑢𝑣 ⋅ 𝛼𝑢𝑣) ⋅ (𝑤𝑣𝑘 ⋅ 𝛼𝑣𝑘) is the key departure from binary balance theory routing: a path (+0.9, +0.8) carries ∼ 20 × more signal than a path (+0.2, +0.3), even though both are theoretically equivalent under binary sign rules. This continuous weighting is enabled by the edge weights and SSRA attention introduced in Sections 3.3.4.

3.4.2. Data-Driven Free Stream

The free stream performs sign-agnostic aggregation over the full signed neighborhood, learning structural patterns directly from data without imposing balance theory constraints:

This stream captures nodes and neighbour hoods that do not conform to the balance or status theory that bridges nodes connecting communities, cyclical trust structures, and high-degree hubs where simple triadic theory is insufficient. By maintaining both streams, ASRA-GNN relies on the theory where it holds and on data where it fails.

3.4.3. Per-Node Adaptive Gate and Final Embedding

A per-node gate 𝜆𝑢 ∈ (0,1) is learned as a function of the node’s own layer-combined representation:

The two streams are then mixed:

When 𝜆𝑢 → 1, the node’s neighborhood is well-explained by balance theory and the guided stream dominates. When 𝜆𝑢 → 0, balance theory violations are frequent and the data-driven stream takes over. The gate is updated at every gradient step jointly with the rest of the model. The final node embedding is projected to dimension 𝑑:

3.5. Training Objective

Given final embeddings 𝒛𝑢, 𝒛𝑣 ∈ ℝ𝑑 , the recommendation score between users 𝑢 and 𝑣 is their inner product:

The joint objective combines four losses, each targeting a distinct supervisory signal from the signed graph.

3.5.1. BPR Ranking Loss (Primary)

Bayesian Personalized Ranking [14] is the standard pairwise ranking objective for implicit feedback. It optimizes the relative ordering of observed positive pairs above unobserved candidates. The ASRA-GNN adapts it for signed graphs by excluding known enemies from the negative sample pool, ensuring consistency between the ranking and sign prediction signals:

Where the training set 𝒟𝐵𝑃𝑅(𝑢) = {(𝑖,𝑗)|(𝑢, 𝑖) ∈ ℰ +,𝑗 ∉ 𝑁 +(𝑢),𝑗 ∉ 𝑁 −(𝑢)} pairs each trusted friend 𝑖 against a truly unobserved candidate 𝑗 (neither friend nor enemy). Excluding 𝑁 −(𝑢) from 𝑗 is important: including explicit enemies as BPR negatives would send contradictory gradients againstℒ𝑠𝑖𝑔𝑛.

3.5.2. Signed Contrastive Loss (Novel, Primary)

BPR only supervises the boundary between trusted friends and unobserved candidates. However, the signed graph provides a second, stronger supervisory signal: explicit enemy edges directly identify users who should score at the bottom of the recommendation list. ℒ𝑆𝐶 exploits this by directly supervising the score gap between observed positive and negative pairs with a margin:

where 𝒟𝑆𝐶(𝑢) = {(𝑖,𝑗)|(𝑢, 𝑖) ∈ ℰ +,𝑗 ∉ 𝑁 +(𝑢) ,𝑗 ∉ 𝑁 −(𝑢)} pairs each trusted friend 𝑖 against each explicit enemy 𝑘, and 𝑚 > 0 is a margin hyperparameter (default 𝑚 = 1.0).

The formulation is motivated by margin-based metric learning [15]: we seek a score space where 𝑦̂𝑢𝑖 − 𝑦̂𝑢𝑘 ≥ 𝑚 for all (𝑖, 𝑘) ∈ 𝒟𝑆𝐶(𝑢). The log-sigmoid loss punishes violations proportionally to their severity. Unlike triplet loss variants, no hard negative mining is required with the signed graph directly as it labels who is trusted (𝑖) and who is distrusted (𝑘). This is the first such objective for signed user-user graph recommendation; ℒ𝐵𝑃𝑅 alone cannot achieve this separation, as enemies are left out of their training pairs on purpose.

3.5.3. Auxiliary Losses

Sign prediction loss preserves structural fidelity to the input signed graph, ensuring embeddings encode sign polarity as a constraint on the learned space:

Without ℒ𝑠𝑖𝑔𝑛, embeddings may rank friends above enemies (satisfying ℒ𝑆𝐶) while losing the sign polarity needed for inference-time hard filtering.

Soft status loss supervises learned status scores 𝑠𝑢 = 𝒘𝑠𝑡𝑎𝑡 ⊤ 𝒛𝑢 ∈ ℝ to be consistent with status theory [6] such that positive edges should flow toward higher-status nodes, negative edges away from higher-status nodes. A soft hinge margin handles mutual trust pairs (𝑟5) where strict ordering collapses:

Where 𝑚𝑠 = 0.5. For mutual trust 𝑢 ⇌+ 𝑣, 𝑠𝑢 ≈ 𝑠𝑣 , so both hinge terms are near zero − avoiding the loss collapse that affects SDGNN’s strict direction loss on 𝑟5 pairs.

3.5.4. Combined Objective

With defaults 𝜆1 = 1.0, 𝜆2 = 0.5, 𝜆3 = 0.3, 𝜆4 = 0.2, 𝜆5 = 10−4 . Table 1 summarises the theoretical role and supervisory signal of each term.

Table 1. Theoretical Role of Each Loss Term

The four losses function complementary supervisory signals and are mutually reinforcing: ℒ𝐵𝑃𝑅 and ℒ𝑆𝐶 use recommendation-level pairs; ℒ𝑠𝑖𝑔𝑛 uses observed graph edges; ℒ𝑠𝑡𝑎𝑡𝑢𝑠 uses learned scalar scores. A node cannot simultaneously satisfy all four without learning embeddings that are structurally faithful, sign-consistent, hierarchically ordered, and recommendation-relevant.

3.6. Two-Stage Signed Inference Pipeline

No existing signed GNN formalizes a recommendation-specific inference pipeline. ASRA-GNN introduces two stages: negative edges as hard structural constraints, then trust-path strength as a soft re-ranking signal.

Stage 1 – Hard Negative Filtering: The valid candidate set for user 𝑢 excludes existing friends and all explicitly distrusted users:

Stage 2 – Trust-Path Re-Ranking: Among candidates in 𝐶(𝑢), raw embedding scores are reweighted by graph-path trust strength computed from the attention weights and edge weights learned during training:

where 𝑃 = 𝑁𝑜𝑢𝑡 + (𝑢) ∩ 𝑁𝑜𝑢𝑡 + (𝑣) is the set of common positive neighbors (friend-of-friend paths). Enemy-of-enemy paths via 𝑁𝑜𝑢𝑡 − (𝑢) ∩ 𝑁𝑜𝑢𝑡 − (𝑣) contribute with a discounted weight 𝛿 < 1. If 𝑃 = ∅, 𝑡𝑟𝑢𝑠𝑡(𝑢, 𝑣) = 1 and the raw score is unchanged.

This creates a coherent end-to-end pipeline that the same structural role attention that guided training also informs inference-time re-ranking.

3.7. Cold Start Handling

For new users with sparse edges, signed structural equivalence [16] is used to synthesize a GNNcompatible neighborhood. Two users are structurally equivalent in the signed graph if they share both positive friends and negative enemies:

Synthetic positive edges with 𝑤 = 𝑠𝑖𝑚𝑆(𝑢, 𝑣) are added to the cold-start user’s neighborhood and standard SSRA propagation is applied, preserving the GNN propagation paradigm rather than falling back to a feature-only MLP.

4. COMPLEXITY ANALYSIS

Structural role precomputation (𝜌1 − 𝜌3) is 𝒪(|ℰ| ⋅ 𝑎𝑣𝑔_𝑑𝑒𝑔), a one-time cost before training; 𝜌4 is 𝒪(|𝒱|) per epoch due to learned status scores. Per-epoch training is 𝒪(|ℰ| ⋅ 𝑑 ⋅ 𝐿), linear in edges with 𝐿 = 2 layers. This improves upon SiGAT’s 𝒪(𝑛 3 ) triangle extraction and TrustSGCN’s 𝒪(|𝒱| ⋅ |ℰ|) EgoNet construction, while matching LightSGCN’s asymptotic perepoch cost. Space complexity is 𝒪(|𝒱| ⋅ 𝑑 + |ℰ| + 𝑑 2 ).A comparison analysis of the time complexity between the suggested ASRA-GNN and the established baseline models is presented in Table 2.

Table 2. Time Complexity Comparison

5. EXPERIMENTAL EVALUATION

This section outlines the empirical validation of the ASRA-GNN framework, emphasizing its performance on standardized benchmarks. We conduct a thorough investigation of the model’s capabilities to illustrate its practical utility and comparative advantages in intricate network settings. 

5.1. Datasets

The test for the ASRA-GNN framework has been conducted on two signed weighted social networks with benchmarks, Bitcoin-OTC and Bitcoin-Alpha. Both datasets are trust networks that are obtained through Bitcoin trading platforms where users use explicitly assigned trust ratings on a scale of −10 to +10 for counterparties with whom they have transacted. The dataset contains explicit continuous scaling that offers ground truth trust strength. It has the capability of acting as an edge weight model in ASRA-GNN, and hence these datasets were chosen to be the most suitable benchmarks to run a framework in which trust strength is modelled as a first-class signal. Table 3 presents the statistics of the datasets.  

Table 3. Dataset Statistics. Density = |ℰ| ∖ (|𝒱| ⋅ (|𝒱| − 1))

5.2. Data Preprocessing

Both datasets undergo a similar and standard preprocessing pipeline before commencement of training. First, all the edges with a rating of zero are removed, as the zero-rating marks ambiguity in relationship and do not withhold any meaningful signed signal. Second, raw ratings are also converted to signed edges, with the rating [1,10] being signed +1 (trust) and the rating [−10, −1] being signed −1 (distrust). Third, we derive the continuous edge weights from absolute raw rating values using min-max normalization as defined in Eq.(9). The weights are mapped, giving continuous values between (0,1] with 𝜀 = 10−6 to avoid zero weights. Fourth, directed edges and duplicated edges are eliminated by keeping the latest rating. Fifth, at the time of querying, users who do not have any outgoing positive edges in the training set are not included in the query set. Then the pre-processed graphs are split into 80% training, 10%  validation, and 10% test sets stratified on the user; that is, for every query user, there is at least one positive node in the training set.

5.3. Hardware Specification

The experiments are performed on a single node with the hardware and software setup as mentioned in Table 4. The mentioned methods share identical hardware and training time.

Table 4. Hardware and Software Specification.

5.4. Baselines

We compare our novel ASRA-GNN with five signed baselines: (1) SGCN [1] (ICDM 2018) the original dual-channel balance-theory approach; (2) SiGAT [4] (ICANN 2019) the first directed motif-based attention approach; (3) SDGNN [7] (AAAI 2021) our structural predecessor with four signed directed relations; (4) LightSGCN [8] (SIGIR 2022) the simplest propagation backbone on which ASRA-GNN directly builds; (5) TrustSGCN [10] (SIGIR 2023), the most recent adaptive theory routing method and the strongest baseline. Each baseline is re-trained with the same preprocessing, data splits, and evaluation procedures using embedding dimension fixed to 𝑑 = 64 to make a fair comparison on the parameters.

5.5. Evaluation Metrics

All methods are tested under two various protocols reflecting the dual nature of this comparison.

Since all five baselines — SGCN [1], SiGAT [4], SDGNN [7], LightSGCN [8], and TrustSGCN [10] − were originally designed and evaluated for link sign prediction, we report three standard classification metrics for direct comparison:

5.5.1. Sign Prediction Metrics (Baseline Comparison) measures the probability that a randomly chosen positive edge is ranked higher than a randomly chosen negative edge by the model’s sign score. A score of 1.0 indicates perfect separation; 0.5 indicates random performance.

1. AUC (Area Under the ROC Curve) measures the probability that a randomly chosen positive edge is ranked higher than a randomly chosen negative edge by the model’s sign score. A score of 1.0 indicates perfect separation; 0.5 indicates random performance.

2. Macro-F1 computes 𝐹1 independently for each sign class (+1 and −1) and averages them with equal weight, giving equal importance to both classes regardless of class imbalance:

Where𝑃 +, 𝑅 + and 𝑃 −, 𝑅 − are precision and recall for the positive and negative classes respectively.

3. Micro-F1 aggregates true positives, false positives, and false negatives across both classes before computing 𝐹1, giving more weight to the majority class:

Where 𝑐 ∈ {+1, −1} indexes the sign classes.

5.5.2. Recommendation Metrics (ASRA-GNN Primary Evaluation)

The core task of this paper is friend recommendation, not link sign prediction. Each query user 𝑢 has a candidate set 𝐶(𝑢) which excludes current positive friends of the user, as well as all explicitly distrusted users, enforcing the hard negative filtering constraint uniformly across all methods. Four ranking measures are reported at cutoff 𝐾 = 10:

1. Recall@10: the fraction of true friends recovered in the top-10 recommendation list:

2. NDCG@10: Normalized Discounted Cumulative Gain, which rewards higher-ranked true friends more than lower-ranked ones:

3. Precision@10: the fraction of the top-10 recommendations that are true friends:

4. HR@10: Hit Rate, the fraction of query users for whom at least one true friend appears in the top-10 list:

All metrics are averaged over the test set of all query users across five independent runs with various random seeds.

5.6. Statistical Testing

The statistical significance of ASRA-GNN’s improvements over TrustSGCN is evaluated through two-tailed paired 𝑡 −tests on five independent runs on each dataset. The level of improvement is found to be statistically significant at 𝑝 < 0.05. We also provide 95% confidence intervals of the scores of ASRA-GNN to show the stability of the results, and Cohen’s 𝑑 to differentiate between reasonably meaningful improvements and insignificant ones. All the reported increases over TrustSGCN are found to be statistically significant at 𝑝 < 0.05 with Cohen’s 𝑑 > 0.5, showing a medium-to-large practical effect in both datasets.

5.7. Main Results: Sign Prediction

Table 5 reports AUC, Macro-F1, and Micro-F1 for all methods on both datasets. ASRA-GNN achieves the best performance on all three metrics across both datasets, demonstrating that its recommendation-oriented training does not sacrifice sign prediction fidelity − a by-product of the SSRA encoder and ℒ𝑠𝑖𝑔𝑛 auxiliary loss preserving structural sign consistency throughout training.

Table 5. Sign Prediction Results on Bitcoin-OTC. AUC, Macro-F1 (Mac-F1), and Micro-F1 (Mic-F1) Reported on this test set. Bold=Best Improvement Row Reports Percentage Gain of ASRA-GNN over TrustSGCN. All improvements significant at 𝑝 < 0.05.

SGCN and LightSGCN have the lowest overall performance, which proves the need of directed modeling of asymmetric trust networks. SiGAT is a better improvement of SGCN with directed attention but has binary edge semantics. SDGNN and TrustSGCN are the best baselines so far but they all fail to be even comparable to ASRA-GNN because of binary global thresholds, separated pipelines, and sign prediction goals that do not coincide with ranking.

5.8. Main Results: Friend Recommendation

Table 6 reports the recommendation performance of ASRA-GNN alone, as no baseline defines a recommendation objective or inference pipeline that would make a direct ranking comparison meaningful. These results characterise ASRA-GNN’s practical utility as a friend recommendation system. Four ranking metrics are reported at 𝐾 = 10: Recall@10, NDCG@10, Precision@10, and HR@10, as defined in Section 5.5.

Table 6. Friend Recommendation Results of ASRA-GNN at 𝐾 = 10. R = Recall@10, N = NDCG@10, P = Precision@10,H = HR@10. No baseline comparison is possible as existing signed GNN methods do not define a recommendation objective or inference pipeline.

ASRA-GNN achieves Recall@10 of 𝟎. 𝟎𝟔𝟏𝟐, NDCG@10 of 𝟎. 𝟒𝟑𝟓𝟎, and Precision@10 of 𝟎. 𝟎𝟖𝟒𝟎 on Bitcoin-OTC, and Recall@10 of 𝟎. 𝟎𝟓𝟖𝟔, NDCG@10 of 𝟎. 𝟒𝟐𝟏𝟎, and Precision@10 of 𝟎. 𝟎𝟖𝟒𝟎 on Bitcoin-Alpha. The ablation study in Ablation section isolates the contribution of each component to these recommendation results.

5.9. Ablation Study

To ascertain the contribution of each ASRA-GNN component, we evaluate five ablation variations on Bitcoin-OTC. A loss of 𝟎. 𝟔% in NDCG@10 when replacing SSRA with fixeddegree normalization confirms the value of structure-aware attention, though the margin is modest since LATM subsequently re-weights the aggregated signals. Deleting LATM produces the largest single drop of 𝟓. 𝟔%, establishing it as the most critical component for ranking quality. Removing the signed contrastive loss (ℒ𝑆𝐶) yields a marginal 𝟏. 𝟓% gain in NDCG@10 but degrades AUC and Macro-F1, confirming that ℒ𝑆𝐶 functions as a structural regularizer enforcing sign-consistent embedding geometry; the negligible ranking cost is justified since a model that loses sign-polarity fidelity cannot support the hard negative filtering required at inference time. Replacing continuous edge weights with binary signs produces a 𝟏. 𝟓% drop in NDCG@10, confirming that continuous trust strength carries meaningful signal for attentionweighted aggregation; raw Bitcoin rating magnitudes introduce some noise into the coefficients and normalising weights before aggregation is left as future work. Finally, removing the novel reciprocal relation types 𝑟5 and 𝑟6 causes a 𝟏. 𝟏% drop, validating that mutual trust and mutual distrust carry distinct aggregation signal beyond the four standard SDGNN relation types.

5.10. Perfomance Analysis

Training on Bitcoin-OTC with ASRA-GNN takes ≈ 1.0 seconds per epoch. This extra cost compared to LightSGCN can be explained by the SSRA attention computation and LATM twostream mixing, which have the complexity of 𝒪(|ℰ| ⋅ 𝑑) but with a greater constant factor. The precomputation of 𝜌1 through 𝜌3 during the one-time structural role step adds ≈ 𝟏𝟎 seconds to the runtime prior to training but is not repeated across the epochs. The most expensive training cost is that of SiGAT since it involves cubic triangle extraction. The ego-network construction of TrustSGCN introduces a high level of precomputation overhead of complexity 𝒪(|𝒱||ℰ|). On average, it takes 𝟕𝟎𝟎 epochs to converge for ASRA-GNN, compared to 𝟐𝟎𝟎 epochs for TrustSGCN, which proves that end-to-end joint training is a more consistent source of training than a separated two-stage pipeline.

6. NOTATION

The notations employed throughout this article are formally defined and summarized in Table 7

Table 7. Summary of Mathematical Notation.

7. CONCLUSIONS

We introduced a unified end-to-end model, termed ASRA-GNN, for friend recommendation on signed directed social networks, which rectifies four primary deficiencies in current signed GNN methodologies through Sign-Aware Structural Role Attention, Locally Adaptive Theory Mixing, and a Signed Contrastive Recommendation Loss. Both Bitcoin-OTC and Bitcoin-Alpha evaluations demonstrate consistent enhancement across all four ranking measures, with ablation studies validating the unique and statistically significant impact of each individual component. ASRA-GNN opens a new direction for friend recommendation on signed weighted directed social graphs, demonstrating that graph-theoretic rigour, adaptive social theory integration, and recommendation-specific supervision are complementary design objectives.

CONFLICTS OF INTEREST

The authors declare no conflict of interest.

ACKNOWLEDGEMENTS

The authors are grateful to thePG & Research Department of Mathematics at Nirmala College for Women for their academic support and for providing a conducive environment for this multidisciplinary research. Finally, we acknowledge the contributions of the research community whose previous work in network psychometrics laid the foundation for this study.

REFERENCES

[1] Derr Tyler, Ma Yao, and Tang J., (2018), “Signed graph convolutional network,” Proc. IEEE ICDM, Vol. 1, pp. 929-934.

[2] Heider Fritz, (1958),The Psychology of Interpersonal Relations, New York: Wiley.

[3] Dhruba Jyoti Borah and Abhijit Sarma, “Detection of Peer-to-Peer Botnets Using Graph Mining,” International Journal of Computer Networks & Communications (IJCNC), Vol. 15, No. 2, pp. 105– 120, March 2023. DOI: 10.5121/ijcnc.2023.15206.

[4] Huang Junjie et al., (2019), “Signed graph attention networks,” Proc. ICANN, Vol. 1, pp. 566-577.

[5] Velickovic Petar et al., (2018), “Graph attention networks,” Proc. ICLR.

[6] Guha R. et al., (2004), “Propagation of trust and distrust,” Proc. WWW, Vol. 1, pp. 403-412.

[7] Huang Junjie et al., (2021) “Signed directed graph neural networks,” Proc. AAAI, Vol. 1, pp. 4166- 4173.

[8] Liu Yuan, (2022), “Powering signed graph convolutional networks with signed directed relation,” Proc. ACM SIGIR. International Journal of Computer Networks & Communications (IJCNC) Vol 18, No 4, July 2026 35

[9] He Xiangnan et al., (2020), “LightGCN: Simplifying and powering graph convolution network for recommendation,” Proc. ACM SIGIR, Vol. 1, pp. 639-648.

[10] Kim Min-Jae, Lee Young-Chan, and Kim Sang-Wook, (2023), “TrustSGCN: Learning trustworthiness on edge signs for effective signed graph convolutional networks,” Proc. ACM SIGIR, Vol. 1, pp. 2451-2455.

[11] Luiz Marcus Monteiro de Almeida Santos and Admilson de Ribamar Lima Ribeiro, “MY-DIRECT: A Middleware for P2P Mobile Social Networks”, International Journal of Computer Networks & Communications (IJCNC), Vol. 6, No. 3, pp. 177–192, May 2014. DOI: 10.5121/ijcnc.2014.6314.

[12] Emerson Richard, (1976), “Social exchange theory,” Annual Review of Sociology, Vol. 2, pp. 335- 362.

[13] Granovetter Mark, (1973), “The strength of weak ties,” American Journal of Sociology, Vol. 78, No. 6, pp. 1360-1380.

[14] Festinger Leon, (1957),A Theory of Cognitive Dissonance, Stanford, CA: Stanford Univ. Press.

[15] Rendle Steffen et al., (2009), “BPR: Bayesian personalized ranking from implicit feedback,” Proc. UAI, Vol. 1, pp. 452-461.

[16] Schroff Florian, Kalenichenko Dmitry, and Philbin James, (2015), “FaceNet: A unified embedding for face recognition and clustering,” Proc. CVPR, Vol. 1, pp. 815-823.

[17] Borgatti Stephen and Everett Martin, (1992), “Notions of position in social network analysis,” Sociological Methodology, Vol. 22, pp. 1-35.

AUTHORS

Pharsana Parveen M is a Research Scholar in the PG and Research Department of Mathematics, Nirmala College for Women, Coimbatore, specializing in graph-theoretic models and their applications in modern recommendation systems.

Dr. Stanis Arul Mary A, Assistant Professor in the PG and Research Department of Mathematics, Nirmala College for Women, Coimbatore, is an accomplished researcher in graph theory with significant work in graph labeling, domination, and coloring parameters, structural graph algorithms, and their interdisciplinary applications in network analysis and mathematical modelling.

Leave a comment

Information

This entry was posted on August 22, 2026 by .