Manuscript Offprint

arXiv:2610.29725

Structure-Aware Message Passing on Petri Nets through Directed Walks and Incidence Diffusion

Geri Skenderi

Abstract

A common application of the process mining discipline is to connect observed event data with Petri nets, which are bipartite, directed graphical process models with rich formal underpinnings. Recent work learns vector representations of Petri nets to retrieve process models and relate them to event logs, but leaves implicit two key aspects hidden within the net's structure: directed cycles (process loops) and invariants recorded by the net's incidence matrix. We expose both of these to message-passing graph neural networks, through a positional encoding built from return probabilities of directed place-transition walks (PNRWPE), and through same-type messages gated by diffusion kernels of the incidence matrix (DA-PNGNN). Our constructions raise macro balanced accuracy in predicting the generation factors of the 96 Process Discovery Contest 2023 models from 0.751 to 0.796 with PNRWPE, which nearly doubles accuracy on process loops, and to 0.830 with DA-PNGNN, which, without retuning, also improves net-to-tree retrieval top-1 accuracy on the self-supervised ProcRosetta benchmark by 4.1 to 5.9 points.

1 Introduction

Petri nets are a commonly used formal model of discrete-event dynamical systems supporting the analysis of concurrent computation [Mur89]. This has made them popular in the process-mining literature, which constructs, checks, and simulates them routinely [vdA22]. Other process-mining tasks, such as retrieving similar models from a collection or relating a model to the event logs of the same process, can be approached by learning vector representations of the nets themselves. Existing work has learned such representations for retrieval and classification [CFDS24], and a recent study [BvdA26] has built a multimodal neural model that aligns the process net with the process tree that generated it [vdA22] and the associated event logs.

A Petri net is, stripped to its bare bones, a directed bipartite graph whose two node partitions (or types) have semantic roles, and whose incidence matrix carries an algebra of conservation that Petri net theory has studied for decades [Mur89]. Message passing is the de facto paradigm for learning on graphs [GSR +^{+}20]. It relies on repeated local aggregation of learned node features along the edges of the graph. It is therefore a natural tool for learning representations of a Petri net, and simple adaptations of message-passing networks have been shown to be beneficial [BvdA26]. We argue that current modeling approaches are not making complete use of specific structural inductive biases that a Petri net structure can provide. Concrete examples are notions of where a node sits relative to directed cycles, and whether paths between node partitions that lead to potential token conservation exist. This raises the central question that motivates our work: can the structure that Petri net theory makes explicit improve learned representations of process models?

In this work, we answer this question by proposing two constructions that extract higher-order structural information from a Petri net for use in message passing. The first concerns positional encodings (PEs). Since graphs are structured domains, a sense of position lets a node encode its graph-based distance to other nodes, or its membership in substructures that matter for a downstream task [DB20]. A positional encoding implements this as a deterministic vector describing a node's structural role, which can be fed as input to any neural model over the graph, and a popular instantiation is the random-walk positional encoding (RWPE) [DLL +^{+}22]. We extend this encoding to Petri nets, obtaining the Petri net random-walk positional encoding (PNRWPE), by building it on the return probabilities of an alternating place-transition walk, a construction similar in spirit to the one used by transformers for directed graphs [GLM +^{+}23]. Since directed returns collapse on acyclic nets, we also derive a variant with uniform teleportation between opposite node types, which acts as a directed, bipartite PageRank [BGS05]. Both encodings are equivariant to node reordering and can be cheaply computed for a new net.

The second construction is a modification of the message-passing procedure itself. The incidence matrix of a net records how each transition consumes and produces tokens, which lets us define a diffusion operator whose steady state lies in the place- or transition-invariant subspaces of the net [Mur89]. Its powers yield pairwise kernels between nodes of the same type that suppress violations of linear token balance, and we use these kernels to learn same-type messages in addition to the ordinary ones. The resulting higher-order message passing produces representations that are informed about the state and structural conservation properties of the Petri net, an inductive bias unique to this graphical model. This construction is compatible with any message-passing architecture and can be used together with PNRWPE. We call the resulting architecture the diffusion-augmented Petri net graph neural network (DA-PNGNN).

We derive both constructions from first principles and evaluate them on two benchmarks from recent work: supervised prediction of the generation factors of the Process Discovery Contest (PDC) 2023 process models [CFDS24], and the self-supervised multimodal objective of ProcRosetta [BvdA26]. Both constructions provide improvements and the diffusion kernels do so on both benchmarks: on PDC 2023 they raise macro balanced accuracy from 0.751 to 0.832 when used together, while on ProcRosetta DA-PNGNN improves net-to-tree retrieval by up to 5.9 top-1 accuracy points. We run several control experiments that isolate the contribution of each component, study the effect of the receptive field during message passing, and also report the computational cost of the main architectural variants. The rest of the paper is organized as follows: Section 2 provides some background and fixes notation, Sections 3 and 4 derive the two constructions, Section 5 reports the complete experimental protocol and results, and Section 6 discusses what the evidence supports and our final conclusions.

References (26)

  • Geometric deep learning: going beyond euclidean data
  • Inside pagerank
  • Layer Normalization
  • ProcRosetta: Aligning event logs, process trees, and Petri nets in a shared latent space with grammar-constrained decoding, 2026
  • Process mining for Python (PM4Py): Bridging the gap between process- and data science
  • Process mining embeddings: Learning vector representations for Petri nets
  • Learning phrase representations using RNN encoder-decoder for statistical machine translation
  • A Generalization of Transformer Networks to Graphs
  • Graph neural networks with learnable structural and positional representations
  • Transformers meet directed graphs
  • Message passing neural networks
  • Diffusion improves graph learning
  • Decoupled weight decay regularization
  • Distributed representations of sentences and documents
  • Graphit: Encoding graph structure in transformers (opens arXiv in a new tab)
  • Graph neural networks exponentially lose expressive power for node classification
  • PyTorch: An imperative style, high-performance deep learning library
  • The graph neural network model
  • Dropout: A simple way to prevent neural networks from overfitting
  • Representation Learning with Contrastive Predictive Coding
  • The kernel effect is the clearest signal in the table: real kernels beat the zero-kernel control in all ten seeds, in all four configurations, by between 0.126 and 0.143
  • Rows whose labels do not mention PNRWPE use no node input
  • The rows at L = 3 reproduce Table 1
  • With PNRWPE the time per epoch changes by at most 0.007 s and the peak memory by at most 1 MB
  • one warm-up epoch, then the mean over three epochs, each a training and validation pass, on logarithmic axes
  • The exact-tree rate and top-1 retrieval (N→T: net→tree, T→N: tree→net) differ in percentage points