---
title: Temperature-Steerable Flows (TSFs)
url: https://www.emergentmind.com/topics/temperature-steerable-flows-tsfs
type: topic
---

# Temperature-Steerable Flows (TSFs)

Temperature-steerable flows (TSFs) are normalizing-flow-based generative models for equilibrium statistical mechanics that learn a temperature-indexed family of probability densities rather than a single thermodynamic state. In the Boltzmann-generator literature, TSFs were introduced to model canonical distributions of the form \(p_X(x;\tau)\propto \exp(-U(x)/\tau)\), with \(U(x)\) the potential energy and \(\tau = k_B T\) the thermal energy, so that one trained model can be steered across temperatures and embedded in generalized-ensemble samplers such as parallel tempering [2012.00429]. Their defining feature is not merely temperature conditioning, but a temperature dependence constructed to follow the scaling law of Boltzmann densities across thermodynamic states [2108.01590].

## 1. Problem setting and conceptual scope

The equilibrium sampling problem addressed by TSFs arises in many-body physics, chemistry, and molecular simulation, where the target density of configurations \(x\) is Boltzmann-like, \(p_X(x)\propto \exp(-u(x))\), or in the canonical ensemble \(p_X(x;\tau)\propto \exp(-U(x)/\tau)\). These densities are frequently multimodal, and transitions between metastable states can be rare. Traditional MCMC and MD are asymptotically correct, but can be slow on rough energy landscapes; generalized-ensemble methods such as parallel tempering reduce barriers by coupling replicas at multiple temperatures, but remain computationally expensive because they rely on physical simulation at every thermodynamic state [2012.00429].

Boltzmann generators combine a normalizing flow with statistical reweighting or MCMC correction in order to generate samples of a physical system’s equilibrium density. Standard Boltzmann generators, however, are usually trained for a single predefined thermodynamic state. TSFs were introduced to remove that restriction by learning a family of equilibrium distributions indexed by a choosable temperature parameter, so that one model can generate approximate samples across a range of temperatures and can also serve as a learned proposal mechanism inside generalized-ensemble sampling [2108.01590].

This formulation places TSFs at the intersection of invertible generative modeling and equilibrium thermodynamics. They are intended for tasks in which temperature dependence is itself part of the scientific object: sampling across thermodynamic states, transferring a model trained at one temperature to another, estimating temperature-dependent observables, and accelerating replica-based workflows.

## 2. Temperature scaling law and formal definition

The defining mathematical observation is that changing the temperature from \(\tau\) to \(\tau'\) rescales a Boltzmann density by a power,
\[
\mu_X^{\tau'}(x)\propto \left[\mu_X^\tau(x)\right]^\kappa,
\qquad
\kappa=\frac{\tau}{\tau'}.
\]
A TSF is therefore a temperature-parametrized family of flow-generated densities that transforms under \(\tau\mapsto \tau'\) in the same way [2108.01590].

For a temperature-dependent flow \(f_\tau\) with prior \(p_Z^\tau\), the output density is
\[
p_X^\tau(x)=p_Z^\tau(z)\left|\det J_{f_\tau}(z)\right|^{-1},
\qquad
x=f_\tau(z).
\]
Temperature steerability requires
\[
p_Z^{\tau'}(z)\left|\det J_{f_{\tau'}}(z)\right|^{-1}
\propto
\left[
p_Z^\tau(z)\left|\det J_{f_\tau}(z)\right|^{-1}
\right]^\kappa .
\]
This condition is the precise statement that the model density must transform with temperature like a canonical equilibrium distribution rather than merely accept temperature as an input feature [2108.01590].

Within this framework, TSFs inherit the reweighting machinery of Boltzmann generators. For an observable \(o\),
\[
\langle o \rangle_{\mu_X^\tau}
=
\frac{
\left\langle o \, e^{-U/\tau - \log p_X^\tau} \right\rangle_{p_X^\tau}
}{
\left\langle e^{-U/\tau - \log p_X^\tau} \right\rangle_{p_X^\tau}
}.
\]
Because the flow defines a normalized density, the partition function can also be estimated as
\[
Z_\tau
=
\mathbb{E}_{x\sim p_X^\tau}
\exp\left[-\left(\frac{U(x)}{\tau}-u_X^\tau(x)\right)\right],
\qquad
u_X^\tau(x)=-\log p_X^\tau(x),
\]
which gives access to absolute free energies via \(F=-\tau \ln Z_\tau\) [2108.01590].

A common misconception is to equate TSFs with any temperature-conditioned normalizing flow. The literature instead defines TSFs through the Boltzmann scaling relation. This means that the prior and the Jacobian behavior of the flow must be chosen so that the induced density transforms correctly across temperatures.

## 3. Architectural realizations

A convenient exact construction uses a temperature-scaled Gaussian prior,
\[
p_Z^\tau(z)=\mathcal{N}(z\mid 0,\tau),
\]
since it satisfies the same power-law scaling across temperatures as a Boltzmann density. If, in addition, the flow has constant Jacobian determinant, the temperature dependence of the output density follows directly. Volume-preserving flows with \(\det J=1\) satisfy this trivially, but the TSF construction was designed to be more expressive by permitting constant Jacobians rather than only unit Jacobians [2012.00429].

The principal architecture combines ideas from stochastic normalizing flows and augmented normalizing flows. Instead of using only a latent variable \(z\), TSFs augment the latent space with auxiliary momenta \(q\), forming \(\upsilon=(z,q)\), with temperature-dependent priors
\[
p_Z^\tau(z)=\mathcal{N}(0,\tau),
\qquad
p_A^\tau(q)=\mathcal{N}(0,\tau),
\]
and joint prior \(p_\Upsilon^\tau(\upsilon)=p_Z^\tau(z)p_A^\tau(q)\). Sampling then proceeds conceptually by drawing auxiliary momenta, applying learned invertible dynamics \(D\) to produce \(\gamma=(x,p)=D(\upsilon)\), and projecting to configuration space \(x\). The map \(D\) plays the role that Hamiltonian dynamics would play in HMC, but here it is a deterministic learned map [2012.00429].

To enforce the constant-Jacobian property, the construction modifies an RNVP-style coupling network so that the product of scaling factors is unity, for example by subtracting the mean of the log scaling outputs from each scaling layer. A trainable scalar factor is applied to latent coordinates to correct for entropy mismatch between latent and configuration spaces while preserving the constant-Jacobian property [2012.00429].

The literature also discusses an approximate route via temperature-aware spline flows. With a uniform prior, the flow itself must carry the temperature dependence, and an approximate temperature-steerable neural spline flow can be built by scaling spline parameters with temperature. Exact steerability is therefore architecture-dependent: constant-Jacobian constructions can satisfy the scaling relation exactly, while spline-based approaches only approximate it [2108.01590].

## 4. Objectives, inference, and unbiased sampling

Training follows the Boltzmann-generator pattern of combining a forward-KL or maximum-likelihood term with an energy-based reverse-KL term. In one formulation the total objective is
\[
\mathcal{L}=(1-\lambda)\mathcal{L}_{ML}+\lambda \mathcal{L}_{KL},
\]
with \(\lambda\) increased during training [2012.00429].

For the augmented formulation, the maximum-likelihood term can be written as
\[
\mathcal{L}_{ML}
=
\left\langle -\log p_{X,A}^\tau \right\rangle_{\mu_{X,A}^\tau}
=
\left\langle
-\log p_{Z,A}[f_\tau^{-1}(x,p)]
-\log \left|\det J_{f_\tau^{-1}(x,p)}\right|
\right\rangle_{\mu_X^\tau(x)p_A^\tau(p)},
\]
and the reverse-KL or variational free-energy term as
\[
\mathcal{L}_{KL}
=
\left\langle -\log \mu_{X,A}^\tau + \log p_{X,A}^\tau \right\rangle_{p_{X,A}^\tau}
=
\left\langle
\tau^{-1}\left(U(x)+\frac{|p|^2}{2}\right)
-\log\left|\det J_{f_\tau}(z,q)\right|
\right\rangle_{p_{Z,A}^\tau(z,q)}
+\text{const.}
\]
These losses respectively encourage likelihood fit to a target-like distribution and direct alignment with the known physical energy [2108.01590].

At inference time, TSFs admit two distinct modes of use. Direct generation samples \(z\sim \mathcal{N}(0,\tau)\), transforms through the temperature-steerable flow, and returns \(x\). This can yield approximate Boltzmann samples at the chosen temperature, but the approximation can be biased if the model is not sufficiently expressive. The same flow can also be embedded in an MCMC procedure on the augmented phase space: one samples auxiliary momenta, maps the current state back to latent space, perturbs the latent variable with Gaussian noise, maps forward again, and accepts or rejects with a Metropolis criterion that enforces detailed balance at temperature \(\tau\) [2012.00429].

This distinction is central. Direct TSF sampling is generative and efficient, but not automatically exact. Reweighting and latent-space MCMC convert the learned model into an unbiased equilibrium sampler, which is why TSFs are usually discussed as components of a broader statistical-mechanical workflow rather than as stand-alone black-box generators.

## 5. Generalized ensembles and empirical behavior

TSFs were designed to fit naturally into generalized-ensemble methods, especially parallel tempering. In that setting, multiple replicas run at different temperatures, each replica performs TSF-based Monte Carlo moves at its own temperature, and replicas occasionally exchange configurations using the usual Metropolis exchange acceptance. The role of the TSF is therefore temperature-aware proposal generation inside a replica-exchange framework [2108.01590].

The reported experiments cover both toy and molecular systems. On a correlated multidimensional double-well system with \(d=5\) and \(d=20\), TSFs were compared against a standard RNVP flow with similar parameter count. Near the training temperature \(T=1\), TSF and RNVP were similar in the 5D case, whereas away from the training temperature TSF had significantly lower negative log-likelihood. In the 20D case, TSF outperformed RNVP even at the training temperature, which the authors interpreted as stronger temperature scaling and greater expressivity for temperature transfer [2012.00429].

On the 2D XY model, the model reproduced the temperature dependence of the magnetization, providing a direct demonstration that the learned density family captures thermodynamic variation rather than only static equilibrium structure [2108.01590].

On alanine dipeptide in implicit solvent, a TSF trained at \(T=600\) K reproduced the \(\phi,\psi\) Ramachandran distribution well at the training temperature and was then evaluated at \(T=300\) K against MD-generated ground truth. Direct TSF sampling at \(300\) K still captured the major minima but underestimated one of the basins, indicating imperfect expressivity; when the TSF was used inside the PT/MCMC framework, the correct \(\phi\)-distribution was recovered, and the energy histograms matched well at both temperatures [2012.00429].

The broader 2021 study also reports alanine dipeptide and tetrapeptide results in implicit solvent, with Ramachandran plots and free-energy profiles close to MD references, though some deviations remained. In parallel tempering, TSF-based proposals for alanine dipeptide produced more frequent transitions between metastable states, lower autocorrelation times, and about 4x better effective sample efficiency than REMD in the reported comparison. The same study further demonstrated estimation of absolute free energies from TSF samples on a toy 4D system, with good agreement to numerical ground truth [2108.01590].

## 6. Limitations, later developments, and terminological extensions

The limitations emphasized in the literature are structural rather than incidental. Exact steerability is architecture-dependent; neural spline flows only approximate the desired scaling; expressive power may be insufficient for harder systems, which can lead to under-sampling of some modes; and high-dimensional systems likely need better symmetry-aware conditioners and more specialized architectures. Direct samples may remain biased if the flow is not expressive enough, and, as with other flow-based samplers, ergodicity and convergence guarantees remain an open issue in general [2108.01590].

A second line of development places TSF-like ideas inside learned latent thermodynamic representations. “Latent Thermodynamic Flows” integrates SPIB with a normalizing flow, uses a temperature-steerable tilted Gaussian prior in latent space, and aims simultaneously to learn collective variables, classify metastable states, and generate equilibrium distributions across temperatures beyond the training data. In the reported RNA GCAA tetraloop application, data from only 300 K and 400 K were used to infer free-energy surfaces from 300 K to 460 K in 20 K steps, and the predicted unfolded fraction agreed with experimental thermodynamic characterization and simulated tempering results [2507.03174]. This is conceptually aligned with TSFs through its temperature-dependent latent prior, but it is not identical to the original Boltzmann-generator construction because it couples generative modeling to representation learning and metastability discovery.

A separate later development, “Temporal Score Rescaling for Temperature Sampling in Diffusion and Flow Models,” introduces an inference-time mechanism for steering a local sampling temperature in diffusion and flow-matching models by rescaling the learned noisy score field,
\[
\tilde s_\theta(x,t)=r_t(k,\sigma)s_\theta(x,t),
\qquad
r_t(k,\sigma)=\frac{\eta_t\sigma^2+1}{\eta_t \sigma^2/k +1}.
\]
That work is explicitly formulated for denoising diffusion and flow matching models, is training-free, and targets sharper or flatter local sampling distributions without retraining [2510.01184]. It is related to TSFs by the shared goal of temperature steering in generative models, but it is a different construction from temperature-steerable Boltzmann generators.

The phrase “temperature-steerable flows” also appears in fluid-dynamical and control-theoretic settings with a different meaning. In one channel-heat-transfer study, the terminology refers to optimal steady incompressible 2D channel flows whose morphology steers hot and cold regions; above \(Pe\approx 2^{12}\), the optimal flows become wavy, fingered structures that improve Nusselt number by 3% to 30% for \(2^{13}\le Pe \le 2^{17}\) relative to previously identified unidirectional optima [2507.09027]. In another work on the 2D incompressible Boussinesq system on the torus, the flow is “steered” by a physically localized temperature control, and global approximate controllability in arbitrary time is proved using only heating or cooling in an arbitrarily thin horizontal strip [2404.09903]. These usages concern thermal control of PDE dynamics rather than normalizing-flow samplers.

In the generative-modeling sense established by the Boltzmann-generator literature, TSFs remain a method for learning a physically constrained family of equilibrium densities indexed by temperature, with reweighting, MCMC correction, and generalized-ensemble integration built into their intended use. Their significance lies in replacing “one model per temperature” with a temperature-steerable density family while preserving the thermodynamic scaling structure that motivates equilibrium sampling in the first place [2012.00429].

Source: https://www.emergentmind.com/topics/temperature-steerable-flows-tsfs