arXiv:2609.01064cs.SDSep 2026

Manuscript Offprint

arXiv:2609.01064

Artificial Rosetta Stone: Constrained Maximum A Posteriori (MAP) Reconstruction of Symbolic Raga Sequences via Order-k Markov Models

Saanvi Raghavendran, Abhishek Bhattacharjee

Abstract

Reconstructing a damaged musical fragment is an inverse problem: the observed sequence contains partial information about an unknown sequence, while a raga encodes structural constraints that can limit the set of allowable completions. This paper formalizes a mathematical framework for the first task, and proposes the Artificial Rosetta Stone (ARS) to that end. The rewritten formulation very clearly classified into three claims that are often conflated in the literature: a symbolic sequence can be reconstructed under a probabilistic model; a sequence can be made consistent with an explicitly encoded raga grammar; and a historical performance can be authenticated. Only the first two are supported by the present mathematics.

We model a raga as a finite symbolic alphabet plus a constraint system, and use an order-k Markov model to encode context-dependent melodic probabilities. A symmetric Dirichlet prior leads to an analytically tractable posterior and a smoothed estimator. We reinterpret missing-note reconstruction as a constrained maximum-a-posterior problem. With fixed length and finite-order local constraints, the optimization problem admits an exact dynamic-programming solution, with time complexity O(TNk+1)O(TN^{k+1}) in the dense worst case and lower complexity for sparse grammars. We derive the parameter count Nk(N−1)N^k(N-1), prove a concentration bound under explicit mixing assumptions, and analyze the propagation of estimation error into sequence log-likelihoods.

A reproducible synthetic experiment is specified using six raga-inspired symbolic alphabets, orders k∈{1,2,3}k \in \{1, 2, 3\}, and missingness rates of 10%, 30%, and 50%. The experiment is explicitly a proof of concept and is not evidence of historical reconstruction. In addition, a limited real-audio feasibility evaluation is performed on 42 publicly available Yaman clips from the RagaVeda repository: 30 usable symbolic sequences are evaluated after automated pitch extraction, tonic estimation, segmentation, and quantization. The real-data study is explicitly a feasibility pilot rather than expert-validated or archival reconstruction, since the source has no documented license or provenance and the symbolic reference is generated by the same automated transcription pipeline. All numerical claims are tied to their stated experimental conditions and are not asserted as universal properties of Hindustani music. Code for the estimator, decoder, and both experiments is publicly available at https://github.com/mathacker23/ArtificialRosettaStone.

Keywords: Hindustani music; raga; sequence reconstruction; Markov chains; Dirichlet estimation; constrained MAP inference; dynamic programming; statistical learning; computational musicology.

*First author: saanviraghavendran@gmail.com †GitHub Repository link: https://github.com/mathacker23/ArtificialRosettaStone ‡Second & Corresponding author: abhishek@theabstractmath.com

Contents

1 Introduction 5
1.1 Background and motivation 5
1.2 Research questions and contributions 5
1.3 Scope and terminology 6
2 Related Work 6
2.1 Computational musicology 6
2.2 Markov models and algorithmic generation 6
2.3 HMMs and latent phrase structure 6
2.4 Neural generative models 6
2.5 Why this framework is different 6
3 Mathematical Foundations 7
3.1 Symbolic state space 7
3.2 Order-k Markov chains 8
3.3 Dirichlet Bayesian estimation 8
3.4 Hard constraints and feasible kernels 9
4 Constrained MAP Reconstruction 9
4.1 Objective 9
4.2 Dynamic programming state 9
4.3 Optimality theorem 10
4.4 Zero probabilities 10
5 Statistical Guarantees 10
5.1 A transparent independent-sample bound 10
5.2 From parameter error to sequence-score error 11
5.3 BIC and order selection 11
5.4 Identifiability 12
6 Optional Extensions Beyond the Core Model 12
6.1 Raga-HMM 12
6.2 Hierarchical VAE 12
6.3 Continuous pitch and gamaka 12
6.4 Bayesian fusion 12
7 Synthetic Experimental Design 13
7.1 Purpose 13
7.2 Evaluation metric 13
7.3 Baselines and ablations 13
7.4 Statistical reporting 13
7.5 Reproducibility protocol 14
8 Synthetic Data Evaluation 14
8.1 Purpose and Experimental Design 14
8.2 Evaluation Metric 14
8.3 Preliminary Synthetic Results 14
8.4 Synthetic Missingness and Model Order 15
8.5 Interpretation and Boundary of the Synthetic Evidence 15
9 Real-World Data Evaluation 16
9.1 Why the Real-World Evaluation Is the Principal Result 16
9.2 Data Provenance 16
9.3 Audio-to-Symbol Pipeline 16
9.4 Corpus Construction 17
9.5 Experimental Protocol 17
9.6 Primary Real-World Results 17
9.7 Real-Data Performance as Missingness Increases 17

9.8 Real Data Relative to the Uniform Baseline ..... 18
9.9 Context Coverage and Model Sparsity ..... 18
9.10 Real-Data Model-Order Comparison ..... 19
9.11 Variance and Robustness ..... 19
9.12 Threats to Validity ..... 19
9.13 What the Real Experiment Establishes ..... 19

10 Synthetic vs. Real-World Comparison ..... 21
10.1 Direct Numerical Comparison ..... 21
10.2 Why Synthetic Data Produce Higher Raw Accuracy ..... 21
10.3 Why the Real-World Evaluation Is the Stronger Empirical Test ..... 22
10.4 Graphical Evidence for the Real-Data Result ..... 22
10.5 What Neither Evaluation Establishes ..... 22
10.6 Overall Empirical Interpretation ..... 23
10.7 Code Availability ..... 23

11 Algorithmic Specification ..... 24
11.1 Training ..... 24
11.2 Reconstruction ..... 24
11.3 Pseudocode for exact reconstruction ..... 25
11.4 When beam search is appropriate ..... 25

12 Ablation and Sensitivity Analysis ..... 26
12.1 Smoothing sensitivity ..... 26
12.2 Grammar sensitivity ..... 26
12.3 Masking sensitivity ..... 26
12.4 Order-selection sensitivity ..... 26
12.5 Ablation table template ..... 27
12.6 Error analysis ..... 27

13 Cultural and Scientific Limitations ..... 28
13.1 A scale is not a raga ..... 28
13.2 Shruti and continuous intonation ..... 28
13.3 Gamaka ..... 28
13.4 Rhythm and tala ..... 28
13.5 Historical authenticity ..... 28
13.6 Synthetic data ..... 28
13.7 Ethical and cultural considerations ..... 28
13.8 Reproducibility limitation ..... 29

14 Discussion ..... 29

15 Conclusion ..... 30

A Proofs and Technical Details ..... 32
A.1 Proof of the parameter count ..... 32
A.2 Proof of the Dirichlet posterior ..... 32
A.3 Proof of KL support projection ..... 32
A.4 Proof of dynamic-programming optimality ..... 32
A.5 Concentration derivation ..... 33
A.6 Score stability proof ..... 33

B Appendix: Formal Failure Analysis of the Original Theorems ..... 33
B.1 Failure of the stated contraction hypothesis ..... 33
B.2 Failure of argmax continuity ..... 33

C Appendix: Reproducibility Checklist ..... 33
C.1 Repository structure ..... 34

D Appendix: Recommended Future Theoretical Work 34
D.1 Soft reconstruction operators ..... 34
D.2 Continuous-pitch Bayesian model ..... 35
D.3 Uncertainty-aware grammar ..... 35
D.4 Archival validation ..... 35
E Appendix: Extended Mathematical Notes 35
E.1 Initial-context estimation ..... 35
E.2 Stationarity is not required for the decoder ..... 35
E.3 State augmentation ..... 35
E.4 Tie-breaking ..... 35
E.5 Model misspecification ..... 36
F Appendix: Notation and Assumption Register 36
F.1 Interpretation of guarantees ..... 36
G Appendix: Final Submission Version Notes 37
G.1 Claim-to-evidence audit ..... 37