# A Neural-Symbolic Approach to Extract Trust Patterns in IoT Scenarios
## 4 A T-Pattern Model Overview  
In this section, we provide an overview of the T-pattern model [11]. Before introducing the mathematical formalism, in order to make it clearer and more understandable, we provide a leading example involving two smart IoT objects, denoted as \(o_{1}\) and \(o_{2}\) (Figure 1) within an environment \(E\) represented by the tuple \(\left\langle O,\Delta,\Phi,\tau\right\rangle\), where  
* \(O=\left\{o_{1},o_{2}\right\}\) is a set of smart IoT objects;
* \(G=\) is a set of groups (in this example, no specific groups are considered, so \(G=\left\{\emptyset\right\}\));
* \(\Delta=\left\{R,H,S,X\right\}\) is a set of trust issues, namely reliability (\(R\)), honesty (\(H\)), security (\(S\)), and expertise (\(X\));
* \(\Phi\) maps the mutual confidence values among the smart IoT objects. In this example, each confidence value is set to null, assuming there is no initial knowledge about the mutual trustworthiness of the other smart IoT objects. (For simplicity, we assume the existence of a single group representing the entire social community \(E\), and thus \(\Lambda\) is omitted). * \(\tau\) is a set consisting of two T-patterns (i.e., the links \(\left\langle o_{1},o_{2},N_{o_{1}o_{2}}\right\rangle\) and \(\left\langle o_{2},o_{1},N_{o_{2}o_{1}}\right\rangle\) in Figure 1, which represent the initial unsymmetrical knowledge of how the two smart IoT objects perceive each other's trustworthiness). In the proposed example, network \(N_{o_{1}o_{2}}\) (on the left in Figure 1) shows that \(o_{1}\) derives the honesty of \(o_{2}\) from its reliability using the derivation rule \(R\stackrel{{ 0.7}}{{\rightarrow}}H\), with a ratio of \(0.7\). In other words, \(o_{1}\) trusts \(o_{2}\)'s honesty at \(70\%\) of its reliability level, even without prior direct experience of \(o_{2}\)'s honesty, provided that \(o_{2}\)'s reliability has been verified. Similarly, \(N_{o_{1}o_{2}}\) illustrates that \(o_{1}\) infers the security of \(o_{2}\) based on its honesty using the derivation rule \(H\stackrel{{ 0.9}}{{\rightarrow}}S\), with a ratio of \(0.9\), again without any previous experience regarding \(o_{2}\)'s security. Finally, in the right part of Figure 1, the network \(N_{o_{2},o_{1}}\) reflects the following derivation rules, with the respective ratios indicated. \[R\overset{0.7}{\rightarrow}H;\qquad H\overset{0.9}{\rightarrow}S;\qquad H \overset{0.6}{\rightarrow}X;\qquad X\overset{0.8}{\rightarrow}R \tag{1}\]  
In our framework, a P2P T-pattern is formally defined as a tuple \(\tau=\langle N_{\Delta},o_{1},o_{2},\Lambda\rangle\), where \(N_{\Delta}\) represents a network that describes peer-to-peer trust relationships for the ordered pair of smart IoT objects \(o_{1}\) and \(o_{2}\), in the context of both the group \(\Lambda\) of smart IoT objects and the group \(\Delta\) of trust issues. In essence, a P2P T-pattern captures how \(o_{1}\) perceives trust in \(o_{2}\) within the context of a group \(\Lambda\) for specific trust issues. Formally, the network \(N_{\Delta}=\langle V,L\rangle\) consists of a set of trust issues \(V\subseteq\Delta\) and a set \(L\) of links between these trust issues. For any pair of trust issues \(\delta_{1},\delta_{2}\in\Delta\), the link \(l\in L\) is represented by the ordered tuple \(l=\langle\delta_{1},\delta_{2},\Lambda,w\rangle\), where \(\Lambda\) is the group context and \(w\) is a real-valued weight in the range \([0,1]\). In the context of a P2P T-pattern, the weight \(w\) quantifies the perceived strength of the relationship between trust issues \(\delta_{1}\) and \(\delta_{2}\) as assessed by \(o_{1}\) in regard to \(o_{2}\), and is calculated as follows:  
\[w=\frac{\phi_{o_{1},o_{2},\Lambda}(\delta_{1})}{\phi_{o_{1},o_{2},\Lambda}( \delta_{2})} \tag{2}\]  
which implies that \(\phi_{o_{1},o_{2},\Lambda}(\delta_{1})=w\cdot\phi_{o_{1},o_{2},\Lambda}(\delta _{2})\).