Toward an Interface for Generative Model Output Manipulation via High-Dimensional Space Navigation
Generative models encode data and behavior in high-dimensional representation spaces, where surprisingly simple vector operations can often produce meaningful changes in model outputs. This article develops an intuitive geometric view of model steering through three basic ingredients: a base point, a direction, and a step size. Using a deterministic generative model (StyleGAN2)
Many people have encountered the famous example of king − man + woman ≈ queen observed in word embedding models
Generative AI is now foundational across domains: language models generate text and code
The representations differ: StyleGAN2 maps a random vector to an intermediate style code
To understand how steering works, we first need to understand latent spaces. In image generator models such as StyleGAN2
Generative model is composed of a seuqence of computation blocks, transforming input latent code (e.g., samples from a gaussian distribution) into intermediate/latent representations. By carefully choosing which latent space we work on for manipulation/steering, we are able to plot a sensible map of the entire latent landscape. As an example, here we use StyleGAN2's 32x32 convolutional block output, average downsampled to 5x5 feature maps, and use UMAP
The math behind many steering techniques is remarkably simple: Starting from the latent vector of one example, we add or subtract another vector representing a direction. These operations often produce smooth, meaningful transformations despite involving nothing more than elementary linear algebra. In this session we explain the contextural meaning behind adding and subtracting vectors in the latent space. And show how it behaves in real-world datasets and generative models.
As with any journey across a map, we first have to decide where it begins. And in everyday life we rarely name that starting point by its coordinates. Latitude and longitude are precise and useful, but they are not how people actually navigate a place; we reach instead for landmarks — familiar checkpoints, and positions described relative to them.
Latent space works the same way. Its landmarks are the sample points the dataset already gives us, and each one also has an exact address: the high-dimensional coordinates that play the role of latitude and longitude. So a journey begins at some sample $z_i$, written as the vector
The direction determines which way the base point moves in the latent space.
Given two groups of examples of opposite concepts (e.g., short and long hair), the difference between their average latent representations captures what distinguishes them and steers a base point toward either concept.
In the simplest form, each group is a single example:
Once we know which direction to move, the next question is how far to go. The step size sets the strength of the change: a small step gives a subtle change, a larger one pushes the result farther along the direction. With
Here,
Given a map of the latent space, we can browse all of it by sweeping a lens across the map, continuously blending the samples under the lens into a single latent vector (a weighted interpolation we detail in the next section). This lifts movement on the 2D map back into the high-dimensional space: as the lens moves, it traces a continuous 2D surface of interpolated latent vectors. Unlike a linear projection, which is confined to a single linear subspace, this surface can bend through the space, so simple two-dimensional navigation reaches a richer variety of the latent landscape.
A landmark is rarely exactly where we want to be. Rather than snapping to the nearest sample, we can place a point among several of them and let each one pull on it according to how close it is. One way to think about this interaction is as a color-mixing palette: moving reference examples, like different paints, closer to the central interpolation point gives them greater weight in the resulting mixture. Another analogy is an octopus pulling on a collection of marbles: examples closer to the control point exert a stronger influence, while more distant examples contribute less.
Specifically, we combine the latent codes of the reference samples, $z_i$, using a weighted linear combination:
The interface therefore behaves partly like PromptPaint
Unlike a slider, which moves along one predefined direction, one 2D gesture reweights many examples at once, so the layout of the neighborhood around the mixing point matters as much as the weighting function: it decides which subspace the interface can reach. The mesh on the right of the figure above is that subspace, and rearranging the samples on the left reshapes it; we return to what makes a good layout in the discussion.
As we have seen, a steering direction can be defined by contrasting two sets of examples: a positive group and a negative group. The difference between their aggregated latent representations determines a semantic direction in the latent space. The global browsing interface can therefore serve not only as a tool for exploration, but also as an interactive mechanism for selecting and constructing these contrastive groups directly from the data. By browsing the latent landscape and identifying representative regions, users can define steering directions visually rather than specifying them through individual examples or predefined labels.
As a simple example that we have explained, a direction can be defined by subtracting two endpoints: an example representing the desired destination minus an example representing the opposite concept. In this case, the direction is specified using only two examples.
More generally, a direction can also be defined as the difference between the averages of two groups, or as the average of the differences between matched positive–negative pairs.
Contrastive pairs are only one way to get a direction. Any vector field over the latent space can serve, and a direction can also be derived from the model's local geometry, for example from a basis given by its Jacobian matrix. Contrastive pairs are the simpler and computationally cheaper choice.
We use faces to demonstrate the basic idea of vector arithmetic in generative models:
On the same StyleGAN2/FFHQ map as above, laid out by UMAP
A direction defined by the difference between two sets of examples works well in style space, but it is only an approximation and easily picks up correlated attributes: in the example above, the gender direction also changes hair length. The fewer the examples in each group, the worse this gets, since their difference captures several correlated variations at once. Ideally the two ends would differ in a single feature, but such matched pairs are rare in the data. This is what the local mixing of the previous section is for: the base, positive and negative points need not be individual examples, and each can be a weighted mix of nearby ones, adjusted until the unwanted variations cancel.
Contrastive examples can also come from elsewhere other than a map-based interface, such as manual annotation or crowdsourcing. And, as noted above, the single global direction used here is the simplest case of a vector field, whose direction can depend on where it is applied. This part of the interface is meant for exploration, to get an initial feel for the data landscape and experiment with steering, rather than for precise control or for defining contrastive pairs at scale.
Setting the step size means deciding how far to follow the direction arrow. Read as a vector field
and the step size
Together, the examples show how a map-based interface supports each stage of steering: browsing the latent space, picking examples to define a direction, and refining it locally through interpolation.
Dimensionality reduction lays a latent space out as a 2D map to explore with the generative model, but no 2D projection preserves all of a high-dimensional space's structure. How, then, should an interface support navigation within such a space? Part of the answer is that the three ingredients need not share an interface, or even a space. In our prototype they already part: the map projects the generator's internal activations, the mixing and steering happen in its style space, and how far a step may go can be judged on the decoded outputs. A unified interface has to coordinate these, letting the user place a base on one map, define a direction in another and set the step size and its boundary against a third, while keeping the views consistent.
The steering mechanism in this article was designed by hand, but an interface like the octopus or the palette is, in general, a mapping from 2D interaction to motion in a high-dimensional latent space, and the properties we want of that mapping can guide its design toward one that both matches our intuition and respects the latent geometry. We outline several for the 2D surface the control point sweeps out over a layout of reference points; the weight functions' own properties are in the technical details.
Coverage: Because the reference points can be moved freely, the interface can reach any convex combination of them, that is, any point of the simplex they span. Reaching one may take several moves, but like a set of sliders it loses nothing: the 2D interface offers a lower-dimensional way through the full set of mixtures.
Choice of Anchor Points: The anchors decide which simplex that is. Anchors close together span a small region whose mixtures stay near the data; anchors far apart reach further, but their mixtures can leave the valid region (in a diffusion model's latents, an average of distant samples decodes to little more than a blur). Which anchors, and how many, trades reach against simplicity, a choice that could be guided by the data's density or the diversity of the selection.
Less Twisted Surfaces: The layout decides how the surface sits in the latent space. If neighbors in the layout are far apart in latent space, the surface folds over itself and a small move produces a large, erratic change. A layout whose neighbors are also latent neighbors avoids this, for instance by ordering the anchors along a shortest Hamiltonian path through their latent positions (NP-hard exactly, though a heuristic may do for a handful of anchors). In the same spirit, codes that co-occur in the model's output would ideally sit close together, so they are activated together in the interface.
What Interactions Imply About the Subspace: Dragging the control point
So far we have treated every direction as available and every point as reachable. In practice, not every location in a generative model's representation space yields a meaningful, valid or desirable output, so a steering interface has to consider not only where a user can move but also where they should. The reasons vary: in safety-critical applications some regions are harmful or prohibited; in engineering and design, physical laws, fabrication limits or interlocking geometry rule out combinations that can still be represented numerically; in science, domain constraints decide whether a generated material, molecule or structure is plausible.
One view separates the ambient space from its valid subset. Under the manifold assumption, meaningful samples lie on a lower-dimensional region and navigation should stay close to it; alternatively, the model's density gives a soft boundary, keeping exploration where the likelihood exceeds a threshold. Constraints can also become part of the interaction itself: an interface could project a proposed move back onto the valid region, bend the available directions near a boundary, or warn as a trajectory approaches infeasible space. Building such constraints in is beyond the scope of this article, but it is what would turn latent-space navigation from an explanatory metaphor into a practical interface.
The same intuition extends beyond latent representations, to methods that modify the model itself. A Low-Rank Adaptation (LoRA)
The equation king − man + woman ≈ queen carries a simple language for model steering: choose a base, a direction and a step size. That picture is an approximation, since directions entangle correlated attributes, vary across the latent space and resist any single 2D projection, which is why we pair a global map with contrastive directions and local interpolation. Vector arithmetic thus serves not only as a mathematical tool, but as an abstraction for designing more interpretable and controllable interfaces to generative models.
To see what interpolating over a 2D map does to a shape whose structure we know, we use the Klein bottle
with constants
In principle the weighting function can be any decreasing function of distance: nearby examples contribute more, distant ones less. The figures offer four, each reaching zero at a cutoff radius
Because all four have a cutoff, all four give a local mixture: only samples within
Within that radius the functions differ in where they discriminate, which is how much of the neighborhood one control point speaks for. The smoothstep is nearly flat close in and spends its discrimination near the rim, giving a strictly local mixture with a nearly uniform interior, much like a smooth
Three properties of the navigation surface follow from the weight function. All four are continuous in distance, so the mixture moves continuously as