Token-based replay explained

Token-based replay technique is a conformance checking algorithm that checks how well a process conforms with its model by replaying each trace on the model (in Petri net notation).[1] Using the four counters produced tokens, consumed tokens, missing tokens, and remaining tokens, it records the situations where a transition is forced to fire and the remaining tokens after the replay ends. Based on the count at each counter, we can compute the fitness value between the trace and the model.

The algorithm

The token-replay technique uses four counters to keep track of a trace during the replaying:

Invariants:

p+m\gec\gem

r=p+m-c

At the beginning, a token is produced for the source place (p = 1) and at the end, a token is consumed from the sink place (c' = c + 1). When the replay ends, the fitness value can be computed as follows:

\frac(1 - \frac) + \frac(1 - \frac)

Example

Suppose there is a process model in Petri net notation as follows:

Example 1: Replay the trace on the model M

p=1

).

a

consumes 1 token to be fired and produces 2 tokens (

p=1+2=3

and

c=1

).

b

consumes 1 token and produces 1 token (

p=3+1=4

and

c=1+1=2

).

c

consumes 1 token and produces 1 token (

p=4+1=5

and

c=2+1=3

).

d

consumes 2 tokens and produces 1 token (

p=5+1=6

,

c=3+2=5

).

c=5+1=6

). The trace is complete.

The fitness of the trace (

a,b,c,d

) on the model

M

is:

\frac(1 - \frac) + \frac(1 - \frac)= \frac(1 - \frac) + \frac(1 - \frac)= 1

Example 2: Replay the trace (a, b, d) on the model M

p=1

).

a

consumes 1 token to be fired and produces 2 tokens (

p=1+2=3

and

c=1

).

b

consumes 1 token and produces 1 token (

p=3+1=4

and

c=1+1=2

).

d

needs to be fired but there are not enough tokens. One artificial token was produced and the missing token counter is increased by one (

m=1

). The artificial token and the token at place

[b,d]

are consumed (

c=2+2=4

) and one token is produced at place end (

p=4+1=5

).

c=4+1=5

). The trace is complete. There is one remaining token at place

[a,c]

(

r=1

).

The fitness of the trace (

a,b,d

) on the model

M

is:

\frac(1 - \frac) + \frac(1 - \frac)= \frac(1 - \frac) + \frac(1 - \frac)= 0.8

Notes and References

  1. Rozinat. A.. van der Aalst. W.M.P.. March 2008. Conformance checking of processes based on monitoring real behavior. Information Systems. 33. 1. 64–95. 10.1016/j.is.2007.07.001. 0306-4379. subscription.