Manuscript Offprint

arXiv:2609.35710

Lagrangian--Hamiltonian Flows for Video Prediction and Image Generation: A Symplectic Perspective

Jiawei Hu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

We introduce LHFM, a geometric framework for learning image dynamics. Drawing on structures central to classical mechanics, symplectic geometry, and geometric quantization, LHFM represents each image as an exact Lagrangian graph and models its evolution through image-dependent Hamiltonian flows, which yield a transport–source parameterization of image velocities. Our primary application is deterministic video prediction: LHFM-V is a recurrent model that advances frames by integrating predicted transport and source fields, and achieves the lowest reported FLOP count among the compared recurrent models with similar prediction accuracy. The image variant, LHFM-I, shows that the same construction is compatible with flow matching: in a matched experiment, it attains a lower FID than the flow-matching baseline. Code is available at https://github.com/Lilas-Q/Geometric_quantization_models.

1 INTRODUCTION

Diffusion models and flow-based generative models generate images by transforming a simple distribution into the data distribution (Ho et al., 2020; Song et al., 2021; Lipman et al., 2023). Flow matching (FM) provides a simulation-free training objective for continuous normalizing flows by regressing a time-dependent vector field onto conditional vector fields (Lipman et al., 2023). In the original FM formulation, the network directly models a vector field on the data space where each image represents a point of this space.

A similar perspective applies to video prediction: conditioned on the observed sequence, a learned flow evolves the observed frames into future frames. Thus, image generation and video prediction can both be formulated as learning a flow on image space, although their initial conditions and training objectives differ.

Image dynamics involve both spatial structure (pixel locations) and color (channel values). In standard FM, however, the vector field acts on channel values at fixed pixel locations, so changes in spatial structure are reflected only implicitly through changes in color. This motivates a question: how can these two aspects of image evolution be expressed through a common geometric representation?

We answer this question by introducing Lagrangian–Hamiltonian Flow Matching (LHFM), a geometric framework that combines Lagrangian image representations with Hamiltonian dynamics. A Lagrangian submanifold can be viewed as a “generalized point” which encodes the space and phase simultaneously. Motivated by this, we represent each image as an exact Lagrangian graph that jointly encodes pixel locations and channel values. Image evolution is then described by Hamiltonian flows that transport these graphs, as illustrated in Figure 1. Throughout, “Lagrangian” refers to a submanifold rather than to an action functional.

A central issue is compatibility: a Hamiltonian flow preserves the Lagrangian property but need not preserve a graph representation. We show that a Hamiltonian transports a prescribed family of exact Lagrangian graphs if and only if it satisfies a Hamilton–Jacobi condition. This characterization leads to a natural parameterization of the vector field on the data space in terms of a transport vector field,

Figure

Figure 1: Hamiltonian deformation of a Lagrangian submanifold. For a fixed image trajectory, the time-dependent ambient Hamiltonian HtH_t transports L0L_0 to Lt=Φt(L0)L_t = \Phi_t(L_0). The surfaces schematically represent higher-dimensional exact Lagrangians.

which moves spatial locations, and a source field, which changes channel values along that motion. The construction is detailed in Section 4.

We instantiate LHFM as LHFM-I for image generation and LHFM-V for deterministic video prediction, where I and V denote image and video, respectively. We evaluate the two variants on unconditional CIFAR-10 generation and Moving MNIST prediction. In a matched comparison, LHFM-I improves upon the standard independent conditional flow-matching baseline. LHFM-V uses a recurrent architecture and has the lowest reported FLOP count among the compared recurrent models with similar prediction accuracy.

The primary focus of this work is deterministic video prediction: LHFM-V is our main method, and the video experiments constitute the main empirical evaluation. LHFM-I is included to show that the same transport–source parameterization is compatible with flow-matching image generation without changing the training objective. We therefore evaluate LHFM-I only in a controlled comparison against a matched I-CFM baseline, and we do not claim state-of-the-art image generation.

Our contributions are:

• to our knowledge, the first representation of images as exact Lagrangian graphs, with a Hamilton–Jacobi characterization (classical in form; proved in Appendix A.3) of the Hamiltonians that transport them;

  • a transport–source parameterization derived from it, which contains the standard flow-matching velocity as the case Ut≡0U_t \equiv 0; and

• empirical studies on deterministic Moving MNIST prediction, where LHFM-V has the lowest FLOP count among the compared recurrent video predictors (Table 3), and on CIFAR-10 generation, where LHFM-I attains a lower FID than a matched I-CFM baseline, demonstrating compatibility with flow matching.

References (47)