\section{Subjective Logic}
\label{sec:sl}

\ac{sl} accommodates uncertainty through subjective opinions, allowing for the representation of uncertainty in real-world scenarios. This is particularly valuable in \ac{scs}, where trust evaluations often rely on uncertain or incomplete information. This section gives a concise summary of \ac{sl} concepts pertinent to the trust management framework.

\subsection{Subjective Opinion}

Within \ac{sl}, subjective opinions serve as expressions of probabilities influenced by varying degrees of uncertainty. This enriched probabilistic logic framework allows for the explicit inclusion of uncertainty and subjective belief ownership, enabling the expression of confidence or doubt in beliefs. Opinions in \ac{sl} can be likened to Dirichlet and Beta probability density functions under specific mapping.

In \ac{sl} a domain represents the set of all possible outcomes or states that a variable can have. The cardinality \( k \) refers to the number of possible outcomes or states within a domain.


\begin{definition}\label{def:bin_op}
(Binomial Opinion~\cite{josang2016subjective}).

In \ac{sl} a binomial opinion \( \omega_{x} = (b_{x}, d_{x}, u_{x}, a_{x}) \), \( \forall b_{x}, d_{x}, u_{x}, a_{x} \in [0, 1]\) represents a probabilistic belief about a proposition in a binary domain that can have exactly two values \(\mathbb{X} = \{x, \overline{x} \}\). And let \( X \in \mathbb{X}\) be a random variable.

\end{definition}

\( b_{x} \): is the belief mass (i.e \( X = x \)),

\( d_{x} \): is the disbelief mass (i.e \( X = \overline{x} \)),

\( u_{x} \): is the uncertainty mass,

\( a_{x} \):  is the base rate - the prior probability of \( X = x \)


With the additivity requirement:

\begin{equation}
b_{x} + d_{x} + u_{x} = 1
\label{eq:add_req}
\end{equation}

The projected probability of a binomial opinion concerning value \( x \) is defined by:

\begin{equation}
P(x) = b_{x} + a_{x} u_{x}
\label{eq:bin_prob}
\end{equation}


\begin{definition}\label{def:mln_op}
(Multinomial Opinion~\cite{josang2016subjective}).

A multinomial opinion in \ac{sl} is represented as a tuple of three values \( \omega_{Y} = (\textbf{b}_{Y}, u_{Y}, \textbf{a}_{Y}) \) applies to multinomial domains \( \mathbb{Y}\) with more than two possible outcomes or states that a variable can have i.e. \( k = \lvert  \mathbb{Y} \lvert  > 2 \). It deals with opinions where states are mutually exclusive and exhaustive options. Each state has its own projected probability of occurrence where:

\end{definition}



\( \textbf{b}_{Y} \): The belief mass distribution over \( \mathbb{Y}\),

\( u_{Y} \): The uncertainty mass.

\( \textbf{a}_{Y} \): The base rate distribution over \( \mathbb{Y}\)

The satisfies the following

\begin{equation}
\begin{aligned}
& \textbf{b}_{Y} : \mathbb{Y} \rightarrow [0, 1], \\
& u_{Y} + \sum_{y \in \mathbb{Y}} \textbf{b}_{Y}(y) = 1
\end{aligned}
\label{eq:mn_bmd}
\end{equation}

The base rate distribution \( a_{Y} \) is the base rate probability assignment to all possible values of \( Y \in \mathbb{Y}\):

\begin{equation}
\begin{aligned}
& \textbf{a}_{Y} : \mathbb{Y} \rightarrow [0, 1], \\
& \sum_{y \in \mathbb{Y}} \textbf{a}_{Y}(y) = 1
\end{aligned}
\label{eq:mn_brd}
\end{equation}

In multinomial opinions the belief mass distribution \( \textbf{b}_{Y} \) and the base rate distribution \( \textbf{a}_{Y} \) both have \( k \) parameters. While the uncertainty mass \( u_{Y} \) is a scalar value.

The projected probability of a multinomial opinion is defined by:

\begin{equation}
P_{Y}(y) = \textbf{b}_{Y}(y) + \textbf{a}_{Y}(y) u_{Y}, \quad \forall y \in \mathbb{Y}
\label{eq:mn_prob}
\end{equation}

Multinomial opinions are a generalisation of binomial opinions, in the same way as Dirichlet PDFs are a generalisation of Beta PDFs~\cite{josang2016subjective}. A multinomial domain can be reduced to a binary domain by mapping multiple possible outcomes into one with only two possible outcomes. It involves restructuring belief masses to accommodate the simplified binary outcomes. 


\begin{definition}\label{def:evidence_op}
(Evidence-Based Opinion~\cite{josang2016subjective}).
Opinions within \ac{sl} may be derived through the analysis of observations collected from the system under scrutiny. The evidence vector \( \textbf{r}_{Y} \) is generated through system observations, where \( \textbf{r}_{Y}(y) \) shows how much evidence there is for each possible outcome in \( y \in \mathbb{Y}\). The belief mass distribution and uncertainty mass values are derived as follows:


\begin{equation}
\begin{aligned}
& \forall y \in \mathbb{Y} \\
& \textbf{b}_{Y}(y) = \frac{\textbf{r}_{Y}(y)}{ W + \sum_{y_{i} \in \mathbb{Y}} \textbf{r}_{Y}(y_{i})}, \\
& {u}_{Y} = \frac{W}{ W + \sum_{y_{i} \in \mathbb{Y}} \textbf{r}_{Y}(y_{i})}
\end{aligned}
\label{eq:evd_op}
\end{equation}

where \( W \) denotes the default non-informative prior weight, set to \( W = 2 \). Default base rate distribution can be set to \( \textbf{a}_{Y}(y) = \frac{1}{k} = \frac{1}{3}\). Base rates can be set to any arbitrary value as long as Eq.~\eqref{eq:mn_brd} is satisfied.

\end{definition}


\subsection{Operators}

\ac{sl} has several operators that facilitate in synthesizing and integrating opinions from multiple sources into a single unified opinion.

\begin{definition}\label{def:cum_fus}
(Cumulative Fusion Operator (\( \oplus \))~\cite{josang2016subjective}).
The cumulative fusion operator (\( \oplus \)) in \ac{sl} is used to combine opinions based on non-overlapping observations. 

Given two binomial opinions \( \omega_{X}^{A} = (b_{X}^{A}, d_{X}^{A}, u_{X}^{A}, a_{X}^{A}) \) and \( \omega_{X}^{B} = (b_{X}^{B}, d_{X}^{B}, u_{X}^{B}, a_{X}^{B}) \), the cumulative fusion operation outputs the combined opinion \( \omega_{X}^{(A \lozenge B)} = \omega_{X}^{A} \oplus \omega_{X}^{B} \) as follows for \( u_{X}^{A} \neq 0 \vee u_{X}^{B} \neq 0 \):


\begin{equation}
\begin{aligned}
& b_{X}^{(A \lozenge B)}(x) = \frac{b_{X}^{A}(x) u_{X}^{B} + b_{X}^{B}(x) u_{X}^{A}}{u_{X}^{A} + u_{X}^{B} - u_{X}^{A}u_{X}^{B}}, \\
& d_{X}^{(A \lozenge B)}(x) = \frac{d_{X}^{A}(x) u_{X}^{B} + d_{X}^{B}(x) u_{X}^{A}}{u_{X}^{A} + u_{X}^{B} - u_{X}^{A}u_{X}^{B}}, \\
& u_{X}^{(A \lozenge B)} = \frac{u_{X}^{A} u_{X}^{B}}{u_{X}^{A} + u_{X}^{B} - u_{X}^{A}u_{X}^{B}}, \\
& a_{X}^{(A \lozenge B)}(x) = \frac{ a_{X}^{A}(x) u_{X}^{B} + a_{X}^{B}(x) u_{X}^{A} - (a_{X}^{A}(x) + a_{X}^{B}(x))u_{X}^{A}u_{X}^{B} }{u_{X}^{A} + u_{X}^{B} - 2u_{X}^{A}u_{X}^{B}}, \\  
& if u_{X}^{A} \neq 1 \vee u_{X}^{B} \neq 1
\end{aligned}
\label{eq:cum_fus}
\end{equation}

\end{definition}

The cumulative fusion operator in subjective logic fuses multiple opinions about the same proposition into a single, combined opinion, taking into account the uncertainty inherent in each opinion.

For example, when employing the evidence-based opinion method in \ac{sl}, the server's performance is observed during non-overlapping hourly time frames and then combined to form a daily opinion. The observations from each hour are initially processed into an hourly opinion, contributing to the overall daily evaluation of the server's performance using the cumulative fusion operator. This enables a thorough analysis of the server's performance throughout the day.