如何处理macro-economic prediction的deep learning model中多采样频率经济数据集的高缺失值问题
Great question—this is a super common (and tricky) problem in macroeconomic ML, where the "missing" values aren't random gaps but just a result of mismatched sampling frequencies (e.g., monthly CPI vs. daily Treasury rates). The standard imputation methods you mentioned work for random missingness, but they fail here because most "missing" CPI values aren't actually missing—they just don't exist at the daily level. Below are practical, domain-aligned solutions:
Hierarchical Multi-Frequency Modeling
Instead of forcing all features into a single frequency, build a layered model that preserves each data's native temporal granularity:- Train a sub-model on high-frequency features (daily Treasury rates) to capture short-term volatility and patterns.
- Train another sub-model on mid/low-frequency features (monthly CPI, annual indicators) to capture medium/long-term trends.
- Combine the outputs of these sub-models (via attention layers, concatenation, or gating) into a final prediction model.
This approach avoids information loss from forced resampling and naturally handles the "missing" values by letting each sub-model only process relevant frequency data. For example, you could use LSTMs for each frequency stream, then fuse their hidden states with a transformer encoder.
Time-Aware Imputation for Structured Missingness
Since your "missing" CPI values follow a fixed pattern (only available monthly), use interpolation methods that respect temporal logic instead of generic fills:- Linear/spline interpolation: For stable indicators like CPI, linear interpolation works for basic trend alignment; spline interpolation gives smoother, more realistic curves between monthly data points.
- Economics-driven interpolation: Tie the interpolation to related high-frequency features. For example, since Treasury rates and inflation expectations are correlated, adjust CPI's interpolated daily values based on daily rate fluctuations to add economic plausibility.
Just make sure to validate that interpolated values align with real-world economic behavior—avoid generating unrealistic spikes/drops.
DL-Native Missing Value Handling
Many deep learning architectures can directly process missing values without pre-imputation, leveraging masking or specialized layers:- Masked Transformers/LSTMs: Use a mask tensor to flag missing CPI values; the model will automatically learn to ignore these positions while using available data to make predictions. In frameworks like PyTorch, you can implement this with custom masks or built-in
nn.MaskedLayermodules. - Gated Missing Value Handling: Modify GRU/LSTM cells to include a dedicated gate that learns whether to rely on existing observations or skip missing entries, adapting to the structured gaps in your data.
- Variational Autoencoders (VAEs): Train a VAE to learn the joint distribution of your features, then sample plausible CPI values from the learned distribution to fill gaps. This preserves uncertainty, which is critical for macroeconomic forecasting.
- Masked Transformers/LSTMs: Use a mask tensor to flag missing CPI values; the model will automatically learn to ignore these positions while using available data to make predictions. In frameworks like PyTorch, you can implement this with custom masks or built-in
Aggregate High-Frequency Features to Match Low-Frequency Targets
If your prediction target is a low-frequency metric (e.g., monthly GDP growth), reverse the alignment: aggregate high-frequency data to match the low-frequency timeline:- For daily Treasury rates, compute monthly stats like mean, median, volatility, max/min, or trend slope (e.g., the change in rates over the month).
- This eliminates missing values entirely while retaining the meaningful information from high-frequency data at the granularity of your target. It's especially effective when your prediction goal doesn't require daily-level precision.
Multi-Task Learning with Missing Value Prediction
Treat missing CPI value prediction as an auxiliary task alongside your main macroeconomic forecasting task:- Train your model to simultaneously predict both your target metric and the missing daily CPI values.
- The auxiliary task teaches the model to use high-frequency features (like Treasury rates) to infer plausible CPI trends, which in turn improves performance on the main forecasting task.
Implement this by combining the loss functions of both tasks (weighted based on their importance) into a single training objective.
内容的提问来源于stack exchange,提问作者Cheok Jia Heng




