---
title: Rule Plot Visualization
url: https://www.emergentmind.com/topics/rule-plot
type: topic
---

# Rule Plot Visualization

A rule plot is a visualization method for representing complex rule-based systems, either over time or as a static signal-flow regulatory network. In temporal models, such as those governed by Linear Temporal Logic (LTL), rule plots provide a fine-grained, time-indexed depiction of how an agent’s behaviors align with specified constraints. In rule-based biochemical models, rule plots refer to compact regulatory graphs that summarize how sites, species, and processes interconnect via mechanistic rules, emphasizing topological features such as cascades and feedback loops. Methodologies for rule plotting range from the Rule Status Assessment (RSA) framework for temporal traces to regulatory network compression in systems biology, each emphasizing different analytical and diagnostic insights [2306.13956][1509.00896].

## 1. Formalization of Rule Plots

Rule plots in temporal settings are constructed to display the pointwise-in-time status of each LTL rule along an observed agent trajectory. Let $\rho = T_0 \ldots T_f$ be the sequence of observed states (with atomic proposition labeling $\mathcal{L}(s_t) \subseteq P$). For each LTL formula $\varphi$ over $P$ and suffix-start time $t_0\leq t$, assign to each $t \in \left[t_0, T_f\right]$ a unique status:
- **Violated (v):** $\rho^{t_0 \ldots} \not\models \varphi$
- **Active (a):** $\rho^{t_0 \ldots} \models \varphi$ and, with precondition $\psi$, $\rho^{t_0\ldots} \models \psi$ and monitoring $\varphi$ at $t$ is still non-arbitrary
- **Satisfied (s):** $\varphi$ is active at $t$ but not at $t+1$ (or $t=T_f$)
- **Inactive (i):** $\rho^{t_0 \ldots} \models \varphi$ but neither active nor satisfied at $t$

Correspondingly, for each status $q\in\{a,s,i,v\}$, timesets $\tau^q(\varphi, t_0) = \{t \mid \text{status}(\varphi, t_0, t)=q\}$ partition $[t_0, T_f]$ [2306.13956].

In rule-based biochemical systems, rule plots begin with a formalization of **atomic patterns** (elemental states, bonds, or free sites). Each rule $R_i$ is defined as a transformation of reactant patterns $L$ to product patterns $R$ with a given kinetic law. Dependency graphs are constructed via matrices $P$ (production), $C$ (consumption), and $X$ (context), connecting rules and atomic patterns in a bipartite structure. This supports further analysis of rule–rule influences [1509.00896].

## 2. Algorithms for Computing Rule Plot Elements

In the temporal RSA setting, the algorithm performs a bottom-up computation over the LTL formula's syntax tree, associating each subformula node and suffix-start $t_0$ with its four status timesets. The pseudocode is:

```python
procedure RSA_Precompute(φ, trace ρ[ T₀…T_f ]):
    tree = parse_LTL(φ)
    for each t₀ in [T₀…T_f]:
        for each leaf node φ_j = p:
            τ_j^v, τ_j^a, τ_j^s, τ_j^i = AP_module(p, ρ, t₀)
        for each internal node φ_j in tree:
            gather precomputed τ^q for children at this t₀
            switch operator θ_j of φ_j:
                case AND: τ_j^* = AND_module(τ_j1^*, τ_j2^*, …)
                case OR: τ_j^* = OR_module(…)
                case X: τ_j^* = NEXT_module(…)
                # ... etc. for U, G, F, →
            store τ_j^* for node φ_j at suffix‐start t₀
    return all τ_j^q
```
[2306.13956]

In regulatory graph construction, all rules $R_i$ and atomic patterns $\alpha_j$ are enumerated; arc construction uses explicit criteria (production, consumption, context). Linear algebraic multiplication of $P$, $C$, $X$ matrices yields positive and negative rule–rule influences:
- $W^+ = P \cdot (C + X)^{\mathsf{T}}$
- $W^- = C \cdot X^{\mathsf{T}}$

Common algorithms for graph compression involve background removal (eliminating non-informative atoms/rules), automated rule grouping (merging rules with identical reaction centers), and user-defined atom grouping (collapsing related site states/bonds) [1509.00896].

## 3. Construction and Interpretation of Rule Plot Visualizations

In temporal RSA, a rule plot is generated by plotting time on the $x$-axis and stacking one horizontal bar per LTL rule (or per subformula for granular analysis). For each time interval $[t, t+1)$, the bar segment is colored according to status:
- Blue for *active*
- Green for *satisfied*
- Red for *violated*
- Light gray for *inactive*

Labels and hierarchical grouping clarify rule descriptions and relationships. Visual motifs—such as concurrent activation, completions, or violations—are directly readable from the colored regions.

In regulatory graph-based rule plots, compound bipartite graphs are visualized with nodes as rules or atomic patterns, edges for influential relationships, and visual filters such as grouping, background removal, and motif highlighting (e.g., cascades, feedback). Layout algorithms (force-directed, hierarchical) and color coding by role or motif assist interpretation. For example, cascades manifest as linear chains, feedback as cycles, and feed-forward motifs as triangles [1509.00896].

## 4. Worked Examples

For temporal RSA on a toy trace:

| t | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| p | 1 | 0 | 0 | 1 | 1 | 1 |
| q | 0 | 0 | 1 | 1 | 0 | – |

- **R₁: F p** (“eventually p”): Status $={0:\text{active/satisfied},1..5:\text{inactive}}$
- **R₂: G(q→X p)**: Status $={0..4:\text{active},5:\text{satisfied}}$

This translates to a rule plot where each rule occupies a horizontal strip, visually annotated by status transitions.

For regulatory graphs in a two-site phosphorylation cascade, the process is:
1. Decompose complexes into atomic patterns (e.g., $S(a~U), S(a~P), E(s~U)$, bonds).
2. Build $P, C, X$ matrices for each rule.
3. Construct the bipartite graph, apply background elimination, group and collapse as appropriate.
4. Final rule plot displays core signal flow—bindings, phosphorylations—as a minimal, interpretable graph [2306.13956][1509.00896].

## 5. Implementation in Software Frameworks

RSA in temporal logic relies on LTL monitoring over observed traces and is post hoc, needing no instrumentation of the agent or planner. Status computation is precomputable for all rules and times for efficient querying and visualization [2306.13956].

In rule-based biochemical modeling (e.g., BioNetGen), regulatory rule plots are generated using built-in directives (`visualize_regulatory`, with options for background pruning and grouping). Graphs are output in GML format, suitable for visualization in Cytoscape or yEd, and customizable via `%groups` blocks and user-defined collapse directives [1509.00896].

| Framework   | Domain         | Visualization Output    |
|-------------|---------------|------------------------|
| RSA         | Planning/AI    | Time-indexed rule plots|
| BioNetGen   | Biochemistry   | Regulatory graphs      |

## 6. Analytical Insights and Best Practices

Key insights from rule plots include:
- Active intervals, where the agent or subsystem is working to fulfill a rule, are the most informative diagnostically.
- Satisfied markers denote the moment of rule completion or permanent satisfaction.
- Inactive states highlight rules that either never became relevant or have been irrevocably decided.
- In regulatory graphs, motif identification (cascades, feedback, feed-forward) lends mechanistic interpretability to complex models.
- Heuristics such as recording only status transitions, filtering for top-K active rules, or collapsing related motifs improve manageability in large-scale systems.

The post hoc nature of both RSA and rule-based regulatory plotting allows fine-grained inspection and explanation without modifying the underlying agent or simulation code. This suggests significant utility as a diagnostic, model-checking, and communication tool for both planning and biochemical modeling domains [2306.13956][1509.00896].

Source: https://www.emergentmind.com/topics/rule-plot