ResidualAnchor

Fast local sampling in continuous latent space

Flow matching generates an image by consulting the same neural network several times along a path from noise. ResidualAnchor tests how much of that repeated inference can be avoided: it starts from a stored representation the decoder already understands, makes one small geometry-aware move, and decodes once. That representation is a long list of numbers called a latent. PCA splits it into a smaller map that is easier to move through and a remainder that preserves detail worth keeping. A class-conditional Gaussian mixture model, or GMM, learns the typical local shapes within each class, describing which directions and scales vary around an anchor.

  1. 01
    Anchor

    Choose an image from class and use its saved latent as the starting point. The encoding is prepared before sampling.

    ze,a=E(xa),xaDyz_{e,a} = E(x_a), \quad x_a \in \mathcal{D}_y
  2. 02
    Split

    Project the anchor into the smaller coordinate that is easy to move through, then preserve the fine detail removed by compression as .

    ua=PCA(ze,a),ra=ze,aPCA1(ua)u_a = \operatorname{PCA}(z_{e,a}), \quad r_a = z_{e,a} - \operatorname{PCA}^{-1}(u_a)
  3. 03
    Move

    Assign the anchor to its most likely GMM component . Its covariance shapes a zero-mean local change , while controls how far moves.

    εN(0,Σy,k),u=ua+τε\varepsilon \sim \mathcal{N}(0, \Sigma_{y,k}), \quad u' = u_a + \tau \varepsilon
  4. 04
    Decode

    Map the moved coordinate back to the full latent, restore , and decode once to produce the final image .

    ze=PCA1(u)+ra,x=D(ze)z_e' = \operatorname{PCA}^{-1}(u') + r_a, \quad x' = D(z_e')

That is the entire sampling path. At = 0, it simply decodes the stored anchor without changing it. Positive values make a new local move; larger values move farther and generally exchange fidelity for more variation. We test this idea on CIFAR-10 using RF++ as the pretrained flow-matching baseline. RF++ starts from noise and asks a neural network which direction the image should move, repeating that process five times. ResidualAnchor tests what happens when those repeated flow-model calls are replaced with the single local move above.

Across every tested positive value of , ResidualAnchor recorded roughly 2,306 to 3,032 images per second with zero flow-model calls and one decoder pass. The chart below compares that recorded image throughput with distance from real CIFAR-10. Orange circles show ResidualAnchor at different move sizes, called . The green square shows the continuous autoencoder reconstruction reference, and the white diamond shows the five-step RF++ baseline. Higher means faster; farther left means closer to real CIFAR-10 in this measurement. The ideal direction is toward the top-left.

  • ResidualAnchor at different values of
  • Continuous autoencoder reconstruction
  • RF++ flow-matching baseline
Recorded image throughput and distance from real CIFAR-10Continuous autoencoder reconstruction reports 5,196.668 images per second at a feature-space distance of 7.0956. Five positive-temperature ResidualAnchor settings report roughly 2,300 to 3,000 images per second with distances near 9 to 11. RF++ reports 170 images per second and a lower distance of 4.45. Higher is faster and farther left is closer to the real-image distribution in this metric.Distance from real CIFAR-10 ↓Images / second ↑Continuous reconstructionτ = .01τ = .025τ = .05τ = .075τ = .10RF++ · 5 flow calls
Continuous reconstruction
5,197/s7.10 distance
= .01
2,598/s8.95 distance
= .025
2,306/s9.10 distance
= .05
2,986/s9.35 distance
= .075
2,987/s10.02 distance
= .10
3,032/s10.68 distance
RF++ · 5 flow calls
170/s4.45 distance
Exact recorded generation speed and feature-space distance values
Generating methodFeature-space distanceImages / secondFlow-model callsTiming source
Continuous reconstruction7.09565196.6680In-process reconstruction
τ = .018.95432597.5070In-process evaluation
τ = .0259.09772305.6500In-process evaluation
τ = .059.35192986.0350In-process evaluation
τ = .07510.02242986.9760In-process evaluation
τ = .1010.68103032.1900In-process evaluation
RF++ · 5 flow calls4.4545170.0185Saved run metadata

A pretrained ResNet18 turns the real and evaluated images into feature vectors, then this distance compares the average and spread of those two sets. Lower means closer according to that network. This score is a distribution-level measurement, not a grade for each picture, and it is not standard Inception FID. Each group below shows all 16 published samples in a four-by-four grid. Groups were sampled independently, so positions do not follow one anchor as changes.

Existing images rebuilt

Continuous reconstruction Autoencoder reference

Samples / second
~5,197
Flow evaluations
0
Feature distance ↓
7.10
Stored-anchor replay

ResidualAnchor = 0

Samples / second
~1,494
Flow evaluations
0
Feature distance ↓
9.17
Small move

ResidualAnchor = 0.025

Samples / second
~2,306
Flow evaluations
0
Feature distance ↓
9.10
Medium move

ResidualAnchor = 0.05

Samples / second
~2,986
Flow evaluations
0
Feature distance ↓
9.35
Larger move

ResidualAnchor = 0.10

Samples / second
~3,032
Flow evaluations
0
Feature distance ↓
10.68
Flow baseline

RF++ baseline 5 flow steps

Samples / second
~170
Flow evaluations
5
Feature distance ↓
4.45

Reconstruction rebuilds existing test images and = 0 decodes stored anchors, so neither is independent generation. The chart also includes = 0.01 and = 0.075, which were measured quantitatively but are not shown in these image grids.

These measurements show a tradeoff, not a winner. ResidualAnchor occupies the faster region of the recorded results; RF++ occupies the lower-distance region. There is no universally best value of . Smaller moves stayed closer to their anchors; larger moves generally increased variation and distribution distance. To see whether the shortcut could inherit more of the flow model’s geometry, we used a frozen RF++ model as a teacher and adapted the GMM’s local movement. The generation path itself did not change: sampling still uses no RF++ calls. The adapted sampler followed the teacher more closely, while its measured distance from real images remained essentially unchanged. The teacher transferred local geometry, not a measurable image-quality gain.

VLA, world-model, video-model, and flow-based action policies often place an iterative generative sampler between the model backbone and the result the system uses. If an analogous local sampler preserves task-level behavior while replacing several field evaluations with one learned local move, it could shorten that stage, increase the control rate, produce more candidate actions per cycle, or free compute for perception and planning.

Sampling speed alone is not enough. Image-distribution measures such as FID - and the related ResNet feature-distance score used above - describe visual similarity, not whether a predicted action is safe, dynamically feasible, or effective. Many robot action spaces are smaller and more structured than image space, so an image-level fidelity change does not translate directly into the same loss of action quality. The useful threshold is the fastest setting that preserves trajectory accuracy, constraint satisfaction, task success, and closed-loop stability, as well as temporal or rollout consistency where relevant.