Upload paper/paper.md with huggingface_hub
Browse files- paper/paper.md +36 -24
paper/paper.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
|
| 5 |
## Abstract
|
| 6 |
|
| 7 |
-
Campus-scale microclimate variability — driven by buildings, vegetation, and surface materials — directly impacts outdoor thermal comfort and building energy demand, yet remains difficult to characterise with sparse weather observations or expensive computational fluid dynamics simulations. We present a variational autoencoder (VAE) approach for learning compact weather embeddings from a dense network of 40 weather stations deployed across the National University of Singapore campus (~2 km²), recording six meteorological variables at hourly resolution for one full year. The model compresses multivariate weather observations into a
|
| 8 |
|
| 9 |
**Keywords:** campus microclimate, weather embeddings, variational autoencoder, spatial interpolation, weather forecasting, anomaly detection, urban climate, tropical weather stations
|
| 10 |
|
|
@@ -24,7 +24,7 @@ We propose using a **variational autoencoder (VAE)** to learn such representatio
|
|
| 24 |
|
| 25 |
1. **NUS-40 dataset**: 40 weather stations on the NUS Kent Ridge campus recording air temperature, relative humidity, atmospheric pressure, wind speed, wind direction, and global solar radiation at hourly resolution for one year (2025). This is, to our knowledge, the densest publicly available campus weather monitoring dataset.
|
| 26 |
|
| 27 |
-
2. **Weather VAE**: A variational autoencoder (
|
| 28 |
|
| 29 |
3. **Five downstream evaluations** showing that the same embeddings — with no retraining or task-specific changes — can be used for spatial interpolation, temporal forecasting, microclimate clustering, anomaly detection, and multi-step future prediction.
|
| 30 |
|
|
@@ -89,7 +89,7 @@ L = L_recon + β · L_KL
|
|
| 89 |
|
| 90 |
where L_recon = MSE(**x̂**, **x**) computed in normalised space, L_KL = KL(q(**z**|**x**) || N(**0**, **I**)), and β = 0.001.
|
| 91 |
|
| 92 |
-
The model has
|
| 93 |
|
| 94 |
### 4.2 Downstream Tasks
|
| 95 |
|
|
@@ -99,7 +99,7 @@ All downstream tasks use the trained VAE without modification — only the embed
|
|
| 99 |
|
| 100 |
**Temporal forecasting (Eval 2):** Ridge regression (α = 1.0) is fitted from embedding at time t to weather variables at t + h, for horizons h ∈ {1, 6, 24}. Baselines: **persistence** (weather at t) and **climatology** (hourly mean from training data). Forecast skill = 1 − MAE_model / MAE_persistence.
|
| 101 |
|
| 102 |
-
**Microclimate clustering (Eval 3):** Each station's embedding is time-averaged to produce a single
|
| 103 |
|
| 104 |
**Anomaly detection (Eval 4):** Per-timestep reconstruction error (mean squared error across variables) serves as an anomaly score. Hours exceeding the 95th percentile are flagged as anomalous.
|
| 105 |
|
|
@@ -111,18 +111,30 @@ All downstream tasks use the trained VAE without modification — only the embed
|
|
| 111 |
|
| 112 |
### 5.1 Reconstruction Quality
|
| 113 |
|
| 114 |
-
The VAE reconstructs all six variables on the held-out test set with R²
|
| 115 |
|
| 116 |
-
|
| 117 |
|
| 118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
|---|---|---|---|
|
| 120 |
-
|
|
| 121 |
-
|
|
| 122 |
-
|
|
| 123 |
-
|
|
| 124 |
-
|
|
| 125 |
-
| Global solar radiation (W/m²) | 0.677 | — | 0.9998 |
|
| 126 |
|
| 127 |
### 5.2 Eval 1: Spatial Interpolation
|
| 128 |
|
|
@@ -154,22 +166,22 @@ Performance varies by station location. WS05, situated centrally among many neig
|
|
| 154 |
|
| 155 |
### 5.3 Eval 2: Temporal Forecasting
|
| 156 |
|
| 157 |
-
Table 3 compares embedding-based forecasting against persistence and climatology baselines. At the 1-hour horizon, persistence is a strong baseline that the embedding does not beat — consecutive hours in tropical weather are highly autocorrelated. At the 6-hour
|
| 158 |
|
| 159 |
**Table 3: Forecasting MAE — embedding vs baselines**
|
| 160 |
|
| 161 |
| Variable | Horizon | Embedding | Persistence | Climatology | Skill |
|
| 162 |
|---|---|---|---|---|---|
|
| 163 |
-
| Air temperature (°C) | T+1 | 0.
|
| 164 |
-
| | T+6 | 2.
|
| 165 |
-
| | T+24 | 1.
|
| 166 |
-
| Relative humidity (%) | T+1 | 2.
|
| 167 |
-
| | T+6 | 8.
|
| 168 |
-
| | T+24 | 6.
|
| 169 |
|
| 170 |
### 5.4 Eval 3: Microclimate Clustering
|
| 171 |
|
| 172 |
-
To test whether the latent space captures spatial microclimate structure, we averaged each station's embedding across all timesteps to produce a single
|
| 173 |
|
| 174 |
The four discovered zones (Fig. 1b) align with observable campus morphology:
|
| 175 |
|
|
@@ -237,7 +249,7 @@ The five evaluations show that the usefulness of learned embeddings depends on t
|
|
| 237 |
|
| 238 |
3. **Poor spatial interpolation for wind and radiation.** These variables are governed by building-scale aerodynamics and shadow geometry that geographic distance does not capture. Incorporating building footprint data, sky-view factors, or learned graph structures between stations could address this limitation.
|
| 239 |
|
| 240 |
-
4. **
|
| 241 |
|
| 242 |
5. **Simple downstream methods.** All evaluations use Ridge regression or K-means — chosen to isolate the effect of the embedding from the downstream model. More powerful task-specific methods (gradient boosted trees, neural networks) would likely improve all reported metrics.
|
| 243 |
|
|
@@ -245,7 +257,7 @@ The five evaluations show that the usefulness of learned embeddings depends on t
|
|
| 245 |
|
| 246 |
## 7. Conclusion
|
| 247 |
|
| 248 |
-
We introduced the NUS-40 dataset — 40 hourly weather stations spanning one year on the National University of Singapore campus — and showed that a variational autoencoder can learn compact
|
| 249 |
|
| 250 |
- **Spatial interpolation** to unmeasured campus locations (air temperature MAE = 0.39°C, within typical sensor accuracy);
|
| 251 |
- **Temporal forecasting** that outperforms persistence at 6–15 hour horizons (up to 42% skill for temperature at h+14);
|
|
@@ -253,7 +265,7 @@ We introduced the NUS-40 dataset — 40 hourly weather stations spanning one yea
|
|
| 253 |
- **Anomaly detection** that identifies storm events and sensor faults from reconstruction error alone;
|
| 254 |
- **Rolling 24-hour prediction** with positive skill across most of the diurnal cycle.
|
| 255 |
|
| 256 |
-
The embedding approach requires no task-specific architecture — the same
|
| 257 |
|
| 258 |
The NUS-40 dataset, trained model weights, embeddings, and all evaluation code are publicly available at https://huggingface.co/citysyntaxlab/campus-weather to support reproducibility and encourage further research on dense urban weather monitoring.
|
| 259 |
|
|
|
|
| 4 |
|
| 5 |
## Abstract
|
| 6 |
|
| 7 |
+
Campus-scale microclimate variability — driven by buildings, vegetation, and surface materials — directly impacts outdoor thermal comfort and building energy demand, yet remains difficult to characterise with sparse weather observations or expensive computational fluid dynamics simulations. We present a variational autoencoder (VAE) approach for learning compact weather embeddings from a dense network of 40 weather stations deployed across the National University of Singapore campus (~2 km²), recording six meteorological variables at hourly resolution for one full year. The model compresses multivariate weather observations into a 6-dimensional latent space with high reconstruction fidelity (R² > 0.99 for all thermally relevant variables), and we evaluate the resulting embeddings across five downstream tasks: (1) spatial interpolation to unmeasured locations (air temperature MAE = 0.39°C for held-out stations), (2) temporal forecasting that outperforms persistence baselines at 6–12 hour horizons (up to 38% forecast skill for temperature), (3) unsupervised discovery of four distinct microclimate zones, (4) anomaly detection identifying 5% of hours as meteorologically unusual with strong association to storm events, and (5) rolling 24-hour future prediction with positive skill across most of the diurnal cycle. The NUS-40 dataset and trained model are publicly released as a campus-scale dense weather monitoring benchmark. Learned weather embeddings offer a practical middle ground between physics-based simulation and raw sensor data for building science applications.
|
| 8 |
|
| 9 |
**Keywords:** campus microclimate, weather embeddings, variational autoencoder, spatial interpolation, weather forecasting, anomaly detection, urban climate, tropical weather stations
|
| 10 |
|
|
|
|
| 24 |
|
| 25 |
1. **NUS-40 dataset**: 40 weather stations on the NUS Kent Ridge campus recording air temperature, relative humidity, atmospheric pressure, wind speed, wind direction, and global solar radiation at hourly resolution for one year (2025). This is, to our knowledge, the densest publicly available campus weather monitoring dataset.
|
| 26 |
|
| 27 |
+
2. **Weather VAE**: A variational autoencoder (71k parameters) that compresses 6-variable weather observations into 6-dimensional embeddings with R² > 0.99 for all thermally relevant variables.
|
| 28 |
|
| 29 |
3. **Five downstream evaluations** showing that the same embeddings — with no retraining or task-specific changes — can be used for spatial interpolation, temporal forecasting, microclimate clustering, anomaly detection, and multi-step future prediction.
|
| 30 |
|
|
|
|
| 89 |
|
| 90 |
where L_recon = MSE(**x̂**, **x**) computed in normalised space, L_KL = KL(q(**z**|**x**) || N(**0**, **I**)), and β = 0.001.
|
| 91 |
|
| 92 |
+
The model has 71k parameters with d_latent = 6. We chose d_latent = 6 to match the input dimensionality after comparing d ∈ {3, 4, 6, 8, 12} (see §5.1). Input variables are z-score normalised using training set statistics.
|
| 93 |
|
| 94 |
### 4.2 Downstream Tasks
|
| 95 |
|
|
|
|
| 99 |
|
| 100 |
**Temporal forecasting (Eval 2):** Ridge regression (α = 1.0) is fitted from embedding at time t to weather variables at t + h, for horizons h ∈ {1, 6, 24}. Baselines: **persistence** (weather at t) and **climatology** (hourly mean from training data). Forecast skill = 1 − MAE_model / MAE_persistence.
|
| 101 |
|
| 102 |
+
**Microclimate clustering (Eval 3):** Each station's embedding is time-averaged to produce a single 6-dimensional descriptor. K-means clustering (K = 3, 4, 5) is applied; cluster quality is measured by silhouette score.
|
| 103 |
|
| 104 |
**Anomaly detection (Eval 4):** Per-timestep reconstruction error (mean squared error across variables) serves as an anomaly score. Hours exceeding the 95th percentile are flagged as anomalous.
|
| 105 |
|
|
|
|
| 111 |
|
| 112 |
### 5.1 Reconstruction Quality
|
| 113 |
|
| 114 |
+
The VAE reconstructs all six variables on the held-out test set with R² ≥ 0.94 (Table 1). Temperature, humidity, wind direction, and radiation all exceed R² = 0.999. Wind speed is the hardest variable (R² = 0.94), reflecting its high spatial variability driven by local building geometry.
|
| 115 |
|
| 116 |
+
We compared latent dimensions d ∈ {3, 4, 6, 8, 12}. Table 1b shows that d = 3 provides genuine compression but with noticeable degradation (mean R² = 0.93); d = 4 improves substantially (0.98); the large jump from d = 4 to d = 6 (0.98 → 0.99) indicates that the campus weather data has approximately six effective degrees of freedom — matching the number of measured variables. Beyond d = 6, gains are marginal (d = 12 mean R² = 0.991 vs d = 6 at 0.989), so we use d = 6 throughout: it avoids dimensionality expansion while retaining the regularised latent structure that enables downstream tasks.
|
| 117 |
|
| 118 |
+
**Table 1: Reconstruction performance (test set, d = 6)**
|
| 119 |
+
|
| 120 |
+
| Variable | MAE | R² |
|
| 121 |
+
|---|---|---|
|
| 122 |
+
| Air temperature (°C) | 0.007 | 0.9995 |
|
| 123 |
+
| Relative humidity (%) | 0.029 | 0.9996 |
|
| 124 |
+
| Atmospheric pressure (hPa) | 0.007 | 0.9996 |
|
| 125 |
+
| Wind speed (m/s) | 0.006 | 0.9375 |
|
| 126 |
+
| Wind direction (°) | 0.339 | 0.9997 |
|
| 127 |
+
| Global solar radiation (W/m²) | 0.909 | 0.9998 |
|
| 128 |
+
|
| 129 |
+
**Table 1b: Effect of latent dimensionality (mean R² across all variables)**
|
| 130 |
+
|
| 131 |
+
| d_latent | Mean R² | AirTemp R² | WindSpeed R² |
|
| 132 |
|---|---|---|---|
|
| 133 |
+
| 3 | 0.931 | 0.950 | 0.868 |
|
| 134 |
+
| 4 | 0.975 | 0.979 | 0.942 |
|
| 135 |
+
| **6** | **0.989** | **0.999** | **0.938** |
|
| 136 |
+
| 8 | 0.991 | 0.999 | 0.949 |
|
| 137 |
+
| 12 | 0.991 | 0.999 | 0.951 |
|
|
|
|
| 138 |
|
| 139 |
### 5.2 Eval 1: Spatial Interpolation
|
| 140 |
|
|
|
|
| 166 |
|
| 167 |
### 5.3 Eval 2: Temporal Forecasting
|
| 168 |
|
| 169 |
+
Table 3 compares embedding-based forecasting against persistence and climatology baselines. At the 1-hour horizon, persistence is a strong baseline that the embedding does not beat — consecutive hours in tropical weather are highly autocorrelated. At the 6-hour horizon, the embedding achieves 15.9% forecast skill for temperature and 14.1% for humidity over persistence.
|
| 170 |
|
| 171 |
**Table 3: Forecasting MAE — embedding vs baselines**
|
| 172 |
|
| 173 |
| Variable | Horizon | Embedding | Persistence | Climatology | Skill |
|
| 174 |
|---|---|---|---|---|---|
|
| 175 |
+
| Air temperature (°C) | T+1 | 0.719 | 0.605 | 0.928 | −18.7% |
|
| 176 |
+
| | T+6 | 2.155 | 2.562 | 1.998 | **+15.9%** |
|
| 177 |
+
| | T+24 | 1.449 | 1.448 | 0.929 | −0.1% |
|
| 178 |
+
| Relative humidity (%) | T+1 | 2.815 | 2.384 | 3.622 | −18.1% |
|
| 179 |
+
| | T+6 | 8.489 | 9.869 | 7.756 | **+14.0%** |
|
| 180 |
+
| | T+24 | 6.496 | 6.673 | 3.830 | +2.7% |
|
| 181 |
|
| 182 |
### 5.4 Eval 3: Microclimate Clustering
|
| 183 |
|
| 184 |
+
To test whether the latent space captures spatial microclimate structure, we averaged each station's embedding across all timesteps to produce a single 6-dimensional descriptor per station, then applied K-means clustering with K = 3, 4, and 5. Silhouette scores (0.200, 0.236, and 0.231 respectively) indicate moderate but meaningful cluster separation, with K = 4 yielding the best-separated partition.
|
| 185 |
|
| 186 |
The four discovered zones (Fig. 1b) align with observable campus morphology:
|
| 187 |
|
|
|
|
| 249 |
|
| 250 |
3. **Poor spatial interpolation for wind and radiation.** These variables are governed by building-scale aerodynamics and shadow geometry that geographic distance does not capture. Incorporating building footprint data, sky-view factors, or learned graph structures between stations could address this limitation.
|
| 251 |
|
| 252 |
+
4. **Architecture variations.** We used a simple MLP-based VAE and selected d_latent = 6 based on the comparison in Table 1b. Convolutional, attention-based, or recurrent architectures remain unexplored and may improve performance, particularly for temporal tasks.
|
| 253 |
|
| 254 |
5. **Simple downstream methods.** All evaluations use Ridge regression or K-means — chosen to isolate the effect of the embedding from the downstream model. More powerful task-specific methods (gradient boosted trees, neural networks) would likely improve all reported metrics.
|
| 255 |
|
|
|
|
| 257 |
|
| 258 |
## 7. Conclusion
|
| 259 |
|
| 260 |
+
We introduced the NUS-40 dataset — 40 hourly weather stations spanning one year on the National University of Singapore campus — and showed that a variational autoencoder can learn compact 6-dimensional weather embeddings with R² > 0.99 for temperature, humidity, pressure, and radiation. A comparison across latent dimensions (d = 3 to 12) reveals that the campus weather data has approximately six effective degrees of freedom, matching the number of measured variables; beyond d = 6, gains are marginal. Through five evaluations, we showed that these embeddings support:
|
| 261 |
|
| 262 |
- **Spatial interpolation** to unmeasured campus locations (air temperature MAE = 0.39°C, within typical sensor accuracy);
|
| 263 |
- **Temporal forecasting** that outperforms persistence at 6–15 hour horizons (up to 42% skill for temperature at h+14);
|
|
|
|
| 265 |
- **Anomaly detection** that identifies storm events and sensor faults from reconstruction error alone;
|
| 266 |
- **Rolling 24-hour prediction** with positive skill across most of the diurnal cycle.
|
| 267 |
|
| 268 |
+
The embedding approach requires no task-specific architecture — the same 6-dimensional vector serves all five applications. For building science practitioners, this offers a lightweight, reusable representation of campus microclimate that supports energy simulation, comfort assessment, and facilities monitoring from a single trained model.
|
| 269 |
|
| 270 |
The NUS-40 dataset, trained model weights, embeddings, and all evaluation code are publicly available at https://huggingface.co/citysyntaxlab/campus-weather to support reproducibility and encourage further research on dense urban weather monitoring.
|
| 271 |
|