← Research
Machine LearningNLPTransformersComputational Social ScienceConflict ForecastingExplainable AISHAPPeace Studies

Predicting Peace: Machine Learning and NLP for Peace Agreement Success

A computational social science framework combining ML, transformer-based NLP, and SHAP explainability to forecast whether peace agreements will successfully end armed conflict — deployed as an interactive prediction tool.

Note: This is a very early prototype — work in progress. All local work will be pushed to GitHub once it is complete.


Project Overview

This project develops a machine learning and natural language processing framework to forecast whether a peace agreement will successfully end active armed conflict. Grounded in computational social science, it integrates structured metadata, contextual conflict characteristics, and the full text of peace agreements to build interpretable predictive models, bridging empirical conflict research with state-of-the-art AI methods.

The project uses the PA-X Peace Agreements Database (University of Edinburgh), covering over 2,000 peace agreement texts with extensive metadata on conflict type, negotiation stage, institutional provisions, and implementation outcomes.

Beyond academic contribution, the project is deployed as a live, interactive web application that enables researchers and practitioners to input agreement characteristics and receive real-time success predictions with AI-generated explanations.


Research Questions

Can AI systems reliably forecast whether a peace agreement will end armed conflict — and explain why?

Which features of a peace agreement — structural, institutional, or textual — are most predictive of durability?


Methods

Feature Engineering

  • Metadata encoded into binary and categorical indicators (conflict type, negotiation stage, security arrangements, human rights provisions, inclusion of social groups)
  • Peace agreement texts preprocessed via tokenization, lowercasing, stopword removal, and TF-IDF representation
  • Hybrid feature matrix combining structured metadata with textual information

Classic Machine Learning Models

Trained across metadata and text combinations:

ModelNotes
Logistic RegressionBaseline linear classifier
Support Vector MachinesMargin-based classification
Random ForestBest stable performance on metadata
Gradient Boosting / XGBoostEnsemble boosting methods
AdaBoostAdaptive ensemble

Key finding: text-only classic ML performed poorly; adding metadata and contextual variables substantially improved performance.

Transformer-Based Models

Fine-tuned using Hugging Face:

ModelAccuracyPrecisionRecallF1
DistilBERT-base-uncased
DeBERTa-v3-Large0.8880.8240.8930.824

DeBERTa-v3-Large substantially outperforms classic ML for text classification, particularly on the class imbalance present in peace agreement outcomes.

DeBERTa-v3-Large achieves 0.888 accuracy on 1,508 PA-X agreements. Most predictive signals: security guarantees, human rights provisions, negotiation stage, conflict type, and international missions.
Best-performing model performance summary and top SHAP-identified predictive signals across 1,508 PA-X peace agreements.


Explainable AI (SHAP)

The deployed Random Forest integrates SHAP-based interpretability, enabling users to understand why a specific agreement is predicted to succeed or fail.

Most influential features identified by SHAP:

  • Negotiation stage
  • Conflict type
  • International missions and enforcement mechanisms
  • Human rights provisions
  • Security guarantees

This explainability layer allows practitioners and researchers to interpret model predictions in a theory-informed way — connecting computational output to established conflict studies literature.


Interactive Application

The Peace Agreement Success Predictor is a deployed Streamlit app that enables interactive exploration of model predictions.

Users can:

  • Input metadata features describing any peace agreement
  • Receive a predicted outcome (SUCCESS / FAILURE) with probability estimates
  • Explore SHAP feature contributions explaining the specific prediction

Research Contribution

This project contributes to computational social science and AI-for-policy research by demonstrating that transformer-based NLP, combined with structured conflict metadata, can produce accurate and interpretable forecasts of peace agreement outcomes. Unlike prior work relying on static quantitative models, this framework integrates textual content, provides local explainability, and is deployed as a live tool accessible to non-technical users.


Work in Progress

  • Survival analysis extending the framework to model peace duration rather than binary success (Cox proportional hazards, Random Survival Forests, DeepHit)
  • Natural-language explanation layer via OpenAI API to describe not only what is likely to fail, but what provisions could strengthen a treaty before signing
  • Full interactive web application integrating the OpenAI API for real-time, human-readable prediction explanations accessible to researchers and policymakers
  • Research manuscript in preparation for journal submission