This project develops a Multi-Scale Transformer (MST) to forecast U.S. greenhouse gas emissions using the EPA GHGRP dataset. The model learns both short-term variations and long-term trends across facility, sector, and national levels through hierarchical attention and cross-scale fusion.
- Shyam Solanke (UID: 121127761)
- Ninad Wadode (UID: 121317674)
- Saanika Patil (UID: 120414893)
- Archit Golatkar (UID: 121305282)
- Sriniketh Shankar (UID: 121113580)
Course: MSML/DATA 612 Deep Learning
Professor: Samyet Ayhan
- Python 3.9+
- CUDA-capable GPU (recommended for training)
- Clone the repository:
git clone <repository-url>
cd TimeSeries- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txtTimeSeries/
├── data/
│ ├── raw/ # Raw EPA GHGRP data
│ └── processed/ # Preprocessed datasets
├── src/
│ ├── models/ # Multi-Scale Transformer implementation
│ ├── baselines/ # ARIMA, Prophet, LSTM models
│ └── utils/ # Data loaders, metrics, visualization
├── notebooks/ # Exploratory analysis and experiments
├── configs/ # Configuration files
├── results/
│ ├── figures/ # Generated plots and visualizations
│ ├── metrics/ # Evaluation metrics
│ └── checkpoints/ # Model checkpoints
├── report/ # Interim report and presentation
├── requirements.txt # Python dependencies
└── README.md
Download and preprocess the EPA GHGRP data:
python src/utils/download_data.py
python src/utils/preprocess_data.pyTrain classical and deep learning baselines:
# ARIMA/SARIMA
python src/baselines/train_arima.py --config configs/arima_config.yaml
# Prophet
python src/baselines/train_prophet.py --config configs/prophet_config.yaml
# LSTM
python src/baselines/train_lstm.py --config configs/lstm_config.yamlTrain the Multi-Scale Transformer:
python src/models/train_mst.py --config configs/mst_config.yamlEvaluate all models and generate comparison results:
python src/utils/evaluate_models.py --output results/metrics/Create plots and figures for the report:
python src/utils/generate_plots.py --output results/figures/The Multi-Scale Transformer consists of four key components:
- Fine-Scale Encoder: Captures short-term, year-to-year emission changes using local attention
- Coarse-Scale Encoder: Models long-term sectoral trends via downsampled sequences
- Cross-Scale Fusion Layer: Combines information between fine and coarse representations
- Hierarchical Decoder: Ensures aggregation consistency across facility, sector, and national levels
- MAE (Mean Absolute Error): Average absolute difference between predictions and actual values
- sMAPE (Symmetric Mean Absolute Percentage Error): Scale-independent percentage error
- MASE (Mean Absolute Scaled Error): Scaled error metric relative to naive baseline
U.S. EPA Greenhouse Gas Reporting Program (GHGRP) - Emissions by Location
https://www.epa.gov/ghgreporting/ghgrp-emissions-location
All random seeds are fixed for reproducibility:
- Python:
random.seed(42) - NumPy:
np.random.seed(42) - PyTorch:
torch.manual_seed(42)
- Vaswani, A. et al. (2017). Attention Is All You Need. NeurIPS.
- Zhou, H. et al. (2021). Informer: Beyond Efficient Transformer for Long Sequence Forecasting. AAAI.
- Li, S. et al. (2021). Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting. NeurIPS.
This project is for academic purposes as part of MSML/DATA 612 Deep Learning course.