Work / Machine learning

Forecasting conflict events with LSTMs

Sequence models + econometric diagnostics on ACLED data. 88.8% sub-event accuracy.

§ 1 · Problem

Classifying conflict events that refuse to behave

Conflict event records are high-volume, imbalanced, and non-stationary. This project classified ACLED sub-event types in the Israel-Palestine region using structured incident data from 2021 to 2024 — a senior capstone in taking messy real-world event data seriously before pointing a model at it.

§ 2 · Data

ACLED, Israel-Palestine, 2021–2024

The dataset is ACLED conflict event data for the Israel-Palestine region: over 38,000 records spanning 2021 to 2024, covering battles, explosions, protests, riots, and violence against civilians. Preprocessing had to earn the model: log transforms on skewed counts, categorical encoding for event metadata, PCA to compress correlated dimensions, and SMOTE to handle the heavy class imbalance across sub-event types.

§ 3 · Method

Diagnostics first, then models

Before any modeling, Breusch-Pagan and Augmented Dickey-Fuller tests checked the variance and stationarity assumptions the data would otherwise have quietly violated. RFECV and mutual information then cut noisy administrative and geographic features. Only after that did the model comparison start: an LSTM with categorical embeddings against Random Forest, Decision Tree, and Logistic Regression baselines. The embedding layers handled the high-cardinality conflict metadata more compactly than one-hot encoding would have.

# LSTM with categorical embeddings
model = Sequential([
    Embedding(input_dim=vocab_size, output_dim=64),
    LSTM(128, return_sequences=True, dropout=0.3),
    LSTM(64, dropout=0.3),
    Dense(32, activation='relu'),
    Dropout(0.4),
    Dense(num_classes, activation='softmax')
])
model.compile(
    optimizer='adam',
    loss='categorical_crossentropy',
    metrics=['accuracy']
)
§ 4 · Results

The LSTM wins on sub-event classification

The LSTM with categorical embeddings reached 88.8% validation accuracy on sub-event classification, ahead of the tree-based and linear baselines — and the full 16-class confusion matrix in the capstone report shows the errors concentrate among the closely related sub-event types rather than spreading uniformly. The density maps and confusion matrix live in the notebook and report linked in the artifacts rail.

§ 5 · Discussion

What the diagnostics bought

  • Running econometric diagnostics before modeling — Breusch-Pagan for variance, ADF for stationarity — caught assumption violations that would have been invisible in an accuracy number alone.
  • Embedding layers beat one-hot encoding for high-cardinality conflict metadata: same information, far fewer parameters.
  • Comparing across neural, tree-based, and linear families made the LSTM result legible — the sequence model earned its accuracy against real baselines, not in isolation.