This repository contains the experiment code accompanying the paper "Machine Learning in the Archive: Evaluating CNN-LSTM Generalisation on Archival uhadi Recordings", accepted at the South African Institute for Computer Scientists and Information Technologists conference (SAICSIT 2026).
# Machine Learning in the Archive: CNN-LSTM Generalisation on Archival *uhadi* Recordings
**SAICSIT 2026** | Paper #3433
> Sibusiso Ncanywa · William Fourie · Dane Brown
> Rhodes University, Makhanda, South Africa
---
## Overview
This repository contains the experiment code accompanying the paper **"Machine Learning in the Archive: Evaluating CNN-LSTM Generalisation on Archival *uhadi* Recordings"**, accepted at the South African Institute for Computer Scientists and Information Technologists conference (SAICSIT 2026).
The paper presents a systematic evaluation of eight CNN-LSTM hybrid architectures for binary classification of *uhadi* — a calabash-resonated musical bow of *amaXhosa* traditions in South Africa — with a focus on out-of-distribution (OOD) generalisation to historically distant archival recordings.
---
## Abstract
Eight CNN-LSTM variants (VGG16, VGG19, ResNet50V2, DenseNet121, MobileNetV2, MobileNetV3Large, EfficientNetV2B3, Xception, each paired with a standardised LSTM head) are evaluated against matched standalone CNN baselines under identical feature construction and optimisation settings. A three-channel spectral image (log-Mel spectrogram, MFCC, CQT) serves as input, enabling cross-domain transfer from ImageNet weights. Models are trained under a three-phase curriculum advancing from studio recordings to archival field recordings to noise-augmented data. In-distribution (ID) F1 reaches 99–100% across all architectures; OOD F1 on 1957 Hugh Tracey *Sound of Africa* recordings (ILAM) falls to 17–40%, yielding generalisation gaps of up to 82% and a 70% failure rate. In seven of eight paired comparisons, appending the LSTM head *reduced* OOD generalisation relative to the backbone-only baseline.
---
## Repository Structure
```
Machine-Learning-in-the-Archive/
├── uhadi/ ← Python package (models, training, preprocessing, …)
│ ├── models/builders/ ← CNN and CNN-LSTM Keras model builders
│ ├── preproces …