Manuscript Offprint
arXiv:2610.09104On the Computational Complexity of Hidden Markov Model Identification
Abstract
Identification is the task of recovering the parameters of an unknown ground-truth model from sampled data. When parameters other than the ground truth induce the same output distribution, data alone does not provide enough information to recover the ground truth, and the model is thus called unidentifiable. We study the identifiability problem for hidden Markov models (HMMs): given an HMM, is it identifiable? Existing work on HMM identification establishes conditions under which the ground-truth HMM can be identified. However, most of these conditions are sufficient but not necessary, meaning that, when a model does not satisfy them, its identifiability remains inconclusive. We instead take a computational perspective: is there a sound and complete algorithm that decides whether a given HMM is identifiable, and if so, what is the complexity of this decision problem? We consider the decision problems arising from the various notions of identifiability in the literature, including deterministic, generic, global, local, state-permutation-invariant, and finite-alphabet identifiability. We show that all of these problems are decidable in PSPACE, via reductions to the theory of the reals at various levels of its quantifier-alternation hierarchy. We further show that the deterministic variants are already ∀R-hard (and hence coNP-hard) for simply parameterized families.
1 Introduction
Hidden Markov models. A Hidden Markov model (HMM; Petrie, 1969; Rabiner, 1989) is a stochastic model in which an unobserved Markov chain generates sequences of observations. Given a dataset of observation sequences, the central task is HMM estimation: find an HMM that generates the data. The typical approach to HMM estimation is maximum-likelihood estimation (i.e., estimate the likeliest HMM to generate the data), which is often implemented by the famed Baum–Welch algorithm (Baum et al., 1970; Leroux, 1992). As such, HMMs are a standard tool for modeling sequential data and play a crucial role in a wide range of fields, including signal processing (Rabiner, 1989), machine learning (Ghahramani, 2001), finance (Hamilton, 1989), psychology (Visser et al., 2002), telecommunications (Turin and Van Nobelen, 1998), and many more (Rabiner, 1989; Ephraim and Merhav, 2002).
HMM identification. Within the vast landscape of HMM estimation, a considerable body of work focuses on identification (Blackwell and Koopmans, 1957; Petrie, 1969; Rothenberg, 1971): under the assumption that the dataset was generated by a ground-truth HMM, beyond simply fitting a model to said data, can we reconstruct the ground-truth HMM? If there exists an HMM different from the ground truth that generates the same distribution on observation sequences, then no amount of data from that distribution can allow us to distinguish between them, and the ground truth is thus deemed unidentifiable. In contraposition, the ground-truth is identifiable when its distribution on observation sequences is unique. HMM identifiability is particularly relevant in settings where the ground-truth model is an interesting object of study in-and-of-itself, having been applied in a broad range of areas such as cognitive diagnosis (Liu et al., 2023), system monitoring (Zhang et al., 2016), and DNA sequencing (Steel et al., 1993, 1998).
Identifiability flavors. For any ground-truth HMM, one may construct a different HMM with the same output probabilities in a trivial manner, say by adding dummy hidden states or by renaming the hidden states without changing the output probabilities. Therefore, to pose a sensible notion of identifiability, it is necessary to impose restrictions on the set of allowed HMMs, for instance by fixing the number of hidden states, as well as specify the kind of uniqueness we seek, for instance by enforcing uniqueness up to hidden-state renaming. Consequently, literature introduces various nuanced definitions of HMM identifiability. There are two main flavors of identifiability: deterministic and generic. Deterministic (or strict) identification is a classical idea (see Paz (1971); Finesso (1990); Bonhomme et al. (2016)), and it expresses that the ground-truth model is “strictly” unique, in that, no model other than the ground-truth may generate the data. In contrast, generic (or probabilistic) identification asks whether the HMMs that induce the same distribution on output words as the ground-truth model form a set of Lebesgue measure zero (see Petrie (1969); Allman et al. (2009); Liu et al. (2023)), which in principle allows the identification of the ground-truth almost-surely. Literature further establishes additional variants, and we refer to Cole (2020) for a comprehensive introduction. In short, local identification asks whether there exists a ball around the ground-truth in which it is unique (whereas the more general question is regarded as global identification), parameterized identification restricts the number of parameters that describe the model (closely related to parameter redundancy (Catchpole and Morgan, 1997)), permutation independence considers uniqueness up to the permutation of hidden states. Finally, some works use the term “model” to refer to individual HMMs (Tune et al., 2013), whereas others use it to refer to classes or sets of HMMs induced by a given set of parameters (Catchpole and Morgan, 1997). We adopt the former terminology, and we explicitly write “family” when referring to sets of HMMs.
Existing HMM identification techniques and the current gap. Most HMM literature on identifiability studies the conditions under which identification is guaranteed. These conditions include rank and separation assumptions used by spectral algorithms (Hsu et al., 2012), assumptions on Markov chain topology (Pearl and Tarsi, 1986; Steel et al., 1998; Chang, 1996), Kruskal-rank conditions (Kruskal, 1976; Allman et al., 2009), and problem-specific restrictions such as Q-matrix structures in cognitive diagnosis (Liu et al., 2023). Tune et al. (2013) build upon Allman et al. (2009) to provide necessary and sufficient conditions for identifiability under irreducibility, aperiodicity, and non-redundancy assumptions (see Appendix I). While these results are crucial, our work presents a different perspective: rather than introducing another criterion for identifiability, we focus on the computational complexity of the decision problem itself. Cole (2019, 2020) applies symbolic-algebra systems to local HMM identifiability, which provides a sound and complete decision algorithm. However, a naive application of such approach into our setting requires exhaustively enumerating exponentially many probabilities, whereas we provide a PSPACE solution. Even though identifiability problems are often computationally hard for other stochastic models (see for instance van der Zander et al. (2023); Dörfler et al. (2024)), and HMM identifiability has vast literature and has generally been speculated intractable (Cole, 2019), the exact computational complexity of HMM identifiability has so far remained an open question.
Scope. We focus on finite-state, finite-alphabet, discrete HMMs. This is the setting of much of the classical HMM identifiability and probabilistic automata literature (Petrie, 1969; Baum et al., 1970; Paz, 1971; Rabiner, 1989; Tzeng, 1992). It is also the natural setting from a computational perspective: the input is an HMM with rational parameters that can be encoded in the tape of a Turing machine. Other models such as continuous-output, infinite state, or nonparametric HMMs are important statistical models, but their identifiability is not as relevant from a computational perspective and are not treated in this paper.
Research objectives. We study the (Cook–Levin–Karp) computational complexity-theoretic classification of canonical HMM identifiability problems, by proving complexity upper bounds in the form of decision algorithms (i.e., it cannot be harder than running its decision algorithm), and lower bounds in the form of many-one reductions (i.e., it is at least as hard as another well-known hard problem). In particular, we study the following problems: (I) deterministic HMM identifiability up to equality, hidden state permutation, and bisimilarity, (II) deterministic identifiability with fixed alphabet sizes, (III) local identifiability, (IV) generic identifiability, and (V) family-wise identifiability.
Contribution. We give polynomial-size certificates for HMM output equivalence in Section 4 and use them throughout the paper. Section 5 shows that deterministic identifiability up to equality is in , and that it is -complete for simple parameterizations, and coNP-hard for mask (rectangular) parameterizations. We show that identifiability up to hidden-state permutation is in in Section 6.1, while identifiability up to bisimilarity is in is shown in Section 6.2. Section 6.3 shows that the hardness results from deterministic global identifiability up to equality carry over to both identifiability up to hidden-state renaming and bisimilarity. In Section 7.1, we show that the hardness results are alphabet-independent, meaning that the identification of HMMs with a binary alphabet is as hard as the problem with an arbitrary alphabet. Section 7.2 shows that local identifiability is in . Section 7.3 shows that generic identifiability is in , and Section 7.4 shows family-wise identifiability is in . By Canny (1988) and Renegar (1992), it follows that all problems studied here are decidable in PSPACE.
Deterministic HMM identification. The deterministic (or strict) identifiability problem for functions of finite Markov chains goes back to Blackwell and Koopmans (1957) and Petrie (1969). Later work developed sufficient conditions for deterministic identifiability, including conditions based on consistency of estimation (Finesso, 1990), multivariate latent-structure decompositions (Bonhomme et al., 2016), and nonparametric HMM inference (Gassiat et al., 2016). Tune et al. (2013) use tensor decompositions to give a deterministic identifiability criterion for finite-alphabet HMMs under irreducibility and aperiodicity assumptions. We view their theorem as an edge-case and provide a discussion in Appendix I.
Generic HMM identification. Generic identifiability asks whether the non-identifiable parameters form a set with a lower algebraic dimension. Allman et al. (2009) establish generic identifiability for broad latent-structure models, including HMMs, using Kruskal's theorem. Related generic identifiability criteria appear in work on multivariate latent structures and nonparametric HMMs (Bonhomme et al., 2016; Gassiat et al., 2016). Our generic-identifiability section does not propose another criterion for generic identifiability, but studies the computational complexity of its decision problem.
Local identifiability and parameter redundancy. A common way to study local identifiability is through parameter redundancy: whether a parameterized statistical model uses more parameters than can be independently recovered from its observable probabilities (Rothenberg, 1971; Catchpole and Morgan, 1997). Cole applies this idea to HMMs using symbolic algebra. Her calculation first forms an exhaustive summary, namely a finite list of expressions in the parameters that fully describe the model's output distribution. One then differentiates these expressions with respect to the parameters and studies the rank of the resulting matrix (Cole, 2019, 2020). Cole uses this rank to decide whether the parameterized family is redundant or at least locally identifiable.
Hardness of identification in other models. Dörfler et al. (2024) study generic identification in linear structural causal models. They prove -hardness for numerical identification and give PSPACE upper bounds for generic identification. Their lower-bound strategy is based on “finding another solution” promise variants such as , and is structurally close to HMM non-identifiability: in both settings, one asks whether a known model is unique.
Automaton equivalence. Probabilistic and weighted automata provide a useful bridge between HMM learning and automata theory. A weighted automaton takes a sequence of symbols (a word) as input and returns a real number (its weight) as output by assigning a real-valued matrix to every symbol and taking the product of the symbols that appear in the input word. Probabilistic automata are the stochastic specialization of weighted automata Paz (1971). HMM word probabilities have a similar matrix-product form, which is why algorithms for probabilistic automaton equivalence can be reused for HMMs (Doyen et al., 2008). In particular, the probabilistic automaton equivalence theorems by Paz (1971), Tzeng (1992), and Kiefer and Wachter (2014) form the basis of the output-equivalence certificate in Section 4.
Automaton minimization. Automaton minimization asks whether there exists an automaton with fewer states than a given automaton, while performing the same function. For weighted automata this can be done in polynomial time by constructing the basis of the vectors reachable from the initial vector and, symmetrically, of the vectors that can reach the final vector (Schützenberger, 1961; Berstel Jr and Reutenauer, 1988; Kiefer and Wachter, 2014). These linear-algebraic approaches for weighted automaton minimization do not necessarily preserve nonnegativity and stochasticity, so they cannot be used for probabilistic automaton minimization. Kiefer and Wachter (2014) show that probabilistic-automaton minimization is NP-hard and reduce it in polynomial time to the existential theory of the reals. The same basis-of-reachable-vectors idea will reappear in our certificate for HMM output equivalence in Section 4.
Automata learning. Active automata learning begins with Angluin's algorithm for regular languages (Angluin, 1987), which has been extended to probabilistic models such as Markov chains (MC) and Markov decision processes (MDP) (Tappler et al., 2021). Deterministic automaton identification from labeled examples is already computationally hard: Gold (1978) proved that finding a smallest DFA consistent with given data is NP-complete. This literature is distinct from our setting, which assumes access to the full output distribution rather than labeled examples, but it provides useful context for why automaton identification problems often become computationally difficult.
3 Background
3.1 Notation
A probability distribution over a finite set is a function where . The support of is . For a kernel , we write . We use boldface for random variables. Indicator is 1 when holds and 0 otherwise. An alphabet is a finite set with at least two symbols, and we let (known as the Kleene closure of ), and let denote the empty word. We also define . If , then is its length and its -th symbol. We let be the word obtained by prepending symbol to word . The complement of a decision problem is . Given a matrix , its entry in row and column is . We write for row and for column . The all-ones column vector of dimension is denoted .
3.2 Hidden Markov models
We consider finite discrete hidden Markov models over a finite observation alphabet . Whenever is clear from the context, we leave it implicit in the notation. In fact, we later show that a binary alphabet is enough for our hardness results; see Proposition 31.
Formal definitions about HMMs are introduced next, without particular intuition, and we refer to Rabiner (1989) for a tutorial.
Definition 1. A hidden Markov model (HMM) over is a tuple where is the number of hidden states, is the initial distribution, is the transition matrix, and is the output matrix. They satisfy
We write for the set of -state HMMs over the current alphabet and .
Definition 2. An HMM induces the following stochastic process:
It follows that and .
We use the emit-then-transition convention: the hidden state emits an observation, then transitions to the next state.
Definition 3 (Rabiner (1989)). For and ,
This formula sums over hidden-state sequences—an exponential computation. Remark 7 gives the usual polynomial-time forward computation of the same quantity (see Rabiner (1989)).
We next define output equivalence for HMMs:
Definition 4. HMMs and over the same alphabet are output equivalent, written , if and only if for every .
3.3 HMM parameterization
An HMM is specified by the entries of , A, and B, usually expressed in relation to a parameter vector . A parameterization specifies how these entries depend on and which parameter values are allowed. Parameterizations are standard in identifiability (Catchpole and Morgan, 1997; Cole, 2019).
To take a parameterized HMM as input to a decision problem, we require its description to be finite, so that it can be encoded on, say, the tape of a Turing machine (Arora and Barak, 2009). As Sullivan (2023) argues, “statistical models are semialgebraic sets”. Adopting this view, we consider semialgebraic parameterizations of HMMs, which indeed admit finite descriptions and capture the overwhelming majority of models studied in the literature.
Definition 5 (HMM parameterization). An HMM parameterization is a pair , where is semialgebraic (see Section 3.6), and is given by polynomials with rational coefficients. Thus every entry of , , and is a rational polynomial in . We call the parameterization, a parameter value, and the corresponding family.
The domain being semialgebraic (see Section 3.6), we encode the defining formula and the polynomials explicitly, with rational coefficients and monomial exponents in binary. The input size includes these descriptions and the lists of parameters and HMM entries.
For instance, HMMs are most commonly provided by explicitly listing the entries of , A, and B, which can be viewed as a trivial parameterization where each parameter bijectively maps to each entry. The stochasticity constraints for may simply be included in the description of .
3.4 Probabilistic automata
We provide the explicit definition of probabilistic automata, as these appear in Section 5.2.
Definition 6 (Probabilistic automaton; Paz (1971)). A probabilistic automaton (PA) is a tuple , where is a finite state set of size (with a fixed ordering), is a finite alphabet, is a stochastic row vector, every is row-stochastic, and is a column vector of final probabilities. For a word , write and . The acceptance probability of is . Two PAs are equivalent if and only if they have the same acceptance probability for every word.
3.5 The existential theory of the reals
The existential theory of the reals (ETR; see Schaefer et al. (2026) for a survey), is the set of all true formulas of the form “”, where is a quantifier-free system of polynomials with rational coefficients. The decision problem for ETR is, given such a formula, to determine whether the formula holds or not. The complexity class is defined as the downward closure of the existential theory of the reals under polynomial-time many-one (Karp) reductions. The complement of is denoted .
Classical ETR decision algorithms place (Canny, 1988; Renegar, 1992), and NP by encoding Boolean satisfiability with variables constrained by , negation by , and conjunction by (see for instance Hillar and Lim (2013)). The decision problem of determining if a quadratic ETR formula holds is denoted QUAD, and it is easy to show that QUAD is -complete (see Schaefer et al. (2026)), since any polynomial can be transformed into a (polynomially-sized) system of quadratic equations by introducing helper variables (for instance, becomes , ).
Allowing inequalities, disequalities, and Boolean combinations does not change the class. For instance, can be written in purely equational form as , disequality can be written as , and can be written as . Finite Boolean disjunction can be encoded by selector variables; for instance, becomes , , . Logical negation is then treated as an abbreviation for negating the comparison relation (i.e. is just ), and implication is an abbreviation for disjunction (i.e. becomes ).
We will repeatedly use certificates. To prove that a problem is in , we describe a polynomial-size existential real formula whose satisfying assignments are exactly the desired witnesses. We use such formulas for non-identifiability: a satisfying assignment consists of a rival HMM together with auxiliary variables certifying output equivalence.
3.6 Basic definitions from algebraic geometry
Here we provide basic definitions and refer to Hartshorne (2013) for details. A set is algebraic if it is the common zero set of finitely many real polynomials with rational coefficients. It is semialgebraic if membership in can be expressed by a finite Boolean combination of equations and inequalities of rational polynomials. Equivalently, a semialgebraic set is a finite union of sets, each defined by finitely many simultaneous polynomial equations and inequalities. In inputs to our computational decision problems, all coefficients are rational.
For a nonempty semialgebraic set , its real dimension, denoted , is the largest such that projecting onto some of its coordinates gives a set with nonempty interior in . Thus a nonempty finite set has dimension 0, a line or parabola has dimension 1, a nonempty open subset of has dimension , and so on. In Section 7.3, we use the property that existentially quantifying some variables in a formula of polynomial equations and inequalities still defines a semialgebraic set in the remaining variables (Basu et al., 2006).
4 Polynomial-size certificates of HMM output equivalence
This section constructs the output-equivalence certificate used in our later complexity upper bounds. For HMMs with n and hidden states, the classical theorem by Paz (1971) says that, if the models are different in their output probabilities, then some word of length at most witnesses the difference. Thus equivalence could be checked by comparing all words up to this length, but that list is exponential in the number of hidden states.
The so-called forward procedure gives a more compact encoding. After reading a word w, the probability that an HMM is in a given hidden state is given by the row vector . Although there are exponentially many words, all these vectors live in an n-dimensional vector space, so at most n such can be linearly independent. Tzeng's algorithm exploits this to decide probabilistic automaton equivalence in polynomial time by keeping only a basis of the vectors generated by words, and Kiefer and Wachter (2014) show how the condition that this basis remains closed after reading another symbol can be expressed in . We extend the same idea to HMMs and apply it in parallel to the target and rival HMM. The resulting certificate replaces exponentially many word equalities by polynomially many real variables and equations.
4.1 -certificates for HMM output equivalence
First, we recall a well-established idea from classical literature known as the forward procedure, which we later use in our certificate constructions. The forward procedure evaluates a word by a linear pass of matrix multiplications instead of explicitly summing over all hidden-state paths like done in Definition 3. We refer the reader to Section III.A in Rabiner (1989) for an instructive tutorial.
Remark 7 (Forward procedure). For , let , . For , let and . Then, . Note that the final multiplication by is harmless because .
In the theorem below we provide an certificate for HMM output equivalence. The rows of provide the basis of the forward space, , which is a technique we borrow from the probabilistic automaton equivalence algorithm by Tzeng (1992) and is also used in the certificate of probabilistic automaton non-minimality of Kiefer and Wachter (2014). The equation says that, after appending one more observation , every such vector is still a linear combination of the rows of . In Section 3.1 of Kiefer and Wachter (2014), a similar equation is defined for probabilistic automaton non-minimality, which they present as a Brzozowski-like minimization (as in Brzozowski (1962)).
Theorem 8 ( certificate for HMM output equivalence). Let and be HMMs over the same alphabet. Then, if and only if there exist and for such that
F_{1,*}=(\pi^{\intercal},-\pi^{\prime}^{\intercal}), \tag{1}where we let and be the matrices from Remark 7 to define
Proof. For , we write and . Then,
(\pi^{\intercal},-\pi^{\prime}^{\intercal})T_{w}^{+}\mathbf{1}_{n+n^{\prime}}=\mathbb{P}_{\mathcal{M}}(w)-\mathbb{P}_{\mathcal{M}^{\prime}}(w). \tag{4}Therefore, if and only if for all .
(⇐) direction: if matrices and satisfying (1)–(3) exist, then .
Suppose that such and exist. We claim that, for every word , the row vector belongs to the row span of (i.e., is a linear combination of the rows in ), which we prove by induction on . This is immediate for by (1). In the inductive case, if , then for all ,
(\pi^{\intercal},-\pi^{\prime}^{\intercal})T_{w y}^{+}=u F T_{y}^{+}=u\vec{T}_{y}F,so is still in the row span of . By (2), every vector in the row span of satisfies , and equation (4) thus gives for every word .
(⇒) direction: if then matrices and satisfying (1)–(3) exist.
As in Tzeng (1992), consider the forward space
V:=\mathrm{s p a n}\left\{(\pi^{\intercal},-\pi^{\prime}^{\intercal})T_{w}^{+}\mid w\in\Sigma^{*}\right\}.Since has dimension choose a basis of such that . Then, construct matrix by letting the first rows be this basis and padding the remaining with zeros. By construction of , its row-span equals to . Equation (1) thus holds immediately. Moreover, because and by (4), we have that for every word . Hence every vector in is orthogonal to , and we conclude , i.e. (2) is satisfied.
It remains to construct matrices satisfying (3). For each , the space is invariant under right multiplication by ; that is, every vector of satisfies
((\pi^{\intercal},-\pi^{\prime}^{\intercal})T_{w}^{+})T_{y}^{+}=(\pi^{\intercal},-\pi^{\prime}^{\intercal})T_{w y}^{+}\in V.Therefore, each row of lies in the row-span of . For every row of , choose coefficients expressing that row as a linear combination of the rows of . Then, placing these coefficient rows into a matrix gives with . Thus equations (1)–(3) are satisfied by and .
Remark 9. The equations above are polynomial in the HMM entries and in the entries of the certificate matrices. There are auxiliary variables and polynomially many equations. Thus Theorem 8 gives a polynomial-size certificate for HMM output equivalence, exactly in the form needed below when the rival HMM is itself existentially quantified.
5 Deterministic identifiability up to equality
The target model in our decision problems is always fully specified.
Problem 10. Let denote the following problem. The input is an HMM parameterization , and a rational parameter value defining the target . The decision problem is whether, for every , if then .
We write := \overline{\text{IDHMM}_{\text{det}}^= for the corresponding non-identifiability problem. Thus, iff there exists such that but . We use the same naming convention for the complements of the other identification problems throughout.
Once a target is fixed, we call any other HMM allowed by the parameterization a rival HMM. Here “rival” only means a candidate alternative to the target and it does not presuppose that the two HMMs are distinct or output equivalent.
5.1 Deterministic identifiability up to equality is in
Theorem 11. colDHMM is in , and therefore IDHMM is in .
Proof. Existentially guess a rival parameter value together with the matrices and from Theorem 8. The formula contains:
(i) the polynomial constraints defining ;
(ii) equations (1)–(3), with the rival entries given by ;
(iii) the non-equality of the two HMMs .
All entries of are polynomial in , so every constraint above is polynomial. If the formula is satisfiable, is exactly a distinct output-equivalent rival. Conversely, any such rival supplies , and Theorem 8 supplies the equivalence matrices. Hence .
5.2 Deterministic identifiability up to equality is -hard
Equivalently, we prove the -hardness of colDHMM , which requires encoding arbitrary polynomial equations as a non-identifiability problem. For fully general parameterizations, as in Definition 5, -hardness follows trivially: the entries are already arbitrary polynomials, so the equations can be encoded directly. It is therefore more productive to consider the computational hardness of restricted classes of parameterizations.
This section covers simple parameterizations in the sense of Junges et al. (2018) and Winkler et al. (2019), where every entry is a rational number, a variable, or 1 minus a variable. Another kind of restricted class, known as masked or rectangular parameterizations, is covered later in Section 5.3. We start with the definition of simple parameterizations:
Definition 12 (Simple parameterizations; Junges et al. (2018)). A parameterization is simple if every HMM entry is either a rational constant, a parameter , or its complement , and
Our approach is to first establish the -hardness of the identifiability of probabilistic automata (PA; Definition 6) with simple parameterizations, and then reduce to HMM identifiability with simple parameterizations. We use the same meaning of simple for PAs: every entry of , the matrices , and is either a rational constant, a parameter , or its complement .
The following example explains how an question becomes a question about whether a simply parameterized PA has a distinct equivalent PA. The approach is to extend the given system of polynomial equations by adding a dummy solution, and then encode it as a PA with simple parameters where the dummy solution is the target PA, and any distinct rival equivalent to the target corresponds precisely to a solution to the original system of equations.

(a) Initial gadget.
(b) Product gadget.
(c) Sum gadget.
Figure 1: Gadgets in a simply parameterized PA encoding (6). Transitions are labeled with letter, probability pairs, and the alphabet is .
Example 13 ( to PA identifiability). Consider the system
To add a dummy solution, introduce a selector variable and extend (5) as follows
The equation forces . If , the last two equations force , giving the dummy solution. If , the remaining constraints reduce to the original system (5).
Next, we encode system (6) as a PA with simple parameterizations: initially split into a target branch and a rival branch (Figure 1 a), chain transitions to express products (Figure 1 b), and merge branches to compute weighted sums (Figure 1 c). Find the full diagram in Appendix A.2. Its only words that can have nonzero acceptance probability are
By taking as the target PA, there exists a distinct equivalent rival (within this family of PAs) if and only if (5) has a solution. Here, that rival is , .
Example 13 extends to general systems of polynomial equations. Encoding polynomial equations in PA acceptance probabilities already appears in Lenhardt (2009, Theorem 5.6), Chonev (2017, Remark 7), and Winkler et al. (2019, Lemma 20). Our proof of Theorem 14 takes inspiration from this prior work to prove the -hardness of PA identifiability, and later in Theorem 15 the result is extended to HMMs with simple parameters.
To construct a PA for a general system of polynomial equations, we move negative terms to the opposite side and divide both sides by a sufficiently large constant. Then, let the PA assign a branch to each term, where the branch probability supplies the coefficient, and transitions multiply the variables. All accepting paths merge after reading the same word, so their probabilities sum to the value of the polynomial. The challenge is that if both sides of the equation depend on (unknown) rival parameters, their values are unknown in advance and cannot be encoded as a target acceptance probability. We overcome this by using one word per side and multiplying both acceptance probabilities by a shared scalar parameter. If the two sides are equal, this scalar parameter can make both probabilities match a given positive target acceptance probability. Find the full proof in Appendix A.1.
Formally, the input to PA non-identifiability up to equality is a simply parameterized PA and a rational parameter value specifying its target. The question is whether the same family contains a PA equivalent to but different in at least one numerical entry, with state labels fixed.
Theorem 14. Probabilistic automaton non-identifiability under simple parameterizations is -hard.
We next turn the PA into an HMM that randomly chooses a word, simulates the PA on that word, and emits a symbol indicating acceptance or rejection. Conversions between automata and HMMs are well studied; see Casacuberta (1990, Proposition 9) and Dupont et al. (2005, Section 3). These transformations combine parameters such that the parameterizations are no longer simple. Moreover, our PA assigns an acceptance probability to each supplied word, whereas the HMM must generate its observations. We therefore choose the input letters with fixed probabilities and record both the chosen word and the PA's acceptance decision in the observations.
For our reduction, each PA entry is copied directly into an HMM entry, so the resulting parameterization remains simple and distinct PAs give distinct HMMs. The probability of observing a word followed by acceptance is the PA's acceptance probability multiplied by a known positive factor. This correspondence also preserves equivalence, as verified in Appendix B, and yields the following theorem.
Theorem 15. colDHMM is -hard (and thus complete) even under simple parameterizations. Equivalently, IDHMM is -hard under simple parameterizations.
Appendix B.1 provides an example of this PA-to-HMM transformation.
5.3 Deterministic identifiability up to equality with masks is coNP-hard
This section proves the NP-hardness of masked parameterizations, sometimes deemed rectangular (Wiesemann et al., 2013; Jansen et al., 2022), which further restrict simple parameterizations by requiring every open entry to be an independent parameter. In contrast, simple parameterizations as in Section 5.2 allow the same parameter to occur in several HMM entries. Another way to view masks is that, given a target HMM , it specifies which entries of the rival have to match the target exactly, and which are “fully open”, in that they are allowed to take any value.
Definition 16 (Mask parameterizations). For a rational target , a mask assigns 0 or 1 to every entry of . Entries with mask value 1 are fixed to the corresponding target value, while every entry with mask value 0 receives its own distinct parameter. The parameter domain consists exactly of the values for which the resulting entries are stochastic. We denote the induced family by . Thus masks are rectangular simple parameterizations: apart from the row-sum constraints required for stochasticity, distinct open entries are independent.
To prove hardness under masks, we encode a Boolean assignment in the emission probabilities of an HMM. For each variable, two states represent its positive and negative literals. Requiring certain observation probabilities to match those of the target forces these states to represent opposite truth values. Further observation probabilities enforce the clauses of a Boolean formula. Different clauses refer to the same literal states, so the construction does not need to assign the same parameter to different open entries.
Starting from a 3SAT formula, we first add a Boolean variable to obtain a new formula with a known satisfying assignment. Every other satisfying assignment of this new formula encodes a solution of the original formula. We use the known assignment to specify the target HMM. The construction ensures that each satisfying assignment of the new formula determines exactly one equivalent HMM, including all open transition and emission probabilities. Consequently, the target has a distinct equivalent rival exactly when the original formula is satisfiable. Appendix C gives the full proof.
Theorem 17. colDHMM is NP-hard even under mask parameterizations. Equivalently, IDHMM is coNP-hard under mask parameterizations.
6 Deterministic identifiability up to state renaming and bisimilarity
A target HMM may be unidentifiable for the sole reason that a trivial output-equivalent rival exists, for instance by renaming the hidden states of the target HMM to obtain the rival. This phenomenon is well documented in the literature, and thus it is common to discard rivals that are “trivially equivalent” to the target (Leroux, 1992; Tune et al., 2013). We study two notions of “trivially equivalent” here: 1) equivalence up to hidden state renaming in Section 6.1, as often done in the identifiability literature; and 2) bisimilarity in Section 6.2, a fundamental concept in theoretical computer science.
6.1 Deterministic identifiability up to state renaming is in
We next broaden our definition of identifiability to align with the practice of discarding rivals obtained by state-renaming. A common way to remove state-renaming ambiguity in statistical applications is to impose an ordering convention on some state-specific parameter (Leroux, 1992; Cole, 2019). We instead treat permutation equivalence explicitly in the decision problem.
Definition 18 (Permutation equivalence). Let and . They are permutation equivalent, written , if there exists a permutation matrix (i.e. exactly one 1 in each row and column, and all other entries set to 0) such that
Problem 19. Let IDHMM denote the following problem. The input is an HMM parameterization , and a rational parameter value defining the target . The decision problem is whether, for every , if then .
Even when both HMMs are fully specified, checking whether one is obtained from the other by state permutation is not known to have a polynomial-time algorithm. The reason is that it reduces from the classical graph isomorphism problem (GI), which asks whether two finite graphs become identical after permuting their vertices (Arora and Barak, 2009). See Appendix D for a proof.
Lemma 20. Deciding whether two rational HMMs are permutation equivalent is GI-complete.
Thus we do not assume that permutation equivalence itself can be checked in polynomial time. For the formula below we encode “the rival is different from every permutation of the target” as an explicit statement, which introduces an additional universal quantifier.
Proposition 21. colDHMM is in . Thus IDHMM is in .
Proof. Existentially guess and the output-equivalence certificate from Theorem 8. Then universally quantify a real matrix and impose
(i)–(iii) as in Theorem 11.
(iv) Either is not a valid permutation matrix,
or the permuted rival is different from the target,
To introduce constraint (iv) we use disjunction (∨) encoded in ∃R as explained in Section 3.5. ☐
6.2 Deterministic identifiability up to bisimilarity is in
With a motivation similar to that in Section 6.1, we discard rivals that are bisimilar to the target. The term “bisimulation” is used for two different notions in the literature relevant here. Doyen et al. (2008) define a relation on state distributions that coincides with output equivalence. If we used that relation as our notion of uniqueness, every output-equivalent rival would automatically count as equivalent to the target, so the identifiability problem would be trivial. We therefore use the classical state-based probabilistic bisimulation: hidden states may be grouped together only when they have the same observation distribution and send the same total transition probability to every group.
Definition 22 (Classical HMM bisimulation, Larsen and Skou (1989)). Let and , and consider the disjoint union of their states, . An equivalence relation is a bisimulation iff, implies
(i) the observation distributions agree, i.e. for .
(ii) for every equivalence class C of R, the transition probability from i to C equal the transition probability from j to C.
The two HMMs are bisimilar, written , if their initial distributions assign the same total mass to every class of the coarsest such relation, i.e. the relation whose equivalence classes are as large as possible while satisfying the two conditions above. This is the usual state-based probabilistic bisimulation specialized to HMMs (Larsen and Skou, 1989; Hansson, 1994).
Problem 23. Let IDHMM denote the following problem. The input is an HMM parameterization , and a rational parameter value defining the target . The decision problem is whether, for every , if then .
For two explicit finite HMMs, classical bisimilarity can be checked by a standard partition-refinement algorithm. Start by grouping states that have the same observation distribution. Then repeatedly split a group whenever two states in it send different total transition probability to some current group. When no further split is possible, the resulting groups are exactly the classical bisimulation classes (Larsen and Skou, 1989; Hansson, 1994). The proof below encodes these polynomially many refinement steps directly in an formula. Find the full certificate in Appendix E.1.
Proposition 24. colDHMM is in , and therefore IDHMM is in .
6.3 Hardness of deterministic identifiability up to state renaming and bisimilarity
The reduction for simple parameterizations from Theorem 14 can also enforce that the rival be disequal from the target up to bisimilarity. We add two new branches, one for z = 0 and another for z = 1 using fresh output letters, where both branches are always output-equivalent yet they are non-bisimilar. This extension survives the PA-to-HMM conversion, as proved in Appendix E.2.
Corollary 25. colDHMM is -hard (and thus complete) even under simple parameterizations. Equivalently, IDHMM is -hard under simple parameterizations.
Remark 26. A permutation of hidden states always gives a bisimilar HMM, as . Thus the non-bisimilar rival constructed for Corollary 25 cannot be a permutation of the target. When the input polynomial system is unsatisfiable, the same reduction leaves the target as the only observationally equivalent HMM in the family. These two properties establish the following corollary using the same reduction.
Corollary 27. colDHMM is -hard (and thus complete) even under simple parameterizations. Equivalently, IDHMM is -hard under simple parameterizations.
For masks, the reduction of Theorem 17 already ensures that every distinct observationally equivalent rival is non-bisimilar to the target. Such a rival changes the Boolean variable z from false to true. The reachable state representing the positive literal z then has an emission distribution that no target state has: its identifying observation distinguishes it from the other literal states, and the comparison states have additional observations in their emission distributions. Bisimulation cannot match this reachable state to any target state. Appendix E.3 gives the details.
Corollary 28. colDHMM is NP-hard even under mask parameterizations. Equivalently, IDHMM is coNP-hard under mask parameterizations.
The same reduction also proves hardness up to state permutation, similarly to Remark 26.
Corollary 29. colDHMM is NP-hard even under mask parameterizations. Equivalently, IDHMM is coNP-hard under mask parameterizations.
7 Binary-alphabet, local, generic, and family-wise identifiability
We consider various identifiability subproblems in this section. Section 7.1 restricts the deterministic identifiability problem to binary alphabets and shows that computational hardness is preserved. Section 7.2 proves that local identifiability is in , Section 7.3 proves that generic identifiability is in , and Section 7.4 proves that family-wise identifiability is in .
7.1 Binary-alphabet subproblems
The HMMs constructed for proving - and NP-hardness in Theorems 15 and 17 have alphabets that grow in size linearly with respect to the input. Therefore, the computational hardness of the deterministic identification of HMMs with a fixed alphabet size remains open. In Proposition 31, we transform HMMs with arbitrary alphabets into binary alphabets ( ) in polynomial time such that simple and mask parameterizations are preserved, meaning that the hardness theorems carry over. We start by defining the binary alphabet identifiability problem.
Problem 30. Let BIN-IDHMM denote the restriction of IDHMM to a binary alphabet.
Problem BIN-IDHMM is already an instance of IDHMM , so the nontrivial direction is to reduce in the converse direction. The reduction is done via a routine binary encoding of the alphabet symbols, the main detail to take care of being that simple and mask parameterizations remain so after the transformation. The full proof is given in Appendix F.
Proposition 31. BIN-IDHMM and IDHMM are polynomial-time many-one equivalent. Moreover, the reduction to a binary alphabet preserves simple and mask parameterizations.
As a direct consequence of Proposition 31, the computational hardness properties of IDHMM carry over to BIN-IDHMM , and the same holds for deterministic identifiability up to state-renaming and bisimilarity when restricted to binary alphabets, given that non-permutation-equivalent and non-bisimilar HMMs remain so after transformation.
Corollary 32. Even when restricted to binary alphabets, IDHMM , IDHMM , and IDHMM are -hard with simple parameterizations, and coNP-hard with mask parameterizations.
7.2 Deterministic local identifiability
Local identifiability asks whether an output equivalent rival exists within a radius around the target HMM, no matter how small said radius is. We consider local identifiability with a fixed target HMM, as done so far in this paper, even though local identifiability literature often considers it family-wise rather than target-wise (Catchpole and Morgan, 1997; Cole, 2019). We cover family-wise identifiability later in Section 7.4.
Problem 33. Let IDHMM denote the following problem. Given rational target HMM , decide whether such that, , if and , then .
The local non-identifiability problem colDHMM says that for every radius there is a distinct equivalent rival inside that radius, i.e., , , and . Therefore, as a trivial consequence of Theorem 11, colDHMM is in , and IDHMM is in , which is contained in PSPACE by Canny (1988) and Renegar (1992).
We can tighten the bound down to by eliminating a quantifier. The next proposition uses the bound of Jeronimo et al. (2013, Theorem 1) to replace the quantification over radius by one fixed (yet extremely small) radius whose description is nevertheless polynomial-size. The full proof is found in Appendix G.
Proposition 34. For every rational target , one can compute in polynomial time an integer , polynomially bounded in the input size, such that, if is locally identifiable, every distinct equivalent rival satisfies .
We use Proposition 34 to show that IDHMM is in by taking care that the doubly exponentially small radius is encoded in a polynomially-sized formula.
Theorem 35. colDHMM is in , and therefore IDHMM is in .
Proof. Let , where is given by Proposition 34. We claim that is locally non-identifiable iff there exists such that
If (7) holds, the contrapositive of Proposition 34 says that cannot be locally identifiable. Conversely, if is locally non-identifiable, distinct equivalent rivals occur inside every positive radius, hence one satisfies (7).
It remains to encode without writing its enormous denominator. Existentially introduce variables , and impose constraints and for . Then . Together with the stochasticity constraints for , the inequality , and the equivalence certificate of Theorem 8, this is a polynomial-size existential real formula. Hence .
7.3 Generic identifiability
The deterministic identifiability studied so far concerns one target HMM. Generic identifiability instead asks whether the set of parameter values specifying non-identifiable HMMs form a lower-dimensional subset of the parameter domain , using the parameterizations from Definition 5,
For generic identifiability up to equality, the parameter values specifying non-identifiable HMMs form the set
Observe that two parameter values that give exactly the same entries of do not count toward non-identifiability. A stronger notion of identifiability can be provided through notions of equivalence different from strict equality as discussed in Remark 38. We next introduce the decision problem.
Problem 36 (Generic identifiability). Let IDHMM denote the following problem. The input is an HMM parameterization ( , ). The decision problem is whether .
Dörfler et al. (2024, Theorem 11) provide a PSPACE bound for the generic identifiability of linear structural causal models (SCM). Even though SCMs are fundamentally different from HMMs both in structure and semantics, we take inspiration from their theorem to provide a PSPACE bound on the generic identifiability problem for HMMs. Our output-equivalence certificate from Theorem 8 gives a polynomial-size existential description of Bad_φ. The dimension algorithm by Koiran (1999) then expresses each question dim by an existential real formula, for and . Following Dörfler et al. (2024, Theorem 11), we combine the candidate values for , the dimension threshold, into one formula. For each threshold, the assertion that reaches that dimension is existential, while the assertion that Bad_φ does not is universal. Since these two quantifiers are independent, we get the bound of . Appendix H provides the full formula and proof.
Theorem 37. IDHMM is in .
Remark 38. The bound in Theorem 37 holds for generic identifiability modulo another equivalence relation , provided the condition has a quantifier-free real description constructible in polynomial time, because its negation would still then be quantifier free. If requires quantification, then the bound may shift upward in the real hierarchy (Schaefer et al., 2026).
7.4 Family-wise identifiability
Our deterministic identifiability problems fix one target HMM and ask whether it has a distinct output-equivalent rival. We now ask whether this uniqueness property holds for every HMM in a given family, which is a prevalent question in the parametric identifiability literature (Catchpole and Morgan, 1997; Cole, 2019). We next introduce deterministic family-wise identifiability up to equality as a decision problem.
Problem 39 (Family-wise identifiability). Let IDHMM denote the following problem. The input is an HMM parameterization ( , ). The decision problem is whether, for every , , if then .
The bound from Theorem 11 directly carries over to family-wise identifiability: existentially guess both and , and use constraints (i)–(iii) in Theorem 11 to enforce (non-)identifiability.
Lemma 40. IDHMM is in .
As in Remark 38, one can also require uniqueness up to other equivalence relations. One may also distinguish between local and global identifiability. We do not explicitly consider all such variants due to combinatorial explosion, but expect Lemma 40 to carry over as long as the variant does not introduce additional complexity.
Remark 41. Catchpole and Morgan (1997) and Cole (2019) study local identifiability of parameterized families using an exhaustive summary, : a finite vector of observable quantities that determines the observation distribution. Differentiating this summary with respect to the parameters gives the derivative matrix . If the generic rank of D is lower than the number of parameters, the model is parameter redundant and thus non-identifiable, whereas a full generic rank means that the model is at least locally identifiable. Cole (2019) implements this method using a symbolic algebra system, but it requires exponential space if used as a general solution to the identifiability decision problem here.
8 Conclusions and future work
Conclusions. We give polynomial-size certificates for HMM output equivalence in Theorem 8 and use them throughout the paper. Using them, we show deterministic identifiability up to equality is in ∀R. It is ∀R-complete for simple parameterizations and coNP-hard for mask (rectangular) parameterizations. These lower bounds also hold for identifiability up to hidden-state renaming and for bisimilarity. Identifiability up to hidden-state permutation lies in ∀R, while identifiability up to bisimilarity lies in ∀R. The hardness results do not depend on the alphabet: identifying HMMs over a binary alphabet is as hard as over an arbitrary one. We further show that local identifiability is in ∀R, generic identifiability is in ∀R ∩ ∀R, and that family-wise identifiability is in ∀R. By Canny (1988) and Renegar (1992), all of these problems are decidable in PSPACE.
Open questions and future work. Deterministic global identifiability up to equality with mask parameterizations is shown to belong to ∀R and be coNP hard, thus ∀R-completeness is open (but unexpected). The hardness of local and generic identifiability are left open. Moreover, we do not explicitly handle some combinations of the variants introduced in Section 7, but we believe most results carry over without particular difficulty. Our results may motivate the development of efficient identifiability checking algorithms in PSPACE that may combine SAT solvers for the Boolean constraints like in Proposition 24 with ∃R solvers for the polynomial equations in Theorem 11. These solvers could be used for the exhaustive classification of well-established models based on their identifiability, in a sense extending the work by Cole (2019).
Acknowledgments
Partially funded by the ERC Starting Grant 101077178 (DEUCE).
References
Abe, N. and Warmuth, M. K. (1992). On the computational complexity of approximating distributions by probabilistic automata. Machine learning, 9(2):205–260.
Allman, E. S., Matias, C., and Rhodes, J. A. (2009). Identifiability of parameters in latent structure models with many observed variables.
Angluin, D. (1987). Learning regular sets from queries and counterexamples. Information and computation, 75(2):87–106.
Arora, S. and Barak, B. (2009). Computational complexity: a modern approach. Cambridge University Press.
Basu, S., Pollack, R., and Roy, M.-F. (2006). Algorithms in real algebraic geometry. Springer.
Baum, L. E. et al. (1972). An inequality and associated maximization technique in statistical estimation for probabilistic functions of markov processes. Inequalities, 3(1):1–8.
Baum, L. E., Petrie, T., Soules, G., and Weiss, N. (1970). A maximization technique occurring in the statistical analysis of probabilistic functions of markov chains. The annals of mathematical statistics, 41(1):164–171.
Berstel Jr, J. and Reutenauer, C. (1988). Rational series and their languages. Springer-Verlag.
Blackwell, D. and Koopmans, L. (1957). On the identifiability problem for functions of finite markov chains. The Annals of Mathematical Statistics, pages 1011–1015.
Bonhomme, S., Jochmans, K., and Robin, J.-M. (2016). Estimating multivariate latent-structure models.
Brzozowski, J. A. (1962). Canonical regular expressions and minimal state graphs for definite events. In Proc. Symposium of Mathematical Theory of Automata, pages 529–561.
Canny, J. (1988). Some algebraic and geometric computations in pspace. In Proceedings of the twentieth annual ACM symposium on Theory of computing, pages 460–467.
Casacuberta, F. (1990). Some relations among stochastic finite state networks used in automatic speech recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 12(7):691–695.
Catchpole, E. A. and Morgan, B. J. (1997). Detecting parameter redundancy. Biometrika, 84(1):187–196.
Chang, J. T. (1996). Full reconstruction of markov models on evolutionary trees: identifiability and consistency. Mathematical biosciences, 137(1):51–73.
Chonev, V. (2017). Reachability in augmented interval markov chains. arXiv preprint arXiv:1701.02996.
Cole, D. (2020). Parameter redundancy and identifiability. Chapman and Hall/CRC.
Cole, D. J. (2019). Parameter redundancy and identifiability in hidden markov models. Metron, 77(2):105–118.
Dörfler, J., van der Zander, B., Bläser, M., and Liškiewicz, M. (2024). On the complexity of identification in linear structural causal models. Advances in Neural Information Processing Systems, 37:100108–100130.
Doyen, L., Henzinger, T. A., and Raskin, J.-F. (2008). Equivalence of labeled markov chains. International journal of foundations of computer science, 19(03):549–563.
Dupont, P., Denis, F., and Esposito, Y. (2005). Links between probabilistic automata and hidden markov models: probability distributions, learning models and induction algorithms. Pattern recognition, 38(9):1349–1371.
Ephraim, Y. and Merhav, N. (2002). Hidden markov processes. IEEE Transactions on information theory, 48(6):1518–1569.
Finesso, L. (1990). Consistent estimation of the order for Markov and hidden Markov chains. University of Maryland, College Park.
Gassiat, É., Cleynen, A., and Robin, S. (2016). Inference in finite state space non parametric hidden markov models and applications. Statistics and Computing, 26(1):61–71.
Ghahramani, Z. (2001). An introduction to hidden markov models and bayesian networks. International journal of pattern recognition and artificial intelligence, 15(01):9–42.
Gold, E. M. (1978). Complexity of automaton identification from given data. Information and control, 37(3):302–320.
Hamilton, J. D. (1989). A new approach to the economic analysis of nonstationary time series and the business cycle. Econometrica: Journal of the econometric society, pages 357–384.
Hansson, H. A. (1994). Time and probability in formal design of distributed systems. Elsevier Science Inc.
Hartshorne, R. (2013). Algebraic geometry. Springer Science & Business Media.
Hillar, C. J. and Lim, L.-H. (2013). Most tensor problems are np-hard. Journal of the ACM (JACM), 60(6):1–39.
Hsieh, S.-M., Hsu, C.-C., and Hsu, L.-F. (2006). Efficient method to perform isomorphism testing of labeled graphs. In International Conference on Computational Science and Its Applications, pages 422–431. Springer.
Hsu, D. J., Kakade, S. M., and Zhang, T. (2012). A spectral algorithm for learning hidden markov models. J. Comput. Syst. Sci., 78(5):1460–1480.
Jansen, N., Junges, S., and Katoen, J.-P. (2022). Parameter synthesis in markov models: a gentle survey. Principles of Systems Design: Essays Dedicated to Thomas A. Henzinger on the Occasion of His 60th Birthday, pages 407–437.
Jeronimo, G., Perrucci, D., and Tsigaridas, E. (2013). On the minimum of a polynomial function on a basic closed semialgebraic set and applications. SIAM Journal on Optimization, 23(1):241–255.
Junges, S., Jansen, N., Wimmer, R., Quatmann, T., Winterer, L., Katoen, J., and Becker, B. (2018). Finite-state controllers of pomdps using parameter synthesis. In UAI, pages 519–529. AUAI Press.
Kiefer, S. and Wachter, B. (2014). Stability and complexity of minimising probabilistic automata. In International Colloquium on Automata, Languages, and Programming, pages 268–279. Springer.
Koiran, P. (1999). The real dimension problem is npr-complete. Journal of Complexity, 15(2):227–238.
Kruskal, J. B. (1976). More factors than subjects, tests and treatments: an indeterminacy theorem for canonical decomposition and individual differences scaling. Psychometrika, 41(3):281–293.
Larsen, K. G. and Skou, A. (1989). Bisimulation through probabilistic testing (preliminary report). In Proceedings of the 16th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 344–352.
Lenhardt, R. (2009). Probabilistic automata with parameters.
Leroux, B. G. (1992). Maximum-likelihood estimation for hidden markov models. Stochastic processes and their applications, 40(1):127–143.
Liu, Y., Culpepper, S. A., and Chen, Y. (2023). Identifiability of hidden markov models for learning trajectories in cognitive diagnosis. psychometrika, 88(2):361–386.
Mossel, E. and Roch, S. (2005). Learning nonsingular phylogenies and hidden markov models. In STOC, pages 366–375. ACM.
Paige, R. and Tarjan, R. E. (1987). Three partition refinement algorithms. SIAM Journal on computing, 16(6):973–989.
Paz, A. (1971). Introduction to probabilistic automata (computer science and applied mathematics).
Pearl, J. and Tarsi, M. (1986). Structuring causal trees. Journal of Complexity, 2(1):60–77.
Petrie, T. (1969). Probabilistic functions of finite state markov chains. The Annals of Mathematical Statistics, 40(1):97–115.
Rabiner, L. R. (1989). A tutorial on hidden markov models and selected applications in speech recognition. Proceedings of the IEEE, 77(2):257–286.
Renegar, J. (1992). On the computational complexity and geometry of the first-order theory of the reals. part i: Introduction. preliminaries. the geometry of semi-algebraic sets. the decision problem for the existential theory of the reals. Journal of symbolic computation, 13(3):255–299.
Rothenberg, T. J. (1971). Identification in parametric models. Econometrica: Journal of the Econometric Society, pages 577–591.
Schaefer, M., Cardinal, J., and Miltzow, T. (2026). The existential theory of the reals as a complexity class: A compendium. In Courses in Discrete and Computational Geometry, pages 167–313. Springer.
Schützenberger, M. P. (1961). On the definition of a family of automata. Inf. Control., 4(2-3):245–270.
Steel, M., Hendy, M., and Penny, D. (1993). Invertible models of sequence evolution. submitted to Mathematical Biosciences.
Steel, M., Hendy, M. D., and Penny, D. (1998). Reconstructing phylogenies from nucleotide pattern probabilities: a survey and some new results. Discrete Applied Mathematics, 88(1-3):367–396.
Stolcke, A. and Omohundro, S. (1992). Hidden markov model induction by bayesian model merging. Advances in neural information processing systems, 5.
Sullivan, S. (2023). Algebraic statistics, volume 194. American Mathematical Society.
Tappler, M., Aichernig, B. K., Bacci, G., Eichlseder, M., and Larsen, K. G. (2021). -based learning of markov decision processes (extended version). Formal Aspects of Computing, 33(4):575–615.
Terwijn, S. A. (2002). On the learnability of hidden markov models. In International Colloquium on Grammatical Inference, pages 261–268. Springer.
Tune, P., Nguyen, H. X., and Roughan, M. (2013). Hidden markov model identifiability via tensors. In 2013 IEEE International Symposium on Information Theory, pages 2299–2303. IEEE.
Turin, W. and Van Nobelen, R. (1998). Hidden markov modeling of flat fading channels. IEEE Journal on selected areas in communications, 16(9):1809–1817.
Tzeng, W. (1992). A polynomial-time algorithm for the equivalence of probabilistic automata. SIAM J. Comput., 21(2):216–227.
van der Zander, B., Bläser, M., and Liśkiewicz, M. (2023). The hardness of reasoning about probabilities and causality. In Proc. International Joint Conference on Artificial Intelligence (IJCAI).
Visser, I., Raijmakers, M. E., and Molenaar, P. C. (2002). Fitting hidden markov models to psychological data. Scientific Programming, 10(3):185–199.
Wiesemann, W., Kuhn, D., and Rustem, B. (2013). Robust markov decision processes. Mathematics of Operations Research, 38(1):153–183.
Winkler, T., Junges, S., Pérez, G. A., and Katoen, J.-P. (2019). On the complexity of reachability in parametric markov decision processes. arXiv preprint arXiv:1904.01503.
Zhang, D., Bailey, A. D., and Djurdjanovic, D. (2016). Bayesian identification of hidden markov models and their use for condition-based monitoring. IEEE Transactions on Reliability, 65(3):1471–1482.
A Deterministic HMM identifiability up to equality with simple parameters
A.1 Probabilistic automaton identifiability is -hard
Theorem 14. Probabilistic automaton non-identifiability under simple parameterizations is -hard.
Proof. We extend the construction of Example 13 to general polynomial equations. The selector variable again separates the dummy solution from solutions of the input equation. The main additional task is to compare two polynomial expressions whose common value is not fixed in advance. We organize the proof into steps I. through V. for readability.
Our use of separate input words to enforce equations follows the arithmetic encoding in Lenhardt (2009), Chonev (2017), and Winkler et al. (2019). We use these ideas to construct a family with a specified rational target, requiring every transition probability to be a rational constant, a parameter, or its complement.
I. Preparing the polynomial equation
We reduce from feasibility of a single equation
where both polynomials are given explicitly as sums of terms, have degree at most four, and have nonnegative rational coefficients. Winkler et al. (2019, Lemma 29) prove the -hardness of finding a zero in of a polynomial of degree at most four that is nonnegative throughout this domain. Its coefficients may be either positive or negative. Moving the negative-coefficient terms in to the other side gives an instance of (9), meaning that this problem is -hard as well.
Let be the maximum of 1, the sum of the coefficients of , and the sum of the coefficients of . Scale down and , so that each of and has coefficient sum at most 1 and therefore takes values in throughout the domain. Introduce a selector variable . Just as in Example 13, the equations
allow either the dummy solution , or with solving (9).
In Example 13, the system equates positive polynomials to (fixed) constants. Here in the general case, both and may vary with , meaning their common value is unknown. To compare them without knowing this value, introduce a parameter . We will give two input words the acceptance probabilities
respectively, and require both to match the target value 1/8. The constant 1 in these expressions is important: if and , choosing makes both probabilities 1/8. This choice lies in because . Conversely, matching the positive target value forces , so equality of the two probabilities forces .
II. Constructing the PA
We now construct the PA that realizes these equations. The parameter vector is
Use an internal letter t and distinct query letters
Each query letter “tests” an equation, which gets read first, and then subsequent copies of t carry out that test. The PA starts in with probability 1 and has a single accepting state , with final probability 1. Every other state has final probability 0. There is also a rejecting sink . Different tests use disjoint intermediate states and share only these three states.
We next write for a transition from to on letter with probability . To test the selector variable by (10), introduce states and transitions
To test variable by (11), introduce states and transitions
At each of these transitions, send the remaining probability to . These paths give acceptance probabilities for and for .
The tests for equation (12) are more involved. We give the construction once for a polynomial : use it with and query letter , and then with and query letter . The two copies have different states but share .
Because R has degree at most four, we can write it as
Here we encode terms (i.e. monomials) of degree less than four via factors equal to 1. A constant term has four such factors. We implement each product by a chain and add the terms by branching, using the polynomial encoding in Chonev (2017, Remark 7) and Winkler et al. (2019, Lemma 20). Figure 1 provides good intuition on how this encoding is achieved. Unlike their treatment of negative coefficients through complementary factors, we have already placed negative terms on the opposite side of the equation.
For each copy, we do as follows. Introduce an entry state , a branching state , five states for a constant contribution, and five states for each term of (14). These names are local to the copy being constructed. Let be its query letter, and set
and direct the remaining probability mass, , to state as usual. On the next , split the probability at as follows:
Thus one branch will supply the constant contribution, and each remaining successful branch corresponds to one term of . Observe that the rejecting probability is nonnegative.
To specify the rest of the paths, let and . The constant branch uses five probability-1 transitions:
On the branch for term r, to test (12), first test z and then its four factors:
Every successful path from to reads exactly seven copies of : one for , one for the branching step, and five for the chosen branch. In particular, the constant contribution and all polynomial terms contribute to the acceptance probability of the same word .
Every state-letter row specified above sums to 1. For any state-letter transition not yet specified, put probability 1 on . In particular, loops on every letter, every transition from goes to , and a query letter read inside a test leads to rejection.
III. Verifying the acceptance probabilities of the constructed PA
In the PA just constructed, the constant branch contributes to the probability of . The branch for term contributes . Adding these contributions gives , as required. Consequently the complete list of words with potentially nonzero acceptance probability is
To see that the list is exhaustive, an accepting path must start with exactly one query letter and then follow its test to . Stopping earlier leaves the PA in a nonaccepting state, and reading an extra letter after reaching leads to . Reading any wrong letter also leads to that sink. Thus all unlisted words have probability 0, independently of the parameters.
IV. Correctness of the reduction
Choose the rational target parameter value as follows:
The target PA gives probability 0 to the selector and variable words and , and 1/8 to both words for comparing and , that is and . This target is known without solving the input equation.
Suppose rival is output equivalent to the target. The word forces , so is either 0 or 1. If , each word forces , and either word for comparing and forces , hence . Therefore, , thus can be discarded as identifiability requires that the rival must be distinct from the target.
It follows that a distinct output-equivalent rival must have z = 1. The two comparison words require
The positive middle value implies . Subtracting the two expressions and dividing by yields , which is equivalent to . Therefore every rival that is distinct from the target yet output equivalent supplies a solution of (9).
Conversely, let x solve (9). Set z = 1 and choose
Notice this is a valid parameter value in . The selector and variable words, and , have probability 0, and both comparison words, and , have probability 1/8 because . All other words have probability 0 by (15) and the argument on the exhaustive list of words above. Hence the resulting PA is output equivalent to the target, yet it is distinct as and .
Finally, we verify that the reduction in polynomial-time. There are two intermediate states for each selector or variable test, and intermediate states for each of the two polynomial tests, where is the number of terms of . The alphabet has letters. Since and are given as explicit sums and have degree at most four, these quantities are polynomial in the input size. Sums and quotients of the input rational coefficients, including , the normalized coefficients, and the fixed branch probabilities, have polynomial bit length.

Figure 2: A simply parameterized PA encoding polynomial system . The target parameters are given, and finding a distinct output-equivalent rival exactly corresponds to solving the system. In this case, such rival exists: (and ).
A.2 Example ∀R to PA identifiability
Figure 2 provides the full transition function of the PA described in Example 13. The alphabet is . An edge label is letter, probability. State is initial and is the only accepting state. For each state and letter, all remaining probability goes to an omitted rejecting sink state, which loops on every letter. In particular, every transition from goes to that sink. All parameters lie in .
B HMM identifiability with simple parameters is ∀R-hard
Theorem 15. colDHMM is -hard (and thus complete) even under simple parameterizations. Equivalently, IDHMM is -hard under simple parameterizations.
Proof. We reduce PA non-identifiability up to equality to colDHMM . The input is a simply parameterized PA , where is a rational parameter value specifying the target PA. We construct an HMM family with the same parameter domain and target parameter values . The construction will preserve both output equivalence and equality, so a distinct output-equivalent rival exists in one family exactly if and only if it exists in the other.
Correspondences between PAs and HMMs are well studied in the literature, where one adds states to replace transitions that emit observations by states that emit observations—see for instance Casacuberta (1990, Proposition 9) and Dupont et al. (2005, Lemma 4). The latter paper’s Lemmas 3 through 5 and Proposition 8 establish polynomial-size transformations between PAs and HMMs. We apply this general idea in this proof; however, the existing reductions are insufficient as-is since they do not preserve simple parameterizations. In particular, Lemma 3 by Dupont et al. (2005) forms sums and ratios of transition entries, while Proposition 9 by Casacuberta (1990) and Lemma 4 by Dupont et al. (2005) can multiply initial and transition probabilities. The transformation provided below carefully ensures that the parameterization remains simple.
I. Constructing the HMM
Let , , and . For each PA state , introduce a control state , one letter state for each , and a decision state . Note these three types of states are disjoint, because the subscripts c and s denote state types, not input letters. Add one further state .
Recall that we use the emit-then-transition convention (see Section 3.2). The observation alphabet is , where the four added symbols are fresh. The symbols and record acceptance and rejection, respectively, and is repeated after the decision. A control state emits and then chooses, with equal probability , either one of the letters or the decision step. If it chooses letter , the corresponding letter state emits and simulates the PA transition . If it chooses the decision step, the decision state emits with the PA's final probability and with the complementary probability, then moves to .
Formally, let and be the HMM transition and emission matrices. Its initial distribution is and zero on all other states. Its only possibly nonzero entries are
The equations range over all and , and all unlisted entries are zero. Notice that each control row has entries equal to , each letter row copies a stochastic PA row, and all remaining transition and emission probabilities sum to 1.
II. Preserving output equivalence
For a PA word , define the observation word
This word records the simulated letters, with # marking each control step. Write for the probability that the HMM generates finite word . For every , we get
Indeed, choosing the specified letters and then the decision step contributes the factor . Conditional on these choices, the simulated PA has state distribution when the decision is made. Acceptance therefore has probability , and rejection has probability . Once the decision symbol has been emitted, every subsequent observation is .
We must also account for words that stop before the decision symbol. The remaining possible nonempty observation words have the forms and , for , with probabilities
These probabilities do not depend on , because summing over the simulated PA states gives . The empty word has probability 1, and every word outside these forms has probability 0. Thus equivalent PAs give the same probability to every HMM observation word. Conversely, equivalent HMMs give the same probability to for every , and dividing (16) by the positive factor gives us equality of all PA acceptance probabilities. Hence
III. Preserving distinctness and simple parameters
Every PA entry can be read from a designated HMM entry:

(a) PA: edge labels are input letter and transition probability.

(b) HMM: edge labels are transition probabilities, and each state displays its name above the symbol it emits with probability 1.
Figure 3: The same parameter x occurs in the PA and its HMM. The HMM first emits the symbol displayed in its current state and then takes a transition. The initial distributions give probability 1 to and , respectively.
Consequently, different numerical PAs give different numerical HMMs. Conversely, if two PAs have identical numerical entries, every formula defining their HMMs gives the same value. With state labels fixed, we therefore have
This establishes distinctness of models (rather than only distinctness of parameter vectors).
The HMM family uses exactly the PA parameters, and its entries are copied PA entries, complements of final probabilities, or fixed rational constants. The complement of a simple entry is again simple, with . Their product appears in path probabilities but never in a single HMM entry. The state set is fixed for the whole family, including parameter values at which some transitions vanish. Therefore, is a simple parameterization.
IV. Correctness of the reduction
The HMM has states and observation symbols. Its only new nontrivial rational constant is , which has bits. All matrices and the rational target can therefore be written down in polynomial time. No additional free entries are introduced. By (18) and (19), the target PA has a distinct equivalent member of its family if and only if the target HMM does. Therefore, Theorem 14 proves -hardness of colDHMM under simple parameterizations. Together with Theorem 11, this gives completeness.
B.1 Example of the PA-to-HMM conversion
Example 42. Consider the PA in Figure 3 (a), with parameter , initial state , and sole accepting state . Its alphabet is . On each , it stays at with probability and otherwise moves to the absorbing rejecting state . Thus
Figure 3 (b) shows the seven-state HMM produced by the transformation. Each control state chooses between simulating another a and making the decision, with probability 1/2 for each choice. The letter states copy the PA transition probabilities x, 1 - x, 1 directly. Because the PA final probabilities are 1 at and 0 at , all emissions in this example are deterministic. In particular,
The factor 1/4 comes from choosing one letter and then the decision. More generally, the observation word has probability .
C HMM identifiability with masks is NP-hard
Theorem 17. colDHMM is NP-hard even under mask parameterizations. Equivalently, IDHMM is coNP-hard under mask parameterizations.
Proof. We reduce directly from 3SAT. We will construct a target HMM and a mask such that the target has a distinct output-equivalent rival exactly when the input formula is satisfiable.
The reduction draws on the use of weighted averages to encode Boolean choices in Kiefer and Wachter's proof of NP-hardness of probabilistic-automaton minimization (Kiefer and Wachter, 2014, Theorem 5, Propositions 6 and 8). Our reduction must additionally specify a known target HMM and ensure that different rivals encode different Boolean assignments.
I. Preparing the formula
Let be the input 3-CNF formula. Introduce a fresh Boolean “selector” variable and extend the formula as follows:
The assignment with satisfies , and notice that this is the only satisfying assignment with due to the last clauses. When , notice that the last clauses are automatically satisfied, and that the remaining clauses require exactly that satisfy . Thus has a satisfying assignment other than if and only if is satisfiable. We will next encode as an HMM and provide assignment as the parameters of the target HMM, meaning that finding an output equivalent rival precisely maps to finding a satisfying assignment of .
Next, we express clause satisfaction via helper variables. Write the clauses of as , and let be the number of literals in . Also fix and .
Introduce Boolean helper variables for each clause . For a literal , let be 1 when that literal is true and 0 otherwise. We will enforce
If clause has true literals, the added variables give the binary representation of by (21), because they represent precisely the integers from 0 to . Since , equation (21) has no solution when , and has exactly one solution when . Thus equation (21) enforces clause satisfaction without allowing any additional choice once the original assignment is fixed.
Let contain and the helper variables . Extend to using the unique binary values given by (21).
II. Encoding constraint satisfaction as observation “checks”
Recall we use the emit-then-transition convention (Section 3.2). We encode that all conditions to satisfy the Boolean formula are met via “tests” on the word probabilities of an HMM. Each test begins in a test state, which emits its own identifying observation and then moves to a state whose emission distribution is involved in the check. After this second observation, the HMM moves to a common state that emits forever. The initial distribution is fixed and uniform on all test states, and zero elsewhere. Denote the number of test states by R, and the identifying observation of a test state u by (no other state emits ).
For any second observation b,
The sum is a weighted average of the successor states' emission probabilities. This is the same way that Kiefer and Wachter (2014) turn a convex combination into probabilities of two-letter words induced by a PA in their Proposition 6. In our HMM setting, the transition probabilities provide the weights and the emission probabilities provide the quantities being averaged.
III. Encoding literals in emission probabilities
In the following constructions, all symbols introduced under different names are distinct, and all initial, transition, and emission entries are fixed by the mask unless explicitly declared open. In particular, every unlisted entry is fixed to zero by the mask.
For each variable , create two states and , representing the literals and . Introduce observations and to distinguish these literals in the tests below. We fix , let , and define the emission row of be
and let both and be open via the mask. The symbols t, f, g are shared by all these states. Row stochasticity, rather than a shared parameter, gives
To obtain the parameters of the target HMM, , take exactly when literal is true under .
Next, we will force to equal either 0 or , interpreting as true. For each , create two test states and . The first test will require a literal that emits no f, and the second will require a literal that emits no t. Introduce four comparison states , with and . We provide their emission probabilities in the following table:
| t | f | g | ||||
|---|---|---|---|---|---|---|
| 0 | 0 | |||||
| 0 | 0 |
(25)
The observation is used only by the two comparison states for that test. These fixed distributions let the two different truth assignments produce the same observed weighted average.
The only open transitions from are its four entries to
In the target, the T test sends probability 1/2 to the true literal state and 1/2 to the comparison state for the false literal. The F test sends probability 1/2 to the false literal state and 1/2 to the comparison state for the true literal. All four entries are open, including those with target value zero.
For either truth assignment, these choices give the following conditional distributions of the second observation, given the identifying first observation of the test has been emitted:
| test | t | f | g | ||||
|---|---|---|---|---|---|---|---|
| T | 0 | 0 | |||||
| F | 0 | 0 |
(26)
Since each test has fixed initial probability , matching two-letter word probabilities is equivalent to matching these conditional distributions.
Consider a masked rival that is output-equivalent to the target. Write for its transitions from to the two comparison states and for its transitions to the two literal states. The observations give
Therefore, , and hence matching the target probability (zero) for f gives
Every term is nonnegative, and at least one is positive, meaning at least one of equals .
For the F test, write for the transitions to the literal states. The same three identifying observations give . Matching probability zero for t gives
The use of these weighted averages is inspired by the two representations of the variable point in Figure 5 and proof of Proposition 8 by Kiefer and Wachter (2014).
so at least one of equals 0. Therefore,
Define to be true exactly when . Once this truth value is fixed, all eight open test transitions are fixed as well. For example, if is true, equation (28) forces , so , and then (27) gives , . Equation (29) similarly gives , , and the two F comparison weights are , 0. If is false, the signs are exchanged. These are precisely the choices used to obtain (26), meaning that the truth value determines the entire pair of tests, and either truth value gives the target distributions for both tests.
IV. Enforcing the clauses
For each , add a test state and fix . Its transitions are fixed as follows: assign weight to the literal state for each occurrence in , and weight to for . If a literal occurs more than once, add its weights in the corresponding transition entry, and all these weights sum to 1.
Let denote the t-emission probability of the state for literal . The conditional probability (on the identifying first observation of ) of t is
For the assignment of the target HMM, this equals . Once (30) holds, matching this value is exactly equation (21) after dividing by .
The clause test must also match all other second observations. Its probabilities for every are fixed, because its transition weights and the emission entries are fixed. Its probability for is . Its probability for and is in , and one is minus the other by (24). All remaining second observations have probability zero. Therefore, matching (31) suffices to match the whole distribution for this test.
V. Correctness of the reduction
The test states are the two variable tests for every and the clause tests, so . We fix their emissions to their distinct identifying symbols, and their initial probabilities to . All literal and comparison states transition to with probability 1. Fix . These rules, together with the already specified masked entries, complete the HMM and mask. The target uses the extended assignment and the transitions of Step III.
Notice that every observation word with positive probability is either 1) the empty word, which has probability 1; 2) a single symbol that identifies a test, which has probability 1/R; or 3) a word of the form with , which has the same probability as in (22). Every other word has probability 0. The tests above therefore characterize equivalence for all observation words, not just the selected two-letter words used to derive the constraints.
Every equivalent masked HMM yields, by Step III., a Boolean value for every variable in V. Step IV. then forces the clause equations, so the values of satisfy . Conversely, any satisfying assignment of extends uniquely to the added binary variables. Set the literal emissions according to this assignment and use the unique transitions of Step III. The variable tests then have distributions (26), the clause tests match by Step IV., and the result HMM is equivalent to the target as established earlier in this step.
For a fixed satisfying assignment of , the added variables, all open literal emissions, and all open test transitions are uniquely determined. There are no other open entries. Different assignments change at least one literal emission entry, so they produce different numerical HMMs. Consequently, satisfying assignments of correspond bijectively to HMMs in the masked family that are equivalent to the target. The target corresponds to , and hence has a distinct equivalent rival exactly when is satisfiable by (20).
Finally, clauses of have at most four literals, so and . There are linearly many variables, test states, literal states, comparison states, and observation symbols in the size of . The fixed probabilities have polynomial bit length, including 1/R and the clause weights. Thus even listing all matrices and the mask takes polynomial time. Every open entry has its own independent parameter—the only domain constraints are nonnegativity and stochasticity. Repeated uses of a literal refer to the same state, and no two different open entries are required by the mask to share a parameter. This concludes the correctness of the reduction.
D HMM permutation-equivalence is GI-complete
Lemma 20. Deciding whether two rational HMMs are permutation equivalent is GI-complete.
Proof. We show both directions.
For permutation equivalence, let be a simple undirected graph on vertices and set . Construct an -state HMM with uniform initial distribution, one observation symbol emitted with probability 1 from every state, and transition matrix
Every row sums to one, and the diagonal entry is strictly larger than because . Hence the off-diagonal entries equal to recover exactly the edges of . The initial and emission distributions are invariant under every permutation, so
For the converse, given rational HMMs , view each hidden state as a vertex labeled by the pair consisting of its initial probability and its emission row, and put a directed edge labeled by the rational weight whenever that weight is nonzero. Then HMM permutation equivalence is exactly isomorphism of these vertex-labeled, edge-labeled directed graphs. Only polynomially many rational labels occur in the input, so replace equal labels by equal finite colors. Colored directed graph isomorphism reduces in polynomial time to ordinary graph isomorphism (Hsieh et al., 2006). Thus HMM permutation equivalence GI.
E HMM identifiability up to state renaming and bisimilarity
E.1 HMM identifiability up to bisimilarity is in
Proposition 24. colDHMM det is in , and therefore IDHMM det is in .
Proof. Let be a parameterization and provide the target HMM . We extend the certificate from Theorem 11. As before, we existentially guess a rival through matrices , and impose constraints (i)–(iii) from Theorem 11. It remains to encode that is not classically bisimilar to .
Let the target states be and the rival states be . We encode a partition-refinement sequence (Paige and Tarjan, 1987) by Boolean variables
where means that states are in the same block of the -th partition. First, we impose that each is an equivalence relation:
The initial partition groups together states if and only if they have the same observation distribution, which we encode by, for , introducing constraint
where
The refinement step says that two states remain together iff they were together before and have the same transition mass into every current block. Thus, for every and every , we introduce the following constraint:
where
Finally, to enforce that the models are not bisimilar, , require that the initial distributions disagree on some final block:
The formula above describes the partition-refinement algorithm for classical HMM bisimulation (Paige and Tarjan, 1987; Larsen and Skou, 1989). Since there are only 2n states, after at most 2n iterations the partition is stable and the algorithm can terminate (i.e., we have reached a fixpoint), meaning that we have reached the coarsest bisimulation. We refer to Paige and Tarjan (1987) and Larsen and Skou (1989) for a proof of this standard fact. The final constraint says that the two initial distributions assign different mass to some block, so and are not classically bisimilar.
The certificate has polynomial size and all constraints are polynomial constraints and finite Boolean combinations thereof. We recall that these Boolean combinations can be done in , as explained in Section 3.5. Hence .
E.2 ∀R-hardness of deterministic identifiability up to bisimulation with simple parameters
Corollary 25. colDHMM is -hard (and thus complete) even under simple parameterizations. Equivalently, IDHMM is -hard under simple parameterizations.
Proof. Take the PA family constructed in Theorem 14. Its target has z = 0, and every distinct output-equivalent rival has z = 1. We extend the family by preventing the rivals from being bisimilar to the target while preserving output equivalence. We use the well-known fact that making a probabilistic choice earlier or later can preserve output probabilities without preserving classical bisimilarity (see for example Doyen et al. (2008, Figure 1)). We specify these branches next.
Introduce a fresh letter and five fresh nonaccepting states , with transitions
and
Every letter other than leads from each new state to with probability 1. The new letter also leads to from every old state (other than ).
From either or , the only accepted word is , with probability 1/2. Starting from , the choice between acceptance and rejection is made on the first . Starting from , it is made on the second . Thus the only new accepted word is , and its acceptance probability is
Note that all original acceptance probabilities remain unchanged, which means that the extended PA has exactly the same output-equivalent parameter values as before.
Apply the PA-to-HMM transformation from Appendix B, and suppose that a rival with were bisimilar to the target. Then, their initial control states must be related, and each has a unique successor emitting , so these letter states must also be related. Their deterministic transitions then force the target's to be related to the rival's . Likewise, their unique successors emitting must be related. However, the target's moves with equal probability to and , whereas the rival's moves deterministically to . From these three successor states, the probabilities of observing are, respectively, , 0, and , where is the fixed probability of choosing a particular letter or the decision step. Bisimilar states have equal observation probabilities, so neither target successor can belong to the bisimulation class of the rival successor. The two bisimilar letter states therefore assign probabilities 0 and 1 to that class, a contradiction.
E.3 coNP-hardness of deterministic identifiability up to bisimulation with masks
Corollary 28. colDHMM is NP-hard even under mask parameterizations. Equivalently, IDHMM is coNP-hard under mask parameterizations.
Proof. We use the reduction of Theorem 17 without modification. Recall that HMMs that are output-equivalent to the target correspond bijectively to satisfying assignments of the extended Boolean formula. The target is the unique such model with z = 0, and every distinct equivalent rival has z = 1. A distinct equivalent rival exists exactly when the input 3SAT formula is satisfiable.
Fix such a rival. In the notation of Appendix C, its positive-literal state has emission probabilities
No state of the target has this emission distribution as we argue next. The only target states emitting are and the two comparison states , . The target's emits t with probability 0, whereas each comparison state emits its additional symbol or with probability . Both of these additional symbols have probability 0 at the rival's . Suppose the rival and target were bisimilar. Their copies of the true-literal test state would have to be related: its identifying emission symbol is used by no other state, and its initial probability is in each model. The rival sends probability 1/2 from this test state to , because z is true. But the bisimulation class containing the rival's contains no target state, since bisimulation requires identical emission distributions. The rival therefore sends at least 1/2 into this class, while the target sends 0, a contradiction.
Every distinct equivalent rival is consequently non-bisimilar to the target. A satisfiable input yields such a rival, and an unsatisfiable input leaves only the target.
F The hardness of HMM identifiability is independent of alphabet size
Proposition 31. BIN-IDHMM and IDHMM are polynomial-time many-one equivalent. Moreover, the reduction to a binary alphabet preserves simple and mask parameterizations.
Proof. The reduction from BIN-IDHMM to IDHMM is immediate, so we prove the converse direction. Let be an HMM over with parameterization . Let and fix an injective encoding .
We replace every original hidden state by a small binary-output module. It contains a choice state , an exit state , and, for every symbol , a deterministic code chain . All emissions in the new HMM are deterministic: and emit 0, while emits the -th bit of . The initial distribution is
and is zero on all other new states. The transitions are
and
All unspecified transitions are zero. Observe that every row is stochastic.
Thus one original observation y produced in hidden state i is replaced by the fixed binary block
and the original transition from i to the next hidden state occurs only after that block has been emitted. Consequently, if
then
while every binary word that is not a prefix of a valid block encoding has probability zero. If a binary word ends partway through a valid block, its probability is the sum of the probabilities of the original words obtained by completing that block with each symbol whose code has the observed binary prefix. Thus every binary-word probability is determined by the original probabilities of observation words. Conversely, the complete encodings recover each original word probability exactly. Hence two original HMMs are output equivalent iff their binary encodings are output equivalent.
The construction also preserves the simple and mask parameter restrictions used in this paper. Every original initial entry appears once as , every emission entry appears once as the transition , and every transition entry appears once as the transition . All other new entries are fixed to 0 or 1. Therefore a simple parameterization remains simple, and a mask remains a mask, with exactly the same parameters. The map from original rivals to binary rivals is bijective within the induced parameterized family and preserves strict/literal equality of HMM parameters.
G Deterministic local identifiability is in
Proposition 34. For every rational target , one can compute in polynomial time an integer , polynomially bounded in the input size, such that, if is locally identifiable, every distinct equivalent rival satisfies .
Proof. Define
where the second equality is given by Remark 7. By Paz (1971), for -state rivals we have that if and only if (see the introductory discussion in Section 4). Thus, local identifiability means exactly that is the only HMM in some ball around on which returns 0.
Let be the number of entries in , and view rivals as points in . Since the entries of are rational, we can choose a positive integer divisible by all the denominators. For , the probability is a sum of products of at most entries of , so it is a rational number whose denominator divides . Hence is a polynomial with integer coefficients, and multiplying by does not change the zero set. We use in place of from now on. Similarly, we replace the squared distance by the integer polynomial
Consider the following semialgebraic set that includes all rivals that are output-equivalent to :
The set is closed and bounded in , hence compact (Heine–Borel theorem), and it is defined by the polynomial equation and non-strict inequalities concerning stochasticity.
We now fix the parameters needed to apply the lower bound of Jeronimo et al. (2013, Theorem 1) to on .
• Degree. A word probability of length has degree in the rival entries, so has degree at most , and has degree 2. We therefore take the even upper bound .
• Coefficients. There are at most words of length , and squaring a word probability produces at most products of pairs of hidden paths. Thus, very crudely, the integer coefficients of are bounded in absolute value by . The coefficients of are bounded by , where the largest one is the constant term , and because every stochastic vector has squared norm at most 1. We take
• Number of polynomials. Let be the number of polynomials used to define : one for the equality , for the stochasticity equalities, and for the box inequalities. That is, .
Finally, let . Although may be numerically enormous, its binary length is polynomial in the input size, and it can be computed without expanding the exponentially large polynomial .
Assume now that is locally identifiable. Then the connected component of containing is the singleton . Here a connected component means a maximal connected subset of .
Let be any other connected component of . Since is compact and connected components of compact sets are closed, is also compact. Since does not contain , the polynomial has a positive minimum on .
Jeronimo et al. (2013, Theorem 1) applies to a polynomial with integer coefficients minimized over a compact connected component of a set defined by polynomial equations and non-strict inequalities. The theorem gives us that
Let . Since , and dividing by undoes the scaling in , (34) gives
for every . This lower bound is independent of the component .
Let
Then
because . Then, if is locally identifiable, no distinct equivalent rival HMM lies within distance of .
Finally, is polynomially bounded and polynomial-time computable: and are polynomial in the HMM dimensions, while , , and therefore the binary lengths of , , and are polynomial in the input size. Only , not the doubly exponentially small radius itself, will be written explicitly in the next certificate.
H Generic identifiability is in PSPACE
Proof. We follow the proof of Dörfler et al. (2024, Theorem 11), using our output-equivalence certificate to describe the non-identifiable set in (8). Let formula define , and let be the polynomial-size formula for checking (i)–(iii) from Theorem 11, where and are the certificate matrices. Then membership in is expressed by
The last condition means that at least one entry of the two numerical HMMs differs, so it is a polynomial-size disjunction of polynomial inequalities. Thus both and have polynomial-size descriptions. Only remains free in (35), on which we will compute the algebraic dimension.
Koiran’s algorithm reduces the question to the existential theory of the reals in polynomial time , also when is given by an existential formula (Koiran, 1999, Section 1.1 and Theorem 6); see also Dörfler et al. (2024, Lemma 9 and Appendix D). Assuming oracle access to the existential theory of the reals, we can therefore decide generic identifiability as follows:
-
Compute dim by applying Koiran's algorithm to test dim for .
-
Compute dim by testing dim for the same values of .
-
Accept if or , otherwise reject.
In each of the first two steps, the dimension is the largest successful threshold, or -1 if none succeeds. The procedure is correct by the definition of generic identifiability. It uses polynomially many existential real queries and hence already gives a polynomial-space algorithm by Canny (1988) and Renegar (1992).
To obtain the sharper bound, replace these iterations by the single formula
The first disjunct handles an empty domain. For a nonempty domain, a successful threshold gives . Conversely, non-identifiability makes the disjunct with true.
Each dimension check in (36) has a polynomial-size existentially quantified formula by Koiran's algorithm. To bring the quantification to the outer part of the formula, we use a new set of fresh variables per check. Since the right-hand side of the conjunction in (36) is negated, it becomes universally quantified.
Within each conjunction, the existential and universal formulas have no variables in common, so their quantifiers can be placed in either order. We thus obtain both an sentence and a sentence, each constructible in polynomial time. This proves
where the PSPACE bound is given by Canny (1988) and Renegar (1992).
I Tune–Nguyen–Roughan criterion
This section considers the sound and complete criterion provided by Tune et al. (2013). Their criterion makes use of the row-wise tensor product and Kruskal rank as we introduce next.
Definition 43 (Row-wise tensor product and Kruskal rank). For matrices and with the same number of rows,
The Kruskal rank is the largest such that every set of rows of is linearly independent.
although had not yet been established as a complexity class at the time of the algorithm’s publication.
Theorem 44 (Tune et al. (2013), Theorem 5). Given an HMM with an irreducible and aperiodic Markov chain and a finite non-redundant alphabet, the HMM is deterministically globally identifiable up to hidden-state permutation and scaling if and only if
The matrix in Theorem 44 has exactly n rows, meaning that its Kruskal rank is n precisely when its set of all n rows is linearly independent, which is exactly full row rank. Gaussian elimination checks this in polynomial time.
To relate their setting to ours, the models they consider are parameterized with fully open rectangular masks, that is, is the set restricted to the stochasticity constraints of HMMs and maps each parameter one-to-one to each HMM entry. Therefore, the rival's parameters are fully unrestricted, and only specific degenerate target HMMs, those with a non-full Kruskal rank, are unidentifiable in the sense that there exist output-equivalent rivals that are not equal to the target up to state permutation and scaling.