NetPredict: LightGBM Network Telemetry Latency Forecaster
Overview
NetPredict is a compact LightGBM regression model trained to forecast one-way queuing delay from high-frequency network telemetry signals. The model is structured for low-latency inference so it can run alongside packet inspection pipelines and software switches to identify impending bufferbloat before packets are dropped.
When paired with inductive split conformal prediction, the model outputs calibrated prediction intervals with finite-sample coverage guarantees at a requested confidence level (default: 95%).
- Author: Ankit Kumar Patel
- Affiliation: National Institute of Technology, Uttarakhand
- Testbed: Distributed Systems & Telemetry Lab, IIT Roorkee
- License: MIT
- Format: LightGBM Booster (
model.txt)
Input Features
The model expects 6 input telemetry features:
ingress_mbps(float): Ingress traffic rate in Mbps.active_flows(int): Number of concurrent active TCP flows.arrival_kpps(float): Packet arrival frequency in thousands of packets per second.buffer_util_pct(float): Switch queue buffer occupancy percentage (0-100%).loss_rate_pct(float): Packet drop rate percentage (0-100%).jitter_ms(float): Flow inter-arrival jitter in milliseconds.
Target: latency_ms (float), representing end-to-end queuing and propagation delay.
Performance
Evaluated on a held-out test split of 3,000 samples from the eBPF network telemetry dataset:
| Metric | Value | Description |
|---|---|---|
| Root Mean Squared Error (RMSE) | 0.398 ms | Sub-millisecond error across normal and burst regimes |
| Mean Absolute Error (MAE) | 0.281 ms | Nominal queue tracking |
| R-squared (R2) | 0.9924 | Captures non-linear queue saturation curve |
| 95% Conformal Coverage | 95.12% | Empirical test set coverage at 1 - alpha = 0.95 |
| Median Inference Latency (p50) | 0.14 ms | Single-core CPU evaluation |
Quickstart
import pandas as pd
import lightgbm as lgb
from huggingface_hub import hf_hub_download
# Download model file from the Hub
model_file = hf_hub_download(
repo_id="The-AnkitPatel/netpredict-telemetry-lgbm",
filename="model.txt"
)
bst = lgb.Booster(model_file=model_file)
# Sample input vector
telemetry_data = pd.DataFrame([{
"ingress_mbps": 650.0,
"active_flows": 220,
"arrival_kpps": 580.0,
"buffer_util_pct": 74.5,
"loss_rate_pct": 0.4,
"jitter_ms": 3.2
}])
prediction = bst.predict(telemetry_data)
print(f"Predicted queuing delay: {prediction[0]:.3f} ms")
Conformal Calibration
To compute uncertainty intervals alongside point predictions:
import numpy as np
# Quantile non-conformity threshold from calibration set (alpha = 0.05)
q_hat = 0.742 # ms
point_pred = bst.predict(telemetry_data)[0]
lower_bound = max(0.0, point_pred - q_hat)
upper_bound = point_pred + q_hat
print(f"Point forecast: {point_pred:.2f} ms")
print(f"95% Conformal interval: [{lower_bound:.2f}, {upper_bound:.2f}] ms")
Related Links
- Dataset: The-AnkitPatel/ebpf-network-telemetry
- Live Interactive Space: The-AnkitPatel/netpredict-conformal-telemetry
- Kaggle Notebook: theankitkumarpatel/conformalized-lightgbm-network-telemetry
Citation
@misc{patel2026netpredict,
author = {Patel, Ankit Kumar},
title = {NetPredict: LightGBM Network Telemetry Latency Forecaster},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/The-AnkitPatel/netpredict-telemetry-lgbm}}
}
Evaluation results
- Root Mean Squared Error (ms)self-reported0.398
- Mean Absolute Error (ms)self-reported0.281
- R-squaredself-reported0.992