Decision-Focused Learning via Neural Optimization Layers for Battery-Assisted Grid-Import Smoothing in AI Data Centers

Xinda Zheng, Canchen Jiang, Frits de Nijs, Edward Lam, Markus WagnerarXiv 2026 · arXiv

TL;DR

This paper introduces BS-DFL, a decision-focused learning framework that optimizes battery scheduling for AI data centers to smooth out volatile power demands. By replacing traditional optimization solvers with a "constraint-aware" neural optimization layer, the system achieves a 71.7% reduction in grid-import fluctuations and an 18% reduction in costs compared to standard forecasting methods, all while making decisions in milliseconds.

What Problem Does This Paper Address?

AI data centers are notorious for "spiky" power consumption. As large-scale models are trained and deployed, power demand can swing wildly, creating massive headaches for grid operators who prefer steady, predictable loads.

To manage this, data centers use Behind-the-Meter (BTM) Battery Energy Storage Systems (BESS) to "shave" peaks and fill troughs. However, scheduling these batteries is difficult because:

  1. Uncertainty: Future demand is hard to predict perfectly.
  2. Constraints: Batteries have physical limits (capacity, charge/discharge rates) and must avoid simultaneous charging/discharging.
  3. The "Predict-then-Optimize" Gap: Standard machine learning models are trained to minimize prediction error (like Mean Squared Error). But in the real world, a small prediction error at a critical moment (e.g., when the battery is nearly empty) is much more expensive than a large error when the battery has plenty of headroom.

Methods

The authors propose Battery Scheduling Decision-Focused Learning (BS-DFL). Instead of training a forecaster in isolation, they bake the downstream scheduling objective directly into the neural network's training process.

Key components include:

  • BS-NOL (Battery-Scheduling Neural Optimization Layer): A specialized neural architecture that acts as a "differentiable solver." It uses an attention-based encoder to process demand scenarios and two specialized decoders (Commitment and Response) to generate feasible battery actions.
  • Constraint-Awareness: The decoders are mathematically designed to ensure that the outputted decisions always respect battery energy limits and power constraints, eliminating the need for a slow, external optimization solver (like Gurobi) during deployment.
  • Risk-Aware Objective: The model doesn't just minimize average cost; it uses Conditional Value-at-Risk (CVaR) to penalize "tail risks"—those rare but catastrophic moments where the grid import spikes uncontrollably.
The BS-DFL framework architecture, showing how demand forecasting and the neural optimization layer work together to produce feasible decisions.

Datasets

The study uses AI facility power profiles derived from real-world generative AI workloads (10 MW scale, 2,840 nodes). The evaluation is conducted over a 10,000-minute simulation (roughly one week) using one-minute intervals to capture the high-frequency volatility typical of AI data centers.

Key Insights and Ideas

  • Utility over Accuracy: The most striking insight is that the BS-DFL model actually had a higher forecast error (MAE) than the standard MSE-trained model, yet it produced much better battery schedules. This proves that for complex control tasks, "better" predictions aren't always the ones that are closest to the ground truth—they are the ones that lead to better decisions.
  • Solver-Free Deployment: By "freezing" the neural optimization layer after training, the system can generate optimal battery responses through a simple forward pass of a neural network. This makes it fast enough for real-time grid smoothing where every millisecond counts.
  • Feasibility by Design: Rather than letting a network guess and then "fixing" the results, the authors used sequential decoding logic (Equations 12-15 in the paper) to ensure the network cannot propose an impossible battery state.

Key Results

The researchers compared BS-DFL against a traditional "MSE + Gurobi" approach (predicting with MSE and solving with a professional optimizer).

Metric BS-DFL Improvement
Mean Grid-Import Change 71.70% reduction
Total Scheduling Cost 18.01% reduction
95th Percentile Ramp Risk 99.9% reduction (from 23.4 kW to 0.01 kW)
Decision Latency ~18.77 ms (vs. seconds for solvers)

As shown in the trajectory plots below, BS-DFL (the orange line) maintains a much flatter grid-import profile, even during high-variation windows, closely mimicking the "Perfect-Information" theoretical limit.

Fig. 2. Grid-import power over the 10,000-minute evaluation trace. (a) Full trajectory with a broken vertical axis. (b)-(c) 12-hour windows with the lowest and highest mean absolute minute-to-minute demand changes, respectively, shown on different vertical scales.

Limitations and Future Work

While highly effective, the authors note a few areas for expansion:

  • Fixed Parameters: The current model was tested on a specific battery configuration. Future work will explore how well these neural layers generalize across different battery sizes and aging conditions.
  • Price Volatility: The current study focused primarily on ramp mitigation; incorporating highly volatile real-time electricity prices could add another layer of complexity to the decision-making process.
  • Scenario Diversity: The model currently relies on a limited set of historical demand profiles to build its "scenarios" during training. Expanding this to more diverse data-center types would improve robustness.

Summary updated

Abstract

Rapid AI data-center power fluctuations challenge grid integration. Sustained grid-import smoothing requires allocating limited battery power and energy under uncertain demand. We formulate risk-aware BESS scheduling that coordinates advance reserve commitments and demand-responsive dispatch, accounting for operating costs, grid-ramp penalties, and their conditional value-at-risk. We develop battery scheduling decision-focused learning (BS-DFL) with a constraint-aware neural optimization layer trained directly from this objective without optimal-solution labels. The trained layer is then frozen to guide demand-predictor learning through scheduling costs and ramping risk, enabling solver-free rolling-horizon scheduling. In a 10,000-minute simulation using loads derived from measured AI workloads, BS-DFL reduces mean absolute minute-to-minute grid-import changes by 71.70% and total scheduling cost by 18.01% relative to an MSE-trained predictor coupled with a mixed-integer linear programming solver, with an average decision time of 18.77 ms.
BibTeX
@misc{zheng2026decision,
  author = {Xinda Zheng and Canchen Jiang and Frits de Nijs and Edward Lam and Markus Wagner},
  title = {{Decision-Focused Learning via Neural Optimization Layers for Battery-Assisted Grid-Import Smoothing in AI Data Centers}},
  year = {2026},
  eprint = {2611.13694},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.13694},
}
Figure