HiPPO (high-order polynomial projection operators) is a framework for compressing an evolving signal's past into polynomial coefficients. A Legendre Memory Unit (LMU) is a recurrent neural-network architecture with a Legendre-based memory cell. For a quant processing a long stream of observations, the attraction is a fixed-size history representation. That alone says nothing about forecast accuracy. Gu et al. (2020) formulate the projection framework; Voelker, Kajić and Eliasmith (2019) introduce the LMU.
What the coefficients remember
Choose a weighting measure over the past and retain polynomial basis functions. The target is the orthogonal projection that minimises weighted squared reconstruction error. For an orthonormal basis and measure ,
The choice of measure decides which parts of history matter. HiPPO derives coefficient dynamics that can be discretised into online recurrences. HiPPO, §§2.1–2.4.
A two-number memory you can inspect
Freeze time and use a synthetic, dimensionless history on , weighted uniformly. Here runs from the beginning to the end of this fixed interval. Take
These functions have unit squared integral and zero cross-inner-product. Their coefficients are
The first coefficient carries the mean level. The second carries the linear variation around it:
At the contributions are ; at they are . Keeping only the mean instead gives integrated squared error . Keeping both gives zero error.
Original dimensionless example. The two component curves sum to the input; the exact fit is possible because this input is already a degree-one polynomial.
This exact reconstruction works because the input already lies in the retained polynomial space. Two coefficients cannot preserve an arbitrary history. This is a static projection illustration, not a simulation of a HiPPO transition or trained LMU.
The interval changes as observations arrive
Translated Legendre (LegT) weights a fixed recent window . Its update approximates the unavailable departing observation using the compressed history. Scaled Legendre (LegS) weights all of uniformly and rescales the basis as that interval grows; its continuous dynamics contain a factor. Thus “Legendre memory” does not specify one universal lookback or transition matrix. HiPPO, §2.3, §3 and Appendix D.1.
Where the LMU fits
The original LMU predates HiPPO. Its linear memory obeys
where sets a sliding-window timescale. Discretisation gives a recurrent update. The architecture couples this memory to a learned nonlinear hidden state and learned encoders; the signal written to memory can itself be a learned combination of inputs and prior states. The paper allows training memory parameters, but does not require it in its experiments. A fixed polynomial projection is therefore only part of the architecture. LMU, §2, equations (1)–(7), and §3 initialisation.
HiPPO recovers the LMU's core update through its LegT construction, with the appropriate basis scaling. LegS is a different history-weighting choice. HiPPO, §2.3 and Appendix D.1.
For financial sequence work, separate reconstruction quality from predictive relevance: retaining a past path accurately does not establish that it contains a tradable signal. Define the time coordinate explicitly—event number and elapsed clock time weight market history differently. At a forecast origin, update memory only with information already available then; fitting encoders and choosing memory size also belong inside the training period.
For the mathematical foundation, the SelfMadeQuant lesson Orthogonal Projections and Minimization Problems develops closest-point geometry. Recurrent Networks for Structured Data explains the state and gradient path of a recurrent neural network. Both offer public previews; full lessons require membership.
Sources
- Gu, Dao, Ermon, Rudra and Ré (2020), HiPPO: Recurrent Memory with Optimal Polynomial Projections, §§2–3 and Appendix D.1.
- Voelker, Kajić and Eliasmith (2019), Legendre Memory Units: Continuous-Time Representation in Recurrent Neural Networks, §2 and §3 initialisation.