Title: Neural Oscillators are Universal
Venue: NeurIPS 2023
Accepted: yes
Keywords: neural ODE

universal approximation

oscillator
Abstract: Coupled oscillators are being increasingly used as the basis of machine learning (ML) architectures, for instance in sequence modeling, graph representation learning and in physical neural networks that are used in analog ML devices. We introduce an abstract class of *neural oscillators* that encompasses these architectures and prove that neural oscillators are universal, i.e, they can approximate any continuous and casual operator mapping between time-varying functions, to desired accuracy. This universality result provides theoretical justification for the use of oscillator based ML systems. The proof builds on a fundamental result of independent interest, which shows that a combination of forced harmonic oscillators with a nonlinear read-out suffices to approximate the underlying operators.

Neural Oscillators are Universal

Abstract

Coupled oscillators are being increasingly used as the basis of machine learning (ML) architectures, for instance in sequence modeling, graph representation learning and in physical neural networks that are used in analog ML devices. We introduce an abstract class of neural oscillators that encompasses these architectures and prove that neural oscillators are universal, i.e, they can approximate any continuous and casual operator mapping between time-varying functions, to desired accuracy. This universality result provides theoretical justification for the use of oscillator based ML systems. The proof builds on a fundamental result of independent interest, which shows that a combination of forced harmonic oscillators with a nonlinear read-out suffices to approximate the underlying operators.

1 Introduction

Oscillators are ubiquitous in the sciences and engineering [12, 30]. Prototypical examples include pendulums in mechanics, feedback and relaxation oscillators in electronics, business cycles in economics and heart beat and circadian rhythms in biology. Particularly relevant to our context is the fact that the neurons in our brain can be thought of as oscillators on account of the periodic spiking and firing of the action potential [29, 11]. Consequently, functional brain circuits such as cortical columns are being increasingly analyzed in terms of networks of coupled oscillators [29].

Given this wide prevalence of (networks of) oscillators in nature and man-made devices, it is not surprising that oscillators have inspired various machine learning architectures in recent years. Prominent examples include the CoRNN [27] and UnICORNN [28] recurrent neural networks for sequence modeling. CoRNN is based on a network of coupled, forced and damped oscillators, whereas UnICORNN is a multi-layer sequence model that stacks networks of independent undamped oscillators as hidden layers within an RNN. Both these architectures were rigorously shown to mitigate the exploding and vanishing gradient problem [20] that plagues RNNs. Hence, both CoRNN and UnICORNN performed very well on sequence learning tasks with long-term dependencies . Another example of the use of oscillators in machine learning is provided by GraphCON [26], a framework for designing graph neural networks (GNNs) [3], that is based on coupled oscillators. GraphCON was also shown to ameliorate the oversmoothing problem [25] and allow for the deployment of multi-layer deep GNNs. Other examples include Second Order Neural ODEs (SONODEs) [19], which can be interpreted as oscillatory neural ODEs, locally coupled oscillatory recurrent networks (LocoRNN) [17], and Oscillatory Fourier Neural Network (O-FNN) [13].

Another avenue where ML models based on oscillators arise is that of physical neural networks (PNNs) [35] i.e., physical devices that perform machine learning on analog (beyond digital) systems. Such analog systems have been proposed as alternatives or accelerators to the current paradigm of machine learning on conventional electronics, allowing us to significantly reduce the prohibitive energy costs of training state-of-the-art ML models. In [35], the authors propose a variety of physical neural networks which include a mechanical network of multi-mode oscillations on a plate and electronic circuits of oscillators as well as a network of nonlinear oscillators. Coupled with a novel physics aware training (PAT) algorithm, the authors of [35] demonstrated that their

nonlinear oscillatory PNN achieved very good performance on challenging benchmarks such as Fashion-MNIST [36]. Moreover, other oscillatory systems such as coupled lasers and spintronic nano-oscillators have also been proposed as possible PNNs, see [33] as an example of the use of thermally coupled vanadium dioxide oscillators for image recognition and [24, 32] for the use of spin-torque nano-oscillators for speech recognition and for neuromorphic computing, respectively.

What is the rationale behind the successful use of (networks of) oscillators in many different contexts in machine learning? The authors of [27] attribute it to the inherent stability of oscillatory dynamics, as the state (and its gradients) of an oscillatory system remain within reasonable bounds throughout the time-evolution of the system. However, this is at best a partial explanation, as it does not demonstrate why oscillatory dynamics can learn (approximate) mappings between inputs and outputs rather than bias the learned states towards oscillatory functions. As an example, consider the problem of classification of MNIST [18] (or Fashion-MNIST) images. It is completely unclear if the inputs (vectors of pixel values), outputs (class probabilities) and the underlying mapping possess any (periodic) oscillatory structure. Consequently, how can oscillatory RNNs (such an CoRNN and UnICORNN) or a network of oscillatory PNNs learn the underlying mapping?

Our main aim in this paper is to provide an answer to this very question on the ability of neural networks, based on oscillators, to express (to approximate) arbitrary mappings. To this end,

We introduce an abstract framework of neural oscillators that encompasses both sequence models such as CoRNN and UnICORNN, as well as variants of physical neural networks as the ones proposed in [35]. These neural oscillators are defined in terms of second-order versions of neural ODEs [4], and combine nonlinear dynamics with a linear read-out .

We prove a Universality theorem for neural oscillators by showing that they can approximate, to any given tolerance, continuous operators between appropriate function spaces.

Our proof of universality is based on a novel theoretical result of independent interest, termed the fundamental Lemma , which implies that a suitable combination of linear oscillator dynamics with nonlinear read-out suffices for universality.

Such universality results, [1, 5, 14, 21] and references therein, have underpinned the widespread use of traditional neural networks (such as multi-layer perceptrons and convolutional neural networks). Hence, our universality result establishes a firm mathematical foundation for the deployment of neural networks, based on oscillators, in myriad applications. Moreover, our constructive proof provides insight into how networks of oscillators can approximate a large class of mappings.

2 Neural Oscillators

General Form of Neural Oscillators. Given u : [0 , T ] → R p as an input signal, for any final time T ∈ R + , we consider the following system of neural ODEs for the evolution of dynamic hidden variables y ∈ R m , coupled to a linear read-out to yield the output z ∈ R q ,

Equation (2.1) defines an input-/output-mapping u ( t ) ↦→ z ( t ) , with time-dependent output z : [0 , T ] → R q . Specification of this system requires a choice of the hidden variable dimension m and the activation function σ . The resulting mapping u ↦→ z depends on tunable weight matrices W ∈ R m × m , V ∈ R m × p , A ∈ R q × m and bias vectors b ∈ R m , c ∈ R q . For simplicity of the exposition, we consider only activation functions σ ∈ C ∞ ( R ) , with σ (0) = 0 and σ ′ (0) = 1 , such as tanh or sin , although more general activation functions can be readily considered. This general second-order neural ODE system (2.1) will be referred to as a neural oscillator .

Multi-layer neural oscillators. As a special case of neural oscillators, we consider the following much sparser class of second-order neural ODEs,

In contrast to the general neural oscillator (2.1), the above multi-layer neural oscillator (2.2) defines a hierarchical structure; The solution y ℓ ∈ R m ℓ at level ℓ solves a second-order ODE with driving force y ℓ -1 , and the lowest level, y 0 = u , is the input signal. Here, the layer dimensions m 1 , . . . , m L can vary across layers, the weights w ℓ ∈ R m ℓ are given by vectors, with ⊙ componentwise multiplication, V ℓ ∈ R m ℓ × m ℓ -1 is a weight matrix, and b ℓ ∈ R m ℓ the bias. Given the result of the final layer, y L , the output signal is finally obtained by an affine output layer z ( t ) = Ay L ( t ) + c . In the multilayer neural oscillator, the matrices V ℓ , A and vectors w ℓ , b ℓ and c represent the trainable hidden parameters. The system (2.2) is a special case of (2.1), since it can be written in the form (2.1), with y := [ y L , y L -1 , . . . , y 1 ] T , b := [ b L , . . . , b 1 ] T , and a (upper-diagonal) block-matrix structure for W :

Given the block-diagonal structure of the underlying weight matrices, it is clear that the multi-layer neural oscillator (2.2) is a much sparser representation of the general neural operator (2.1). Moreover, one can observe from the structure of the neural ODE (2.2) that within each layer, the individual neurons are causally independent of each other.

̸

Assuming that w ℓ i = 0 , for all 1 ≤ i ≤ m ℓ and all 1 ≤ ℓ ≤ L , we further highlight that the multi-layer neural oscillator (2.2) is a Hamiltonian system,

with the layer-wise time-dependent Hamiltonian ,

with ̂ σ being the antiderivative of σ , and ∥ x ∥ 2 = ⟨ x , x ⟩ denoting the Euclidean norm of the vector x ∈ R m and ⟨· , ·⟩ the corresponding inner product. Hence, any symplectic discretization of the multi-layer neural oscillator (2.2) will result in a fully reversible model, which can first be leveraged in the context of normalizing flows [23], and second leads to a memory-efficient training, as the intermediate states (i.e., y ℓ ( t 0 ) , ˙ y ℓ ( t 0 ) , y ℓ ( t 1 ) , ˙ y ℓ ( t 1 ) , . . . , y ℓ ( t N ) , ˙ y ℓ ( t N ) , for some time discretization t 0 , t 1 , . . . , t N of length N ) do not need to be stored and can be reconstructed during the backward pass. This potentially leads to a drastic memory saving of O ( N ) during training.

2.1 Examples of Neural Oscillators

(Forced) harmonic oscillator. Let p = m = q = 1 and we set W = -ω 2 , for some ω ∈ R , V = 1 , b = 0 and the activation function to be identity σ ( x ) = x . In this case, the neural ODE (2.1) reduces to the ODE modeling the dynamics of a forced simple harmonic oscillator [12] of the form,

Here, y is the displacement of the oscillator, ω the frequency of oscillation and u is a forcing term that forces the motion of the oscillator. Note that (2.6) is also a particular example of the multi-layer oscillator (2.2) with L = 1 .

This simple example provides justification for our terminology of neural oscillators, as in general, the hidden state y can be thought of as the vector of displacements of m -coupled oscillators, which are coupled together through the weight matrix W and are forced through a forcing term u , whose effect is modulated via V and a bias term b . The nonlinear activation function mediates possible nonlinear feedback to the system on account of large displacements.

CoRNN. The Coupled oscillatory RNN (CoRNN) architecture [27] is given by the neural ODE:

We can recover the neural oscillator (2.1) as a special case of CoRNN by setting W = 0 , γ = ϵ = 0 ; thus, a universality theorem for neural oscillators immediately implies a corresponding universality result for the CoRNN architecture.

UnICORNN. The Undamped Independent Controlled Oscillatory RNN (UnICORNN) architecture of [28, eqn. 1] recovers the multi-layer neural oscillator (2.2) in the case where the fundamental frequencies of UnICORNN are automatically determined inside the weight matrix W in (2.1).

Nonlinear oscillatory PNN of [35]. In [35, SM, Sect. 4.A], the authors propose an analog machine learning device that simulates a network of nonlinear oscillators, for instance realized through coupled pendula. The resulting mathematical model is the so-called simplified Frenkel-Kontorova model [2] given by the ODE system,

where θ = ( θ 1 , . . . , θ N ) is the vector of angles across all coupled pendula, M = diag( µ 1 , . . . , µ N ) is a diagonal mass matrix, f an external forcing, K = diag( k 1 , . . . , k N ) the 'spring constant' for pendula, given by k i = µ i g/ℓ with ℓ the pendulum length and g the gravitational acceleration, and where C = C T is a symmetric matrix, with

̸

̸

which quantifies the coupling between different pendula. We note that this simplified FrenkelKontorova system can also model other coupled nonlinear oscillators, such as coupled lasers or spintronic oscillators [35].

We can bring the above system into a more familiar form by introducing the variable y according to the relationship Py = θ for a matrix P . Substitution of this ansatz then yields MP ¨ y = -( K + C ) sin( Py ) + f ; choosing P = M -1 ( K + C ) , we find

which can be written in the form ¨ y = σ ( Wy ) + f for σ = -sin( · ) and W = M -1 ( K + C ) . We next make a particular choice of C , by choosing it in a block-matrix form

and with corresponding mass matrix M in block-matrix form M = diag( µ L I, µ L -1 I, . . . , µ 1 I ) , then with ρ ℓ := γ ℓ /µ ℓ , we have

With the intent of ordering the masses of different layers, such that µ ℓ /µ ℓ -1 ∼ ϵ is small, we now introduce an ordering parameter ϵ > 0 . And we consider the following ordering γ ℓ , C ℓ , µ ℓ ∼ ϵ ℓ .

Assuming this ordering, it follows that ρ ℓ , C ℓ µ ℓ = O (1) , and C ℓ µ ℓ -1 = O ( ϵ ) . This ordering of the masses introduces an effective one-way coupling, making

upper triangular, up to small terms of order ϵ . We note that the diagonal entries ρ ℓ in M -1 C are determined by the off-diagonal terms through the identity (2.7). The additional degrees of freedom in the (diagonal) K -matrix in (2.8) can be used to tune the diagonal weights of the resulting weight matrix W = M -1 ( K + C ) .

Thus, physical systems such as the Frankel-Kontorova system of nonlinear oscillators can be approximated (to leading order) by multi-layer systems of the form

with f ℓ an external forcing, representing a tunable linear transformation of the external input to the system. The only formal difference between (2.9) and (2.2) is (i) the absence of a bias term in (2.9) and (ii) the fact that the external forcing appears outside of the nonlinear activation function σ in (2.9). A bias term could readily be introduced by measuring the angles represented by y ℓ in a suitably shifted reference frame; physically, this corresponds to tuning the initial position y ℓ (0) of the pendula, with y ℓ (0) also serving as the reference value. Furthermore, in our proof of universality for (2.2), it makes very little difference whether the external forcing f is applied inside the activation function, as in (2.2b) resp. (2.1a), or outside as in (2.9); indeed, the first layer in our proof of universality will in fact approximate the linearized dynamics of (2.2b), i.e. a forced harmonic oscillator (2.6). Consequently, a universality result for the multi-layer neural oscillator (2.2) also implies universality of variants of nonlinear oscillator-based physical neural networks, such as those considered in [35].

3 Universality of Neural Oscillators

In this section, we state and sketch the proof for our main result regarding the universality of neural oscillators (2.1) or, more specifically, multi-layer oscillators (2.2). To this end, we start with some mathematical preliminaries to set the stage for the main theorem.

3.1 Setting

Input signal. We want to approximate operators Φ : u ↦→ Φ( u ) , where u = u ( t ) is a timedependent input signal over a time-interval t ∈ [0 , T ] , and Φ( u )( t ) is a time-dependent output signal. We will assume that the input signal t ↦→ u ( t ) is continuous, and that u (0) = 0 . To this end, we introduce the space

We will assume that the underlying operator defines a mapping Φ : C 0 ([0 , T ]; R p ) → C 0 ([0 , T ]; R q ) .

̸

The approximation we discuss in this work are based on oscillatory systems starting from rest. These oscillators are forced by the input signal u . For such systems the assumption that u (0) = 0 is necessary, because the oscillator starting from rest takes a (arbitrarily small) time-interval to synchronize with the input signal (to 'warm up'); If u (0) = 0 , then the oscillator cannot accurately approximate the output during this warm-up phase. This intuitive fact is also implicit in our proofs. We will provide a further comment on this issue in Remark 3.2, below.

Operators of interest. We consider the approximation of an operator Φ : C 0 ([0 , T ]; R p ) → C 0 ([0 , T ]; R q ) , mapping a continuous input signal u ( t ) to a continuous output signal Φ( u )( t ) . We will restrict attention to the uniform approximation of Φ over a compact set of input functions K ⊂ C 0 ([0 , T ]; R p ) . We will assume that Φ satisfies the following properties:

Φ is causal : For any t ∈ [0 , T ] , if u, v ∈ C 0 ([0 , T ]; R p ) are two input signals, such that u | [0 ,t ] ≡ v | [0 ,t ] , then Φ( u )( t ) = Φ( v )( t ) , i.e. the value of Φ( u )( t ) at time t does not depend on future values { u ( τ ) | τ > t } .

Φ is continuous as an operator

with respect to the L ∞ -norm on the input-/output-signals.

Note that the class of Continuous and Causal operators are very general and natural in the contexts of mapping between sequence spaces or time-varying function spaces, see [7, 6] and references therein.

3.2 Universal approximation Theorem

The universality of neural oscillators is summarized in the following theorem:

Theorem 3.1 . [Universality of the multi-layer neural oscillator] Let Φ : C 0 ([0 , T ]; R p ) → C 0 ([0 , T ]; R q ) be a causal and continuous operator. Let K ⊂ C 0 ([0 , T ]; R p ) be compact. Then for any ϵ > 0 , there exist hyperparameters L , m 1 , . . . , m L , weights w ℓ ∈ R m ℓ , V ℓ ∈ R m ℓ × m ℓ -1 , A ∈ R q × m L and bias vectors b ℓ ∈ R m ℓ , c ∈ R q , for ℓ = 1 , . . . , L , such that the output z : [0 , T ] → R q of the multi-layer neural oscillator (2.2) satisfies

It is important to observe that the sparse, independent multi-layer neural oscillator (2.2) suffices for universality in the considered class. Thus, there is no need to consider the wider class of neural oscillators (2.1), at least in this respect. We remark in passing that Theorem 3.1 immediately implies another universality result for neural oscillators, showing that they can also be used to approximate arbitrary continuous functions F : R p → R q . This extension is explained in detail in SM A.

Remark 3.2 . We note that the theorem can be readily extended to remove the requirement on u (0) = 0 and Φ( u )(0) = 0 . To this end, let Φ : C ([0 , T ]; R p ) → C ([0 , T ]; R q ) be an operator between spaces of continuous functions, u ↦→ Φ( u ) on [0 , T ] . Fix a t 0 > 0 , and extend any input function u : [0 , T ] → R p to a function E ( u ) ∈ C 0 ([ -t 0 , T ]; R p ) , by

Our proof of Theorem 3.1 can readily be used to show that the oscillator system with forcing E ( u ) , and initialized at time -t 0 < 0 , can uniformly approximate Φ( u ) over the entire time interval [0 , T ] , without requiring that u (0) = 0 , or Φ( u )(0) = 0 . In this case, the initial time interval [ -t 0 , 0] provides the required 'warm-up phase' for the neural oscillator.

Remark 3.3 . The required compactness property of the set of input signals K ⊂ C 0 ([0 , T ]; R p ) in Theorem 3.1 is implied by a suitable smoothness constraint; examples include uniform bounds on the Lipschitz norm, Hölder norms, uniform bounds on higher-order derivatives, or under the assumption that the input signals are uniformly bounded and band-limited. The proposed compactness assumption subsumes all of these smoothness constraints, resulting in a widely applicable universal approximation theorem.

Remark 3.4 . In practice, neural ODEs such as (2.2) need to be discretized via suitable numerical schemes. As examples, CoRNN and UnICORNN were implemented in [27] and [28], respectively, with implicit-explicit time discretizations. Nevertheless, universality also applies for such discretizations as long as the time-step is small enough, as the underlying discretization is going to be a sufficiently accurate approximation of (2.2) and Theorem 3.1 can be used for showing universality of the discretized version of the multi-layer neural oscillator (2.2).

3.3 Outline of the Proof

In the following, we outline the proof of the universality Theorem 3.1, while postponing the technical details to the SM . For a given tolerance ϵ , we will explicitly construct the weights and biases of the multi-layer neural oscillator (2.2) such that the underlying operator can be approximated within the given tolerance. This construction takes place in the following steps:

(Forced) Harmonic Oscillators compute a timewindowed sine transform. Recall that the forced harmonic oscillator (2.6) is the simplest example of a neural oscillator (2.1). The following lemma, proved by direct calculation in SM B.1, shows that this forced harmonic oscillator actually computes a time-windowed variant of the sine transform at the corresponding frequency:

̸

Lemma 3.5 . Assume that ω = 0 . Then the solution of (2.6) is given by

Given the last result, for a function u , we define its timewindowed sine transform as follows,

Lemma 3.5 shows that a forced harmonic oscillator computes (3.2) up to a constant.

Approximation of causal operators from finite realizations of time-windowed sine transforms. The following novel result, termed the fundamental Lemma , shows that the time-windowed sine transform (3.2) composed with a suitable nonlinear function can approximate causal operators Φ to desired accuracy; as a consequence, one can conclude that forced harmonic oscillators combined with a nonlinear read-out defines a universal architecture in the sense of Theorem 3.1.

Lemma 3.6 (Fundamental Lemma) . Let Φ : K ⊂ C 0 ([0 , T ]; R p ) → C 0 ([0 , T ]; R q ) be a causal and continuous operator, with K ⊂ C 0 ([0 , T ]; R p ) compact. Then for any ϵ > 0 , there exists N ∈ N , frequencies ω 1 , . . . , ω N and a continuous mapping Ψ : R p × N × [0 , T 2 / 4] → R q , such that

The function Ψ defined in Lemma 3.6 can be interpreted as a finite-dimensional encoding of the operator Φ . The main insight of the fundamental Lemma 3.6 is that the (infinite-dimensional) operator Φ can effectively be replaced by a (finite-dimensional) function Ψ , making the approximation by neural oscillators more tractable.

The proof of the fundamental Lemma 3.6, detailed in SM B.2, is based on first showing that any continuous function can be reconstructed to desired accuracy, in terms of realizations of its timewindowed sine transform (3.2) at finitely many frequencies ω 1 , . . . , ω N (see SM Lemma B.1). Then, we leverage the continuity of the underlying operator Φ to approximate it with a finite-dimensional function Ψ , which takes the time-windowed sine transforms as its arguments.

Given these two results, we can discern a clear strategy to prove the universality Theorem 3.1. First, we will show that a general nonlinear form of the neural oscillator (2.2) can also compute the time-windowed sine transform at arbitrary frequencies. Then, these outputs need to be processed in order to apply the fundamental Lemma 3.6 and approximate the underlying operator Φ . To this end, we will also approximate the function Ψ (mapping finite-dimensional inputs to finite-dimensional outputs) by oscillatory layers. The concrete steps in this strategy are outlined below.

input

u

m

u(t)

y

forced linear

layer1

oscillator

input

layer

y

layer2

hidden

layer

y

3

output

layer

nonlinear

Z

output

read out

Nonlinear Oscillators approximate the time-windowed sine transform. The building block of multi-layer neural oscillators (2.2) is the nonlinear oscillator of the form,

In the following Lemma (proved in SM B.3), we show that even for a nonlinear activation function σ such as tanh or sin , the nonlinear oscillator (3.3) can approximate the time-windowed sine transform.

̸

Lemma 3.7 . Fix ω = 0 . Assume that σ (0) = 0 , σ ′ (0) = 1 . For any ϵ > 0 , there exist w,V,b, A ∈ R , such that the nonlinear oscillator (3.3), initialized at y (0) = ˙ y (0) = 0 , has output

with L t u ( ω ) being the time-windowed sine transform (3.2).

Coupled Nonlinear Oscillators approximate time-delays. The next step in the proof is to show that coupled oscillators can approximate time-delays in the continuous input signal. This fact will be of crucial importance in subsequent arguments. We have the following Lemma (proved in SM B.4),

Lemma 3.8 . Let K ⊂ C 0 ([0 , T ]; R p ) be a compact subset. For every ϵ > 0 , and ∆ t ≥ 0 , there exist m ∈ N , w ∈ R m , V ∈ R m × p , b ∈ R m and A ∈ R p × m , such that the oscillator (3.3), initialized at y (0) = ˙ y (0) = 0 , has output

where u ( t ) is extended to negative values t < 0 by zero.

Two-layer neural oscillators approximate neural networks pointwise. As in the strategy outlined above, the final ingredient in our proof of the universality theorem 3.1 is to show that neural oscillators can approximate continuous functions, such as the Ψ in the fundamental lemma 3.6, to desired accuracy. To this end, we will first show that neural oscillators can approximate general neural networks (perceptrons) and then use the universality of neural networks in the class of continuous functions to prove the desired result. The main difficulty here is that, due to the underlying oscillatory dynamics, it is not clear whether the output of even a shallow neural network can be reproduced by neural oscillators. The following lemma, visually represented by the bottom half of Figure 1, guarantees this:

Lemma 3.9 . Let K ⊂ C 0 ([0 , T ]; R p ) be compact. For matrices Σ , Λ and bias γ , and any ϵ > 0 , there exists a two-layer ( L = 2 ) oscillator (2.2), initialized at y ℓ (0) = ˙ y ℓ (0) = 0 , ℓ = 1 , 2 , such that

The proof, detailed in SM B.5, is constructive and the neural oscillator that we construct has two layers. The first layer just processes a nonlinear input function through a nonlinear oscillator and the second layer, approximates the second-derivative (in time) from time-delayed versions of the input signal that were constructed in Lemma 3.8.

Combining the ingredients to prove the universality theorem 3.1. The afore-constructed ingredients are combined in SM B.6 to prove the universality theorem. In this proof, we explicitly construct a three-layer neural oscillator (2.2) which approximates the underlying operator Φ . The first layer follows the construction of Lemma 3.7, to approximate the time-windowed sine transform (3.2), for as many frequencies as are required in the fundamental Lemma 3.6. The second- and third-layers imitate the construction of Lemma 3.9 to approximate a neural network (perception), which in turn by the universal approximation of neural networks, approximates the function Ψ in Lemma 3.6 to desired accuracy. Putting the network together leads to a three-layer oscillator that approximates the continuous and casual operator Φ . This construction is depicted in Figure 1.

4 Discussion

Machine learning architectures, based on networks of coupled oscillators, for instance sequence models such as CoRNN [27] and UnICORNN [28], graph neural networks such as GraphCON [26] and increasingly, the so-called physical neural networks (PNNs) such as linear and nonlinear mechanical oscillators [35] and spintronic oscillators [24, 32], are being increasingly used. A priori, it is unclear why ML systems based on oscillators can provide competitive performance on a variety of learning benchmarks, e.g. [27, 28, 26, 35], rather than biasing their outputs towards oscillatory functions. In order to address these concerns about their expressivity, we have investigated the theoretical properties of machine learning systems based on oscillators. Our main aim was to answer a fundamental question: 'are coupled oscillator based machine learning architectures universal?' . In other words, can these architectures, in principle, approximate a large class of input-output maps to desired accuracy.

To answer this fundamental question, we introduced an abstract framework of neural oscillators (2.1) and its particular instantiation, the multi-layer neural oscillators (2.2). This abstract class of second-order neural ODEs encompasses both sequence models such as CoRNN and UnICORNN, as well as a very general and representative PNN, based on the so-called Frenkel-Kontorova model. The main contribution of this paper was to prove the universality theorem 3.1 on the ability of multi-layer neural oscillators (2.2) to approximate a large class of operators, namely causal and continuous maps between spaces of continuous functions, to desired accuracy. Despite the fact that the considered neural oscillators possess a very specific and constrained structure, not even encompassing general Hamiltonian systems, the approximated class of operators is nevertheless very general, including solution operators of general ordinary and even time-delay differential equations.

The crucial theoretical ingredient in our proof was the fundamental Lemma 3.6, which implies that linear oscillator dynamics combined with a pointwise nonlinear read-out suffices for universal operator approximation; our construction can correspondingly be thought of as a large number of linear processors, coupled with nonlinear readouts. This construction could have implications for other models such as structured state space models [9, 8, 10] which follow a similar paradigm, and the extension of our universality results to such models could be of great interest.

Our universality result has many interesting implications. To start with, we rigorously prove that an MLarchitecture based on coupled oscillators can approximate a very large class of operators. This provides theoretical support to many widely used sequence models and PNNs based on oscillators. Moreover, given the generality of our result, we hope that such a universality result can spur the design of innovative architectures based on oscillators, particularly in the realm of analog devices as ML inference systems or ML accelerators [35].

It is also instructive to lay out some of the limitations of the current article and point to avenues for future work. In this context, our setup currently only considers time-varying functions as inputs and outputs. Roughly speaking, these inputs and outputs have the structure of (infinite) sequences. However, a large class of learning tasks can be reconfigured to take sequential inputs and outputs. These include text (as evident from the tremendous success of large language models [22]), DNA sequences, images [16], timeseries and (offline) reinforcement learning [15]. Nevertheless, a next step would be to extend such universality results to inputs (and outputs) which have some spatial or relational structure, for instance by considering functions which have a spatial dependence or which are defined on graphs. On the other hand, the class of operators that we consider, i.e., casual and continuous, is not only natural in this setting but very general [7, 6].

Another limitation lies in the feed forward structure of the multi-layer neural oscillator (2.2). As mentioned before, most physical (and neurobiological) systems exhibit feedback loops between their constituents. However, this is not common in ML systems. In fact, we had to use a mass ordering in the Frenkel-Kontorova system of coupled pendula (2.8) in order to recast it in the form of the multi-layer neural oscillator (2.2). Such asymptotic ordering may not be possible for arbitrary physical neural networks. Exploring how such ordering mechanisms might arise in physical and biological systems in order to effectively give rise to a feed forward system could be very interesting. One possible mechanism for coupled oscillators that can lead to a hierarchical structure is that of synchronization [34, 31] and references therein. How such synchronization interacts with universality is a very interesting question and will serve as an avenue for future work.

Finally, universality is arguably necessary but far from sufficient to analyze the performance of any ML architecture. Other aspects such as trainability and generalization are equally important, and we do not address these issues here. We do mention that trainability of oscillatory systems would profit from the fact that oscillatory dynamics is (gradient) stable and this formed the basis of the proofs of mitigation of the exploding and vanishing gradient problem for CoRNN in [27] and UnICORNN in [28] as well as GraphCON in [26]. Extending these results to the general second-order neural ODE (2.2), for instance through an analysis of the associated adjoint system, is left for future work.

References

A . R. Barron. Universal approximation bounds for superpositions of a sigmoidal function. IEEE Transcations on Information Theory , 39, 1993.

O. M. Braun and Y.S. Kivshar. Nonlinear dynamics of the frenkel-kontorova model. Physics Reports , 306:1-108, 1998.

Michael M Bronstein, Joan Bruna, Taco Cohen, and Petar Veliˇ ckovi´ c. Geometric deep learning: Grids, groups, graphs, geodesics, and gauges. arXiv:2104.13478 , 2021.

Ricky TQ Chen, Yulia Rubanova, Jesse Bettencourt, and David K Duvenaud. Neural ordinary differential equations. In Advances in Neural Information Processing Systems , pages 6571-6583, 2018.

G. Cybenko. Approximation by superpositions of a sigmoidal function. Mathematics of Control, Signals and Systems , 2(4):303-314, Dec 1989.

Lukas Gonon, Lyudmila Grigoryeva, and Juan-Pablo Ortega. Risk bounds for reservoir computing. The Journal of Machine Learning Research , 21(1):9684-9744, 2020.

Lyudmila Grigoryeva and Juan-Pablo Ortega. Echo state networks are universal. Neural Networks , 108:495 - 508, 2018.

A. Gu, T. Dao, S. Ermon, A. Rudra, and C. Re. Hippo:recurrent memory with optimal polynomial projections. In Advances in Neural Information Processing Systems , pages 14741487, 2020.

A. Gu, K. Goel, and C. Re. Efficiently modeling long sequences with structured state spaces. In International Conference on Learning Representations , 2021.

Albert Gu, Isys Johnson, Aman Timalsina, Atri Rudra, and Christopher Re. How to train your hippo: State space models with generalized orthogonal basis projections. In International Conference on Learning Representations , 2022.

B-M. Gu, H. vanRijn, and W. K. Meck. Oscillatory multiplexing of neural population codes for interval timing and working memory. Neuroscience and Behaviorial reviews, , 48:160-185, 2015.

J. Guckenheimer and P. Holmes. Nonlinear oscillations, dynamical systems, and bifurcations of vector fields . Springer Verlag, New York, 1990.

Bing Han, Cheng Wang, and Kaushik Roy. Oscillatory fourier neural network: A compact and efficient architecture for sequential processing. In Proceedings of the AAAI Conference on Artificial Intelligence , volume 36(6), pages 6838-6846, 2022.

Kurt Hornik, Maxwell Stinchcombe, and Halbert White. Multilayer feedforward networks are universal approximators. Neural Networks , 2(5):359 - 366, 1989.

Michael Janner, Qiyang Li, and Sergey Levine. Offline reinforcement learning as one big sequence modeling problem. Advances in neural information processing systems , 34:12731286, 2021.

Andrej Karpathy and Li Fei-Fei. Deep visual-semantic alignments for generating image descriptions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition , pages 3128-3137, 2015.

T. Anderson Keller and Max Welling. Locally coupled oscillatory recurrent networks learn traveling waves and topographic organization. In Cosyne abstracts , 2023.

Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE , 86(11):2278-2324, 1998.

Alexander Norcliffe, Cristian Bodnar, Ben Day, Nikola Simidjievski, and Pietro Liò. On second order behaviour in augmented neural odes. Advances in neural information processing systems , 33:5911-5921, 2020.

Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the difficulty of training recurrent neural networks. In Proceedings of the 30th International Conference on International Conference on Machine Learning , volume 28 of ICML'13 , page III-1310-III-1318. JMLR.org, 2013.

Allan Pinkus. Approximation theory of the MLP model in neural networks. Acta numerica , 8(1):143-195, 1999.

A. Radford, K. Narasimhan, T. Salimans, and I. Suktskever. Improving language understanding by generative pre-training. arXiv: , 2018.

Danilo Rezende and Shakir Mohamed. Variational inference with normalizing flows. In International conference on machine learning , pages 1530-1538. PMLR, 2015.

M. Romera and et. al. Vowel recognition with four coupled spin-torque nano-oscillators. Nature , 588:230-234, 2018.

T. Konstantin Rusch, Michael M Bronstein, and Siddhartha Mishra. A survey on oversmoothing in graph neural networks. arXiv:2303.10993 , 2023.

T. Konstantin Rusch, Ben Chamberlain, James Rowbottom, Siddhartha Mishra, and Michael Bronstein. Graph-coupled oscillator networks. In Proceedings of the 39th International Conference on Machine Learning , volume 162 of Proceedings of Machine Learning Research , pages 18888-18909. PMLR, 2022.

T. Konstantin Rusch and Siddhartha Mishra. Coupled oscillatory recurrent neural network (cornn): An accurate and (gradient) stable architecture for learning long time dependencies. In International Conference on Learning Representations , 2021.

T. Konstantin Rusch and Siddhartha Mishra. Unicornn: A recurrent model for learning very long time dependencies. In Proceedings of the 38th International Conference on Machine Learning , volume 139 of Proceedings of Machine Learning Research , pages 9168-9178. PMLR, 2021.

K. M. Stiefel and G. B. Ermentrout. Neurons as oscillators. Journal of Neurophysiology , 116:2950-2960, 2016.

S. Strogatz. Nonlinear Dynamics and Chaos . Westview, Boulder CO, 2015.

S. H. Strogatz. Exploring complex networks. Nature , 410:268-276, 2001.

J. Torrejon and et. al. Neuromorphic computing with nanoscale spintronic oscillators. Nature , 547:428-431, 2017.

A. Velichko, M. Belyaev, and P. Boriskov. A model of an oscillatory neural network with multilevel neurons for pattern recognition and computing. Electronics , 8, 2019.

A. T. Winfree. Biological rhythms and the behavior of populations of coupled oscillators. Journal of Theoretical Biology , 16:15-42, 1967.

Logan G Wright, Tatsuhiro Onodera, Martin M Stein, Tianyu Wang, Darren T Schachter, Zoey Hu, and Peter L McMahon. Deep physical neural networks trained with backpropagation. Nature , 601(7894):549-555, 2022.

Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747 , 2017.

A Another universality result for neural oscillators

The universal approximation Theorem 3.1 immediately implies another universal approximation results for neural oscillators, as explained next. We consider a continuous map F : R p → R q ; our goal is to show that F can be approximated to given accuracy ϵ by suitably defined neural oscillators. Fix a time interval [0 , T ] for (an arbitrary choice) T = 2 . Let K 0 ⊂ R p be a compact set. Given ξ ∈ R p , we associate with it a function u ξ ( t ) ∈ C 0 ([0 , T ]; R p ) , by setting

Clearly, the set K := { u ξ | ξ ∈ K 0 } is compact in C 0 ([0 , T ]; R p ) . Furthermore, we can define an operator Φ : C 0 ([0 , T ]; R p ) → C 0 ([0 , T ]; R q ) , by

where F : R p → R q is the given continuous function that we wish to approximate. One readily checks that Φ defines a causal and continuous operator. Note, in particular, that

is just the evaluation of F at ξ , for any ξ ∈ K 0 .

Since neural oscillators can uniformly approximate the operator Φ for inputs u ξ ∈ K , then as a consequence of Theorem 3.1 and (2.3), it follows that, for any ϵ > 0 there exists m ∈ N , matrices W ∈ R m × m , V ∈ R m × p and A ∈ R q × m , and bias vectors b ∈ R m , c ∈ R q , such that for any ξ ∈ K 0 , the neural oscillator system,

satisfies

uniformly for all ξ ∈ K 0 . Hence, neural oscillators can be used to approximate an arbitrary continuous function F : R p → R q , uniformly over compact sets. Thus, neural oscillators also provide universal function approximation.

B Proof of Theorem 3.1

B.1 Proof of Lemma 3.5

Proof. We can rewrite y ( t ) = 1 ω ´ t 0 u ( τ ) sin( ω ( t -τ )) dτ . By direct differentiation, one readily verifies that y ( t ) so defined, satisfies

in account of the fact that sin(0) = 0 . Differentiating once more, we find that

Thus y ( t ) solves the ODE (2.6), with initial condition y (0) = ˙ y (0) = 0 .

B.2 Proof of Fundamental Lemma 3.6

Reconstruction of a continuous signal from its sine transform. Let [0 , T ] ⊂ R be an interval. We recall that we define the windowed sine transform L t u ( ω ) of a function u : [0 , T ] → R p , by

In the following, we fix a compact set K ⊂ C 0 ([0 , T ]; R p ) . Note that for any u ∈ K , we have u (0) = 0 , and hence K can be identified with a subset of C (( -∞ , T ]; R p ) , consisting of functions with supp( u ) ⊂ [0 , T ] . We consider the reconstruction of continuous functions u ∈ K . We will show that u can be approximately reconstructed from knowledge of L t ( ω ) . More precisely, we provide a detailed proof of the following result:

Lemma B.1 . Let K ⊂ C (( -∞ , T ]; R p ) be compact, such that supp( u ) ⊂ [0 , T ] for all u ∈ K . For any ϵ, ∆ t > 0 , there exists N ∈ N , frequencies ω 1 , . . . , ω N ∈ R \ { 0 } , phase-shifts ϑ 1 , . . . , ϑ N ∈ R and weights α 1 , . . . , α N ∈ R , such that

for all u ∈ K and for all t ∈ [0 , T ] .

Proof. Step 0: (Equicontinuity) We recall the following fact from topology. If K ⊂ C (( -∞ , T ]; R p ) is compact, then it is equicontinuous; i.e. there exists a continuous modulus of continuity ϕ : [0 , ∞ ) → [0 , ∞ ) with ϕ ( r ) → 0 as r → 0 , such that

Step 1: (Connection to Fourier transform) Fix t 0 ∈ [0 , T ] and u ∈ K for the moment. Define f ( τ ) = u ( t 0 -τ ) . Note that f ∈ C ([0 , ∞ ); R p ) , and f has compact support supp( f ) ⊂ [0 , T ] . We also note that, by (B.1), we have

We now consider the following odd extension of f to all of R :

Since F is odd, the Fourier transform of F is given by

Let ϵ > 0 be arbitrary. Our goal is to uniformly approximate F ( τ ) on the interval [0 , ∆ t ] . The main complication here is that F lacks regularity (is discontinuous), and hence the inverse Fourier transform of ̂ F does not converge to F uniformly over this interval; instead, a more careful reconstruction based on mollification of F is needed. We provide the details below.

Step 2: (Mollification) We now fix a smooth, non-negative and compactly supported function ρ : R → R , such that supp( ρ ) ⊂ [0 , 1] , ρ ≥ 0 , ´ R ρ ( t ) dt = 1 , and we define a mollifier ρ ϵ ( t ) := 1 ϵ ρ ( t/ϵ ) . In the following, we will assume throughout that ϵ ≤ T . Wepoint out that supp( ρ ϵ ) ⊂ [0 , ϵ ] , and hence, the mollification F ϵ ( t ) = ( F ∗ ρ ϵ )( t ) satisfies, for t ≥ 0 :

In particular, this shows that

can be made arbitrarily small, with an error that depends only on the modulus of continuity ϕ .

Step 3: (Fourier inverse) Let ̂ F ϵ ( ω ) denote the Fourier transform of F ϵ . Since F ϵ is smooth and compactly supported, it is well-known that we have the identity

where ω ↦→ ̂ F ϵ ( ω ) decays to zero very quickly (almost exponentially) as | ω |→∞ . In fact, since F ϵ = F ∗ ρ ϵ is a convolution, we have ̂ F ϵ ( ω ) = ̂ F ( ω ) ̂ ρ ϵ ( ω ) , where | ̂ F ( ω ) | ≤ 2 ∥ f ∥ L ∞ T is uniformly bounded, and ̂ ρ ϵ ( ω ) decays quickly. In particular, this implies that there exists a L = L ( ϵ, T ) > 0 independent of f , such that

Step 4: (Quadrature) Next, we observe that, since F and ρ ϵ are compactly supported, their Fourier transform ω ↦→ ̂ F ( ω ) ̂ ρ ϵ ( ω ) e -iωτ is smooth; in fact, for | τ | ≤ T , the Lipschitz constant of this mapping can be explicitly estimated by noting that

We next take absolute values, and note that any t in the support of F ϵ obeys the bound | t | ≤ T + ϵ ≤ 2 T , while | τ | ≤ T by assumption; it follows that

It thus follows from basic results on quadrature that for an equidistant choice of frequencies ω 1 < · · · < ω N , with spacing ∆ ω = 2 L/ ( N -1) , we have

̸

for an absolute constant C > 0 , independent of F , T and N . By choosing N to be even, we can ensure that ω j = 0 for all j . In particular, recalling that L = L ( T, ϵ ) depends only on ϵ and T , and choosing N = N ( T, ϵ ) sufficiently large, we can combine the above estimate with (B.2) to ensure that

where we have taken into account that ∥ F ∥ L ∞ = ∥ f ∥ L ∞ .

Step 5: (Conclusion) To conclude the proof, we recall that ̂ F ( ω ) = 2 i L t 0 u ( ω ) can be expressed in terms of the sine transform L t u of the function u which was fixed at the beginning of Step 1. Recall also that f ( τ ) = u ( t 0 -τ ) , so that ∥ f ∥ L ∞ = ∥ u ∥ L ∞ . Hence, we can write the real part of ∆ ω 2 π ̂ F ( ω j ) ̂ ρ ϵ ( ω j ) e -iω j τ = ∆ ω 2 π 2 i L t 0 u ( ω j ) ̂ ρ ϵ ( ω j ) e -iω j τ , in the form α j L t 0 ( ω j ) sin( ω j τ -ϑ j ) for coefficients α j ∈ R and θ j ∈ R which depend only on ∆ ω and ̂ ρ ϵ ( ω j ) , but are independent of u . In

particular, it follows that

By Steps 1 and 3, the first term on the right-hand side is bounded by ≤ ϕ ( ϵ ) , while the second one is bounded by ≤ 2 sup u ∈ K ∥ u ∥ L ∞ ϵ ≤ Cϵ , where C = C ( K ) < ∞ depends only on the compact set K ⊂ C ([0 , T ]; R p ) . Hence, we have

In this estimate, the function u ∈ K and t 0 ∈ [0 , T ] were arbitrary, and the modulus of continuity ϕ as well as the constant C on the right-hand side depend only on the set K . it thus follows that for this choice of α j , ω j and ϑ j , we have

Since ϵ > 0 was arbitrary, the right-hand side can be made arbitrarily small. The claim then readily follows.

The next step in the proof of the fundamental Lemma 3.6 needs the following preliminary result in functional analysis,

Lemma B.2 . Let X , Y be Banach spaces, and let K ⊂ X be a compact subset. Assume that Φ : X → Y is continous. Then for any ϵ > 0 , there exists a δ > 0 , such that if ∥ u -u K ∥ X ≤ δ with u ∈ X , u K ∈ K , then ∥ Φ( u ) -Φ( u K ) ∥ Y ≤ ϵ .

Proof. Suppose not. Then there exists ϵ 0 > 0 and a sequence u j , u K j , ( j ∈ N ), such that ∥ u j -u K j ∥ X ≤ j -1 , while ∥ Φ( u j ) -Φ( u K j ) ∥ Y ≥ ϵ 0 . By the compactness of K , we can extract a subsequence j k →∞ , such that u K j k → u K converges to some u K ∈ K . By assumption on u j , this implies that

which, by the assumed continuity of Φ , leads to the contradiction that 0 < ϵ 0 ≤ ∥ Φ( u j k ) -Φ( u K ) ∥ Y → 0 , as k →∞ .

Proof of Lemma 3.6. Now, we can prove the fundamental Lemma in the following,

Proof. Let ϵ > 0 be given. We can identify K ⊂ C 0 ([0 , T ]; R p ) with a compact subset of C (( -∞ , T ]; R p ) , by extending all u ∈ K by zero for negative times, i.e. we set u ( t ) = 0 for t < 0 . Applying Lemma B.2, with X = C 0 ([0 , T ]; R p ) and Y = C 0 ([0 , T ]; R q ) , we can find a δ > 0 , such that for any u ∈ C 0 ([0 , T ]; R p ) and u K ∈ K , we have

Let Y be the solution of

By the inverse sine transform Lemma B.1, there exist N ∈ N , frequencies ω 1 , . . . , ω N = 0 , phaseshifts ϑ 1 , . . . , ϑ N and coefficients α 1 , . . . , α N , such that for any u ∈ K and t ∈ [0 , T ] :

̸

Given L t u ( ω 1 ) , . . . , L t u ( ω N ) , we can thus define a reconstruction mapping R : R N × [0 , T ] → C ([0 , T ]; R p ) by

Then, for τ ∈ [0 , t ] , we have

We can now uniquely define Ψ : R N × [0 , T 2 / 4] → C 0 ([0 , T ]; R p ) , by the identity

Using the short-hand notation R t u = R ( L t u ( ω 1 ) , . . . , L t u ( ω N ); t ) , we have sup τ ∈ [0 ,t ] | u ( τ ) -R t u ( τ ) | ≤ δ , for all t ∈ [0 , T ] . By (B.3), this implies that

B.3 Proof of Lemma 3.7

̸

Proof. Let ω = 0 be given. For a (small) parameter s > 0 , we consider

Then we have, on account of σ (0) = 0 and σ ′ (0) = 1 ,

It follows from Lemma 3.5 that for any input u ∈ K , with sup u ∈ K ∥ u ∥ L ∞ =: B < ∞ , we have a uniform bound ∥ Y ∥ L ∞ ≤ BT/ω , hence we can estimate

uniformly for all such u . In particular, it follows that

Clearly, for any δ > 0 , we can choose s ∈ (0 , 1] sufficiently small, such that the right hand-side is bounded by δ , i.e. with this choice of s ,

holds for any choice of u ∈ K . We will fix this choice of s in the following, and write g ( y, u ) := s -1 σ ( -sω 2 y + su ) . We note that g is Lipschitz continuous in y , for all | y | ≤ BT/ω and | u | ≤ B , with Lip y ( g ) ≤ ω 2 sup | ξ |≤ B ( ωT +1) | σ ′ ( ξ ) | .

To summarize, we have shown that Y solves

where ∥ f ∥ L ∞ ≤ δ . By definition, y s solves

It follows from this that

Recalling that Y ( t ) = L t u ( ω ) , then by Gronwall's inequality, the last estimate implies that

for a constant C = C ( T, ω, sup | ξ |≤ B ( ωT +1) | σ ′ ( ξ ) | ) > 0 , depending only on T , ω , B and σ ′ . Since δ > 0 was arbitrary, we can ensure that Cδ ≤ ϵ . Thus, we have shown that a suitably rescaled nonlinear oscillator approximates the harmonic oscillator to any desired degree of accuracy, and uniformly for all u ∈ K .

To finish the proof, we observe that y solves

if, and only if, y s = y/s solves

Hence, with W = -ω 2 , V = s , b = 0 and A = s -1 , we have

This concludes the proof.

B.4 Proof of Lemma 3.8

Proof. Let ϵ, ∆ t be given. By the sine transform reconstruction Lemma B.1, there exists N ∈ N , frequencies ω 1 , . . . , ω N , weights α 1 , . . . , α N and phase-shifts ϑ 1 , . . . , ϑ N , such that

where any u ∈ K is extended by zero to negative times. It follows from Lemma 3.7, that there exists a coupled oscillator network,

with dimension m = pN , and w ∈ R m , V ∈ R m × p , and a linear output layer y ↦→ ˜ Ay , ˜ A ∈ R m × m , such that [ ˜ Ay ( t )] j ≈ L t u ( ω j ) for j = 1 , . . . , N ; more precisely, such that

Composing with another linear layer B : R m ≃ R p × N → R p , which maps β = [ β 1 , . . . , β N ] to

we define A := B ˜ A , and observe that from (B.4) and (B.5):

B.5 Proof of Lemma 3.9

Proof. Fix Σ , Λ , γ as in the statement of the lemma. Our goal is to approximate u ↦→ Σ σ (Λ u + γ ) .

Step 1: (nonlinear layer) We consider a first layer for a hidden state y = [ y 1 , y 2 ] T ∈ R p + p , given by

This layer evidently does not approximate σ (Λ u ( t ) + γ ) ; however, it does encode this value in the second derivative of the hidden variable y 1 . The main objective of the following analysis is to approximately compute ¨ y 1 ( t ) through a suitably defined additional layer.

Step 2: (Second-derivative layer) To obtain an approximation of σ (Λ u ( t ) + γ ) , we first note that the solution operator

defines a continuous mapping S : C 0 ([0 , T ]; R p ) → C 2 0 ([0 , T ]; R p ) , with η (0) = ˙ η (0) = ¨ η (0) = 0 . Note that η is very closely related to y 1 . The fact that ¨ η = 0 is important to us, because it allows us to smoothly extend η to negative times by setting η ( t ) := 0 for t < 0 (which would not be true for y 1 ( t ) ). The resulting extension defines a compactly supported function η : ( -∞ , 0] → R p , with η ∈ C 2 (( -∞ , T ]; R p ) . Furthermore, by continuity of the operator S , the image S ( K ) of the compact set K under S is compact in C 2 (( -∞ , T ]; R p ) . From this, it follows that for small ∆ t > 0 , the second-order backward finite difference formula converges,

where the bound on the right-hand side is uniform in u ∈ K , due to equicontinuity of { ¨ η | η = S ( u ) , u ∈ K } . In particular, the second derivative of η can be approximated through linear combinations of time-delays of η . We can now choose ∆ t > 0 sufficiently small so that

where ∥ Σ ∥ denotes the operator norm of the matrix Σ . By Lemma 3.8, applied to the input set ˜ K = S ( K ) ⊂ C 0 ([0 , T ]; R p ) , there exists a coupled oscillator

and a linear output layer z ↦→ ˜ Az , such that

Indeed, Lemma 3.8 shows that time-delays of any given input signal can be approximated with any desired accuracy, and η ( t ) -2 η ( t -∆) -η ( t -2∆) is simply a linear combination of time-delays of the input signal η in (B.6).

To connect η ( t ) back to the y ( t ) = [ y 1 ( t ) , y 2 ( t )] T constructed in Step 1, we note that

and hence, taking into account the initial values, we must have η ≡ y 1 -y 2 by ODE uniqueness. In particular, upon defining a matrix ˜ V such that ˜ V y := V y 1 -V y 2 ≡ V η , we can equivalently write (B.6) in the form,

Step 3: (Conclusion)

Composing the layers from Step 1 and 2, we obtain a coupled oscillator

initialized at rest, with y 1 = y , y 2 = z , such that for A := Σ A and c := Σ σ ( γ ) , we obtain

This concludes the proof.

B.6 Proof of Theorem 3.1

Proof. Step 1: By the Fundamental Lemma 3.6, there exist N , a continuous mapping Ψ , and frequencies ω 1 , . . . , ω N , such that

for all u ∈ K , and t ∈ [0 , T ] . Let M be a constant such that

for all u ∈ K and t ∈ [0 , T ] . By the universal approximation theorem for ordinary neural networks, there exist weight matrices Σ , Λ and bias γ , such that

holds for all t ∈ [0 , T ] , | β 1 | , . . . , | β N | ≤ M .

Step 2: Fix ϵ 1 ≤ 1 sufficiently small, such that also ∥ Σ ∥∥ Λ ∥ Lip( σ ) ϵ 1 ≤ ϵ , where Lip( σ ) := sup | ξ |≤∥ Λ ∥ M + | γ | +1 | σ ′ ( ξ ) | denotes an upper bound on the Lipschitz constant of the activation function over the relevant range of input values. It follows from Lemma 3.7, that there exists an oscillator network,

of depth 1 , such that for all u ∈ K .

Step 3: Finally, by Lemma 3.9, there exists an oscillator network,

of depth 2 , such that

holds for all y 1 belonging to the compact set K 1 := S ( K ) ⊂ C 0 ([0 , T ]; R N +1 ) , where S denotes the solution operator of (B.8).

Step 4: Thus, we have for any u ∈ K , and with short-hand L t u ( ω ) := ( L t u ( ω 1 ) , . . . , L t u ( ω N )) ,

By step 1, we can estimate

By the choice of Σ , Λ , γ , we have

By construction of y 1 in Step 2, we have

for all t ∈ [0 , T ] and u ∈ K . By construction of y 2 in Step 3, we have

Thus, we conclude that

for all t ∈ [0 , T ] and u ∈ K . Since ϵ > 0 was arbitrary, we conclude that for any causal and continuous operator Φ : C 0 ([0 , T ]; R p ) → C 0 ([0 , T ]; R q ) , compact set K ⊂ C 0 ([0 , T ]; R p ) and ϵ > 0 , there exists a coupled oscillator of depth 3, which uniformly approximates Φ to accuracy ϵ for all u ∈ K . This completes the proof.

Peer reviews:
comments: SUMMARY:
Various machine learning architectures inspired by oscillators perform well in a variety of tasks. The authors study the approximation ability of neural networks based on oscillators. The main contribution of this paper is the construction of a neural oscillator framework combining nonlinear dynamics and a linear read-out, and the proof of a Universality theorem for neural oscillators.

STRENGTHS:
* The universal approximation property is an important theoretical support for neural network architectures. This is the novel theoretical result to get a Universality theorem for neural oscillators.
* The proof strategy of the paper is relatively clear, and the illustration in Figure 1 makes it easier to understand.

WEAKNESSES:
It would be better if the authors could discuss how this universality result contributes to existing work in more detail.

QUESTIONS:
As a further reflection on universal approximation theory, I'm curious about the effect of network width and depth on expressiveness. Specifically, is there a minimum width that can achieve a universal approximation in infinitely deep networks or in fixed-depth networks?

The title is confusing and needs to be revised: 'universal' for what? universal approximator?

LIMITATIONS:
N/A
TITLE: Official Review
SOUNDNESS_CORRECTNESS: 3
DATE: 2023-07-03

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper introduces an abstract framework of neural oscillators and proves the universal approximation theorem of multi-layer neural oscillators, which shows that neural oscillators with a specific structure have the capability of approximating causal and continuous maps between spaces of continuous functions.\n\nSTRENGTHS:\n1. This paper provides a novel proof approach to the approximation theory of neural oscillators. They cleverly used the time-windowed sine transform and the approximation properties of traditional neural networks as a springboard to realize the proof of the entire approximation theory.\n2. They explicitly construct a three-layer neural oscillator structure which is ingenious and corresponds step-by-step to their proof process.\n3. The logic of the outline of the proof is clear and easy to follow.\n\nWEAKNESSES:\nThe proof process is novel, and the structure is specially designed, but in terms of applicability, this design increases the limitation of the approximation theory. It is designed to approximate different items at different layers, not just based on the last loss function or the final operators to be approximated, so it does not match the gradient-based parameter training method well. For example, the first layer is supposed to approximate the time-windowed sine transform, but based on conventional gradient algorithms, this particular limitation cannot be guaranteed. In fact, it is unknown which training method can be used to achieve such a special structure with the approximation property.\n\nQUESTIONS:\nCan it be stated whether it is possible to train parameters by approximating such a hierarchical separate approximation with existing algorithms? Or at the application aspect, can a new training method be designed to match the structure designed in this paper?\n\nLIMITATIONS:\nThe authors have adequately addressed the limitations.", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 2, "DATE": "2023-07-05"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe authors present a universal approximation theorem for a system of 2nd order ODEs they call \"neural oscillators.\" At the heart of the construction is the fact that a forced harmonic oscillator with input computes a windowed sine transform of the input, up to a constant (Lemma 3.4). The other major piece (Lemma 3.5) states that windowed sine transforms taken at a finite number frequencies can be input to a nonlinear function to approximate a causal, continuous operator to desired accuracy.\n\nSTRENGTHS:\n1. The recent applications of nonlinear oscillators in machine learning makes the work relevant and interesting.\n2. The work seems to be technically sound.\n3.The discussion brings up many interesting points including feedforward structure in physical systems, recent work in polynomial memory, expressibility versus learnability.\n4. The main paper and proofs in the appendix are all detailed, readable, and well-organized.\n\nWEAKNESSES:\nThe paper would be helped by a more detailed discussion of where nonlinearity is needed to achieve the universal approximation result. For example, it is known that the time-delay result in Lemma 3.7 can be achieved with a linear system. See [1], for example. Then is it the case that nonlinear oscillators are only needed in the two-layer neural network construction (Lemma 3.8)? Another example would be the windowed sine transform, which can be computed by a linear system.\n\n[1] Gu et al. (2022) \"How to train your hippo: State space models with generalized orthogonal basis projections\"\n\nQUESTIONS:\nSee \"weaknesses.\" I remain fuzzy on exactly where nonlinear dynamics are needed in the construction.\n\nl144: Are the masses \\mu being ordered here? If so, then the quality of the upper diagonal approximation will depend on the differences between the masses and the gap bound 1/epsilon should be stated explicitly for clarity.\n\nMinor comments:\n\nEq 2.3: $w^L I$ -> $\\text{diag}(w^L)$\n\nl95: causally independent, not statistically independent due to common input.\n\nParagraph starting on l123: A sentence more of clarification here would be helpful.\n\nl131: this would be more readable if F were replaced with f to follow the lower-case vector/upper-case matrix convention.\n\nl140-141: It should be made more clear that we are supposing this particular structure for the symmetric matrix C.\n\nLemma 3.5: $t$ is not qualified. Should it be: $\\forall \\epsilon \\exists N$, frequencies $\\omega_1, \\dots, \\omega_N$ and a continuous mapping $\\Psi$ such that $\\forall t \\in [0,T^2/4]$ ?\n\nLIMITATIONS:\nYes.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-07"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis work presents a comprehensive review of diverse learning architectures based on ordinary differential equations (ODEs) and explores their relationship with coupled oscillator systems. Furthermore, the paper provides a proof showcasing the universality of the coupled oscillator architecture. The universality of ODEs is a discernible outcome, as discrete dynamics of neural networks can be effectively mapped to discrete solutions of ODEs utilizing various integration methods. Consequently, the novelty of this work might be slightly diminished by this intuitive understanding. However, the significance of this research lies in its ability to formally define the problem and rigorously prove its assertions. This is particularly noteworthy considering the limited attention given to analog-based learning systems in traditional machine learning and the growing relevance of analog systems in both classical and quantum domains. The majority of the proofs presented in the paper are well-written, rigorous, and appear valid, with the exception of the proof of the Fundamental Lemma. Addressing concerns regarding the Fundamental Lemma, which is utilized to prove the main theorem, would greatly strengthen the case for accepting this work. With this consideration, I am inclined to support the acceptance of this paper.\n\nSTRENGTHS:\nProvides a comprehensive review of ODE-based learning architectures and their relationship to coupled oscillator systems. \nEmphasizes the importance of formalizing the problem and rigorously proving the assertions, given the lack of attention to analog-based learning systems in traditional machine learning and the increasing relevance of analog systems in classical and quantum domains.\n\nWEAKNESSES:\nThe proof of the Fundamental Lemma claims the existence of a continuous function that transforms the oscillator output, which is a sine transform of an input function, into a target function. However, there seems to be a cyclic nature in the reasoning. The proof utilizes the target function, which is not known how to implement with oscillator networks composed of a reconstructing map R as the continuous function. This cyclic dependency raises questions about the validity and logic of the proof.\nIf one already has access to the target function, it becomes obvious that the target function can be approximated. See line 548 and the equation following it in the supplementary material as examples where this circular reasoning is apparent.\n\nAddressing these concerns is crucial to ensure the integrity and validity of the proof presented in the paper. Providing clarification and resolving the cyclic reasoning issue would greatly enhance the readers' understanding and confidence in the proof of the Fundamental Lemma.\n\nQUESTIONS:\nHow important is Lemma 3? The significance of Lemma 3 in the constructive proof of the mapping from neural networks to coupled oscillators warrants further examination. While its importance may not be immediately evident, providing a more detailed explanation of how Lemma 3 is utilized would greatly enhance readers' understanding of the underlying logic behind the proof. Clarifying the role and implications of Lemma 3 in the context of the proof would be beneficial for the readers' comprehension.\n\nLIMITATIONS:\nThis work primarily concentrates on establishing a rigorous understanding of the universality of the coupled oscillator system. While this may appear somewhat self-evident to researchers engaged in developing and deploying similar systems to address real-world problems, it is important to note that the findings do not introduce any novel architectures stemming from this discovery. As a result, the impact of this work remains confined to theoretical considerations.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-07"}