Manuscript Offprint
arXiv:2610.28771Motion Equivariant Convolutional LSTM: When Motion Becomes a Gauge Symmetry
Abstract
Objects move, cameras pan, and weather drifts with the wind: much of what changes in sequential data is motion. Motion changes where things are, not what they are, and is therefore a symmetry of the data. Yet standard recurrent networks are not equivariant to it: their memory stays put while the input moves on. Flow equivariant recurrent networks first brought this symmetry into sequence models, for motions of constant velocity, or flows, by enumerating a bank of velocities. We extend this idea in three directions: from simple recurrent networks to convolutional LSTMs, from flows to motions whose velocity changes in time, and from enumerating velocities to estimating them. Treating a sequence as a field over time, we show that motion becomes a gauge symmetry: a global symmetry made local in time. Built on this view, our motion equivariant convolutional LSTM (MELSTM) uses its velocity model as the gauge field and is provably equivariant to every motion. Across future-frame prediction, classification of digits visible only through their motion, and action recognition under camera shake, MELSTM outperforms a convolutional LSTM and its flow equivariant counterpart with the same number of parameters: it is more accurate, generalizes to longer horizons and to unseen motions, and carries a fraction of the flow equivariant model's state.
1 Introduction
Symmetry is one of the most effective inductive biases in machine learning. A model is equivariant if transforming its input transforms its output in the same way, so that its response to every transformed input follows from its response to the original. Equivariance is usually built in by constraining the weights. A linear map between fields is equivariant to translations exactly when it is a convolution, whose weights are shared across positions (LeCun et al., 1989; Kondor & Trivedi, 2018), and equivariant to when its kernel also satisfies a steerability constraint (Cohen & Welling, 2017; Weiler & Cesa, 2019; Cohen et al., 2019a). The same principle yields group convolutions (Cohen & Welling, 2016), convolutions on general Lie groups (Finzi et al., 2020), and gauge equivariant convolutions on manifolds (Cohen et al., 2019b; Weiler et al., 2026); Bronstein et al. (2021) give a unified account. When the data have the symmetry, equivariance provably improves generalization and sample efficiency (Elesedy & Zaidi, 2021; Bietti et al., 2021). In almost all of this work, however, the symmetry is static: when the input is a sequence, every frame is transformed in the same way.
Flow (v constant)
Motion ( time-dependent)

Figure 1: Hidden-state transport under RNN, Flow Equivariant RNN (FERNN), and Motion Equivariant RNN (MERNN) models. The first row shows the transformed input, in the flow column and in the motion column. Here an MNIST digit undergoes two simultaneous changes: a geometric transformation along the group orbit (the motion, which differs across columns) and an intrinsic appearance change transverse to the group action (identical across columns). The second row shows the hidden state of an untrained leaky accumulator, ( ), which can be viewed as a convolutional RNN, , with kernels and . The third row shows FERNN's hidden state, which is lifted to velocity copies and evolves as ; we show the copy of maximum energy, i.e., the copy with the largest . The fourth row shows MERNN's hidden state, , where is the transport operator and is the digit's velocity at time . Matched transport stacks evidence into a sharp digit at the true location, whereas mismatched transport leaves a decaying ghost trail along the residual motion.
Sequential data transform in time: objects move and turn, cameras pan and shake, and weather systems drift with the wind. The transformation that relates a sequence to its transformed copy is then not one group element but a path in . These paths form the group of dynamical symmetries (Section 2), which contains the static, or global, symmetries as constant paths, the flows as paths of constant velocity, and the motions as continuous paths whose velocity may change in time. A recurrent model with -equivariant layers, such as the convolutional LSTM (LSTM; Shi et al., 2015) with steerable kernels, is equivariant to the constant paths but not, in general, to the others: it updates its memory in place rather than transporting it, so a moving input leaves a decaying trail in the hidden state (Figure 1, second row). One may ask whether flow or motion equivariance can also be obtained by constraining the weights. On space-time, flows of translations are Galilean boosts , whose orbits are entire time slices, so the steerability constraint forces a space-time kernel to be constant in space at every nonzero time lag; Lorentz boosts, in contrast, have hyperbolic orbits, and Lorentz invariant kernels can vary in space (Remark 1). For the LSTM, flow equivariance restricts the kernels to a set of measure zero (Proposition 1). The weights alone cannot provide this symmetry: the memory itself has to move with the input.
Keller (2025) took the first step beyond static symmetries with flow equivariant RNNs (FERNNs). FERNN lifts the hidden state to a bank of copies, one for each velocity of a fixed lattice and each moving with it, so an input moving with velocity is static in copy and accumulates there as if it did not move. Flows are, however, a narrow class. They form a group only when G is abelian (Lemma 1); when the velocity changes, the content of one copy is handed over to another and the history accumulated in the first is lost (Figure 1, third row); and the bank must enumerate every velocity the data may contain, which multiplies the size of the state and leaves velocities outside the lattice unrepresented.
We take a different route: rather than enumerating velocities, we estimate them. A velocity model, trainable or parameter-free, reads the sequence and returns at every step a Lie algebra element , which generates a transporter that carries the hidden and cell states from one step to the next (Figure 1, fourth row). The resulting motion equivariant LSTM (MELSTM) is equivariant to all motions, provided the velocity model transforms as when its input is transformed by a motion (Theorem 2). This is the transformation law of a gauge connection. In physics, making a global symmetry local, so that the transformation may vary from point to point, requires a connection and the parallel transport it defines (Yang & Mills, 1954; Nakahara, 2003). Time-dependent transformations are the global symmetries made local in time: a sequence is a section of a bundle over the time axis, motions act on it as gauge transformations, the velocity model is a connection, and the transporter is its parallel transport (Appendix A.8). Gauge equivariant networks apply the same principle in space, to the choice of frame on a manifold (Cohen et al., 2019b; Weiler et al., 2026); here the gauge freedom is the choice of frame at each instant.
So far, a single motion acts on the whole frame. Scenes, however, usually consist of many independent motions: objects move on their own, against a background that moves with the camera. The symmetry is then a local motion, which moves each component by its own motion, and a motion equivariant model that respects superposition is also equivariant to local motions (Section 3). MELSTM represents such scenes with a few slots, each transported by its own velocity. With slot tracking, each slot estimates this velocity by matching its own hidden state against the incoming frame, so the scene is segmented within the state and no correspondence between frames has to be solved (Appendix B.1.4). Our contributions are:
• Weight constraints are not enough. With steerable kernels, the LSTM is globally G-equivariant, yet it is flow equivariant only for a measure-zero set of local kernels. For space-time convolutions, Galilean steerability forces the kernel to be constant in space at every nonzero time lag (Proposition 1, Remark 1, Appendices A.2–A.3).
• Flow equivariance by lifting. Flows form a group only when G is abelian (Lemma 1). We characterize the equivariant linear maps between transport fields and, for an abelian subgroup , build from them FELSTM, a flow equivariant LSTM; the proof of its equivariance isolates the single step that requires constant velocity (Theorem 1, Appendices A.4–A.5).
• Motion equivariance by transport. A transporter is motion equivariant if and only if its velocity transforms as a gauge connection, and MELSTM, which transports its states with such a transporter, is equivariant to all motions, which act on the data as gauge transformations over the time axis (Theorem 2, Appendices A.6–A.8).
• Local motions. A motion equivariant model that respects superposition is also equivariant to local motions, which move the components of a scene independently (Section 3). MELSTM represents such scenes with a few transported slots, each estimating the velocity of its own content, which removes the correspondence problem of frame-to-frame motion estimation (Appendix B.1.4).
• Experiments. We compare LSTM, FELSTM and MELSTM at equal parameter counts on three tasks with time-dependent motion: future-frame prediction on Moving MNIST (Srivastava et al., 2015), classification of Motion-Only MNIST digits, which no single frame reveals because only the common fate of their pixels defines them (Upadhyay et al., 2026), and action recognition on KTH (Schuldt et al., 2004) under a shaking camera. Since FELSTM is flow but not motion equivariant, the comparison isolates what a changing velocity costs a flow equivariant model. MELSTM is the most accurate model on all three tasks and the only one whose performance does not degrade when the motion statistics change; on Moving MNIST, it trains about six times faster per epoch than FELSTM and extrapolates to 8.5 times the trained horizon with 37 times lower error (Section 5). Code is available at https://github.com/VahidHosseinzadeh/MELSTM.
Section 6 discusses related work and future directions.
This static setup can be generalized to the case of time dependent signals or trajectories , which map time to a function . We denote the space of time dependent signals by . The natural question is how to generalize the static symmetries to this dynamical setting. The most general way is to extend the group to a group of time dependent transformations where at each time , we have a group element , and the group composition is defined pointwise . Now the action of a time dependent transformation on a time dependent signal is given by
This defines a dynamical symmetry, where transformations may vary arbitrarily over time.
Motions . While allows arbitrary time dependence, many physically and geometrically meaningful transformations are obtained by imposing regularity conditions such as continuity or smoothness. A continuous map , with a topological group, is called a motion. When is a Lie group, we assume a motion is differentiable and generated by a time-dependent Lie algebra valued function , which can be interpreted as the velocity of the motion. The evolution is governed by with initial condition , where is the identity element of . The motion generated by can be expressed as a time-ordered exponential, defined as the continuum limit of an ordered product of infinitesimal exponentials:
where and . Note that the composition of two motions and the inverse of any motion are again motions. Therefore the set of motions is a subgroup of , denoted . A proof appears in Appendix A.1.
Flows . An interesting subset of motions are motions with constant velocity for all . We call these motions flows and denote them by . In this case, equation (3) reduces to . Equivalently, flows are motions that correspond to continuous group homomorphisms from , viewed as the additive abelian group of time translations. The group homomorphism condition implies , which follows directly from equation (3) as well. Note that flows form a subgroup of if and only if is an abelian group. See Appendix A.1 for proof.
Global symmetries . The group contains the subgroup of time-independent transformations, i.e., constant functions for all , which we call global transformations. This subgroup is isomorphic to , with elements denoted simply by where it acts uniformly across time via .
Discrete vs Continuous time. In practice we often have a finite sample from the trajectory as . The definitions of symmetries and equivariance can be adapted to this setting by replacing with the discrete set and considering functions . The same classification into motion, flow and global symmetries applies in the discrete case as well. In the case of motions we have the recursive relation with or equivalently for a sequence of velocities , which is the discrete analogue of equation (3). In the case of flows we have .
3 Spatiotemporal data and Equivariant Sequential Models
Spatial data and convolution. The formalism above is general and applies to any type of data and symmetries. However, here we focus on spatiotemporal data where the domain of signals is , the feature space is , and is the space of square-integrable functions on with values in
. The group is typically spatial translations , (including rotations), or more generally where is a subgroup of . We consider regular fields where the group action is defined as for . Note that this means we have a direct sum of number of scalar regular fields as the channels are not mixing under the group action.
Now, consider a linear map from a regular field to another regular field in via an integral operator with kernel . For this map to be equivariant, it must be a convolution
with a kernel satisfying the steerability constraint for all and . For instance, when , the equivariant map is standard convolution with no kernel constraints, while for , it is convolution with a rotation invariant kernel for all .
Spatiotemporal data and equivariant sequential models. We model spatiotemporal data as a trajectory , where is the space of regular fields. In discrete time, the temporal domain is replaced by and the trajectory is represented by the sequence where each is a spatial field at time . Given the action of on , we obtain an induced action of the trajectory group on the trajectory space defined by
for and .
A sequential model is a map that takes as input the history and outputs a regular field . Such a representation may then be used for forecasting, sequence classification, or other downstream tasks. We say that the model is motion equivariant if
Similarly, replacing with or yields the notions of flow equivariance and global G-equivariance, respectively.
Local motion equivariance. The transformations above act on the whole signal at once. In practice, however, the data of interest is often a superposition of several objects, each carrying its own motion. Given a decomposition and a tuple , a local motion acts by , and we speak of a local flow when every is a flow. Now suppose that the model respects the superposition property, in the sense that . Then, if the model is motion equivariant in the sense above, it is automatically equivariant under local motions as well:
where the first equality uses the superposition property and the second uses motion equivariance.
4 Motion Equivariant Convolutional LSTM
LSTM. The Convolutional LSTM (LSTM) (Shi et al., 2015) is a first-order Markovian recurrent model with two state variables, the cell state and hidden state , evolving according to
(10) where denotes element-wise multiplication, are the input, forget, output, and cell gates, and the nonlinearity is for and for .
The LSTM is globally G-equivariant when the convolutional kernels and are chosen to satisfy the appropriate steerability constraints for the group G. See Appendix A.2 for detailed statements and proof.
The LSTM, however, is not flow equivariant for generic kernels (Proposition 1, Appendix A.3). The obstruction is structural: LSTM updates its memory in place rather than transporting it with the flow. As illustrated for a simple RNN in the second row of Figure 1, this leaves a decaying trail, or left-behind memory, instead of transporting the accumulated state with moving features. The appendix shows that eliminating this residual memory requires an exact cancellation among the local convolution kernels, satisfied only by a measure-zero set of parameters. Transporting the hidden and cell states with the flow removes this obstruction, motivating the architectures introduced next.
Channel based flow equivariant LSTM (FELSTM). In this section, following the Flow Equivariant RNN (FERNN) introduced by Keller (2025), we introduce the channel based FELSTM, a generalization of the LSTM architecture that achieves flow equivariance by lifting the regular fields on M to the larger space . In particular the gate variables transform under G as
and the state variables transform as
We refer to the transformation as transport conjugation, and fields on whose transformation law involves this action on the velocity coordinate are called transport fields. As we saw earlier, is a group (subgroup of ) if and only if is abelian (see Lemma 1). So for general non-abelian groups, we restrict to an abelian subgroup and build the flow equivariant model for as the symmetry group. Therefore we lift to transport fields on and modify update equations as follows
for all and . Here is the flow-lifting convolution operator which is an equivariant linear map that lifts the input signal to the transport field space. It turns out that this map is simply given by copying the steerable convolution to all the channels indexed by as follows . Also is the flow convolution which is an equivariant linear map between transport fields and it is defined as follows
where the kernel W must additionally satisfy a steerability constraint in its spatial argument. See Appendix A.4 for the details of the proof of equivariance.
Theorem 1 (FELSTM is flow equivariant). Consider the channel-based FELSTM defined by equations (13)–(15), with invariant initial state variables satisfying and for all . Then the model is flow equivariant, i.e., for any flow and any trajectory , we have
See Appendix A.5 for the proof.
Note that the state variable at time t is a function of the input sequence up to time so it transforms according to instead of .
This terminology is inspired by the parallel transport concept in gauge theories which is the theoretical basis of our transporter based model in the next section.
Transporter based motion equivariant LSTM (MELSTM). The channel-based FELSTM achieves equivariance under flows by lifting regular fields on to transport fields on , which can be interpreted as introducing a bank of moving frames indexed by the group . However, this construction is equivariant only under flows of an abelian subgroup , not under general time-dependent motions ; in practice, is even truncated to a finite grid of velocities. Moreover, it increases the dimensionality of the hidden representation by introducing an additional group dimension. Here, we take a different approach. Instead of lifting the representation space, we explicitly transport the hidden states between consecutive time steps using an estimated group-valued transformation. This leads to a transporter-based architecture that achieves equivariance under general motions while keeping the fields regular and defined only on the original spatial domain .
This estimated transformation is the transporter , which describes how the signal transforms between times and . It is generated by a Lie algebra valued velocity through the ODE with , so that, like the motion generated by in (3), it is a time-ordered exponential:
where and . We also need the transporter to satisfy the equivariance relation as
for every motion . In practice, we might model the instantaneous velocity instead of the transporter directly. Using the ODE governing the transporter, we can show that this equivariance relation is satisfied if and only if the velocity model satisfies the following equivariance relation (see Appendix A.6 for proof):
for every motion . This is precisely how a gauge connection transforms. Viewing a sequence as a section of a bundle over the time axis, the spatial coordinates of each may be chosen independently at every instant: motions change these coordinates as gauge transformations, the velocity model is the connection that relates coordinates at neighboring times, and the transporter is its parallel transport (Appendix A.8).
In the discrete-time setting, we denote as the transporter between two consecutive time steps. In this case, we simply have . Using the transporter, the MELSTM is defined by the following equations
Theorem 2 (MELSTM is motion equivariant). Consider the transporter-based MELSTM defined by equations (21)–(23), with invariant initial state variables satisfying and for all . Then the model is motion equivariant, i.e., for any motion and any trajectory , we have
Proof sketch. The proof follows the same inductive structure as the flow equivariance result for FELSTM. The base case is immediate from the invariance of the initial state variables. Note that the transporter equivariance relation (19) in the discrete-time setting reduces to . Assuming that the state variables are motion equivariant at time , we first show that the gate variables remain motion equivariant up to time . The key step is the cancellation of the factor between the transporter and the hidden state in the gate equations. We then apply the same argument to the cell-state and hidden-state updates to conclude motion equivariance at time . See Appendix A.7 for the complete proof.

| Model | MSE ↓ test | s / epoch |
|---|---|---|
| LSTM | ||
| FELSTM | ||
| MELSTM |
Figure 2: Training efficiency and test error. Right: test MSE over the trained horizon and at ; mean s.d. over five seeds.
5 Experiments
We evaluate the proposed motion equivariant LSTM (MELSTM) against the flow equivariant LSTM (FELSTM) and a standard LSTM baseline on prediction and classification under time-dependent motion. The three models share an architecture, a parameter count, and a training protocol, and differ only in how the hidden state is transported between timesteps, so any difference in performance is attributable to that mechanism alone. Our aim is not only to show that equivariance helps, which is established for flows (Keller, 2025), but to ask what form it should take when the motion itself varies in time: whether it is better to enumerate a lattice of candidate velocities or to estimate a small number of them.
5.1 Moving MNIST
Both experiments in this section use the same synthetic motion and the same three encoders. They differ only in how the frames are rendered and in what the final hidden state is used for.
Time-dependent motion. MNIST digits move on a canvas with periodic boundary conditions. Velocities are discrete, drawn from the integer lattice where , so that translation by any acts exactly on the periodic grid without interpolation. Motions are piecewise constant: a velocity is held for a random 3–6 frames and then resampled. Every moving component carries its own velocity schedule and hence its own motion , and the models read a context of frames.
Models. The three models share one recurrent cell and differ only in how its hidden state is transported: not at all (LSTM), by enumeration over velocity channels (FELSTM), or by slots warped by velocities estimated online by parameter-free Fourier phase correlation (MELSTM; Appendix B.1.4). The velocity dimension is max-pooled and read by a task head : a decoder that produces each predicted frame, (Section 5.1.1), or a classifier applied once to the final state, (Section 5.1.2). Weights are shared across channels and slots, so for each task the three models have identical parameter counts, and they are trained identically.
5.1.1 Future-Frame Prediction
Data and task. Two digits move independently, so a sequence is a sum of two independently transported components, . Every sequence has two phases: during the first steps, the context, each digit moves under its own time-dependent velocity schedule, and at the context boundary the velocities of local motions are frozen, for all . Models are trained autoregressively on this structure: given the 15 context steps of , predict the following 10, over which each local motion reduces to a constant flow. FELSTM is flow-equivariant by construction, so its task is to have encoded, by the end of the context, a good representation of each digit in the velocity channel that matches the digit's final velocity. MELSTM must encode each digit in one of its slots and recover the digit's final velocity, which it then uses to transport that slot through the frozen phase. Parameters are optimized to minimize MSE + L1 error against the ground truth over for 50 epochs, identical for every model. Figure 2 shows the validation loss of the three models: MELSTM outperforms both FELSTM and the standard LSTM, demonstrating the benefits of motion equivariance in handling time-dependent motions.
Slot tracking. For prediction, MELSTM takes : each slot correlates its own hidden state with the current frame. Since a slot carries a single coherently moving component, the local problem of a velocity field over a multi-object frame reduces to global displacements, one per slot, each given in closed form by phase correlation. This also solves the correspondence (or assignment) problem. Correlating two consecutive frames yields velocities per step, but as an unordered set that does not say which velocity at continues which at ; here each estimate is bound to the slot that requested it. We call this slot tracking (Appendix B.1.4). Note that early in training, slot tracking can also be replaced by frame-pair velocities, withdrawn gradually under a stochastic or curriculum schedule (Appendix B.1.5).
Length generalization. Figure 3 shows the prediction error when the frozen phase is extended from 10 to 85 steps: MELSTM is lowest at every timestep, by over FELSTM on average and on 99.7% of individual predicted frames, with all models scored on the same 10,000 sequences. Stratifying by how recently a digit's velocity last changed before the context ended locates where that advantage comes from (Figure 3): a change one frame before the boundary costs FELSTM roughly its error at the first predicted frame, above the baseline's own sensitivity to the same event, while MELSTM pays nothing measurable. The enumerating model is therefore the most sensitive of the three to a recent change in motion and the estimating model the least, even though MELSTM is the only one that must recover the velocity and so the one that would be expected to suffer most from a single frame of new evidence.
Motion generalization. We evaluate each model as trained on benchmarks whose motion statistics differ from the training distribution, scoring MSE over the same trained horizon and dividing each model by its own error at the training configuration; Figure 4 thus shows sensitivity, not accuracy. Two compensated sweeps vary switching rate and jump size independently. FELSTM keeps 25 hidden-state copies, one per possible velocity; when the velocity changes, it must read from a different copy and abandon what had accumulated. The penalty is roughly the product of how disruptive the velocity changes are, which grows with both how often and how far the velocity jumps, and how much the abandoned copy was worth. The rate sweep raises the first factor directly and costs FELSTM ; larger jumps raise it less and cost .
Moving MNIST Length Generalization

Sensitivity to boundary velocity age
Figure 3: Rollout stability and context-boundary sensitivity. Left: median rollout MSE. Middle: MSE at t = 16 of sequences whose last velocity change came 1–3 frames before the context boundary (boundary velocity age), relative to settled sequences (age ≥ 4). Right: the age-1 group over the rollout; the FELSTM penalty persists through mid-rollout before gradually decaying.
Sensitivity to switching rate, jump size, and velocity unpredictability



Figure 4: Motion generalization sensitivity. Each model normalized by its own training error (1.0 = no degradation).
MELSTM transports its two slots by an estimated velocity parameter, so a velocity change moves the same representation differently rather than transferring between velocity-indexed copies; it stays flat to within 1% on both axes. LSTM has no velocity-indexed state to disturb and tracks only motion difficulty. Seven fixed regimes probe combinations of rate and jump size beyond the swept axes. LSTM's rise measures intrinsic difficulty, while the ratio of FELSTM to LSTM isolates architecture-specific cost. Figure 4 also orders these regimes by velocity unpredictability , the error of using the previous velocity relative to assuming no motion. measures the disruption and the value of the abandoned history, so the penalty should follow (Appendix B.1.3); FELSTM's penalty indeed peaks near .
5.1.2 Motion-Only MNIST Classification
Data and task. If every frame is noise, an object can still be defined by the common fate of its pixels, which move together; all information about it then lies in the correlations between frames (Upadhyay et al., 2026). Motion-Only MNIST renders a single digit in this way, as a glyph-shaped window onto its own white-noise texture, which moves with it, over an independent white-noise background with a motion of its own (Appendix B.2). No single frame contains the digit (a single-frame CNN scores 12%, against 10% chance), and the model must name the digit after the context.

| Model | acc. ↑ val test | s / epoch |
|---|---|---|
| LSTM | ||
| FELSTM | ||
| MELSTM |
Figure 5: Motion-Only MNIST: Training efficiency and test accuracy. Right: five-seed mean ± s.d. of the best validation and the test accuracy and of the median time per epoch. Dotted lines: chance (10%).
Sensitivity to switching rate, jump size, and speed



Figure 6: Motion generalization sensitivity in classification. Relative to their own training accuracy (far lower for LSTM), LSTM and FELSTM respond alike, except at speed 1, where LSTM improves because its recurrence can move its memory with the digit.
Velocity model and training. MELSTM reads both slot velocities from the two strongest phase-correlation peaks of each frame pair , one from the background and one from the digit. The estimator is still parameter-free, and with slot tracking instead, accuracy is only slightly lower (Appendix B.2). All models are trained with cross-entropy for 80 epochs on five seeds.
Transport reveals the digit. A state transported with the digit accumulates its texture, while the background, moving differently, averages out (Figure 14). Both equivariant models exploit this (Figure 5), but MELSTM is slightly more accurate, trains several times faster with 2 state copies instead of 25, and generalizes better (Figure 6). LSTM compares consecutive frames within its recurrence but cannot carry its memory with a digit moving faster than one pixel per step, so it must find motion detectors in noise, which it does only on some seeds (Appendix B.2).
Motion generalization. We evaluate the trained models as the switching rate, jump size and maximum speed move away from training (Figure 6). As in prediction (Figure 4), FELSTM loses accuracy as velocity changes become frequent, since each change moves its evidence to another channel, and it does not generalize beyond its velocity grid; MELSTM, which re-estimates its velocities at every step, generalizes on all three axes. LSTM's recurrence moves its memory by one pixel per step, so at speed 1 it can follow the digit and improves; faster digits leave it only the comparison of the last two frames, which fails beyond 3 pixels per frame. Like FELSTM, it also loses accuracy as velocity changes become more frequent, which suggests that it too accumulates evidence only while the velocity stays the same.
5.2 KTH Action Recognition under Camera Motion
Data and task. KTH (Schuldt et al., 2004) contains videos of 25 people performing six actions, such as walking, boxing and hand waving, filmed by a mostly static camera. We simulate a moving camera by translating every frame, which moves the whole scene but leaves the action unchanged (Appendix B.3). The models are trained to recognize the action under a small, slow camera shake, a sinusoid on each axis with amplitude px and frequency Hz, and tested under larger and faster shakes and other camera motions. FELSTM enumerates the 9 velocities with , which contain every step of the training shake. MELSTM has two slots and uses slot tracking, which is equivariant to any camera path; early in training it also uses frame-pair velocities, with the stochastic schedule of Appendix B.1.5. All models are trained for 500 epochs with cross-entropy loss.
Camera-motion generalization. With a static camera (A = 0) the three models are comparable. Under the training shake, MELSTM learns more slowly while frame-pair velocities are withdrawn, but ends with the highest validation accuracy (Figure 7). As the shake grows, LSTM and FELSTM lose accuracy, already
Validation accuracy

Test Accuracy: Generalization to Unseen Camera Shakes
LSTM
FELSTM
MELSTM
Shake amplitude A (px)
Shake frequency (Hz)
Shake frequency (Hz)
Shake frequency (Hz)
Figure 7: KTH: training and generalization to camera shake. Left: validation accuracy under the training shake. Right: test accuracy under shakes of amplitude A and frequency f (A = 0: static camera); mean ± s.d. over three seeds.
inside the training region, and approach chance for large, slow shakes, while MELSTM keeps its static accuracy everywhere, up to camera steps of 11 pixels per frame. FELSTM gains little over LSTM, although its lattice contains every step of the training shake: each of its copies moves at one fixed velocity, while a shake keeps changing velocity.
6 Discussion
Related work. Most equivariant recurrent and dynamical models are equivariant to static transformations, applied to every frame alike (Azari & Erdogmuş, 2022; Nguyen et al., 2023). Symmetries that mix space and time, such as Galilean boosts in fluid dynamics (Wang et al., 2021) and Lorentz boosts in particle physics (Bogatskiy et al., 2020), act on the whole space-time signal as one group element. FERNNs (Keller, 2025) and their extensions to world models with known self-motion (Lillemark et al., 2026) and to transformers (Khaliliya & Keller, 2026) are flow equivariant by construction; MELSTM instead estimates the motion from the data and is equivariant to motions whose velocity changes at every step. Recurrent video models such as TrajGRU (Shi et al., 2017) and MotionRNN (Wu et al., 2021) also move their hidden states along flow fields that they learn from the data, which improves the prediction of complex motion. Here we treat motion as a gauge symmetry, under which the recurrent model is exactly equivariant whenever its transporter is (Theorem 2). Equation (20) states what this requires of the velocity model, and our experiments measure what the symmetry buys by comparing models that share an architecture and differ only in their transport.
Future directions. Our symmetry groups act on each frame as a whole or, through slots, on a few components, each moved by a single group element, and the velocity model in our experiments is parameter-free. We see three directions that follow from the construction.
Trainable velocity models. Any velocity model that satisfies (20) keeps MELSTM exactly equivariant, including a trainable one, such as a recurrent network coupled to MELSTM. Phase correlation on learned convolutional features instead of raw pixels still satisfies it, and would let the model learn which part of the change between frames is motion and which is intrinsic (Figure 1). A recurrent velocity model could also predict the motion after the context.
Diffeomorphisms. Atmospheric fields deform as they move, so their motion is better described by a time-dependent diffeomorphism. For , the transporter adverts the states along a velocity field. Replacing convolutions by diffeomorphism-equivariant maps, approximated by canonicalization through image registration (Oettinger et al., 2026), would give a model suited to weather forecasting.
Transformers. Attention from frame t to frame s can read the keys and values of frame s transported by . By (19) these transform with , like the query, which would extend flow equivariant transformers (Khaliliya & Keller, 2026) from flows to motions.
Acknowledgments
V.H. and M.P. received support from National Science Foundation Award #2418909 LEAPS-MPS: Topological Machine Learning and Cryo-EM. T.A.K. acknowledges that this work has been made possible in part by a gift from the Chan Zuckerberg Initiative Foundation to establish the Kempner Institute for the Study of Natural and Artificial Intelligence at Harvard University. M.P. received support from CAPITAL Services.
References
Bahar Azari and Deniz Erdoğmuş. Equivariant deep dynamical model for motion prediction. In Proceedings of the 25th International Conference on Artificial Intelligence and Statistics (AISTATS), volume 151 of Proceedings of Machine Learning Research, 2022.
Alberto Bietti, Luca Venturi, and Joan Bruna. On the sample complexity of learning under geometric stability. In Advances in Neural Information Processing Systems (NeurIPS), volume 34, 2021.
Alexander Bogatskiy, Brandon Anderson, Jan T. Offermann, Marwah Roussi, David W. Miller, and Risi Kondor. Lorentz group equivariant neural network for particle physics. In Proceedings of the 37th International Conference on Machine Learning (ICML), volume 119 of Proceedings of Machine Learning Research, 2020.
Michael M. Bronstein, Joan Bruna, Taco Cohen, and Petar Veličković. Geometric deep learning: Grids, groups, graphs, geodesics, and gauges. arXiv preprint arXiv:2104.13478, 2021.
Taco Cohen and Max Welling. Group equivariant convolutional networks. In Proceedings of the 33rd International Conference on Machine Learning (ICML), volume 48 of Proceedings of Machine Learning Research, pp. 2990–2999, 2016.
Taco S. Cohen and Max Welling. Steerable CNNs. In International Conference on Learning Representations (ICLR), 2017.
Taco S. Cohen, Mario Geiger, and Maurice Weiler. A general theory of equivariant CNNs on homogeneous spaces. In Advances in Neural Information Processing Systems (NeurIPS), volume 32, 2019a.
Taco S. Cohen, Maurice Weiler, Berkay Kicanaoglu, and Max Welling. Gauge equivariant convolutional networks and the icosahedral CNN. In Proceedings of the 36th International Conference on Machine Learning (ICML), volume 97 of Proceedings of Machine Learning Research, 2019b.
David S. Dummit and Richard M. Foote. Abstract Algebra. John Wiley & Sons, 3 edition, 2004.
Bryn Elesey and Sheheryar Zaidi. Provably strict generalisation benefit for equivariant models. In Proceedings of the 38th International Conference on Machine Learning (ICML), volume 139 of Proceedings of Machine Learning Research, 2021.
Marc Finzi, Samuel Stanton, Pavel Izmailov, and Andrew Gordon Wilson. Generalizing convolutional neural networks for equivariance to Lie groups on arbitrary continuous data. In Proceedings of the 37th International Conference on Machine Learning (ICML), volume 119 of Proceedings of Machine Learning Research, 2020.
Andy Keller. Flow equivariant recurrent neural networks. In D. Belgrave, C. Zhang, H. Lin, R. Pascanu, P. Koniusz, M. Ghassemi, and N. Chen (eds.), Advances in Neural Information Processing Systems, volume 38, Main Conference, pp. 156934–156979. Curran Associates, Inc., 2025. doi: 10.52202/085713-5244. URL https://proceedings.neurips.cc/paper_files/paper/2025/file/e637029c42aa593850eeebf46616444d-Paper-Conference.pdf.
Ibrahim Khaliliya and T. Anderson Keller. Flow equivariant transformers. In ICML 2026 Workshop on Weight-Space Symmetries: from Foundations to Practical Applications, 2026. URL https://openreview.net/forum?id=lXTPf5HDHy.
Risi Kondor and Shubhendu Trivedi. On the generalization of equivariance and convolution in neural networks to the action of compact groups. In Proceedings of the 35th International Conference on Machine Learning (ICML), volume 80 of Proceedings of Machine Learning Research, 2018.
Yann LeCun, Bernhard Boser, John S. Denker, Donnie Henderson, Richard E. Howard, Wayne Hubbard, and Lawrence D. Jackel. Backpropagation applied to handwritten zip code recognition. Neural Computation, 1(4):541–551, 1989.
Hansen Lillemark, Benhao Huang, Fangneng Zhan, Yilun Du, and T. Anderson Keller. Flow equivariant world models: Structured memory for dynamic environments. In International Conference on Machine Learning (ICML), 2026. arXiv:2601.01075.
Mikio Nakahara. Geometry, Topology and Physics. Institute of Physics Publishing, Bristol, second edition, 2003.
Hai Huu Nguyen, Andrea Baisero, David Klee, Dian Wang, Robert Platt, and Christopher Amato. Equivariant reinforcement learning under partial observability. In Proceedings of the 7th Conference on Robot Learning (CoRL), volume 229 of Proceedings of Machine Learning Research, 2023.
Josephine Elisabeth Oettinger, Zakhar Shumaylov, Johannes Bostelmann, Jan Lellmann, and Carola-Bibiane Schönlieb. Diffeomorphism-equivariant neural networks. arXiv preprint arXiv:2602.06695, 2026.
Christian Schuldt, Ivan Laptev, and Barbara Caputo. Recognizing human actions: A local SVM approach. In Proceedings of the 17th International Conference on Pattern Recognition (ICPR), volume 3, pp. 32–36, 2004.
Xingjian Shi, Zhourong Chen, Hao Wang, Dit-Yan Yeung, Wai-Kin Wong, and Wang-chun Woo. Convolutional LSTM network: A machine learning approach for precipitation nowcasting. In Advances in Neural Information Processing Systems (NeurIPS), volume 28, 2015.
Xingjian Shi, Zhihan Gao, Leonard Lausen, Hao Wang, Dit-Yan Yeung, Wai-kin Wong, and Wang-chun Woo. Deep learning for precipitation nowcasting: A benchmark and a new model. In Advances in Neural Information Processing Systems (NeurIPS), volume 30, 2017.
Nitish Srivastava, Elman Mansimov, and Ruslan Salakhutdinov. Unsupervised learning of video representations using LSTMs. In Proceedings of the 32nd International Conference on Machine Learning (ICML), volume 37 of Proceedings of Machine Learning Research, 2015.
Ujjwal Upadhyay, Mukul Ranjan, Zhiqiang Shen, and Mohamed Elhoseiny. Time Blindness: Why video-language models can't see what humans can? In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2026.
Rui Wang, Robin Walters, and Rose Yu. Incorporating symmetry into deep dynamics models for improved generalization. In International Conference on Learning Representations (ICLR), 2021.
Maurice Weiler and Gabriele Cesa. General E(2)-equivariant steerable CNNs. In Advances in Neural Information Processing Systems (NeurIPS), volume 32, 2019.
Maurice Weiler, Patrick Forré, Erik Verlinde, and Max Welling. Equivariant and Coordinate Independent Convolutional Networks: A Gauge Field Theory of Neural Networks. Progress in Data Science. World Scientific, New Jersey, 2026. doi: 10.1142/14143.
Haixu Wu, Zhiyu Yao, Jianmin Wang, and Mingsheng Long. MotionRNN: A flexible model for video prediction with spacetime-varying motions. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 15435–15444, 2021.
Yuxin Wu and Justin Johnson. Rethinking "Batch" in BatchNorm. arXiv preprint arXiv:2105.07576, 2021.
Chen-Ning Yang and Robert L. Mills. Conservation of isotopic spin and isotopic gauge invariance. Physical Review, 96(1):191–195, 1954.
Appendix Contents
A Proofs
A.1 The structure of subgroups of ..... 15
A.2 Global G-equivariance of LSTM model ..... 16
A.3 LSTM is not flow equivariant ..... 17
A.4 Transport and flow convolution ..... 18
A.5 Flow equivariance of FELSTM ..... 19
A.6 Equivariance of the Velocity model ..... 21
A.7 Motion equivariance of the Velocity Based MELSTM ..... 21
A.8 Time-dependent data and motion equivariance as a gauge theory ..... 22
B Experimental Details
B.1 Future-Frame Prediction ..... 24
B.1.1 Moving MNIST Dataset ..... 24
B.1.2 Training and Evaluation Setup ..... 25
B.1.3 Length and Motion Generalization ..... 25
B.1.4 Velocity Model ..... 26
B.1.5 Training with Frame-Pair Velocities ..... 29
B.2 Motion-Only MNIST Classification ..... 29
B.3 KTH Action Recognition under Camera Motion ..... 31
A Proofs
A.1 The structure of subgroups of G
Lemma 1. The motions form a subgroup of G, while the flows form a subgroup of G if and only if G is an abelian group.
Proof. We assume that and are two motions generated by the velocities and , respectively. We show that is again a motion. Differentiating with respect to time and using the product rule gives . Substituting the evolution equations for and yields
Using the definition of the adjoint action for and , we conclude that is again a motion generated by the velocity
which is simply in the case of an abelian group where the adjoint action is trivial. Similarly, we can show that the inverse of a motion is again a motion, and therefore the motions form a subgroup of . This is proved as follows. Starting with the identity and differentiating gives .
Substituting yields . Multiplying on the right by gives , so . Rewriting in right-invariant form gives , showing that is a motion generated by the velocity .
For the second part of the lemma we proceed as follows. For the forward direction, if is abelian then the composition of two flows and is given by , which is again a flow. The inverse of a flow is given by , which is also a flow. Thus, if is abelian, the flows form a subgroup of . For the converse direction, if the flows form a subgroup of , then for any , the composition of the corresponding flows and must be a flow. This implies that for some . Differentiating at gives . Using the Baker-Campbell-Hausdorff formula, shows then that equality for all is possible only if for all . Therefore, the Lie algebra is abelian, and hence the Lie group is abelian.
Group structure of . Consider the subgroup consisting of time-dependent transformations initialized at the identity. This is a normal subgroup of and satisfies . Moreover, every element admits a unique decomposition into a component in and a global component in , since and . Hence, every can be written uniquely as , which gives the internal product decomposition . Therefore, by Dummit & Foote (2004, Theorem 12, Section 5.5), . The semidirect product structure is determined by the conjugation action of on , given by for and . Since motions and flows satisfy and , respectively, they are naturally subsets of . Consequently, , and .
A.2 Global G-equivariance of LSTM model
Theorem 3 (LSTM is globally G-equivariant). Consider the LSTM model defined by equations (8)–(10), with invariant initial state variables satisfying and for all . Then the model is globally G-equivariant, i.e., for any global transformation and any trajectory ,
Proof. We want to prove
The proof is by induction on . For the base case, we consider the initial states and to be invariant under the group action, so and . Moreover, the empty sequence is trivially invariant under the group action, so we have the equivariance at time as follows (similarly for ). Now, assuming that the equivariance holds at time we want to show that it also holds at time . First note that for the gate variables we have
for all . Here in the second line, we used the induction hypothesis for the hidden state and in third line the equivariance of the steerable convolution under regular action of the group. For the cell state we have
where in the second line we used the induction hypothesis for the cell state and the gate variables and in the third line we used the fact that the group action distributes over the Hadamard product. Finally for the hidden state we have
where in the second line we used the induction hypothesis for the gate variable o and the cell state and in the third line we used the fact that the group action distributes over the Hadamard product and also commutes with the pointwise nonlinearity tanh.
A.3 LSTM is not flow equivariant
Proposition 1. Let be a LSTM defined by equations (8)–(10), with invariant initial states whose kernels are supported in a ball of radius , on or on a torus of width . If is flow equivariant, then
Condition (41) fails for all kernels outside a Lebesgue measure zero set (e.g. it fails whenever and ); hence is not flow equivariant for generic kernels.
Proof. As a probe for flow equivariance, consider the sequence of static dots for all where a flow of velocity maps it to the moving dot . Since and , the first time step gives and , supported in the ball (they vanish where does as and iff ), so the memory terms are supported in . Choose and evaluate the equivariance condition at time ,
at points . On the left, all time-1 input terms vanish, since ; the gates see only their memory, leaving . On the right, every argument of the static response vanishes at (distance > 2R from the dot), giving . Since and only at , so the memory content must vanish on where it is also zero trivially outside of . This gives (41) as a necessary condition for flow equivariance.
In practice, the convolution kernels are finite arrays, so all parameters can be collected into a vector in a finite-dimensional space , where . Since is a real-analytic function of the kernel parameters and it is not identically zero (as it is not zero whenever ), it follows that its zero set has Lebesgue measure zero in . Since every flow-equivariant LSTM must satisfy (41), the set of flow-equivariant kernels is contained in this measure-zero set.
Remark 1 (Space-time convolutions). Viewing a sequence as a field on space-time, a linear map equivariant to space-time translations is a space-time convolution, .
s) . A flow of translations with velocity acts on space-time as the Galilean boost , and commutes with all such boosts if and only if
For the orbit is the whole plane, so is constant: such a map couples different times only through spatial averages, and with a local kernel it does not couple them at all. For fields that transform under the boosts by a finite-dimensional representation , (42) becomes , which still determines by its value at . Lifting the fields to the boosts themselves, an infinite-dimensional representation, avoids the constraint; this is the route of FERNN and FELSTM. The orbits of Lorentz boosts, in contrast, are the hyperboloids (with ), which meet each time slice in a circle, so a Lorentz invariant kernel can still vary in space.
A.4 Transport and flow convolution
In this section we introduce the transport convolution and the transport-lifting convolution: the -equivariant linear maps between transport fields on , and from regular fields on to transport fields on , respectively. As special cases we then obtain the flow-lifting convolution and the flow convolution , the two operations used in the FELSTM architecture. Throughout, we assume that is unimodular, so that its Haar measure is both left and right invariant. For , unimodularity is equivalent to for all ; in that case also preserves the Lebesgue measure on , so all Jacobian factors appearing below are equal to one.
Transport-lifting convolution. We begin with a general linear map that takes as input a regular field on M and produces a transport field on :
where is the kernel. Requiring this map to be equivariant means that for all . Expanding both sides gives
for all , all and all . Using the change of variables , the left-hand side becomes where is the Jacobian of the transformation . Since the above equality must hold for all inputs , we obtain the kernel constraint
which must hold for all . Taking , where for , the spatial factors drop out and the constraint reduces to for all . Since the right action of on itself is transitive, it follows that must be independent of its group argument, i.e. . The remaining constraint is precisely the usual equivariance condition on the spatial variables, implying that is a steerable convolution kernel. In particular, global transformations impose no further condition, since no longer carries a group argument on which conjugation could act. Conversely, any kernel satisfying these conditions defines a -equivariant lifting operator. Hence the above characterization of is both necessary and sufficient for -equivariance, and the lifting map reduces to the standard steerable convolution
where we copy the result into the extra channels indexed by G. Note that this map is equivariant under the full group G, including the flow, motion and global transformations.
Transport convolution. Following the same logic, we define the transport convolution as a -equivariant linear map between transport fields on . A general such map takes the form
for a kernel and the Haar measure on . The equivariance condition results in the constraint
for all , all and all . Again, a necessary condition is obtained by taking , which gives for all . Setting shows that the kernel depends on the group arguments only through , i.e. , so the integration over takes the form of a group convolution. For the constraint becomes
for all , with and ; the constraints at follow by iterating this argument and impose no additional structure. Since the same acts on the spatial and on the group argument, (49) is a single joint condition and does not in general factor into a spatial equivariance condition and a separate conjugation invariance. Equivalently, is an equivariant function on under the diagonal action , and is therefore freely specifiable on a set of orbit representatives. Rather than solving this condition in general, we restrict to the case used in the FELSTM, in which the bank is an abelian subgroup . Transport fields then live on , and the relevant transformations are those taking values in , namely the motions and in particular the flows . Conjugation by an element of acts trivially on , so the velocity arguments are only translated, and (49) restricted to reduces to invariance of under a common spatial translation. This gives and hence (16): a convolution in both arguments, where we write for since is abelian. In particular, is equivariant under all of , and not only under . Note that if we keep the same domain but also want the operation to be equivariant under global transformations, that is, under , then two further conditions are needed. First, must act on by conjugation, so the action of on the bank must land in ; that is, must be normal in . Second, (49) must now hold for all , and not only for . For with both conditions are satisfied, and the conjugation can be computed explicitly: writing and ,
so V is indeed normal and conjugation acts on the bank through the point group alone, , independently of . This is why the analysis above is unaffected: translations act only on the spatial argument. The remaining h-dependence in (49) then yields the joint steerability constraint
A.5 Flow equivariance of FELSTM
In this section, we prove Theorem 1 which says that the channel based FELSTM is flow equivariant.
Proof. The proof proceeds by induction on . The base case is immediate since, by assumption, the initial state variables and are invariant under the action of flows, i.e., and for all where is an abelian subgroup of . Moreover, the empty sequence is trivially invariant under the action of flows. Therefore,
(52) and similarly for , establishing the base case of the induction. For the inductive step, assume that the state variables and are flow equivariant at time , namely, and for all . We now show that the state variables at time are also flow equivariant.
We first show that the gate variables are flow equivariant:
for all . Here, in the first line, we used the definition of the gate variables. In the second line, we applied the inductive hypothesis for the hidden state variable together with the flow equivariance of the flow convolution and flow-lifting convolution operators. In the third line, we inserted the identity element in the form into the first term and factored out , using the fact that the nonlinearity acts pointwise and is equivariant under the action of group elements. In the fourth line, we used the definition of the gate variables once more, and in the final line we used the definition of the action of flows on transport fields.
Next we show that the cell state equation is flow equivariant as well. Starting with the left hand side, we have
where in the second line we used the inductive hypothesis for the cell state at time variable together with the flow equivariance of the gate variables which we just proved. In the third line, we inserted the identity element in the form into the first term and factored out , using the fact that regular action distributes over the Hadamard product. In the fourth line, we used the definition of the cell state variable at time . In the fifth line we used that is a flow in the abelian group , so ; this is the only step that uses the flow property. In the final line we used the definition of the action of flows on transport fields.
Finally we show that the hidden state H is flow equivariant. Starting with the left hand side, we have
where in the second line we used the flow equivariance of the output gate variable which we proved earlier together with the flow equivariance of the cell state variable which we also proved. In the third line, we used the fact that tanh is a pointwise nonlinearity and is equivariant under the action of group elements. We also factored out using the fact that the regular action distributes over the Hadamard product, and used the definition of the hidden state variable at time . In the fourth line we used the flow property, exactly as for the cell state, and in the final line we used the definition of the action of flows on transport fields. This completes the inductive step and hence the proof of flow equivariance for the channel based FELSTM model.
Global and motion equivariance of the FELSTM. Since the flow takes values in the abelian subgroup , the transport conjugation could equally well have been written in the reduced form . We deliberately kept the unreduced form, because it isolates the single place where the proof uses that is a flow, and therefore shows exactly why the model fails to be motion equivariant.
The induction produces a field whose velocity argument is , whereas the transport-field law at the next time step requires . Closing the induction therefore requires
Multiplying on the left by , on the right by , and using , this is equivalent to
Taking gives , so the velocity must be constant in time; the remaining condition is then automatic, since by assumption. Hence (70) holds precisely when the velocity is constant, that is, when is a flow. For global transformations the condition holds trivially. If then for all , so the transport conjugation does not depend on and the induction closes. The FELSTM is therefore also -equivariant.
A.6 Equivariance of the Velocity model
Suppose first that , and define . Then
Since , uniqueness of solutions to the ODE implies . Conversely, suppose . Differentiating both sides and using gives
and multiplying on the right by yields .
A.7 Motion equivariance of the Velocity Based MELSTM
Here, in this section we prove Theorem 2 which states that the transporter based MELSTM is motion equivariant.
Proof. The proof proceeds by induction on . Similar to the flow-equivariance proof of FELSTM, the base case is trivial since, by assumption, the initial state variables , and the empty sequence are invariant under the action of motion transformations which establishes the equivariance at time . Then, we assume that the state variables and are motion equivariant at time and we show that they are also motion equivariant at time . For all the gate variables we have
where in the second line we used the induction hypothesis for the hidden state variable together with the equivariance of the convolution under regular action of the group and also the equivariance of the transporter under the motion transformation. In the third line we used associativity of the group action and the fact that the nonlinearity is pointwise and is equivariant under the action of group elements. In the fourth line we used the definition of the gate variables. For the cell state we have
where in the second line we used the induction hypothesis for the cell state variable at time t, the equivariance of the transporter together with the equivariance of the gate variables which we just proved. In the third line, we factored out using the fact that the regular action distributes over the Hadamard product. Finally for the hidden state we have
where in the second line we used the motion equivariance of the output gate variable and cell state variable which we also proved. In the third line we used the fact that tanh is a pointwise nonlinearity and is equivariant under the action of group elements. We also factored out using the fact that the regular action distributes over the Hadamard product. We then just replace the definition of the hidden state variable at time . This completes the inductive step and hence the proof of motion equivariance for the MELSTM model.
A.8 Time-dependent data and motion equivariance as a gauge theory
In this section, we provide a geometric interpretation of time-dependent data and motion equivariance in terms of principal bundles and gauge connections. This perspective naturally identifies time-dependent data as sections of an associated bundle, motions as gauge transformations, and the velocity model as a gauge connection that defines parallel transport along time through the transporter. Motion equivariance of the model can then be understood as equivariance under gauge transformations.
Temporal data as sections of an associated bundle. As our base manifold is just , our bundles are trivial and we can work with global trivializations. We define the trivial principal G-bundle
(86) with right action for . From this, we construct the associated bundle with fiber which is the feature space of our model:
where the equivalence relation is for , and . Here our associated bundle is also trivial and can be identified with . A time-dependent signal is then naturally identified with a section of this associated bundle where is the identity in . This means that the space of time-dependent signals can be identified with the space of sections of the associated bundle .
Gauge transformations. A gauge transformation of the principal bundle is a bundle automorphism commuting with the right -action and preserving the base space . In the trivialization , every gauge transformation is uniquely determined by a smooth map , acting fiberwise as . Therefore, the group of gauge transformations is naturally identified with the group of smooth -valued functions on time which in our case is where consists of smooth motions initialized at the identity and is the subgroup of time-independent transformations.
A gauge transformation induces an action on the associated bundle and thus on sections of , which, in our trivial bundle case, is simply given by
which is exactly the action of motion transformations on time-dependent signals that we defined in the main text. Therefore, motions are naturally identified with gauge transformations in this geometric framework.
Gauge connection and parallel transport. A connection on the principal bundle is a -valued one-form on satisfying the standard equivariance and normalization properties, and it defines parallel transport along the time direction. In the global trivialization , it is represented by a -valued one-form on of the form , where . Under a gauge transformation , the connection transforms as
where denotes the adjoint action of on its Lie algebra . Given a connection , one can define a covariant derivative and the associated parallel transport along time. The covariant derivative measures the intrinsic time variation of a section, i.e. the variation after subtracting the contribution induced by gauge transformations which in our case are motions.
The parallel transport from time to induced by the connection is given by the associated Wilson line, i.e., the time-ordered exponential of the connection:
Equivalently, it is the unique solution of the differential equation with initial condition . Its action on a time-dependent signal (viewed as a section) transports features from time to time by parallel transport along the connection , meaning that the transported section remains covariantly constant with respect to the induced covariant derivative.
Parallel transport and model dynamics. Given a gauge connection in the continuous-time limit, we can define a covariant time derivative and express the model dynamics in terms of this covariant derivative. This formulation yields an evolution equation that is equivariant under gauge transformations, and hence under motions as well. In the discrete-time setting, we instead use the parallel transporter induced by the connection to modify the update equations. Concretely, the feature produced at time t is transported to time in a parallel manner and then combined with the newly computed features at time to form the updated hidden state. This construction ensures that the resulting discrete-time dynamics are motion equivariant by design. The mechanism echoes the ‘gauge principle,’ whereby equivariance is achieved through the introduction of an additional gauge degree of freedom.
B Experimental Details
B.1 Future-Frame Prediction
B.1.1 Moving MNIST Dataset
We construct a synthetic dataset of MNIST digits moving with time-dependent velocities on the discrete torus , obtained by zero-padding the MNIST digits to with . Each digit carries a velocity drawn from the velocity lattice . A frame is the superposition of the individual digits,
where is the discrete motion generated by the velocity sequence as defined in Section 2.
Motions. We construct a stochastic generative process that produces a rich distribution of motions. To govern the temporal dynamics, we introduce two key parameters: to control the frequency of velocity updates, and to control the spatial smoothness of the motion. At each time step , a velocity update is triggered independently with probability . When an update occurs, the new velocity transitions to an immediate neighboring state on the lattice with probability . With probability , it is instead sampled uniformly from the full lattice (excluding the current velocity), allowing for a long-tail of sudden, larger accelerations. Formally, the velocity evolves as:
where draws uniformly from the eight unit spatial offsets. If the proposal leaves the lattice , the update holds , ensuring the stationary velocity distribution remains perfectly uniform. Alternatively, to generate trajectories with more structured durations, we also employ a piecewise-constant formulation where velocity is strictly held for a duration before an update is triggered using the identical rules.
Kinematic Metrics. Because out-of-bounds proposals are held rather than resampled, a triggered update does not strictly guarantee a change in velocity. To accurately classify the motion regimes, we define two metrics measured from the realised trajectories. First, the realised switching rate (the empirical probability of a velocity transition on a given frame) is strictly lower than the nominal trigger rate :
where is the lattice-dependent probability that a unit-offset stays within . Second, to strictly decouple the frequency of these transitions from their severity, we define the jump magnitude as the norm of the velocity difference, , averaged strictly over the subset of frames where a transition actually occurred. By conditioning the expectation on , the jump magnitude isolates the purely spatial severity of the transitions independently of their frequency.
Velocity Freezing and Model Evaluation. As outlined in the main text, every sequence sets freeze_after equal to the context length ( ). This yields a two-phase trajectory: a time-varying phase during the encoding context, followed by a constant-velocity phase over the entire predicted rollout. Neither model is given access to the ground truth velocities; they must infer them solely from the video frames. By freezing the rollout velocity, we establish a fair, perfectly balanced competition between the two architectures:
-
MELSTM (Explicit Estimation): To succeed, MELSTM must learn a robust encoding of the digits and successfully estimate the correct boundary velocity (via phase correlation) in order to explicitly transport those representations into the future.
-
FELSTM (Implicit Routing): FELSTM does not estimate a single velocity vector, but instead maintains separate spatial channels for all valid velocities. To succeed, it must learn a robust encoding of the digits and successfully route those representations into the correct velocity channels by the end of the context.
Because the rollout velocity is constant, it is theoretically observable from the final context frames for both models. By strictly freezing the kinematics during the rollout, the evaluation isolates their ability to encode and assign velocities, decoupling the competition from the impossible task of guessing unpredictable future velocity changes.
B.1.2 Training and Evaluation Setup
Dataset Configuration and Splits. Our standard training configuration utilizes the piecewise motion regime on with , , and (where ). The expected segment duration of 4.5 frames implies a nominal switching rate of . Applying the realized rate correction, the training dataset operates at a realized switching rate of changes per frame, with a mean realized jump magnitude of . We use 54,000/6,000 training/validation sequences (a 90/10 split of the MNIST training set) and 10,000 test sequences (the MNIST test set), ensuring digit identity never crosses between training and evaluation. Training and validation sequences are generated on the fly: fresh digit pairs, placements, and velocity schedules are drawn on every access so no sequence is seen twice. The test set and every evaluation benchmark are instead pre-generated from fixed seeds.
Optimization and Hyperparameters. All three models are trained identically: 25-frame sequences (15 context, 10 predicted), optimized via MSE + L1 loss computed exclusively on the predicted frames. We use the Adam optimizer with an initial learning rate of and ReduceLROnPlateau scheduling (factor 0.5, patience 5, floor ), along with gradient clipping at 1.0. Training proceeds with a batch size of 32 for 50 epochs (totaling 84,400 optimizer steps) on a single NVIDIA A100 80 GB GPU. Early stopping was never triggered.
Parameter Budget. All three models have exactly 47,681 parameters, all trainable: 38,144 in the recurrent cell and 9,537 in the decoder. The counts agree exactly rather than approximately, because weights are shared across FELSTM's 25 velocity channels and MELSTM's slots, and because MELSTM's velocity model contributes no parameters at all (Appendix B.1.4). The three architectures therefore differ only in how many hidden-state copies they carry per step: 1, 25 and 2 respectively, and not in their number of learnable parameters.
Validation Tracking. Validation loss is tracked at two resolutions: a fixed 256-sequence probe scored every 25 batches, which resolves training dynamics without resampling noise, and the full 6,000-sequence validation split scored once per epoch. The two curves agree closely throughout training, confirming that the high-frequency probe is unbiased.
B.1.3 Length and Motion Generalization
Length Generalization. We extend the 10-frame trained rollout to an 85-frame free-running rollout (8.5× the trained horizon), predicting t = 16 through t = 100 after 15 context frames; Figure 3 reports the resulting rollout MSE. Because velocity is frozen throughout (the velocity active at the last context transition is held constant), the test isolates stable autoregressive spatial extrapolation from the ability to predict future velocity changes. Figure 8 shows the same behaviour qualitatively, run past the scored horizon to t = 140.
Motion Generalization. To test robustness to changes in motion, we rescore the trained checkpoints, without retraining, on test sequences whose context motion differs from training; the velocity is still frozen at the context boundary. Each model is scored by its median per-sequence MSE over the trained horizon , divided by its own median on a reference motion with the training switching rate and jump
Next-Step Prediction Length Generalization

Next-Step Prediction Length Generalization
Figure 8: Length generalization beyond the trained horizon. Two held-out sequences; rows are the ground truth, LSTM, FELSTM, and MELSTM. The dashed box marks the 25 frames seen in training (15 context + 10 predicted); the rest is extrapolation, run out to t = 140, past the 85-step horizon scored in Figure 3. LSTM collapses almost immediately, FELSTM smears into high-frequency artifacts late in the rollout, and MELSTM stays sharp throughout.
sizes (marked “trained” in Figure 4), so 1 means the new motion costs the model nothing. This removes the differences in overall error between the models, but not the difficulty of the new motion itself, which every model faces: LSTM’s curve reflects that difficulty, and the ratio of FELSTM to LSTM (Figure 9) isolates the cost specific to the FELSTM architecture.
The Channel-Handover Penalty. In the main text, we ordered the motion regimes by their kinematic unpredictability ( ). To quantify this metric, let denote circular translation by and the mean squared image difference induced by displacement . We define:
where the numerator is the one-step error of persisting the previous velocity, and the denominator is the error of assuming no motion. Thus, indicates pure flow, while indicates the past velocity offers no predictive advantage.
This definition makes the product described in the main text concrete. Handovers happen at the switching rate , and also weights each one by the size of its jump, so it measures how disruptive the handovers are, while the predictive value of the history abandoned at a handover is roughly proportional to . We therefore use as a simple model of the FELSTM penalty. It is a heuristic rather than a derived law, and the relation is not linear: the penalty stays near 1 for the four regimes with (constant, rare_teleport, churn_max and the training motion) and then grows through regular_fast, random_walk and churn_half to churn_mid, the regime closest to (Figure 9).
B.1.4 Velocity Model
As introduced in the main text, we estimate local velocities using a slot tracking mechanism. Specifically, each slot's velocity is computed via phase correlation between its own hidden state and the current frame.
Phase correlation. Fourier phase correlation is a global frequency-domain technique for estimating the relative translation between two images or signals. Given a reference image and a shifted image , the
| Regime | Kinematics | net disp (px) | |||
|---|---|---|---|---|---|
| trained | Baseline training motion | 0.163 | 1.40 | 0.121 | 23.2 |
| constant | Pure linear flow | 0.000 | — | 0.000 | 27.5 |
| rare_teleport | Rare, violent jumps | 0.050 | 2.41 | 0.063 | 23.7 |
| regular_fast | Fast, regular steps | 0.344 | 1.40 | 0.251 | 19.1 |
| random_walk | Constant tiny jitters | 0.657 | 1.00 | 0.361 | 21.7 |
| churn_mid | Frequent large jumps | 0.451 | 1.99 | 0.468 | 13.5 |
| churn_half | Frequent violent jumps | 0.498 | 2.44 | 0.629 | 10.9 |
| churn_max | Pure erratic chaos | 0.735 | 2.42 | 0.927 | 8.5 |
Evidence of the Channel-Handover Penalty

Figure 9: The channel-handover penalty across the seven motion regimes. Top: kinematics of the seven evaluation regimes and the training baseline. The unpredictability collapses the switching rate and the jump magnitude into a single number; net context displacement falls as rises, because the trajectories become diffusive. Bottom: FELSTM's architectural penalty (MSE normalised by the LSTM baseline) against . Because FELSTM allocates separate channels to discrete velocities, a velocity change forces a handover that strands accumulated temporal history; we model its cost as the product of the disruption () and the predictive value of what is stranded (). The penalty is negligible up to , including under pure chaos (), where the stranded history is worthless, and grows steeply above it. random_walk (frequent tiny jitters) and churn_half (less frequent but far larger jumps) are kinematically opposite, yet sit at nearly symmetric points of the parabola and show nearly equal penalties.
normalized cross-power spectrum is computed as
where denotes the two-dimensional Fourier transform, is the Hadamard product, and the overline represents complex conjugation. Applying the inverse Fourier transform to yields a correlation surface whose peak indicates the estimated translation between the two images:

Figure 10: Slot specialisation. Hidden-state evolution for a validation sequence (top) and a training sequence (bottom). Within each block the first two rows show the channel-averaged states , of the slots and the third the corresponding frame; column titles give , in red once the decoder takes over. Each slot localises onto one digit and tracks it, and this is the template that Eq. (97) correlates against the incoming frame.
The height of this peak serves as a confidence measure for the estimate. We denote this entire procedure as
where is the phase correlation operator returning the translation vector that corresponds to the dominant peak of the correlation surface. The subscript indicates that only the single strongest peak is considered.
From a local problem to a global one. A frame containing N independently moving objects does not possess a single uniform velocity. Consequently, recovering motion strictly from consecutive frames is inherently a local problem: the frame must be segmented and the correspondence resolved region by region, which is the primary challenge addressed by optical flow models. By contrast, a global estimator like phase correlation is better suited for determining a single global motion. Applying it directly to raw frames and extracting the K strongest peaks via does yield K velocities at each timestep t. However, these velocities form an unordered set; there is no inherent mechanism to associate a peak at time t with its corresponding peak at time . Converting these sets into coherent trajectories requires a separate assignment step at every timestep, typically relying on continuity heuristics or matching algorithms, where any error becomes unrecoverable.
The introduction of the hidden state circumvents these difficulties. For , each slot correlates its own channel-averaged hidden state against the incoming frame:
Through this operation, slot k effectively queries where its specific content has moved. Once a slot encapsulates a single coherently moving object, this query has exactly one valid answer: a single global displacement between the two fields, which phase correlation computes in closed form. In this framework, the local tracking problem is not merely solved, but rather absorbed: the recurrent dynamics resolve the segmentation within the state itself, allowing the estimator to face only a global displacement problem. Furthermore, each computed velocity is directly bound to the slot that requested it. Consequently, the slot's identity inherently acts as the tracking mechanism, naturally dissolving the correspondence problem without requiring explicit matching.
Bootstrap. At , all slot states are initialized to zero. Since warping a zero state has no effect and every slot receives identical input, the slots would ordinarily remain identical copies of one another indefinitely. Breaking this symmetry requires an initial velocity estimate that does not originate from the hidden state. We resolve this by computing , which seeds the slots with the strongest peaks from the first frame pair. This initial step is the only instance where correlation is performed directly between raw frames, and the only time more than one peak is extracted. For every timestep onward, the velocities are individually determined via Eq. (97).
Velocity Head Accuracy (MELSTM)

Figure 11: Velocity accuracy (one training run). The estimator is parameter-free and receives no gradient, so the rise from at epoch 5 to above 99.5% by epoch 8 reflects the hidden-state template improving, not the estimator being fitted. Final values are means over the last five epochs. In the same run, the validation loss stays on a plateau near until about epoch 6 and then falls by an order of magnitude while the accuracy climbs: the model leaves the plateau when the slots lock onto their digits. The five seeds of Figure 2 leave it at different times, which smooths their mean.
The state and the estimate improve together. Because the phase correlation estimator contains no trainable parameters, the observed velocity accuracy in Figure 11—which rises from to over 99.9%—indicates that the underlying template is improving. Specifically, the hidden state progressively evolves into a cleaner, spatially localized representation of the object that each slot tracks (as visualized in Figure 10). These two quantities are coupled in a mutually reinforcing loop: a more accurate velocity transports the state more faithfully, a better-transported state forms a cleaner template, and a cleaner template subsequently yields a sharper velocity estimate. No external mechanism closes this loop, and no explicit motion supervision is provided. Instead, the prediction loss shapes the hidden state h, and the estimator directly consumes this increasingly refined state. Therefore, the upward trend in accuracy serves as a direct probe of the model's representation quality, rather than a learning curve for the estimator itself.
B.1.5 Training with Frame-Pair Velocities
Slot tracking needs a hidden state that is a good template, which takes several epochs to form (Figure 11), whereas velocities read from a frame pair do not depend on the state. We therefore also trained MELSTM with frame-pair velocities that are withdrawn by epoch 25: the two strongest peaks of are matched to the two slots by closeness to their previous velocities and replace slot tracking (Eq. (97)). In the stochastic schedule, each step of each training sequence uses them with a probability that decays from 1 to 0 along a half cosine. In the curriculum, the steps use them, where decreases linearly from 15, the whole context, to 2, so the latest steps switch to slot tracking first. From epoch 25 on, training uses slot tracking only; validation and testing always do. With the stochastic schedule, every step is occasionally slot-tracked from the second epoch on, and the validation loss falls steadily from the start (Figure 12). With the curriculum, the earliest steps switch last: the validation loss stays near that of LSTM until they do, at epoch 25, and then drops sharply, while the training loss jumps briefly (Figure 13). Both schedules end at about the test error of training with slot tracking throughout (Figure 2).
B.2 Motion-Only MNIST Classification
Classification shares with the future-frame prediction experiment the torus, the piecewise motion of Appendix B.1.1 with segments of 3–6 frames on the lattice , the recurrent cell, and the optimizer and

| Model | MSE ↓ | |
|---|---|---|
| test | ||
| LSTM | ||
| FELSTM | ||
| MELSTM | ||
Figure 12: Stochastic frame-pair velocities. In training, MELSTM uses frame-pair velocities with a probability that decays to 0 by epoch 25; validation uses slot tracking only. Losses (MSE + L1) are means over three seeds with the min-max range shaded; faint traces are recorded every 25 batches and circles once per epoch (Appendix B.1.2). Table: test MSE over the trained horizon and at ; mean ± s.d.
learning-rate schedule of Appendix B.1.2. It differs in how frames are rendered, in the task head and in the loss.
Data. Each sequence holds one digit. Its MNIST glyph is binarised at intensity 0.3 into a mask , equal to one on the digit and zero elsewhere, and placed uniformly at random on . The digit and the background have independent white-noise textures and (unit variance, independent across pixels) and their own motions and , generated by velocities and . Frame is
clipped at and mapped affinely to . The first term is the digit's texture inside its moved mask; the factor is zero on the digit, so the second term is the moved background with the digit cut out. The velocities of the digit and of the background are each drawn from the motion generator of the prediction experiment, except that smooth updates are drawn uniformly from the valid lattice neighbours, giving a realised switching rate of 0.193 and a mean jump of 1.19. The 54,000/6,000 training/validation glyphs are a 90/10 split of the MNIST training set and the 10,000 test glyphs are the MNIST test set, so no glyph is shared between training and evaluation. Training sequences are rendered afresh on every access; validation and test sequences are fixed. No single frame reveals the digit: binarisation discards its intensity, both layers

| Model | MSE ↓ | |
|---|---|---|
| test | ||
| LSTM | ||
| FELSTM | ||
| MELSTM | ||
Figure 13: Frame-pair curriculum. As Figure 12, but training uses frame-pair velocities on the first steps of the context, a window that shrinks from the whole context to none by epoch 25.
have the same noise statistics, and white noise has no correlation between neighbouring pixels, so nothing marks the digit's outline. A single-frame CNN (three circular stride-2 convolutions with GroupNorm and global pooling) accordingly scores 12.2% against 10% chance, so the digit can only be recovered from how its pixels move together. Smoothing the textures with a Gaussian filter would leak the outline, because the correlation it creates breaks where the two textures meet: with a standard deviation of 0.5, 1 or 2 pixels, the same CNN reaches 13%, 24% and 36%.
Classifier and training. The head applies three convolutions with stride 2, circular padding, 16 channels, BatchNorm and ReLU, concatenates global average and max pooling, and ends in an MLP ; with the recurrent cell this gives 48,842 parameters for every model. The velocity axis is max-pooled as well. Before every evaluation, the head's BatchNorm statistics are re-estimated on 50 training batches with the current weights (precise BatchNorm; Wu & Johnson, 2021). Training differs from the future-frame prediction experiment in the cross-entropy loss, batch size 64, plateau patience 4 and 80 epochs (67,520 steps); the checkpoint with the best validation accuracy is tested once.
Velocity estimation in MELSTM. At , the two peaks of (Appendix B.1.4) seed the two slots, one for the digit and one for the background. At later steps, each new peak goes to the slot whose previous velocity is nearest, which solves the assignment problem as long as velocities change little from one frame to the next. With slot tracking (Eq. (97)) instead, test accuracy is about one point lower, and the digit also appears in the hidden state.
Hidden states. Figure 14 shows the hidden states on example sequences: the digit builds up clearly in the MELSTM slot that follows it, but only faintly in FELSTM's copies, since each velocity change moves it to another copy.
Why LSTM can leave chance. Each step of LSTM sees the current frame within 1 pixel, through its input kernel, and the previous frame within 2 pixels, through the hidden state and its recurrent kernel. One step can therefore compare the two frames at every displacement up to 3 pixels, which covers every velocity in the data, so LSTM can learn local motion detectors that pick out the digit. Finding such detectors in noise is hard, however, and LSTM does so only on some seeds.
Motion-generalization protocol. The sweep is evaluation only: each cell has 5000 sequences on MNIST test glyphs, shared by the three models. BatchNorm keeps the statistics stored with each checkpoint, estimated on the training motion; re-estimating them on each cell would let the model partly adapt to the new motion. The switching-rate and jump-size axes are those of the future-frame prediction experiment. That experiment also orders motion regimes by the unpredictability (Eq. (94)), which compares the one-step error of reusing the previous velocity with the error of assuming no motion. On white noise every nonzero shift changes the image by the same amount, so both errors simply count the frames with a nonzero shift, equals the switching rate, and a panel would repeat the switching-rate panel. For the speed axis, velocities are drawn from with maximum speed instead of 2; FELSTM's lattice contains only the velocities of speed at most 2. Relative accuracy divides each model's accuracy in a cell by its accuracy on the training motion.
B.3 KTH Action Recognition under Camera Motion
Data. KTH has 599 videos of 25 people performing six actions in four scenarios, at 25 frames/s and pixels. Each video is annotated with the segments in which the action is performed. As in Keller (2025), the clips are the segments of at least 32 frames, converted to grayscale and resized to without keeping the aspect ratio. People 1–16, 17–20 and 21–25 give 1,517 training, 380 validation and 472 test clips. The model sees 16 frames of a clip, taken at every second frame, that is, at 12.5 frames/s. In training, this window is drawn at random, and with probability 1/2 all its frames are mirrored left to right. In validation and testing, each clip has one fixed window, not mirrored and shared by all test sets, so the test sets differ only in the camera motion.

(a) MELSTM

(b) FELSTM
Figure 14: Hidden states on Motion-Only MNIST. Channel-averaged state of each MELSTM slot (a) and of the FELSTM copies at the velocities the digit takes during the context (b); the bottom rows show the input frames. The digit's outline is drawn only for the reader: the frames themselves are pure noise. MELSTM's slot follows the digit and accumulates its shape, while follows the background; because the digit's velocity keeps changing, no FELSTM copy accumulates the shape for long.

Figure 15: Example KTH clip with and without camera shake. All 16 frames of a handwaving clip from the test set. Top: original clip (static camera). Bottom: the same clip with the camera shaking horizontally, with A = 8 px and P = 8 frames (1.6 Hz).
Camera motion. The frame at time is translated by a whole-pixel displacement , with and wrap-around. Since every model uses circular padding, this is an exact group action without boundary effects. In a shake, each axis of follows , rounded to whole pixels and shifted so that ; the amplitude , the period in frames and the phase are drawn once per clip and per axis, and the frequency is Hz. The training shake has px and ( Hz). Its fastest step, , stays below 1 px, so every step lies in , and the scene never moves more than 4 px from its first position. Amplitudes below 0.5 px round to no motion, so 6% of the training clips are static. Validation uses the training shake. See Figure 15 for an example of a sequence with and without camera shake.
Models. All models use the same convolutional encoder, with 64 hidden channels and circular kernels (150,016 parameters), the max over copies or slots of the final hidden state, and the classifier head of Appendix B.2 with 64 channels and an MLP with leaky ReLU (128,262 parameters). FELSTM carries 9 copies at the velocities of while MELSTM has 2 slots, whose velocities are estimated to sub-pixel precision and applied with an interpolating warp, and slot tracking considers every displacement up to half the frame. Its frame-pair velocities are the two strongest peaks of . They come as an unordered set, so each is given to the slot whose previous velocity is nearest. A constant camera shifts the new peaks and the previous velocities alike and leaves this matching unchanged, but a camera whose velocity changes does not, and a slot can then be given the velocity of another slot's content. Slot tracking needs no matching, since each slot finds its own content in the next frame, and is equivariant to any camera path. Frame-pair velocities are therefore used only early in training: each step of each training sequence uses them with a probability that decays from 1 to 0 along a half cosine over the first 200 epochs, and slot tracking otherwise. Evaluation uses slot tracking only.
Training. Every model is trained for 500 epochs of 48 batches of 32 clips, about 24,000 steps, with Adam, a learning rate decaying from to along a cosine, gradient clipping at 1 and cross-entropy. Before every validation and test pass, the head's BatchNorm statistics are re-estimated on 30 training batches (precise BatchNorm; Wu & Johnson, 2021), and the checkpoint with the best validation accuracy is tested. The seed sets the weights, the data order, the training windows and the mirroring; evaluation windows and camera paths are the same for all seeds. On one NVIDIA A100 GPU, the training pass of an epoch takes 1.3 s for LSTM, 9.1 s for FELSTM and 3.8 s for MELSTM (median over epochs).
Shake map. Figure 7 uses px and frames, with a random phase per axis and clip; is left out because it rounds to no motion. The fastest shake moves the camera by up to 11 px between frames. A shake stays on FELSTM's lattice when its fastest step is at most 1 px, roughly , which holds in 16 of the moving cells.