5G Base Station Energy Consumption Prediction
This competition is hosted on Zindi, a machine learning platform for data science challenges.
TL;DR: In hardware-driven domains, the biggest gains come before model training: constructing the correct target at the right granularity, encoding domain rules as explicit features, and matching each variable's representation to its semantic structure. When the label itself requires domain-aware construction, no amount of algorithmic sophistication can compensate for getting it wrong.
The Problem
5G energy modeling is not a typical regression problem. The target — energy consumption of a base station — depends on hardware configuration, traffic load, frequency band, and energy-saving mode states that interact in complex, physics-driven ways. A station with two cells operating at different frequencies doesn't simply use twice the energy of a single-cell station. The relationship between load, frequency, antenna count, and energy consumption follows hardware-specific rules that standard ML models struggle to discover from data alone.
The competition provided base station-level energy measurements, but the modeling needed to happen at the cell level — individual radio units within a station. The problem was that no per-cell energy measurement existed in the data. The total energy reading is all you get, and you need to predict at a granularity finer than your labels. This is a target construction problem that precedes any modeling.
Beyond the target issue, the categorical variables in this domain have meaningful structure. Day of week isn't nominal — Monday is adjacent to Tuesday. Hardware generations are ordered. Antenna types have a hierarchy. Using default one-hot encoding for everything throws away information that domain experts would consider obvious. The challenge became: how do you encode domain knowledge into features that gradient boosting can exploit?
My Approach
The first and most consequential decision was solving the target construction problem. For multi-cell stations operating two cells at different frequencies, I attributed total energy to each cell using frequency-specific proportions derived from hardware characteristics. These proportions aren't arbitrary splits — they come from the physical relationship between frequency band and power consumption. Without this step, the label itself is undefined at the modeling granularity. Every team that skipped this step was predicting an ill-defined target.
Next, I built domain-derived indicator features that encode known hardware behavior as explicit binary flags. Rather than hoping the model discovers that energy-saving mode ES1 activates under very low load with large antenna arrays, I created features that directly encode these rules. These interaction terms — load level × energy-saving state × antenna count × frequency — give the model a structured representation of physics-driven hardware behavior that would take thousands of trees to approximate from raw features.
For encoding, I matched each categorical variable to the contrast structure that respects its semantics: Helmert contrasts for day of week (each day compared to all prior days), polynomial contrasts for hardware generation (ordered, with potential nonlinear effects), backward difference for antenna type, Weight of Evidence for binary indicators, and M-estimator smoothing for high-cardinality time features. This per-variable encoding strategy ensures that the numeric representation preserves the structure that exists in the domain.
The modeling itself operated at two levels — base station and cell — with independent model training at each granularity. A three-way split (train/freeze/test) kept ensemble weight optimization honest. The final pipeline spans 18 scripts in R, orchestrated by a single entry point, with models from LightGBM, XGBoost, CatBoost, Random Forest, GLMNet, H2O AutoML, SuperLearner, and tidymodels stacking all contributing to the final ensemble.
Key Decisions
Frequency-Weighted Energy Disaggregation
The raw data records total energy at the base station level, but modeling requires cell-level predictions. Attributing energy to each cell using frequency-specific hardware proportions solves the label construction problem. Without this, you're predicting an undefined target — the most fundamental error a pipeline can make.
Domain-Derived Interaction Features
Explicit binary flags encoding hardware behavior rules (ES mode × load level × antenna count × frequency) give the model structured domain knowledge. These features make physics-driven relationships directly accessible rather than requiring the model to discover complex four-way interactions from raw data — a task that even deep ensembles struggle with in tabular settings.
Per-Variable Encoding Strategy
Matching each categorical variable to an encoding that respects its structure — Helmert for sequential days, polynomial for ordered hardware generations, WoE for binary flags — preserves information that one-hot encoding destroys. This is the difference between treating domain knowledge as noise and treating it as signal.
Two-Level Modeling with Three-Way Split
Training independently at base station and cell granularities captures patterns visible at different resolutions. The freeze set provides unbiased ensemble weight estimation — without it, stacking weights overfit to validation noise, producing ensembles that look good in CV but degrade on the leaderboard.
Key Takeaway
The deepest lesson from this project is that label construction and feature encoding are modeling decisions, not preprocessing steps. Getting the target right — disaggregating station energy to cell level using domain-appropriate proportions — was worth more than any hyperparameter tuning. And matching each variable's encoding to its semantic structure transforms domain knowledge from something external to the model into something the model can directly exploit.
Design insight: In hardware-driven domains, the biggest gains come before model training: constructing the correct target at the right granularity, encoding domain rules as explicit features, and matching each variable's representation to its semantic structure. When the label itself requires domain-aware construction, no amount of algorithmic sophistication can compensate for getting it wrong.
FAQ
What is the key takeaway from "5G Energy Consumption Modelling"?
In hardware-driven domains, the biggest gains come before model training: constructing the correct target at the right granularity, encoding domain rules as explicit features, and matching each variable's representation to its semantic structure. When the label itself requires domain-aware construction, no amount of algorithmic sophistication can compensate for getting it wrong.
Who wrote this and what is it about?
This was written by Mahmoud Trigui, Senior Data Scientist. Predicting 5G base station energy consumption using network configuration and usage features. Zindi competition.