American University of Beirut
ISMIR 2026, Abu Dhabi

Musicologically Interpretable Deep Learning
for Arabic Maqam Identification and Analysis

Joseph Bakarji1,2, Khyam Allami1,2, Mohammad El Asal1, Dany Abou Jaoude1
1 Department of Mechanical Engineering, American University of Beirut
2 Center for Advanced Mathematical Sciences, American University of Beirut
Can a network identify a maqam without knowing its tonic?

Which maqam is this?From a recording, identify the maqam

Log-frequency spectrogram; overlay: pYIN fundamental frequency.
Task

Input: a recording.
Output: one of 7 maqam families, from pitch alone.

Difficulty

The tonic is unknown, and the intervals do not follow equal temperament.

Goal

A model whose decisions can be interpreted in terms of maqam theory.

Maqams and tuning systemsA tuning system fixes the pitch classes of the octave; a maqam selects its scale degrees among them

tuning system
maqam
Unequal octaves

30 of 35 tuning systems in DiArMaqAr divide the octave into unequal steps.

This paper

Templates use Ronzevalle 1904 (24 pitch classes); other tuning systems are left for future work.

DiArMaqAr: K. Allami, I. Elkhansa, M. El Asal, J. Bakarji, “Culture-Specific Computational Musicology: A Case Study of DiArMaqAr,” ISMIR 2026 (companion paper).

A first approach: template matchingCross-correlate the pitch histogram with each maqam template at every shift, and keep the best match

True maqam
-
Best template match
-
Over all 619 recordings
36.3% accuracy (no learning; paper templates)
template tonic at 0¢
Bottom: cross-correlation score of every template at every shift. Taking only the maximum ignores the rest of these scores.
Templates drawn with all degrees of each maqam (DiArMaqAr, Ronzevalle 1904). The trained model used a version truncated to the lower octave of the note list; the reported accuracies come from that version.

Why it fails: the tonicRandom forest on the tonic-normalised pitch histogram, with Gaussian noise added to the reference tonic

tonic error σ 0¢: 91.8%
Known tonic

CNN 94.0%, random forest 91.8%.

Unknown tonic

CNN on raw pitch: 68.2%. Every 25¢ of tonic error costs about 8 points.

Fourth-degree confusion

Without the label, the tonic is found within 50¢ for only 48% of recordings; 60% of the errors are a perfect fourth off.

Proposed: maqam-informed input featuresInstead of estimating the tonic, the network receives the cross-correlation with each template at every shift and in every time window

\[ R_{t,k,s} \;=\; \sum_{b=0}^{B-1} h_t[b]\;\tau_k\big[(b+s) \bmod B\big] \]
\(h_t\)octave-wrapped pitch histogram of time window \(t\) (\(T = 20\))
\(\tau_k\)DiArMaqAr maqam template \(k\) (\(K = 8\) shown; the 89% model adds 28 jins templates, \(K = 36\))
\(s\)circular shift: the tonic becomes a latent variable
\(B\)30 pitch bins of 40¢
window tt = 11
\(R_{t}\) for one time window of the Hijaz recitation: 8 maqam templates by 30 shifts. Click a row or a cell.
Templates drawn with all degrees of each maqam (DiArMaqAr, Ronzevalle 1904). The trained model used a version truncated to the lower octave of the note list; the reported accuracies come from that version.

MaqamNetFrom audio and theory to a maqam label. Click a stage.

Templates drawn with all degrees of each maqam (DiArMaqAr, Ronzevalle 1904). The trained model used a version truncated to the lower octave of the note list; the reported accuracies come from that version.

Results619 recordings, 7 maqams, stratified 5-fold cross-validation

subset
no tonic tonic-free, maqam-informed known tonic (upper bound, uses the label)

Data: Oud taqasim, 104 solo improvisations; Cairo Congress 1932, 94 recordings from the ORD-CC32 corpus (B. Bozkurt, ISMIR 2025); Maqam-478, 421 Quranic recitations (S. A. K. Shahriar et al., J. King Saud Univ. CIS, 2021).

What the networks attend toAveraged over up to 80 recordings per maqam, from the trained models; saliency smoothed over one bin

top row maqam
Known tonic, CNN

Attends to discriminative scale degrees rather than the shared tonic, e.g. Hijaz at its fourth (500¢).

Tonic-free, MaqamNet

Maqam-specific patterns along the shift axis: a single concentrated peak for Saba, broader attention for Bayat.

Time

Rows are proportional time windows, which capture the coarse sayr of a piece.

Conclusion and Future Work

  • Tonic estimation is the main bottleneck: 94% accuracy with a known tonic, 68% without.
  • MaqamNet encodes the tonic as a latent shift of template features and reaches 89% without tonic estimation (8 maqam + 28 jins templates; 87% with the 8 maqam templates alone).
  • Accuracy comes mainly from the architecture: circular convolutions with random initialisation perform comparably to template initialisation.
  • The templates make the model interpretable: attributions can be read per template, shift and time window.
  • Limitations: 619 recordings, 7 maqam families with distinct scales, and a single tuning system.

Interactive and data-populated slides built with Claude Code.