--- license: cc-by-nc-4.0 tags: - conflict-forecasting - geospatial-transformer - political-violence - political-science - ucdp - pytorch --- # UCDP Mini Spatial Event Encoder (ucdp_M) A small transformer encoder that learns representations of location-months from UCDP Georeferenced Event Dataset (GED) event histories. Each PRIO-GRID 0.5 degree cell-month is represented by its trailing 12-month sequence of organized-violence events (type of violence, dyad sides, fatality bin, month offset), encoded with masked-event modeling. The CLS embedding is a general-purpose representation for conflict forecasting and transfer learning: fine-tune it for incidence forecasting, rebel/state violence, escalation, or related event-based tasks. - Architecture: field embeddings -> concat-project -> [CLS] + TransformerEncoder (4 layers, 8 heads, d=128), masked-event-modeling objective. - Unit: PRIO-GRID 0.5 deg cell-month; max 200 events per sequence; seed 123. - Training data: UCDP GED 25.1 (1989-2024), the open (CC BY 4.0) georeferenced event dataset of organized violence. ## Usage ```python from modeling_ucdp import load_encoder model, cfg = load_encoder(".") # seq: LongTensor [B, 200, 5] (ids per ucdp_vocab.json; 0 = pad) # mask: BoolTensor [B, 200] (True = real event) z = model.encode_sequence(seq, mask) # [B, 128] cell-month embeddings ``` ## License and attribution Model weights and code: CC BY-NC 4.0. Training data is the UCDP GED (CC BY 4.0). If you use this model, cite UCDP: - Davies, S., Pettersson, T., Sollenberg, M., & Oberg, M. (2025). Organized violence 1989-2024, and the challenges of identifying civilian victims. Journal of Peace Research 62(4). - Sundberg, R. & Melander, E. (2013). Introducing the UCDP Georeferenced Event Dataset. Journal of Peace Research 50(4). ## Limitations - UCDP GED covers organized violence with at least one fatality; protests and non-lethal events are not included. Coverage reflects media/source reporting. - The encoder is a research artifact for representation learning and forecasting research. It is not suitable for operational targeting or safety-critical use. - Embeddings reflect historical reporting patterns and inherit their biases.