1. Introduction
In recent years, online optimization problems have garnered widespread attention because of their ability to make real-time decisions with partial information. In the online optimization process, decisions are made sequentially according to feedback from the environment. The general form of this problem can be written as follows:
where
is the decision variable, and
T is the total number of decision rounds. The meaning of online optimization is clearly defined in several classic review articles [
1,
2,
3]. These articles define regret to measure the online optimization algorithm.
Considering online optimization with a constraint, many algorithms are proposed to solve constrained online optimization like in [
4,
5]. A constraint is added in the problem framework.
constraint violation is defined as follows:
In practice, each problem encountered during the online process is closer to being generated randomly. Therefore, studying online stochastic optimization problems is more suitable for meeting real-world demands, where objectives and constraints contain random parameters. Taira et al. [
6] studied an online stochastic optimization algorithm, in which at each round, the parameters are sampled independently from a fixed distribution. To more closely approximate the randomly generated nature of the problem, Cao et al. [
7] studied the following online stochastic optimization problem with time-varying distributions:
In their work, they employed the projected stochastic gradient method (PSGD), which is a deterministic offline version of online gradient descent (OGD) [
1], to solve the problem. However, PSGD uses a fixed step size and lacks an adaptive mechanism, which may lead to slower convergence in online settings. Research on this kind of issue is still very limited at present. Thus, we aim to design a new algorithm to efficiently solve online stochastic optimization problems with time-varying distributions.
For stochastic optimization problems, existing stochastic gradient-based algorithms such as SGD [
8], SVRG [
9], and SPDAM [
10] give us some insights into analyzing and handling stochastic problems. The Lagrangian method [
11] is widely used in constrained optimization problems. Several works use this method in online optimization, for example, [
12,
13]. Liu et al. proposed a model-based augmented Lagrangian method to solve online constrained optimization [
14]. This method performs well in specific structured problems. It simplifies the computation by approximating the objective and constraint functions at each round. Together with the corresponding primal–dual update formula, this method guarantees a sublinear upper bound. Especially for online optimization, Ref. [
15] shows that the augmented Lagrangian method converges superlinearly asymptotically.
The regret of online algorithms has a dynamic version, which is defined in [
1]. Dynamic regret measures the ability of the algorithm to track the optimal solution at each round. Ref. [
7] defines dynamic regret and constraint violation to measure its performance and adapts to stochasticity:
Recent studies on distributed online optimization with coupled constraints [
16] and online composite optimization with time-varying regularizers [
17] also provide valuable insights into handling dynamic and structured online optimization problems, further motivating our approach.
Inspired by these ideas, we solve the online stochastic optimization problem with time-varying distribution by using the model-based augmented Lagrangian method in [
14]. At the same time, we incorporate time-varying distribution approximations and a dynamic step size. Stochastic dynamic regret and constraint violation are used to evaluate the performance of our algorithm [
7].
Recent years have also witnessed increasing attention to the practical applications of online and stochastic optimization in real-world systems. For instance, in smart grid operations, online optimization algorithms have been employed for real-time power dispatch and demand response management under uncertain renewable generation and load fluctuations. In communication networks, stochastic optimization methods are widely used for dynamic bandwidth allocation, routing optimization, and edge computing task offloading under time-varying traffic conditions. In the domain of resource allocation, Mohammadreza et al. [
18] recently studied distributed constrained optimization problems with applications to resource scheduling, considering practical challenges such as heterogeneous time-varying delays, quantization-induced nonlinearity, and link failures. Their work guaranteed all-time resource demand feasibility, which aligns with one of the key properties of our method. However, their approach was developed for distributed multi-agent systems, whereas our work focuses on centralized online stochastic optimization with time-varying distributions. These recent applications further motivate our study, as many real-time decision-making problems—including adaptive filtering, online logistic regression, and dynamic network resource allocation—require fast, single-step computations and can benefit from the online stochastic optimization framework.
The following are the main contributions of our work:
We propose a model-based stochastic augmented Lagrangian method (MSALM) for online stochastic optimization. In each round, we construct model functions to approximate the stochastic objective and constraint functions, which are sampled from time-varying distributions. This construction reduces computational complexity. The step size is designed in a dynamic way and decreases as t increases to accelerate convergence.
We adopt dynamic regret and constraint violation as our performance metrics. These measures are particularly suited for online stochastic optimization with time-varying distributions. Under certain assumptions, we prove that the algorithm’s regret and constraint violation have sublinear bounds in terms of the total number of rounds T.
We demonstrate the practical efficacy of our proposed algorithm through a series of simulation experiments. In the contexts of adaptive filtering and online logistic regression, we compare our method with PSGD. The results show that the MSALM attains lower regret and constraint violation bounds than PSGD, indicating that the MSALM converges more rapidly toward the theoretical optimum while maintaining stricter adherence to constraints. In addition, the results from the time-varying smart grid energy dispatch, online network resource allocation, and path planning problems collectively confirm that regret and constraint violation have bounds .
3. Convergence Analysis
In this section, we analyze the performance of the MSALM in online stochastic optimization in terms of stochastic dynamic regret and constraint violation.
To prove stochastic dynamic regret, we adopt the definition of drift and the assumption on drift from [
7]:
Assumption 5. Before the start of the algorithm, there is a for any T satisfying Drift and Assumption 5 ensure that the problem with time-varying distributions retains the characteristic of sharing a common decision set, as in standard online optimization.
Assumption 6. The gradient of is bounded, i.e., there is a constant satisfying Lemma 1. Under Assumptions 1–6, we have Proof. let
,
let
. By Assumption 1, we have
and
; then we take the expectation of (
6)
multiplying by
and summing, we obtain
We examine the two terms on the right-hand side of the above inequality separately.
Then, (
7) can be written as follows:
□
Theorem 1. Suppose Assumptions 1–6 hold. The stochastic dynamic regret of the MSALM has a sublinear upper bound when the parameters are set as and . Proof. We construct an auxiliary optimization problem:
The optimal solution of the auxiliary problem satisfies the following:
comparing (
8) with the optimality condition of (
3),
is the optimal point of the auxiliary problem.
We have the following inequality:
We analyze the two sides of the inequality separately. According to (
5), the left-hand side becomes the following:
Combining the fact that
is convex and Assumption 4, we obtain
Inequality (
9) becomes the following:
Meanwhile, the right-hand side of inequality (3) is bounded as follows:
Since
is a feasible solution, we have
. Considering Assumption 4, we have the following:
From the above two parts, inequality (
9) becomes the following:
We rearrange and bound the above inequality as follows:
Summing from
to
T, we have the following:
Taking the expectation of inequality (
10) and substituting
, we obtain the following:
where for the term
, we have the following:
when the parameters are set as
and
, we substitute the result of Lemma 1:
□
Assumption 7. The gradient of is bounded, i.e., there is a constant satisfying Lemma 2. where is Slater’s point. Proof. According to inequality (
9), we consider a point
which satisfies Slater’s condition.
From the definition of the augmented Lagrangian function, we have
Using the non-expansiveness property of the projection operator, we have
therefore,
By Assumptions 3 and 4, we have
Inequality (
11) becomes the following:
We rearrange terms and take the expectation to obtain
The inequality becomes the following:
□
Lemma 3. There exist constants for any and positive integer s satisfyingwhere , , , . Proof. For any
, inequality (
12) can be the following:
Summing from
t to
, we obtain
Since the projection operator has non-expansiveness, we obtain the following:
for any
,
therefore,
Substituting the above results into inequality (
13), we obtain
Since
, we have
from the update rule,
We define the following:
where
are appropriate constants.
Specifically, from the rearranged inequality, we have
where
collects all the positive bounded terms.
From earlier, we have the following:
Now, from Lemma 2, we have the following:
where
.
When
is large, say
, then,
Based on this condition, we can obtain the inequality below by applying Lemma from [
14]
where
.
Taking the expectation and substituting it back, we obtain
Simplifying and grouping terms, we obtain the desired form:
where
□
Theorem 2. Suppose Assumptions 1–7 hold. The constraint violation of the MSALM has a sublinear upper bound when the parameters are set as and . Proof. According to the Lagrange multiplier update rule, considering Assumptions 4 and 7, we have the following:
Summing from
to
T, we obtain
Taking the expectation, we have
According to Lemma 3, for any
and positive integer
s,
Specifically, for
, choosing
, we have
Substituting the parameter choices
and
, we have
Since
is an upper bound of
, under reasonable assumptions,
does not tend to zero; therefore,
Computing the gradient, we obtain
The gradients are bounded:
Meanwhile, according to Lemma 3,
is bounded; therefore,
thus,
Taking the expectation, we obtain
Substituting
and the bound from Lemma 3, we have
Summing from
to
T, we obtain
Using the integral bound, we have
therefore,
Substituting the parameter choices
and
and choosing
, we have
Under reasonable assumptions (
does not grow too fast), we have
□
The following theorem shows the computational complexity of our algorithm.
Theorem 3. Under Assumption 4, the MSALM has a polynomial-order computational complexity .
Proof. Considering several existing models, we analyze their per-round computational complexity. Take the linearized model as an example. To compute
and
, the algorithm needs to carry out
and
rounds of computation respectively. Moreover, the subproblem update, multiplier update, and distribution update within a round can each be considered as a single computational step. Therefore, the per-round computational complexity is
Other models can be analyzed similarly, with only slight differences in constants. At the total rounds
T, computational complexity is
□
4. Numerical Experiments
In this section, our algorithm is demonstrated to be capable of solving many real problems. Firstly, we explored the influence of some initial parameter values on our algorithm on different mathematical models. The best parameter combinations for each model are provided. Then we compare our algorithm with the PSGD algorithm in the same simulation environment. Secondly, we created a simulation experiment to test our algorithm. The performance of our algorithm when solving different real problems is observed. Then the results of the experiments are presented. Finally, we combined our algorithm with supervised learning for path planning. The results show that regret and constraint violation also have convergent bounds. This proves that our algorithm has the ability to solve online path planning problems.
In addition, in this paper, model training was conducted on Python 3.12.6, and all the experiments were conducted on Matlab 2025b on a laptop with Windows 11 installed for fairness. The CPU of this laptop is AMD Ryzen AI 9 H 465 w/Radeon 880M (2.00 GHz) and 32 GB of RAM.
4.1. Comparative Experiment with Existing Algorithm
We compared our algorithm with the PSGD algorithm using adaptive filtering and online logistic regression problems.
Adaptive filtering is a core recursive estimation technique in modern signal processing, system identification, and control. In many applications, the impulse response exhibits sparsity in the time domain. Meanwhile, we consider that physically realizable systems are all stable, so their impulse response energy must be finite. There are two constraints, based on the actual context of the problem. The mathematical model of adaptive filtering is as follows:
at each round,
a and
b are drawn from two independent normal distributions, whose means and standard deviations both vary smoothly over time in a sinusoidal or cosinusoidal manner.
Online logistic regression is a classic binary classification method in machine learning. It has significant application value in dynamic data stream environments. This problem is mathematically formulated as a constrained regularized empirical risk minimization problem. The objective function controls the model’s complexity and prevents overfitting. The mathematical model of online logistic regression is as follows:
at each round,
is drawn from a normal distribution with fixed covariance,
is drawn from a Bernoulli distribution, and the true parameter vector
varies smoothly over time in a sinusoidal manner.
We explored the influence of initial parameter values on our algorithm. Different
values in our algorithm were compared. There are two criteria for measuring the quality of an online algorithm, so a multi-objective planning approach was adopted to make a mixed measurement. We used the AHP (Analytical Hierarchy Process) to determine the weights of the two quantities. The two measurements correspond to scale value 3 in the 1–9 scale method. So the weight of regret is 0.25, and the weight of constraint violation is 0.75. Our mixed measurement
is defined as follows:
In
Figure 1, in adaptive filtering, we found that the algorithm performs the best when
. And in online logistic regression, the algorithm performs the best when
.
Then we compared our algorithm with the PSGD algorithm. The comparison results are as follows (
Figure 2):
We compared the performance of the two algorithms in adaptive filtering and online logistic regression. The figures show that the MSALM attains lower regret and constraint violation bounds than PSGD. This result indicates that our algorithm has the ability to converge more rapidly toward the theoretical optimum while adhering better to the constraints. According to the experimental results, a conclusion can be obtained. When choosing a suitable , the MSALM is superior to the existing algorithm.
4.2. Experiments Under Existing Models
In order to test the practicality of our algorithm, we applied our algorithm in an energy dispatch problem and network resource allocation.
The time-varying smart grid energy dispatch problem is one of the core tasks of modern smart grids. This problem involves economically and reliably coordinating multiple heterogeneous energy sources while meeting the changing electricity demand. The objective functions of this problem include power balance constraints and resource capacity constraints. The mathematical model of time-varying smart grid energy dispatch is as follows:
at each round,
c and
Q are drawn from independent normal distributions with fixed standard deviations. Their means evolve over time according to a random walk with a decaying step size.
Online network resource allocation is a key challenge in modern computing systems. The key task is to efficiently allocate limited resources to continuously arriving real-time tasks or user requests. We apply our algorithm to a simple network resource allocation problem with link failure to verify its practicality. The network resource allocation problem has the properties of being fully connected, undirected, and static. The objective function consists of two parts: the quality of service cost and resource usage cost. The mathematical model of online network resource allocation is as follows:
at each round, the demand vector is drawn from a multivariate normal distribution with fixed standard deviation and truncated to be nonnegative. Its mean vector varies smoothly over time, following a sinusoidal pattern with a slow linear trend. Additionally, each link may fail randomly, forcing its allocated resource to zero; otherwise, its capacity is drawn from a normal distribution with a slowly drifting mean.
We conducted simulation experiments on two mathematical models, and the results are as follows (
Figure 3).
We took and for testing. The simulation experiments show that regret and constraint violation have a sublinear convergent bound of T, demonstrating that our algorithmic solution can gradually approach the theoretically optimal solution while adhering to the constraints. The results show that our algorithm can be applied to the time-varying smart grid energy dispatch problem and the online network resource allocation problem.
4.3. Experiment Combining Our Algorithm with Supervised Learning
We combined the MSALM with supervised learning to solve the path planning problem. To obtain an explicit function that is used in our algorithm, we applied parameter regression methods in supervised learning. First of all, data on 10 flight trajectories for the same flight at the same time slot on different dates were randomly selected. Afterwards, we utilized these data to train a mathematical model for flight trajectories through parameter regression methods. B-spline interpolation was used to obtain the explicit function of the flight trajectory. In order to find the appropriate number of B-spline interpolation control points, we compared the errors between the fitted trajectory and 10 known trajectories under different numbers of control points. We compare the 3D RMSE, mean error, and max error for different numbers of control points. The 3D RMSE reflects the penalty level for large errors and is used to identify and control the severity of extreme deviations. The mean error reflects the typical deviation under normal circumstances and is used to evaluate the fitting accuracy of most trajectory points in daily flights. The max error reflects the deviation limit under the worst-case scenario and is used to evaluate safety margins and risk assessment. The results are as follows (
Table 1 and
Table 2):
According to the above table, accuracy reaches its highest value when the trajectory has 10 control points. So we obtained the fitting function in this case. The coordinates of the feature points are as follows:
We set some random situations as constraints to simulate the real flight conditions. The constraints include 9 dynamic obstacle avoidance constraints and 4 airspace boundary constraints. The mathematical model of dynamic obstacle avoidance constraints has the following form:
where
represents the obstacle center coordinates,
is the safe distance, and
is the control point with an obstacle avoidance constraint. We set 3 obstacles and the 1st, 5th, and 10th control points with obstacle avoidance constraints, so
and
.
The mathematical model of airspace boundary constraints has the following form:
Then we use our algorithm to solve this online optimization problem. The result of the experiment is as follows (
Figure 4):
In this figure, the results of the simulation experiment show that the regret and constraint violation of our algorithm have a sublinear convergent bound of T, demonstrating progressive convergence to the theoretical optimum under compliance with the constraint. This indicates that the aircraft can make decisions that gradually approach the optimal choice during the flight and stay as safe as possible in the face of emergencies. This proves that our algorithm can be combined with machine learning methods to be applied to similar path planning problems.