Skip to main content
BVDNET
Arnhem · websites & automationBVDNET
Research

Latent space manipulation

Latent space manipulation changes the numbers an AI model works with internally to change its output, such as making a face look older or a chatbot's tone warmer.

Also known as: latent space editing, hidden state manipulation, activation manipulation

Latent space manipulation means changing the numbers an AI model works with internally while it runs, to change its output. The input and the model itself stay the same. Researchers used it to make a generated face look older or smile, and in chatbots the same idea is called activation steering. For a business it matters because it can reveal a bias that a model's answers do not show.

What is being changed?

A neural network turns its input into lists of numbers: points in its latent space. Manipulating that space means changing such a point along the way. You can move it in a direction that stands for a property, add a vector to it, or mix in numbers from another model. The weights, which hold what the model learned in training, do not change. You do need access to the model's internals, so this works on models you run yourself, such as open-weight models.

Where does it come from?

The idea took shape in image generators. Shen et al. (InterFaceGAN, 2019) studied GANs that generate faces. For five properties (pose, smile, age, gender and eyeglasses) they trained a simple linear classifier on the latent codes of generated faces, 512 numbers per face. Each boundary sorted the faces correctly more than 95% of the time on their validation set. Moving a code across a boundary changed that property: the same face turned older, started to smile or turned its head. Combined with a method that finds the code for an existing photo, it also edited real photos, without retraining the model.

How is it used in language models?

  • Steering. Activation steering adds a direction to a language model's activations while it answers, for example to change its tone.
  • Reinjecting what the model hides. A model can hold information that its answers do not show, and putting it back in at the right layer changes the answers, as the example below shows.
  • Coupling two models. The Bicameral Model (Flamant, Ghai and Shimizu, AWS, May 2026) runs two language models side by side, and a small trained interface translates the hidden states of one and mixes them into the other. With a calculator on the second model, two small models scored 96.5% on arithmetic, against 36.2% for one model alone. That was the best of 890 configurations tested.

To change a property on purpose, you first need to know where it sits. InterFaceGAN used classifiers for that. Anthropic's natural language autoencoders (NLAs, May 2026) translate an activation into readable text. Anthropic used them in the pre-deployment alignment audits of Claude Mythos Preview and Claude Opus 4.6, and warns that the explanations can be wrong.

Where does it go wrong?

  • Properties are tangled. In the photos InterFaceGAN's models learned from, older people wore eyeglasses more often, and the latent space carried that link: editing one property could change another. The researchers removed the overlap between two directions, so that they could, for example, add eyeglasses while the age stayed the same.
  • A change can cost something elsewhere. In the Bicameral tests the coupling lowered the score on GSM8K word problems from 49.6% to around 40% in all 890 configurations, and running two models in lockstep can double the compute.
  • Access that allows repairs also allows abuse. Steering can switch off the safety training of an open-weight model, as described under activation steering.

Example

Tripathy and Buckmann (May 2026) tested open-weight models on mortgage underwriting, with pairs of applications that differed only in racially associated names. The decisions showed no bias. Inside, the models kept the demographic information and even amplified it across their layers. When the researchers reinjected that information at critical layers, decisions reversed almost completely, and the effect worked mostly in one demographic direction. The hidden bias could also be brought out with adversarial prompts or parameter-efficient fine-tuning. The authors conclude that audits that only check outputs are not enough, and propose testing both the outputs and the internal representations of models used for such decisions.