Introduction
Pallium is a causal DAG editor for mapping how things actually connect, then intervening before an event becomes an outcome.
This book is the product reference. It describes what the app does today: the canvas, snapshots, sharing, live sessions, analytics, and the Prodigy engine underneath.
It will be served at docs.pallium.tech. Until
that hostname is attached, build and serve from this docs/ folder — see
Building these docs.
What Pallium is
You sign in, create a graph (a named project with members), and work on snapshots (named versions of the DAG). The canvas is always a working copy of whichever snapshot you loaded — or of a live session you joined. Nothing on the canvas is durable until someone clicks Create Snapshot.
That distinction matters most for live sessions: the host shares their working copy, not a frozen file. Guests edit the same in-memory graph. When the host ends the session, nobody is kicked back to the seed snapshot. Each person keeps the last state on their canvas and can snapshot it before they leave.
What you can do
- Draw causal diagrams: directed, bidirected, and undirected edges; exposure / outcome / intermediate roles; unobserved, adjusted, and selection flags.
- Overlay SEM, Ego, Cycles, and Paths without changing analytics mode. Layout places nodes with DAGitty’s spring algorithm.
- Inspect network metrics and DAGitty-style implied independencies, total/direct adjustment sets, instruments, and the causal odds ratio. Causal view mode shows the moral graph, correlation graph, or equivalence class (CPDAG).
- Snapshot a working copy, share a snapshot by email, invite graph members as viewers or maintainers.
- Go live: host a realtime session on your current canvas; guests join from an invite or from the snapshot picker.
How this book is organized
- Using Pallium — sign-in through export, including a full live-session chapter and one page per canvas tool.
- Analytics — Network, Causal, and the Bayesian placeholder.
- Concepts — working copies, path types, roles and identification.
- Engine — Prodigy, the CBOR graph, the live WebSocket protocol.
- Glossary — Glossary (DAG, canonical snapshot, milestone, live session, and the rest). The in-app cheat sheet is Help (bottom right), not this book section.
- Contributing — how to build this book.
Canvas tools (SEM, Ego, Cycles, Paths) are independent of the analytics panel. You can trace pathways while looking at network stats or adjustment sets. Those overlays are local to your browser — they are not sent to live-session peers.
Getting started
Open the app, sign in, create a graph, load a snapshot, edit the canvas, snapshot when you want to keep the work.
First session
- Sign in with Clerk (see Sign in).
- Click Create Graph. Name it. The create dialog is prefilled with a garden DAG in DAGitty syntax; you can keep it, paste your own, or clear the box to use Pallium’s built-in default template.
- Pallium creates the graph, writes a snapshot named Initial Setup, marks that snapshot canonical, and loads it onto the canvas.
- Edit. Create Snapshot stays disabled until something structural changes (nodes, edges, roles, flags, positions, Scale, Layout). Cosmetic changes (node/edge size, SEM/Ego/Cycles/Paths, light/zen, camera) do not enable it.
- When the button lights up, name a snapshot. That version is now in Personal (and, if you are a maintainer, in the catalog).
What you are looking at
| Region | What it is |
|---|---|
| Top bar | Graph picker, snapshot picker, Create Graph, Go live, Create Snapshot |
| Left | Analytics: Network, Causal, or Bayesian |
| Center | The Prodigy canvas |
| Right | Layout, SEM, Ego, Cycles, Paths, Highlight, Scale, Size, Export, Zen, Help |
| Bottom left | Canvas search |
You need an active graph and an active snapshot (or an active live session) before the canvas is a real working copy. Overlays tell you to select a graph, then a snapshot, if those are empty.
A useful mental model
- A graph is the project: name, members, canonical snapshot.
- A snapshot is a named CBOR blob of nodes, edges, roles, and positions.
- The canvas is RAM. Loading a snapshot copies it into Prodigy. Going live copies the current canvas into a shared live room.
- Create Snapshot writes the canvas back to the database as a new row. It does not overwrite the snapshot you loaded.
Read Working copies if that split is the thing you want to get right before live sessions.
Next
- Graphs — members, canonical, delete rules.
- Snapshots — sections, milestones, share-by-email.
- Live sessions — host, guests, ending, leftover canvas.
- Canvas tools — Layout, SEM, Ego, Cycles, Paths.
- Causal analytics — adjustment, instruments, view modes.
- Help (bottom right) — the in-app cheat sheet.
Sign in
Pallium is account-gated. Before you sign in you only see the sign-in screen. After a successful session the workspace appears and a user button is mounted in the chrome.
Sign-in is Clerk. There is no anonymous canvas and no password-only Pallium account — you use the identity provider the app is configured with.
Once signed in, the app loads the graphs you can see and starts the canvas. Invites are by email of someone who has already signed in at least once (so Pallium has a user record to attach).
The workspace
Once you are signed in, Pallium is a single page: pickers on top, analytics on the left, canvas in the middle, tools on the right.
Top bar
- Graph picker — every graph you created, maintain, or view. A graph with an active live session you can see is marked live in the menu. Changing graph leaves any live session you were in, clears the canvas, and loads that graph’s snapshot list.
- Graph settings (gear) — visible to maintainers and the creator. Rename, canonical snapshot, members, delete (creator of a private graph only).
- Snapshot picker — live sessions for this graph, then Canonical, Milestones, Personal, Shared with me, and (maintainers) All snapshots. Picking a snapshot loads it and leaves a live session. Picking a live row joins that session.
- Snapshot settings (gear) — visible when a snapshot is selected and you are not in a live session. Rename, milestone (maintainers), share (creator), delete (creator, not canonical).
- Create Graph
- Go live — hidden until a graph is selected and you have a snapshot
(or you are already live). While live the button reads
LiveorLive · Nfor peer count. - Create Snapshot — disabled until the working copy is structurally dirty.
Left: analytics
Segmented control: Network | Causal | Bayesian. The choice is
stored in localStorage as pallium-analytics-mode. Switching panels
does not change the canvas or canvas tools.
Center: canvas
<canvas id="prodigy-canvas"> inside #canvas-shell. Prodigy fits the
parent, including Retina DPR. Pan with right-drag (or drag the background
in some pointer paths), zoom with the wheel, edit with left click. See
Graph editor.
Right: tools
From top to bottom, when a graph is active:
- Layout, SEM, Ego, Cycles, Paths, Highlight
- Scale (X/Y stretch) and Size (nodes / edges)
- Export (DAGgity code and PNG)
- Zen and Help
The tool cluster is hidden when no graph is selected
(#graph-workspace[hidden]).
Overlays
- Welcome — you have no graphs yet.
- Select a graph — you have graphs but none is active.
- Select a snapshot — a graph is active, no snapshot is loaded, and you are not in a live session.
- Loading — graph list is still fetching.
Persistence of chrome
These switches remember themselves in localStorage:
| Key | Control |
|---|---|
pallium-analytics-mode | Network / Causal / Bayesian |
pallium-semlike-mode | SEM |
pallium-ego-mode | Ego |
pallium-cycle-mode | Cycles |
pallium-pathway-mode | Paths |
pallium-highlight-mode | Highlight |
pallium-light-mode | Light |
pallium-zen-mode | Zen |
They are your view. They are not part of a snapshot and are not sent to live-session peers.
Graphs
A graph is the project container: a name, an owner, members, a canonical snapshot, and (optionally) a public flag.
Create
Create Graph opens a dialog:
- Name is required.
- DAGitty source is optional. The box is prefilled with a garden
example (
Fertilizerexposure,Harvestoutcome). Empty input is valid and means “use Pallium’s default starter DAG”. Invalid DAGitty is rejected in the browser before anything is written.
On submit Pallium:
- Creates the graph. You are the creator and a maintainer.
- Parses the DAGitty (or the default template) inside Prodigy to CBOR.
- Writes a snapshot named Initial Setup.
- Sets that snapshot as canonical.
- Loads it onto the canvas and clears the dirty flag.
Graph picker
Graphs are listed newest first. You see graphs you created, graphs you maintain, and graphs you view. Public graphs you are not a member of can also appear.
Selecting a different graph:
- Leaves any live session.
- Clears the canvas.
- Clears dirty.
- Fetches that graph’s snapshots and live sessions.
Settings (maintainers)
The gear next to the graph picker is shown if you are a maintainer or the creator. You can:
- Rename the graph.
- Choose the canonical snapshot from the catalog — the graph’s single designated live version (exactly one; automatically visible to every member). See Canonical.
- Invite people by email as viewer or maintainer.
- Remove members other than yourself and the creator.
- Delete the graph — only if you are the creator and the graph is not public. Two-step confirm.
Viewers do not get this gear.
Roles on a graph
| Role | Who | What they can do |
|---|---|---|
| Creator | Owner of the graph | Everything a maintainer can, plus delete a private graph |
| Maintainer | Invited as maintainer | Rename, canonical, invite, milestone flags, see all snapshots |
| Viewer | Invited as viewer | Open the graph, load snapshots they can see, join live sessions they are invited to / member-audience sessions, create personal snapshots of a working copy |
Invites resolve by email. The person must have signed in at least once or the invite cannot attach.
Public vs private
A public graph cannot be hard-deleted from settings. Treat public as “this project is not yours to destroy from the UI.” Private graphs can be deleted by their creator.
Snapshots
A snapshot is a named, durable copy of the DAG: node ids, names, roles, positions, and directed edges, stored as CBOR. It is not a live session, and it does not include your camera, SEM/Ego/Cycles/Paths, node size, or analytics mode.
Working copy vs snapshot
Loading a snapshot copies it into Prodigy. After that you are editing RAM. Create Snapshot writes a new snapshot from the current canvas. It does not mutate the snapshot you loaded. With Paths on and a non-empty selection, the snapshot is the induced subgraph of those nodes (intervention view). The live canvas still holds the full DAG.
The button is enabled when the graph is dirty, or when Paths is on with a non-empty selection. Dirty examples:
- Create / delete / rename a node, change its role
- Add or remove an edge
- Drag a node (positions)
- Stretch X/Y (positions, and in a live session this is broadcast)
Not dirty:
- Node size +/−
- SEM / Ego / Cycles / Paths / Highlight (Paths on: Create Snapshot is also enabled for the selected subgraph)
- Light / Zen
- Pan / zoom / search focus
- Analytics mode
Create Snapshot asks for a name (default “New Snapshot”). After a successful write the new row is selected and dirty clears.
Picker sections
For the active graph the snapshot menu is:
- Live Sessions — rooms you can join (see Live sessions). Not snapshots.
- Canonical — the graph’s one designated live version. Automatically visible to every member. See Canonical.
- Milestones — extra shared checkpoints a maintainer flagged. Also visible to every member. See Milestones.
- Personal — snapshots you created (
created_by = you). - Shared with me — snapshots someone shared to your user row.
- All snapshots — maintainer-only leftover catalog rows.
While you are in a live session the trigger label reads
Live · {seed snapshot name} instead of a snapshot name. The snapshot
settings gear is hidden during a live session so you do not confuse
the room with a saved version.
Snapshot settings
Open the snapshot gear when a snapshot is selected and you are not live.
- Name — anyone who can open settings can attempt a rename (table perms: creator or maintainer).
- Milestone — maintainer-only checkbox. See Milestones.
- Share — creator-only. Email of a Pallium user; they get a share list and see it under Shared with me. You can remove shares. You do not need this for canonical or milestone snapshots — those are already visible to every graph member.
- Delete — creator-only, and not if this snapshot is canonical. Two-step confirm. Choose another canonical first if you need to delete the current one.
Canonical
There is exactly one canonical snapshot per graph. It is a single pointer on the graph, not a flag you can set on several snapshots at once. Picking a new canonical in graph settings replaces the previous one.
It is the graph’s designated live version: the snapshot the project points at. Creating a graph writes Initial Setup and sets that as canonical. If someone is invited to a graph that somehow has no canonical, Pallium seeds the latest snapshot so the graph does not look empty to a viewer.
Automatically shared with everyone on the graph. Viewers do not need an email share. Graph membership is enough to see and load canonical. Maintainers can also see the full catalog.
You cannot delete the canonical snapshot until you choose another. That stops the graph from losing its live version.
Go live (the collab room) does not have to use canonical. A live session hosts the working copy of whichever snapshot you currently have open. Opening the graph later still offers canonical as the project’s live version unless they pick something else.
Milestones
A milestone is a maintainer-toggled flag on a snapshot (milestone = true). Unlike canonical, you can have many.
Purpose: publish agreed checkpoints that every member can open, without demoting the current canonical. Typical uses:
- A version the team reviewed and is willing to cite, while work continues on newer personal copies
- A before/after pair around a modeling change
- A frozen figure for a paper or a decision, while canonical keeps moving
Milestones are automatically visible to every graph member, same as canonical. You do not email-share them one person at a time. They appear in the Milestones section of the picker (canonical is listed under Canonical even if it is also flagged; it is not duplicated in Milestones).
Only maintainers can set or clear the flag. Clearing it returns the snapshot to Personal (if you created it) or to the maintainer catalog — it does not delete the row.
Use canonical for “this is the live graph.” Use milestones for “these are the named versions everyone should still be able to open.”
After a live session
Ending or leaving a live session marks the canvas dirty (even if you did not edit) so Create Snapshot is available. That is how guests keep the session’s last state: snapshot it onto their Personal list, on the same graph, before they navigate away.
Sharing
There are three different share surfaces. They are easy to mix up.
1. Graph membership
Graph settings → invite by email as viewer or maintainer.
This is access to the project: they can open the graph, see snapshots the list function allows, and be invited to live sessions. It does not by itself put your personal snapshots on their picker.
Remove a member from the same panel. You cannot remove yourself or the creator from here.
2. Snapshot visibility (canonical, milestones, email share)
Graph members do not automatically see every snapshot. Visibility splits like this:
| Snapshot kind | Who sees it without an extra share |
|---|---|
| Canonical (one per graph) | Every member (viewers and maintainers) |
| Milestones (many) | Every member |
| Personal | The creator; maintainers also see them under All snapshots |
| Email-shared | People you shared to by email (Shared with me) |
Canonical is the live version and is auto-shared with the whole graph. Milestones are extra auto-shared checkpoints. See Snapshots and Milestones.
Share by email (snapshot settings, creator-only) is for a personal copy you want a specific person to open without making it canonical or a milestone. The recipient sees it under Shared with me. They can load it and fork it by creating their own snapshot. They cannot delete yours. If they were not already a graph member, the share also grants viewer on that graph.
3. Live session
Go live shares the current working copy in realtime. See Live sessions.
- Audience invited: only the people you tick (plus you). They get an invite modal.
- Audience everyone on this graph: all current members can join from the snapshot picker’s Live Sessions list. They do not get the interruptive invite modal.
Live is not a share-forever. When the host ends the session, the Durable Object stops accepting joins. The leftover canvas on each client is still there to snapshot.
Who can do what (short)
| Action | Who |
|---|---|
| Invite to graph | Maintainer / creator |
| Set canonical | Maintainer / creator |
| Milestone a snapshot | Maintainer |
| Share a snapshot by email | Snapshot creator |
| Delete a snapshot | Snapshot creator, not if canonical |
| Delete a graph | Creator, and only if not public |
| Start a live session | Any graph member with a snapshot open |
| Invite to a live session | Session host, invitee must already be a graph member |
| End a live session | Session host |
Invites by email require that the address already exists as a Pallium user (they have signed in at least once).
Live sessions
A live session is a shared working copy, not a shared snapshot.
The host’s canvas is copied into a shared live room. Everyone in the room applies the same graph edits (create/delete node, edges, moves, stretch). The database only stores who is hosting which graph, seeded from which snapshot. The DAG itself is not written until someone clicks Create Snapshot.
The modal lead says it directly:
Shares your current working copy. Nothing is saved until someone creates a snapshot.
What is being hosted
When you click Start:
- You must have an active graph and an active snapshot. Otherwise: “Open a snapshot before going live.”
- Pallium records a
live_sessionrow with:- you as host
- that graph
- the snapshot that was selected as seed (
seed_snapshot,seed_snapshot_name) - audience (
invitedormembers) - the invitee user ids
- It then uploads whatever is on your canvas right now
(
get_graph_json()), which may already differ from the seed snapshot if you edited after loading it.
Guests do not load the seed snapshot from the database. They receive the room’s graph (the host’s working copy, plus any edits since). The seed name is only a label: invite copy looks like “{host} has invited you to join a live session of {graph}, {snapshot}.”
You are collaborating on the host’s unsaved copy of that snapshot, forked into a room. The seed snapshot on disk does not change until someone snapshots.
Starting (host)
Go live (top bar) opens the dialog.
- Tick people in Members (other graph members).
- Or tick Everyone on this graph — every current member is invited
(audience
members). Checkboxes in the list disable and all members are included.
Start creates the session, opens the WebSocket, sends init with the
canvas JSON, and the button becomes Live (or Live · N).
Toast:
- members: “You’re live. Graph members can join from Live Sessions.”
- invited with N people: “You’re live. Invited N people.”
- invited with nobody else: “You’re live.”
Only the host sees End session and Invite selected. The host does not get a Leave button — leaving without ending would strand the room. End it.
Joining (guest)
Two paths:
- Invite modal — if the session audience is
invited(not “everyone”), a poll (~4s) plus optional live query notices a new session you can see, you are not the host, and you have not dismissed it. Join or Later. Later suppresses that session id for this page load. - Snapshot picker → Live Sessions — every live session on this graph
that the list function returns. Your own session is labeled with the
seed snapshot name; someone else’s is
{host email} · {seed name}.
Joining:
- If you have unsaved changes on a different graph, confirm: “You have unsaved changes on another graph. Join the live session anyway?”
- If you are already in another live session, Pallium leaves that one first.
- If the session’s graph is not the one you have open, it switches graph (you must still have access) and fetches snapshots without clobbering the snapshot id it is about to replace with the seed id.
- It opens the WebSocket and sends
join. The server replies withstate(full graph JSON, dirty flag, peers, host id). Prodigy loads that JSON. If the room is already dirty, your dirty flag is set so you can snapshot later.
Guest lead copy while in-session:
You are in someone else’s live working copy. Leaving keeps the last graph on your canvas so you can snapshot it.
Who can join
The room only accepts:
- the host, or
- user ids on the session’s
invitedlist.
Creating with audience members copies all current graph members onto
invited. People added to the graph after that moment are not in
the room until the host invites them.
The host can Invite selected from the same member list while the session is running (must already be a graph member). That updates both the session record and the live room.
If you are not invited, join fails. If the host already ended, join fails.
What is synced
Everyone sees the same DAG:
- Create / rename / change role / delete a node
- Connect or disconnect
- Drag a node
- Scale X/Y stretch of the layout
Not synced (local to each browser):
Not synced (local to each browser):
- SEM, Ego, Cycles, Paths
- Node size
- Camera pan/zoom, search focus, selection highlight
- Light / Zen
- Analytics mode and hover metrics
- Who you have selected for Paths
You can be in Paths while a peer is in Ego. You will still see the same nodes and edges.
What the dirty flag means in a room
After the first shared edit, joiners see Create Snapshot enabled so they can save.
Your own structural edits also set dirty locally, same as offline.
Ending (host)
End session is host-only. Guests cannot end the room.
Copy:
Ending disconnects everyone. The last working copy stays on each canvas so anyone can still create a snapshot.
If your canvas is dirty, you get:
- Cancel
- End without saving — tear down the room, do not write a snapshot from the host
- Save snapshot and end — name required (prefilled
Live session YYYY-MM-DD HH:MM), writes a snapshot from your canvas, then ends
If your canvas is clean, you just get End session.
Ending:
- Sends
{ type: "end" }on the socket. - Marks the session ended.
- Disconnects everyone.
- Host’s UI: leave the session id, peer count 0, dirty = true.
Host lead copy while live:
This is your working copy. Ending the session disconnects everyone. Unsaved work stays on each canvas so they can snapshot.
What guests keep when it ends
Guests receive ended and a toast:
The live session has ended. You can still snapshot this copy.
Their Prodigy graph is not cleared and not rewound to the seed snapshot. Dirty is set to true. They can:
- Create Snapshot — a personal snapshot on that graph, from the last shared state (plus any ops that landed).
- Navigate away (other snapshot, other graph) and lose it.
There is no automatic snapshot for guests. If they do not save, that fork exists only until they load something else.
The same leftover-canvas rule applies if a guest clicks Leave (or the host’s graph picker switches them off the graph). Leave closes the socket, clears the session id, sets dirty, and keeps the graph on the canvas.
Reconnect and presence
If the socket drops while you still think you are in the session,
Pallium retries join after 1.5s. The server sends full state again.
Peer count is the number of distinct user ids with an open WebSocket.
The Live button shows Live · N when N > 1.
Sessions you can see refresh every few seconds.
Switching context
| You do this | Live session |
|---|---|
| Pick another snapshot | Leave, then load that snapshot |
| Pick another live row | Leave, then join the new room |
| Pick another graph | Leave, clear canvas, load that graph’s lists |
| End (host) | Room dies; canvases kept; dirty |
| Leave (guest) | You disconnect; others stay; your canvas kept; dirty |
Snapshot settings stay hidden while you are in a live session so you do not rename the seed while you are actually in a room.
Graph editor
The canvas is Prodigy (Bevy / WebAssembly). HTML around it does not draw the DAG; it only tells Prodigy what to do.
Pointer
| Input | Effect |
|---|---|
| Left click empty canvas | Clear selection and search focus |
| Shift + left click empty | Create a node at that world point, select it, open Create Node. Canceling the dialog deletes the node (it was never confirmed). Confirming sets name/role and dirties the graph. |
| Left click a node | Replace the selection with that node (see Selection) |
| ⌘ / Ctrl + left click a node | Add or remove that node from the selection |
| Shift + left click another node | Cycle the edge between primary and clicked: none → directed primary → clicked → bidirected → undirected → delete. |
| Drag a node | Move it. Dirty. In a live session, move_node is sent on drag end. |
| Right-drag | Pan the camera |
| Wheel | Zoom. Orthographic scale is clamped relative to the fit-to-graph scale. |
Shift is also used for create-on-empty, so connect and create do not collide: empty vs node hit.
Keyboard
Ignored while a <dialog open> is up or while focus is in an
INPUT / TEXTAREA / SELECT (search and modals).
| Key | Effect |
|---|---|
| E | Edit the primary selected node (name, role, flags) |
| U | Toggle unobserved (latent) on the primary node |
| A | Toggle adjusted on the primary node |
| S | Toggle selection node on the primary node |
| X, Backspace, Delete | Delete the primary selected node and its edges |
Additive selection does not change that: E, U, A, S, and X always hit
primary (the most recently chosen node). Paths uses the full set.
What “structural” means
Dirty (and live ops) come from the graph, not the view:
- Node create/delete/rename/role/unobserved/adjusted/selection
- Edge add/remove (including bidirected and undirected)
- Node positions (drag)
- Layout stretch (Scale X/Y) and Layout (spring)
Camera, search ring, node/edge size, and canvas tools do not write the graph.
Load and fit
Loading a snapshot (CBOR) or a live state (JSON) replaces every node and
edge, then fits the camera to the bounding box with padding. Search may
zoom in further so a node is at least ~16px radius on screen.
Dual bodies
Every node has both a circle mesh and a SEM rectangle mesh. Only one is visible and pickable at a time (see SEM). Edges re-route to the active body.
Nodes and roles
A node is an id, a display name, a role, and a position.
Create
Shift + left click empty canvas. The node appears immediately
as “New Node” / intermediate so you can see it, then Create Node
opens. Name is required. Cancel or dismiss deletes that node so you
do not leave unnamed junk. Confirm calls updateNodeInProdigy and marks
dirty. In a live session that is an upsert_node.
Ids are generated in WASM (node_{uuid} in the browser).
Edit
Select, then E. Same dialog, title Edit Node. Changing name or role updates the label and the fill (and SEM fill). Roles are mutually exclusive. Checkboxes (also canvas keys) are independent of role: Unobserved (U), Adjusted (A), Selection (S). A node can be an unobserved exposure or outcome.
Delete
X / Backspace / Delete on the primary selection. Connected
edges go with it. Live: delete_node.
Roles
| Role | Fill | Meaning |
|---|---|---|
| Intermediate | Blue | Default. Covariate, mediator, other. |
| Exposure | Green | A cause / treatment you want to study. |
| Outcome | Orange | An effect of interest. |
A node cannot be both exposure and outcome. DAGitty import that tries both is rejected.
Observed / unobserved is independent of role. Unobserved (latent)
nodes keep their role color, drawn paler with a dashed outline. In SEM
mode they become an ellipse instead of a rectangle. They cannot appear
in adjustment sets, and implied independencies that name them are not
listed (not testable). DAGitty latent / unobserved round-trips on
import and export.
Adjusted (A): already conditioned on. Fill goes pale / white. Identification treats these as must-include covariates.
Selection node (S): sampling / selection bias (DAGitty
selected). Drawn as a rectangle even in circle mode.
Roles matter for:
- Causal analytics — adjustment sets need ≥1 exposure and ≥1 outcome.
- Network diameter / radius — computed on paths from exogenous (in-degree 0) nodes to marked outcomes.
- Network Summary — exposure / outcome names, covariate count, directed causal paths.
- Color on the canvas.
Roles do not matter for Paths. Paths uses the nodes you have selected, not exposure/outcome. You can trace A→…→B between two intermediate nodes.
Color vs tools
Selection uses a teal highlight. Hover (circle mode) shows a ring. Ego dims non-neighbors. Cycles do not recolor nodes (only edges). Paths dims every node except the selected endpoints.
Light mode washes the fills and uses a paper clear color; the roles stay the same hues.
Edges
Edges are directed, bidirected (<->, latent confounding), or
undirected (--, PDAG). Cycle mode still flags directed cycles
only.
Purpose
| Kind | Syntax | What it means |
|---|---|---|
| Directed | -> | (A) is a cause of (B). Default. |
| Bidirected | <-> | Latent confounding between (A) and (B) without drawing a (U) node (DAGitty spouses). |
| Undirected | -- | PDAG / equivalence-class edge: orientation not yet known. Identification uses m-separation on mixed graphs. |
Bidirected is not “arrows both ways as two directed edges.” It is one edge that stands for an unmeasured common cause.
Toggle
- Select a node (primary).
- Shift + left click another node.
- No edge → directed
primary → clicked - Directed → bidirected (arrowheads both ends)
- Bidirected → undirected (no arrowheads)
- Undirected → remove
There is no Shift+click to reverse in one gesture: remove, then add the other way (select the other node first).
DAGitty import/export round-trips all three (->, <->, --).
Drawing
Shaft + arrowhead (none on undirected; both ends on bidirected). Shafts stay relatively thin; arrowheads are sized independently so the tip stays readable. In circle mode the shaft stops short of the disk (clearance for the arrow); in SEM mode it stops at the rectangle (using the live label half-extents).
Role does not tint edges. Default edge color is blue. Overrides:
- Ego: edges not in the hovered neighborhood dim
- Cycles: cycle edges rose; others dim
- Paths: pathway edges lime; all others dim (wins over Ego and Cycles)
- Paths off, exposure and outcome set: lime causal paths, magenta biasing (back-door) paths
- Atomic direct effects (Causal panel): unmediated arrows draw thicker
Live
Add and delete are add_edge / delete_edge ops (bidirected /
undirected flags on the payload). Everyone sees the same arrow.
Selection
Pallium keeps two facts:
- Primary — the node E, X, and Shift+click-edge use. One or none.
- Set — every node currently selected. Paths traces this set.
Gestures
| Gesture | Result |
|---|---|
| Left click a node | Set = {that node}, primary = that node |
| ⌘ / Ctrl + click a node | Toggle it in the set. If you add it, it becomes primary. If you remove the primary, primary becomes some remaining node (or none). |
| Click empty canvas | Clear both |
| Shift+click empty (create) | Select the new node only |
| Canvas search hit | Select that node only and pan/zoom |
| Load snapshot / switch graph | Clear |
On macOS Control+click may be treated as a secondary click by the OS; use ⌘+click there.
Why the set exists
Paths needs two or more endpoints. Adding a second (or later) node while Paths is on also selects every intermediate on a directed path among the set. Deselecting a node drops it from that working graph (intervention) and does not re-expand.
With Paths off, multiple selected nodes still all show the selection highlight — the circle (or SEM rectangle) and its label chip. Hover recolors the same pair. Edit/delete still hit primary only — X does not delete the whole set.
Live sessions
Selection is not broadcast. Your highlight is yours. The graph is shared; your Paths endpoints are not.
Canvas tools
The right-hand stack — Layout, SEM, Ego, Cycles,
Paths, Highlight — sits on the canvas. Layout repositions
nodes (structural; see View controls); the rest
paint overlays. They work in every analytics mode (Network, Causal,
Bayesian). Overlay switches are stored in localStorage. Several can
be on at once, with one overlay rule:
When Paths is on, it owns edge and node coloring except the Highlight overlay: a hovered edge (and its two nodes) still paints highlighter yellow on top. Ego dimming and cycle rose are suppressed until you turn Paths off. SEM still chooses circle vs labeled rectangle underneath.
These tools are your view. They are not stored in a snapshot and not sent to live-session peers. Two people in the same room can have different tools on and still share the same nodes and edges.
| Tool | Short | Persistence key | Full page |
|---|---|---|---|
| Layout | Spring layout; writes node positions | — (button, not a switch) | View controls |
| SEM | Labels become the node bodies | pallium-semlike-mode | SEM |
| Ego | Dim outside the hovered node’s k-hop neighborhood | pallium-ego-mode | Ego |
| Cycles | Rose on directed-cycle edges; other edges dim | pallium-cycle-mode | Cycles |
| Paths | Grey the graph; lime on directed paths among the selection | pallium-pathway-mode | Paths |
| Highlight | Hover an edge: yellow on that arrow and its two nodes, on top | pallium-highlight-mode | Highlight |
Toggles sit above Scale / Size. They hide when no graph is selected.
The in-app Help popover repeats this table. This book is the longer form. Causal view mode (moral / correlation / CPDAG) lives in the Causal panel, not this stack — see Causal analytics.
SEM
SEM (structural-equation / DAGitty “semlike”) is a presentation mode, not an analysis.
What you see
Off (default): each node is a circle. The name sits in a chip underneath. A slightly larger ring appears behind the circle while the pointer (or canvas search) is over it.
On: the circle hides. A rectangle sized to the label becomes the node body, with the name drawn inside it — the DAGitty semlike look. Unobserved nodes use an ellipse instead of a rectangle, with a dashed outline. Hover rings are hidden. Edges re-route to the rectangle’s live half-extents so shafts meet the box, not a phantom disk.
Picking
Both meshes exist all the time. SEM only swaps which one is visible and
Pickable. Click, drag, Shift+click-edge, and ⌘/Ctrl+click still work
on the rectangle.
What it does not do
- Does not change roles, analytics, or the saved graph.
- Does not sync in a live session. Your SEM on/off is local.
- Does not dirty the snapshot button.
Light mode still applies: SEM fills use the same hues at a slightly lower alpha so labels stay readable.
Use SEM when you want the figure to read as a labeled SEM / DAGitty diagram; leave it off when you want disks and hover rings.
Ego
Ego mode is a k-hop neighborhood spotlight, driven by the pointer, not by selection.
What you see
With Ego on and a node hovered:
- That node and every node within k undirected hops stay at full color.
- Edges whose both ends are in that set stay at full color (the induced subgraph of the k-ball).
- Everything else dims (nodes by role-tinted dim materials, edges by the shared dim-edge material).
k defaults to 1 (the node and its immediate neighbors, including
edges among those neighbors). A − / + stepper appears under the Ego
toggle while Ego is on. Range is 1–8. The value is stored in
localStorage (pallium-ego-radius) so turning Ego off and on keeps
the last radius.
With Ego on and nothing hovered, the graph is full color. Lifting the pointer restores the rest.
What counts as a neighbor
Any directed edge either way. A → B puts A in B’s 1-hop net and B in
A’s. There is no “only children,” no role filter. 2 hops adds the
neighbors of those neighbors, and so on.
Search vs hover
Canvas search paints the hover ring (circle mode) and pans the camera. It does not drive Ego. Ego stays mouse-driven so analytics and the spotlight do not fight the search locator.
Dragging a node keeps it hovered so the neighborhood does not flicker off mid-drag.
Combining with other tools
- SEM: Ego still dims; the dim fill is the SEM variant of the role color.
- Cycles: cycle rose applies to edges that are both in the ego net and on a cycle; out-of-net edges stay dim.
- Paths: Paths wins. Ego dimming is ignored while Paths is on.
- Highlight: hovering an edge does not drive Ego. Lime still paints that edge and its two nodes on top.
Ego is not stored in snapshots and not sent to live peers.
Cycles
Cycle mode finds directed cycles and paints those edges washed rose. Every other edge dims. Nodes keep their role colors (unlike Paths, which greys nodes too).
What counts
An edge source → dest is on a cycle if dest can reach source
again along directed edges. Pallium then also marks every edge that lies
on a directed path from dest back to source. A self-loop
(A → A) is a cycle.
The graph does not have to be a DAG for the editor to accept it. Causal adjustment sets still assume you meant a DAG; Cycles is how you see when you didn’t.
What you see
- Cycle edges: rose shaft and arrowhead (slightly deeper rose than the unused cycle-node swatch).
- Non-cycle edges: dim, same grey used by Ego/Paths.
- The Cycles toggle itself uses a rose accent when on.
No hover required. The overlay is on the whole graph for as long as the switch is on.
Combining with other tools
- Ego: neighborhood first, then cycle rose on edges that remain in focus.
- Paths: Paths wins; cycle rose is suppressed.
- SEM: cycle coloring is on edges only; SEM only changes node shape.
Cycles is a local view. It does not rewrite the graph, does not dirty the snapshot button, and does not sync to live peers.
Paths
Paths (the toggle label; full name causal pathways) is directed path tracing among the nodes you have selected.
It is available in every analytics mode. It does not use exposure / outcome roles. Pin the endpoints with the selection set; the overlay follows that set.
How to use it
- Turn Paths on. The whole graph greys out (nodes and edges).
- Click a node, then ⌘ / Ctrl+click others. Selected endpoints keep the usual selection highlight so you can still see the set.
- Lime edges are the directed pathways that connect those nodes — either direction, union of all pairs.
- Click the empty canvas to clear the selection. The graph stays grey until you pin two or more nodes again, or turn Paths off.
With fewer than two selected nodes there is nothing to trace, so everything stays grey. That is expected, not a bug.
What is colored
- Edges on a directed walk between two distinct selected nodes: lime (dark canvas) / deeper green (light canvas). The Paths toggle uses the same lime when on.
- Selected nodes: selection highlight (teal), not dim.
- Every other node: dim, even if it sits on a highlighted path. Only edges carry the pathway color.
What counts as a pathway
An edge (u \rightarrow v) is highlighted when there exist distinct selected nodes (s) and (t) such that (s) can reach (u) and (v) can reach (t):
[ s \rightsquigarrow u \rightarrow v \rightsquigarrow t ]
On a DAG that is exactly the edges on a simple directed path between a selected pair. If the graph still has directed cycles, detours that still reach (t) are included.
That is directed tracing:
| Structure | Pattern | Highlighted? |
|---|---|---|
| Chain (causal / front-door path) | (A \rightarrow M \rightarrow Y) | Yes |
| Confounder (back-door) | (A \leftarrow C \rightarrow Y) | No |
| Collider | (A \rightarrow K \leftarrow Y) | No |
See Causal paths vs bias for why those last two stay grey.
Role-based coloring (Paths off)
When Paths is off and at least one exposure and one outcome are set, Pallium paints DAGitty-style overlays on the full graph:
- Lime: proper causal paths from exposure to outcome
- Magenta: open biasing (back-door) paths
- Intermediate ancestors of exposure / outcome / both are tinted
Turn Paths on to switch back to selection-based tracing. Causal view mode (moral / correlation / CPDAG) is a different overlay: it replaces displayed edges and ignores Paths coloring until you return to normal. See Causal.
What it is not
- Not adjustment-set highlighting. Causal panel sets use roles; Paths uses selection.
- Not undirected “connect these nodes somehow.”
- Not synced in live sessions. Peers share the DAG; they do not share your selected endpoints or whether Paths is on.
Combining with other tools
While Paths is on it owns the overlay: Ego dimming, cycle rose, and role-based causal/biasing colors are ignored. SEM still chooses circle vs labeled rectangle. Turn Paths off to get the other overlays back.
Implementation notes
Toggle: #pathway-mode-toggle → set_pathway_mode → PathwayMode.
Algorithm: prodigy/src/pathways.rs. Tests: src/tests/pathways.rs.
Selection model: Selection.
Highlight
Highlight is an edge inspector, driven by the pointer. Turn it on, then hover an arrow (shaft or tip). That edge and the two nodes it touches paint in highlighter yellow, and the edge is drawn on top of every other shaft and arrowhead so it does not disappear into a pile at a busy node.
Yellow is its own overlay. It is not the lime used by Paths or by causal edges after you mark an exposure, so those greens stay readable underneath.
What you see
With Highlight on and an edge hovered:
- That shaft and arrowhead turn yellow and lift above other edges.
- The source and target nodes turn yellow (circle, SEM rect, and label chip).
- Everything else keeps whatever Ego / Cycles / Paths already painted.
Lifting the pointer restores the previous colors and z-order. Hovering a different edge moves the yellow to that one.
A fat invisible pick strip runs along each shaft so thin lines are still easy to hit. Clicks still pass through to nodes underneath.
Combining with other tools
- SEM: the two nodes fill yellow on the rectangle body.
- Ego: hovering an edge does not drive Ego (Ego stays node-hover). The yellow overlay still wins on that edge and its two nodes.
- Cycles: the hovered edge is yellow, not rose, while the pointer is on it.
- Paths: Paths still greys the graph. Hovering an edge pops that edge and its nodes out in yellow on top.
Highlight is not stored in snapshots and not sent to live peers.
View controls
Scale and Size share one panel under the canvas-tool toggles. They look similar (+ / − on a row) and they are not.
Scale (layout stretch)
Scale X / Y multiplies node positions about the graph’s bounding-box center. Each + click is ×1.12 on that axis; − is ÷1.12.
This is a structural edit:
- The snapshot button goes dirty.
- In a live session, Pallium broadcasts a
set_positionsop so everyone gets the same layout. - A new snapshot will store the stretched coordinates.
One or zero nodes: stretch is a no-op (no center to scale about).
Layout
Layout at the top of the canvas-tool stack runs DAGitty’s spring layouter (500 iterations, (k=2), (c=0.01)). Purpose: place nodes automatically when you imported a DAG without positions, or when the drawing is a mess.
It resets abstract coordinates, iterates, then maps the result onto
the current world bounding box. That is a structural edit (dirty +
live set_positions), same as Scale. Two or more nodes required.
Size (nodes and edges)
Size → Nodes +/− scales the live meshes: circles, SEM rects, labels, and the radii edges attach to.
Size → Edges +/− scales shafts and arrowheads together (same step), so the tip stays in proportion with the line.
Same 1.12 step. Both are cosmetic:
- Do not dirty the graph.
- Are not stored in a snapshot.
- Are not sent to live peers. Your disks or arrows can be huge while theirs stay default.
Camera zoom is a third thing: it does not change stored positions or mesh size; it changes orthographic scale. Labels counter-scale with zoom so they stay readable. Export temporarily boosts label size for the PNG.
Search
Bottom-left combobox: Search canvas…
Behavior
- Focus lists every node currently on the canvas (name, falling back to id), sorted the way Prodigy publishes them (name then id).
- Typing filters by case-insensitive substring of the name.
- Arrow keys move the active option; Enter or click selects it.
- Escape / click away closes the list.
Selecting a hit:
- Replaces the selection with that node (not additive).
- Pans the camera onto it.
- If the node would be smaller than ~16px radius on screen, zooms in until it isn’t.
- Paints the hover ring via search-focus (circle mode). That ring is not pointer hover: Ego does not follow search.
A primary click on the canvas clears search-focus (and a plain click on empty also clears selection).
Search does not query the database. If a node exists only in a snapshot you have not loaded, it will not appear.
Export
Export (right chrome) opens a dialog with the current graph as DAGgity source, plus Export as PNG.
DAGgity code
The textarea is the inverse of Create Graph’s DAGgity import. Node
names become identifiers (quoted when they are not a simple
[A-Za-z_][A-Za-z0-9_]* token). Duplicate names get _2, _3, …
suffixes. Positions, exposure/outcome roles, latent (unobserved), adjusted,
selected, <->, and -- round-trip. Copy the code into another
tool, or into a new Pallium graph.
Export does not write a snapshot. It does not dirty the graph.
PNG
Export as PNG captures the current canvas view at publication resolution and downloads a PNG.
Why not a normal screenshot
The graph is drawn with WebGL. The drawing buffer is cleared after
composite, so canvas.toDataURL() is blank. Pallium asks Prodigy for a
GPU readback (request_graph_export), then encodes RGBA to PNG in the
page (downloadGraphRgba).
During capture Prodigy raises the backing-store resolution, waits a couple of frames, and doubles label size so names are not postage stamps on the finished figure. Camera, SEM, Ego, Cycles, Paths, light mode, and node/edge size all come through as you see them.
Filename
{graph}-{snapshot}.png, sanitized. If no snapshot name is active
(including some live-session states), {graph}.png.
What is not in the PNG
HTML chrome: analytics, pickers, toggles, search. Only the Bevy canvas. Zen first if you want a clean figure without having to crop.
One PNG export at a time; a 60s timeout gives up if readback never arrives.
Zen and light
Zen
Zen hides the product chrome so the canvas can fill the thought:
Hidden: graph/snapshot pickers, analytics (all three panels and the mode switch), the user button, the Help popover trigger, message overlays.
Kept: the canvas, the right-hand tools (Layout / SEM / Ego / Cycles / Paths / Highlight / Scale / Size / Export), the Zen toggle itself, and modal dialogs. Create/edit node is opened from the canvas (Shift+click / E); those dialogs must still work.
Turning Zen on also closes the Help popover if it was open.
Zen is localStorage pallium-zen-mode. It is not a snapshot field and
not live-synced.
Light
Light switches both the HTML chrome and the canvas materials (paper
clear color #f4f1ea, washed node fills, inverted label chips). The
page sets color-scheme. Preference is localStorage
pallium-light-mode (also applied on <html> before paint so the first
frame is not dark).
Canvas tools keep their meaning: Cycles still rose, Paths still lime, Highlight still yellow, Ego still dims. Light only changes the palette.
The marketing site has its own light switch (pallium-www-light-mode).
That does not control the app, and vice versa.
Shortcuts
These match the in-app Help popover (bottom right). Canvas shortcuts do not fire while a dialog is open or while focus is in an input, textarea, or select (search included).
Keyboard and mouse
| Action | Shortcut |
|---|---|
| Create a node | Shift + Left Click on empty canvas |
| Select a node | Left Click on a node |
| Add / remove node from the selection | ⌘ / Ctrl + Left Click |
| Edit selected node (name and role) | E |
| Toggle unobserved (latent) | U |
| Toggle adjusted | A |
| Toggle selection node | S |
| Delete selected node | X (also Backspace / Delete) |
| Cycle edge type | Shift + Left Click on another node, while one is selected |
| Search canvas (pan to node) | Search box, bottom left |
| Pan canvas | Right Click (hold) + Drag |
| Zoom | Mouse Wheel |
| Move node | Left Click (hold) on a node + Drag |
Edge cycle, while a node is selected: none → directed → bidirected → undirected → delete. Reverse an arrow by deleting it, then adding the other way (select the other node first).
Edit, delete, status toggles, and Shift+click-edge use the primary selection (most recently chosen node). Paths uses the full set. See Selection.
Canceling Create Node deletes the node that Shift+click spawned.
Canvas tools
| Tool | What it does |
|---|---|
| Layout | Spring layout (DAGitty). Writes positions — structural, same as dragging |
| SEM | Labels become the node bodies (DAGitty style) |
| Ego | Dim nodes outside the hovered node’s k-hop neighborhood |
| Cycles | Highlight directed cycles in rose |
| Paths | Grey the graph; color directed paths between selected nodes |
| Highlight | Hover an edge: yellow on that arrow and its two nodes, on top |
Paths needs two or more selected nodes. Full write-ups: View controls (Layout), SEM, Ego, Cycles, Paths, Highlight.
Causal panel
Left chrome, Causal mode. Identification, view mode, and atomic direct effects are documented in Causal analytics.
Analytics overview
The left chrome has three modes. Switch them with the segmented control
under the panel. The choice is stored as pallium-analytics-mode. It
does not change the canvas: SEM, Ego, Cycles, and Paths stay
available in every mode.
| Mode | Status | What it shows |
|---|---|---|
| Network | Live | Graph-level stats, hovered-node metrics, and a DAGitty-style Summary |
| Causal | Live | Implied CIs, total/direct adjustment, instruments, causal odds ratio, view modes |
| Bayesian | Placeholder | Joint factorization / Markov blankets — not implemented yet |
Prodigy computes metrics in WASM and pushes JSON to the page. Network
stats refresh when the graph structure changes. Node stats follow the
hovered node (not the selection), with a short delay before they
clear when the pointer leaves. Values flash when they change. Missing
or undefined numbers render as an em dash (—).
| What you want | Where |
|---|---|
| How big / dense / clustered is this DAG? Exposures, outcomes, causal path count? | Network |
| What independencies does the model imply? What should I adjust for? Direct effect, instruments, COR, moral/CPDAG views? | Causal |
| Directed paths between nodes I picked | Paths (canvas, not this panel) |
Live-session peers share the DAG, not your hover, not your analytics mode.
Network analytics
Network mode is three blocks: Network Stats (the whole graph), Node Analytics (the node under the pointer), and Summary (DAGitty-style exposure / outcome / path counts).
None of the Network Stats or Node Analytics use exposure / outcome roles except Diameter and Radius, which are measured from exogenous nodes to marked outcomes. Everything else in those two blocks is the directed graph as drawn. Summary does use roles.
An em dash (—) means the value is undefined for this graph or node
(too small, no path, a sink, and so on). It is not a zero.
Network Stats
Nodes
Count of nodes on the canvas.
Edges
Count of directed edges. A pair A → B and B → A is two edges.
Isolates
Nodes with total degree 0: no in-edges and no out-edges.
Diameter
Longest directed shortest-path distance from any exogenous node (in-degree 0) to any outcome node. Same path family as radius.
Empty (—) when there is no exogenous node, no outcome, or no directed
path from any exogenous node to any outcome.
This is not the usual undirected-graph diameter over all pairs. It is the span of the causal DAG from sources to marked effects.
Radius
Shortest of those same exogenous→outcome distances. Empty under the same conditions as diameter.
Together: diameter is the longest cause→effect walk you have marked; radius is the shortest. A graph with one short path and one long path will show them as two different numbers.
Median Eccentricity
Median of per-node eccentricity values. Sinks and isolates (eccentricity undefined) are left out of the median, so a bunch of terminal outcomes cannot collapse this to zero.
Density
Directed simple-graph density: (m / (n(n-1))). Shown as a percentage. Self-loops are not in the model. 100% would mean every ordered pair except (i \rightarrow i) has an edge.
Transitivity
Among directed chain wedges (i \rightarrow j \rightarrow k), the fraction that are shielded (there is also an edge between (i) and (k)). Shown as a percentage.
Denominator is open mediated triples plus those shielded chains — not (n^3), and not all triple types. High transitivity means chains tend to come with a closing edge.
Degree Assortativity
Pearson correlation, over directed edges, of the source’s out-degree with the target’s in-degree (Newman-style for digraphs). Range roughly ([-1, 1]).
- Positive: busy sources point at busy sinks (hubs feed hubs).
- Negative: busy sources point at quiet sinks (or the reverse).
—with fewer than two edges, or if a side has no variance.
Open Triples
Unshielded path triples: two edges through a middle node, no edge between the endpoints. This number is the sum of the next three:
Mediated + Confounding + Colliders = Open Triples.
That identity is the only sum the UI promises.
Mediated
Open chain (i \rightarrow j \rightarrow k) with no (i!-!k) edge. A mediation motif (cause → mediator → effect, unshielded).
Confounding
Open fork (i \leftarrow j \rightarrow k) with no (i!-!k) edge. A common-cause motif.
Colliders
Open v-structure (i \rightarrow j \leftarrow k) with no (i!-!k) edge. Two arrows into the same child, parents not adjacent.
Closed Triples
Undirected triangles: three nodes with an edge on every pair (direction ignored for the “is there an edge” test). Counted once per triple, not once per wedge.
Closed triples are not the sum of open triples, and not “shielded mediated + shielded colliders” as a raw add — a triangle is one closed triple even if it contains several motifs.
Power Law α
Continuous MLE for a power-law exponent on total degree, using nodes with degree (k \ge 1):
[ \alpha = 1 + n \big/ \sumi \ln(k_i / k{\min}), \quad k_{\min} = 1 ]
Needs at least three such nodes. Shown to two decimals. Typical reported scale-free exponents sit a bit above 2; treat a single graph’s α as a sketch, not a theorem.
Scale Free
Yes if the log empirical CCDF of total degree fits the Pareto CCDF
implied by that α with (R^2 > 0.8). No otherwise. — when α itself
could not be estimated.
This is a coarse flag for “does the degree tail look power-law-ish,” not a formal Clauset–Shalizi–Newman test.
Node Analytics
The heading is the hovered node’s name (or id). Leave the node and the block clears after a short delay so the numbers do not flicker as you move between neighbors.
In-Degree
Number of incoming arrows.
Out-Degree
Number of outgoing arrows.
Total Degree
In + out. A node with A → X → B and also C → X has total degree 3.
PageRank
Prestige flowing along the arrows (causes → outcomes). Damping 0.85, 100 iterations, dangling mass redistributed uniformly. Values sum to about 1 across the graph.
High PageRank: many paths (or high-prestige parents) point into this node. Sinks that collect structure light up here.
Inverse α
PageRank on the reversed digraph — prestige of causes given outcomes. Same scale (sums ≈ 1).
High inverse-α: this node is an important parent of important descendants. Sources that fan out into the rest of the DAG light up here.
Read the pair: PageRank asks “what is downstream-prestigious?”; inverse-α asks “what is upstream-prestigious?”
Betweenness
Directed Brandes betweenness, normalized by (1/((n-1)(n-2))). Fraction of directed shortest paths that pass through this node (endpoints excluded). Range ([0, 1]) on graphs with (n > 2).
High betweenness: a bottleneck on shortest directed routes. Mediators on the only path from a cluster of causes to a cluster of effects.
Closeness
Wasserman–Faust form for disconnected digraphs: (number of other nodes reachable along out-edges) / (sum of those directed distances). 0 if the node reaches nobody.
Higher near nodes that quickly reach many descendants (often toward sinks of a chain). Not the undirected (1 / \sum d).
Eccentricity
Longest directed shortest-path distance from this node to any other
reachable node. — for sinks and isolates (they reach nobody; calling
that 0 would wrongly force network radius to 0).
Shown as a whole number when it is an integer, otherwise one decimal.
Summary
Same four rows as DAGitty’s Summary panel. Roles and directed structure only. Refresh when the graph changes, not on hover.
Exposure(s)
Display names of nodes marked exposure, in stable id order. not set when there are none.
Outcome(s)
Display names of nodes marked outcome. not set when there are
none.
Covariates
Count of nodes that are neither exposure nor outcome:
(n - n*{\text{exposure}} - n*{\text{outcome}}). Isolates and
mediators both count. Zero is a real zero, not —.
Causal Paths
Number of directed paths from any exposure to any outcome (DAGitty
countPaths: memoized DAG walk, not shortest paths). Multiple
exposures and outcomes add: each pair is counted, then summed.
0 when there is no exposure or no outcome. — when the graph has a
directed cycle (the count is undefined then; DAGitty hides the whole
summary). Undirected and bidirected edges are not walked.
Causal analytics
Causal mode is DAGitty-style identification on the current canvas, not on a stored snapshot. Roles on the nodes (exposure / outcome) drive it. Canvas Paths is a different tool: it traces directed walks among selected nodes and ignores roles.
Open Causal on the left. Two blocks, plus a search box pinned at the bottom, then View mode radios.
Conditional independencies
Pallium lists implied independencies of the form
[ A \perp B \mid Z ]
including the empty conditioning set ((A \perp B)). These are the testable missing-edge implications of the DAG: pairs that should be independent given some (Z) if the graph is correct.
The search is a Bayes-ball / minimal-separator walk in the spirit of Textor et al. / DAGitty. To keep the WASM thread usable it returns one minimal (Z) per non-adjacent pair, not every alternative separator, and caps the list (about 2,000 rows). A hint under the list tells you when the list was truncated.
Filter with Filter independencies at the bottom: case-insensitive match against the rendered string and the raw names ((A), (B), members of (Z)).
Empty list: the graph implies no testable CI among observed structure (pairs or conditioning sets that include an unobserved node are omitted). Load a graph first if you see the “Load a graph…” hint.
These independencies do not require exposure/outcome roles.
Identification
This block does require roles. Set at least one node to exposure and at least one to outcome (E on the node). Use the Identification dropdown.
Unobserved (latent) nodes are excluded from every set: you cannot condition on a variable that is not in the data. Nodes marked adjusted (A) are treated as already conditioned (must-include). Capped at about 24 alternative sets so the search cannot freeze the browser.
These covariates are names from the DAG, not a regression Pallium runs. If the DAG is wrong, the sets are wrong.
Adjustment (total effect)
Purpose: covariates that (asymptotically) identify the total causal effect of the exposure(s) on the outcome(s) — every directed path from X to Y.
How: back-door graph (strip the first edges of proper causal paths out of exposures), then ancestor graph, moral graph, Takata minimal separators. Must-not-adjust: latents, exposures, outcomes, descendants of proper causal-path mediators. Selection nodes, if present, are must-include; if the outcome is still d-connected to selection in the back-door graph, no set exists.
Multiple exposures and outcomes are allowed; the sets are for the joint total effect.
| What you see | Meaning |
|---|---|
| Hint: set an exposure | No exposure role on the canvas |
| Hint: set an outcome | Exposure is set; no outcome |
{ A, B } | Adjust for those covariates (any one listed set is enough) |
∅ (empty set — no adjustment necessary) | The empty set is valid; you do not need to condition |
| Hint: no valid minimal set | Total effect is not identifiable by covariate adjustment on this DAG |
| Hint: list truncated | There are more legal sets than the cap |
An empty set in the list is not “none found.” “No valid minimal adjustment set” is a different hint, used when the search returns nothing.
Adjustment (direct effect)
Purpose: isolate the direct arrow X → Y (if any), blocking indirect causal paths as well as back-doors.
How: same separator search on the indirect graph (strip X → Y), with descendants of Y-on-causal-paths forbidden. Selection nodes are not supported — Pallium returns no sets if any node is marked selected.
Instrumental variable
Purpose: find Z (or Z given W) that can identify X → Y when covariate adjustment is not enough.
Needs exactly one exposure and exactly one outcome. Mediators
are treated as latent so you do not condition on the causal path.
Listed as Z or Z | W1, W2.
Causal odds ratio
Purpose: identify the causal odds ratio under selection / case-control sampling (DAGitty).
Needs a unique exposure, unique outcome, and unique selection node (S). A set (Z) works when
[ X \perp S \mid Y \cup Z ]
and (Z) is a total-effect adjustment set computed as if there were no selection. Pallium lists those (Z) and says whether the nodes already marked adjusted are valid.
View mode
Radios in the Causal panel replace the canvas display. The authored DAG is unchanged: Shift-click still edits the model; saving still writes the model.
| Mode | Purpose | What you see |
|---|---|---|
| normal | Edit and read the DAG | The model |
| moral graph | Hand-check adjustment: co-parents are married, arrows dropped | Ancestor moral graph of the back-door graph. Needs exposure and outcome; otherwise the canvas shows no derived edges. |
| correlation graph | Which pairs can be dependent given the empty set | Undirected dependency graph (skeleton of the transitive closure, plus common children) |
| equivalence class | Markov-equivalent DAGs | CPDAG: arrows that are not strongly protected become undirected (Meek) |
atomic direct effects (checkbox): thicken directed arrows that have no mediator (DAGitty pure-direct / transitive reduction). Works on the normal view.
View mode is local. Live-session peers keep seeing the model unless they pick the same radio.
Paths vs this panel
| Causal panel | Paths overlay | |
|---|---|---|
| Endpoints | Exposure / outcome roles | Canvas selection |
| Question | What do I adjust for? What CIs are implied? | Which directed edges lie on walks between these nodes? |
| Back-doors / colliders | Used inside the criterion | Not highlighted |
| Live session | Recomputed locally from the shared DAG | Local view |
With Paths off and exposure + outcome set, the canvas also paints lime causal paths and magenta biasing paths on the model (normal view). Turn Paths on to switch to selection-based tracing.
Bayesian
The Bayesian panel is a placeholder. The segmented control is there so the chrome does not have to move when the feature lands.
Today it shows:
View this graph as a Bayesian network — joint factorization, Markov blankets, and related structure. Coming soon.
Nothing is computed. Network and Causal still work. Canvas tools still work. Switching to Bayesian does not change the DAG.
Working copies
Pallium never edits a snapshot in place. Three layers:
| Layer | Where it lives | When it is written |
|---|---|---|
| Graph | Project record | Create graph, rename, canonical pointer, members |
| Snapshot | Named saved DAG | Create Snapshot (and the initial “Initial Setup”) |
| Working copy | The canvas (and a live room, if you went live) | Every structural edit |
Loading a snapshot copies it into Prodigy. After that you are on a working copy. Create Snapshot writes a new row from that copy. The row you loaded does not change.
A live session copies the host’s working copy into a shared room. Peers edit that room, not the seed snapshot. When the host ends the session, the room dies; each client keeps the last graph in RAM and can snapshot it. Nobody is rewound to canonical.
Canonical is the graph’s designated live version (one pointer, auto-shared). A live session is a temporary shared working copy of whatever you had open.
Dirty means the working copy differs structurally from the last load or successful save. Cosmetic view (SEM, Ego, Cycles, Paths, Highlight, node/edge size, camera, light, zen) is not dirty and is not in the CBOR.
Causal paths vs bias
Pallium’s Paths overlay colors directed walks between selected nodes. That is only one of the ways two variables can be connected in a DAG. The others matter for confounding and for what you must not condition on.
Three unshielded motifs
Same three the Network panel counts as open triples.
| Motif | Pattern | What it is |
|---|---|---|
| Chain (mediated) | (A \rightarrow M \rightarrow Y) | A causal path from A to Y. Paths highlights these. |
| Fork (confounding) | (A \leftarrow C \rightarrow Y) | A back-door / biasing path. Common cause. Paths stays grey. |
| Collider | (A \rightarrow K \leftarrow Y) | Not a causal path. Conditioning on K (or its descendants) opens a biasing path. Paths stays grey. |
“Unshielded” means no extra edge between the two endpoints. A triangle (closed triple) mixes these motifs; Network counts the triangle once under Closed Triples and still counts shielded chains for transitivity.
Why Paths ignores back-doors
The overlay is path tracing for “how does A get to Y along the arrows?” A confounder does not send an arrow from A to Y; it sends arrows into both. A collider does not connect A to Y by following arrows either. If you need those on the canvas, that is a different overlay (Pallium does not yet have DAGitty’s magenta biasing-path paint).
The Causal panel does use back-doors: adjustment sets are exactly the covariates that block biasing paths without blocking proper causal paths.
Proper causal path
In the adjustment-set code, nodes on directed paths from exposures X to outcomes Y (including X and Y when they sit on such a path). First edges out of X along those paths are stripped to build the back-door graph. Descendants of mediators on those paths must not be adjusted.
Roles and identification
Every node has exactly one role: intermediate, exposure, or outcome. Never both exposure and outcome. DAGitty import that marks both is rejected.
Three flags sit next to role. They are independent of each other and of role:
| Flag | Key | Purpose |
|---|---|---|
| Observed | U toggles off | Default. In the data. |
| Unobserved | U | DAGitty latent. Not in the data. Dashed outline; SEM ellipse. Identification will not ask you to adjust for it. |
| Adjusted | A | Already conditioned on. Must-include in adjustment sets. Pale fill. |
| Selection | S | Sampling / selection bias (DAGitty selected). Rectangle even in circle mode. Required for the causal odds ratio. |
| Role | Color | What it is for |
|---|---|---|
| Intermediate | Blue | Default. Covariate, mediator, other. |
| Exposure | Green | A cause / treatment you want the total effect of. |
| Outcome | Orange | An effect of interest. |
What roles change
- Fill color on the canvas.
- Causal identification — total/direct adjustment need ≥1 exposure and ≥1 outcome; instruments and the causal odds ratio need unique X and Y (COR also needs unique S).
- Network diameter and radius — exogenous (in-degree 0) → marked
outcomes. No outcome role, those two stats are
—. - Role-based path colors (Paths off): lime causal, magenta biasing, ancestor tints on intermediates.
What roles do not change
- Paths — uses the selection set, not roles. You can trace two intermediates.
- Conditional independencies — implied by the DAG regardless of roles.
- Most network stats — degrees, density, triples, PageRank, and so on.
What identification answers
Given this DAG, which covariates identify the effect you asked for?
| Identification | Question |
|---|---|
| Total effect | What do I adjust for to get the total effect of X on Y? |
| Direct effect | What do I adjust for to isolate X → Y? |
| Instrument | Is there a (conditional) instrument Z for X → Y? |
| Causal odds ratio | Under selection S, which Z identify the causal odds ratio? |
Pallium answers that in Causal mode. It does not run a regression, and it does not know if the DAG is true. Details: Causal analytics.
Prodigy
Prodigy is Pallium’s graph engine. It draws the canvas in the browser (WebAssembly) and computes the analytics numbers. The HTML around the canvas — pickers, panels, toggles — talks to it; it does not draw the DAG itself.
You do not install Prodigy separately. Loading a snapshot or joining a live session feeds the graph into the engine. Canvas tools (SEM, Ego, Cycles, Paths) and Causal view mode are switches the page sends in; the engine applies the colors and shapes.
Structural edits (nodes, edges including bidirected/undirected, roles, observed/adjusted/selection, positions, Scale, Layout) live in the engine’s working copy until you snapshot. Cosmetic view (node/edge size, camera, overlay tools, theme, view mode) does not.
Glossary
Terms as Pallium uses them. Cross-links go to the chapter that owns the behavior.
Adjustment set
A set of covariates such that, if the DAG is correct, conditioning on them identifies the effect you asked for (total or direct). Pallium lists minimal sufficient sets (back-door / DAGitty). An empty set in the list means no adjustment is necessary — not “none found.” See Causal.
Audience (live session)
Who may join a live room: invited (people you tick) or members (“Everyone on this graph”). Members-audience copies current members onto the invite list at start; people added to the graph later still need a host invite. See Live sessions.
Back-door / biasing path
A non-causal path between exposure and outcome, typically a fork (X \leftarrow C \rightarrow Y). Adjustment sets block these. The Paths overlay does not color them. See Causal paths vs bias.
Betweenness
Node metric: fraction of directed shortest paths that pass through this node (Brandes, normalized). See Network.
Adjusted
A node already conditioned on (DAGitty adjusted). Identification
treats it as a must-include covariate. Toggle A.
Bidirected edge
(A \leftrightarrow B): latent confounding without drawing a (U)
node (DAGitty spouses). Shift-click a directed edge a second time.
Import/export as <->. See Edges.
Causal odds ratio
Identification target under a unique selection node (S): (Z) such that (X \perp S \mid Y \cup Z) and (Z) identifies the total effect with empty selection. Causal panel → Identification. See Causal.
CPDAG / equivalence class
Completed partially directed acyclic graph: arrows that are not strongly protected become undirected. Causal view mode “equivalence class.” Display only. See Causal.
Correlation graph
Undirected graph of pairs that can be dependent given the empty set (DAGitty dependency graph). Causal view mode. Display only.
Selection node
Sampling / selection bias (DAGitty selected). Toggle S.
Drawn as a rectangle in circle mode.
Undirected edge
PDAG edge A -- B (no arrowheads). Shift-click a bidirected edge.
Import/export as --. See Edges.
Unobserved / latent
A node flag, independent of exposure/outcome/intermediate. The variable
is in the DAG but not in the data. Pallium draws a dashed outline (and
an ellipse in SEM mode) and will not put it in an adjustment set.
DAGitty attribute latent. Toggle with U. See
Nodes and roles.
Canonical snapshot
The graph’s one designated live version. A single pointer on the graph; choosing another replaces it. There cannot be two.
Automatically visible to every graph member (viewers included). You do not email-share it. You cannot delete it until you pick a different canonical.
Creating a graph sets Initial Setup as canonical.
This is not the same thing as a live session. Canonical is the project’s live snapshot. Go live hosts the working copy of whichever snapshot you currently have open.
See Snapshots.
CBOR
Binary format of a stored snapshot (nodes, edges, roles, positions). Live rooms use JSON ops instead; the database never holds the live working copy as CBOR until someone snapshots.
Closeness
Node metric: reachable count / sum of directed distances along out-edges. See Network.
Collider
Unshielded v-structure (i \rightarrow j \leftarrow k). Open-triples count; Paths stays grey; conditioning on (j) can open bias. See Causal paths vs bias.
Conditional independence (CI)
(A \perp B \mid Z): the DAG implies A and B are independent given Z. Listed in Causal mode as testable missing-edge implications.
Confounder / confounding triple
Unshielded fork (i \leftarrow j \rightarrow k). Common cause. Open triples count; Paths stays grey; adjustment sets exist to block these.
Creator
The owner of a graph or snapshot. Graph creator can delete a private graph and always counts as a maintainer. Snapshot creator can email-share and delete that snapshot (not if it is canonical).
Cycle
A directed walk that returns to its start. The editor allows them; Cycles paints those edges rose. Causal identification still assumes you meant a DAG.
DAG
Directed acyclic graph: arrows, no directed cycles. Pallium’s canvas will still let you draw a cycle; mark it with Cycles. Causal adjustment sets treat the drawing as a causal DAG. Bidirected and undirected edges make a MAG/PDAG; identification uses m-separation.
DAGitty code
Text form dag { Name [pos="x,y"] ... A -> B } used at graph create
(and by the parser). Empty input means Pallium’s default two-node
template. Nodes need pos. exposure / outcome tags set roles; both
on one node is invalid. Also round-trips latent, adjusted,
selected, <->, and --.
Density
(m / (n(n-1))), shown as a percentage. See Network.
Diameter / radius (Pallium)
Longest / shortest directed shortest-path distance from any exogenous
node to any outcome. Not all-pairs undirected diameter. — without
exogenous nodes, outcomes, or such a path.
Direct effect
The effect of X on Y along the direct arrow only (indirect paths blocked). Causal panel → Identification → Adjustment (direct effect). Selection nodes are not supported. See Causal.
Dirty
The working copy has structural edits since the last load or successful snapshot. Enables Create Snapshot. View-only changes (tools, node size, camera, theme) are not dirty. Ending or leaving a live session forces dirty so you can save the leftover canvas.
Eccentricity
Longest directed distance from this node to any other it can reach.
Undefined (—) for sinks and isolates. See
Network.
Edge
Directed (->), bidirected (<->), or undirected (--). Shift+click
cycles none → directed primary → clicked → bidirected → undirected →
delete. See Edges.
Ego
Canvas tool: while a node is hovered, dim everything outside its k-hop neighborhood (stepper 1–8). Pointer-driven, not search-driven. See Ego.
Exogenous
In-degree 0. Used with outcomes to define diameter and radius.
Exposure
Node role (green): a cause / treatment whose total effect you want. Required (with outcome) for adjustment sets. Not required for Paths.
Graph
The project: name, members, one canonical snapshot pointer, optional public flag. Contains many snapshots. Not the same as the canvas.
Guest
Anyone in a live session who is not the host. Can Leave; cannot End or invite. Keeps the last canvas when the room dies and can snapshot it.
Help
In-app cheat sheet (bottom right). Shortcuts, node statuses, canvas tools, identification, and view mode. Not the same as this glossary. See Shortcuts.
Host
Who started the live session. Uploads their working copy. Only they can invite more people or end the room.
Highlight (canvas tool)
Hover-an-edge overlay: highlighter yellow on that shaft/arrowhead and its two nodes, drawn on top of other edges. Distinct from path lime and exposure green. Cosmetic; not dirty; not live-synced. See Highlight.
Instrument / instrumental variable
A variable Z (optionally given W) that can identify X → Y when covariate adjustment is not enough. Needs unique exposure and unique outcome. Causal panel → Identification. See Causal.
Intermediate
Default node role (blue). Not exposure, not outcome.
Inverse α
PageRank on reversed edges: prestige of causes given outcomes. See Network.
Isolate
Node with total degree 0.
Layout (spring)
Canvas-tool button. DAGitty spring layouter; writes node positions.
Structural (dirty + live set_positions). See
View controls.
Live session
A shared working copy, not a shared snapshot. Nothing is durable until someone clicks Create Snapshot. When the host ends it, guests keep the last state on their canvas. See Live sessions.
Maintainer
Graph role (plus the creator). Can rename the graph, set canonical, invite members, flag milestones, see All snapshots.
Mediated triple
Unshielded chain (i \rightarrow j \rightarrow k). A causal-path motif. Counted under Open Triples; Paths highlights the directed edges.
Milestone
Maintainer flag on a snapshot. Many allowed (unlike canonical). Purpose: extra named checkpoints every member can open without replacing the live canonical version. Automatically visible to all members; no email share. See Milestones.
Moral graph
Undirected graph: skeleton plus edges between co-parents (and bidirected districts). Used inside adjustment-set search; also a Causal view mode (ancestor moral graph of the back-door graph). Display only in view mode. See Causal.
Node size
Cosmetic scale of disks / SEM rects / labels. Not dirty, not in snapshots, not live-synced. Distinct from Scale (layout stretch) and from edge size.
Outcome
Node role (orange): an effect of interest. Required (with exposure) for adjustment sets and for diameter/radius.
PDAG
Partially directed acyclic graph: directed edges plus undirected --
edges. Shift-click the third step in the edge cycle. Identification
uses m-separation on the mixed graph.
PageRank
Prestige flowing along arrows (causes → outcomes). See Network.
Atomic direct effects
Directed arrows with no mediator (DAGitty pure-direct / transitive reduction). Causal panel checkbox thickens them. See Causal.
Paths (causal pathways)
Canvas tool: grey the graph; lime on directed walks among the selected nodes. Ignores roles. Does not color confounders or colliders. See Paths.
Personal snapshot
A snapshot you created that is not canonical and not a milestone. Visible to you; maintainers also see it under All snapshots. Email-share puts it on someone else’s Shared with me.
Primary selection
The node E, X, and Shift+click-edge use. The full selection set is what Paths traces. See Selection.
Prodigy
Pallium’s WASM graph engine (Bevy). Draws the canvas, computes analytics,
talks to JS via window.prodigy.
Proper causal path
Directed path from exposure set X to outcome set Y. Used inside adjustment-set search; first edges out of X along those paths are stripped for the back-door graph.
Public graph
public flag. Listed more widely; cannot be hard-deleted from the
UI. Membership and snapshot rules still apply for editing.
Scale (layout)
X/Y stretch of node positions about the bounding-box center. Dirty;
live-broadcast as set_positions. Distinct from node/edge size and from
camera zoom.
Seed snapshot
The snapshot that was active when the host clicked Start on a live session. Label only: guests receive the host’s working copy, which may already differ from that snapshot.
SEM
Canvas presentation: labels live inside rectangular node bodies (DAGitty semlike). Not an analysis. See SEM.
Shared with me
Picker section for snapshots someone email-shared to you, that you did not create. Canonical and milestones do not appear here — they have their own sections because they are auto-shared with the graph.
Snapshot
A named, durable CBOR copy of the DAG (ids, names, roles, observed / adjusted / selection, positions, directed / bidirected / undirected edges). Does not include camera, canvas tools, node/edge size, view mode, or analytics mode. Loading copies it into a working copy; saving writes a new snapshot.
Total effect
The effect of X on Y along all directed paths from X to Y. Default Identification choice. Direct effect, instruments, and the causal odds ratio are the other choices. See Causal.
Transitivity
Fraction of directed chain wedges that have a shielding edge between the endpoints. See Network.
Viewer
Graph role. Can open the graph, see canonical + milestones + shares, join live sessions they are invited to, and create personal snapshots of a working copy. No graph settings, no canonical, no milestones.
Working copy
The DAG on the canvas (and in a live room, if you went live). Edits land here first. See Working copies.
Zen
Hides chrome (pickers, analytics, account, Help trigger); keeps canvas, right-hand tools, Zen toggle, and modal dialogs.
—
Undefined / not applicable. Not zero. Examples: eccentricity of a sink, diameter with no outcome, assortativity with one edge.
Building these docs
This book is an mdBook. Sources live
in docs/src/. The rendered site is what will be served at
docs.pallium.tech.
Prerequisites
- mdBook on
your
PATH(cargo install mdbook). This repo was last built with mdBook 0.4.x.
mdbook --version
Local
From the docs/ folder:
mdbook serve --open
That watches src/ and serves at http://localhost:3000. mdbook build
writes HTML into docs/book/ (gitignored).
Deploy
Cloudflare Pages project name: pallium-docs. Output directory: the
book/ folder produced by mdbook build. Custom domain:
docs.pallium.tech.
cd docs
./deploy.sh # build only
./deploy.sh --prod # build + deploy
First time only, create the Pages project:
npx wrangler pages project create pallium-docs --production-branch master
Then in the dashboard: Workers & Pages → pallium-docs → Custom domains →
add docs.pallium.tech.
Schema, live-protocol, and database internals live in a separate
mdBook: specs/ → specs.pallium.tech.
Editing
- Add or rename a page under
src/. - List it in
src/SUMMARY.md— that file is the sidebar. - Preview with
mdbook serve. - Keep tone short and literal. Prefer tables for shortcuts and mode matrices. Do not invent features that are not in the app.
book.toml sets create-missing = false, so a SUMMARY entry without a
file is a build error (on purpose).
Tone: short sentences, tables for matrices, no invented features. If the app uses an em dash for undefined, say so. Canonical vs live session vs milestone is easy to smash together — keep them distinct (see the Glossary).