BiLSTM for Terrorism Event Forecasting
Bidirectional LSTM model for weekly terrorism event forecasting using 46 years of Global Terrorism Database (GTD) data.
Paper: Predicting the Unpredictable: Bidirectional LSTM Networks for Terrorism Event Forecasting
Model Performance
| Model | RMSE โ | MAE | Rยฒ | Improvement |
|---|---|---|---|---|
| BiLSTM (this model) | 6.38 | 3.82 | 0.556 | Baseline |
| LSTM+Attention | 9.19 | 5.37 | 0.264 | -30.6% |
| Linear Regression | 9.89 | 5.85 | 0.176 | -35.5% |
| SARIMA | 11.52 | 6.78 | -0.090 | -44.6% |
Key Achievement: 37% improvement over best classical baseline (Linear Regression)
Model Architecture
- Type: Bidirectional LSTM (2 layers)
- Input Shape: (30 weeks, 13 features)
- Output: Single value (next week's attack count)
- Parameters: ~36,673
- Framework: TensorFlow 2.13.0
Architecture Details:
Input(30, 13)
โ
Bidirectional LSTM(64) + Dropout(0.2) โ Bidirectional LSTM(32) + Dropout(0.2) โ Dense(32, ReLU) + Dropout(0.2) โ Dense(1, Linear)
Training Data
- Dataset: Global Terrorism Database (START consortium)
- Time Period: 1970-2016 (46 years)
- Resolution: Weekly aggregation (2,400 weeks)
- Train/Val/Test: 70%/15%/15% (chronological split)
Features (13 total):
- Lag Features (1): 52-week lag
- Rolling Statistics (4): 4-week & 12-week mean/std
- Temporal Encoding (4): Year, week, month, quarter
- Casualty Features (3): Killed, wounded, total
- Geographic (1): Region encoding
Usage
import tensorflow as tf
from huggingface_hub import hf_hub_download
# Download model
model_path = hf_hub_download(
repo_id="Davidavid4/bilstm-terrorism-forecasting-gtd",
filename="bidirectional_lstm_best.h5"
)
# Load model
model = tf.keras.models.load_model(model_path)
# Prepare input: shape (batch_size, 30, 13)
# - 30 weeks of historical data
# - 13 features per week
# Make predictions
predictions = model.predict(X_test)
- Downloads last month
- 11
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
๐
Ask for provider support