Field Matching: an Electrostatic Paradigm to Generate and Transfer Data

Alexander Kolesov, Manukhov Stepan, Vladimir V. Palyulin, Alexander Korotin

TL;DR

The paper introduces Electrostatic Field Matching (EFM), a novel generative modeling framework inspired by the physics of an electrical capacitor. By treating source and target data distributions as positive and negative charges on parallel plates, EFM trains a neural network to learn the resulting electrostatic field lines, allowing data to be deterministically transported from one distribution to another. This approach provides a mathematically proven paradigm for both unconditional data generation (noise-to-data) and domain translation (data-to-data).

What Problem Does This Paper Address?

Most modern generative models, such as Diffusion Models (DMs) and Poisson Flow Generative Models (PFGMs), excel at mapping simple noise to complex data distributions. However, adapting these physics-inspired frameworks directly to data-to-data translation tasks (like converting an image of a horse to a zebra, or changing artistic styles) is notoriously difficult.

While recent extensions like Flow Matching (FM) handle data-to-data tasks using time-dependent velocity fields, electrostatic-based models have been left behind because they typically map data to a hemisphere at infinity. This paper bridges the gap by introducing a bounded, parallel-plate capacitor framework that natively supports data-to-data translation using static, space-conditional electrostatic fields.

Methods

The core idea of EFM is to simulate a $(D+1)$-dimensional capacitor to move data through a virtual physical space:

  1. The Capacitor Setup: Given a source distribution $\mathbb{P}(\mathbf{x}^+)$ and a target distribution $\mathbb{Q}(\mathbf{x}^-)$ in $\mathbb{R}^D$, the authors embed them into a $(D+1)$-dimensional space by adding a spatial coordinate $z$. The source is placed on the hyperplane $z = 0$ and assigned a positive charge, while the target is placed on the hyperplane $z = L$ and assigned a negative charge.
  2. Learning the Field: These charges generate a static electric field $\mathbf{E}(\tilde{\mathbf{x}})$. The authors train a neural network $f_\theta$ to approximate the normalized ground-truth electric field lines between the plates using a mean squared error objective.
  3. Inference via ODEs: To transform a sample from the source distribution into the target distribution, the sample starts at $z = 0$ and is pushed along the learned electrostatic field lines using an Ordinary Differential Equation (ODE) solver until it reaches the target plate at $z = L$.
Figure 1. Our Electrostatic field matching (EFM) method. Two data distributions P(x+) and Q(x−), x± ∈RD are placed in the space RD+1 in the planes z = 0 and z = L, respectively. The dis- tribution P(x+) is assigned a positive charge, and the distribution Q(x−) – a negative charge. These charges create an electric field E(ex), where ex = (x, z) ∈RD+1. The lines of the field begin at positive charges and end at negative charges. Movement along the electric field lines provably (see our Theorem 3.1) transforms the distribution P(x+) into the distribution Q(x−).

Datasets

The authors evaluated EFM across several generative and translation tasks:

  • 2D Toy Data: A Gaussian-to-Swiss Roll distribution mapping to visualize field lines and trajectory behaviors.
  • Colored MNIST: A modified version of the classic MNIST dataset where digits are randomly colored, used for unpaired image-to-image translation (converting digit 3 to digit 2) and unconditional image generation.
  • CIFAR-10: A standard natural image dataset used to evaluate high-dimensional unconditional image generation performance.

Key Insights and Ideas

  • Space-Conditional vs. Time-Conditional: Unlike Flow Matching, which relies on a velocity field that changes over time, EFM uses an electric field defined purely by space. The trajectories are dictated entirely by the geometry of the data distributions and their physical positions on the plates.
  • The Impact of Plate Distance ($L$): The distance $L$ between the capacitor plates is a critical hyperparameter. When $L$ is small, the electric field lines are nearly straight, making them easy for a neural network to learn. When $L$ is large, the field lines become highly curved and dispersed, significantly increasing the difficulty of the learning task.
  • Trajectory Traps and Practical Shortcuts: Theoretically, some field lines can overshoot the target plate ($z > L$) or loop backwards. While the authors provide a rigorous stochastic framework to handle these edge cases, they discovered that simply stopping the ODE solver the first time a trajectory hits $z = L$ works remarkably well in practice.

Key Results

  • Image-to-Image Translation: On the unpaired Colored MNIST (3 $\rightarrow$ 2) task, EFM successfully translated both the structural shape of the digits and their color distributions. It performed comparably to or better than established baselines like Flow Matching, Cycle-GAN, DDIB, and DSBM.
  • Unconditional Generation: EFM successfully generated high-quality images from pure white noise on both Colored MNIST ($L=30$) and CIFAR-10 ($L=500$), matching the qualitative performance of the original Poisson Flow Generative Models.

Limitations and Future Work

  • The Curse of Dimensionality: In very high dimensions ($D$), the $1/\|\mathbf{x} - \mathbf{x}'\|^D$ multiplier in the electrostatic field equations can yield values that hit machine precision limits, potentially destabilizing neural network training.
  • Optimal Hyperparameter Selection: There is currently no analytical method to determine the ideal interplate distance $L^*$. The authors note that it must be chosen empirically based on the standard deviation of the datasets.
  • Ignoring Backward Lines: To save on training volume, the practical implementation ignores backward-oriented field lines. If the source and target distributions suffer from massive mean shifts, omitting these lines might prevent the model from fully covering the target distribution's support.

Summary updated

Abstract

We propose Electrostatic Field Matching (EFM), a novel method that is suitable for both generative modeling and distribution transfer tasks. Our approach is inspired by the physics of an electrical capacitor. We place source and target distributions on the capacitor plates and assign them positive and negative charges, respectively. Then we learn the electrostatic field of the capacitor using a neural network approximator. To map the distributions to each other, we start at one plate of the capacitor and move the samples along the learned electrostatic field lines until they reach the other plate. We theoretically justify that this approach provably yields the distribution transfer. In practice, we demonstrate the performance of our EFM in toy and image data experiments. Our code is available at https://github.com/justkolesov/FieldMatching
BibTeX
@inproceedings{kolesov2025field,
  author = {Alexander Kolesov and Manukhov Stepan and Vladimir V. Palyulin and Alexander Korotin},
  title = {{Field Matching: an Electrostatic Paradigm to Generate and Transfer Data}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=9dHilxylvC},
}
Figure