Virtual sensors replace expensive physical sensors in critical applications through machine learning by predicting target signals from available measurements. Existing virtual sensor approaches require application-specific models with hand-selected inputs for each sensor, cannot leverage task synergies, and lack consistent benchmarks. While emerging time series foundation models offer general-purpose, pretrained solutions in other domains, they are computationally expensive and limited to predicting their input signals, making them incompatible with virtual sensors. We introduce the first multi-task model for virtual sensors addressing both limitations. Our unified model can simultaneously predict diverse virtual sensors exploiting synergies while maintaining computational efficiency. It learns relevant input signals for each virtual sensor, eliminating expert knowledge requirements while adding explainability. In our large-scale evaluation on three standard benchmarks and an application-specific dataset with over 18 billion samples, our architecture reduces computation time by up to 415x and memory requirements by 951x, while maintaining or even improving predictive quality compared to unified baselines. Compared to existing isolated models for a single virtual sensor, our unified approach generates superior predictions at similar inference speed while scaling gracefully to hundreds of virtual sensors with nearly constant parameter count, enabling practical deployment in large-scale sensor networks.
Figures & tables
Figure 1: ➀ Recent works train, maintain, and deploy isolated application-specific models for every virtual sensor. ➁ We unify multiple virtual sensors into a single model, exploiting synergies and achieving superior scalability. It learns relevant input signals and selectively predicts virtual sensors, increasing efficiency and explainability without expert knowledge.
Figure 2: We present a unified model that can predict a user-selected target virtual sensor ( z2′ , green) out of multiple possible virtual sensors. ➀ We first define which virtual sensor to forecast (here sensor z2′ ). ➁ Next, we introduce an initially empty prototype token 0 and add the corresponding variate embedding v2′∈V′ to guide the neural network to predict the specified virtual sensor, based on available sensor signals ( z1 , pink; z2 , red; z3 , orange). We divide input signals z1,z2,z3 into patches, embed them into tokens, and add time and variate embedding V to them. Starting from empty prototypes in cycle t1 , ➂ we forecast virtual sensors autoregressively using the model’s previous prediction z2′ as current input in step t2 . ➃ Within the transformer, our architecture learns relevant input signals for each virtual sensor from attention gradients through trainable signal relevance vectors R′ , adding explainability. After selecting the corresponding signal relevance vector r2′ , we compute the cross-relevance for signal-to-signal communication, duplicate our mask across time to learn time-independent signal importance, and apply it as attention bias. ➄ By later sparsifying signal relevance vectors R′ based on a threshold rthres′ , we structurally prune irrelevant input signals to achieve considerable efficiency gains.
Architecture
Traffic
CAN bus
MSE
Time
Mem.
Param.
MSE
Time
Mem.
Param.
Individual models
LSTM (literature)
0.316
0.33ms
0.0010GB
145.9 M
0.124
0.35ms
0.0011GB
174.7 M
Transformer (ours)
0.285
16.62ms
0.90GB
118.4 M
0.318
58.05ms
3.42GB
124.8 M
Unified model
0.556
16.70ms
0.90GB
7.0 M
0.727
58.19ms
3.46GB
7.0 M
+ Variate embedding V,V′
0.275
16.76ms
0.90GB
7.4 M
0.119
58.23ms
3.46GB
7.8 M
Table 1: Comparison of a simple unified model predicting all 16 virtual sensors, where we subsequently introduce our proposed mechanisms, with 16 individual models predicting a single virtual sensor each. We list MSE, inference time, dynamic CUDA peak memory, and the number of trainable parameters for Traffic and CAN bus datasets.
Figure 3: Varying our signal importance threshold rthres′ during training or inference generates smooth trade-offs between input set sparsity and MSE on the Traffic dataset.
Figure 4: Sparsity increases as fewer virtual sensors are predicted simultaneously through our sensor selection mechanism. Results are shown for the Traffic dataset.
Signal relevance
Traffic
CAN bus
Sparsity
MSE
Sparsity
MSE
Random
0.820
0.319
0.977
0.601
Correlation
0.820
0.492
0.978
0.267
SHAP
0.820
0.311
0.978
0.209
Learned
0.821
0.282
0.978
0.121
Table 2: Comparison of different methods to determine signal relevance on the Traffic and the CAN bus dataset. Best in bold.
Figure 5: Our architecture subsequently identifies 2 virtual sensors among 1000 signals in our synthetic random dataset during training, reducing the validation loss in a stepwise manner.
Figure 6: Learning different numbers of virtual sensors Ntrain in a single training iteration influences the similarity of their input signal sets on the Traffic dataset.
Training strategy
MSE
Time
Mem.
Teacher forcing
0.136
0.19 s
16.6 GB
BPTT
✗
1.11s
72.0GB
BPTT fine tuning
0.083
1.10s
72.0GB
Table 3: Comparison of teacher forcing, back propagation through time (BPTT), and a combination of both for training our model on the CAN bus dataset. We list MSE, time per training iteration, and dynamic CUDA peak memory. Best in bold.
Appendix figures & tables17 assets
Supplementary material from the paper’s appendix.
Appendix
Dataset
Virtual sensor
Standard forecasting
Ours
Chronos 2
TimesFM 2.5
Toto 2
Zero-prediction
Chronos 2
TimesFM 2.5
Toto 2
CAN bus
0.121
0.779
0.779
0.779
0.779
0.368
0.304
0.326
Traffic
0.282
1.121
1.121
1.121
1.121
0.584
0.634
0.693
Electricity
0.173
0.887
0.887
0.887
0.887
0.221
0.339
0.295
Solar
0.128
0.967
0.967
0.967
0.967
1.497
1.873
1.595
Appendix
Table 4: MSE comparison of our unified virtual sensor model with time series foundation models in the virtual sensor setting and the standard forecasting setting.
Figure 7: Signals on the Traffic and the CAN bus dataset show different temporal characteristics.
Quantity
j
Battery
Battery voltage
1
Battery current
2
Battery temperature
3
Battery coolant outflow temperature
4
Inverter temperature
5
Appendix
Table 5: Virtual sensors for the CAN bus dataset, which is recorded with an Audi e-tron electric vehicle.
Hyperparameter
Value
Architectural
Patch length
p=32
Transformer layers
L=4
Attention heads
4
Token dimension
d=512
Multi-layer perceptron hidden dimension
512
Appendix
Table 6: Hyperparameters for training our models. We denote sets as {⋯} and continuous search spaces as [⋯] .
Different MSE efficiency trade-offs for variable test-time computation
4242
160
Scaling to hundreds of virtual sensors
8776
660
Explainability of virtual sensors – Quantitative assessment
786
42
Appendix
Table 8: Computational effort to reproduce our experiments.
Architecture
Electricity
Solar
MSE
Time
Mem.
Param.
MSE
Time
Mem.
Param.
Individual models
LSTM (literature)
0.219
0.31ms
0.0009GB
128.3 M
0.242
0.30ms
0.0008GB
121.9 M
Transformer (ours)
0.145
2.59ms
0.13GB
115.2 M
0.128
0.69ms
0.029GB
113.6 M
Unified model
0.521
2.63ms
0.13GB
7.0 M
0.149
0.70ms
0.029GB
7.0 M
+ Variate embedding V,V′
0.170
2.64ms
0.13GB
7.2 M
0.126
0.71ms
0.029GB
7.1 M
Appendix
Table 9: Comparison of a simple unified model predicting all 16 virtual sensors, where we subsequently introduce our proposed mechanisms, with 16 individual models predicting a single virtual sensor each. We list MSE, inference time, dynamic CUDA peak memory, and the number of trainable parameters for Electricity and Solar datasets.
Figure 8: Varying our signal importance threshold rthres′ during training or inference generates smooth trade-offs between input set sparsity and MSE on the Traffic and the CAN bus dataset.
Figure 9: Sparsity increases as fewer virtual sensors are predicted simultaneously through our sensor selection mechanism. Results are shown for the Traffic and the CAN bus dataset.
Figure 10: Learning different numbers of virtual sensors Ntrain in a single training iteration influences the similarity of their input signal sets on the Traffic and the CAN bus dataset.
Figure 11: (a-f) Signal relevance vectors evolve during training on the CAN bus dataset. (g,h) We sparsify signal relevance using a threshold rthres′ to exclude irrelevant signals, keeping only important ones (arrow).
Figure 12: Individual input signal sets Zj⊆Z for each virtual sensor j for the CAN bus dataset, learned by our model. For clarity, we list only 4 input signals, while virtual sensors use 38 on average. Further, heating and cooling demand signals relate to the vehicle’s interior but also to drivetrain components such as the battery and engine. (See table 5 for non-abbreviated virtual sensor names.)
Figure 13: Learning different numbers of virtual sensors Ntrain in every training iteration influences (a) tradeoffs between predictive quality and sparsity and (b) inference efficiency when predicting multiple virtual sensors simultaneously on the Traffic dataset.
Figure 14: Structured sparsity induces savings in inference time and dynamic CUDA peak memory. Note that we visualize 1−sparsity on logarithmic axes. Therefore, quadratic and linear complexities transform into linear functions with slopes of 2 and 1 , respectively.
Figure 15: Virtual sensor predictions on the Traffic dataset. Our sensor selection mechanism successfully switches between virtual sensors with different temporal patterns.
Figure 16: MSE remains stable for very long virtual sensor operation on the Traffic dataset.
Figure 17: Comparison of training from scratch with full and limited ( 10% ) data to transfer learning for introducing a new virtual sensor on the CAN bus dataset under constrained data availability. Note that validation MSE is reported at the end of each epoch – this is why initial transfer learning loss is already low.