1 Introduction

Signed graphs in which edges can be positive or negative are often used to describe sentiment relationship between individuals in sociology and psychology [19]. Consider a signed directed graph G composed of n vertices (or individuals) labelled as \(1,2,\ldots ,n\) with a weighted adjacency matrix \(X=(x_{ij})\in \mathbb {R}^{n\times n}\), where \(x_{ij}\) represents the strength of sentiment individual i has about j (a positive value indicates friendship/alliance while a negative value dislike/rivalry). The directed graph G is said to be balanced if the product of weights along each undirected cycle (assuming \(x_{ij}\) and \(x_{ji}\) has the same sign for every pair i and j) is positive. The well-known structure theorem [3, 6, 17] shows that G is balanced if and only if G can be divided into at most two sets (or factions) such that all edges within each set have positive weights while those linking the two have negative weights. X is called balanced if the corresponding graph G is balanced. Therefore, a balanced matrix X has the sign pattern \((+)\) or \(\left( {\begin{matrix} + &{}\quad - \\ - &{}\quad + \end{matrix}}\right) \) up to a permutation of vertices.

Structural balance theory [7], originated from social psychology, implies that the individuals in an unbalanced state have an incentive to modify their sentiments so as to reduce the tension and evolve into a balanced one characterized by the structure theorem. In a triad, for example, the balanced structure is epitomized by the wisdom “my friend’s friend is my friend”, “my friend’s enemy is my enemy”, “my enemy’s friend is my enemy”, and “my enemy’s enemy is my friend” [15]. Apart from static characterization, the classical continuous-time dynamical model for structural balance is presented in [9] as a matrix differential equation

$$\begin{aligned} \dot{X}=X^2,\quad \mathrm {or}\ \mathrm {component}\text{- }\mathrm {wisely},\quad \dot{x}_{ij}=\sum _kx_{ik}x_{kj}, \end{aligned}$$
(1.1)

where the sentiment \(x_{ij}\) of individual j held by individual i tends to be driven to the positive direction if \(x_{ik}\) and \(x_{kj}\) have the same sign, while \(x_{ij}\) is pushed to the negative direction if \(x_{ik}\) and \(x_{kj}\) have opposite signs. Numerical simulations show that for almost all initial configuration X(0), the system reaches structural balance in finite time [9]. Theoretical analysis is performed in [11] for random symmetric X(0) and further extended to normal matrix satisfying \(X^T(0)X(0)=X(0)X^T(0)\) in [16]. In [18], a leader is introduced to steer the system to a desired friendship state. An alternative model considering both states of vertices and edges is introduced in [1], in which the resulting steady state can be either balanced or unbalanced.

In practice, when adjusting the sentiment \(x_{ij}\) in (1.1), individual i can arguably obtain only the perceived sentiment \(\hat{x}_{kj}\), which usually differs from the true sentiment \(x_{kj}\) of individual j held by individual k. In social influence theory [8], for instance, \(x_{kj}\) presents the attitude of k towards j, which is defined as the individual k’s internal evaluation of j that cannot be directly perceived or observed by i while \(\hat{x}_{kj}\) is the expressed opinion that is perceived by i. Such a discrepancy has been well documented in social psychology and may be caused externally by normative environment pressures [10] or internally by stubbornness regarding initial impression [12]. To model the perceived sentiment, we consider the following dynamical system:

$$\begin{aligned} \left\{ \begin{array}{l} \dot{X}=X\hat{X},\\ \hat{X}=\phi X+(1-\phi )Y, \end{array}\right. \end{aligned}$$
(1.2)

where \(Y=Y(t)\in \mathbb {R}^{n\times n}\) is a known function encoding the factors influencing the appraisal, and the constant \(\phi \in [0,1]\) describes the individuals’ susceptibility to influence (maximally 0, and minimally 1). When \(\phi =1\), we reproduce the classical model (1.1), where the perceived sentiment coincides with the true attitude. Capitalizing matrix exponential [2], we will solve the Eq. (1.2) for general Y and study the structural balance for a special scenario \(Y=X(0)\) underscoring the influence of initial impression. As it turns out, for a general initial condition X(0), the re-scaled solution of (1.2) converges to four factions in finite time when \(Y=X(0)\). The balanced state of two factions can be achieved under mild assumptions on X(0), extending the symmetric [11] and normal [16] cases. It is also worth noting that the dynamics (1.2) also applies to the self-identity \(x_{ii}\). A distinctive feature of our model is that \(x_{ii}\) in general is not monotonically increasing as compared to the models ignoring the difference between true and perceived sentiment (see, e.g. [4, 5, 11]). Here, the confidence in oneself is allowed to be strengthened as well as attenuated.

The rest of the paper is organized as follows. The main results are presented in Sect. 2 and the proofs are given in Sect. 3. The paper is concluded in Sect. 4.

2 Main Results

Theorem 2.1

Assume that \(Y(t):[0,T]\mapsto \mathbb {R}^{n\times n}\) is continuous and for all \(0\le t_1<t_2\le T\), \(Y(t_2)\int _{t_1}^{t_2}Y(\tau )\mathrm{d}\tau =\int _{t_1}^{t_2}Y(\tau )\mathrm{d}\tau Y(t_2)\). Then the matrix differential equation (1.2) with initial nonsingular X(0) has a unique solution

$$\begin{aligned} X(t)=\left[ e^{-\int _0^t(1-\phi )Y(\tau )\mathrm{d}\tau }X^{-1}(0)-\phi \int _0^te^{-\int _s^t(1-\phi )Y(\tau )\mathrm{d}\tau }\mathrm{d}s\right] ^{-1} \end{aligned}$$
(2.1)

for \(t\in [0,T]\).

Notice that the solution is nonsingular on [0, T] provided X(0) is nonsingular. Moreover, the influence of Y is eliminated from the system when \(\phi =1\). In this case, the solution (2.1) reduces to \(X(t)=X^{-1}(0)-tI\), which was obtained in [11] for symmetric X(0) through matrix Riccati equation method; see also [17] for an alternative approach.

For vectors \(v,w\in \mathbb {R}^n\), let \(v^\mathsf{T}\) be the transpose of v and \(\langle v,w\rangle =v^\mathsf{T}w\) be the Euclidean inner product of them. Let \(\mathcal {M}\) be the \(n\times n\) real matrix ensemble, where matrix entries have independent Gaussian distribution with mean zero and variance one [13].

Theorem 2.2

Assume that n is even, \(X(0)\in \mathcal {M}\) is nonsingular and has the largest positive eigenvalue \(\lambda \), which is simple. Suppose that \(\phi \in (0,(\lambda +2)^{-1})\). Define \(t^*:=\frac{1}{(1-\phi )\lambda }\ln \left( \frac{1}{\phi \lambda }\right) \). Then with probability converging to 1 as n goes to infinity, the matrix differential equation (1.2) with \(Y=X(0)\) has a unique solution for \(t\in [0,t^*)\), and

$$\begin{aligned} \lim _{t\rightarrow t^*}\left( \frac{1}{(1-\phi )\lambda e^{t(1-\phi ) \lambda }}-\frac{\phi }{1-\phi }\right) X(t)=vw^\mathsf{T}, \end{aligned}$$
(2.2)

where v is the unit right eigenvector of X(0) associated with \(\lambda \) and \(w^\mathsf{T}\) is the left eigenvector of X(0) associated with \(\lambda \) satisfying \(\langle v,w\rangle =1\).

Several remarks are in order. First, according to the assumption, we have \(0\,{<}\,\phi <1/2\). This means the perceived sentiments of individuals in the network are sufficiently susceptible to the influence of X(0). Taking into consideration the classical model with \(\phi =1\), i.e., (1.1), there is still a gap in the range \(\phi \in [1/2,1)\) for weak susceptibility. Second, up to a permutation of entries the sign patterns of v and \(w^\mathsf{T}\) become \(v=(+ + - -)^\mathsf{T}\) and \(w^\mathsf{T}=(+ - + -)\). Hence, when t is near \(t^*\), the sentiment matrix X(t) has the sign structure \(\left( {\begin{matrix} + &{}\quad - &{}\quad + &{}\quad - \\ +&{}\quad -&{}\quad +&{}\quad - \\ -&{}\quad +&{}\quad -&{}\quad +\\ -&{}\quad +&{}\quad -&{}\quad + \end{matrix}}\right) \). This indicates that the underlying network G can be partitioned into four factions: two of them contain positive edges within themselves and the other two of them contain negative edges within themselves. The sentiment relationships between these factions are in general not symmetric. Moreover, the self-assessment \(x_{ii}\) of individual i can take both positive and negative values near \(t^*\) allowing their self-identity to be consistent (positive) or inconsistent (negative). These qualitative phenomena have also been observed in [16, 17] for \(\phi =1\). Hence, X(t) is not balanced generally. Third, under some conditions, the balanced structure can also be achieved, which is summarized in the following corollary.

Corollary 2.3

Under the assumptions of Theorem 2.2, we have

$$\begin{aligned} \lim _{t\rightarrow t^*}\left( \frac{1}{(1-\phi )\lambda e^{t(1-\phi ) \lambda }}-\frac{\phi }{1-\phi }\right) X(t)=vv^\mathsf{T} \end{aligned}$$

if and only if the right and left eigenvectors of X(0) corresponding to \(\lambda \) are the same, namely \(v=w\). Furthermore, X(t) is balanced when t is close to \(t^*\) if and only if the eigenvectors v and w have the same sign pattern.

From the proof of Theorem 2.2 below, it will be clear that the condition \(v=w\) always holds for symmetric and normal X(0). In this sense, Corollary 1 complements previous results (with \(\phi =1)\) for symmetric and normal initial configurations (see, e.g. [11, 16,17,18]) by considering the range of \(\phi \in (0,1/2)\).

3 Proofs

In this section, we present the proofs of the main results.

Proof of Theorem 2.1

The proposed dynamics (1.2) can be written as \(\dot{X}=\phi X^2+(1-\phi )XY\). Recall that \(\phi \in [0,1]\) is a constant. By setting \(Z=X^{-1}\), we obtain

$$\begin{aligned} \dot{Z}&=\dot{X}^{-1}=-X^{-1}\dot{X}X^{-1}=-\phi I-(1-\phi )YX^{-1}\\&=-\phi I-(1-\phi )YZ, \end{aligned}$$

where \(I\in \mathbb {R}^{n\times n}\) is the identity matrix. This linear matrix differential equation with nonsingular initial value X(0) has a unique solution (see, e.g. [2, p. 678])

$$\begin{aligned} Z(t)=e^{-\int _0^t(1-\phi )Y(\tau )\mathrm{d}\tau }Z(0)-\phi \int _0^te^{-\int _s^t(1-\phi )Y(\tau )\mathrm{d}\tau }\mathrm{d}s, \end{aligned}$$

where \(Z(0)=X^{-1}(0)\). Therefore, we obtain the result using \(X(t)=Z^{-1}(t)\). \(\square \)

Proof of Theorem 2.2

It is easy to check that all the hypotheses in Theorem 2.1 are satisfied when \(Y=X(0)\). Let V be the \((n-1)\)-dimensional subspace generated by the span of all eigenspaces of X(0) except \(\mathrm {span}\{v\}\). Let \(v_2,v_3,\ldots , v_n\) be an orthonormal basis of V. Since \(X(0)\in \mathcal {M}\) is nonsingular and has the simple largest positive eigenvalue \(\lambda \), we have the decomposition

$$\begin{aligned} X(0)=A\left( \begin{array}{cc}\lambda &{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad B\end{array}\right) A^{-1}, \end{aligned}$$
(3.1)

where \(\mathbf{0}\in \mathbb {R}^{n-1}\) with all entries being zero and \(A=(v, v_2, v_3,\ldots ,v_n)\in \mathbb {R}^{n\times n}\) is nonsingular. Since \(w^\mathsf{T}\) is the left-eigenvector of X(0) associated with \(\lambda \) satisfying \(\langle v,w\rangle =1\) and \(I=A^\mathsf{T}A^{-\mathsf T}\), using (3.1) we know that the first column of \(A^{-\mathsf T}\) is w and

$$\begin{aligned} \lambda w=X^\mathsf{T}(0)w&=A^{-\mathsf T}\left( \begin{array}{cc}\lambda &{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad B\end{array}\right) A^\mathsf{T}w\\&=A^{-\mathsf T}\left( \begin{array}{cc}\lambda &{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad B\end{array}\right) \left( 1, v_2^\mathsf{T}w,\ldots ,v_n^\mathsf{T}w \right) ^\mathsf{T}, \end{aligned}$$

which gives rise to \(v_i^\mathsf{T}w=0\) for \(i=2,3,\ldots ,n\). Hence, \(w\in V^{\perp }\).

Note that for any matrix M, the matrix exponential \(e^M\) is always nonsingular and \((e^M)^{-1}=e^{-M}\). It follows from Theorem 2.1 and (3.1) that

$$\begin{aligned} X(t)&=\left[ e^{-\int _0^t(1-\phi )Y(\tau )\mathrm{d}\tau }X^{-1}(0)-\phi \int _0^te^{-\int _s^t(1-\phi )Y(\tau )\mathrm{d}\tau }\mathrm{d}s\right] ^{-1}\nonumber \\&=\left\{ e^{-\int _0^t(1-\phi )Y(\tau )\mathrm{d}\tau }A\left[ \left( \begin{array}{cc}\lambda ^{-1}&{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad B^{-1}\end{array}\right) \right. \right. \nonumber \\&\left. \left. \quad -\,\phi A^{-1} e^{\int _0^t(1-\phi )Y(\tau )\mathrm{d}\tau }\int _0^te^{-\int _s^t(1-\phi )Y(\tau )\mathrm{d}\tau }\mathrm{d}s\cdot A\right] A^{-1}\right\} ^{-1}\nonumber \\&=A\left[ \left( \begin{array}{cc}\lambda ^{-1}&{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad B^{-1}\end{array}\right) -\phi \int _0^te^{\int _0^s(1-\phi )A^{-1}Y(\tau )A\mathrm{d}\tau }\mathrm{d}s\right] ^{-1}\nonumber \\&\quad \cdot A^{-1}e^{\int _0^t(1-\phi )Y(\tau )\mathrm{d}\tau }, \end{aligned}$$
(3.2)

where we have used the matrix exponential property for nonsingular matrix A:

$$\begin{aligned} A^{-1}\int _0^te^{(1-\phi )\int _0^sY(\tau )\mathrm{d}\tau }\mathrm{d}sA=\int _0^te^{(1-\phi )\int _0^sA^{-1}Y(\tau )A\mathrm{d}\tau }\mathrm{d}s. \end{aligned}$$

In view of (3.1), (3.2) and \(Y=X(0)\), we derive

$$\begin{aligned} X(t)&=A\left[ \left( \begin{array}{cc}\lambda ^{-1}&{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad B^{-1}\end{array}\right) -\phi \int _0^te^{\int _0^s(1-\phi )A^{-1}X(0)A\mathrm{d}\tau }\mathrm{d}s\right] ^{-1}\nonumber \\&\quad \cdot \, A^{-1}e^{\int _0^t(1-\phi )X(0)\mathrm{d}\tau }\nonumber \\&=A\left[ \left( \begin{array}{cc}\lambda ^{-1}&{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad B^{-1}\end{array}\right) -\phi \int _0^te^{(1-\phi )s\left( \begin{array}{cc}\lambda &{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad B\end{array}\right) }\mathrm{d}s\right] ^{-1}A^{-1}e^{(1-\phi )tX(0)}\nonumber \\&=A\left\{ \left( \begin{array}{cc}\lambda ^{-1}&{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad B^{-1}\end{array}\right) -\frac{\phi }{1-\phi }\left( \begin{array}{cc}\lambda ^{-1}&{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad B^{-1}\end{array}\right) \right. \nonumber \\&\left. \quad \cdot \,\left[ e^{(1-\phi )t\left( \begin{array}{cc}\lambda &{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad B\end{array}\right) }-I\right] \right\} ^{-1}A^{-1}e^{(1-\phi )tX(0)}\nonumber \\&=A\left\{ \left( \begin{array}{cc}\lambda ^{-1}&{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad B^{-1}\end{array}\right) \left[ \frac{1}{1-\phi }I-\frac{\phi }{1-\phi }e^{(1-\phi )t\left( \begin{array}{cc}\lambda &{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad B\end{array}\right) }\right] \right\} ^{-1}\nonumber \\&\quad \cdot \, A^{-1}e^{(1-\phi )tX(0)}, \end{aligned}$$
(3.3)

where we have applied (3.1) in the second equality, and the equation \(e^{tM}-I=\int _0^tMe^{sM}\mathrm{d}s\) for any matrix M and \(t\ge 0\) (see, e.g. [2, pp. 645]) in the third equality above. It is straightforward to calculate that

$$\begin{aligned} e^{(1-\phi )t\left( \begin{array}{cc}\lambda &{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad B\end{array}\right) }=\left( \begin{array}{cc}e^{(1-\phi )t\lambda }&{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad e^{(1-\phi )tB}\end{array}\right) . \end{aligned}$$
(3.4)

Hence, by (3.3), we have for \(t\in [0,t^*)\),

$$\begin{aligned} X(t)&=A\left\{ \left( \begin{array}{cc}\lambda ^{-1}&{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad B^{-1}\end{array}\right) \left[ \frac{1}{1-\phi }I-\frac{\phi }{1-\phi } \left( \begin{array}{cc}e^{(1-\phi )t\lambda }&{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad e^{(1-\phi )tB}\end{array}\right) \right] \right\} ^{-1}\nonumber \\&\quad \cdot \, A^{-1}e^{(1-\phi )tX(0)}\nonumber \\&=A\left( \begin{array}{cc}\frac{1}{(1-\phi )\lambda }-\frac{\phi e^{(1-\phi )t\lambda }}{1-\phi }&{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad \frac{1}{1-\phi }B^{-1}-\frac{\phi }{1-\phi }e^{(1-\phi )tB}\end{array}\right) ^{-1}A^{-1}e^{(1-\phi )tX(0)}\nonumber \\&=A\left( \begin{array}{cc}\left( \frac{1}{(1-\phi )\lambda }-\frac{\phi e^{(1-\phi )t\lambda }}{1-\phi }\right) ^{-1}&{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad O\end{array}\right) A^{-1}e^{(1-\phi )tX(0)}\nonumber \\&\quad +\,A\left( \begin{array}{cc}0&{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad \left( \frac{1}{1-\phi }B^{-1}-\frac{\phi }{1-\phi }e^{(1-\phi )tB}\right) ^{-1}\end{array}\right) A^{-1}e^{(1-\phi )tX(0)}, \end{aligned}$$
(3.5)

where we have used (3.4) in the first equality and O is the \((n-1)\times (n-1)\) matrix of entries all being zero. Similarly as (3.4),

$$\begin{aligned} e^{(1-\phi )tX(0)}=A\left( \begin{array}{cc}e^{(1-\phi )t\lambda }&{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad e^{(1-\phi )tB}\end{array}\right) A^{-1}. \end{aligned}$$

Feeding this into (3.5), we arrive at

$$\begin{aligned} X(t)&=A\left( \begin{array}{cc}\left( \frac{1}{(1-\phi )\lambda }-\frac{\phi e^{(1-\phi )t\lambda }}{1-\phi }\right) ^{-1}e^{(1-\phi )t\lambda }&{}\mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}O\end{array}\right) A^{-1}\nonumber \\&\quad +\,A\left( \begin{array}{cc}0&{}\quad \mathbf{0}^\mathsf{T}\\ \mathbf{0}&{}\quad \left( \frac{1}{1-\phi }B^{-1}-\frac{\phi }{1-\phi }e^{(1-\phi )tB}\right) ^{-1}e^{(1-\phi )tB}\end{array}\right) A^{-1}. \end{aligned}$$
(3.6)

Since n is even, X(0) must have at least one real eigenvalue which is strictly less than \(\lambda \). Hence, the second term of (3.6) is O(1) in the time interval \([0,t^*]\) by the definition of \(t^*\), namely it is bounded uniformly. Also notice that \(t^*>0\) if and only if \(\phi <(\lambda +2)^{-1}\).

Recalling the construction of matrix A, and by (3.6) we have for \(t\in [0,t^*)\),

$$\begin{aligned} X(t)=\left( \frac{1}{(1-\phi )\lambda }-\frac{\phi e^{(1-\phi )t\lambda }}{1-\phi }\right) ^{-1}e^{(1-\phi )t\lambda }vw^\mathsf{T}+O(1), \end{aligned}$$

where we used the fact that the first row of \(A^{-1}\) is \(w^\mathsf{T}\) (since \(A^{-1}A=I\)). Therefore, for a given initial configuration X(0),

$$\begin{aligned} \lim _{t\rightarrow t^*}\left( \frac{1}{(1-\phi )\lambda e^{t(1-\phi ) \lambda }}-\frac{\phi }{1-\phi }\right) X(t)=vw^\mathsf{T}. \end{aligned}$$

By [14, p. 799], with probability tending to 1 as n goes to infinity, \(X(0)\in \mathcal {M}\) satisfies the property that X(0) has the largest positive eigenvalue which is simple and X(0) is nonsingular. This completes the proof of Theorem 2.2. \(\square \)

4 Conclusion

This paper studies a continuous-time dynamics modeling social networks presenting patterns of amity and enmity. We differentiate the individuals’ true sentiment X from their perceived sentiment \(\hat{X}\) with an encoding function Y and an adjustable susceptible parameter \(\phi \in [0,1]\) veering from “no difference between X and \(\hat{X}\)” to “no relevance between X and \(\hat{X}\)”. We solve the dynamical system for general Y and show a finite-time convergence to a four-faction solution when \(Y=X(0)\). The social balance solution with two factions is achieved under some mild assumptions on the initial profile X(0), which turn out to be less restrictive than symmetric or normal matrices. Future work will be directed at closing the gap for social balance in \(\phi \in [1/2,1)\) and validating our results with empirical data.