Inverting Data Transformations via Diffusion Sampling

Jinwoo Kim, Sékou-Oumar Kaba, Jiyun Park, Seunghoon Hong, Siamak Ravanbakhsh

Deep learning models are notoriously brittle when confronted with geometric transformations they did not encounter during training. Show a standard digit classifier a tilted or perspective-warped "3," and it will likely fail. While researchers have developed specialized "equivariant" neural networks to handle these shifts, such architectures are often difficult to scale and limited to specific types of transformations.

An alternative approach is canonicalization: attempting to "fix" or un-warp the input's pose before feeding it to the model. However, finding the correct inverse transformation is a blind inverse problem. The mathematical landscape of how well a transformation fits—the "energy landscape"—is typically rugged and full of local minima, causing standard optimization techniques to get stuck.

To solve this, researchers have introduced Transformation-Inverting Energy Diffusion (TIED), a novel framework that uses diffusion processes on Lie groups to mathematically reverse unknown geometric transformations at test time.

How TIED Works: Diffusion on Lie Groups

Instead of relying on a "best guess" optimization that might fall into a local minimum, TIED treats canonicalization probabilistically. It seeks to sample from a posterior distribution of possible inverse transformations. The "aha moment" of the paper is recognizing that diffusion is vastly superior to standard optimization for this task. At high noise levels, the diffusion process smooths out the rugged energy landscape, allowing the sampler to explore the space of transformations globally. As the noise anneals, the sampler settles into the most likely correct pose.

To achieve this, TIED relies on three key technical innovations:

  • Manifold-Native Diffusion: Continuous transformations (like rotations or affine warps) are mathematically represented as Lie groups. Unlike standard diffusion models that operate in flat Euclidean space, TIED operates directly on these curved manifolds.
  • Trivialization: Calculating gradients on curved surfaces is computationally prohibitive. TIED bypasses this by performing the heavy lifting in the Lie algebra—a flat vector space tangent to the group—and then mapping the results back to the group using an exponential map. This ensures all updates result in a valid transformation.
  • Trivialized Target-Score Identity: The authors developed a new mathematical identity that estimates the "score" (the direction to move to improve the transformation) using only an energy function, such as a classifier's confidence or a VAE's reconstruction error. Crucially, this means TIED does not require "clean" examples of the transformations to work.

By shifting the burden of equivariance to inference time, TIED allows standard, pre-trained neural networks to become robust to complex distortions without any retraining or specialized architectural changes.

Experimental Validation

The researchers evaluated TIED across three distinct domains, demonstrating its versatility across different types of Lie groups:

  1. Synthetic Sampling: Tested on a high-dimensional SO(10) group to prove the algorithm can handle complex, 45-dimensional transformation spaces.
  2. Image Classification: Evaluated on affNIST (MNIST digits with affine transformations) and homNIST (perspective warps). Under heavy distortion on affNIST, a standard ResNet18's accuracy plummeted to ~55%. Using TIED to un-warp the images restored accuracy to 82.6% using the classifier's own confidence as the energy function, and up to 96.9% when using a VAE-based energy model. Remarkably, TIED outperformed specialized equivariant architectures (like affConv and homConv) on their respective tasks.
  3. Scientific Modeling: Applied to solving Partial Differential Equations (PDEs) like the 1D Heat and 1D Burgers' equations subject to complex Lie point symmetries. TIED achieved significantly lower L2 errors (e.g., 0.043 versus 0.565 for Langevin baselines) when the physical system was subjected to unknown coordinate transformations.

Despite being a sampling-based method, TIED is highly parallelizable. The authors found that using just 10 Monte Carlo samples was often sufficient to achieve high performance.

Limitations and Future Directions

While TIED offers a powerful, general-purpose approach to robustness, it comes with trade-offs. The primary limitation is computational overhead. Because it requires multiple steps of diffusion at test time, it is inherently slower than a single forward pass of a standard network. Furthermore, TIED's success is heavily dependent on the quality of the underlying energy model; if the classifier or VAE used to judge the transformation is poorly trained, the un-warping process will struggle.

Looking forward, the authors suggest exploring consistency distillation—a technique widely used in image generation to compress dozens of diffusion steps into just one or two. This could make the un-warping process nearly instantaneous. Additionally, the framework shows significant promise for applications beyond classification and PDE solving, such as complex image registration tasks.

Summary updated

BibTeX
@inproceedings{kim2026inverting,
  author = {Jinwoo Kim and Sékou-Oumar Kaba and Jiyun Park and Seunghoon Hong and Siamak Ravanbakhsh},
  title = {{Inverting Data Transformations via Diffusion Sampling}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=GK89Mi6ZRf},
}
Figure