Single Trajectory Nonparametric Learning of Nonlinear Dynamics
Ingvar Ziemann, Henrik Sandberg, Nikolai Matni
Introduction
Estimation of models (1) and (2) remains relatively poorly understood when the data is not i.i.d., with existing results being limited to when the function is known to belong to certain parametric classes. In terms of parameter recovery, the LSE converges at a rate of for stable linear autoregressive systems (Simchowitz et al., 2018; Sarkar and Rakhlin, 2019; Jedra and Proutiere, 2020). The same rate can also be achieved for linear systems with more general input-output behavior (Oymak and Ozay, 2019; Tsiamis and Pappas, 2019). Moving to nonlinear models, recursive and gradient type algorithms can be shown to converge at a rate of for the generalized linear model , where is a known Lipschitz link function (Foster et al., 2020; Sattar and Oymak, 2020; Jain et al., 2021). In this paper, we significantly generalize these results and provide rate-optimal error bounds for nonparametric function classes in terms of their metric entropies. Our approach leverages recently developed information-theoretic tools (Russo and Zou, 2019; Xu and Raginsky, 2017) and the notion of offset complexity (Rakhlin and Sridharan, 2014; Liang et al., 2015).
Given this, the learning task is to produce an estimate of the model , which is evaluated in terms of the expected Euclidean -norm error:
The expectation (3) is computed with respect to the randomness in the algorithm and the random variable which is independent of all other randomness; here is the uniform mixture over . That is, has the same distribution as random variable , where the index is drawn uniformly at random over and is independent of . If the process (1) is stationary with invariant measure , this reduces to the assumption that is drawn from the invariant measure of the process.
In the sequel, we analyze the nonparametric least squares estimator (LSE) of , given below. Namely, we assume that the learner can compute
1 Contributions
2 Further Related Work
Estimation of models of the form (1) and (2) has a rich history in statistics and system identification (Ljung, 1999). Preceding the recent body of work mentioned in the introduction, asymptotically optimal rates for linear stochastic models have been available for some time (Mann and Wald, 1943; Lai and Wei, 1982). Similarly, there is a well-established theory of rate-optimal identification for nonlinear parametric models under various identifiability-type conditions, both in the i.i.d. setting (Van der Vaart, 2000) and under more general assumptions (Le Cam, 2012).
Perhaps the main motivator for the recent line of work emphasizing nonasymptotic estimation bounds is that these bounds are applicable downstream in control and reinforcement learning pipelines. Regression estimates for linear stochastic systems have been key to understanding both online and offline reinforcement learning in the linear quadratic regulator (Dean et al., 2020; Mania et al., 2019) and can be shown to lead to optimal regret rates (Simchowitz and Foster, 2020; Ziemann and Sandberg, 2022). Extending our understanding of the interaction between learning and control beyond linear-in-the-parameters models (Kakade et al., 2020; Boffi et al., 2021; Lale et al., 2021) inevitably requires new analyses of learning in dynamical systems. This also motivates the present work in that we provide nonasymptotic and counterfactual control of the LSE’s estimation error for more general nonlinear and nonparametric models.
Another related field is that of general statistical learning for dependent data, see Agarwal and Duchi (2012), Kuznetsov and Mohri (2017) and the references therein. These works provide generalization bounds for general loss functions and -mixing processes . The assumption of -mixing processes has also previously been exploited in parametric identification by Vidyasagar and Karandikar (2006). By contrast, our emphasis on regression over general learning is motivated by downstream applications in learning-enabled control, where one first learns a model used to design a controller. Necessarily then, this work builds on a rich line of work in nonparametric regression for the i.i.d. setting, see chapters 13 and 14 of Wainwright (2019) and the references therein. Although there has been some work on the dependent setting, the error in this line of work is typically computed with respect to the design points which is not suitable for the counterfactual reasoning that is key to control (Baraud et al., 2001).
We also draw inspiration from the recent line of work on information-theoretic generalization bounds (Xu and Raginsky, 2017; Russo and Zou, 2019; Bu et al., 2020). There are interesting refinements and variations of this theory using for instance conditional mutual information (Steinke and Zakynthinou, 2020), or Wasserstein distance (Gálvez et al., 2021). However, these more recent bounds rely more explicitly on the tenzorization properties of information measures under i.i.d. data than the earlier work of Russo and Zou (2019) and Xu and Raginsky (2017), and so are not directly amenable to the single trajectory setting. We also note that information-theoretic generalization bounds have previously found other applications, such as in the analysis of stochastic gradient descent (Neu et al., 2021).
3 Preliminaries and Notation
Results
Our main result is an error bound that controls the distance between the estimate , defined by the nonparametric LSE (4), and the ground truth in terms of a fresh sample drawn independently of the algorithm from the mixture distribution over the samples .
To establish inequality (7), we rely on an information-theoretic decoupling argument given in Proposition 3. Informally, Proposition 3 allows us to decompose the error as
The training error term above is controlled by the offset basic inequality (Lemma 1). Discretizing and proceeding through chaining yields a maximal inequality with and as trade-off parameters. The generalization error term above is defined in terms of the discretization parameter , which controls the discrepancy between the quantized model (defined in (6)) and the LSE . The quantized model , used solely in the proof, “generalizes well” since it belongs to a finite hypothesis class by construction.
A similar statement holds for and can be found following the proof of Theorem 2 in Appendix A.1. We also have a version of the above theorem, proven in Appendix A.2, applicable to the parametric entropy growth regime.
This bound shows that more stable systems, as captured by the Lipschitz constant , have smaller generalization error. This interpretation is in line with the recent trend of using stability bounds to study learning algorithms applied to data generated by a dynamical system, see for example Boffi et al. (2021) and Tu et al. (2021). Finally we note that although we restricted our analysis to contracting systems, our results are easily extended to a more general notion of nonlinear stability. In particular, we extend Proposition 1 in Appendix B.2 to systems satisfying a notion of exponential incremental input-to-state stability, a standard notion from robust nonlinear control theory (Angeli, 2002).
Mixing systems
2 Summary
Our results show that a large class of nonlinear systems can be learned at the minimax optimal nonparametric rate using the LSE (4). This significantly extends our current understanding of nonasymptotic learning of dynamical systems from single trajectory data. By contrast, previous work assumes i.i.d. data or focuses on either linear models (Simchowitz et al., 2018; Tsiamis and Pappas, 2019; Jedra and Proutiere, 2020) or parametric models with known nonlinearities (Foster et al., 2020; Sattar and Oymak, 2020; Mania et al., 2020; Jain et al., 2021).
Proof Strategy for Theorem 1
Our analysis of the least squares estimator (4) begins with the following information-theoretic decoupling estimate inspired by Russo and Zou (2019) and Xu and Raginsky (2017).
where and where has uniform mixture distribution over the covariates of system (1) and is independent of all other randomness.
The proof of the estimate (11) relies on the Donsker-Varadhan variational representation of relative entropy and is given in Appendix C.
We now describe our analysis of the in-sample prediction (or training) error, namely the first term appearing on the right hand side of inequality (12). We start with an inequality due to Liang et al. (2015), which is a variant of the basic inequality of least squares and that is crucial to analyzing the in-sample prediction error for correlated data.
This leads to the maximal inequality (15) of Lemma 3 below.
As observed by Liang et al. (2015), if we had not included the offset term , a naive bound would have yielded , penalizing us by a factor for the scale of .
Applications of Theorem 1
Suppose that we are in the autoregressive setting (2). If
The factor is optimal, and appears even in the i.i.d. case, see for example (Wainwright, 2019, Ch. 13).
The next example revisits the generalized linear models using Theorem 3. This model has recently been analyzed using recursive methods (Foster et al., 2020; Sattar and Oymak, 2020; Jain et al., 2021).
for some and where the Frobenius norm of is given by . This setting is a special case of the autoregressive system (2) with .
A proof of this claim can be found in Appendix D.3. The dependency on and matches Theorem 2 of Foster et al. (2020), which is optimal in and .
Discussion
We have leveraged recently developed information-theoretic tools (Russo and Zou, 2019; Xu and Raginsky, 2017) to analyze the nonparametric LSE (4) for learning dynamical systems. Our analysis yields, to the best of our knowledge, the first rate-optimal bounds for nonparametric estimation of stable or otherwise mixing nonlinear systems from a single trajectory. In addition, our results are able to capture, as a special case, existing parametric rates in the literature (Foster et al., 2020; Sattar and Oymak, 2020).
Finally, an open problem is to determine for which learning problems the system (1) is required to mix in the single trajectory setting. Most previous works on learning in nonlinear dynamical systems rely on similar mixing time or stability arguments. The cost of this is typically a multiplicative factor in the final bound that degrades as stability is lost (Foster et al., 2020; Sattar and Oymak, 2020; Boffi et al., 2021). In contrast, it is well-known that this dependency can be avoided for learning in linear systems (Lai and Wei, 1982; Simchowitz et al., 2018). Recently Jain et al. (2021) showed under a strong invertibility condition that dependency on the mixing time can also be avoided for the generalized linear model (16). This leaves open the question whether learning without mixing is possible in situations beyond the generalized linear model.
Ingvar Ziemann and Henrik Sandberg are supported by the Swedish Research Council (grant 2016-00861). Nikolai Matni is supported in part by NSF awards CPS-2038873 and CAREER award ECCS-2045834, and a Google Research Scholar award.
Appendix A Proof of Theorem 1 and its Corollaries
We now turn to the proof of Theorem 1. First, we begin by applying Proposition 3 to the discretized estimator . Let us begin by bounding the generalization error of the quantized estimator as defined by (6). We may write
It remains to bound the in-sample-prediction error. We have
The main technincal chaining step is given in Lemma 4. Namely, by appealing to Lemma 4 and combining with (17) and (18) we find
since by the triangle inequality. The result follows after pulling the factor out of the square root sign using the triangle inequality.
For large spaces and fine grained coverings, the metric entropy starts to dominate the scale free process appearing in Lemma 3. The analysis of in Lemma 4 below essentially follows that in Liang et al. (2015) (compare with their Lemma 6) with certain slight simplifications due to the added structure the uniform topology on affords us. We begin with an analogue of Lemma 3 which takes the scale of the functions considered into account.
As noted in Liang et al. (2015), the optimal value for in Lemma 4 is of the same nature as when obtained by other methods, see for example Chapter 13 of Wainwright (2019) for a more standard approach.
Observe first that for any fixed we have, simply by discarding the negative second order term, Cauchy-Schwarz, and a standard subgaussian concentration inequality for :
A standard one-step discretization bound (c.f. the proof of Proposition 5.17 in Wainwright (2019)) combined with the finite class maximal inequality of Lemma 3 yields for fixed :
Having extracted the fast rate term for scales larger than , we proceed with a chaining bound on the second term above. Since satisfies the maximal inequality (23) with , chaining (as in Theorem 5.22 of Wainwright (2019)) yields
Under the hypothesis (8) we may use Theorem 1 with to write
The claim follows by solving for the optimal balance
A.2 Proof of Theorem 3
By virtue of Theorem 1 and by selecting we have
Let now and . Then (22) by using the hypothesis (9) becomes
A.3 Proof of Auxilliary Results
By optimality of to the prediction error objective we have that
Rearranging and expanding the square gives the basic inequality
which after multiplying both sides by can be rearranged again to give
Proof of Lemma 3
The proof is a straight-forward modification of the standard proof for bounding the expected supremum of subgaussian maxima. By Jensen’s inequality and monotonicity of the exponential it follows that
Choosing , application of Lemma 2 yields which is equivalent to the result.
Proof of Lemma 2
Fix . By Jensen’s inequality and monotonicity of the exponential it follows that
Using and the tower property let us now estimate
Hence after applying logarithms to both sides of equation (24), we find
which yields the result after optimizing over . ∎
A.4 Finite Classes
Appendix B Proofs Related to Stability and Learning
with the convention . Note now that so to arrive at the desired conclusion we need to prove that the are uniformly bounded.
To this end, for a fixed , we define two couplings of via
which vary only in their initial condition but are constructed with the same sequence . We now compute
where the first inequality uses the Markov property to realize the conditional expectations as functions of and respectively. The other inequalities follow by application of the triangle inequality and the -Lipschitzness of .
Let us now bound the -distance between and :
Combining equations (26) and (27), and noting that a symmetric argument applies to it follows that
Expressing as a telescoping sum over , we can compute its moment generating function in combination with the tower property:
using Hoeffding’s inequality to bound the conditional moment generating functions of the bounded random variables using the inequality (28) (see Hoeffding (1963) or Example 2.4. in Wainwright (2019)).
B.2 Extension to Exponential Incremental Input-to-State Stability
with it holds for all that
by repeated application of the triangle inequality and since is -Lipschitz.
Let us now bound the -distance between and under the hypothesis that . Then we have using the E--ISS bound in equation (29) that
We may proceed with the analysis by defining the martingale difference sequence
which has bounded absolute value by independence of the sequence and (33). Observe that this allows us to express as a telescoping sum, which we can readily use to compute the moment generating function in combination with the tower property:
using Hoeffding’s inequality to bound the conditional moment generating functions of the bounded random variables using (33) (see Hoeffding (1963) or Example 2.4. in Wainwright (2019)). ∎
B.3 Proof of Proposition 2
Appendix C Proof of the Decoupling Estimate, Proposition 3
In what follows, we compare probability integrals under different distributions. More precisely, we wish to relate the joint distribution of the least squares estimator (4) and the samples from the system (1) with the product measure of their marginals. The following variational formulation of , due to Donsker and Varadhan (1975), is key:
Moreover, if , then equality in (34) is attained at .
Equipped with Lemma 6, and inspired by the work of Russo and Zou (2019) and Xu and Raginsky (2017), we now turn to the proof of Proposition 3. We remark that the first paragraph of the proof is identical to the proof of Lemma 1 in Xu and Raginsky (2017). As it is central to our argument, we reproduce it below.
We begin by observing that by rescaling in (34) by , we obtain
For any which is -subgaussian under , we have that
Combining inequalities (35) and (36), we see that
which after choice of and rearranging becomes
We now specialize this known result to our setting. Let us now choose
Observe that for as above, . Let further be equal in distribution to but independent from and . In other words is drawn from and is drawn from . Let also be uniformly distributed over and independent of all other randomness so that we may take . Hence, for these choices, inequality (37) combined with Jensen’s inequality yield
by linearity of expectation and reformulating the mixture component. Inequality (i) follows from inequality (37) and inequality (ii) from Jensen’s inequality.
C.1 Extension: Generalization Bounds for Dynamical Systems
The problem of statistical learning is to find a hypothesis that minimizes
with and where denotes integration over the randomness in . Let be a randomized learning algorithm (a random, data-dependent element of ). We define its generalization error by
where is equal to in distribution but independent of . By combining Lemma 1 of Xu and Raginsky (2017) with Proposition 4 we arrive at the following inequality.
Suppose that is -lipschitz in its first two arguments:
that is E-ISS and that is E-ISS. Then
where and .
In principle a direct proof using the methods from Appendix B is possible. For brevity, we instead show how the result can be reduced to the statement of Proposition 4.
Let and define the extended dynamics . Then
or in brief. Since and are both E-ISS as system from to and respectively, it follows that is E-ISS from to with . Hence, we may apply Proposition 4 to conclude that
is -subgaussian for each fixed where . The result follows by applying Lemma 1 of Xu and Raginsky (2017). ∎
Appendix D Supporting Material for the Examples in Section 4
We may assume that the eigenvalues are ordered as . Fix an integer and define
D.2 An Experiment Supporting Example 2
We then use to generate training trajectories of varying length to be used in the LSE (4), as well as use to generate i.i.d. draws from the stationary distributionApproximated by running the system for a burn in time of time-steps before sampling from it.. To implement the LSE (4) we pass by the dual problem, kernel ridge regression, to estimate . We then approximate the -norm distance by drawing fresh trajectories of length and averaging over the final sample. We average our results over independent systems (random draws of ) and plot our experiment in Figure 1. It is interesting to note that the slope of the logarithmic plot is slightly less steep than . This is consistent with the near parametric rate of convergence suggested by Example 2 and the exponential eigenvalue decay of the kernel , see Wainwright (2019), page 399.