wikillm

Paper · 2023-07-31 · cs.LG, cs.AI

TFE-GNN: A Temporal Fusion Encoder Using Graph Neural Networks for Fine-grained Encrypted Traffic Classification

TFE-GNN turns each packet's bytes into a small graph (nodes are byte values, edges where PMI is positive), encodes header and payload graphs with separate GraphSAGE stacks, fuses them with cross-gating, and classifies 50-packet segments with a bidirectional LSTM. Author-reported F1 is 0.9855 on ISCX-Tor and 0.9649 on the self-collected Telegram set.

Graph neural networkLong short-term memory (LSTM)Pointwise mutual informationnetwork-securitytraffic-classificationgraph-neural-network

arXivPDFCodeMarkdown18 min read

AI-compiled by claude-haiku-5-5 on 2026-11-13, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.

In plain words

Encrypted network traffic hides what is inside each packet, so a classifier has to work from the raw bytes. Earlier methods mostly summarised a whole connection with statistics such as average packet size. Those numbers are unreliable for short connections, and the bytes themselves were often used without care.

This paper treats the bytes of each packet as a small graph. Each distinct byte value is a node, and two values are linked when they tend to appear near each other across the packet, using a standard word-association score. The packet's header and its payload get separate graphs, because the same byte value means different things in each. A graph neural network turns each graph into one vector, the two vectors are blended with learned gates, and a sequence model reads the packet vectors in order to name the user action.

The paper's pitch is that the model learns from the bytes directly, so it does not depend on flow statistics that are unreliable for short connections.

TL;DR

  • Byte-level graphs per packet, with an edge where PMI is positive §3.1.
  • Separate header and payload encoders, each four GraphSAGE layers with JKN-style concatenation §3.2 §3.3.
  • Cross-gated fusion, then a bidirectional LSTM over a segment and a cross-entropy loss §3.3 §3.4.
  • Author-reported: highest F1 on every set in Tables 1 and 2. On ISCX-nonVPN the margin is 0.0005 over ET-BERT tab. 1 tab. 2.
  • Cost: 44.0 M parameters and 2.2 GFLOPs in the authors' count, below ET-BERT's tab. 4.

Problem

Flow-level statistics are unreliable when flows are short, because short flows have higher deviation, and flow lengths follow a long-tailed distribution §1 app. B fig. 4. Graph methods built on packet correlations inherit the same statistics problem. Byte-based methods either treat header and payload alike or use each packet's raw bytes only as node features §1.

Assumptions: a passive observer that sees packets but cannot decrypt them app. A. The task is segment-level classification of in-app user actions, such as sending a text or a picture §2.2.

Method

Notation: a traffic segment is an ordered list of packets with timestamps §2.1 eq. 1. Each sample keeps at most 50 packets §4.1.3; the code pads shorter samples with empty packet slots utils.py. Each packet keeps its header bytes and payload bytes as separate inputs §4.1.2 §3.2.

1. Byte-level traffic graph per packet §3.1

A packet's bytes become a graph G = (V, E, X) §3.1. Each node is a byte value, so there are at most 256 nodes, and each node's initial feature is its byte value §3.1. Edges come from point-wise mutual information (PMI) between byte values. The paper keeps an edge when PMI is positive §3.1 eq. 3 and treats the graph as undirected, because PMI is symmetric §3.1.

The paper names PMI but gives no formula. The reference code computes it over sliding windows of 5 bytes (default), inside one packet's bytes, using the window counts described in the Paper vs code section utils.py.

Pseudocode
# Byte-level graph for one packet  [§3.1] [eq. 3]
# Input:  byte_values: list of ints in 0..255 (header or payload bytes)
# Output: edges between distinct byte values with positive PMI

def byte_graph(byte_values, window_size):
    # Slide a window of w consecutive bytes over the packet  [§3.1]
    windows = sliding_windows(byte_values, window_size)
    num_windows = len(windows)
    # Count the windows that contain each byte value  [§3.1]
    window_count = count_windows_per_value(windows)
    # Count co-occurring pairs of distinct values in one window  [§3.1]
    pair_count = count_pairs_per_window(windows)
    edges = []
    for (value_i, value_j), count in pair_count.items():
        # PMI from window probabilities; formula from the code, not the
        # paper  [code: utils.py#L263-L278]
        pmi = log(count * num_windows
                  / (window_count[value_i] * window_count[value_j]))
        # Keep only pairs with positive PMI  [§3.1] [eq. 3]
        if pmi > 0:
            edges.append((value_i, value_j))
    return edges

2. Dual embedding §3.2

Header and payload each get their own embedding table of K byte values by d0 dimensions, E_header and E_payload, which do not share parameters §3.2. The paper's reason is that one byte value can mean different things in a header and in a payload §3.2.

3. Traffic graph encoder §3.3

Each graph is encoded by stacked GraphSAGE layers with mean aggregation. Per node, the neighbour message is the sum of neighbour vectors divided by the neighbour count. The message and the node's own vector are concatenated, then passed through a linear map, a PReLU and batch normalisation §3.3 eq. 4. The stack is at most 4 layers, because deeper GNNs over-smooth §3.3. The four layer outputs are concatenated per node, as in a Jumping Knowledge Network §3.3 eq. 5. The packet vector g is the mean over nodes §3.3 eq. 6. The header and payload encoders have the same architecture and separate parameters §3.3.

4. Cross-gated feature fusion §3.3

Header vector g_h and payload vector g_p each pass through a filter of two linear layers with a PReLU between them, then a sigmoid gives a gate in [0, 1] §3.3 eq. 7 eq. 8. The header gate filters the payload vector, and the payload gate filters the header vector, then the two are concatenated §3.3 eq. 9. The paper's reasoning is that the header describes the packet, so it should decide what in the payload matters §3.3. Figure 1 shows the architecture fig. 1.

Pseudocode
# Cross-gated fusion of one segment's packet vectors  [§3.3]
# Inputs:  header_vecs, payload_vecs: (B, n, d) packet vectors
#          (d = 512 and n = 50 in the reference code [code: model.py#L14])

def fuse(header_vecs, payload_vecs):
    # Each gate is a two-layer filter followed by a sigmoid  [eq. 7] [eq. 8]
    header_gate = sigmoid(header_filter(header_vecs))
    payload_gate = sigmoid(payload_filter(payload_vecs))
    # The header gate filters the payload and the reverse  [eq. 9]
    fused = concat(header_gate * payload_vecs,
                   payload_gate * header_vecs)  # (B, n, 2d)
    return fused

5. Temporal model and loss §3.4

The n fused packet vectors of a segment form a sequence. A bidirectional two-layer LSTM reads it, and a two-layer linear classifier with PReLU gives the class logits. The loss is cross-entropy against the label §3.4 eq. 10. The paper also tried a transformer layer in place of the LSTM §3.4 and reports it in the ablation tab. 3.

Pseudocode
# Segment-level prediction  [§3.4] [eq. 10]
# Inputs:  fused: (B, n, 2d) fused packet vectors from the step above

def predict(fused):
    # Bidirectional two-layer LSTM over the packet sequence  [§3.4]
    states = bidirectional_lstm(fused)
    # Two-layer classifier with PReLU  [§3.4]
    logits = classifier(states)
    # Training minimises cross-entropy against the label  [eq. 10]
    return logits

Hyperparameters

Paper values come from the text §4.1.3 unless stated. Code values are per dataset in the order ISCX-VPN / ISCX-nonVPN / ISCX-Tor / ISCX-nonTor config.py. "not stated" means the paper does not give the value.

NamePaperCode (VPN / nonVPN / Tor / nonTor)Where
Packets per segment50 §4.1.350 (all)config.py
Payload bytes per packet150 §4.1.3150 (all)config.py
Header bytes per packet40 §4.1.340 (all)config.py
Overlong segment cut-offover 10000 packets dropped §4.1.210000 (all)config.py utils.py
PMI window size5 default §4.1.3 §4.65config.py
Node embedding size50 default §4.664 / 64 / 64 / 64config.py config.py config.py config.py
GraphSAGE layersup to 4 §3.34model.py
GNN hidden widthnot stated128 (all)config.py config.py config.py config.py
Packet vector widthnot stated512 (4 layers x 128)model.py model.py
Dropout on GNN inputs0.2 §4.1.30.2 / 0.1 / 0.0 / 0.05config.py config.py config.py config.py
Dropout placementnot statedon inputs of the first three layers onlymodel.py
LSTM dropoutnot stated0.0 / 0.15 / 0.0 / 0.1config.py config.py config.py config.py
LSTMbidirectional, 2 layers §3.4bidirectional, 2 layers, hidden 1024 per directionmodel.py
Classifier2 linear layers with PReLU §3.42048 → 512 (PReLU) → classesmodel.py
Activation in the filtersPReLU §3.3PReLU with 50 learned slopes, one per packet slotmodel.py model.py
Losscross-entropy §3.4 eq. 10cross-entropytrain.py
Label smoothingnot stated0 / 0.01 / 0 / 0config.py config.py config.py config.py
Batch size512 §4.1.332 / 102 / 32 / 102config.py config.py config.py config.py
Gradient accumulationnot stated1 / 5 / 1 / 5config.py config.py config.py config.py train.py
Epochs120 maximum §4.1.320 / 120 / 100 / 120config.py config.py config.py config.py
OptimiserAdam §4.1.3Adam, weight decay 0train.py config.py
Initial learning rate1e-2 §4.1.31e-2 (all)config.py config.py config.py config.py
Final learning rate1e-4, decays "gradually" §4.1.31e-4 / 1e-5 / 1e-4 / 1e-4config.py config.py config.py config.py
Warm-upratio 0.1 §4.1.30.1, linear, over 10% of mini-batchesconfig.py train.py optim.py
Schedule shape after warm-upnot statedcosine annealingtrain.py
Random seednot stated32config.py utils.py
Repetitions10 runs, averaged §4.1.3one run per call of train.pytrain.py
ClassesVPN and nonVPN 6, Tor and nonTor 8 §4.1.16 / 6 / 8 / 8config.py config.py config.py config.py
Train/test split9:1, stratified §4.1.1per class: first floor(n/10)+1 segments to test, rest to trainpreprocess.py
Max segments per classnot stated9999config.py config.py config.py config.py
Tor segment blocks60 s non-overlapping blocks, ISCX-Tor only §4.1.160 s blocks for iscx-tor onlypreprocess.py utils.py
Embedding rowsK byte values §3.2257 (256 values plus a pad index)model.py config.py

Results

Author-reported. Setup: seven result sets from two datasets, the self-collected WWT data (WeChat, WhatsApp, Telegram) and the public ISCX VPN-nonVPN and Tor-nonTor data §4.1.1, 9:1 train/test split §4.1.1, each experiment run 10 times and averaged on one RTX 3080 with PyTorch §4.1.3. Baselines are listed in §4.1.3; the paper does not say whether baseline numbers were re-run or copied. The tables show single values with no spread.

Table 1, WWT (self-collected), tab. 1. The paper's F1 for TFE-GNN is 0.9946 (WeChat), 0.9961 (WhatsApp) and 0.9649 (Telegram).

ModelWeChat ACWeChat PRWeChat RCWeChat F1WhatsApp ACWhatsApp PRWhatsApp RCWhatsApp F1Telegram ACTelegram PRTelegram RCTelegram F1
AppScanner0.99270.99080.99040.99050.97900.96880.96010.96280.83790.81540.86530.8304
K-FP0.97410.96650.96300.96450.97100.95890.95150.95260.87970.83780.89900.8567
FlowPrint0.74290.53020.63800.55320.61970.38200.49340.38800.48330.40250.50000.4311
CUMUL0.94720.94970.94120.93900.98550.98350.96990.97560.83300.79800.84710.8053
GRAIN0.94040.93660.93690.92510.97240.96850.94750.95500.80030.76150.79030.7407
FAAR0.98730.98630.98470.98540.97900.96830.95660.95970.81840.78840.85070.8018
ETC-PS0.98630.98640.98310.98460.98330.97430.96850.97030.84770.82950.87100.8382
FS-Net0.92230.94460.91960.89640.99420.99490.99190.99330.84690.81610.87440.8272
DF0.98000.97570.97510.97510.89780.79540.84060.81430.82510.82060.85420.7960
EDC0.97460.96530.96250.96200.97320.95890.95260.95460.81530.81180.83720.7896
FFB0.96750.96910.96610.96440.93500.89570.87670.87080.79900.76300.81690.7802
MVML0.96430.95190.95400.95260.94560.93020.90090.89710.79430.74130.76360.7340
ET-BERT0.95050.93680.92850.92660.91070.89340.86970.84390.76790.87120.79890.7858
GraphDApp0.87630.83680.83780.83300.87530.76150.80600.77910.77660.75750.76270.7227
ECD-GNN0.98630.98470.98300.98350.98110.97220.96470.96720.18100.03530.16410.0528
TFE-GNN0.99560.99530.99390.99460.99710.99570.99660.99610.95860.95840.97420.9649

Table 2, public ISCX sets, tab. 2. Columns: AC, PR, RC, F1 for each set.

ModelVPN ACVPN PRVPN RCVPN F1nonVPN ACnonVPN PRnonVPN RCnonVPN F1Tor ACTor PRTor RCTor F1nonTor ACnonTor PRnonTor RCnonTor F1
AppScanner0.88890.86790.88150.87220.75760.75947465 (as printed)0.74860.75430.66290.60420.61630.91530.84350.81400.8273
K-FP0.87130.87500.87480.87470.75510.74780.73540.73870.77710.74170.62090.63130.87410.86530.77920.8167
FlowPrint0.85380.74510.79170.75660.69440.70730.73100.71310.24000.03000.12500.04840.52430.75900.60740.6153
CUMUL0.76610.75310.78520.76440.61870.59410.59710.58970.66860.53490.48990.49970.86050.81430.73930.7627
GRAIN0.81290.80770.81090.80270.66670.65320.66640.65670.69140.52530.53460.52340.78950.67140.66150.6613
FAAR0.83630.82240.84040.82910.73740.75090.71210.72520.69710.59150.48760.48140.91030.82530.77550.7959
ETC-PS0.88890.88030.89370.88510.72730.74140.71330.72080.74860.68110.59290.60330.93650.87000.83110.8486
FS-Net0.92980.92630.92110.92340.76260.76850.75340.75550.82860.74870.71970.72420.92780.83680.82540.8285
DF0.80120.77990.81520.79210.67420.68570.67170.67010.65140.48030.47670.47190.85680.80030.74150.7590
EDC0.78360.77470.81080.78880.69700.71530.70000.69780.64000.49800.45280.45040.86920.79940.74110.7451
FFB0.83040.87140.81490.83350.70200.72740.69450.70500.63430.48700.52030.49520.89540.75450.74300.7430
MVML0.64910.72310.61980.61510.51260.57510.47070.48060.63430.39140.41040.37520.72350.54880.55120.5457
ET-BERT0.95320.94360.95070.94630.91670.92450.92290.92350.95430.92420.96060.93970.90290.85600.82170.8332
GraphDApp0.64910.56680.61030.57400.44950.42300.36470.36140.42860.25570.25090.22810.69360.54470.53980.5352
ECD-GNN0.11110.01850.16670.03330.06060.01010.16670.01900.05710.00710.12500.01350.90780.80150.81680.7977
TFE-GNN0.95910.95260.95930.95360.90400.93160.91900.92400.98860.97920.99390.98550.93900.87420.83350.8507

The paper's text says TFE-GNN is best on all ISCX sets except nonVPN, where ET-BERT is "similar" §4.2. The printed F1 gap there is 0.9240 against 0.9235.

Ablation, tab. 3. Each cell is ISCX-VPN | ISCX-Tor. "H" is header, "P" is payload, "DUAL" is dual embedding, "JKN" is the concatenation over layers, "CGFF" is cross-gated fusion, and "A&N" is activation and batch normalisation §4.3.

VariantACPRRCF1
w/o P (header only)0.8713 | 0.98740.8261 | 0.97880.8228 | 0.99340.8230 | 0.9806
w/o H (payload only)0.8051 | 0.87260.8232 | 0.77800.7957 | 0.78090.7980 | 0.7700
w/o DUAL0.9310 | 0.98290.9149 | 0.97470.9209 | 0.98010.9173 | 0.9760
w/o JKN0.9474 | 0.97900.9365 | 0.97360.9397 | 0.98790.9374 | 0.9795
w/o CGFF0.9445 | 0.98000.9329 | 0.97170.9371 | 0.98470.9339 | 0.9770
w/o A&N0.6105 | 0.22120.5576 | 0.05550.5487 | 0.11800.5289 | 0.0548
w/ SUM aggregation0.8497 | 0.81940.8549 | 0.72870.8380 | 0.69860.8426 | 0.6891
w/ MAX aggregation0.8480 | 0.98700.8328 | 0.97520.8115 | 0.97780.8094 | 0.9751
w/ GRU downstream0.8550 | 0.89320.8489 | 0.87020.8287 | 0.86640.8294 | 0.8610
w/ Transformer downstream0.6754 | 0.97770.5706 | 0.97530.5992 | 0.98200.5658 | 0.9828
TFE-GNN (default)0.9591 | 0.98860.9526 | 0.97920.9593 | 0.99390.9536 | 0.9855

The paper's own reading: headers matter more than payloads, and the gap is 2.5 F1 points on VPN and 21.06 on Tor (the "w/o P" row minus the "w/o H" row, see the Pitfalls) §4.3. Dual embedding adds 3.63 and 0.95 F1 points §4.3.

GNN variants, fig. 2. On Telegram, ISCX-VPN and ISCX-Tor, GraphSAGE gives the best F1 of GAT, GIN, GCN, SGC and GraphSAGE. Values are only in the figure, so no numbers are given here §4.4.

Complexity, tab. 4. FLOPs in millions and parameters in millions.

ModelFLOPs (M)Parameters (M)
FS-Net1.0e+23.2e+0
DF2.8e+09.3e-1
EDC2.2e+12.2e+1
FFB2.6e+21.7e+0
MVML7.2e-43.7e-4
ET-BERT1.1e+48.6e+1
GraphDApp3.8e-21.1e-2
ECD-GNN2.9e+11.4e+0
TFE-GNN2.2e+34.4e+1

The paper says ET-BERT needs about five times TFE-GNN's FLOPs and twice its parameters, and that ET-BERT's pre-training is costly §4.5.

Sensitivity, fig. 3. Embedding dimension: F1 rises quickly below 100 and then levels off, so 50 is the default for cost reasons §4.6. PMI window: a smaller window gives better F1, because larger windows make graphs too dense §4.6. Segment length: shorter gives better F1 §4.6. The figure values are not given in the text.

Paper vs code

Code: github.com/ViktorAxelsen/TFE-GNN at code_commit above, Apache-2.0. The owner's GitHub profile is named Haozhen Zhang, the paper's first author, and the README calls the repository the official implementation. The paper and arXiv do not link it; the arXiv comment says code "will be available" later. I accepted it because the owner is an author. Reading the code, I found the following differences. Each line gives the paper's statement and the code's.

  1. Embedding size. Paper default is 50 §4.6. Code uses 64 for all four datasets config.py config.py config.py config.py.
  2. Batch size. Paper states 512 §4.1.3. Code uses 32 on VPN and Tor config.py config.py, and 102 with 5-step gradient accumulation on nonVPN and nonTor config.py config.py config.py config.py. The optimiser step thus sees 510 segments on nonVPN and nonTor train.py. This is derived from the code, not stated.
  3. Epochs. Paper states a maximum of 120 §4.1.3. Code uses 20 on VPN config.py, 120 on nonVPN config.py, 100 on Tor config.py, and 120 on nonTor config.py.
  4. Dropout. Paper states 0.2 §4.1.3. Code uses 0.2 / 0.1 / 0.0 / 0.05 config.py config.py config.py config.py, applied to the inputs of the first three GraphSAGE layers only model.py. The LSTM dropout, which the paper does not mention, is 0.0 / 0.15 / 0.0 / 0.1 config.py config.py config.py config.py.
  5. Final learning rate. Paper states 1e-4 §4.1.3. Code uses 1e-5 on nonVPN config.py and 1e-4 on the others config.py config.py config.py.
  6. Schedule. Paper says "gradually decays" with no shape §4.1.3. Code uses linear warm-up over 10% of mini-batches, then cosine annealing train.py optim.py. The scheduler steps after every mini-batch, not after every optimiser step train.py, so the warm-up counts batches.
  7. Label smoothing. Not in the paper. Code uses 0.01 on nonVPN only config.py; the others use 0 config.py config.py config.py.
  8. Train/test split. Paper says stratified 9:1 §4.1.1. Code keeps the first 9999 segments per class in directory-listing order, then sends the first floor(n/10)+1 to test and the rest to train, with no shuffling preprocess.py config.py.
  9. Packet filtering. Paper says bad packets and retransmissions are removed §4.1.2. Searching the repository for "retrans" and "bad packet" finds nothing. Among the filters in the paper, the code drops payload-less packets and overlong segments utils.py utils.py; no retransmission filter appears.
  10. Header bytes. Paper says the Ethernet header, IP addresses and ports are removed §4.1.2. remove() is written for bytes that start at the IP header utils.py, but pcap2npy.py stores the whole frame from the Ethernet header on pcap2npy.py pcap2npy.py. Counting slice offsets by hand for an Ethernet frame: remove() keeps bytes 0–11 (the two MAC addresses) and bytes 24 onward, so it drops the EtherType and IP bytes 0–9 and keeps the IP addresses and the ports. It does not strip the Ethernet header. I did not run this.
  11. Header and payload alignment. For header samples, the code filters the header list by header length, which is non-zero for every captured frame, and the payload list by payload length. Payload samples drop packets with no payload, but header samples keep them. The two 50-packet samples can therefore cover different packets utils.py utils.py utils.py. The paper does not state this and the code does not check it. The same pattern is in the Tor path.
  12. PMI formula. Paper gives none §3.1. Code uses log( count × N / (f_i × f_j) ), where N is the number of windows, f_i is the number of windows containing value i, and count is the number of co-occurring position pairs utils.py. Edges with PMI ≤ 0 are dropped utils.py.
  13. Nodes. Paper says each distinct byte value is one node, at most 256 §3.1. Code builds nodes only from values that have a positive-PMI edge utils.py, and the pad value 256 can be a node, giving up to 257 config.py model.py.
  14. Self-loops. Code adds a self-loop to every graph utils.py. Paper does not mention them.
  15. Window scope. Code applies the sliding window within one packet's byte row, so each packet gets its own graph preprocess.py utils.py. Section 1 says there is one vector per packet §1, but Section 3 does not say whether windows may cross packet boundaries.
  16. PReLU slopes. Code's gate filters use PReLU with 50 learned slopes, one per packet slot, not one per channel model.py model.py. Paper says only "PReLU" §3.3.
  17. LSTM width. Paper does not state the hidden size. Code uses 1024 per direction, so 2048 concatenated states feed the classifier model.py model.py.
  18. GraphSAGE details. Code passes mean aggregation, PReLU and batch norm to DGL's SAGEConv model.py. The order of the linear map, activation and norm lives inside DGL, not in this repository.
  19. Tor blocks. Paper says 60-second non-overlapping blocks, for ISCX-Tor §4.1.1. Code does that for iscx-tor only preprocess.py. Code drops a trailing partial minute utils.py. Not stated in the paper.
  20. Runs. Paper says 10 runs averaged §4.1.3. The repository sets one seed, 32 config.py utils.py, and train.py runs once per call train.py.
  21. Evaluation. The paper's "macro F1" matches the macro average that scikit-learn's classification_report prints test.py. This is an inference from the code. The model is the last epoch's checkpoint train.py; no validation split appears in the code.
  22. WWT data. The paper's self-collected WWT data §4.1.1 has no configuration here. The repository configures only the four ISCX sets config.py.
  23. Matches. Segment and packet truncation (50 / 150 / 40) and the 10000-packet cut-off agree with the paper §4.1.3 §4.1.2 config.py. Cross-gated fusion follows eqs. 7–9 model.py. Dual embedding, JKN concatenation and mean pooling match model.py model.py.

Pitfalls

  • "10.82%" and "4.58%" are absolute F1 gaps, not relative. Telegram: 0.9649 − 0.8567 (K-FP, the best baseline there) = 0.1082. ISCX-Tor: 0.9855 − 0.9397 (ET-BERT) = 0.0458 §1 tab. 1 tab. 2.
  • Ablation cells are ISCX-VPN | ISCX-Tor. The text's header-vs-payload gap of 2.5 points on VPN equals 0.8230 − 0.7980, which fits the VPN-first reading tab. 3 §4.3.
  • Table typo. AppScanner's ISCX-nonVPN recall is printed as "7465" tab. 2. Read it as a transcription error, not a value; the paper does not say what it should be.
  • Padding creates empty graphs. Segments shorter than 50 packets are padded at the end with whole packets of byte value 256 utils.py utils.py. A packet of one repeated value has no pairs, so its graph has no edges and no nodes utils.py utils.py. How DGL pools a zero-node graph was not checked here.
  • The LSTM reads the padding. Code feeds all 50 slots without packing model.py dataloader.py. For short segments, the forward final state comes after the padding slots model.py.
  • The pad value is a graph node. In a packet shorter than 150 bytes, pad value 256 is counted like any byte value, so it can form PMI edges with real byte values utils.py model.py.
  • Warm-up counts batches. num_steps is batches × epochs train.py, so the 10% warm-up is a share of mini-batches, not of optimiser steps.
  • No validation set. The paper does not say which split the ablation and sensitivity runs use. The code has no validation split, so any tuning on those runs is not separated from the test split §4.3 §4.6 preprocess.py.
  • No spread. Tables show one value per cell although the paper says 10 averaged runs §4.1.3.
  • Baseline provenance is not stated. Whether the baseline rows were re-run is not stated; ECD-GNN's near-zero rows on several sets are reported as is tab. 1 tab. 2.
  • Model size. The paper's 44.0 M parameters and 2.2 GFLOPs tab. 4 are the authors' figures. The widest layer in the code is the LSTM, at 1024 per direction model.py. I did not count parameters.
  • Graph topology is fixed before training. The paper lists this as a limitation, along with byte-level noise and no use of byte timing §6.

Lineage

  • Builds on: GraphSAGE (mean aggregation and concatenation) §3.3; Jumping Knowledge Networks for the layer concatenation §3.3; PReLU and batch normalisation §3.3; message-passing GNNs §2.3; PMI, a word-association measure from NLP §3.1; and BLJAN, which uses cosine similarity between bytes §3.1.
  • Compared against: flow-statistic methods (AppScanner, CUMUL, K-FP, FlowPrint, GRAIN, FAAR, ETC-PS), deep methods (FS-Net, EDC, FFB, MVML, DF, ET-BERT), and GNN methods (GraphDApp, ECD-GNN) §4.1.3. The paper calls ET-BERT a large model with heavy pre-training §4.2 §4.5.
  • Superseded by: not known from wiki content. The repository README names two follow-up works from the same owner, CLE-TFE and MH-Net, which I did not read.

Source and license

Adapted from “TFE-GNN: A Temporal Fusion Encoder Using Graph Neural Networks for Fine-grained Encrypted Traffic Classification” by Haozhen Zhang, Le Yu, Xi Xiao, Qing Li, Francesco Mercaldo, Xiapu Luo, Qixu Liu (arXiv:2307.16713), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors. Code citations refer to https://github.com/ViktorAxelsen/TFE-GNN at commit e62cb9f1e8b5 (Apache-2.0). Any quoted code is shown under that license.