Pain Network Builder
A clinical case formulation tool built on interactive network graphs, with an integrated belief propagation engine drawing on fuzzy cognitive mapping.
Nodes
Each node represents a factor in the patient's pain experience — a cause, consequence, or maintaining variable. Nodes are categorised as:
- Origin (orange) — the initiating event or trigger
- Pain (red) — the central hub, typically the presenting complaint
- Affect (blue) — downstream factors that Pain influences, or that influence Pain
Node size carries analytical meaning: larger nodes are assigned a higher prior probability — representing the clinician's or patient's assessment that this factor is more significant or prevalent for this individual before any specific evidence is introduced.
Links (Edges)
Links represent directed relationships between nodes. Each link has four properties:
- Type — more (facilitate) or less (inhibit): does this factor increase or decrease the other?
- Direction — unidirectional (→), reverse (←), or bidirectional (↔)
- Thickness — the relative strength of the relationship; thicker links carry more influence in the propagation model
- Curve — a visual property only, used to reduce overlap in complex networks
The distinction between more and less maps onto the clinical concept of facilitatory and inhibitory pathways in pain neuroscience — for example, catastrophising facilitates pain amplification, while social support and physical activity may inhibit it.
Chronic pain is now well understood to be a biopsychosocial phenomenon — not a simple linear input-output system, but a dynamic network of interacting biological, psychological, and social factors. This has important clinical implications that a network model captures naturally:
Feedback loops — pain disrupts sleep, and poor sleep amplifies pain. These bidirectional relationships mean that intervening in one factor can have cascading effects throughout the whole system — sometimes expected, sometimes surprising.
Non-linearity — small changes in one factor can produce disproportionately large effects elsewhere when feedback loops are involved. Conversely, large interventions can appear to have little effect if they are counteracted by other parts of the network.
Multifactorial maintenance — the network approach makes visible how multiple interacting factors can maintain a pain state even after the original injury has resolved. This is particularly relevant in nociplastic pain presentations where central sensitisation, psychological factors, and social context interact.
Case formulation — rather than selecting a single theoretical model, the tool allows clinicians and patients to collaboratively construct a bespoke formulation that reflects the individual's specific experience, with the ability to add, remove, and reconfigure connections as understanding develops over time.
What is a Fuzzy Cognitive Map?
A Fuzzy Cognitive Map (FCM) is a modelling approach — first described by Kosko in 1986 — for representing a system of factors that influence one another through signed, weighted connections, where those connections are allowed to form loops. Each node holds a value between 0 and 1 representing how activated that factor currently is, and each connection is either facilitating (pushes the target the same way as the source) or inhibiting (pushes the target the opposite way). FCMs have an established track record in nursing and chronic-illness research for building exactly this kind of collaborative causal diagram with a patient or clinician.
This is a deliberately different choice from a classical Bayesian network. Bayesian networks require the graph to have no loops, because their maths (conditional probability tables, evidence propagation) assumes influence flows one way. Feedback loops — pain disrupting sleep, poor sleep amplifying pain — are the entire point of this tool, so a formalism built for cyclic causal diagrams is a more honest fit than one that formally forbids them.
How a Signal Propagates
Every node has a prior — its resting value before any signal has been entered — and a current belief. Only the deviation of a node from its own prior is treated as a signal; a node sitting exactly at its resting value sends nothing downstream, which is what keeps an untouched network stationary until a clinician actually engages with it.
Each pass, every node combines the deviations arriving from its connected neighbours — added for facilitating connections, subtracted for inhibiting ones — and moves a fraction of the way toward the resulting target, rather than jumping straight to it. Multiple passes let a signal travel through chains of connections (A→B→C→D) and let feedback loops settle. This is also what makes inhibition behave the way the word implies: an inhibiting connection can now genuinely pull a downstream factor below its resting value, not only add a second route to increase it.
The model runs up to 20 passes after each input, but stops as soon as the network stabilises — typically well before 20. If a loop is still changing meaningfully at the final pass, that is recorded as not-yet-settled rather than silently presented as a stable answer.
Priors
Every node starts with a prior — its baseline value before any specific evidence is introduced. In this tool, the prior is derived from node size, encoding the clinical judgement that a larger node represents a more prevalent or significant factor for this patient. The prior is each node's resting point: with no active signal reaching it, that is where it sits — and it is also the point the node's colour is measured relative to, so a large, high-baseline node can still visibly shift toward relief when suppressed.
Entering a Signal
When a clinician or patient introduces a signal to a node using the keyboard inputs, that node is held at its new value for just the one round of propagation that keypress triggers — a standard technique in FCM analysis, sometimes called a "what-if" run: fix the stimulus concept, and watch how the rest of the network responds to it. Once that round finishes, the node rejoins the network fully and is free to be pulled around by feedback from everything downstream of it, exactly like every other node.
This is a deliberate choice: nothing in the network is ever permanently fixed. A single entered signal can genuinely ripple from one factor to a second, to a third, and — if the network you've built has a feedback loop — back around to affect the very factor you started with. That looping-back is not a glitch; it is the clinically interesting part, and is exactly the kind of dynamic this tool exists to make visible.
What the Numbers Mean — and What They Don't
The belief values displayed represent relative influence scores, not calibrated clinical probabilities. A Pain node at 78% does not mean there is a 78% probability of the patient being in pain — it means the network model, given the inputs provided, suggests Pain is substantially elevated relative to its own resting baseline.
What is clinically meaningful is:
- The direction of change — did a factor go up or down in response to an intervention?
- The relative magnitude — which factors responded most strongly?
- The pattern of ripple effects — which unexpected nodes were affected?
- Whether the network settles — does it reach a stable state, or keep shifting, suggesting finely balanced competing feedback loops?
When a clinician introduces a facilitatory signal to one factor and, several passes later, sees a connected Pain node settle at a new, lower level via an inhibiting loop elsewhere in the network — that outcome reflects a genuine property of feedback systems: interventions in one part of a network can have effects elsewhere that are not simply proportional to the size of the input. This is one of the most important clinical messages the tool conveys.
This is not a diagnostic tool. The network and its analysis cannot determine what is causing a patient's pain, predict outcomes, or guide treatment decisions in any formal sense.
This is not a validated model. A validated FCM requires expert elicitation across a panel, sensitivity testing, and comparison against clinical outcomes data. The parameters here — edge weights, priors, damping — reflect one clinician's or patient's judgement and subjective experience for this individual case, not measured or population-level values.
This is not a simulation of neurobiological processes. The propagation model does not represent actual neural signalling, nociceptive processing, or psychological mechanisms. It is a metaphor — a way of making the concept of interconnection and mutual influence visible and explorable.
The analysis is forwards-only. The model propagates a signal outward from wherever it was entered. It does not perform backwards inference — it cannot reason from an observed effect (high Pain) back to the most likely causes. Inferring likely upstream causes from an observed effect would require assumptions (an acyclic graph) that conflict with the feedback loops this tool exists to represent, so it is intentionally out of scope.
Case formulation — collaboratively building the network with the patient makes implicit clinical reasoning explicit and shared. Patients often report that seeing their experience mapped visually helps them feel understood and helps them understand the interconnected nature of their pain.
Psychoeducation — the Analyse feature provides an interactive demonstration of concepts from pain neuroscience — central sensitisation, the role of psychological and social factors, the importance of activity and sleep — without requiring technical language.
Treatment planning — by modelling proposed interventions the tool can support shared decision-making conversations about where to focus treatment effort.
Monitoring — returning to the tool at subsequent appointments and adjusting the network based on the patient's evolving experience can support reflection on progress and treatment response.
The Pain Network Builder combines interactive network visualisation with a fuzzy-cognitive-mapping propagation model to create a tool that is clinically useful without claiming mathematical precision. It makes visible the interconnected, non-linear nature of chronic pain — and in doing so, communicates one of the most important messages in contemporary pain science: that pain is a system, not a symptom, and that understanding it requires thinking about the whole person.
This tool and text has been built with AI assistance.