MLP Inference Engine — proactive per-slice UPF scaling classifier
122
Sidecar container running alongside the Hybrid Controller in 5G standalone Kubernetes deployments. Receives a normalized 8-dimensional feature vector from the Control Loop Coordinator and classifies the current UPF operational state into a scaling decision with Softmax confidence, evaluated by the proactive scheduler before dispatching to the Reactive Control Engine.
Multilayer Perceptron — f(x) : ℝ⁸ → ℝ³ — 5,187 trainable parameters — CPU-only inference
Input (8) → Linear → BN1d → LeakyReLU(0.1) → Dropout(0.2)
→ Linear → BN1d → LeakyReLU(0.1) → Dropout(0.2)
→ Linear → logits ℝ³ → Softmax (service.py only)
Weights initialized with Kaiming He. Softmax applied at inference time by service.py, not inside model.py.
vectorizer.go[cpu, mem, pps/100k, thr/1000, drop/100, lat/100, jitter/50, sliceID]
sliceID: 0=eMBB · 1=URLLC · 2=mMTC
| Class | Meaning |
|---|---|
scale_out | UPF overloaded — deploy new instance |
scale_in | UPF idle — drain and terminate |
no_action | UPF stable — no action required |
| Parameter | Value |
|---|---|
| Optimizer | Adam lr=0.001 |
| Loss | CrossEntropyLoss — inverse class-frequency weights + ×1.2 no_action boost |
| Epochs | 140 — full batch — torch.manual_seed(42) |
| Dataset | 14,100 synthetic samples — 3 slices × 3 classes — aligned with faultinjection.go offsets |
| Class | F1 | Mean confidence |
|---|---|---|
| scale_in | 0.998 | 0.985 |
| no_action | 0.984 | 0.923 |
| scale_out | 0.966 | 0.937 |
Global accuracy: 98.44% — PCA variance explained: 93.8% (PC1=71.2%, PC2=22.6%) — >95% predictions above 0.60 confidence threshold
| Endpoint | Port | Origin | Purpose |
|---|---|---|---|
POST /predict | 5000 | Control Loop Coordinator | Receives [float64×8] → returns {action, confidence} |
GET /health | 5000 | Bootstrap & Control Manager | Gates proactive scheduler activation on pod startup |
GET /metrics | 8001 | Prometheus scraper | Exposes mlp_total_predictions counter |
/predict and /health — localhost only. /metrics — exposed via Kubernetes Service.
Single-stage — python:3.11-slim-bookworm — PyTorch 2.0 CPU-only — no CUDA
Entrypoint: python3 service.py → Uvicorn on :5000
MLP Inference Engine: github.com/5gc-hybrid-upf-autoscaling-system/hybrid-controller-mlp
Full project: github.com/5gc-hybrid-upf-autoscaling-system
Content type
Image
Digest
sha256:699c04b16…
Size
379 MB
Last updated
5 months ago
docker pull lpoclin/hybrid-controller-mlp:v1