Consistency
Context
Consistency compares two joint probabilities for an -dimensional observation .
- the joint probability of the reference model, i.e. the current Bayesian network that represents the dependencies between the variables,
- the joint probability of the straw model, i.e. the fully unconnected network, in which all the variables are marginally independent.
where and are the log-losses associated with the evidence by using the straw model () and the reference model () respectively.
The log-loss reflects the cost (in bits) per instance of using our model, i.e. the number of bits that are needed to encode the probability of the pieces of evidence. The lower the probability is, the higher the log-loss is.
Positive Consistency means the reference model assigns the observation a higher probability and incurs lower Log-Loss than the independence baseline. Negative Consistency means the reference model assigns it a lower probability and incurs higher Log-Loss. BayesiaLab calls this a conflict.
Mean Consistency is the average difference in Log-Loss, in bits per observation. A positive mean indicates that the reference model incurs lower average Log-Loss on the observations being evaluated. The sign of the mean depends on the size and weight of the differences as well as their signs. See Information Gain for the current terminology.
Example
Let’s suppose we have the following reference structure with two Boolean nodes, and :

Four different sets of two-dimensional evidence can be generated from this model:
In both examples below, each row’s Consistency is weighted by its probability under the reference model. Multiply each row’s Consistency by its reference probability and add the products. Calculating from the probabilities before rounding each row’s Consistency gives 0.531 bits for strong dependency and 0.007 bits for weak dependency.
Strong dependency




| Evidence | Joint Probability | Consistency/Conflict | |
|---|---|---|---|
| Reference | Straw | ||
| 0.45 | 0.25 | 0.848 | |
| 0.05 | 0.25 | −2.322 | |
| 0.05 | 0.25 | −2.322 | |
| 0.45 | 0.25 | 0.848 | |
| Mean | 0.531 | ||
Weak dependency




| Evidence | Joint Probability | Consistency/Conflict | |
|---|---|---|---|
| Reference | Straw | ||
| 0.275 | 0.25 | 0.138 | |
| 0.225 | 0.25 | −0.152 | |
| 0.225 | 0.25 | −0.152 | |
| 0.275 | 0.25 | 0.138 | |
| Mean | 0.007 | ||
Prior to version 6.0, the Consistency/Conflict metric was only available in:
- Evidence Analysis Report, for measuring the consistency of the pieces of evidence currently set in the monitors,
- Batch Joint Probability, for measuring the consistency of the pieces of evidence recorded in the associated dataset.
New feature: Consistency as a network performance metric

The chart shows the distribution of Log-Loss across observations in the associated dataset. The blue bars represent the reference model and the red bars represent the independence baseline.

Bars farther left indicate lower Log-Loss and therefore higher probabilities for the observations. In this example, the reference model has lower mean Log-Loss.
As before, the straw model is the fully unconnected network. However, if the network contains discretized variables, we have a choice regarding the discretization. We can either keep the same discretization for both networks, or choose an alternative discretization algorithm for the straw model, with the requested number of bins being the same as the number of bins in the reference model.

Beyond the graphical comparison, the following Consistency Gain can be used to quantify the discrepancy between the reference model () and the straw model ():
for the evidence , and
for the entire data set, where is the number of rows.
Example
Again, we use the simple reference structure with two Boolean nodes, and .
Strong dependency
Here, the associated dataset contains the 4 different weighted pieces of evidence that can be generated from the joint probability distribution represented by the reference model.

| Evidence | Joint Probability | Log-Loss | ||
|---|---|---|---|---|
| Reference | Straw | Reference | Baseline | |
| 0.45 | 0.25 | 1.152 | 2 | |
| 0.05 | 0.25 | 4.322 | 2 | |
| 0.05 | 0.25 | 4.322 | 2 | |
| 0.45 | 0.25 | 1.152 | 2 | |
| Consistency Mean | 0.531 | |||

Weak dependency
Here, the associated dataset contains the 4 different weighted pieces of evidence that can be generated from the joint probability distribution represented by the reference model.

| Evidence | Joint Probability | Log-Loss | ||
|---|---|---|---|---|
| Reference | Straw | Reference | Baseline | |
| 0.275 | 0.25 | 1.862 | 2 | |
| 0.225 | 0.25 | 2.152 | 2 | |
| 0.225 | 0.25 | 2.152 | 2 | |
| 0.275 | 0.25 | 1.862 | 2 | |
| Consistency Mean | 0.007 | |||

New: Relationship Analysis Report

As shown above, the Consistency Mean offers a good way to express the strength of the dependencies represented by the reference model. However, this metric can only be computed if data is available to sample the joint probability distribution.
If no data is associated with the model, the Consistency Mean can be efficiently approximated by computing the average of the sum of all Arc Forces (Kullback-Leibler Divergence) and the Mutual Information between all pairs of nodes that are connected by an arc. This Consistency Estimate is available in the first part of the Relationship Analysis Report:
