## 4 Discussions Alongside Numerical Experiments
### LTN-Based Intrusions Detection in Network Traffic
The transparent part in each type of connection represents the removed data after cleaning. Figure 2: Distribution of data before removal of duplicates. \[\forall x_{normal}:P(x_{normal},normal) \forall x:\
eg(P(x,normal)\wedge P(x,U2R))\] \[\forall x_{DOS}:P(x_{DOS},DOS) \forall x:\
eg(P(x,DOS)\wedge P(x,probe))\] \[\forall x_{probe}:P(x_{probe},probe) \forall x:\
eg(P(x,DOS)\wedge P(x,R2L))\] \[\forall x_{R2L}:P(x_{R2L},R2L) \forall x:\
eg(P(x,DOS)\wedge P(x,U2R))\] \[\forall x_{U2R}:P(x_{U2R},U2R) \forall x:\
eg(P(x,R2L)\wedge P(x,probe))\] Figure 2.0 Figure 2.1 An explanation for the proposed set of axioms is needed. In top-down order:  
* All the non-attacks should have label normal;
* All the \(DOS\) attacks should have label \(DOS\);
* All the probe attacks should have label probe;
* All the \(R2L\) should have label \(R2L\);
* All the \(U2R\) attacks should have label \(U2R\);
* If an example \(x\) is labelled as normal, it cannot be labelled as \(DOS\) too;
* If an example \(x\) is labelled as normal, it cannot be labelled as probe too;
* If an example \(x\) is labelled as normal, it cannot be labelled as \(R2L\) too;
* and so forth...  
Based only on the defined logic, we have calculated the initial satisfiability level to be 0.59471. We concluded that training the model to detect intrusions is crucial. To make a comparison possible, most of the metrics used in training are similar, except for the \(3\phi\) formulas. 1. The level of satisfiability of the Knowledge Base of the training data. 2. The level of satisfiability of the Knowledge Base of the test data. 3. The training accuracy (calculated as the fraction of the labels that are correctly predicted). 4. The test accuracy (same thing, but for the test samples). 5. The level of satisfiability of a formula we expect to be true. \(\forall x:p(x,normal)\rightarrow\
eg p(x,DOS)\) (every \(normal\) connection cannot be a \(DOS\) connection and vice-versa)
6. The level of satisfiability of a formula we expect to be false. \(\forall x:p(x,normal)\rightarrow p(x,probe)\) (every \(normal\) connection is also a \(probe\) one)
7. The level of satisfiability of a formula we expect to be false. \(\forall x:p(x,normal)\rightarrow p(x,normal)\) (every \(smurf\) connection has a \(normal\) connection status)  
The training metrics are stored in a.csv file that is also represented in Figure 4 and they can be interpreted as follows. In the first epoch, the level of satisfiability of the Knowledge Base increased from the initial value of 0.54725 to 0.6759 for the training data and 0.7216 for the test data. The results in the beginning of the training may seem atypical, with a higher accuracy for the test data, but it can be explained by the non-uniform intrusion distribution. Satisfiability level in a neuro-symbolic models is similar to a loss function from deep learning and its evolution can be conceptualized as optimizing the model under relaxed first-order logical constraints. This level is introduced in this paper under the name interactive accuracy to keep the terminology as similar and comparable as possible. As the level of satisfiability for our Knowledge Base increased, the standard accuracy also improved, with values ranging from 0.7757 for our train data and 0.9162 for our test data in the first epoch and up to 0.9954 and 0.9947, respectively, in the last epoch of training. Comparably, the accuracy for the dense deep neural network was 0.98863 for train data and 0.9869 for test data. One of the most important aspects of the proposed model is that Symbolic reasoning makes it possible for humans to understand how the model gave a specific output. One can query the satisfaction level of any defined formula and the results or query the constraints while also measuring the accuracy. The satisfaction level is depicted with a fuzzy logic with values in [0, 1], as opposed to the usual boolean value. The network uses the maximization of the satisfaction rules as an objective in learning by optimizing the groundings.