Method and system for processing temporal data using linear artificial neural network layer

By defining the weight matrix of the linear recursive neural network layer, the problem of recursive neural networks calculating state updates in linear time is solved, and the efficiency and stability of processing long input sequences and quantized conditions are improved.

CN118742903APending Publication Date: 2024-10-01APPL BRAIN RES INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380022888.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-02-24
Filing Date
2023-02-23
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

It is difficult for existing technologies to calculate state updates in linear time, especially when processing long input sequences and quantized conditions, which limits the efficiency and stability of recurrent neural networks.

Method used

By defining the weight matrix of the linear recurrent neural network layer, select the basis function of the desired impulse response associated with a specific spectral decomposition, and derive the matrix A that produces this impulse response over a specified time window, as well as the decay outside the time window to zero matrices Γ, combined into recursive weights to enable computation of state updates in linear time.

Benefits of technology

It realizes updating the state representation in linear time, improves the efficiency and robustness of the recurrent neural network, and reduces the computational complexity and error, especially when dealing with long time steps and quantization conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118742903A_ABST
    Figure CN118742903A_ABST
Patent Text Reader

Abstract

The present invention relates to methods and systems for improving the efficiency of an artificial neural network by configuring the artificial neural network to implement a linear dynamic system that computes state updates over linear time. More specifically, the present invention specifies methods and systems for setting weights of at least one linear artificial neural network layer by (a) selecting a set of basis vectors defining a desired impulse response of the layer, (b) deriving a matrix that produces this desired impulse response over a target time window, (c) deriving a matrix that attenuates the impulse response to zero outside the target window, and (d) selecting a set of basis vectors that define the desired impulse response of the layer. And (d) combining the two matrices together by addition to obtain recursive weights of the layers. A system consisting of at least one such linear layer is applied to a time series of input data elements to produce an output encoding the results of pattern classification, signal processing, data representation and data generation tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates generally to the field of processing temporal data using artificial neural networks, and more particularly to improving the efficiency of these networks by configuring them to implement linear dynamic systems that compute state updates in linear time. Background Art

[0002] Modern machine learning systems are widely used to perform tasks in which a time-varying sequence of input data is mapped to one or more output predictions. Examples of such tasks include natural language processing (e.g., mapping a sequence of words in one language to a sequence of words in another language), automatic speech recognition (e.g., mapping a sequence of audio waveform samples to a shorter sequence of language symbols), and general signal processing (e.g., mapping a sequence of readings from a wearable wristband to a sequence of heartbeat event detections). A common approach to building such systems involves the use of artificial recurrent neural network models, which use a set of recursively connected weights to iteratively map each item in the input sequence to an evolving internal state representation. Arbitrarily long input sequences can be processed in this way, making recurrent neural networks (RNNs) a standard choice for classifying, modeling, or otherwise processing time series data.

[0003] Due to its versatility, the RNN model has been widely studied from a theoretical perspective and widely adopted in practical situations. Two core challenges of RNN appear in these theoretical and practical studies. First, when the task of RNN is to process long input sequences, the performance of most RNNs appears to be significantly degraded. Secondly, when the weights of RNN are quantized to reduce the degree of numerical precision on a dedicated computing device designed to be energy-efficient (e.g., a computing device represented by 8-bit integers instead of 32-bit floating points), the performance of most RNNs also appears to be significantly degraded. The reason for these degradations lies in the fact that the state update of RNN implements a dynamic system, and the behavior of such systems can change chaotically over a long time span (i.e., when the system is driven by a long input sequence) and when the state disturbance is small (i.e., when the parameters of the system are quantized). In order to address these challenges and improve the stability of machine learning models designed to process time series data, many innovative neural network systems have been defined in the prior art. Therefore, the following documents and patents are provided for their supporting teachings, and are all incorporated by reference: https: / / doi.org / 10.1162 / neco.1997.9.8.1735 We discuss a method for adding a gating mechanism to RNN models that allows for more stable and controlled updates to the model's internal state representation, allowing for reliable processing of sequences of up to approximately one thousand input items. Importantly, such gated RNNs are typically slow to train and execute on computational hardware because they are sequence-bottleneck and each sequence update requires O(n) steps. 2) computations, where n is the dimension of the input.

[0004] In another prior art document, https: / / arxiv.org / pdf / 1706.03762.pdf Methods are described for training neural networks to process sequential data at scale by using a purely feed-forward "Transformer" network architecture that exploits attention mechanisms to model the relationships between different sequence elements. Transformers are implemented via a large number of dense matrix multiplications that are almost entirely amenable to GPU-based parallelization, and thus they can be trained on large amounts of data. This scalability combined with the effectiveness of attention mechanisms for learning long-range data dependencies has led to Transformer-based architectures becoming the state of the art for many time series modeling tasks, particularly in the area of ​​natural language processing. However, Transformers are not inherently suited to operating on streaming inputs. Furthermore, these networks are very computationally inefficient, typically requiring a large number of parameters to achieve good task performance. Relatedly, they scale in quadratic O(N) time series with respect to the input sequence length. 2 ) instead of a linear running time operation.

[0005] Prior art papers on the topic of efficient RNN algorithms http: / / compneuro.uwaterloo.ca / files / publications / voelker.2019.lmu.pdf A recurrent neural network architecture is described that couples one or more layers implementing a linear time-invariant (LTI) dynamic system with one or more nonlinear layers to process sequential input data. The weights governing this LTI system are derived analytically to compute optimal delays of input signals over some time window, and the nonlinear components of the network read from the state of this system to compute arbitrary functions of the data in the input window. Because of how LTI systems use Legendre bases to represent data, the resulting network is called a "Legendre memory unit" (LMU), and experimental evidence indicates that the LMU can efficiently handle temporal dependencies spanning hundreds of thousands of time steps, greatly exceeding the capabilities of alternative recurrent network architectures. In general, the LMU is an important example of a linear recurrent network with strong performance characteristics, but it is still limited by the fact that it only implements one specific LTI system, namely a system that implements the mathematically optimal reconstruction of an input signal delayed by some number of time steps for a given number of state variables.

[0006] The methods and systems described in the aforementioned references and many similar references do not specify how to design recursively connected artificial neural networks that implement various linear dynamic systems that compute state updates in linear time. More specifically, the existing state of the art does not provide a means to configure a linear recursive neural network layer to efficiently implement a streaming spectral decomposition of an input signal over a fixed window of input time steps, where such decomposition is encoded by the state of some linear dynamic system driven by a given input signal.

[0007] The present application solves the above-mentioned problems and shortcomings by defining a method and system for improving the efficiency of recursive neural networks by configuring the recursive neural network to implement a linear dynamic system that calculates state updates in linear time. These efficiency improvements arise from defining the weights of the linear recursive neural network layer by first selecting a set of basis functions that define the expected impulse response associated with a particular spectral decomposition, and then deriving a matrix of recursive weights A that produces this impulse response over a time window of a specified length. A second matrix of recursive weights Γ that decays this impulse response to zero outside the time window is also derived, and the recursive weight matrix on the network layer is set equal to the sum of A and Γ. Specifically, for any A matrix that generates a basis as an impulse response, this Γ matrix can be derived, and it is also guaranteed that the product between Γ and the state vector can be calculated within O(n). This general method for deriving Γ provides more freedom than existing work in selecting a set of basis functions generated by the A matrix. Correspondingly, A can also be designed to be calculated within O(n) and is more robust to quantization (in state) and discretization (in time). Summary of the invention

[0008] SUMMARY OF THE INVENTION Linear artificial neural network layers are used to process temporal data.

[0009] In view of the aforementioned limitations inherent in known methods for processing temporal data using artificial neural network layers, the present invention provides methods and systems for improving the efficiency of neural networks by configuring the neural network to implement a linear dynamic system that computes state updates in linear time. These efficiency improvements are achieved by specifying a recursive weight matrix for the network layer that is optimized to compute an impulse response that decays to zero outside a specified time window. Importantly, when the resulting linear recursive neural network layer is applied to a time series of input data elements, each update to the underlying state representation of the layer can be computed in linear time with respect to the dimensionality of these input data elements (in contrast, conventional recursive neural network layers compute such updates in quadratic time). The resulting state representation of the linear recursive layer is then provided as input to at least one nonlinear neural network layer that computes a network output that provides a solution to some interesting computational task involving the original input sequence. Therefore, a general object of the present invention, which will be described in more detail later, is to provide methods and systems for improving the efficiency of neural networks by configuring the neural network to implement a linear dynamic system that computes state updates in linear time. In applications where recursive layers are not required, the methods described herein can be used to derive weights for linear-time convolutional layers that have the same behavior as recursive networks.

[0010] The main aspect of the present invention is to define a method and system for efficiently processing time series data using an artificial neural network model. The method includes: defining at least one linear recurrent or temporal convolutional layer, and defining at least one other layer implementing any nonlinear layer type, such as a perceptron layer, a self-attention layer, a convolutional layer, or a gated recurrent layer. The method further includes defining the recurrent or convolutional weights of at least one linear layer by: (a) selecting a set of basis vectors defining the desired impulse response of this layer, (b) deriving a matrix that produces this desired impulse response over a target time window of length θ, (c) deriving a matrix that decays the impulse response to zero outside the target time window, and (d) combining these two matrices together by addition to obtain the recurrent weights of the layer, or alternatively, using the impulse response of the LTI system obtained by summing two feedback matrices as the convolution kernel of the linear temporal convolutional layer. The method further comprises applying the resulting linear recursive layer to the input data elements of at least one time series to compute at least one state vector, and then applying a non-linear layer to this state vector to produce at least one output data element corresponding to the result of performing at least one pattern classification, signal processing, data representation, or data generation task involving the input data elements of the aforementioned time series.

[0011] In this regard, before explaining in detail at least one embodiment of the present invention, it should be understood that the application of the present invention is not limited to the construction details and component arrangements set forth in the following description or illustrated in the accompanying drawings. The present invention can have other embodiments and can be practiced and carried out in various ways. In addition, it should be understood that the wording and terminology adopted herein are for descriptive purposes and should not be considered as limiting.

[0012] These together with other objects of the invention and the various features of novelty which characterize the invention are particularly pointed out in the present disclosure.For a better understanding of the invention, its operating advantages and specific objects attained by its uses, reference should be made to the accompanying drawings and descriptive matter in which preferred embodiments of the invention are illustrated. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The present invention will be better understood and other objects besides those set forth above will become apparent when considering the following detailed description of the present invention. Such description refers to the accompanying drawings, in which:

[0014] Figure 1 is a graphical representation of different orthonormal basis functions generated as impulse responses of a neural network configured using the methods disclosed herein.

[0015] Figure 2 is a graphical representation of the accuracy of generated impulse responses (relative to a target impulse response) produced by a neural network configured using the methods disclosed herein.

[0016] Figure 3 is a graphical representation of the accuracy of windowed truncated impulse responses (relative to a target impulse response) produced by a neural network configured using the methods disclosed herein.

[0017] Figure 4 is a graphical representation of the accuracy of signal delays computed by different recurrent neural network layers configured using the methods disclosed herein.

[0018] Figure 5 is a graphical representation of the accuracy of signal delay on a per time step basis over the delay window computed by different recurrent neural network layers configured using the methods disclosed herein. DETAILED DESCRIPTION

[0019] In the following specific embodiments, reference is made to the accompanying drawings which form part of this description, and in which specific embodiments in which the present invention may be practiced are illustrated by way of illustration. These embodiments are described in sufficient detail to enable those skilled in the art to practice the present invention, and it should be understood that these embodiments may be combined, or other embodiments may be utilized, and structural and logical changes may be made without departing from the spirit and scope of the present invention. Therefore, the following specific embodiments should not be considered in a restrictive sense, and the scope of the present invention is limited by the appended claims and their equivalents.

[0020] The invention has been briefly described with reference to the accompanying drawings. Reference will now be made in more detail to the accompanying exemplary drawings for the purpose of illustrating non-limiting embodiments of the invention.

[0021] As used herein, the term "comprising" and its derivatives including "comprises" and "comprise" include each of the stated integers or elements but do not exclude the inclusion of one or more additional integers or elements.

[0022] As used herein, the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise. For example, reference to "a device" encompasses a single device as well as two or more devices, etc.

[0023] As used herein, the terms "for example," "similar," "such as," or "including" are meant to introduce examples that further illustrate a more general subject matter. Unless otherwise specified, these examples are provided merely as an aid to understanding the applications described in the present disclosure and are not meant to be limiting in any way.

[0024] As used herein, the terms “may,” “can,” “could,” or “might” are included or have a characteristic, and a specific component or feature is not required to be included or have the characteristic.

[0025] Exemplary embodiments will be described more fully hereinafter with reference to the accompanying drawings, in which exemplary embodiments are shown. These exemplary embodiments are provided for illustrative purposes only, and thus this disclosure will be thorough and complete, and will fully convey the scope of the invention to those of ordinary skill in the art. However, the disclosed invention may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein.

[0026] Various modifications will be apparent to those skilled in the art. Without departing from the spirit and scope of the present invention, the general principles defined herein may be applied to other embodiments and applications. In addition, all statements of embodiments of the present invention and their specific examples described herein are intended to cover both their structural and functional equivalents. In addition, such equivalents are intended to include both currently known equivalents and equivalents developed in the future (that is, any element of the performance of the same function developed, regardless of the structure). In addition, the terms and wordings used are for the purpose of describing exemplary embodiments and should not be considered restrictive. Therefore, the present invention will be given the widest scope of many alternatives, modifications and equivalents consistent with the disclosed principles and features. For the sake of clarity, the details related to the technical materials known in the technical field related to the present invention are not described in detail, so as not to unnecessarily obscure the present invention.

[0027] Therefore, for example, it will be appreciated by those skilled in the art that diagrams, schematic diagrams, diagrams, etc. represent and illustrate the concept diagram or process of embodying the system and method of the present invention.The functions of the various elements shown in the figure can be provided by using dedicated hardware and the hardware capable of executing the associated software.Similarly, any switch shown in the figure is only conceptual.Their functions can be performed by the operation of program logic, by dedicated logic, by the interaction of program control and dedicated logic, or even manually, and specific techniques can be selected by the entity implementing the present invention.It is also understood by those skilled in the art that the exemplary hardware, software, process, method and / or operating system described herein are for the purpose of illustration, and are therefore not intended to be limited to any specific named element.

[0028] Each of the appended claims defines a separate invention, which for infringement purposes is recognized as including equivalents to the various elements or limitations specified in the claims. Depending on the context, in some cases, all references below to the "invention" may refer to only certain specific embodiments. In other cases, it will be recognized that references to the "invention" will refer to subject matter recited in one or more, but not necessarily all, of the claims.

[0029] Unless otherwise indicated herein or otherwise clearly contradicted by context, all methods described herein may be performed in any suitable order. The use of any and all examples or exemplary language (e.g., "such as") provided with respect to certain embodiments herein is intended only to better illustrate the present invention and is not intended to limit the scope of the present invention otherwise claimed. No language in the specification should be construed to indicate that any unclaimed element is essential to the practice of the present invention.

[0030] Various terms used herein are listed below. To the extent a term used in a claim is not defined below, it should be given the broadest definition persons in the relevant art have given that term as reflected in printed publications and issued patents at the time of filing.

[0031] The grouping of the alternative elements of the present invention disclosed herein or embodiments should not be construed as limiting.Each group member can be individually, or with other members of the group or other elements found herein, be mentioned and claimed in any combination.For convenience and / or patentability reasons, one or more members of the group can be included in the group or deleted from the group.When any such inclusion or deletion occurs, this specification is considered to contain the group modified in this article, therefore satisfies the written description of all groups used in the appended claims.

[0032] For simplicity and clarity of description, numerous specific details are set forth in order to provide a thorough understanding of the exemplary embodiments described herein. However, one of ordinary skill in the art will appreciate that the embodiments described herein may be practiced without these specific details. In other cases, well-known methods, procedures, and components are not described in detail in order to avoid obscuring the embodiments generally described herein.

[0033] Furthermore, this description should not be considered to limit the scope of the embodiments described herein in any way, but rather to merely describe implementations of the various embodiments as described.

[0034] Embodiments of the artificial neural network described herein can be implemented in configurable hardware (i.e., FPGA) or custom hardware (i.e., ASIC) or a combination of both with at least one interface. Input signals are consumed by digital circuits to perform the functions described herein and generate output signals. The output signals are provided to one or more adjacent or surrounding systems or devices in a known manner.

[0035] As used herein, the term 'node' in the context of artificial neural networks refers to a basic processing element that implements functionality simulating a 'neuron', which may be a spiking neuron, a continuous rate neuron, or any linear or nonlinear component used to construct a distributed system.

[0036] The described system can be implemented using either adaptive or non-adaptive components. The system can be effectively implemented on various distributed systems including a large number of nonlinear components whose individual outputs can be combined together to implement certain aspects of the system, as will be described more fully herein below.

[0037] The main embodiment of the present invention is a set of systems and methods for efficiently processing time series data using an artificial neural network model. The method includes: defining at least one linear recursive or linear-time convolutional layer, and defining at least one other layer that implements any nonlinear layer type, such as a perceptron layer, a self-attention layer, a convolutional layer, or a gated recursive layer. The weights of at least one linear layer are configured by first selecting a set of basis vectors that define a desired impulse response, and then deriving a matrix that produces this desired impulse response over a target time window of length θ. Next, a second matrix that decays this desired impulse response to zero anywhere outside the target time window of length θ is derived, and the connection weights of the linear layer are set to be equal to the sum of the two matrices in the case of a linear recursive layer, or equal to the impulse response of the corresponding LTI system in the case of a linear-time convolutional layer. The method for operating the resulting linear neural network layer includes: applying it to the input data elements of at least one time series to calculate at least one state vector, which is iteratively updated as each item in the input sequence is provided to the layer. The methods further comprise applying at least one nonlinear layer to the state vector to produce at least one output data element that solves at least one pattern classification, signal processing, data representation, or data generation task involving the time series of input data elements.

[0038] The term 'artificial recurrent neural network model' refers herein to an artificial neural network model that contains at least one set of weighted connections that transmit the output of one or more nodes in a given network layer back as input to one or more nodes in the same layer. These weighted connections are called 'recursive connections', and they typically introduce complex state dynamics into the artificial neural network model because the node outputs of the model can evolve dramatically over time as a result of the feedback loops introduced by the recursive connections. Standard implementations of artificial recursive neural network models perform O(n) computations relative to the length of the input sequence to which they are applied, and O(n) computations relative to the dimensionality of each item in this input sequence. 2 ) calculations.

[0039] The term 'activation function' refers herein to any method or algorithm for applying a linear or nonlinear transformation to an input value in an artificial neural network to produce an output value. Examples of activation functions include identity, rectified linear, leaky rectified linear, threshold rectified linear, parameter rectified linear, sigmoid, tanh, softmax, log softmax, max pooling, polynomial, sine, gamma, soft sign, heaviside, swish, exponential linear, scaled exponential linear, and Gaussian error linear functions. The term 'linear network layer' refers herein to any layer that uses a linear activation function (such as an identity function) in an artificial neural network to calculate its output value.

[0040] The activation function may optionally output a 'spike' (i.e., a single-bit event), a 'multi-valued spike' (i.e., a multi-bit event with a fixed or floating bit width), a continuous quantity (i.e., a floating point value with a certain level of precision determined by a given computing system - typically 16, 32, or 64 bits), or a complex value (i.e., a pair of floating point numbers representing rectangular or polar coordinates). Those of ordinary skill in the art typically refer to these above-mentioned functions as 'spiking', 'multi-bit spiking', 'non-spiking', and 'complex-valued' neurons, respectively. When spiking neurons are used, real and complex values ​​may also be represented by one of any number of encoding and decoding schemes involving the relative timing of spikes, the frequency of spikes, and the phase of spikes. However, those of ordinary skill in the art will appreciate that the embodiments described herein may be practiced without these specific details.

[0041] The term 'dynamic system' refers herein to any system in which the state of the system can be characterized using a set of numbers corresponding to points in a geometric space and in which functions are defined relating this system state to its own derivative with respect to time. In other words, a dynamic system contains a state space and functions that define transitions between states over time. The term 'linear time-invariant dynamic system' refers to a specific class of dynamic systems for which the relationship between the input to the system and its output at a given time is a linear mapping; furthermore, this mapping is time-invariant in the sense that a given input will be mapped to the same output, regardless of the time at which the input is applied. LTI systems have the advantage of being relatively easy to analyze mathematically compared to more complex nonlinear systems. In the context of the present invention, a particularly important form of mathematical analysis specifies how to write the state update equations for an LTI system in a non-sequential form. All linear recurrent neural network layers implement LTI systems, where the configuration of the connection weights of the layer determines which specific LTI system it implements. Therefore, all linear recurrent neural network layers also implement dynamic systems.

[0042] The term 'impulse response' refers in this article to the mathematical description of the output of an LTI system in response to an instantaneous input of unit amplitude. The impulse response of a dynamic system more generally defines its behavior as a function of time under specific input conditions. For any LTI system, the behavior of the system can be fully characterized in terms of its impulse response, since an instantaneous pulse of unit amplitude contains all possible combinations of input frequencies and thereby excites the system's response to all possible input frequencies. Due to the constraints of linearity and time invariance, the response thus exhaustively defines the behavior of the system over time for all possible inputs. Mathematically, an LTI system is characterized in terms of an input u(t), which is mapped by a matrix B to produce a state representation m(t), which in turn is mapped by a recursive matrix A such that the instantaneous change in m is described by the following relationship:

[0043]

[0044] The term 'basis vector' refers to a vector belonging to a set of vectors across a given vector space in this article. The term 'a set of basis vectors' refers to a set of basis vectors in this article, for which the individual vectors in this set cannot be expressed as a linear combination of any of the other vectors in the set. The term 'basis function' refers to a function belonging to a set of functions that similarly span a given function space in this article. The term 'spectral decomposition' refers to a process of taking a sliding window on a time-varying one-dimensional signal and decomposing the signal in this window into a weighted combination of a set of basis functions or basis vectors of a certain selection in this article. Typically, these basis functions or basis vectors correspond to different signal frequency components present in the sliding window, in which case the basis is a Fourier basis. Other common choices of basis include cosine functions (i.e., "cosine basis") and a set of orthogonal Legendre polynomials (i.e., "Legendre basis") in a frequency range. Other polynomials that can be used as basis include Legendre, Chebyshev, Laguerre, Hermite and Jacobi polynomials.

[0045] The nonlinear components of the above-mentioned system can be implemented using a combination of adaptive and non-adaptive components. Examples of nonlinear components that can be used in various embodiments described herein include simulated / artificial neurons, FPGAs, GPUs, and other parallel computing systems. The components of the system can be implemented using various standard techniques (such as by using a microcontroller). In addition, the nonlinear components can be implemented in various forms including software simulation, hardware, or any neuronal structure. The nonlinear components can also be implemented using neuromorphic computing devices (such as Neurogrid, SpiNNaker, Loihi, and TrueNorth).

[0046] As an illustrative example of the proposed system and method, consider the challenge of constructing an LTI system that approximates a sliding window spectrum in an arbitrary basis. In canonical form, such an LTI system can be described in terms of the system input u, which is mapped through matrix B, and the system state at each time step is mapped through the recurrence matrix A. To implement an LTI system with q orthonormal basis functions b i As the impulse response of the LTI system over the target window [0, θ], the state m(t) of the system can then be described in terms of the following integral:

[0047]

[0048] where τ is the integration variable over all possible displacements relative to t. Another way to interpret m(t) is as a compressed representation of u[t - θ, t]. That is, implementing the q time basis functions as an LTI system continuously compresses u[t - θ, t] into the q-dimensional vector m(t). For q → ∞, m(t) represents all the information in the windowed input signal u[t - θ, t]. Correspondingly, by applying a non-linear transformation to m(t), any non-linear function on y[t - θ, t] can be computed. For example, it can represent m in a neural network and decode the function f(m).

[0049] Reference Figure 1 , if q is set to six and the Fourier series is used as the basis, then m(t) is a linear combination of sine and cosine functions

[101] , which reconstructs the signal u over a window of length θ. Alternatively, if the cosine series

[102] or Legendre polynomials

[103] are used as the basis, then m(t) is again a linear combination of basis functions that optimally reconstructs the signal u over a window of length θ, but uses a different basis in each case. Importantly, the A and B matrices of the LTI system that generates the above basis can be derived using only q state dimensions over N time steps. Consider the orthonormal basis transformation matrix M ∈ R q×N . The i-th column of M (where i ∈ {1, …, N}) (denoted as m i ) is the q-dimensional vector that describes the impulse response of the desired system at t = Δti, where Δt = θ / N. If the state evolution is indeed the result of a time-invariant linear process, then for all 1 ≤ i < N, with m0 = B , where B describes the effect of the initial impulse on the state, and A is the state transition matrix. It is found that the matrix A with this property can be written as a linear least squares problem:

[0050]

[0051] This is a standard autoregressive linear model, and derivatives of a continuous basis can be used instead of difference quotients, yielding A and B as a result of discretizing the LTI system using the zero-order hold assumption: Where 'log' is the matrix logarithm, which is the inverse operation of taking the matrix exponential. Figure 2 , this method of deriving A and B produces the desired LTI system impulse response for each of the Fourier basis

[201] , cosine basis

[202] , and Legendre basis

[203] , with varying degrees of error.

[0052] However, the impulse response produced from this derivation of A and B is not restricted to a target window of length θ. In order to restrict the response to this window, a delayed version of the input signal u(t-θ) can be decoded from the system state m(t). In addition, the specific contribution m(t) of u(t-θ) to m(t) can be calculated. Subtracting m(t) from m(t) effectively 'erases' any information about u(t-θ) from the state vector, resulting in a fast decaying and almost finite impulse response. The resulting 'information erased' update is linear and can be expressed as a rank one matrix Γ. Reference Figure 3 , shows the effect of this 'information erasure' procedure on an LTI system that generates a modified Fourier basis

[301] , a cosine basis

[302] , and a Legendre basis

[303] . To generate the modified Fourier basis, the oscillations of the Fourier basis are slowed down by 10%, making the basis non-periodic and compatible with information erasure. This new modified Fourier basis is no longer orthogonal and is therefore theoretically suboptimal for information. For the modified Fourier and Legendre bases, the method does approximate a rectangular window, but introduces ringing artifacts. The method stabilizes the cosine basis, but there are still residual oscillations for t>θ - this is probably because the cosine basis is not well implemented by the underlying LTI system.

[0053] In theory, the different function bases just discussed have the same expressive power. In continuous form, they span the function space L 2 (0,θ), and in the discrete case, they span the N-dimensional vector space R N . However, if the basis is truncated to include only q terms, especially when the basis is generated as the impulse response of an LTI system of order q, differences arise as to the accuracy with which the function can be decoded. One way to quantitatively characterize these differences involves measuring how accurately a delayed version of the input signal u(t) is decoded from the system state m(t). Therefore, results from a number of benchmark experiments are described below to provide a demonstration of the methods and systems disclosed herein for processing temporal data using recursively connected artificial neural networks. References Figure 4, a one second delay is calculated from m(t) using a dynamic system that computes a low pass filter on the input signal

[401] , and a system that computes impulse responses corresponding to a modified Fourier basis

[402] , a cosine basis

[403] , and a Legendre basis

[404] . The modified Fourier basis provides the lowest overall decoding error level, improving by more than 25% over the cosine and Legendre bases. Reference Figure 5 , at different values ​​of q and using different methods of truncating the impulse response of the system to a target window length, the accuracy of calculating a one-second delay on a per time step basis using the Fourier basis, the cosine basis, the modified Fourier basis, and the Legendre basis can also be compared. The use of the ideal truncated impulse response

[501] understandably produces the lowest overall error level for all bases, and in the case of the modified Fourier basis, the use of the approximate Bartlett window truncated response

[502] produces low errors, but higher error levels for the other bases. Finally, the use of the information erasure method

[503] results in the modified Fourier basis producing the lowest overall error level. It is noteworthy that the Legendre basis provides only a slightly higher error level, but is much more accurate in reconstructing inputs from the early delay period than from the late delay period; in contrast, the modified Fourier basis is more uniformly accurate across all points in the delay period. Overall, these analyses clearly demonstrate the advantages of the proposed method and system for efficiently processing time series data.

[0054] It should be understood that the above description is intended to be illustrative rather than restrictive. For example, the embodiments discussed above can be used in combination with each other. After reading the above description, many other embodiments will be apparent to those skilled in the art.

[0055] The benefits and advantages that can be provided by the present invention have been described above for specific embodiments. These benefits and advantages and any elements or limitations that may cause them to occur or become more significant should not be interpreted as key, essential or necessary features of any or all of the embodiments.

[0056] Although the present invention has been described with reference to specific embodiments, it should be understood that the embodiments are illustrative and the scope of the present invention is not limited to these embodiments. Many changes, modifications, additions and improvements can be made to the above-mentioned embodiments. It is expected that these changes, modifications, additions and improvements fall within the scope of the present invention.

Claims

1. A computer-implemented method for efficiently processing time series data using an artificial neural network model, comprising: a. defining at least one linear layer having an input of one or more dimensions; this linear layer can be implemented as a recursive linear layer, or as a linear-time convolutional layer; b. defining at least one other layer implementing any non-linear layer type, such as a perceptron layer, a self-attention layer, a temporal convolutional layer, or a gated recurrent layer; c. defining the recursive and input weights of the at least one linear recursive layer or the weights of the linear-temporal convolutional layer by: i. selecting a set of basis vectors defining the desired impulse response of the at least one linear recursive layer over a time window of length θ; ii. deriving a matrix of recursive weights A that produces the desired impulse response over the time window of length θ, such that the product of at least one vector and the matrix A can be calculated in O(n) time, where n is the dimension of the at least one vector; iii. deriving a matrix of recursive weights Γ that decay the impulse response to zero outside the time window of length θ, so that the product of at least one vector and this matrix Γ can be calculated in O(n) time, where n is the dimension of the at least one vector; iv. setting the recursive weight of the at least one linear recursive layer to the sum of the weight A and the weight Γ, or setting the weight of the linear temporal convolutional layer to the impulse response of the LTI system defined by the sum of the weight A and the weight Γ; d. applying the at least one linear layer to the input data elements of the at least one time series to calculate at least one state vector representing the input data elements of the at least one time series as a linear combination of the aforementioned basis vectors; e. Applying the at least one nonlinear layer to the at least one state vector to produce at least one output data element, thereby performing at least one pattern classification, signal processing, data representation or data generation task involving the at least one time series of input data elements.

2. The method according to claim 1, wherein the basis function is a modified Fourier basis, a cosine basis, a Haar basis, a Legendre basis, a Chebyshev basis, a Laguerre basis, a Hermite basis or a Jacobi basis.

3. The method of claim 1, wherein one or more layers are implemented as a spiking neural network. The method of claim 1 , wherein the length of the window is adaptively adjustable during execution of the network. The method of claim 1 , wherein the window allows for arbitrary weighting.

6. A system for efficiently processing time series data using an artificial neural network model, the system comprising: a. at least one linear layer having a weight matrix configured according to claim 1; and b. implementing at least one other layer of any non-linear layer type, such as a perceptron layer, a self-attention layer, a temporal convolutional layer, or a gated recurrent layer; The system is operated to perform at least one pattern classification, signal processing, data representation or data generation task by first passing at least one time series of input data elements through the at least one linear layer to calculate at least one state vector, and then passing this at least one state vector through the at least one non-linear layer to produce at least one output data element, thereby performing at least one pattern classification, signal processing, data representation or data generation task involving the at least one time series of input data elements.

7. The system of claim 6, wherein one or more layers are implemented as a spiking neural network.

8. The system of claim 6, wherein the length of the window is adaptively adjustable during execution of the network.

9. The system of claim 6, wherein the window allows for arbitrary weighting.