Our framework predicts final TCP flow length using only early packets while remaining scalable to backbone traffic.
It comprises a tokeniser, an LSTM ensemble for feature extraction, and a Mixture Density Network for probabilistic regression.
1. TCP flow tokenisation
Raw packet traces are decoded into TCP flows and aggregated into fixed-size 10 ms time bins. This tokenisation
preserves temporal dynamics while regularising irregular arrival patterns and reducing data volume, exposing each flow
as a short sequence of compact feature vectors.
2. LSTM ensemble feature extractor
To capture diverse temporal characteristics across flow-length ranges, we partition flows into stratified temporal
domains and train an ensemble of LSTMs, each specialising in a distinct regime. During inference, the tokenised
sequence is passed through all LSTMs; their hidden representations are concatenated into a single feature vector,
providing a rich description of both short- and long-term behaviour.
3. Mixture Density Network regression
The concatenated features are fed to a Mixture Density Network that outputs the parameters of a Gaussian mixture
over flow length. This probabilistic regression captures uncertainty and possible multi-modal futures, avoiding
the limitations of single-point estimates from conventional regression models.
4. Early, proactive traffic engineering
By operating on only the first 400 ms of each flow, our model provides early flow-length predictions suitable for
SDN controllers. On CAIDA and MAWI datasets the approach substantially reduces mean absolute error compared with
linear regression, Bayesian regression, random forest, and SGD-based baselines, enabling proactive routing and
scheduling decisions that reduce congestion, packet loss, and latency.