Skip to main content
Back

Italian Researchers Turn Raw Gaming Traffic Into Human-Readable Flowcharts, Beating Black-Box AI

Researchers use process mining to turn raw gaming network packets into interpretable Petri nets that can identify which game a device is playing, achieving 88.3% AUC without any labeled training data.

Pro

  • Researchers propose a process mining pipeline that converts raw gaming TCP traffic into interpretable Petri nets without labeled data.
  • The method achieves 88.3% AUC classifying Clash Royale vs. Rocket League traffic, outperforming Isolation Forest (76.7%) and HBOS (78.6%).
  • Traffic is segmented via K-means clustering into distinct states; each state gets its own Petri net discovered by the inductive miner algorithm.
  • Petri nets reveal human-readable patterns, e.g., Clash Royale's characteristic PSH-flag burst behavior, discovered fully automatically.
  • Key limitation: longer window lengths cause underfitting, collapsing distinct behaviors into overly general models (WL=8 drops AUC to 52%).
  • Code is open-source on GitHub; tested on the UPSIDE dataset covering 12 devices across two 5G networks.

Deep learning can classify network traffic with impressive accuracy, but it tells you nothing about why a packet stream looks the way it does. A new paper from Italian researchers takes a different path: instead of training a black-box classifier, they convert raw gaming network packets into Petri nets , formal, human-readable flowcharts of protocol behavior , and use those models to both understand and classify traffic from online games.

The work, titled "Network Traffic Analysis with Process Mining: The UPSIDE Case Study", applies a technique called process mining to gaming traffic. Process mining is a field that automatically discovers process models from event logs , think of it as reverse-engineering a workflow diagram from a database of timestamped actions. Here, the "workflow" is the sequence of TCP packets flying between a gaming device and a game server.

Why gaming traffic is hard to analyze

The relevance of gaming, which generates large amounts of market revenue, drove research in modeling network devices' behavior to evaluate bandwidth consumption, predict and sustain high loads, and detect malicious activity. But gaming traffic is notoriously messy. While deep learning has been widely explored for Internet traffic analysis, such approaches often suffer from limited interpretability, motivating the integration of explainable techniques. In this context, process mining has also been proposed due to its ability to combine data-driven analyses with model-based insights, providing an explainable process-based view closely aligned to the actual behavior of the target system.

The core challenge is that raw network captures (PCAP files) are not structured like the event logs process mining expects. The noisy and interleaved nature of network traffic data leads to challenges in identifying meaningful events to enable the application of process mining algorithms. On top of that, traffic data is often captured without prior knowledge of the activities that drove its generation. In other words: no labels, no clean event boundaries, just a flood of packets.

The four-phase pipeline

The proposed method converts raw packet captures into interpretable models through four sequential phases:

Four-phase pipeline: monitoring, feature extraction, state characterization, and process discovery into Petri nets
  1. Network Traffic Monitoring: Packets are captured non-intrusively from devices playing games. Each device generates inbound and outbound TCP traffic stored as PCAP files.
  2. Feature Extraction: The PCAP data is parsed to isolate TCP traffic. A sliding window of length WL is applied to the packet stream, and per-window statistics are computed: average payload size, number of servers contacted, and counts of TCP flags (ACK, SYN, FIN, PSH, RST).
  3. State Characterization: The packet statistics are clustered into n states through K-means. Each window gets assigned to one of n traffic states (e.g., "idle," "burst," "handshake"). These cluster labels are then aligned back to the original individual packets.
  4. Network Traffic Modeling: Packets belonging to each state are grouped into an event log , a collection of short traces, each of length WL. Process discovery is then applied to each event log through the inductive miner, resulting in n Petri nets, one per state.

A Petri net is a bipartite graph of "places" (conditions) and "transitions" (events). In this context, each transition maps to a TCP event like C_to_S_ACK+PSH (client sends a push-flagged packet to the server). The resulting net is a compact, visual description of the packet-level protocol behavior within that traffic state , something a network engineer can actually read and reason about.

The UPSIDE dataset

The UPSIDE case study involves network traffic collected during the UPSIDE gaming event, which featured several parallel sessions of various games. The featured games at the event that we analyze are Clash Royale (CR), a real-time strategy game, and Rocket League (RL), an action game. The network infrastructure spanned two 5G local networks, an intermediate MPLS backbone, and a datacenter that mirrored traffic to a collection server without degrading game performance.

The dataset covers 12 devices in total: 8 playing Clash Royale and 4 playing Rocket League, each captured across four sessions over two days. Packet counts per device ranged from roughly 40,000 to 250,000 TCP packets, with average TCP flow lengths between 37 and 91 packets.

What the models actually look like

One of the most compelling results is the interpretability of the discovered Petri nets. The Petri net associated with one Clash Royale state represents a burst of messages transmitted from the client to the game server carrying the PSH flag, which indicates that the data should be immediately forwarded to the server without buffering. This behavior characterizes a typical communication pattern in CR, where the client continuously transmits numerous small packets to the server. The model was discovered entirely automatically, with no human annotation of what "a Clash Royale burst" looks like.

Heatmaps showing similarity, separation, and complexity metrics across window lengths and number of states

The team evaluated model quality using three metrics:

  • Similarity (sim): How consistent are the Petri nets for the same state across different devices? High values mean the model generalizes across players.
  • Separation (sep): How much better does a device's own Petri net fit its traffic compared to Petri nets from other states? Positive values mean states are meaningfully distinct.
  • Complexity (comp): How simple is the resulting Petri net? Simpler nets are easier to interpret.

The Petri nets obtained with window length and number of states equal to 2 appear to be the best ones, as similarity and separation percentages are both very high (94.70% and 779.69%). However, there is a fundamental tension: larger window lengths cause underfitting , the inductive miner merges heterogeneous behaviors into one overly general model that fits everything and distinguishes nothing.

Classifying games from traffic alone

The second experiment tests whether the Petri net models can distinguish Clash Royale traffic from Rocket League traffic, without ever having seen RL data during training. The method trains on one CR device, then uses the resulting Petri nets as a one-class classifier: new traffic traces are replayed against the Petri net, and those that fall below a fitness threshold are flagged as "unknown" (i.e., not Clash Royale).

The optimal trade-off is achieved at window length 3 with 3 states (CosSim = 58.14%, AUC = 88.30%), suggesting that WL should not be excessive and complexity must be balanced. The method was compared against four other interpretable one-class classifiers trained on the same windowed features:

MethodAUC (%)
Process Mining (this paper)88.30
HBOS78.55
Isolation Forest76.71
COPOD54.70
Z-score50.67

The process mining approach outperforms all four baselines, and does so while producing models that a human can inspect and explain , something none of the statistical baselines offer.

Where it falls short

The method has real limitations worth knowing. First, the underfitting problem is baked into the inductive miner algorithm: longer windows produce simpler, more general Petri nets that lose discriminative power. For instance, WL=8 yields high CosSim (99.98%) but low AUC (52.25%), essentially near-random classification. Second, the method was only validated on two games in a controlled event setting , it is unclear how well it generalizes to more diverse traffic or games with very similar network profiles. Third, the paper only tested TCP; UDP-heavy games (which describes most fast-paced shooters and battle royale titles) are left for future work.

The real unlock

What makes this work interesting beyond the headline accuracy number is the combination of unsupervised state discovery with interpretable behavioral models. Prior process mining work on network traffic required either controlled, labeled traffic or focused on well-structured protocols like MQTT and OPC UA. The public availability of gaming traffic datasets is scarce, especially those focused on large-scale competitive events. This paper is the first to apply process mining to real, dense, simultaneous gaming event traffic , and to show that the resulting models are both accurate enough to classify games and human-readable enough to explain what is happening at the packet level.

The practical applications are concrete:

  • ISP traffic management: Automatically identifying which game a subscriber is playing to apply QoS policies, without deep packet inspection of encrypted payloads.
  • Anomaly and cheat detection: A device whose traffic deviates from the expected Petri net for a given game state could be flagged for review.
  • Network capacity planning: Understanding the distinct traffic states of a game (idle, matchmaking, active match, burst) helps predict and provision bandwidth for gaming events.
  • Digital twin construction: The Petri nets can serve as behavioral models for simulating game server load under different conditions.

The source code is available on GitHub, and the underlying dataset comes from the UPSIDE project, an Italian research initiative studying 5G network behavior during competitive gaming events. Future work will extend the method to overlapping windows, additional IoT protocols, and heuristics for automatically selecting the best Petri net configuration.