Fast simulators for indoor airflow would let building designers try thousands of layouts of vents and heat sources. They are usually monolithic: one network maps a whole room configuration to its velocity and temperature fields. Adding a vent, moving a heater, or introducing a new kind of device means generating new fluid simulations and retraining. A better approach is to treat each device the way modular software treats a component. First describe what each device does to the room on its own. Then learn, once, how such solo descriptions combine. The solo description is the device's full flow field, compressed by an autoencoder, which is a network that squeezes a field into a short vector and can rebuild the field from it. The combination step then works only on these compressed fields. It never sees the device's own parameters, such as width, angle, power, or type.
The claim is that an aggregator that combines compressed fields, and ignores device parameters, can do two things without retraining the aggregator or the shared decoder. It can handle more devices than it was trained with, and it can handle device types it has never seen. A new device type then only needs cheap single-device simulations to join the system. This is the modular payoff that current component-based surrogates promise but have not shown.
Where this sits
The closest work is Component-based machine learning for indoor flow and temperature fields prediction, and it supplies the method we build on. It compresses 2D computational fluid dynamics fields 23.4× with a convolutional autoencoder with residual connections (CAER). A small network maps inlet velocity to the latent vector, and a CNN merges two single-inlet latents into a dual-inlet latent, reaching $R^2 > 0.94$ in about 0.1 s. Its aggregator is built for exactly two inlets of one type. It was tested on six unseen configurations and does not address varying device counts or mixed device types. We keep its autoencoder and its idea of fusing latents. We change the aggregator to accept a set of any size, we train it on mixed device types, and we test it on counts and types held out from training.
The broader modular literature explains why this matters and also warns about a risk. Modular Deep Learning describes recombining separately trained modules without retraining, for example swapping language adapters. Our aggregator plays the role of that paper's "aggregation function", but over physical fields rather than language tasks. Is a Modular Architecture Enough? shows that learned routing among modules tends to collapse when trained end to end. We therefore avoid learned routing entirely. Which components are present is known from the room specification, so routing is fixed, and only the combination step is learned.
Two stitching papers frame the interface question. Latent Space Translation via Semantic Alignment aligns independently trained latent spaces with Procrustes-style maps. Towards Backward-Compatible Representation Learning shows that a swapped-in encoder gives 0% retrieval against an old gallery unless it is explicitly trained for compatibility. We sidestep this problem by construction: every device's latent is produced by the same frozen field encoder. The interface is therefore a shared space rather than an alignment problem.
Does the Data Processing Inequality Reflect Practice? raises a constraint we must measure rather than assume away. Compressing a field cannot add information about the target, so the autoencoder's reconstruction error puts a floor under any aggregator's error.
Core Claim
Let $z_i = E(u_i)$ be the latent of device $i$'s solo field $u_i$, where $E$ is a frozen encoder shared by all device types. Let $A$ be an aggregator that takes the set $\{z_1,\dots,z_N\}$ and whose output does not change if the devices are listed in a different order. Let $D$ be the frozen decoder. The prediction for the combined room is
$$\hat{u} = D\big(A(\{z_1,\dots,z_N\})\big).$$
The aggregator never receives device parameters or type labels. What makes a device a "heater" rather than a "vent" is visible to it only through the field the device produces. The hypothesis is that nonlinear interactions such as jet collisions, a plume bending a jet, or recirculation zones merging depend mainly on the solo fields that meet. They should not depend on the device labels that produced those fields. If so, $A$ should transfer to new device types and to larger $N$. An aggregator fed device parameters should not transfer this way.
Research Program
We will generate a 2D room benchmark with OpenFOAM. It follows the 1.5 m × 1.0 m setup of Wang et al., but covers more cases. The file does not indicate whether their data is public, so we plan to regenerate it.
Training device types are wall supply inlets (varying position, width, velocity, temperature) and floor heat sources (varying position and power). Held-out types are angled ceiling diffusers and wall-mounted heaters. For each configuration we simulate the full multi-device room, and for each device we also simulate the room with that device alone plus a fixed outlet. Training uses $N \in \{1,2,3\}$; testing uses $N$ up to 6.
The autoencoder is trained once on all solo and combined fields from training types and then frozen. The aggregator is a small attention network over the set of device latents plus a learned "empty room" token. Attention lets each device's latent be updated by the others, capturing pairwise interaction. The result is pooled into a single latent and passed to the decoder.
A new device type joins the system by adding only its solo simulations, which the frozen encoder turns into latents. A parameter-to-latent network as in Wang et al. can be fit afterwards if one wants predictions without solo simulations. We will report both routes.
We will run three analyses. The first measures the autoencoder floor on combined fields, to separate compression loss from combination error. The second tracks how error grows with $N$ beyond the training range. The third examines whether aggregator attention weights track physical proximity of jets and plumes, as a sanity check that the aggregator models interaction rather than memorizing configurations.
Baselines
Do-nothing reference. Superpose the solo fields: add velocity perturbations and temperature rises relative to the empty room. This is exact only for linear physics. The gap to it measures how much nonlinear interaction the benchmark actually contains. If the gap is small, the benchmark is too easy and we will add higher-velocity cases until it is not.
Latent averaging. A second naive baseline decodes the mean of the device latents.
Strongest existing method. The CNN pairwise aggregator of Wang et al.. Its reported result is $R^2 > 0.94$, with maximum absolute error below 0.08 m/s for velocity and below 0.4 °C for temperature over 95% of the field, on dual-inlet rooms. We first reproduce it on our two-inlet subset. We treat reaching roughly that number as the check that our data and autoencoder are comparable. For $N>2$ we apply it by folding: merge two devices, then merge the result with the next, and so on. It gets the same autoencoder, the same training configurations, and the same hyperparameter search budget as our aggregator.
Monolithic set model. This competitor takes each device's parameters plus a type embedding, pools them with the same attention architecture, and decodes with the same frozen decoder. It is the real threat, because on seen types it has strictly more direct information.
Linear-reduction variant. Our full pipeline with the autoencoder replaced by PCA of the fields.
Key ablation. Our aggregator trained on field latents versus the same aggregator trained on parameters. This ablation isolates the key ingredient, and the comparison is on held-out device types and held-out $N$.
Ceiling. The autoencoder reconstruction of the true combined field.
Criteria for success. Beating the monolithic model on seen types is not required. Success means matching it within about 0.01 $R^2$ on seen types and seen $N$. It also means beating it and the folded pairwise baseline on held-out types and $N \ge 4$, with the gap outside seed variance over five seeds.
Why not just…?
Why not just train a monolithic surrogate on full room configurations? Wang et al. note that monolithic surrogates must be retrained whenever the component set changes. Our monolithic set model is a strong version that at least handles varying $N$. On seen types it may well win, and we say so. It has no principled input for an unseen device type, because the type embedding is untrained. The held-out-type experiment settles whether field latents buy real transfer.
Why not just use PCA and linear superposition? Airflow interactions such as jet collision and plume deflection are nonlinear. Wang et al. needed a nonlinear autoencoder and aggregator to reach their accuracy. Still, the superposition and PCA baselines are included, and if they come within the autoencoder floor, our method has no reason to exist on this benchmark.
Why not just reuse the pairwise aggregator recursively? Folding is a cheap route to arbitrary $N$. However, it forces three-way interactions through a sequence of pairwise merges and makes the output depend on merge order. We measure both effects directly by reporting the spread over merge orders and the error growth with $N$. If folding matches set aggregation, we will report that the simpler design suffices.
Why not just learn routing among specialist experts per device type? Is a Modular Architecture Enough? shows that end-to-end learned routing collapses onto a few modules. In any case, device identity is known here, so there is nothing for a learned router to discover.
Proposed Experiments
The decisive check is the held-out-type test. Two new device types enter the system through solo simulations only, and we measure field $R^2$ and the 95th-percentile absolute error for velocity and temperature. We compare the field-latent aggregator against the parameter-fed monolithic set model and the folded pairwise aggregator.
The second check is extrapolation in $N$ from 3 to 6. We plot error against $N$, with the autoencoder ceiling and the superposition floor shown on the same axes.
The third check is cost. It covers the wall-clock time to add a new device type (solo simulations only, versus new multi-device simulations and retraining) and the inference time, compared against Wang et al.'s reported ~0.1 s.
The idea fails if the parameter-fed model transfers just as well to new types. It also fails if error at $N=6$ collapses toward the superposition baseline. Either outcome would be informative. It would show that compressed fields are not a sufficient interface for composing physical components.
References
- Component-based machine learning for indoor flow and temperature fields prediction: latent feature aggregation and flow interaction
- Modular Deep Learning
- Is a Modular Architecture Enough?
- Latent Space Translation via Semantic Alignment
- Towards Backward-Compatible Representation Learning
- Does the Data Processing Inequality Reflect Practice? On the Utility of Low-Level Tasks