Class 7

Running the Machine Forward and Backward: The Power of Propagation

How Bayesian networks transform hazard data into both predictions and diagnoses - the bidirectional reasoning that traditional tools cannot match

It is Tuesday morning, and the Director of Nursing at St. Catherine's Hospital is staring at a dashboard showing a troubling number: workers' compensation psychological injury claims have doubled in the past quarter. She needs answers, and she needs them to move in two directions. Looking forward, she wants to know: given the restructuring that increased patient loads and the recent departure of two experienced charge nurses, how much worse could things get? Looking backward, she wants to know: of all the workplace changes over the past year - the new rostering system, the increased acuity of patients, the reduced staffing ratios - which ones are most likely driving the spike she is seeing now?

A risk matrix cannot answer either question. A checklist cannot trace causal chains. But the Bayesian network her team built in Chapter 6 can do both - if she knows how to run it. This chapter teaches you how.

Two Directions of Reasoning

In Chapter 5 we learned that Bayes' theorem inverts the direction of probability - it lets us move from P(effect | cause) to P(cause | effect). In Chapter 6 we encoded workplace hazard relationships into a directed acyclic graph with conditional probability tables. Now we connect these two achievements. A Bayesian network, once built, supports two fundamental operations that Judea Pearl (1988) identified as the twin pillars of probabilistic reasoning: predictive reasoning (forward propagation) and diagnostic reasoning (backward propagation).

These are not two different algorithms bolted onto the same model. They are natural consequences of the network's mathematical structure. As Lauritzen and Spiegelhalter (1988) demonstrated, evidence entered at any node in a network can be propagated to every other node through local computations. The graph's topology determines how the updating flows - but the flow itself is bidirectional by nature.

Forward Propagation: From Hazards to Outcomes

Forward propagation answers the predictive question: if we know the state of upstream hazards, what can we expect downstream? You enter evidence at root or parent nodes - clamping "High Job Demands" to present, for instance - and then compute the updated probabilities for all descendant nodes using the conditional probability tables (Koller & Friedman, 2009).

Return to the hospital nursing network from Chapter 6. Suppose we observe that job demands are high and supervisor support is low. We clamp both nodes to their "present" states. The network then uses the CPTs to compute the updated probability of psychological distress, which flows further downstream to update the probability of absenteeism and turnover. Each conditional probability table acts as a local processor: it takes the states of its parent nodes as inputs and outputs the probability distribution for its own node. The message ripples forward, node by node, cause to effect.

This is exactly the kind of scenario modelling that Mariscal et al. (2013) performed when they used a Bayesian network built from data on 11,054 Spanish workers to predict occupational stress probabilities under different combinations of work demands, schedule pressure, and social support. By setting upstream conditions and reading downstream probabilities, they could quantify not just whether stress would increase, but by how much - and under which specific hazard configurations.

Think About It

Before reading on, consider: if a traditional risk matrix rates "High Job Demands" as moderate risk and "Low Supervisor Support" as moderate risk, what does it tell you about the risk when both are present simultaneously? How would a Bayesian network handle this differently?

Backward Propagation: From Outcomes to Causes

Backward propagation answers the diagnostic question: given an observed outcome, which upstream hazards most likely produced it? This is the direction of reasoning that Chapter 3 identified as entirely absent from traditional psychosocial risk tools - and it is where Bayesian networks deliver their most distinctive value.

Here, you enter evidence at an outcome node. You clamp "High Absenteeism" to observed. The network then uses Bayes' theorem - propagated through the graph structure - to update the probabilities of every upstream node. The probability of "High Job Demands" might increase from its prior of 0.40 to a posterior of 0.62; the probability of "Low Job Control" might jump from 0.30 to 0.55. These updated probabilities are the network's answer to the question: given what we are seeing, what is most likely causing it?

This is the reasoning pattern that Hon et al. (2023) leveraged when they built a Bayesian network for construction practitioners' mental health. By observing poor mental health outcomes and propagating backward, they identified lack of job control, role ambiguity, and lack of supervisor support as the most probable upstream causes - findings that would have been invisible to a tool that only rates hazards in isolation.

The mathematical machinery behind this bidirectional flow was made computationally feasible by Lauritzen and Spiegelhalter's (1988) junction tree algorithm, which decomposes the network into clusters of nodes that pass probability messages to each other. Whether evidence enters at the top or the bottom of the network, the same message-passing architecture updates every node to reflect the new information.


Seeing Propagation in Action

The interactive simulator below implements a five-node Bayesian network with three upstream hazard nodes, one intermediate outcome (Psychological Distress), and one distal outcome (Absenteeism). Use it to build intuition for both directions of reasoning. In Forward mode, click hazard nodes to set them as present or absent and watch probabilities ripple downstream. In Backward mode, click an outcome node to observe it and watch upstream probabilities update to reveal the most likely causes. The Sensitivity button reveals which single hazard exerts the greatest influence on your selected outcome.

Forward mode: Click upstream hazard nodes to toggle them present/absent. Watch downstream probabilities update.

Interaction Effects: When Hazards Combine

One of the most powerful features of network propagation is its natural handling of interaction effects - the phenomenon that Chapter 3 identified as a fatal blind spot for risk matrices. When two or more hazards share a common child node, the conditional probability table for that child encodes exactly how those hazards combine.

Try it in the simulator above: set only "High Job Demands" to present and note the probability of Psychological Distress. Then reset and set only "Low Supervisor Support" to present. Each alone produces a moderate increase in distress probability. Now set both to present. The resulting distress probability is not the sum or the average of the individual effects - it is substantially higher, because the CPT captures the synergistic interaction between demands and support.

This is precisely what García-Herrero et al. (2017) found in their study of 2,211 healthcare workers: emotional demands combined with low recognition produced distress probabilities far exceeding what either hazard predicted alone. The Bayesian network captured this interaction automatically through its CPT structure - no special "interaction term" needed to be specified. The network's architecture, with multiple parents converging on a single child, inherently represents how causes combine (Koller & Friedman, 2009).

Faghri et al. (2019) observed similar emergent severity in their network model of correctional officers, where work-related exhaustion and occupational stress jointly amplified the probability of depressed mood beyond what either factor predicted in isolation. The conditional probability table does the combinatorial work that a risk matrix simply cannot.

Think About It

In the simulator, try all eight possible combinations of the three upstream hazards being present or absent. Which combination produces the highest distress probability? Is the "worst case" simply all three present, or are there combinations where removing one specific hazard causes a disproportionately large improvement? What does this tell you about intervention priority?


Sensitivity Analysis: Finding the Highest-Leverage Intervention

Forward and backward propagation tell us what the network predicts and what it diagnoses. Sensitivity analysis tells us where to act. It is the operation that transforms a Bayesian network from a descriptive model into a prioritisation engine.

The core idea, formalised by Laskey (1995), is straightforward: systematically vary the state of each parent node - setting it to present and then absent while holding all other nodes at their prior values - and measure the resulting change in the target outcome's probability. The parent node that produces the largest swing is the highest-leverage intervention point. Laskey defined these as partial derivatives of output probabilities with respect to input parameters, providing a rigorous mathematical foundation for what is essentially a practical question: where should we spend our limited intervention budget?

Click the Sensitivity button in the simulator to see this in action. The analysis cycles through each upstream hazard, measures its individual impact on the selected downstream outcome, and produces a ranked bar chart. You will likely find that the hazards are not equally influential - one node moves the needle substantially more than the others.

This is exactly the approach Hon et al. (2023) used in their construction industry study. By running sensitivity analysis across all nodes in their network, they identified lack of job control and role ambiguity as the highest-leverage targets for intervention - information that would have been impossible to extract from a checklist that simply rated each hazard as "present" or "absent." Similarly, García-Herrero et al. (2017) used sensitivity analysis to discover that emotional demands exerted a stronger influence on stress than family demands, overturning assumptions that had previously guided their intervention strategy.

Sensitivity analysis also addresses a practical constraint that every workplace risk manager faces: you cannot fix everything at once. Resources are finite. By ranking hazards by their propagated influence on the outcome you care about most, the network tells you which intervention will yield the greatest reduction in downstream harm per unit of effort invested.


Why Bidirectional Reasoning Matters

The two directions of propagation are not merely technical features - they correspond to the two fundamental tasks of psychosocial risk management. Forward propagation supports proactive risk assessment: given the hazards currently present in our workplace, what outcomes should we anticipate? Backward propagation supports reactive incident investigation: given the harm we are observing, what are the most probable causes? No traditional risk tool supports both tasks within a single framework.

Consider the Director of Nursing from our opening scenario. She can now use forward propagation to model the consequences of the restructuring that increased patient loads, generating quantitative predictions about burnout and turnover risk. She can use backward propagation to diagnose the spike in psychological injury claims, identifying which upstream hazards are the most probable contributors. And she can use sensitivity analysis to prioritise her response, determining whether restoring supervisor support or reducing patient ratios will produce the greater reduction in harm.

All three operations use the same network, the same probability tables, the same mathematical framework. The network is a single instrument that plays in both directions - and that bidirectionality is what makes it uniquely powerful for the tangled, interdependent world of psychosocial hazards.

Key Takeaways

Looking Ahead

We have now learned to build a Bayesian network and to run it in both directions. But our probability tables so far have been filled by expert judgement. In Chapter 8, we turn to the question of learning from data: how can we use workplace survey results, incident records, and HR databases to estimate - or refine - the conditional probability tables that drive our network's predictions and diagnoses?

References

Faghri, P. D., Momeni Marjaneh, N., & colleagues. (2019). Correction workers' burnout and outcomes: A Bayesian network approach. International Journal of Environmental Research and Public Health, 16(2), 282. https://doi.org/10.3390/ijerph16020282

García-Herrero, S., Mariscal, M. A., Gutiérrez, J. M., & Ritzel, D. J. (2017). The influence of recognition and social support on European health professionals' occupational stress: A Demands-Control-Social Support-Recognition Bayesian network model. BioMed Research International, 2017, 4673047. https://doi.org/10.1155/2017/4673047

Hon, C. K. H., Way, K. A., Chan, A. P. C., & colleagues. (2023). A Bayesian network model for the impacts of psychosocial hazards on the mental health of site-based construction practitioners. Journal of Construction Engineering and Management, 149(5). https://doi.org/10.1061/JCEMD4.COENG-12905

Koller, D., & Friedman, N. (2009). Probabilistic graphical models: Principles and techniques. MIT Press. https://mitpress.mit.edu/9780262013192/probabilistic-graphical-models/

Laskey, K. B. (1995). Sensitivity analysis for probability assessments in Bayesian networks. IEEE Transactions on Systems, Man, and Cybernetics, 25(6), 901–909. https://doi.org/10.1109/21.384252

Lauritzen, S. L., & Spiegelhalter, D. J. (1988). Local computations with probabilities on graphical structures and their application to expert systems. Journal of the Royal Statistical Society: Series B, 50(2), 157–224. https://doi.org/10.1111/j.2517-6161.1988.tb01721.x

Mariscal, M. A., García-Herrero, S., Gutiérrez, J. M., & Ritzel, D. J. (2013). Using Bayesian networks to analyze occupational stress caused by work demands: Preventing stress through social support. Accident Analysis and Prevention, 57, 114–123. https://doi.org/10.1016/j.aap.2013.04.009

Pearl, J. (1988). Probabilistic reasoning in intelligent systems: Networks of plausible inference. Morgan Kaufmann. https://dl.acm.org/doi/book/10.5555/534975