---
abstract: 'This paper considers hidden Markov models where the observations are given as the sum of a latent state which lies in a general state space and some independent noise with unknown distribution.  It is shown that these fully nonparametric translation models are identifiable with respect to both the distribution of the latent variables and the distribution of the noise, under mostly a light tail assumption on the latent variables.  Two nonparametric estimation methods are proposed and we prove that the corresponding estimators are consistent for the weak convergence topology.  These results are illustrated with numerical experiments.' 
author:
- Élisabeth Gassiat
- Sylvain Le Corff
- Luc Lehéricy
bibliography:
- 'biblio.bib'
title: Identifiability and consistent estimation of nonparametric translation hidden Markov models with general state space
---

[**Keywords:**]{} Nonparametric estimation, latent data models, deconvolution. 

Introduction
============

This paper considers nonparametric translation hidden Markov models where, for all $i = 1, \dots, n$, the observation $Y_i$ is $$\label{eq:model:deconvolution}
Y_i = X_i + \varepsilon_i{\,},$$ where $n\geqslant 1$ is the number of observations, $(X_i)_{i = 1, \dots, n}$ is a $d$ dimensional hidden stationary Markov chain and $(\varepsilon_i)_{i = 1, \dots, n}$ are independent and identically distributed random variables independent of $(X_i)_{i = 1, \dots, n}$. Both the distributions of the latent variables and of the noise $\varepsilon_1$ are unknown.  The first objective of this paper is to prove that the law of the hidden states may be recovered using only the observations $(Y_i)_{i = 1, \dots, n}$ when no assumption is made on the noise distribution and with only a weak nonparametric assumption on the distribution of the hidden Markov chain.  In addition, consistent estimation procedures based either on a least squares or on a maximum likelihood approach are proposed.  This work provides the first contribution to establish identifiability results in a fully nonparametric setting for hidden Markov models with general state space. 

The use of latent data models is ubiquitous in time series analysis across a wide range of applied science and engineering domains such as signal processing [@crouse:nowak:baraniuk:1998], genomics [@yau:papas:roberts:holmes:11; @wang:lebarbier:aubert:robin:2017], target tracking [@sarkka:vehtari:lampinen:2007], enhancement and segmentation of speech and audio signals [@rabiner:89], see also [@sarkka:2013; @douc:moulines:stoffer:2014; @zucchini:macdonald:langrock:2016] and the numerous references therein.  The specific setting of translation hidden Markov models described by is commonly used in statistical signal processing, such as for nonlinear phase estimation, where the problem appears in many applications: detection of phase synchronization, estimation of instantaneous frequencies or in neuroscience, see [@dahlhaus:kiss:neddermeyer:2018], [@fell:axmacher:2011] and the references therein.  In these applications, the latent signal is modeled as $X_{i} = g(Z_{i})$, for some sequence $(Z_{i})_{i{\geqslant}1}$ of relevant hidden variables and function $g:{\mathbb{R}}^{\ell} \rightarrow {\mathbb{R}}^{d}$. In [@dumont:lecorff:2017b], such models are used to detect oscillation patterns in human electrocardiogam recordings and to estimate a noisy Rossler attractor.  In such a case, model (\[eq:model:deconvolution\]) is a nonparametric hidden regression model given by $$\label{eq:model:regresshidden}
Y_i = g\left(Z_i \right)+ \varepsilon_i{\,}, \;i{\geqslant}1{\,}.$$

Although parametric hidden Markov models have been widely studied and are appealing for a wide range of applications, parametric inference procedures may lead to poor results in real data and high dimensional learning problems.  This explains the recent keen interest for nonparametric latent data models which have been introduced in many disciplines such as climate state identification [@lambert:whiting:metcalfe:03; @touron:2018], genomics [@yau:papas:roberts:holmes:11], statistical modelling of animal movement [@langrock2015nonparametric] or biology [@volant:berard:2014]. [ @levine2011maximum] introduce an iterative algorithm with similar monotonicity property as the Expectation Maximization algorithm to estimate a nonparametric finite mixture of multivariate components with applications to simulated data and to the water-level dataset (see the mixtools package).  In [@langrock2017markov], Markov-switching generalized additive models where the function $g$ and the noise distribution in depend on a hidden label are used to describe signals with complex dynamic patterns.  The authors of this paper introduced an efficient nonparametric estimation method of the unknown functions of the hidden signal.  The spline-based nonparametric estimation of these functionals is applied to advertising data and to Spanish energy price data, see also [@langrock2015nonparametric] for an application of nonparametric regression estimation with P-Splines to the vertical speed of diving beaked whales. 

For finite state space hidden Markov models, such nonparametric modeling has been recently validated by theoretical identifiability results and the analysis of estimation procedures with provable guarantees, see [@MR3439359], [@MR3509896], [@MR3543517], [@LucJMLR].  In this setting, the parameters to be estimated are the transition matrix of the hidden chain and the emission densities.  See also [@gassiat:rousseau:2016] and [@akakpo_translationhmm] for translation hidden Markov models with finite state space.  While certainly of interest, the finite state space setting may be too restrictive for many applications. 

The inverse problem in (\[eq:model:deconvolution\]) is also known as the deconvolution problem.  There is a wide range of literature on density deconvolution when the distribution of the noise $ \varepsilon_i$ is assumed to be known and the random variables $(X_i,\varepsilon_i)_{i = 1, \dots, n}$ are assumed to be independent and identically distributed, see [@MR1033106], [@MR1047309], [@MR1054861], for some early nonparametric deconvolution methods, [@MR997599] and [@MR1126324] for minimax rates, see also [@MR3314482] and references therein for a recent work.  However, when the distribution of the noise is unknown and the observations are independent, model (\[eq:model:deconvolution\]) can not be identified in full generality. 

In this paper, we establish the identifiability of the fully nonparametric hidden translation model under the weak assumption that the Laplace transform of the latent variable has an exponential growth smaller than $2$ and some assumption on the distribution of two consecutive hidden states which is roughly a dependency assumption, see Theorem \[theoident1\].  In the case of real valued hidden Markov models, identifiability is extended to latent variables having Laplace transform with exponential growth smaller than $3$, see Theorem \[theoident2\].  Two different methods are proposed to recover the distribution of the latent variables: a least squares method arising naturally from the identifiability proof and a classical maximum likelihood method using discrete probability measures as approximation of all probability measures.  Both estimators are proved to be consistent for the weak convergence topology, see Theorem \[theoconsi1\] and Theorem \[theoconsi2\].  The most surprising result is that the identifiability of the signal distribution only requires an assumption on the tail of its distribution and a dependency assumption, and does not require any assumption on the unknown distribution of the noise.  This has to be compared to works such as [@Wilhelm2015], [@MR2970334] or [@MR2374986] in which some conditions require several operators to be injective and some variables to have densities.  It is also important to note that Theorem \[theoident1\] encompasses the case of dependent observations in which the hidden signal is not necessarily a Markov chain, which can be the case for the nonparametric hidden regression model (\[eq:model:regresshidden\]).  In that sense, our work extends the identification results of [@dumont:lecorff:2017; @dumont:lecorff:2017b] to the cases where the distribution of the additive noise is unknown.  Such a general result provides also the first theoretical guarantees for the identification of nonparametric latent data models which have been applied in various frameworks such as in [@langrock2017markov] or [@langrock2015nonparametric]. 

The paper is organized as follows.  Section \[sec:identifiability:general\] displays the general identifiability results.  The consistency of the least squares approach and that of the maximum likelihood estimation procedures are given in Section \[sec:estimation\].  These results are supported by simulations in Section \[sec:simu\].  Section \[sec:discussion\] provides a synthesis of the results obtained in the paper and discusses some opportunities for further research.  In particular, it points out an important, yet very challenging, unsolved problem in the setting of this paper: obtainning convergence rates in deconvolution problems where absolutely no information about the noise is available. 

Identifiability Theorems {#sec:identifiability:general}
========================

Consider a sequence of random variables $(Y_{i})_{i{\geqslant}1}$ taking values in ${\mathbb{R}}^{d}$ and satisfying model (\[eq:model:deconvolution\]) in which the hidden Markov chain $(X_{i})_{i{\geqslant}1}$ is stationary.  In the following, ${\mathbb{R}}^{d}$ is endowed with its Borel sigma-field ${{\mathcal{B}}}({\mathbb{R}}^d)$. For each transition kernel $K: {\mathbb{R}}^d\times \mathcal{B}({\mathbb{R}}^d) \to [0,1]$ with a unique stationary distribution $\mu_K$, define the measure $R_{K}$ on ${\mathbb{R}}^{2d}$ as follows.  For all $E\in \mathcal{B}({\mathbb{R}}^{2d})$, $
R_{K}(E) = \int \mu_K({\mathrm{d}}x) K(x,{\mathrm{d}}y)\mathds{1}_E(x,y){\,}. 
$ For any probability distribution $P$ on ${\mathbb{R}}^d$, denote by ${\mathbb{P}}_{K,P}$ the distribution of the sequence $(Y_{i})_{i{\geqslant}1}$ when the stationary Markov chain $(X_{i})_{i{\geqslant}1}$ has transition $K$ and $\varepsilon_{1}$ has distribution $P$. For any $\rho >0$, let ${\mathcal{M}}_{\rho}$ be the set of finite measures $\mu$ on ${\mathbb{R}}^{d}$ such that there exist $A,B>0$ satisfying, for all $u\in {\mathbb{R}}^{d}$, $\int\exp \left(u^{T}x\right) {\mathrm{d}}\mu (x)
{\leqslant}A \exp \left( B \|u\|^{\rho}\right)$, where for a vector $u$ in a Euclidian space, $\|u\|$ denotes its Euclidian norm and $u^{T}$ denotes its transpose vector.  If $K$ is such that $\mu_{K} \in {{\mathcal{M}}_{\rho}}$ for some $\rho$, then the function $\Phi_{R_{K}}$ defined for $(z_{1},z_{2})\in{\mathbb{C}}^{d}\times {\mathbb{C}}^{d}$ by $\Phi_{R_{K}}(z_{1},z_{2})=
\int  \exp \left(z_{1}^{T}x_{1} +z_{2}^{T}x_{2}\right) {\mathrm{d}}R(x_{1}, x_{2})
$ is well defined over ${\mathbb{C}}^{d}\times {\mathbb{C}}^{d}$. Consider the following assumption. 

\[assum::\] For any $z_{0}\in {\mathbb{C}}^{d}$, $
z \mapsto \Phi_{R_{K}}(z_{0},z)
$ is not the null function or $
z \mapsto \Phi_{R_{K}}(z,z_{0})
$ is not the null function. 

An alternative equivalent formulation of Assumption H\[assum::\] is the following: $
{\text{for any }}z_{0}\in {\mathbb{C}}^{d}, \;
\mathbb{E}[  {\mathrm{e}}^{z_{0}^{T}X_{2}} \vert X_{1} ] \neq 0
{\text{ or }}
\mathbb{E}[{\mathrm{e}}^{z_{0}^{T}X_{1}} \vert X_{2}] \neq 0$. Throughout this paper, the assertion *$R_K = R_{{\widetilde}K}$ and ${P}= {\widetilde{P}}$ up to translation* means that there exists $m\in  {\mathbb{R}}^{d}$ such that if $(X_1,X_2)$ has distribution $R_K$ and $(\varepsilon_{1},\varepsilon_2)$ has distribution ${P}\otimes {P}$, then $(X_{1}-m,X_2-m)$ has distribution $ R_{{\widetilde}K}$ and $(\varepsilon_{1}+m,\varepsilon_{2}+m)$ has distribution ${\widetilde{P}}\otimes {\widetilde{P}}$. The following theorems state that the distribution of the observations allows to recover the kernel of the hidden Markov chain and the distribution of the noise up to translation. 

\[theoident1\] Assume that $K$ (resp.  $\widetilde K$) is a transition kernel on ${\mathbb{R}}^d\times \mathcal{B}({\mathbb{R}}^d)$ with a unique stationary distribution $\mu_K$ (resp.  $\mu_{\widetilde K}$) and that $R_{K}$ and $R_{\widetilde K}$ satisfy assumption H\[assum::\].  Assume also that there exists $\rho <2$ such that $\mu_{K}\in {\mathcal{M}}_{\rho}$ and $\mu_{\widetilde K}\in {\mathcal{M}}_{\rho}$. Then, ${\mathbb{P}}_{{K},P}={\mathbb{P}}_{{\widetilde K},\widetilde P}$ implies that $R_{K} =R_{\widetilde K}$ and ${P}= {\widetilde{P}}$ up to translation. 

In the case of real valued random variables, identifiability holds for a class of transition kernels including Gaussian Markov chains. 

\[theoident2\] Assume that $K$ (resp.  $\widetilde K$) is a transition kernel on ${\mathbb{R}}\times \mathcal{B}({\mathbb{R}})$ with a unique stationary distribution $\mu_K$ (resp.  $\mu_{\widetilde K}$) and with a density with respect to the Lebesgue measure.  Assume that there exists $\rho <3$ such that $\mu_{K}\in {\mathcal{M}}_{\rho}$ and $\mu_{\widetilde K}\in {\mathcal{M}}_{\rho}$. Assume that $R_{K}$ and $R_{\widetilde K}$ satisfy assumption H\[assum::\].  Assume moreover that if the stationary Markov chain with transition kernel $K$ (resp.  $\widetilde K$) is Gaussian, it is not a sequence of independent and identically distributed variables.  Then, ${\mathbb{P}}_{K,{P}}={\mathbb{P}}_{{\widetilde K},{\widetilde{P}}}$ implies that $R_{K} = R_{\widetilde K}$ and ${P}= {\widetilde{P}}$ up to translation. 

One way to fix the “up to translation" indeterminacy when the noise has a first order moment is to assume that $\mathbb{E}[\varepsilon_{1}]=0$. Detailed proofs of Theorems \[theoident1\] and \[theoident2\] can be found in Appendix \[sec:proof:ident1\]. 

*Comments on the assumptions.* 

i)  The assumption that $\mu_{K}\in {\mathcal{M}}_{\rho}$ is an assumption on the tails of the distribution $\mu_{K}$. If $\mu_{K}$ is compactly supported, then $\mu_{K}\in {\mathcal{M}}_{1}$, and if a probability distribution is in ${\mathcal{M}}_{\rho}$ for some $\rho$, then $\rho {\geqslant}1$ except in case it is a Dirac mass at point $0$. The assumption $\rho <2$ means that $\mu_{K}$ is required to have tails lighter than that of Gaussian distributions. 

ii) The most striking result is that there is no assumption at all on the distribution of the noise, it could have any distribution (including the possibility of a deterministic noise).  In particular, there is no assumption on the set where its characteristic function vanishes.  In addition, there is no density or singularity assumption on the distribution of the hidden signal.  The hidden sequence may have atomic distributions, continuous distributions, and no specific knowledge about this is required.  The only assumptions are on the tail of the signal distribution and assumption H\[assum::\] which, as discussed below, is a dependency assumption.  In contrast, in previous works such as [@Wilhelm2015], [@MR2970334] or [@MR2374986], part of the observations and hidden variables are assumed to have densities (with boundedness or tail assumptions), and some assumptions require invertibility of operators which in the context of this paper translate to non vanishing of the characteristic function of the noise.  The completeness assumption ID4 in [@Wilhelm2015] implies H\[assum::\] if the hidden variables are bounded. 

iii) [**Assumption H\[assum::\]**]{}.  Hadamard’s factorization theorem states that entire functions are completely determined by their set of zeros up to a multiplicative indeterminacy which is the exponential of a polynomial with degree at most the exponential growth of the function (here $\rho$).  If $\mu_{K}\in {\mathcal{M}}_{\rho}$ for some $\rho <2$, then a consequence of Hadamard’s factorization theorem (arguing variable by variable) is that $\Phi_{R_K}\left(\cdot,0\right)$ has no zeros if and only if $\mu_{K}\in {\mathcal{M}}_{\rho}$ is a dirac mass.  A simple example in which Assumption H\[assum::\] holds is when the Markov chain is a an autoregressive process, that is there exists a function $h$ and a sequence of i.i.d.  centered random variables $\eta_{i}$, $i{\geqslant}1$, such that for all integer $i$, $X_{i+1}=h(X_{i})+\eta_{i}$. Indeed in this case, for all $z_{1}\in{\mathbb{C}}^{d}$ and $z_{2}\in{\mathbb{C}}^{d}$, $\Phi_{R_K}\left(z_{1},z_{2}\right)={\mathbb{E}}\exp (z_{1} X_{1}+ z_{2} h(X_{1})) {\mathbb{E}}\exp z_{2} \eta_{1}$, so that for any $z_{1}$, there exists $z_{2}$ such that $\Phi_{R_K}\left(z_{1},z_{2}\right)\neq 0$ and Assumption H\[assum::\] holds. 

    Now, if the variables $X_{i}$, $i{\geqslant}1$, are independent, then for all $z_{1}\in{\mathbb{C}}^{d}$ and $z_{2}\in{\mathbb{C}}^{d}$, $\Phi_{R_K}\left(z_{1},z_{2}\right)=\Phi_{R_K}\left(z_{1},0\right)\Phi_{R_K}\left(0,z_{2}\right)$. But if $X_{i}$ is not deterministic, then the function $\Phi_{R_K}\left(\cdot,0\right)=\Phi_{R_K}\left(0,\cdot\right)$ has zeros, and Assumption H\[assum::\] does not hold.  In other words, Assumption H\[assum::\] implies that the variables $X_{i}$, $i{\geqslant}1$ are not independent except if they are deterministic.  When the hidden variables have a finite support set of cardinality $2$, Assumption H\[assum::\] is even equivalent to the fact that $X_{1}$ and $X_{2}$ are not independent. 

*Outline of the proofs.*  The strategy is to write the characteristic functions of the distribution of two consecutive observations under ${\mathbb{P}}_{K,{P}}$ and ${\mathbb{P}}_{{\widetilde K},{\widetilde{P}}}$, and to derive an equality involving the characteristic functions of $R_{K}$ and $R_{\widetilde K}$ in a neighborhood of the origin using the fact that, in such a neighborhood, the characteristic function of the noise distribution is nonzero both under ${P}$ and ${\widetilde{P}}$. Then, the assumption that $\mu_{K}\in {\mathcal{M}}_{\rho}$ for some $\rho$ is used in two main steps. 

i)  The first step is to extend the equality that holds between characteristic functions in a neighborhood of the origin into an equality on ${\mathbb{C}}^{d}\times {\mathbb{C}}^{d}$, that is for any $z_{1}\in{\mathbb{C}}^{d}$ and $z_{2}\in{\mathbb{C}}^{d}$, $$\label{analyticmain}
    \Phi_{R_K}\left(z_{1},z_{2}\right)\Phi_{R_{{\widetilde}K}}\left(z_{1},0\right)\Phi_{R_{{\widetilde}K}}\left(z_{2},0\right)=\Phi_{R_{{\widetilde}K}}\left(z_{1},z_{2}\right)\Phi_{R_K}\left(z_{1},0\right)\Phi_{R_K}\left(z_{2},0\right)
    {\,}.$$ This equation is also the starting point of [@gassiat:rousseau:2016], but dealing with continuous multidimensional state spaces requires further developments.  In the proof of Theorem \[theoident1\] and Theorem \[theoident2\], this is possible due to the fact that the functions $\Phi_{R_{K}}$ and $\Phi_{R_{\widetilde K}}$ are multivariate analytic functions.  Indeed, it is possible to replace, in the integral defining $\Phi_{R_{K}}$ and $\Phi_{R_{\widetilde K}}$, the exponential term by its series expansion and interchange sums and integration using dominated convergence since Laplace transforms under $R_{K}$ with $R_{\widetilde K}$ are finite everywhere, and the remaining in the series may be locally uniformly upper bounded.  Then, using assumption H\[assum::\], it is possible to prove that variable by variable, $\Phi_{R_{K}}$ and $\Phi_{R_{\widetilde K}}$ have the same sets of zeros in ${\mathbb{C}}$ (with multiplicity) when all other variables are fixed. 

ii) The second step is to use (again variable by variable) Hadamard’s factorization theorem for entire functions, see [@Stein:complex Chapter 5, Theorem 5.1], to prove that $\Phi_{R_{K}}$ and $\Phi_{R_{\widetilde K}}$ are equal up to the exponential of a polynomial of degree at most the integer part of $\rho$. This is where the constraint on $\rho$ is used.  Indeed, if $\rho <2$, its integer part is $1$. We prove that $\Phi_{R_{K}}$ and $\Phi_{R_{\widetilde K}}$ are equal up to the exponential of a polynomial of degree at most $1$ in each variable (the case $d>1$ requires a careful analysis), from which we deduce that $R_{K} = R_{\widetilde K}$ and ${P}= {\widetilde{P}}$ up to translation.  In the case where only $\rho <3$ is required, the conclusion is that $\Phi_{R_{K}}$ and $\Phi_{R_{\widetilde K}}$ are equal up to the exponential of a polynomial of degree at most $2$. In this case, we were able to extend the result only for real valued observations, by proving the following lemma which is used to conclude that the polynomial has to be of degree at most $1$.

    \[lem:gaussMarkov\] Assume that $(X_{i})_{i{\geqslant}1}$ is a stationary real valued Markov chain with transition kernel having a density with respect to the Lebesgue measure.  Assume that $(\eta_{i})_{i{\geqslant}1}$ is a sequence of independent and identically distributed real valued Gaussian random variables with positive variance and independent of $(X_{i})_{i{\geqslant}1}$. If $(X_{i}+\eta_{i})_{i{\geqslant}1}$ is Markov chain, then $(X_{i})_{i{\geqslant}1}$ is an independent and identically distributed sequence. 

The proof of Theorem \[theoident2\] uses the fact that the hidden variables form a Markov chain by using Lemma \[lem:gaussMarkov\] where the Markovian property is the starting point of the proof.  This is not the case for Theorem \[theoident1\] in which only the dependency assumption H\[assum::\] is used.  Thus, Theorem \[theoident1\] can be extended to other dependent observations in which the hidden signal is not necessarily a Markov chain.  Consider now model (\[eq:model:regresshidden\]).  Applying Theorem \[theoident1\] (with the assumptions on $R$ as defined below instead of on the kernel of the Markov chain) yields the following corollary. 

\[cor:reg\] Assume that $(Z_{i})_{i{\geqslant}1}$ is a sequence of stationary random variables such that the distribution of $g(Z_{1})$ is in ${\cal M}_{\rho}$ for some $\rho <2$, and such that the distribution $R$ of $(g(Z_{1}), g(Z_{2}))$ satisfies Assumption H\[assum::\].  Then the application that associates $R$ (in ${\mathcal{M}}_{\rho}$ for some $\rho <2$ and satisfying H\[assum::\]) and $P$ (the distribution of the noise) to the distribution of $(Y_{1},Y_{2})$ is one-to-one up to translation. 

The function $g$ can be known or unknown.  If $g$ is unknown but may be recovered from the knowledge of the distribution of $(g(Z_{1}),g(Z_{2}))$, then Corollary \[cor:reg\] states that in model (\[eq:model:regresshidden\]), everything can be recovered based only on $(Y_{i})_{i{\geqslant}1}$ in regression problems with dependent hidden regressors.  In particular, Corollary \[cor:reg\] extends the identification results of [@dumont:lecorff:2017; @dumont:lecorff:2017b] to the cases where the distribution of the additive noise is unknown.  Numerical experiments in the case where $g: x\mapsto \cos x$ are given in Section \[sec:simu\]. 

Consistent Estimation {#sec:estimation}
=====================

In this section, we propose two different estimation methods.  The first one builds directly on the identifying equation (\[analyticmain\]).  It is similar to the method proposed in [@gassiat:rousseau:2016] for parametric estimation of the finite dimensional parameter (in their work, the hidden variables take finitely many values).  The second estimation method is a likelihood method, which uses the Markov modeling of the hidden variables.  The idea is to approximate the continuous state space by a finite state space obtained by discretization, and to use penalized likelihood to select automatically the number of points in the approximation and their location.  Since the likelihood uses the joint distribution of all observations, likelihood estimation should be more accurate when the hidden process is indeed Markovian.  Moreover, for hidden Markov models in which the distribution of the hidden variable has distribution in ${\mathcal{M}}_{\rho}$ for $2{\leqslant}\rho <3$, then one has to use an estimation method using the Markovian property.  Thus in such a case, one can not use the method in Section \[sec:least:squares\] but rather the likelihood method.  For both estimation methods, the identifiability theorem is the cornerstone to establish the consistency of the estimator. 

Using Least Squares for Characteristic Functions {#sec:least:squares}
------------------------------------------------

In the following, objects related to the true (unknown) distribution ${\mathbb{P}}^{\star}$ of the observed process are denoted with the superscript $\star$. Let ${{\mathcal{S}}}$ be a compact neighborhood of $0$ in ${\mathbb{R}}^{2d}$, and let $w
: {\mathbb{R}}^{d} \times {\mathbb{R}}^{d} \to {\mathbb{R}}_{+}$ be a positive function on ${{\mathcal{S}}}$. Let $\phi^\star$ be the characteristic function of $\varepsilon_1$. For any probability distribution $R$ on ${\mathbb{R}}^{d} \times {\mathbb{R}}^{d}$, define $$\begin{gathered}
M(R)=\int_{{\mathcal{S}}}\left\vert \Phi_{R^{\star}}(it_{1},it_{2})\Phi_{R}(it_{1},0)\Phi_{R}( 0, it_{2})  -
  \Phi_{R}(it_{1},it_{2})\Phi_{R^{\star}}(it_{1},0)\Phi_{R^{\star}}( 0, it_{2})
  \right\vert^{2} \\
  \vert   \phi^{\star}(t_{1})\phi^{\star}(t_{2})   \vert^{2} w(t_{1},t_{2}){\mathrm{d}}t_{1} {\mathrm{d}}t_{2}{\,}.\end{gathered}$$ Under appropriate assumptions, by the proof of Theorem \[theoident1\], $M(R)=0$ if and only if $R=R^{\star}=R_{K^{\star}}$ up to translation.  Using an estimator $\widehat {\Phi}_{n}$ of the characteristic function of $(Y_{1},Y_{2})$, define an estimator of $M(\cdot)$ by $$M_{n}(R) \!  = \!\!\int_{{\mathcal{S}}}\!  \left\vert   \widehat {\Phi}_{n}(t_{1},t_{2})\Phi_{R}(it_{1},0)\Phi_{R}( 0, it_{2})  -
  \Phi_{R}(it_{1},it_{2})\widehat {\Phi}_{n}(t_{1},0)\widehat {\Phi}_{n}( 0, t_{2})
  \right\vert^{2}  \!\!\!\!  w(t_{1},t_{2}){\mathrm{d}}t_{1} {\mathrm{d}}t_{2}{\,}.$$ Let ${{\mathcal{R}}}$ be a set of probability distributions on ${\mathbb{R}}^{d} \times {\mathbb{R}}^{d}$ such that for some $\rho <2$, for all $R\in {{\mathcal{R}}}$, both marginal distributions of $R$ are in ${\mathcal{M}}_{\rho}$ and $R$ satisfies assumption H\[assum::\].  Define $\widehat{R}_{n}$ as an element of ${{\mathcal{R}}}$ satisfying $$M_{n}(\widehat{R}_{n}) = \inf_{R \in {{\mathcal{R}}}} M_{n}(R).$$ Under the assumptions of Theorem \[theoconsi1\], $\widehat{R}_{n}$ exists but may be not uniquely defined because of translation invariance.  Let $d$ be a distance that metrizes weak convergence on ${{\mathcal{R}}}$, and define $Z_{n}(t_{1},t_{2})$ by $
Z_{n}(t_{1},t_{2})=\sqrt{n} ( \widehat {\Phi}_{n}(t_{1},t_{2})-  \Phi_{R^{\star}}(it_{1},it_{2}) \phi_{1}^{\star}(t_{1})\phi_{2}^{\star}(t_{2}))
$. 

\[theoconsi1\] Assume that $
\sup_{(t_{1},t_{2})\in {{\mathcal{S}}}} | Z_{n}(t_{1},t_{2}) | = O_{{\mathbb{P}}^{\star}}(1){\,}. 
$ Then, $$M(\widehat{R}_{n}) =  O_{{\mathbb{P}}^{\star}}(n^{-1/2}).$$ If moreover ${{\mathcal{R}}}$ is compact for the weak convergence topology and $R^{\star}\in {{\mathcal{R}}}$, then $d(\widehat{R}_{n},{{\mathcal{R}}}^{\star})$ tends to $0$ in ${\mathbb{P}}^{\star}$-probability as $n$ tends to infinity, where ${{\mathcal{R}}}^{\star}$ is the set of $R\in {{\mathcal{R}}}$ that are equal to $R^{\star}$ up to translation. 

In the parametric setting, the $n^{-1/2}$ rate on $M(\widehat{R}_{n})$ leads to a $n^{-1/2}$ rate on the parameter as proved in [@gassiat:rousseau:2016], where the main point is to prove that the Hessian matrix of the criterion is non singular at the true (unknown) parameter.  However, obtaining nonparametric rates on $\widehat{R}_{n}$ from rates on $M(\widehat{R}_{n})$ is much more difficult, since in this infinite dimensional setting, the Hessian operator can not have continuous inverse. 

Note that consistency with respect to some topology is a consequence of the continuity of $M$ and the compactness of $\cal R$ in the same topology.  Consistency in other topologies could be derived under other assumptions.  The proof of Theorem \[theoconsi1\] is postponed to Appendix \[sec:proof:ident1\] for completeness. 

[*Comments on the assumptions of Theorem \[theoconsi1\].*]{} 

i)  *Assumption on $Z_{n}$.* If $\widehat {\Phi}_{n}$ is the empirical estimator, then this assumption holds as soon as the hidden Markov chain is strongly mixing, see for instance [@doukhan:massart:rio:1994] and [@doukhan:massart:rio:1995]. 

ii) *The marginals of each $R \in {{\mathcal{R}}}$ are in ${{\mathcal{M}}}_\rho$.* For any positive $\rho$, $A$, $B$ and any positive integer $d'$, let ${\mathcal{M}}_{\rho,d'}(A,B)$ be the set of finite measures $\mu$ on ${\mathbb{R}}^{d'}$ such that for all $u\in {\mathbb{R}}^{d'}$, $\int\exp \left(u^{T}x\right) {\mathrm{d}}\mu (x)
    {\leqslant}A \exp \left( B \|u\|^{\rho}\right)$. For any $\rho>0$, $A > 0$ and $B > 0$, ${{\mathcal{M}}}_{\rho,2d}(A,B)$ is compact for the weak convergence topology and for each distribution $R$ on ${\mathbb{R}}^d \times {\mathbb{R}}^d$ such that $R \in {{\mathcal{M}}}_{\rho,2d}(A,B)$, both marginal distributions of $R$ are in ${{\mathcal{M}}}_\rho$. Thus, it is enough to choose ${{\mathcal{R}}}\subset {{\mathcal{M}}}_{\rho,2d}(A,B)$ for some $\rho$, $A$ and $B$. In this case, the closure of ${{\mathcal{R}}}$ is compact and still a subset of ${{\mathcal{M}}}_{\rho,2d}(A,B)$.

iii) *All elements of ${{\mathcal{R}}}$ satisfy assumption H\[assum::\].*  A way to ensure this is to assume that there exists ${\Xi}> 0$ and $\underline{\varphi} : {\mathbb{C}}^d \rightarrow {\mathbb{R}}_+^*$ such that $$\label{eq_strong_H1}
    \forall R \in {{\mathcal{R}}}, \quad
    \forall z_0 \in {\mathbb{C}}^d, \quad
        \sup_{z_1 \in {\mathbb{C}}^d, \|z_1\| {\leqslant}{\Xi}} |\Phi_R(z_0,z_1)| \vee |\Phi_R(z_1,z_0)| {\geqslant}\underline{\varphi}(z_0) {\,}.$$ Note that since if $(R_n)_{n\geqslant 1}$ is a sequence of distributions in ${{\mathcal{M}}}_{\rho,2d}(A,B)$ that converges to $R$ in distribution, then $\Phi_{R_n}$ converges to $\Phi_R$ uniformly over all compacts of $({\mathbb{C}}^d)^2$ (because the set of functions $\{ \Phi_R : R \in {{\mathcal{M}}}_{\rho,2d}(A,B)\}$ is pointwise equicontinuous), the closure of ${{\mathcal{R}}}\cap {{\mathcal{M}}}_{\rho,2d}(A,B)$ also satisfies equation . 

    Hence, the largest subset ${{\mathcal{R}}}$ of ${{\mathcal{M}}}_{\rho,2d}(A,B)$ (for some $\rho \in (0,2)$, $A>0$ and $B>0$) that contains only probability distributions satisfying equation  is compact for the weak convergence topology, each of its elements satisfies H\[assum::\], and provided that the parameters $\rho$, $A$, $B$, ${\Xi}$ and $\underline{\varphi}$ are suitable, it contains $R^\star$, thus it satisfies the assumptions of Theorem \[theoconsi1\]. 

Using Maximum Likelihood {#sec:mle}
------------------------

In this section we fully exploit the Markovian structure of the latent variables.  Using the fact that continuous distributions may be approximated by discrete distributions, we consider finite state space hidden Markov models and the associated maximum likelihood estimator.  The idea is to replace the (continuous) support of the hidden process by a finite support.  Increasing the number of support points reduces the approximation error (the bias) while increasing the estimation error.  Thus, a careful bias-variance trade-off has to be performed to obtain consistent estimators.  We propose a penalized likelihood estimator that automatically selects the number of support points.  Its consistency is obtained thanks to the identifiability Theorem \[theoident1\] and to the oracle inequality proved in [@lehericy2018misspe], Theorem 6.  We assume in this section that the hidden process $(X_i)_{i {\geqslant}1}$ takes values in a known compact set $\Lambda = [-L,L]^d \subset {\mathbb{R}}^d$ and that the distribution of the noise is absolutely continuous with respect to the Lebesgue measure on ${\mathbb{R}}^d$. Denote by $K^{\star}$ the transition kernel of the hidden process, and by $\gamma^{\star}$ the density of the noise with respect to the Lebesgue measure.  Since the compact is known, all possible kernels $K$ are such that $\mu_K \in {{\mathcal{M}}}_1$. Transition kernels on finite sets are described by the number of points $r$ of their support, the vector ${{\mathfrak{X}}}= (x_1, \dots, x_r)$ of their support points and the transition matrix $Q$ between these points: for all $(z,z') \in \{1, \dots, r\}^2, \  Q(z,z') = {\mathbb{P}}(X_1 = x_{z'} | X_0 = x_z)$. For a vector ${{\mathfrak{X}}}\in \Lambda^r$, a transition matrix $Q$ with stationary distribution $\mu_{Q}$ and a density $\gamma$, the log-likelihood of the parameter $({{\mathfrak{X}}},Q,\gamma)$ given the observations $(Y_i)_{1 {\leqslant}i {\leqslant}n}$ is $$\ell_{n}({{\mathfrak{X}}},Q,\gamma)=\log \left(\sum_{z_{1},\ldots,z_{n}\in \{1,\ldots,r\}}\!\!\!\!\!\!\!\!\!\!\mu_{Q}(z_{1})\gamma(Y_{1}-x_{z_{1}})\prod_{k=2}^{n}Q(z_{k-1},z_{k})\gamma(Y_{k}-x_{z_{k}})
\right){\,}.$$ In this section, a penalized likelihood function is used to perform model selection.  Consider a collection of finite dimensional models $(S_{r,D,n})_{r {\geqslant}1, D {\geqslant}1, n {\geqslant}1}$, in which $D$ is a complexity parameter related to the sieve approximation of the nonparametric set in which $\gamma$ lies.  Then, for each $r {\geqslant}1$ and $D {\geqslant}1$, the maximum likelihood estimator of model $S_{r,D,n}$ is defined by $$({\widehat}{{{\mathfrak{X}}}}_{r,D,n},{\widehat}{Q}_{r,D,n},{\widehat}{\gamma}_{r,D,n})
    \in \operatorname*{arg\,max}_{({{\mathfrak{X}}},Q,\gamma) \in S_{r,D,n}}
            \frac{1}{n} \ell_n({{\mathfrak{X}}},Q,\gamma){\,}.$$ The number of states and the model dimension are selected using the penalized likelihood: $$({\widehat}{r}_n, {\widehat}{D}_n) \in \operatorname*{arg\,max}_{r {\leqslant}\log n, D {\leqslant}n}
    \left( \frac{1}{n} \ell_n({\widehat}{{{\mathfrak{X}}}}_{r,D,n},{\widehat}{Q}_{r,D,n},{\widehat}{\gamma}_{r,D,n}) - (D+r^2) \frac{(\log n)^{15}}{n} \right)$$ and the final estimators are defined as $$({\widehat}{{{\mathfrak{X}}}}_n, {\widehat}{Q}_n, {\widehat}{\gamma}_n) = \left({\widehat}{{{\mathfrak{X}}}}_{{\widehat}{r}_n, {\widehat}{D}_n, n}, {\widehat}{Q}_{{\widehat}{r}_n, {\widehat}{D}_n, n}, {\widehat}{\gamma}_{{\widehat}{r}_n, {\widehat}{D}_n, n}\right){\,}.$$ The specific form of the penalty is chosen according to the theory developed in [@lehericy2018misspe], but in practice the slope heuristics as in [@MR2865029] could be used to calibrate the penalty. 

The nonparametric set $\Gamma$ of possible noise densities is described now as a set of nonparametric mixtures.  Then, the finite dimensional sieve is given by finite mixtures with at most $D$ support points.  Let $\Theta$ be a compact subset of ${\mathbb{R}}^d \times GL_d({\mathbb{R}})$ and $f : y \in {\mathbb{R}}^d \longmapsto (2\pi)^{-d/2} \exp(- \|y\|^2 / 2)$ be the density of a standard multivariate normal distribution.  Write ${{\mathcal{P}}}(\Theta)$ the set of probability measures on $\Theta$, let $$\label{eq_ex_Gamma}
\Gamma = \left\{ \gamma : y \longmapsto \int_\Theta |\det(\Sigma)| f\left( \Sigma(y-\mu) \right) {\mathrm{d}}p(\mu,\Sigma) : p \in {{\mathcal{P}}}(\Theta), \int_\Theta \mu {\mathrm{d}}p(\mu, \Sigma) = 0 \right\}$$ be the set of densities of location-scale mixtures of $f$ with parameters in $\Theta$. The condition $\int_\Theta \mu {\mathrm{d}}p(\mu, \Sigma) = 0$ ensures that all densities in $\Gamma$ are centered.  For $(\mu,\Sigma) \in \Theta$, write $\delta_{\mu,\Sigma}$ the Dirac measure centered on $(\mu,\Sigma)$. Let $(G_D)_{D {\geqslant}1}$ be defined for all $D {\geqslant}1$ by $$G_D = \left\{ \gamma : y \longmapsto \sum_{i=1}^D p_i \det(\Sigma_i) f\left( \Sigma_i(y-\mu_i) \right) : \sum_{i=1}^D p_i \delta_{(\mu_i, \Sigma_i)} \in {{\mathcal{P}}}(\Theta), \sum_{i=1}^D p_i \mu_i = 0 \right\}.$$ Transition kernels are understood as functions from $\Lambda$ to ${{\mathcal{P}}}(\Lambda)$ endowed with the weak convergence topology.  For $p{\geqslant}1$, let $W_p(\mu_1,\mu_2)$ be the Wasserstein distance between two probability measures $\mu_{1}$ and $\mu_{2}$ on the same Euclidian space $E$ which is defined as the infimum of $(\int_{E\times E} \|x-y\|^{p} \pi ({\mathrm{d}}x,{\mathrm{d}}y))^{1/p} $ over the set of probabilities $\pi$ such that $\mu_{1}=\int \pi(\cdot, {\mathrm{d}}y)$ and $\mu_{2}=\int \pi({\mathrm{d}}x,\cdot)$, see [@MR1619171] or [@MR2459454].  Wasserstein distances are convenient to compare probability measures that may be singular to each other and $W_1$ metrizes the weak convergence topology for compactly supported distributions.  It is assumed that all kernels used in the proposed procedure share the same modulus of continuity $\omega$. It is possible to assume that $\omega$ is a concave function with no loss of generality since ${{\mathcal{P}}}(\Lambda)$ has finite $W_1$-diameter.  Let $C {\geqslant}2$ be a constant. 

\[hyp\_transitionKernel\] The application $x \in \Lambda \longmapsto K^\star(x, \cdot) \in ({{\mathcal{P}}}(\Lambda), W_1)$ admits the modulus of continuity $\omega/2$ and there exists a probability measure $\lambda^\star$ on $\Lambda$ such that for all $x \in \Lambda$, $K^\star(x, \cdot)$ has a density with values in $[2/C,C/2]$ with respect to $\lambda^\star$.

The collection of models $(S_{r,D,n})_{r {\geqslant}1, D {\geqslant}1, n{\geqslant}1}$ used in the maximum likelihood estimation is defined as follows.  For all $r {\geqslant}1$ and $D {\geqslant}1$, let ${{\mathbf{S}}}_{r,D}$ be the set of all $({{\mathfrak{X}}},Q,\gamma) \in \Lambda^r \times [1/(Cr), C/r]^{r \times r} \times G_D$ such that $Q$ is a transition matrix and the transition kernel $x_z \longmapsto \sum_{z'=1}^r Q(z,z') \delta_{x_{z'}}$ admits the modulus of continuity $\omega$ with respect to $W_1$.

In order to state the consistency result, a continuous kernel associated with the discrete kernels of the models has to be introduced.  For $({{\mathfrak{X}}},Q,\gamma) \in {{\mathbf{S}}}_{r,D}$, denote by $K_{{{\mathfrak{X}}},Q}$ a transition kernel on $\Lambda$ that admits the modulus of continuity $\omega$ with respect to the Wasserstein 1 metric, extends the kernel defined by $Q$ on $\{x_z\}_{z = 1, \dots, r}$ and such that the support of $K_{{{\mathfrak{X}}},Q}(x,\cdot)$ is in $\{x_z\}_{z = 1, \dots, r}$ for all $x \in \Lambda$. Linear interpolation provides a way to construct such a kernel as soon as the modulus $\omega$ is concave. 

To conclude the definition of the models, let ${\Xi}' > 0$, $({\Xi}_n)_n$ be a sequence of positive real numbers such that ${\Xi}_n \rightarrow +\infty$ and $\underline{\varphi} : {\mathbb{C}}^d \rightarrow {\mathbb{R}}_+^*$. For all $r,D,n$, let $S_{r,D,n}$ be the subset of ${{\mathbf{S}}}_{r,D}$ such that $$\begin{gathered}
\label{eq_strong_H1_seq}
\forall ({{\mathfrak{X}}},Q,\gamma) \in S_{r,D,n}{\,}, \quad
\forall z_0 \in {\mathbb{C}}^d \text{ s.t. }  \|z_0\| {\leqslant}{\Xi}_n{\,}, \\
    \sup_{z_1 \in {\mathbb{C}}^d, \|z_1\| {\leqslant}{\Xi}'} |\Phi_{R_{K_{{{\mathfrak{X}}},Q}}}(z_0,z_1)| \vee |\Phi_{R_{K_{{{\mathfrak{X}}},Q}}}(z_1,z_0)| {\geqslant}\underline{\varphi}(z_0) {\,}.\end{gathered}$$ This is a relaxed version of H\[assum::\] and equation  in the sense that eventhough the elements of $S_{r,D,n}$ may not satisfy H\[assum::\], the limit of a convergent sequence $(R_{K_{{{\mathfrak{X}}}_n,Q_n}})_n$ with $({{\mathfrak{X}}}_n,Q_n,\gamma_n) \in S_{r,D,n}$ for all $n$ satisfies H\[assum::\].  For the following theorem to work, ${\Xi}'$ can be chosen arbitrarily, $({\Xi}_n)_n$ must grow “slowly enough" and $\underline{\varphi}$ be “small enough"; an appropriate choice of these quantities is discussed in the proof of the Theorem, see Appendix \[sec:proof:generaltheorem\]. 

\[theoconsi2\] Assume that assumptions H\[assum::\] and H\[hyp\_transitionKernel\] hold for $K^\star$. Assume also that $\gamma^* \in \Gamma$. Let $\lambda^\star$ be the measure defined in assumption H\[hyp\_transitionKernel\] and ${{\text{Supp}}}(\lambda^\star)$ its support.  Then, almost surely, the maximum likelihood estimator satisfies $$\sup_{x \in {{\text{Supp}}}(\lambda^\star)} W_1(K_{{\widehat}{{{\mathfrak{X}}}}_n,{\widehat}{Q}_n}(x,\cdot),K^{\star}(x, \cdot)) \underset{n \rightarrow \infty}{\longrightarrow} 0$$ and $\| {\widehat}{\gamma}_n - \gamma^\star \|_1 \underset{n \rightarrow \infty}{\longrightarrow} 0{\,}. 
$ In particular, almost surely under ${\mathbb{P}}^\star$, for all $x \in {{\text{Supp}}}(\lambda^\star)$, $K_{{\widehat}{{{\mathfrak{X}}}}_n,{\widehat}{Q}_n}(x,\cdot) \longrightarrow K^{\star}(x, \cdot)$ for the weak convergence topology and $\mu_{K_{{\widehat}{{{\mathfrak{X}}}}_n,{\widehat}{Q}_n}} \longrightarrow\mu_{K^{\star}}$ for the weak convergence topology. 

Theorem \[theoconsi2\] is a special case of a theorem stated and proved in Appendix \[sec:proof:mle\] that holds for more general sets $\Gamma$ and $(G_D)_{D {\geqslant}1}$.

Simulations {#sec:simu}
===========

Consider the model where $Z_0$ is a uniform random variable on $(0,2\pi)$ and for all $k{\geqslant}1$, $$Z_{k} = Z_{k-1} + \sigma_x \eta_k {\,},\quad X_{k} = \cos\left(Z_{k}\right)\quad\mathrm{and}\quad
Y_k = X_k + \sigma_y \varepsilon_k{\,},$$ where $(\sigma_x,\sigma_y) \in \times {\mathbb{R}}_+^*\times {\mathbb{R}}_+^*$ and where $(\varepsilon_k,\eta_k)_{k{\geqslant}1}$ are independent standard Gaussian random variables independent of $Z_0$. The parameters $(\sigma_x,\sigma_y) = (0.1,0.1)$ are used to sample the observations.  Assumption H\[hyp\_transitionKernel\] holds: the transition kernel $K^\star$ of $(X_k)_{k {\geqslant}1}$ is $1/2$-Hölder and the probability measure $\lambda^\star$ can be taken as the invariant measure of $K^\star$.

This section provides numerical illustrations of the maximum likelihood approach, additional simulations using least squares for the characteristic functions are given in Appendix \[sec:simu:appendix\].  The algorithm proposed here is more efficient than the algorithm proposed in Appendix \[sec:simu:appendix\] whose performance highly depends on the evolutionnary algorithm to minimize the criterion.  The performance of the estimation procedure proposed in Section \[sec:mle\] is assessed in the case where $\Lambda = {\mathbb{R}}$ and $\Gamma$ is as in with $\Theta = {\mathbb{R}}\times (0,+\infty)$. Although the compactness assumptions of Section \[sec:mle\] are not satisfied, in practice, the estimator is shown to converge to the true distribution.  The main reason for these assumptions is to ensure theoretical consistency by ruling out the worst case scenarios where the estimators are degenerate. 

For each $n \in \{5.10^3, 10^4, 2.10^4, 5.10^4, 10^5, 2.10^5\}$, 10 independent and identically distributed sequences $(Y_i)_{i = 1, \dots, n}$ are generated.  For each sample, an approximation of the maximum likelihood estimator is computed using the Estimation Maximization algorithm [@dempster:laird:rubin:1977] for $D = 2$ and $r \in \{10, 20, 30\}$. The error criterion is the estimated Wasserstein distance between the estimated and the true distribution of $(X_1, X_2)$, computed using $N_X \times N_W$ independent and identically distributed pairs $(X_{1,i}^{(j)}, X_{2,i}^{(j)})_{i = 1, \dots, N_X, j = 1, \dots, N_W}$ following the distribution $R_{K^\star}$ with $N_X = 5000$ and $N_W = 4$: $$\label{eq:wass:dist}
\text{Error}({\widehat}{{{\mathfrak{X}}}}_n, {\widehat}{Q}_n) =
    \frac{1}{N_W} \sum_{j=1}^{N_W}
    W_1\left(  
        R_{K_{{\widehat}{{{\mathfrak{X}}}}_n, {\widehat}{Q}_n}}, 
        \frac{1}{N_X} \sum_{i=1}^{N_X} \delta_{(X_{1,i}^{(j)}, X_{2,i}^{(j)})}
    \right),$$ or equivalently (when written as a distance between weighted point processes) $$\text{Error}({\widehat}{{{\mathfrak{X}}}}_n, {\widehat}{Q}_n) =
    \frac{1}{N_W} \sum_{j=1}^{N_W}
    W_1\left(  
        \sum_{x,x' \in {\widehat}{{{\mathfrak{X}}}}_n} R_{K_{{\widehat}{{{\mathfrak{X}}}}_n, {\widehat}{Q}_n}}(x,x') \delta_{(x,x')}, 
        \frac{1}{N_X} \sum_{i=1}^{N_X} \delta_{(X_{1,i}^{(j)}, X_{2,i}^{(j)})}
    \right).$$ The distance $W_1$ is computed using function `wasserstein` from R package `transport` [@Rpackage_transport; @R].  The results are displayed in Figure \[fig:mle\]. 

![ Wasserstein distance computed as in for $r=10$ (top), $r = 20$ (middle) and $r = 30$ (bottom).  Each dot is an estimated value with the maximum likelihood approach.  For each value of $r$, the mean value (squares) over all runs as well as the empirical standard deviation (bars) are displayed.[]{data-label="fig:mle"}](wass10.png "fig:"){width=".8\textwidth"} ![ Wasserstein distance computed as in for $r=10$ (top), $r = 20$ (middle) and $r = 30$ (bottom).  Each dot is an estimated value with the maximum likelihood approach.  For each value of $r$, the mean value (squares) over all runs as well as the empirical standard deviation (bars) are displayed.[]{data-label="fig:mle"}](wass20.png "fig:"){width=".8\textwidth"} ![ Wasserstein distance computed as in for $r=10$ (top), $r = 20$ (middle) and $r = 30$ (bottom).  Each dot is an estimated value with the maximum likelihood approach.  For each value of $r$, the mean value (squares) over all runs as well as the empirical standard deviation (bars) are displayed.[]{data-label="fig:mle"}](wass30.png "fig:"){width=".8\textwidth"}

    $n$             $r=10$                    $r=20$                    $r=30$
  -------- ------------------------- ------------------------- -------------------------
    5000    \[0.196; 0.327; 0.773\]   \[0.170; 0.312; 0.778\]   \[0.059; 0.304; 0.800\]
   10000    \[0.075; 0.182; 0.355\]   \[0.047; 0.169; 0.363\]   \[0.045; 0.184; 0.371\]
   20000    \[0.075; 0.097; 0.261\]   \[0.045; 0.082; 0.267\]   \[0.036; 0.079; 0.255\]
   50000    \[0.077; 0.098; 0.166\]   \[0.048; 0.077; 0.155\]   \[0.034; 0.074; 0.160\]
   100000   \[0.076; 0.103; 0.149\]   \[0.046; 0.091; 0.142\]   \[0.038; 0.084; 0.139\]
   200000   \[0.076; 0.087; 0.110\]   \[0.045; 0.065; 0.100\]   \[0.037; 0.062; 0.107\]

Discussion {#sec:discussion}
==========

In this paper, we proved that statistical learning of a Markov signal corrupted by additive noise is possible without any knowledge of the noise and with weak nonparametric assumptions on the distribution of the hidden variables.  We proposed estimation methods and proved consistency of the estimators under weak assumptions.  Establishing rates of convergence is a much more challenging task.  It would require to relate the limiting criterion to the risk of the estimator, namely to lower bound $M(\cdot)$ in section \[sec:least:squares\] for the least squares estimator, or the entropy rate ${{\mathbf{K}}}$ in section \[sec:proof:generaltheorem\] for the maximum likelihood estimator, to some risk on the kernel of the hidden process and some risk on the distribution of the noise.  In other words, the challenge is to get quantitative control in the inverse problem relating the kernel $K$ and the distribution $P$ to ${\mathbb{P}}_{K,P}$, in a similar way as Theorem 6 in [@MR3543517].  This can not be done as in usual deconvolution where one has prior knowledge on the noise distribution. 

As explained in Section \[sec:identifiability:general\], identifiability may be proved in other dependency settings.  In the context of at least $2$-dimensional observations, deconvolution is possible without any knowledge of the noise distribution if the signal to be recovered has dependent coordinates.  This is further developed in [@GLL].  In this work, rates are provided for the least squares estimator in the setting of independent and identically distributed observations. 

Proof of Theorem \[theoident1\], Theorem \[theoident2\] and Theorem \[theoconsi1\] {#sec:proof:ident1}
==================================================================================

Proof of Theorem \[theoident1\]
-------------------------------

The following result, which may be established by arguing variable by variable, is used repeatedly in this proof.  If a multivariate function is analytic on the whole multivariate complex space and is the null function in an open set of the multivariate real space or in an open set of the multivariate purely imaginary space, then it is the null function on the whole multivariate complex space. 

Assume that ${\mathbb{P}}_{{K},P}={\mathbb{P}}_{{\widetilde K},\widetilde P}$ and let $\phi$ (resp.  $\widetilde \phi$) be the characteristic function of ${P}$ (resp.  ${\widetilde{P}}$).  Notice that $\Phi_{R_K}(it_{1},it_{2})$ (resp.  $\Phi_{R_{{\widetilde}K}}(it_{1},it_{2})$) for real numbers numbers $t_{1}$ and $t_{2}$ defines the characteristic function of $(X_{1},X_{2})$ when the Markov chain has kernel $K$ (resp.  ${\widetilde}{K}$) and $\Phi_{R_K}(it,0)=\Phi_{R_K}(0,it)$ (resp.  $\Phi_{R_{{\widetilde}{K}}}(it,0)=\Phi_{R_K}(0,it)$) for real numbers $t$ defines the characteristic function of any $X_{i}$ when the Markov chain has kernel $K$ (resp.  ${\widetilde}{K}$).  Since the distribution of $Y_{1}$ and $Y_2$ are the same under ${\mathbb{P}}_{{K},P}$ and ${\mathbb{P}}_{{\widetilde K},\widetilde P}$, for any $t\in {\mathbb{R}}^{d}$, $$\label{chara1bis}
\phi\left(t\right)\Phi_{R_K}\left(it,0\right) = \widetilde{\phi}\left(t\right)\Phi_{R_{{\widetilde}K}}\left(it,0\right){\,}.$$ Since the distribution of $(Y_{1},Y_{2})$ is the same under ${\mathbb{P}}_{{K},P}$ and ${\mathbb{P}}_{{\widetilde K},\widetilde P}$, for any $(t_{1},t_{2})\in {\mathbb{R}}^{d}\times {\mathbb{R}}^{d}$, $$\label{chara3bis}
\phi\left(t_{1}\right)\phi\left(t_{2}\right)\Phi_{R_K}\left(it_{1},it_{2}\right)=\widetilde{\phi}\left(t_{1}\right)\widetilde{\phi}\left(t_{2}\right)\Phi_{R_{{\widetilde}K}}\left(it_{1},it_{2}\right){\,}.$$ There exists a neighborhood $V$ of $0$ in ${\mathbb{R}}^{d}\times {\mathbb{R}}^{d}$ such that for all $t=(t_{1},t_{2})\in V$, $\phi\left(t_{1}\right)\neq 0$, $\phi\left(t_{2}\right)\neq 0$, $\widetilde{\phi}\left(t_{1}\right)\neq 0$, $\widetilde{\phi}\left(t_{2}\right)\neq 0$, so that (\[chara1bis\]) and (\[chara3bis\]) imply that for any $ (t_{1},t_{2})\in V^{2}$, $$\Phi_{R_K}\left(it_{1},it_{2}\right)\Phi_{R_{{\widetilde}K}}\left(it_{1},0\right)\Phi_{R_{{\widetilde}K}}\left(it_{2},0\right)=\Phi_{R_{{\widetilde}K}}\left(it_{1},it_{2}\right)\Phi_{R_K}\left(it_{1},0\right)\Phi_{R_K}\left(it_{2},0\right){\,}.$$ Since $(z_1,z_2) \mapsto \Phi_{R_K}\left(z_1,z_2\right)\Phi_{R_{{\widetilde}K}}\left(z_1,0\right)\Phi_{R_{{\widetilde}K}}\left(z_2,0\right)-\Phi_{R_{{\widetilde}K}}\left(z_1,z_2\right)\Phi_{R_K}\left(z_1,0\right)\Phi_{R_K}\left(z_2,0\right)$ is a multivariate analytic function of $2d$ variables which is zero in a purely imaginary neighborhood of $0$, then it is the null function on the whole multivariate complex space so that for any $z_{1}\in{\mathbb{C}}^{d}$ and $z_{2}\in{\mathbb{C}}^{d}$, $$\label{analyticbis}
\Phi_{R_K}\left(z_{1},z_{2}\right)\Phi_{R_{{\widetilde}K}}\left(z_{1},0\right)\Phi_{R_{{\widetilde}K}}\left(z_{2},0\right)=\Phi_{R_{{\widetilde}K}}\left(z_{1},z_{2}\right)\Phi_{R_K}\left(z_{1},0\right)\Phi_{R_K}\left(z_{2},0\right)
{\,}.$$ Fix $(u_{2},\ldots,u_{d})\in {\mathbb{C}}^{d-1}$ and let ${{\mathsf{Z}}}$ be the set of zeros of $u \mapsto \Phi_{R_{K}}(u,u_{2},\ldots,u_{d},0)$ and $\widetilde{{{\mathsf{Z}}}}$ be the set of zeros of $u\mapsto\Phi_{R_{{\widetilde}K}}(u,u_{2},\ldots,u_{d},0)$. Let $u_{1}\in {{\mathsf{Z}}}$ and write $z_{1}=(u_{1},u_{2},\ldots,u_{d})$ so that by , for any $z_{2}\in{\mathbb{C}}^{d}$, $$\label{zerosbis}
\Phi_{R_K}\!\left(z_{1},z_{2}\right)\Phi_{R_{{\widetilde}K}}\!\left(z_{1},0\right)\Phi_{R_{{\widetilde}K}}\!\left(z_{2},0\right)=0\;\mathrm{and}\; \Phi_{R_K}\!\left(z_{2},z_{1}\right)\Phi_{R_{{\widetilde}K}}\!\left(z_{1},0\right)\Phi_{R_{{\widetilde}K}}\!\left(z_{2},0\right)=0
{\,}.$$ By assumption H\[assum::\], $z_2 \rightarrow \Phi_{R_K}\left(z_{1},z_{2}\right)$ is not the null function or $z_2 \rightarrow \Phi_{R_K}\left(z_{2},z_{1}\right)$ is not the null function.  Assume without loss of generality that $z_2 \rightarrow \Phi_{R_K}\left(z_{1},z_{2}\right)$ is not the null function (the proof follows the same steps in the other case).  Then, there exists $z_{2}^{\star}$ in ${\mathbb{C}}^{d}$ such that $\Phi_{R_K}\left(z_{1},z_{2}^{\star}\right)\neq 0$ and by continuity, there exists an open neighborhood of $z_{2}^{\star}$ such that for all $z_{2}$ in this open set, $\Phi_{R_K}\left(z_{1},z_{2}\right)\neq 0$. Since $z\mapsto \Phi_{R_{{\widetilde}K}}\left(z,0\right)$ is not the null function and is analytic on ${\mathbb{C}}^{d
}$, it can not be null all over this open set, so that there exists $z_{2}$ such that simultaneously $\Phi_{R_K}\left(z_{1},z_{2}\right)\neq 0$ and $\Phi_{R_{{\widetilde}K}}\left(z_{2},0\right)\neq 0$. Then (\[zerosbis\]) leads to $\Phi_{R_{{\widetilde}K}}\left(z_{1},0\right)=0$, so that ${{\mathsf{Z}}}\subset \widetilde{{{\mathsf{Z}}}}$. A symmetric argument yields $\widetilde{{{\mathsf{Z}}}}\subset {{\mathsf{Z}}}$ so that ${{\mathsf{Z}}}= \widetilde{{{\mathsf{Z}}}}$.

Moreover, the analytic functions $u\mapsto \Phi_{R_K}(u,u_{2},\ldots,u_{d},0)$ and $u\mapsto \Phi_{R_{{\widetilde}K}}(u,u_{2},\ldots,u_{d},0)$ have exponential growth order less than $2$, so that using Hadamard’s factorization Theorem, see [@Stein:complex Chapter 5, Theorem 5.1], there exists a polynomial function $s$ with degree at most $1$ (and with coefficients depending on $(u_{2},\ldots,u_{d})$) such that for all $u\in{\mathbb{C}}$, $$\Phi_{R_K}(u,u_{2},\ldots,u_{d},0) = {\mathrm{e}}^{s(u)}\Phi_{R_{{\widetilde}K}}(u,u_{2},\ldots,u_{d},0){\,}.$$ Arguing similarly for all variables, we get that there exists a function $S$ on ${\mathbb{C}}^{d}$ which is, for any $i=1,\ldots,d$, polynomial with degree at most $1$ in $u_i$, and such that for all $(u_{1},\ldots,u_{d})\in{\mathbb{C}}^{d}$, $$\label{eq:phi:exp}
\Phi_{R_K}(u_{1},u_{2},\ldots,u_{d},0) = {\mathrm{e}}^{S(u_{1},u_{2},\ldots,u_{d})}\Phi_{R_{{\widetilde}K}}(u_{1},u_{2},\ldots,u_{d},0){\,}.$$ In other words, there exists complex functions $a_{i}$, $b_{i}$ on ${\mathbb{C}}^{d-1}$ such that, if we denote $u^{(-i)}$ the $(d-1)$-dimensional complex vectors with the same coordinates as $u$ except that $u_i$ is not included in the coordinates, then $$S(u_{1},u_{2},\ldots,u_{d})=a_{i}(u^{(-i)})u_{i}+b_{i}(u^{(-i)}),\;i=1,\ldots,d.$$ But, for $i\neq j$, the fact that $a_{i}(u^{(-i)})u_{i}+b_{i}(u^{(-i)})=a_{j}(u^{(-j)})u_{j}+b_{i}(u^{(-j)})$ implies that $a_{i}(u^{(-i)})$ and $b_{i}(u^{(-i)})$ are polynomial functions with degree at most $1$ in $u_j$ (this may be seen for instance by taking complex derivatives), and by induction we get that $S$ is a polynomial function which is, for any $i=1,\ldots,d$ polynomial with degree at most $1$ in $u_i$.

Since $\Phi_{R_K}(0,\ldots,0)=\Phi_{R_{{\widetilde}K}}(0,\ldots,0)=1$, the constant term of the polynomial $S$ is $0$. Assume that $\mu_{{\widetilde}{K}}$ is not supported by $0$. Then there exist $a=(a_{1},\ldots,a_{d})\in{\mathbb{R}}^{d}$, $\alpha>0$ and $\delta >0$ such that $$0 \notin \prod_{j=1}^{d} [a_{j}-\alpha,a_{j}+\alpha] \quad\mathrm{and}\quad
\mu_{{\widetilde}{K}}\left(\prod_{j=1}^{d} [a_{j}-\alpha,a_{j}+\alpha]
\right){\geqslant}\delta{\,},$$ which gives, for all $u\in{\mathbb{R}}^{d}$, $$\Phi_{R_{{\widetilde}K}}(u,0) {\geqslant}\delta {\mathrm{e}}^{ \sum_{j=1}^{d}\inf_{x_{j} \in [a_{j}-\alpha,a_{j}+\alpha]}u_{j}x_{j}}{\,},$$ so that using (\[eq:phi:exp\]), for all $u\in{\mathbb{R}}^{d}$, $$\Phi_{R_{K}}(u,0) {\geqslant}\delta {\mathrm{e}}^{S(u)} {\mathrm{e}}^{ \sum_{j=1}^{d}\inf_{x_{j} \in [a_{j}-\alpha,a_{j}+\alpha]}u_{j}x_{j}}{\,}.$$ If $S$ has degree at least $2$, then there exist $i\neq j$ and polynomial functions with degree at most one in each variable $c_{1}$ on ${\mathbb{C}}^{d-2}$ and $c_{2}$, $c_{3}$ on ${\mathbb{C}}^{d-1}$ such that, if we denote $u^{(-i,-j)}$ the $(d-2)$-dimensional complex vectors with the same coordinates as $u$ except that $u_i$ and $u_{j}$ are not included in the coordinates, then $S(u)=c_{1}(u^{(-i;-j)})u_{i}u_{j} + c_{2}(u^{(-i)}) + c_{3}(u^{(-j)}) $.  Without loss of generality say that $i=1$ and $j=2$. Then it is possible to find $u\in {\mathbb{R}}^{d}$ and ${\widetilde}{\delta}>0$ such that for all $t{\geqslant}0$, $S(tu_{1},tu_{2},u_{3},\ldots,u_{d}){\geqslant}{\widetilde}{\delta} t(u_{1}^2+u_{2}^{2})$ leading to $$\forall t{\geqslant}0,\; \Phi_{R_{K}}(tu_{1},tu_{2},u_{3},\ldots,u_{d},0) {\geqslant}\delta{\mathrm{e}}^{{\widetilde}{\delta} t(u_{1}^2+u_{2}^{2})} {\mathrm{e}}^{ \sum_{j=1}^{d}\inf_{x_{j} \in [a_{j}-\alpha,a_{j}+\alpha]}u_{j}x_{j}}{\,},$$ contradicting the assumption that $\mu_{ K} \in {\mathcal{M}}_{\rho}$ for some $\rho <2$. Thus, $S$ has degree at most $1$ and there exists $m\in {\mathbb{C}}^{d}$ such that for all $z\in{\mathbb{C}}^{d}$, $$\label{idem}
\Phi_{R_K}(z,0)={\mathrm{e}}^{m^{T}z}\Phi_{R_{{\widetilde}K}}(z,0){\,}.$$ As for all $z\in{\mathbb{R}}^{d}$, $\Phi_{R_K}(-iz,0)=\overline{\Phi_{R_K}(iz,0)}$ and $\Phi_{R_{{\widetilde}K}}(-iz,0)=\overline{\Phi_{R_{{\widetilde}K}}(iz,0)}$, then $m\in{\mathbb{R}}^{d}$. Combining (\[idem\]) with (\[analyticbis\]) yields, for all $ (t_{1},t_{2})\in {\mathbb{R}}^{d}\times{\mathbb{R}}^{d}$, $$\label{ident1m}
\Phi_{R_K}(it_{1},it_{2})=e^{im^{T}t_{1}+im^{T}t_{2}}\Phi_{R_{{\widetilde}K}}(it_{1},it_{2}){\,}.$$ Then, using (\[chara1bis\]), for all $t\in {\mathbb{R}}^{d}$ such that $\Phi_{R_K}(it,0)\neq 0$, $\phi(t)={\mathrm{e}}^{-im^{T}t}\widetilde{\phi}(t)$. Since the set of zeros of $t\mapsto \Phi_{R_K}(it,0)$ has empty interior, for each $t$ such that $\Phi_{R_K}(it,0)= 0$ it is possible to find a sequence $(t_{n})_{n{\geqslant}1}$ such that $t_{n}$ tends to $t$ and for all $n$, $\Phi_{R_K}(it_{n},0)\neq 0$. But $\phi$ and $\widetilde{\phi}$ are continuous functions, so that for all $t\in{\mathbb{R}}$, $$\label{ident2m}
\phi(t)={\mathrm{e}}^{-im^{T}t}{\widetilde}{\phi}(t){\,}.$$ The proof is concluded by noting that (\[ident1m\]) and (\[ident2m\]) imply that $R_K=R_{{\widetilde}K}$ and $P={\widetilde}{P}$ up to translation. 

Proof of Theorem \[theoident2\] {#sec:proof:ident2}
-------------------------------

Following the same steps as in the proof of Theorem \[theoident1\], there exists a polynomial $S$ with real coefficients and degree at most $2$ such that, for all $z\in{\mathbb{C}}$, $
\Phi_{R_K}(z,0)={\mathrm{e}}^{S(z)}\Phi_{R_{\widetilde K}}(z,0){\,},
$ and for all $(z_{1},z_{2})\in {\mathbb{C}}\times {\mathbb{C}}$, $$\label{eq:rho2}
\Phi_{R_K}(z_{1},z_{2})=e^{S(z_{1})}e^{S(z_{2})}\Phi_{R_{\widetilde K}}(z_{1},z_{2}){\,}.$$ Assume that $S$ has degree equal to $2$. Then, there exist real numbers $a$, $b$, $c$ such that for all $z\in{\mathbb{C}}$, $S(z)=az^{2}+bz+c$. With no loss of generality assume that $a>0$ (otherwise, replace $K$ by $\widetilde K$).  Then, (\[eq:rho2\]) means that there exist independent and identically distributed Gaussian variables $\eta_{i}$, with variance $2a$, such that, if $(X_{i})_{i{\geqslant}1}$ is a stationary Markov chain with transition kernel $K$ and $({\widetilde}{X}_{i})_{i{\geqslant}1}$ is a stationary Markov chain with transition kernel $\widetilde K$, $(X_{i})_{i{\geqslant}1}$ has the same distribution as $({\widetilde}{X}_{i}+\eta_{i})_{i{\geqslant}1}$, with $\eta_{i}$, $i{\geqslant}1$, independent of $({\widetilde}{X}_{i})_{i{\geqslant}1}$. Using Lemma \[lem:gaussMarkov\], this implies that the random variables $(X_{i})_{i{\geqslant}1}$ are independent and identically distributed.  If $z\mapsto\Phi_{R_K}(z,0)$ has no zeros, then it has the same set of zeros as the constant function equal to one (corresponding to deterministic independent variables equal to $0$), so that using Hadamard’s Theorem, since $\mu_{K}\in {\mathcal{M}}_{\rho}$ with $\rho<3$, then there exists a polynomial with degree at most $2$ such that $\Phi_{R_K}(z,0)$ is the exponential of that polynomial, so that $(X_{i})_{i{\geqslant}1}$ is a sequence of independent Gaussian variables, contradicting the assumption of Theorem \[theoident2\].  But for all $(z_{1},z_{2})\in{\mathbb{C}}^{d}\times {\mathbb{C}}^{d}$, $\Phi_{R_K}(z_{1},z_{2})=\Phi_{R_K}(z_{1},0)\Phi_{R_K}(0,z_{2})$. Thus if $z\mapsto\Phi_{R_K}(z,0)$ has at least one zero $z_{0}$, then $\Phi_{R_K}(z_{0},z)=0$ and $\Phi_{R_K}(z,z_{0})=0$ for all $z\in{\mathbb{C}}$, contradicting assumption H\[assum::\] in Theorem \[theoident2\].  Then we may conclude that $S$ has degree at most $1$, and the end of the proof of Theorem \[theoident2\] follows the same steps as the proof of Theorem \[theoident1\]. 

Proof of Lemma \[lem:gaussMarkov\]
----------------------------------

For all $x\in{\mathbb{R}}$, let $x'\mapsto q(x,x')$ be the density of the transition kernel of the Markov chain $(X_{i})_{i{\geqslant}1}$ with respect to the Lebesgue measure and $\mu$ be its stationary density.  Denote $m$ the mean and $\sigma^{2}$ the variance of $\eta_{1}$, and let $\phi$ be the density of $\eta_{1}$ .  Denote by $g_{1}$ the density of $X_{i}+\eta_{i}$, $g_{2}$ the density of $(X_{i}+\eta_{i}, X_{i+1}+\eta_{i+1})$, $g_{3}$ the density of $(X_{i}+\eta_{i}, X_{i+1}+\eta_{i+1}, X_{i+2}+\eta_{i+2})$ for any $i{\geqslant}1$. The fact that $(X_{i}+\eta_{i})_{i{\geqslant}1}$ is a Markov chain implies that the conditional distribution of $X_{3}+\eta_{3}$, conditionally to $(X_{2}+\eta_{2},X_{1}+\eta_{1})$, equals the conditional distribution of $X_{3}+\eta_{3}$, conditionally to $X_{2}+\eta_{2}$ alone, that is for all real numbers $y_{1}, y_{2}, y_{3}$, $$g_{3}(y_{1},y_{2},y_{3})g_{1}(y_{2})=g_{2}(y_{1},y_{2})g_{2}(y_{2},y_{3}).$$ This rewrites as follows.  For all real numbers $y_{1}, y_{2}, y_{3}$, $$\begin{gathered}
\!\int\!  \mu(x_{1})q (x_{1},x_{2})\phi (y_{1}-x_{1})\phi (y_{2}-x_{2})q(x_{2},x_{3})\phi (y_{3}-x_{3}){\mathrm{d}}x_{1}{\mathrm{d}}x_{2}{\mathrm{d}}x_{3} \!\int\!  \mu(x_{4})\phi (y_{2}-x_{4}){\mathrm{d}}x_{4}
\\
= \!\int\!  \mu(x_{1})q (x_{1},x_{2})\phi (y_{1}-x_{1})\phi (y_{2}-x_{2}){\mathrm{d}}x_{1}{\mathrm{d}}x_{2} \!\int\!  \mu(x_{4})q (x_{4},x_{3})\phi (y_{3}-x_{3})\phi (y_{2}-x_{4}){\mathrm{d}}x_{3}{\mathrm{d}}x_{4}. 
$$ But for all real numbers $x$ and $y$, $\phi (y-x)=\phi (x-y-2m)$. Since $y$ is a complete statistic for $\phi(x-y-2m) {\mathrm{d}}x$, this implies that for all real numbers $x_{1}, x_{3}, y_{2}$, $$\label{multigauss2}
\int \mu(x_{1})q (x_{1},x_{2})\mu (x_{4})[q (x_{2},x_{3})-q (x_{4},x_{3})]\phi (y_{2}-x_{2})\phi (y_{2}-x_{4}){\mathrm{d}}x_{2}{\mathrm{d}}x_{4}=0{\,}.$$ Using that $\phi (y_{2}-x_{2})\phi (y_{2}-x_{4})=\phi (\sqrt{2}[y_{2}-(x_{2}+x_{4})/2)]) \phi ((x_{2}-x_{4}+m)/\sqrt{2})$, (\[multigauss2\]) implies that for all real numbers $x_{1}, x_{3}$, $u$, $$\label{multigauss3}
\int \mu(x_{1})q \left(x_{1},\frac{u+v}{2}\right)\mu \left(\frac{u-v}{2}\right)\left[q \left(\frac{u+v}{2},x_{3}\right)-q \left(\frac{u-v}{2},x_{3}\right)\right]\phi ((v+m)/\sqrt{2}){\mathrm{d}}v=0{\,}.$$ Let $H:{\mathbb{R}}^{3}\longrightarrow {\mathbb{R}}$ be any measurable and positive function.  Define the measurable and positive function $G: (x,y,z)\mapsto H(x,y,z)\phi ((x-y+2m)/2\sqrt{2})$. Then by multiplying (\[multigauss3\]) by $H((u+v)/2, (u-v)/2, x_{3})$ and integrating over $x_{1}, x_{3}$, $u$, we get by change of variable that $$\begin{gathered}
\int \mu(x_{1})q (x_{1},x_{2})q (x_{2},x_{3})\mu (x_{4})G(x_{2},x_{4},x_{3}){\mathrm{d}}x_{1}{\mathrm{d}}x_{2}{\mathrm{d}}x_{3}{\mathrm{d}}x_{4}\\=
\int \mu(x_{1})q (x_{1},x_{2})\mu (x_{4})q (x_{4},x_{3})G(x_{2},x_{4},x_{3}){\mathrm{d}}x_{1}{\mathrm{d}}x_{2}{\mathrm{d}}x_{3}{\mathrm{d}}x_{4}{\,}.\label{multigauss4}\end{gathered}$$ Let now $({\widetilde}{X}_{i})_{i{\geqslant}1}$ be a Markov chain with the same distribution of $(X_{i})_{i{\geqslant}1}$ but independent of $(X_{i})_{i{\geqslant}1}$. Since the correspondance $G \leftrightarrow H$ between measurable positive functions is one-to-one, (\[multigauss4\]) means that for any measurable and positive function $G$, $
{\mathbb{E}}\left[ G\left(X_{2},{\widetilde}{X}_{2},X_{3}\right)\right]= {\mathbb{E}}\left[ G\left(X_{2},{\widetilde}{X}_{2},{\widetilde}{X}_{3}\right)\right]{\,},
$ which means that $(X_{2},{\widetilde}{X}_{2},X_{3})$ and $(X_{2},{\widetilde}{X}_{2},{\widetilde}{X}_{3})$ have the same distribution.  But this implies that $X_{2}$ is independent of $({\widetilde}{X}_{2},X_{3})$ which implies that $X_{2}$ is independent of $X_{3}$.

Proof of Theorem \[theoconsi1\]
-------------------------------

Using the fact that characteristic functions are bounded by $1$, for all $R\in {{\mathcal{R}}}$, $$\label{ineqMn}
\left \vert M_{n}(R)-M(R) \right\vert {\leqslant}\frac{3}{\sqrt{n} }\sup_{(t_{1},t_{2})\in {{\mathcal{S}}}} | Z_{n}(t_{1},t_{2}) | + \frac{1}{n }\sup_{(t_{1},t_{2})\in {{\mathcal{S}}}} | Z_{n}(t_{1},t_{2}) | ^{2}{\,},$$ and using the assumption on $Z_{n}$, $\sup_{R\in {{\mathcal{R}}}}\vert M_{n}(R)-M(R)\vert = O_{{\mathbb{P}}^{\star}}(n^{-1/2})$. Now, using the definition of $\widehat{R}_{n}$ and (\[ineqMn\]), $
M(\widehat{R}_{n}){\leqslant}M_{n}(\widehat{R}_{n})+O_{{\mathbb{P}}^{\star}}(n^{-1/2})
{\leqslant}M_{n}(R^{\star})+O_{{\mathbb{P}}^{\star}}(n^{-1/2})
{\leqslant}M(R^{\star})+O_{{\mathbb{P}}^{\star}}(n^{-1/2}){\,}. 
$ $M(\widehat{R}_{n})$ is then upper bounded by a term of order $O_{{\mathbb{P}}^{\star}}(n^{-1/2})$ since $M(R^{\star})=0$, and the first assertion of Theorem \[theoconsi1\] is proved.  Now, $R\mapsto M(R)$ is continuous for the weak convergence topology, and for any $\epsilon >0$, $\sup_{R\in {{\mathcal{R}}}, d(R,R^{\star}){\geqslant}\epsilon} M(R)$ is attained by compactness of $\{R\in {{\mathcal{R}}}, d(R,R^{\star}){\geqslant}\epsilon\}$, and positive since $M(R)=0$ if and only if $R=R^{\star}$ up to translation.  Thus using Theorem 5.7 in [@MR1652247], the set of limiting values of $(\widehat{R}_{n})_{n{\geqslant}1}$ for the weak convergence topology is the set of $R\in {{\mathcal{R}}}$ such that $R=R^{\star}$ up to translation. 

Proof of Theorem \[theoconsi2\] {#sec:proof:mle}
===============================

General statement
-----------------

This section provides in Theorem \[theoconsi\_mle\_general\] a more general statement of the result claimed in Theorem \[theoconsi2\].  It extends the class of emission densities $\Gamma$ and the models $(G_D)_D$ considered beyond mixtures of Gaussian distributions, but does not change the modelling of the state space.  The proof of Theorem \[theoconsi\_mle\_general\] is postponed to Section \[sec:proof:generaltheorem\]. 

Let $\Gamma$ be a set of probability densities on ${\mathbb{R}}^d$ that satisfies the following assumption. 

\[hyp\_densiteEmission\] $\Gamma$ is a set of continuous and positive probability densities that admit a first order moment and are centered in the sense that for all $\gamma \in \Gamma$, $$\label{eq_centering}
\int_{{\mathbb{R}}^d} y \gamma(y) {\mathrm{d}}y = 0{\,}.$$ $\Gamma$ is a compact subset of ${{\mathbf{L}}}^1({\mathbb{R}}^d)$ and the envelope function $$b : y \in {\mathbb{R}}^d \longmapsto \sup_{\gamma \in \Gamma} \sup_{x \in \Lambda} \max( \gamma(y-x), \gamma(x-y) )$$ satisfies $b \in {{\mathbf{L}}}^1({\mathbb{R}}^d) \cap {{\mathbf{L}}}^\infty({\mathbb{R}}^d)$, admits a first order moment, and there exists a constant $C_\Gamma > 0$ such that for all $\gamma \in \Gamma$ and $y \in {\mathbb{R}}^d$, the mapping $x \in \Lambda \longmapsto \gamma(y-x) / b(y)$ is $C_\Gamma$-Lipschitz.  Finally, $\gamma^{\star}\in \Gamma$.

The centering assumption  allows to fix the translation parameter in the identifiability results. 

Let $f$ be a bounded and positive probability density on ${\mathbb{R}}^d$ that admits a first order moment and is centered.  Assume that there exists $\epsilon > 0$ such that $$\underset{\|\mu\|_2 {\leqslant}\epsilon, \  \|\Sigma - {{\text{Id}}}_d\|_F {\leqslant}\epsilon}{\sup_{(\mu, \Sigma) \in {\mathbb{R}}^d \times GL_d({\mathbb{R}})}}
        f(\Sigma(\cdot - \mu))
    \in {{\mathbf{L}}}^1({\mathbb{R}}^d)$$ and let $\Theta$ be a compact subset of ${\mathbb{R}}^d \times GL_d({\mathbb{R}})$. Finally, assume that there exists a function $D_f$ such that for all $y,y' \in {\mathbb{R}}^d$, $|f(y) - f(y')| {\leqslant}D_f(y) |y-y'|$ and such that $(D_f/f) \in {{\mathbf{L}}}^\infty({\mathbb{R}}^d)$. Then the set of translation-scale mixtures of $f$ with parameters in $\Theta$ $$\Gamma = \left\{ \gamma : y \longmapsto \int_\Theta |\det(\Sigma)| f\left( \Sigma(y-\mu) \right) {\mathrm{d}}p(\mu,\Sigma) : p \in {{\mathcal{P}}}(\Theta), \int_\Theta \mu {\mathrm{d}}p(\mu, \Sigma) = 0 \right\}$$ satisfies H\[hyp\_densiteEmission\]. 

\[hyp\_tails\] $\Gamma$ satisfies H\[hyp\_densiteEmission\] with the envelope function $b$. Let $m$ be the lower envelope function of $\Gamma$ defined by $$m : y \in {\mathbb{R}}^d \longmapsto \inf_{\gamma \in \Gamma} \inf_{x \in \Lambda} \gamma(y-x).$$ There exists $\epsilon > 0$ such that $\int b(y) [b(y)/m(y)]^\epsilon {\mathrm{d}}y < \infty$.

The set $\Gamma$ of Gaussian location-scale mixtures of Section \[sec:mle\] satisfies H\[hyp\_densiteEmission\] and H\[hyp\_tails\]. 

Then, consider $(G_D)_{D {\geqslant}1}$ a family of subsets of $\Gamma$. The following assumption essentially means that each $G_D$ is a parametric model with dimension $D$.

\[hyp\_modelesParam\] $\Gamma$ satisfies H\[hyp\_densiteEmission\] and H\[hyp\_tails\] with the functions $b$ and $m$, the set $\bigcup_{D {\geqslant}1} G_D$ is dense in $\Gamma$ with respect to the ${{\mathbf{L}}}^1$ norm, and there exists a constant ${\widetilde}c > 0$, a mapping $(D,A) \in {\mathbb{N}}^* \times {\mathbb{R}}_+ \longmapsto c(D,A)$ and an increasing mapping $D \longmapsto \dim_D$ such that the following holds. 

-   For all $D {\geqslant}1$ and $A {\geqslant}0$, $\log c(D,A) {\leqslant}{\widetilde}c (\log \dim_D + A)$.

-   For all $D {\geqslant}1$, there exists a surjective application $\theta \in \Theta_D \subset [-1,1]^{\dim_D} \longmapsto \gamma^\theta \in G_D$ such that for all $x \in \Lambda$, $A {\geqslant}0$ and $y \in {\mathbb{R}}^d$ such that $\log (b(y)/m(y)) {\leqslant}A$, the mapping $
    \theta \in \Theta_D \longmapsto \gamma^\theta(y - x) / b(y)
    $ is $c(D,A)$-Lipschitz (with $\Theta_D$ endowed with the supremum norm). 

The exact value of ${\widetilde}c$ only matters for the constants in the penalty. 

The family $(G_D)_{D {\geqslant}1}$ of finite Gaussian translation-scale mixtures defined in Section \[sec:mle\] satisfies H\[hyp\_modelesParam\] with $\dim_D = D(d^2 + d) + D-1$ for all $D\geqslant 1$.

Define the sets $({{\mathbf{S}}}_{r,D})_{r {\geqslant}1, D {\geqslant}1}$, the models $(S_{r,D,n})_{r,D,n}$ and their maximum likelihood estimators $({\widehat}{{{\mathfrak{X}}}}_{r,D,n},{\widehat}{Q}_{r,D,n},{\widehat}{\gamma}_{r,D,n})$ as in Section \[sec:mle\].  Then, select the number of states and the model dimension using the penalized likelihood.  Let ${\mathrm{pen}}(n,r,D)$ be a penalty function such that ${\mathrm{pen}}(n,r,D) \underset{n \rightarrow +\infty}{\longrightarrow} 0$ for all $r$ and $D$ and such that there exists a sequence $(u_n)_{n {\geqslant}1}$ satisfying $u_n \underset{n \rightarrow \infty}{\longrightarrow} +\infty$ and for all $n$, $r$, $D$, $${\mathrm{pen}}(n,r,D) {\geqslant}u_n (\dim_D + rd + r^2 - 1) \frac{(\log n)^{14} \log \log n}{n}{\,}.$$ For instance, for any constant $\text{cst} > 0$, this inequality holds by choosing ${\mathrm{pen}}: (n,r,D) \longmapsto ({\text{cst} \cdot \dim_D} + r^2) \frac{(\log n)^{15}}{n}$. Let $$({\widehat}{r}_n, {\widehat}{D}_n) \in \operatorname*{arg\,max}_{r {\leqslant}\log n, D \text{ s.t. }  \dim_D {\leqslant}n}
    \left( \frac{1}{n} \ell_n({\widehat}{{{\mathfrak{X}}}}_{r,D,n},{\widehat}{Q}_{r,D,n},{\widehat}{\gamma}_{r,D,n}) - {\mathrm{pen}}(n,r,D) \right)$$ and define the final estimators $
({\widehat}{{{\mathfrak{X}}}}_n, {\widehat}{Q}_n, {\widehat}{\gamma}_n) = ({\widehat}{{{\mathfrak{X}}}}_{{\widehat}{r}_n, {\widehat}{D}_n, n}, {\widehat}{Q}_{{\widehat}{r}_n, {\widehat}{D}_n, n}, {\widehat}{\gamma}_{{\widehat}{r}_n, {\widehat}{D}_n, n}){\,}. 
$

\[theoconsi\_mle\_general\] Assume that assumptions H\[assum::\], H\[hyp\_transitionKernel\], H\[hyp\_densiteEmission\], H\[hyp\_tails\] and H\[hyp\_modelesParam\] hold.  Let $\lambda^\star$ be the measure defined in assumption H\[hyp\_transitionKernel\].  Then, almost surely $$\sup_{x \in {{\text{Supp}}}(\lambda^\star)} W_1(K_{{\widehat}{{{\mathfrak{X}}}}_n,{\widehat}{Q}_n}(x,\cdot),K^{\star}(x, \cdot)) \underset{n \rightarrow \infty}{\longrightarrow} 0$$ and $
\| {\widehat}{\gamma}_n - \gamma^\star \|_1 \underset{n \rightarrow \infty}{\longrightarrow} 0
$.  In particular, almost surely under ${\mathbb{P}}^\star$, for all $x \in {{\text{Supp}}}(\lambda^\star)$, $
{ K_{{\widehat}{{{\mathfrak{X}}}}_n,{\widehat}{Q}_n}(x,\cdot) \longrightarrow K^{\star}(x, \cdot) }
$ for the weak convergence topology and if ${\mathbb{P}}^X_{K}$ denotes the distribution of the stationary Markov chain with transition kernel $K$, $
{ {\mathbb{P}}^X_{K_{{\widehat}{{{\mathfrak{X}}}}_n,{\widehat}{Q}_n}} \longrightarrow{\mathbb{P}}^X_{K^{\star}} }
$ for the weak convergence topology. 

The remaining sections of this paper are dedicated to the proof of Theorem \[theoconsi\_mle\_general\]. 

Proof of Theorem \[theoconsi\_mle\_general\] {#sec:proof:generaltheorem}
--------------------------------------------

This section states a few intermediate results whose proofs are postponed to the following sections.  These results are followed by the proof of Theorem \[theoconsi\_mle\_general\], the consistency of the maximum likelihood estimator, which is the main result of this appendix.  Let $\Omega_\omega^C$ be the set of transition kernels $K$ on $\Lambda$ which admit the modulus of continuity $\omega$ with respect to the Wasserstein 1 metric and such that there exists a probability measure $\lambda$ (which may depend on $K$) such that for all $x \in \Lambda$, $K(x,\cdot)$ is absolutely continuous with respect to $\lambda$ with a density taking values in $[1/C,C]$. The kernel $K^\star$ as well as all kernels considered in the models $S_{r,D}$ belong to $\Omega_\omega^C$.

\[lem\_compactness\] Assume that $\Omega_\omega^C$ is endowed with the topology of the uniform convergence on the set of continuous functions with values in $({{\mathcal{P}}}(\Lambda), W_1)$, and $\Gamma$ is endowed with the ${{\mathbf{L}}}_1$ topology.  Then $\Omega_\omega^C \times \Gamma$ endowed with the product topology is compact. 

For all probability measures $\mu$ and $\nu$, the Kullback Leibler divergence between $\mu$ and $\nu$ is defined by $$KL(\mu \| \nu) = \begin{cases}
\int \log \frac{\text{d} \mu}{\text{d} \nu} \text{d}\mu &\text{when $\mu$ is absolutely continuous with respect to $\nu$}, \\
+\infty &\text{otherwise}. 
\end{cases}$$

\[lem\_KL\_equivalent\_VT\] Let $(K_n, \gamma_n)_{n {\geqslant}1} \in (\Omega_\omega^C \times \Gamma)^{{\mathbb{N}}^*}$. For all $n {\geqslant}1$, the quantity $
{{\mathbf{K}}}({\mathbb{P}}_{K^\star,\gamma^\star} \| {\mathbb{P}}_{K_n,\gamma_n})
    = \lim_{m \rightarrow +\infty} \frac{1}{m} KL({\mathbb{P}}^{(m)}_{K^\star,\gamma^\star} \| {\mathbb{P}}^{(m)}_{K_n,\gamma_n})
$ exists and is finite, and the following two statements are equivalent. 

1.   ${{\mathbf{K}}}({\mathbb{P}}_{K^\star,\gamma^\star} \| {\mathbb{P}}_{K_n,\gamma_n}) \underset{n \rightarrow \infty}{\longrightarrow} 0$.

2.   For all $k {\geqslant}1$, $d_{TV}({\mathbb{P}}^{(k)}_{K^\star,\gamma^\star}, {\mathbb{P}}^{(k)}_{K_n,\gamma_n}) \underset{n \rightarrow \infty}{\longrightarrow} 0$.

The consistency of the maximum likelihood estimator relies on the following oracle inequality, which follows from [@lehericy2018misspe Theorem 8].  It is proved in detail in Section \[sec\_full\_oracle\_inequality\] how Proposition \[prop\_oracle\_simplifie\] is deduced from [@lehericy2018misspe Theorem 8] in the setting of this paper. 

\[prop\_oracle\_simplifie\] For each $r, D$ and $n$, let $S_{r,D,n}$ and $({\widehat}{{{\mathfrak{X}}}}_{n}, {\widehat}{Q}_{n}, {\widehat}{\gamma}_{n})$ be defined as in Section \[sec:mle\].  There exist constants $C_{\mathrm{pen}}$, $A$ and $n_0$ such that the following holds.  Assume that the penalty satisfies ${\mathrm{pen}}(n,r,D) {\geqslant}C_{\mathrm{pen}}(\dim_D + rd + r^2 - 1) \log(n)^{14} / n$ for all $n {\geqslant}n_0$, $r$ and $D$. Then, for all $n {\geqslant}n_0$, with probability at least $1 - 3n^{-2}$, $$\begin{gathered}
{{\mathbf{K}}}({\mathbb{P}}_{K^\star,\gamma^\star} \| {\mathbb{P}}_{{\widehat}{{{\mathfrak{X}}}}_n, {\widehat}{Q}_n, {\widehat}{\gamma}_n})
    \\ {\leqslant}2 \inf_{r {\leqslant}\log n, D \text{ s.t.}  \dim_D {\leqslant}n} \left( 
        \inf_{({{\mathcal{X}}}, Q, \gamma) \in S_{r,D}} {{\mathbf{K}}}({\mathbb{P}}_{K^\star,\gamma^\star} \| {\mathbb{P}}_{{{\mathfrak{X}}}, Q, \gamma})
        + 2{\mathrm{pen}}(n,r,D)
    \right) 
    + A \frac{(\log n)^9}{n}{\,}.\end{gathered}$$

\[lem\_VT\_continue\] Let $(K_n, \gamma_n)_{n {\geqslant}1} \in (\Omega_\omega^C \times \Gamma)^{{\mathbb{N}}^*}$ be a sequence that converges to $(K,\gamma)$. Then, for all $k {\geqslant}1$, $d_{TV}({\mathbb{P}}^{(k)}_{K,\gamma}, {\mathbb{P}}^{(k)}_{K_n,\gamma_n}) \underset{n \rightarrow \infty}{\longrightarrow} 0$.

\[lem\_approx\_noyau\_existe\] There exists a sequence $({{\mathfrak{X}}}_t, Q_t, \gamma_t)_{t {\geqslant}1}$ taking values in $\bigcup_{r {\geqslant}1, D {\geqslant}1} {{\mathbf{S}}}_{r,D}$ such that ${{\mathbf{K}}}({\mathbb{P}}_{K^\star,\gamma^\star} \| {\mathbb{P}}_{{{\mathfrak{X}}}_t,Q_t,\gamma_t}) \underset{t \rightarrow \infty}{\longrightarrow} 0$ and $R_{K_{{{\mathfrak{X}}}_t,Q_t}} \underset{t \rightarrow \infty}{\longrightarrow} R_{K^\star}$ in distribution. 

Let us now discuss the choice of ${\Xi}'$, $({\Xi}_n)_n$ and $\underline{\varphi}$ in equation .  Let ${\Xi}'$ be a positive real number.  $({\Xi}_n)_n$ and $\underline{\varphi}$ are chosen such that there exists sequences $r_n, t_n \rightarrow +\infty$ with $r_n {\leqslant}\log n$ for $n$ large enough such that $({{\mathfrak{X}}}_{t_n}, Q_{t_n}, \gamma_{t_n}) \in S_{r_n,D,n}$ for all $n$ (the choice of $D$ does not matter since $(\gamma_t)_t$ can be replaced by any sequence that converges to $\gamma^\star$).  Let us show that such a choice is possible.  Let $t_n \rightarrow \infty$ and $(r_n)_n$ be such that $r_n {\leqslant}\log n$ and $({{\mathfrak{X}}}_{t_n},Q_{t_n},\gamma_{t_n}) \in \bigcup_{D {\geqslant}1} {{\mathbf{S}}}_{r_n,D}$ for all $n$ large enough.  With the notation ${{\mathcal{M}}}_{\rho,d'}(A,B)$ defined in Section \[sec:least:squares\], the sequence $(R_{K_{{{\mathfrak{X}}}_t,Q_t}})_{t {\geqslant}1}$ takes values in ${{\mathcal{M}}}_{1,2d}(1,L\sqrt{2d})$. By equicontinuity of $\{\Phi_R : R \in {{\mathcal{M}}}_{1,2d}(1,L\sqrt{2d})\}$, the convergence $$\Phi_{R_{K_{{{\mathfrak{X}}}_t,Q_t}}} \underset{t \rightarrow \infty}{\longrightarrow} \Phi_{R_{K^\star}}$$ holds uniformly over all compacts of ${\mathbb{C}}^{2d}$. Take $\underline{\varphi}$ such that equation  holds with ${\Xi}^{eq.\eqref{eq_strong_H1}} = {\Xi}'$ and $\underline{\varphi}^{eq.\eqref{eq_strong_H1}} = 2 \underline{\varphi}$ since $R_{K^\star}$ satisfies equation .  Then the uniform convergence over all compacts entails that by choosing ${\Xi}_n \rightarrow \infty$ slowly enough, the desired property holds. 

Theorem \[theoconsi\_mle\_general\] may now be proved.  Proposition \[prop\_oracle\_simplifie\] actually gives a deterministic function $f : {\mathbb{N}}^* \longrightarrow {\mathbb{R}}_+$ such that for all $n {\geqslant}n_0$, with probability at least $1 - 3n^{-2}$, $${{\mathbf{K}}}({\mathbb{P}}_{K^\star,\gamma^\star} \| {\mathbb{P}}_{{\widehat}{{{\mathfrak{X}}}}_n, {\widehat}{Q}_n, {\widehat}{\gamma}_n}) {\leqslant}f(n){\,}.$$ By the previous paragraph and the assumption that ${\mathrm{pen}}(n,r,D)$ goes to zero as $n$ goes to infinity for each $r$ and $D$, $f \rightarrow 0$. Hence, by Borel-Cantelli’s Lemma, almost surely, $${{\mathbf{K}}}({\mathbb{P}}_{K^\star,\gamma^\star} \| {\mathbb{P}}_{{\widehat}{{{\mathfrak{X}}}}_n, {\widehat}{Q}_n, {\widehat}{\gamma}_n}) \underset{n \rightarrow \infty}{\longrightarrow} 0{\,}.$$ Thus, by Lemma \[lem\_KL\_equivalent\_VT\], almost surely, for all $k {\geqslant}1$, $$d_\text{TV} \left({\mathbb{P}}^{(k)}_{K^\star,\gamma^\star}, {\mathbb{P}}^{(k)}_{{\widehat}{{{\mathfrak{X}}}}_n, {\widehat}{Q}_n, {\widehat}{\gamma}_n}\right)
    \underset{n \rightarrow +\infty}{\longrightarrow} 0{\,}.$$ In particular, by Lemma \[lem\_VT\_continue\], all limits $(K,\gamma)$ of convergent subsequences of $(K_{{\widehat}{{{\mathfrak{X}}}}_n, {\widehat}{Q}_n}, {\widehat}{\gamma}_n)_n$ satisfy ${\mathbb{P}}^{(2)}_{K^\star,\gamma^\star} = {\mathbb{P}}^{(2)}_{K,\gamma}$. Since the support of $X$ is in the known compact set $\Lambda$, $\mu_K \in {{\mathcal{M}}}_1$. Moreover, equation  entails that $K$ satisfies H\[assum::\].  Since the translation parameter is fixed by the centering condition on the densities, Theorem \[theoident1\] ensures that $R_{K^\star} = R_K$ and $\gamma = \gamma^\star$. Therefore, using the continuity of $K$ and $K^\star$, it follows that $K(x,\cdot) = K^\star(x,\cdot)$ for all $x \in {{\text{Supp}}}(\lambda^\star)$. Since the set of parameters is compact by Lemma \[lem\_compactness\], the estimators converge to the true parameters, which is the first part of Theorem \[theoconsi\_mle\_general\].  Finally, since $K^\star$ admits a unique stationary distribution, Theorem 4 and the corollary of Theorem 6 of [@karr75] entail that $${\mathbb{P}}^X_{K_{{\widehat}{{{\mathfrak{X}}}}_n, {\widehat}{Q}_n}} \overset{(d)}{\underset{n \rightarrow \infty}{\longrightarrow}} {\mathbb{P}}^X_{K^\star}{\,},$$ which concludes the proof of Theorem \[theoconsi\_mle\_general\]. 

Proof of Lemma \[lem\_compactness\]
-----------------------------------

Let $\Omega_\omega$ be the set of transition kernels on $\Lambda$ which admit the modulus of continuity $\omega$ with respect to the Wasserstein 1 metric.  $\Omega_\omega$ is an equicontinuous family of functions from $\Lambda$ to the set of probability measures ${{\mathcal{P}}}(\Lambda)$ on $\Lambda$ endowed with the Wasserstein 1 metric.  Since $\Lambda$ is compact, convergence in Wasserstein distance is equivalent to convergence in distribution and ${{\mathcal{P}}}(\Lambda)$ is compact for the topology of the convergence in distribution, so that Arzelà-Ascoli’s theorem ensures that $\Omega_\omega$ is relatively compact in the class of continuous functions from $\Lambda$ to $({{\mathcal{P}}}(\Lambda), W_1)$ with respect to the uniform convergence distance.  It is closed, therefore it is compact. 

Recall that $\Omega_\omega^C$ is the subset of $\Omega_\omega$ such that $K \in \Omega_\omega^C$ if and only if there exists a probability measure $\lambda$ such that for all $x \in \Lambda$, $K(x,\cdot)$ is absolutely continuous with respect to $\lambda$ with a density taking values in $[1/C,C]$. Let us show that it is closed.  Let $(K_n)_{n {\geqslant}1}$ be a convergent sequence in $\Omega_\omega^C$ and $(\lambda_n)_{n {\geqslant}1}$ the associated probability measures.  Write $K \in \Omega_\omega$ its limit.  Without loss of generality, it is possible to assume that $\lambda_n \longrightarrow_{} \lambda$ for some $\lambda \in {{\mathcal{P}}}(\Lambda)$ as $n$ grows to $+\infty$. Let ${{\mathcal{C}}}^0_{b,+}$ be the set of real-valued, nonnegative, bounded and continuous function on $\Lambda$, then for all $f \in {{\mathcal{C}}}^0_{b,+}$ and all $x \in \Lambda$, $$\begin{aligned}
\int K_n(x,{\mathrm{d}}x') f(x') \in \left[\frac{1}{C}\int f {\mathrm{d}}\lambda,C\int f {\mathrm{d}}\lambda\right]\end{aligned}$$ by definition of $\Omega_\omega^C$. Then, using the convergence of the sequences, for all $f \in {{\mathcal{C}}}^0_{b,+}$ and all $x \in \Lambda$, $$\begin{aligned}
\int K(x,{\mathrm{d}}x') f(x') \in \left[\frac{1}{C}\int f {\mathrm{d}}\lambda,C\int f {\mathrm{d}}\lambda\right] {\,}.\end{aligned}$$ For all closed set $F \subset \Lambda$, there exists a sequence $(f_i)_{i {\geqslant}1} \searrow {{\mathbf{1}}}_F$. Therefore, for all closed set $F \subset \Lambda$ and all $x \in \Lambda$, $$\begin{aligned}
K(x,F) \in \left[\frac{\lambda(F)}{C},C\lambda(F)\right] {\,}.\end{aligned}$$ Thus, using the regularity of Borel probability measures on polish spaces, the same holds for all measurable sets, so that $K \in \Omega_\omega^C$. Therefore, $\Omega_\omega^C$ is closed, so that it is compact. 

Proof of Lemma \[lem\_KL\_equivalent\_VT\] {#preuve_lem_KL_equivalent_VT}
------------------------------------------

The following lemma follows from the proof of Lemma 3 of [@douc:moulines:ryden:04].  In this section only, for all integers $a {\leqslant}b$, write $Y_a^b$ instead of $(Y_a, \dots, Y_b)$.

\[lem\_douc04\_revu\] Assume that assumption H\[hyp\_densiteEmission\] holds.  By stationarity, extend the process $(Y_t)_{t {\geqslant}1}$ into a process $(Y_t)_{t \in {{\mathbb{Z}}}}$. Let $K, K' \in \Omega_\omega^C$ and $\gamma, \gamma' \in \Gamma$. Then, there exists random variables $\delta_{k, \infty}(K,\gamma)$ and $\delta_{k, \infty}(K',\gamma')$ such that almost surely, for all $k \in {{\mathbb{Z}}}$ and $m {\geqslant}0$, $$\left|
    \log \frac{p_{Y_{k} | Y_{k-m}^{k-1}, K,\gamma}(Y_{k} | Y_{k-m}^{k-1})}{p_{Y_{k} | Y_{k-m}^{k-1}, K',\gamma'}(Y_{k} | Y_{k-m}^{k-1})}
    - \log \frac{\delta_{k, \infty}(K,\gamma)}{\delta_{k, \infty}(K',\gamma')}
\right| {\leqslant}2 C^2 \left(1 - \frac{1}{C^2}\right)^{m-1}{\,},$$ and for all $k \in {{\mathbb{Z}}}$, $$\left(\sup_{m {\geqslant}0} \left| \log \frac{p_{Y_{k} | Y_{k-m}^{k-1}, K,\gamma}(Y_{k} | Y_{k-m}^{k-1})}{p_{Y_{k} | Y_{k-m}^{k-1}, K',\gamma'}(Y_{k} | Y_{k-m}^{k-1})} \right| \right)
    \vee \left| \log \frac{\delta_{k, \infty}(K,\gamma)}{\delta_{k, \infty}(K',\gamma')} \right|
    \in {{\mathbf{L}}}^1({\mathbb{P}}^\star){\,}.$$

Write first how the notations of this paper match those of [@douc:moulines:ryden:04].  The set ${{\mathcal{X}}}$ (resp.  $\mathcal{Y}$ ) of [@douc:moulines:ryden:04] is $\Lambda$ (resp.  ${\mathbb{R}}^d$) and ${\mathbb{R}}^d$ is equiped with the measure with density $b/\|b\|_1$ with respect to the Lebesgue measure.  Finally, the set $\Theta$ of [@douc:moulines:ryden:04] is $\{ (K, \gamma), (K', \gamma') \}$. Contrary to the setting of [@douc:moulines:ryden:04], ${{\mathcal{X}}}$ is endowed with a measure that depends on the parameter $\theta$. The proof of Lemma 3 of [@douc:moulines:ryden:04] holds with the following relaxed assumptions (with the notations of [@douc:moulines:ryden:04]). 

(A1’)

:   For all $\theta \in \Theta$, there exists a measure $\mu_\theta$ on ${{\mathcal{X}}}$ such that the transition kernel of $(X_k)_{k {\geqslant}1}$ has a density $q_\theta$ with respect to $\mu_{\theta}$ such that for all $x, x' \in {{\mathcal{X}}}$, $1/C {\leqslant}q_\theta(x,x') {\leqslant}C$.

(A3’)

:   $\bar{{\mathbb{E}}}_{\theta^*} [ | \log b_+(Y_1, \bar{\mathbf{Y}}_0) | ] < \infty$ and $\bar{{\mathbb{E}}}_{\theta^*} [ | \log b_-(Y_1, \bar{\mathbf{Y}}_0) | ] < \infty$ where $$\begin{aligned}
    b_+(y_1, \bar{\mathbf{y}}_0) &\overset{\Delta}{=} \sup_{\theta} \int_{{{\mathcal{X}}}} g_\theta(y_1 | \bar{\mathbf{y}}_0, x) \mu_\theta({\mathrm{d}}x), \\
    b_-(y_1, \bar{\mathbf{y}}_0) &\overset{\Delta}{=} \inf_{\theta} \int_{{{\mathcal{X}}}} g_\theta(y_1 | \bar{\mathbf{y}}_0, x) \mu_\theta({\mathrm{d}}x).\end{aligned}$$

These assumptions are equivalent to the following (A1”) and (A3”). 

(A1”)

:   There exists a measure $\lambda_K$ on $\Lambda$ such that the transition kernel $K$ has a density with respect to $\lambda_K$ with values in $[1/C, C]$, and likewise for $K'$.

(A3”)

:   ${\mathbb{E}}^\star [ | \log \int_{\Lambda} \|b\|_1 (\gamma(Y_1 - x) / b(Y_1)) {\mathrm{d}}\lambda_K(x) | ] < \infty$, and likewise for $(K',\gamma')$.

The lemma then follows from Lemma 3 of [@douc:moulines:ryden:04] applied on $(K,\gamma)$ and $(K',\gamma')$. (A1”) is direct by definition of $\Omega_\omega^C$. By H\[hyp\_tails\], $\|b\|_1 m(y) / b(y) {\leqslant}\int_{\Lambda} g_x(y) d\lambda_K(x) {\leqslant}\|b\|_1$. Thus, (A3”) is implied by the integrability condition of H\[hyp\_tails\] since the distribution of $Y_1$ under ${\mathbb{P}}^\star$ is dominated by the distribution with density $b$ with respect to the Lebesgue measure. 

Thus, for all $K, K' \in \Omega_\omega^C$ and $\gamma, \gamma' \in \Gamma$, the limit $$\begin{aligned}
{{\mathbf{K}}}({\mathbb{P}}_{K,\gamma} \| {\mathbb{P}}_{K',\gamma'})
    = \lim_{m \rightarrow +\infty} \frac{1}{m} KL({\mathbb{P}}^{(m)}_{K,\gamma} \| {\mathbb{P}}^{(m)}_{K',\gamma'})
    = {\mathbb{E}}_{K,\gamma} \left[ \log \frac{\delta_{0,\infty}(K,\gamma)}{\delta_{0,\infty}(K',\gamma')} \right]\end{aligned}$$ exists, is finite, and for all $k,m {\geqslant}1$, $$\left| k {{\mathbf{K}}}({\mathbb{P}}_{K,\gamma} \| {\mathbb{P}}_{K',\gamma'}) - 
    \left(KL({\mathbb{P}}^{(m+k)}_{K,\gamma} \| {\mathbb{P}}^{(m+k)}_{K',\gamma'})
    - KL({\mathbb{P}}^{(m)}_{K,\gamma} \| {\mathbb{P}}^{(m)}_{K',\gamma'}) \right) \right|
    {\leqslant}2 C^4 \left( 1 - \frac{1}{C^2} \right)^{m-1}{\,}.$$ Let $(K_n, \gamma_n)_{n {\geqslant}1} \in (\Omega_\omega^C \times \Gamma)^{\mathbb{N}}$ be a sequence of parameters such that ${{\mathbf{K}}}({\mathbb{P}}_{K^\star,\gamma^\star} \| {\mathbb{P}}_{K_n,\gamma_n}) \longrightarrow 0$. The above equation implies that for all $k {\geqslant}1$, there exists sequences $(m_n)_{n {\geqslant}1} \longrightarrow +\infty$ and $(l_n)_{n {\geqslant}1} \longrightarrow +\infty$ such that $$KL({\mathbb{P}}^{(m_n+l_n+k)}_{K^\star,\gamma^\star} \| {\mathbb{P}}^{(m_n+l_n+k)}_{K_n,\gamma_n})
    - KL({\mathbb{P}}^{(m_n)}_{K^\star,\gamma^\star} \| {\mathbb{P}}^{(m_n)}_{K_n,\gamma_n}) 
    \underset{n \rightarrow \infty}{\longrightarrow} 0{\,}.$$ Using the chain rule and Pinsker’s inequality, $$\begin{aligned}
KL({\mathbb{P}}^{(m_n+l_n+k)}_{K^\star,\gamma^\star} & \| {\mathbb{P}}^{(m_n+l_n+k)}_{K_n,\gamma_n})
    - KL({\mathbb{P}}^{(m_n)}_{K^\star,\gamma^\star} \| {\mathbb{P}}^{(m_n)}_{K_n,\gamma_n}) \\
    &= {\mathbb{E}}_{Y_1^{m_n} | K^\star,\gamma^\star} \left[
        KL\left({\mathbb{P}}_{Y_{m_n+1}^{m_n+l_n+k} | Y_1^{m_n}, K^\star,\gamma^\star} \| {\mathbb{P}}_{Y_{m_n+1}^{m_n+l_n+k} | Y_1^{m_n}, K_n,\gamma_n}\right) 
    \right]{\,}, \\
    &{\geqslant}{\mathbb{E}}_{Y_1^{m_n} | K^\star,\gamma^\star} \left[
        KL\left({\mathbb{P}}_{Y_{m_n+l_n+1}^{m_n+l_n+k} | Y_1^{m_n}, K^\star,\gamma^\star} \| {\mathbb{P}}_{Y_{m_n+l_n+1}^{m_n+l_n+k} | Y_1^{m_n}, K_n,\gamma_n}\right) 
    \right]{\,}, \\
    &{\geqslant}2 {\mathbb{E}}_{Y_1^{m_n} | K^\star,\gamma^\star} \left[
        d_\text{TV}^2 \left({\mathbb{P}}_{Y_{m_n+l_n+1}^{m_n+l_n+k} | Y_1^{m_n}, K^\star,\gamma^\star}, {\mathbb{P}}_{Y_{m_n+l_n+1}^{m_n+l_n+k} | Y_1^{m_n}, K_n,\gamma_n}\right) 
    \right]{\,}.\end{aligned}$$ Since the kernels satisfy the Doeblin condition (see for instance [@cappe:ryden:2004], Section 4.3.3), the resulting processes are $\phi$-mixing with mixing coefficients $\phi(i) {\leqslant}2(1 - 1/C)^i$ (see the proof of Lemma 1 of [@lehericy2018misspe] for a proof, and [@bradley2005strongmixingsurvey] for a survey of mixing properties).  In particular, for all $K \in \Omega_\omega^C$, for all positive and continuous probability density $\gamma$ on ${\mathbb{R}}^d$ and for all $A \in \sigma(Y_1, \dots, Y_{m_n})$ such that ${\mathbb{P}}_{K, \gamma}(A) > 0$, $$d_\text{TV} \left({\mathbb{P}}_{Y_{m_n+l_n+1}^{m_n+l_n+k} | A, K,\gamma}, {\mathbb{P}}_{Y_{m_n+l_n+1}^{m_n+l_n+k} | K,\gamma}\right) 
    {\leqslant}2 \left( 1 - \frac{1}{C} \right)^{l_n},$$ so that using the continuity and positivity of $\gamma$, $$d_\text{TV} \left({\mathbb{P}}_{Y_{m_n+l_n+1}^{m_n+l_n+k} | Y_1^{m_n}, K,\gamma}, {\mathbb{P}}_{Y_{m_n+l_n+1}^{m_n+l_n+k} | K,\gamma}\right) 
    {\leqslant}2 \left( 1 - \frac{1}{C} \right)^{l_n}{\,}.$$ Finally, $$\begin{aligned}
2 {\mathbb{E}}_{Y_1^{m_n} | K^\star,\gamma^\star} & \left[
        d_\text{TV}^2 \left({\mathbb{P}}_{Y_{m_n+l_n+1}^{m_n+l_n+k} | Y_1^{m_n}, K^\star,\gamma^\star}, {\mathbb{P}}_{Y_{m_n+l_n+1}^{m_n+l_n+k} | Y_1^{m_n}, K_n,\gamma_n}\right) 
    \right] \\
    &{\geqslant}2 \left(
        d_\text{TV} \left({\mathbb{P}}_{Y_{m_n+l_n+1}^{m_n+l_n+k} | K^\star,\gamma^\star}, {\mathbb{P}}_{Y_{m_n+l_n+1}^{m_n+l_n+k} | K_n,\gamma_n}\right)
        - 4 \left( 1 - \frac{1}{C} \right)^{l_n}
        \right)^2{\,}, \\
    &{\geqslant}d_\text{TV}^2 \left({\mathbb{P}}^{(k)}_{K^\star,\gamma^\star}, {\mathbb{P}}^{(k)}_{K_n,\gamma_n}\right) - 32 \left( 1 - \frac{1}{C} \right)^{2l_n}{\,},\end{aligned}$$ using that $(a-b)^2 {\geqslant}a^2/2 - b^2$ for all $a,b \in {\mathbb{R}}$ and the stationarity of the distributions ${\mathbb{P}}_{K,\gamma}$ for all $K \in \Omega_\omega^C$ and $\gamma \in \Gamma$. Therefore, for all $k {\geqslant}1$, $$d_\text{TV} \left({\mathbb{P}}^{(k)}_{K^\star,\gamma^\star}, {\mathbb{P}}^{(k)}_{K_n,\gamma_n}\right)
    \underset{n \rightarrow +\infty}{\longrightarrow} 0{\,}.$$ Conversely, let $(K_n, \gamma_n)_{n {\geqslant}1} \in (\Omega_\omega^C \times \Gamma)^{{\mathbb{N}}^*}$ be a sequence of parameters such that for all $k {\geqslant}1$, $$d_\text{TV} \left({\mathbb{P}}^{(k)}_{K^\star,\gamma^\star}, {\mathbb{P}}^{(k)}_{K_n,\gamma_n}\right) \underset{n \rightarrow +\infty}{\longrightarrow} 0{\,}.$$ Then by Lemma \[lem\_douc04\_revu\], for all $k, n {\geqslant}1$, $$\begin{aligned}
\nonumber
{{\mathbf{K}}}({\mathbb{P}}_{K^\star,\gamma^\star} \| {\mathbb{P}}_{K_n, \gamma_n})
    &{\leqslant}{\mathbb{E}}KL({\mathbb{P}}_{Y_k | Y_1^{k-1}, K^\star,\gamma^\star} \| {\mathbb{P}}_{Y_k | Y_1^{k-1}, K_n, \gamma_n}) + 2C^2 \left(1 - \frac{1}{C^2}\right)^{k-2} \\
    \label{eq_approx_forgetting}
    &{\leqslant}KL({\mathbb{P}}^{(k)}_{K^\star,\gamma^\star} \| {\mathbb{P}}^{(k)}_{K_n, \gamma_n}) + 2C^2 \left(1 - \frac{1}{C^2}\right)^{k-2}{\,},\end{aligned}$$ by the entropy chain rule.  Lemma 4 of [@STG13bayesiandensity] entails that there exists $\lambda_0 \in (0,1)$ such that for all $\lambda \in (0, \lambda_0)$, $$\begin{aligned}
KL({\mathbb{P}}^{(k)}_{K^\star,\gamma^\star} \| {\mathbb{P}}^{(k)}_{K_n, \gamma_n})
    &{\leqslant}\left(1 + 2 k \log \frac{1}{\lambda} \right) h^2({\mathbb{P}}^{(k)}_{K^\star,\gamma^\star}, {\mathbb{P}}^{(k)}_{K_n, \gamma_n}) \\
    &\qquad + 2{\mathbb{E}}\left[ \log \left( \frac{p_{Y_1^k | K^\star,\gamma^\star}}{p_{Y_1^k | K_n,\gamma_n}} \right) {{\mathbf{1}}}\left( \frac{p_{Y_1^k | K^\star,\gamma^\star}}{p_{Y_1^k | K_n,\gamma_n}} {\geqslant}\frac{1}{\lambda} \right) \right] {\,}, \\
    &{\leqslant}2 \left(1 + 2 k \log \frac{1}{\lambda} \right) d_\text{TV}( {\mathbb{P}}^{(k)}_{K^\star, \gamma^\star,}, {\mathbb{P}}^{(k)}_{K_n, \gamma_n}) \\
    &\qquad + 2 \int \prod_{i=1}^k b(y_i) \log \left( \prod_{i=1}^k \frac{b(y_i)}{m(y_i)} \right) {{\mathbf{1}}}\left( \prod_{i=1}^k \frac{b(y_i)}{m(y_i)} {\geqslant}\frac{1}{\lambda} \right) {\mathrm{d}}y {\,},\end{aligned}$$ using that the square of the Hellinger distance is upper bounded by the ${{\mathbf{L}}}^1$ distance, that is twice the total variation distance.  The second term is finite for all $\lambda$ by H\[hyp\_tails\].  Therefore, by carefully choosing a sequence $\lambda$ that tends to zero, we obtain $\limsup_{n} KL({\mathbb{P}}^{(k)}_{K^\star,\gamma^\star} \| {\mathbb{P}}^{(k)}_{K_n, \gamma_n}) = 0$ for all $k {\geqslant}1$. This, together with taking $k$ that tends to infinity in Equation , proves the second statement of the lemma. 

Proof of Lemma \[lem\_VT\_continue\]
------------------------------------

The set of possible parameters $\Omega_\omega^C \times \Gamma$ is endowed with the product topology induced by the uniform convergence topology on $\Omega_\omega^C$ and the ${{\mathbf{L}}}^1$ norm on $\Gamma$. It is compact for this topology.  Let $(K_n, \gamma_n)_{n {\geqslant}1}$ be a sequence in $\Omega_\omega \times \Gamma$ that converges to $(K, \gamma)$ with respect to this topology.  The aim is now to show that the distribution of $(Y_1, \dots, Y_k)$ with parameters $(K_n, \gamma_n)$ converges in total variation distance to the distribution with parameters $(K,\gamma)$. The transition kernel $K$ admits a unique stationary distribution, so that Theorem 4 and the corollary of Theorem 6 of [@karr75] entail that $$\label{eq_cvg_loi_loi_X}
{\mathbb{P}}^X_{K_n} \overset{(d)}{\underset{n \rightarrow \infty}{\longrightarrow}} {\mathbb{P}}^X_K{\,},$$ where ${\mathbb{P}}^X_{K}$ denotes the distribution of a stationary Markov chain $(X_n)_{n {\geqslant}1}$ with transition kernel $K$. This convergence holds for the distribution of the whole Markov chain, which implies in particular that the distribution of $k$-tuples $(X_1, \dots, X_k)$ for all $k {\geqslant}1$ converges in the same way.  For any $k {\geqslant}1$, the total variation distance between the distributions of $(Y_1, \dots, Y_k)$ is, up to a factor 2, $$\begin{aligned}
\| p_{(Y_1, \dots, Y_k) | K, \gamma} - p_{(Y_1, \dots, Y_k) | K_n, \gamma_n} \|_1 & = \!  \int \!\left|
            \int \prod_{i=1}^k \gamma(y_i - x_i) {\mathrm{d}}{\mathbb{P}}^X_{K}(x)
            \!-\!  \int \prod_{i=1}^k \gamma_n(y_i - x_i) {\mathrm{d}}{\mathbb{P}}^X_{K_n}(x)
        \right| {\mathrm{d}}y{\,}, \\
    & \!{\leqslant}\int \left|
            \int \prod_{i=1}^k \gamma(y_i - x_i) {\mathrm{d}}{\mathbb{P}}^X_{K}(x)
            - \int \prod_{i=1}^k \gamma(y_i - x_i) {\mathrm{d}}{\mathbb{P}}^X_{K_n}(x)
        \right| {\mathrm{d}}y{\,}, \\
        &\qquad \qquad + \int \int \left| \prod_{i=1}^k \gamma(y_i - x_i) - \prod_{i=1}^k \gamma_n(y_i - x_i) \right| {\mathrm{d}}{\mathbb{P}}^X_{K_n}(x) {\mathrm{d}}y {\,}.\end{aligned}$$ Consider the first term of the right hand side.  Since $x \longmapsto \gamma(y-x)$ is continuous and bounded for all $y \in {\mathbb{R}}^d$, Equation  yields, for all $y \in {\mathbb{R}}^d$, $$\left|
    \int \prod_{i=1}^k \gamma(y_i - x_i) {\mathrm{d}}{\mathbb{P}}^X_{K}(x)
    - \int \prod_{i=1}^k \gamma(y_i - x_i) {\mathrm{d}}{\mathbb{P}}^X_{K_n}(x)
\right| \underset{n \rightarrow \infty}{\longrightarrow} 0{\,}.$$ Then, since $\sup_{x \in \Lambda} \gamma(y-x) {\leqslant}b(y)$ for all $y \in {\mathbb{R}}^d$, $
\left| \int \prod_{i=1}^k \gamma(y_i - x_i) {\mathrm{d}}{\mathbb{P}}^X_{K}(x) \right|
    {\leqslant}\prod_{i=1}^k b(y_i){\,},
$ and the right hand side is integrable.  The same holds for $K_n$, so that the dominated convergence theorem implies $$\int \left|
    \int \prod_{i=1}^k \gamma(y_i - x_i) {\mathrm{d}}{\mathbb{P}}^X_{K}(x)
    - \int \prod_{i=1}^k \gamma(y_i - x_i) {\mathrm{d}}{\mathbb{P}}^X_{K_n}(x)
\right| {\mathrm{d}}y
    \underset{n \rightarrow \infty}{\longrightarrow} 0{\,}.$$ For the second term, write $$\begin{aligned}
\int \int & \left| \prod_{i=1}^k \gamma(y_i - x_i) - \prod_{i=1}^k \gamma_n(y_i - x_i)\right| {\mathrm{d}}{\mathbb{P}}^X_{K_n}(x) {\mathrm{d}}y \\
    &{\leqslant}\sum_{i=1}^k \int \int \prod_{j < i} \gamma(y_j - x_j) \left| \gamma(y_i - x_i) - \gamma_n(y_i - x_i) \right| \prod_{j > i} \gamma_n(y_j - x_j) {\mathrm{d}}{\mathbb{P}}^X_{K_n}(x) {\mathrm{d}}y {\,}, \\
    &{\leqslant}\sum_{i=1}^k \int \int |\gamma(y_i - x_i) - \gamma_n(y_i - x_i)| {\mathrm{d}}y_i
    {\mathrm{d}}{\mathbb{P}}^X_{K_n}(x_i) {\,}, \\
    &= k \|\gamma - \gamma_n\|_1{\,},\end{aligned}$$ where the last term converges to 0 as $n\rightarrow \infty$. Hence, $d_\text{TV}( {\mathbb{P}}^{(k)}_{K, \gamma}, {\mathbb{P}}^{(k)}_{K_n, \gamma_n}) \underset{n \rightarrow \infty}{\longrightarrow} 0$ for all $k {\geqslant}1$.

Proof of Lemma \[lem\_approx\_noyau\_existe\]
---------------------------------------------

By Lemmas \[lem\_KL\_equivalent\_VT\] and \[lem\_VT\_continue\], to show the convergence with ${{\mathbf{K}}}$, it suffices to show that there exists a sequence $({{\mathfrak{X}}}_t,Q_t)_{t {\geqslant}1}$ such that $({{\mathfrak{X}}}_t,Q_t, -) \in \bigcup_{r, D} S_{r,D}$ and such that the sequence of kernels $(K_t)_{t {\geqslant}1} = (K_{{{\mathfrak{X}}}_t,Q_t})_{t {\geqslant}1}$ converges to $K^\star$. It also suffices to show the convergence of $(R_{K_{{{\mathfrak{X}}}_t,Q_t}})_{t {\geqslant}1}$ since $K^\star$ admits a unique stationary distribution by using Theorem 4 and the corollary of Theorem 6 of [@karr75]. 

The following lemma, which is a consequence of simple algebra, is stated without proof. 

\[lemma\_discretisation\_support\] Let $\lambda$ be a probability measure on a compact set of ${\mathbb{R}}^d$ which is absolutely continuous with respect to the Lebesgue measure.  Then, there exists a sequence of integers $(r_t)_{t {\geqslant}1} \longrightarrow +\infty$ and a sequence $((A_i^t)_{1 {\leqslant}i {\leqslant}r_t})_{t {\geqslant}1}$ of measurable partitions of the support of $\lambda$ such that $$\begin{cases}
D_t = \underset{1 {\leqslant}i {\leqslant}r_t}{\sup} \text{diam}(A_i^t) \underset{t \rightarrow +\infty}{\longrightarrow} 0{\,}, \\
\forall t {\geqslant}1, \quad \forall 1 {\leqslant}i {\leqslant}r_t, \quad
    \lambda(A_i^t) \in \left[ \frac{1}{2 r_t}, \frac{2}{r_t} \right]{\,}. 
\end{cases}$$

To address the case where $\lambda^\star$ is not absolutely continuous with respect to the Lebesgue measure, consider convolutions of the kernels.  For all $\epsilon \in (0,1]$, let $U_\epsilon$ be the uniform measure on $[-\epsilon,\epsilon]^d$. For all probability measure $\lambda$ on ${\mathbb{R}}^d$, write $\lambda * U_\epsilon$ the convolution of $\lambda$ and $U_\epsilon$, and for all transition kernel $K$ on ${\mathbb{R}}^d$, write $K * U_\epsilon$ the transition kernel defined by $(K * U_\epsilon)(x,\cdot) = K(x,\cdot) * U_\epsilon$. Then $K^\star * U_\epsilon$ admit the modulus of continuity $\omega$ for all $\epsilon > 0$ (since $W_1(\mu * U_\epsilon, \nu * U_\epsilon) {\leqslant}W_1(\mu, \nu)$ for all probability measures $\mu, \nu$) and $K^\star * U_\epsilon$ admits a density taking values in $[2/C, C/2]$ with respect to the measure $\lambda^\star * U_\epsilon$ (which is absolutely continuous with respect to the Lebesgue measure), so that it belongs to $\Omega_\omega^C$ (up to enlarging $\Lambda$).  Moreover, $K^\star * U_\epsilon \longrightarrow K^\star$ in $\Omega_\omega^C$ as $\epsilon \longrightarrow 0$. Therefore, it remains to show that for all $\epsilon > 0$, the kernel $K^\star * U_\epsilon$ can be approximated by kernels in $\Omega_\omega^C$ with finite support.  Equivalently, assume that $\lambda^\star$ is absolutely continuous with respect to the Lebesgue measure and construct a sequence approximating $K^\star$.

Let $(r_t)_{t {\geqslant}1}$ and $((A_i^t)_{1 {\leqslant}i {\leqslant}r_t})_{t {\geqslant}1}$ be the sequences obtained by applying Lemma \[lemma\_discretisation\_support\] to $\lambda^\star$. For all $t {\geqslant}1$ and $i \in \{1, \dots, r_t\}$, let $x_i^t$ be an element of $A_i^t$. For all $t {\geqslant}1$, the elements of the vector ${{\mathfrak{X}}}_t = (x^t_i)_{1 {\leqslant}i {\leqslant}r_t}$ are distinct because $(A_i^t)_{1 {\leqslant}i {\leqslant}r_t}$ is a partition of ${{\text{Supp}}}(\lambda^\star)$. Let $(\eta_t)_{t {\geqslant}1} \longrightarrow 0$ be a sequence of positive numbers.  Let ${\widetilde}{K}_t$ be the transition kernel from $\Lambda \cap (\eta_t {{\mathbb{Z}}}^d)$ to $\{x_i^t\}_{1 {\leqslant}i {\leqslant}r_t}$ defined, for all $ x \in \Lambda \cap (\eta_t {{\mathbb{Z}}}^d)$ and all $ i \in \{1, \dots, r_t\}$, by $${\widetilde}{K}_t(x, x_i^t) = K^\star(x, A_i^t){\,}.$$ By the Lemma \[lemma\_discretisation\_support\] and assumption H\[hyp\_transitionKernel\], ${\widetilde}{K}_t(x,x_i^t) \in [1/(C r_t),C/r_t]$ for all $x$ and $i$. Moreover, for all $x,x' \in \Lambda \cap (\eta_t {{\mathbb{Z}}}^d)$, $$\begin{aligned}
W_1({\widetilde}{K}_t(x, \cdot), {\widetilde}{K}_t(x', \cdot))
    &{\leqslant}W_1(K^\star(x,\cdot), K^\star(x',\cdot)) + 2 \underset{1 {\leqslant}i {\leqslant}r_t}{\sup} \text{diam}(A_i^t) \\
    &{\leqslant}\frac{\omega(|x-x'|)}{2} + 2\frac{D_t}{\eta_t} |x-x'|{\,}, \\
    &{\leqslant}\omega(|x-x'|){\,},\end{aligned}$$ by choosing $\eta_t {\geqslant}4 D_t / \inf_{u \in (0, \text{diam}(\Lambda)]} \omega(u)/u$, which is finite since $\omega$ is concave, nondecreasing and not equal to zero, so that there exists an extension $K_t \in \Omega_{\omega}^C$ of ${\widetilde}{K}_t$ such that the support of $K_t(x,\cdot)$ is $\{x_i^t\}_{1 {\leqslant}i {\leqslant}r_t}$ for all $x \in \Lambda$.

For all $i$, $j$, define $Q_t(i,j) = K_t(x^t_i, x^t_j)$. All kernels considered here ($K^\star$, ${\widetilde}{K}_t$, $K_t$ and $K_{{{\mathfrak{X}}}_t,Q_t}$) are kernels on the compact set ${{\text{Supp}}}(\lambda^\star)$. Therefore, we only need to show that $K_{{{\mathfrak{X}}}_t,Q_t} \longrightarrow K$ in the subset ${\widetilde}{\Omega}_\omega^C$ of kernels on ${{\text{Supp}}}(\lambda^\star)$ in $\Omega_\omega^C$ to show that it is an approximating sequence, that is $$\label{eq_approx_cvg_unif_sur_support}
\sup_{x \in {{\text{Supp}}}(\lambda^\star)} W_1(K_{{{\mathfrak{X}}}_t,Q_t}(x,\cdot), K^\star(x,\cdot)) \underset{t \rightarrow +\infty}{\longrightarrow} 0{\,}.$$ For all $x \in {{\text{Supp}}}(\lambda^\star)$, let $X(x)$ (resp.  ${{\mathfrak{X}}}(x)$) be one of the elements of $\Lambda \cap (\eta_t {{\mathbb{Z}}}^d)$ (resp.  $\{x_i^t\}_{1 {\leqslant}i {\leqslant}r_t}$) closest to $x$. Then $\sup_{x \in {{\text{Supp}}}(\lambda^\star)} |x-{{\mathfrak{X}}}(x)| {\leqslant}D_t$ and $\sup_{x \in {{\text{Supp}}}(\lambda^\star)} |x-X(x)| {\leqslant}\eta_t$ (with the supremum norm on ${\mathbb{R}}^d$) and for all $x \in {{\text{Supp}}}(\lambda^\star)$, $$\begin{aligned}
\nonumber
W_1(K_{{{\mathfrak{X}}}_t,Q_t}(x, \cdot),  K^\star(x, \cdot)) {\leqslant}&W_1(K_{{{\mathfrak{X}}}_t,Q_t}(x, \cdot), K_{{{\mathfrak{X}}}_t,Q_t}({{\mathfrak{X}}}(x), \cdot)) \\
    \label{eq_approx_suite_2}
            &\hspace{.5cm}+ W_1(K_{{{\mathfrak{X}}}_t,Q_t}({{\mathfrak{X}}}(x), \cdot), K_t({{\mathfrak{X}}}(x), \cdot)) \\
    \nonumber
            &\hspace{.5cm}+ W_1(K_t({{\mathfrak{X}}}(x), \cdot), K_t(X({{\mathfrak{X}}}(x)), \cdot)) \\
    \label{eq_approx_suite_4}
            &\hspace{.5cm}+ W_1(K_t(X({{\mathfrak{X}}}(x)), \cdot), K^\star(X({{\mathfrak{X}}}(x)), \cdot)) \\
    \nonumber
            &\hspace{.5cm}+ W_1(K^\star(X({{\mathfrak{X}}}(x)), \cdot), K^\star(x, \cdot)){\,}.\end{aligned}$$ By definition of the kernels, and are equal to 0.  Thus, the regularity assumptions on the kernels ensure that for all $x \in {{\text{Supp}}}(\lambda^\star)$, $$\begin{aligned}
W_1(K_{{{\mathfrak{X}}}_t,Q_t}(x, \cdot), K^\star(x, \cdot))
    {\leqslant}\omega(D_t)
            + \omega(\eta_t)
            + \omega(D_t + \eta_t) / 2{\,},\end{aligned}$$ which proves Equation . 

Proof of Proposition \[prop\_oracle\_simplifie\] {#sec_full_oracle_inequality}
------------------------------------------------

This section first states Theorem 8 of [@lehericy2018misspe] and its assumptions.  It is then proved that the assumptions are satisfied and that Proposition \[prop\_oracle\_simplifie\] is deduced from this theorem.  Let $\lambda_b$ be the probability measure on ${\mathbb{R}}^d$ which has the density $b / \|b\|_1$ with respect to the Lebesgue measure.  When necessary, the process $(Y_t)_{t {\geqslant}1}$ is extended to a process $(Y_t)_{t \in {{\mathbb{Z}}}}$ by stationarity.  In this section only, for all integers $a {\leqslant}b$, write $Y_a^b$ instead of $(Y_a, \dots, Y_b)$.

**\[A$\star$forgetting\]**

:   There exists two constants $C_\star > 0$ and $\rho_\star \in (0,1)$ such that for all $i \in {{\mathbb{Z}}}$, for all $k,k' \in {\mathbb{N}}^*$ and for all $y_{i-(k \vee k')}^i \in ({\mathbb{R}}^d)^{(k \vee k')+1}$, $$\left| 
        \log\left(\frac{{\mathrm{d}}{\mathbb{P}}_{Y_i | Y_{i-k}^{i-1}, K^\star, \gamma^\star}}{{\mathrm{d}}\lambda_b}(y_i | y_{i-k}^{i-1})\right)
        - \log\left(\frac{{\mathrm{d}}{\mathbb{P}}_{Y_i | Y_{i-k'}^{i-1}, K^\star, \gamma^\star}}{{\mathrm{d}}\lambda_b}(y_i | y_{i-k'}^{i-1})\right)
    \right|
        {\leqslant}C_\star \rho_\star^{k \wedge k' - 1}{\,}.$$

Let $(\Omega, {{\mathcal{F}}}, P)$ be a measured space and ${{\mathcal{A}}}\subset {{\mathcal{F}}}$ and ${{\mathcal{B}}}\subset {{\mathcal{F}}}$ be two sigma-fields.  Then, the $\rho$-mixing coefficient between ${{\mathcal{A}}}$ and ${{\mathcal{B}}}$ is $$\rho_\text{mix}({{\mathcal{A}}}, {{\mathcal{B}}}) = \underset{g \in {{\mathbf{L}}}^2(\Omega,{{\mathcal{B}}},P)}{\sup_{f \in {{\mathbf{L}}}^2(\Omega,{{\mathcal{A}}},P)}} | \text{Corr}(f,g)|{\,}.$$ The $\rho$-mixing coefficient of $(Y_t)_{t \in {{\mathbb{Z}}}}$ is $$\rho_\text{mix}(n) = \rho_\text{mix}(\sigma(Y_i, i {\geqslant}n), \sigma(Y_i, i {\leqslant}0)){\,}.$$

**\[A$\star$mixing\]**

:   There exists two constants $c_\star > 0$ and $n_\star \in {\mathbb{N}}^*$ such that for all $n {\geqslant}n_\star$, $\rho_\text{mix}(n) {\leqslant}4 e^{- c_\star n}$.

**\[A$\star$tail\]**

:   There exists a constant $B^\star {\geqslant}1$ such that for all $i \in {{\mathbb{Z}}}$, all $k \in {\mathbb{N}}$ and all $v {\geqslant}e$, $${\mathbb{P}}\left( \frac{{\mathrm{d}}{\mathbb{P}}_{Y_i | Y_{i-k}^{i-1}, K^\star, \gamma^\star}}{{\mathrm{d}}\lambda_b}(Y_i | Y_{i-k}^{i-1}) {\geqslant}v^{B^\star} \right) {\leqslant}\frac{1}{v}{\,}.$$

[@lehericy2018misspe] considers models written $T_{r,D}$ in the following (instead of $S_{K,M,n}$ in [@lehericy2018misspe]).  These models are sets of hidden Markov model parameters (not translation hidden Markov models), that is of vectors of the form $(r, \pi, Q, g)$ where $r$ is the number of values the Markov chain can take, $\pi$ is the initial distribution of the Markov chain, $Q$ is its transition matrix and $g = (g_z)_{z = 1, \dots, r}$ the vector of its emission densities, that is a vector of probability densities on ${\mathbb{R}}^d$ with respect to the Lebesgue measure.  Let $(m_{r,D})_{r {\geqslant}1, D {\geqslant}1}$ be a sequence of nonnegative integers.  For all $n {\geqslant}1$, let $\sigma_-(n) \in (0, e^{-1}]$ and let ${{\mathfrak{P}}}_n$ be a subset of $\{ (r,D) \in ({\mathbb{N}}^*)^2 : r {\leqslant}1 / (2\sigma_-(n)) \text{ and } m_{r,D} {\leqslant}2n\}$. This set lists the indices of the models among which the final model is selected.  Let ${{\mathbf{T}}}_n = \bigcup_{(r,D) \in {{\mathfrak{P}}}_n} T_{r,D}$ be the set of all model parameters considered when $n$ observations are available. 

**\[Aergodic\]**

:   For all $(r,\pi,Q,-) \in {{\mathbf{T}}}_n$, $$\inf_{x,x' = 1, \dots, r} Q(x,x') {\geqslant}\sigma_-(n) \quad \text{ and } \quad
    \inf_{x = 1, \dots, r} \pi(x) {\geqslant}\sigma_-(n){\,}.$$

<!-- -- >

**\[Atail\]**

:   There exists a constant $B(n) {\geqslant}1$ such that for all $u {\geqslant}1$, $${\mathbb{P}}^\star \left( \sup_{(r,-,-,g) \in {{\mathbf{T}}}_n} \left| \log \sum_{z=1}^r g_z(Y_1) \right| {\geqslant}B(n) u \right) {\leqslant}e^{-u}{\,}.$$

Finally, the assumptions **\[Aentropy\]** and **\[Agrowth\]** of [@lehericy2018misspe] are replaced by the following more general assumption, which allows to improve the penalty (the original assumptions induce a penalty proportional to $r\dim_D + rd + r^2$ instead of $\dim_D + rd + r^2$).  Let $N\left(B, d, \epsilon \right)$ be the smallest number of brackets of size $\epsilon$ for the distance $d$ needed to cover the set of functions $B$.

**\[Aentropy’\]**

:   There exist a mapping $(r, D, n, A) \longmapsto C_\text{aux}(r, D, n, A) {\geqslant}1$, a sequence of nonnegative integers $(m_{r,D})_{r {\geqslant}1, D {\geqslant}1}$ and a family of sets $({{\mathcal{S}}}_{n,A})_{n {\geqslant}1, A {\geqslant}0} \subset {\mathbb{R}}^d$ such that for all $n {\geqslant}1$ and $A {\geqslant}0$, ${\mathbb{P}}^\star(Y_1 \notin {{\mathcal{S}}}_{n,A}) {\leqslant}\exp(-2A / B(n))$ where $B(n)$ is as in **\[Atail\]**, for all $y \in {{\mathcal{S}}}_{n,A}$, $$\underset{(r',-,-,g') \in {{\mathbf{T}}}_n}{\sup} \left| \log \sum_{z=1}^{r'} g'_z(y) \right| {\leqslant}A$$ and for all $r {\geqslant}1$, $D {\geqslant}1$, $n {\geqslant}1$, $A {\geqslant}B(n)$ and $\delta \in (0,1)$, $$\begin{gathered}
    \label{eq_bracketing_entropy}
    N\left(\left\{ \left(y \mapsto g_z(y) {{\mathbf{1}}}_{y \in {{\mathcal{S}}}_{n,A}} \right)_{z = 1, \dots, r} \right\}_{(r,-,-,g) \in T_{r,D}}, d_\infty, \delta \right)  \\
        {\leqslant}\max \left( \frac{C_\text{aux}(r, D, n, A)}{\delta} , 1\right)^{m_{r,D}}{\,},\end{gathered}$$ where $d_\infty$ is the distance associated with the supremum norm on $({{\mathbf{L}}}^\infty(\mathcal{Y}))^r$. Moreover, there exist an integer $n_\text{growth}$ and a constant $c_\text{growth} > 0$ such that for all $n {\geqslant}n_\text{growth}$, $$\sup_{(r, D) \in {{\mathfrak{P}}}_n} \log C_\text{aux}(r,D,n, B(n) \log n) {\leqslant}c_\text{growth} (\log n)^2 \log \log n{\,}.$$

Note that choosing $S_{n,A} = \{ y \in {\mathbb{R}}^d : \sup_{(r',-,-,g') \in {{\mathbf{T}}}_n} | \log \sum_{z=1}^{r'} g'_z(y) | {\leqslant}A \}$ gives the original formulation of [@lehericy2018misspe].  Write ${\mathbb{P}}_{r,\pi,Q,g}$ the distribution of a hidden Markov model with parameter $(r,\pi,Q,g)$. Lemma 4 and 5 of [@lehericy2018misspe] show that for all $r$, $D$ and for all $(r,\pi,Q,g) \in T_{r,D}$, the limit ${{\mathbf{K}}}({\mathbb{P}}_{K^\star, \gamma^\star} \| {\mathbb{P}}_{r,Q,g}) = \lim_m m^{-1} KL( {\mathbb{P}}_{Y_1^m | K^\star, \gamma^\star} \| {\mathbb{P}}_{Y_1^m | r,\pi,Q,g} )$ exists, is finite and does not depend on $\pi$. This quantity coincides with the one defined in Lemma \[lem\_KL\_equivalent\_VT\] when the hidden Markov model with parameter $(r,\pi,Q,g)$ is a translation hidden Markov model with transition kernel in $\Omega_\omega^C$ and emission density in $\Gamma$. Define the loglikelihood of a hidden Markov model with parameter $(r,\pi,Q,g)$ by $$\ell_{n}^\text{HMM}(r,\pi,Q,g) = \log \left(\sum_{z_1, \ldots, z_n\in \{1,\ldots,r\}}\!\!\!\!\!\!\!\!\!\!\pi(z_1) g_{z_1}(Y_1)\prod_{t=2}^{n}Q(z_{t-1},z_{t}) g_{z_t}(Y_t)
\right).$$ Theorem 8 of [@lehericy2018misspe] may now be stated with a noteworthy modification: not all possible number of states and model indices are considered during the model selection step , but only the ones in ${{\mathfrak{P}}}_n$. This has no consequence on the proof. 

\[TH\_ORACLE\_SIMPLIFIE\] Assume that **\[A$\star$forgetting\]**, **\[A$\star$mixing\]**, **\[A$\star$tail\]**, **\[Aergodic\]**, **\[Atail\]** and **\[Aentropy’\]** hold.  Assume that ${\sigma_-(n) = C_\sigma (\log n)^{-1}}$ and ${B(n) = C_B \log n}$ for some constants $C_\sigma {\geqslant}0$ and $C_B {\geqslant}2$. Let $\alpha {\geqslant}0$. For all $r$ and $D$, let $${(r, {\widehat}\pi_{r,D,n}, {\widehat}{Q}_{r,D,n}, {\widehat}{g}_{r,D,n})}
    \in \underset{(r,\pi,Q,g) \in T_{r,D}}{\operatorname*{arg\,max}} \; \frac{1}{n} \ell_{n}^\text{HMM}(r,\pi,Q,g){\,},$$ $$\label{eq_model_selection_thLuc}
({\widehat}{r}_n, {\widehat}{D}_n) \in \underset{(r, D) \in {{\mathfrak{P}}}_n}{\operatorname*{arg\,max}} \left( \frac{1}{n} \ell_{n}^\text{HMM}(r, {\widehat}\pi_{r,D,n}, {\widehat}{Q}_{r,D,n}, {\widehat}{g}_{r,D,n}) - {\mathrm{pen}}(n,r,D) \right){\,},$$ for some function ${\mathrm{pen}}$, and let $$({\widehat}{r}_n, {\widehat}{\pi}_n, {\widehat}{Q}_n, {\widehat}{g}_n) = ({\widehat}{r}_n, {\widehat}\pi_{{\widehat}{r}_n,{\widehat}{D}_n,n}, {\widehat}{Q}_{{\widehat}{r}_n,{\widehat}{D}_n,n}, {\widehat}{g}_{{\widehat}{r}_n,{\widehat}{D}_n,n})$$ be the nonparametric maximum likelihood estimator.  Then, there exist constants $A$, $C_{\mathrm{pen}}$ and $n_0$ depending only on $\alpha$, $C_\sigma$, $C_B$, $n_*$, $c_*$ and $c_\text{growth}$ such that for all $$n {\geqslant}n_\text{growth}
        \vee n_0
        \vee \exp\left(C_\sigma \left( (1 + C_*) \vee \frac{2-\rho_*}{1-\rho_*} \vee e^2 \right) \right) 
        \vee \exp\left(\frac{B^*}{C_B}\right)
        \vee \exp \sqrt{\frac{C_\sigma}{2}(n_*+1)}{\,},$$ all $t {\geqslant}1$, all $\eta {\leqslant}1$, with probability at least $1 - e^{-t} - 2 n^{-\alpha}$, $$\begin{gathered}
{{\mathbf{K}}}( {\mathbb{P}}_{K^\star, \gamma^\star} \| {\mathbb{P}}_{{\widehat}{r}_n, {\widehat}{Q}_n, {\widehat}{g}_n})
    {\leqslant}(1+\eta) \underset{(r,D) \in {{\mathfrak{P}}}_n}{\inf} \left\{ \inf_{(r,\pi,Q,g) \in T_{r,D}}{{\mathbf{K}}}( {\mathbb{P}}_{K^\star, \gamma^\star} \| {\mathbb{P}}_{r,Q,g} )
     + 2 {\mathrm{pen}}(n,r,D) \right\} \\
        + \frac{A}{\eta} t \frac{(\log n)^8}{n}\end{gathered}$$ as soon as $${\mathrm{pen}}(n,r,D) {\geqslant}\frac{C_{\mathrm{pen}}}{\eta} ( m_{r,D} + r^2 - 1) \frac{(\log n)^{14} \log \log n}{n}{\,}.$$

Let us now check the assumptions. ** \[A$\star$mixing\]** and **\[A$\star$forgetting\]** follow from Lemma 1 of [@lehericy2018misspe] and from H\[hyp\_transitionKernel\] with $\rho_\star = 1 - 4/C^2$, $C_\star = C^2/4$, $n_\star = 1$ and $c_\star = -\log(1 - 2/C)/2$, where $C$ is the constant from H\[hyp\_transitionKernel\]. ** \[A$\star$tail\]** follows from assumption H\[hyp\_densiteEmission\] with $B^\star = \max(1, \log \|b\|_1)$: by definition of $\lambda_b$ and $b$, for all $i \in {{\mathbb{Z}}}$, $k \in {\mathbb{N}}$, $y_{i-k}^i \in ({\mathbb{R}}^d)^{k+1}$ and $v {\geqslant}e$, $$\begin{aligned}
\frac{{\mathrm{d}}{\mathbb{P}}_{Y_i | Y_{i-k}^{i-1}, K^\star, \gamma^\star}}{{\mathrm{d}}\lambda_b}(y_i | y_{i-k}^{i-1})
    = \frac{\int \gamma^\star(y_i - x) {\mathrm{d}}{\mathbb{P}}_{X_i | Y_{i-k}^{i-1}, K^\star, \gamma^\star}(x | y_{i-k}^i)}{b(y_i) / \|b\|_1}
    {\leqslant}\|b\|_1 {\leqslant}v^{B^\star} {\,}.\end{aligned}$$ For each $r {\geqslant}1$ and $D {\geqslant}1$, let $m_{r,D} = \dim_D + rd$. For each $n {\geqslant}1$, let $\sigma_-(n) = (2\log n)^{-1}$ and ${{\mathfrak{P}}}_n = \{ (r,D) : r {\leqslant}\log n \text{ and } \dim_D {\leqslant}n \}$. For $n$ large enough, ${{\mathfrak{P}}}_n$ is indeed a subset of $\{ (r,D) \in ({\mathbb{N}}^*)^2 : r {\leqslant}1 / (2\sigma_-(n)) \text{ and } m_{r,D} {\leqslant}2n\}$. For each $r {\geqslant}1$ and $D {\geqslant}1$, the model $T_{r,D}$ is the set of translation hidden Markov model parameters in $S_{r,D}$ seen as hidden Markov model parameters (with the dominating measure $\lambda_b$ on ${\mathbb{R}}^d$ instead of the Lebesgue measure): $$T_{r,D} = \left\{ \left(r,\pi_Q,Q,\left(y \longmapsto \frac{\gamma(y - x_r)}{b(y) / \|b\|_1}\right)_{z = 1, \dots, r} \right) : ((x_z)_{z=1, \dots, r}, Q, \gamma) \in S_{r,D}, \pi_Q Q = \pi_Q \right\} {\,}.$$ By definition of $S_{r,D}$, for all $(r,\pi,Q,-) \in T_{r,D}$ and $x,x' \in \{1, \dots, r\}$, $Q(x,x') {\geqslant}(Cr)^{-1}$ and $\pi(x) {\geqslant}(Cr)^{-1}$. Thus, for all $(r,\pi,Q,-) \in {{\mathbf{T}}}_n$, $Q(x,x') {\geqslant}(C \log n)^{-1} {\geqslant}\sigma_-(n)$ since $C {\geqslant}2$. The same holds for $\pi$, so that **\[Aergodic\]** is satisfied. 

By H\[hyp\_densiteEmission\], for all $n {\geqslant}1$ and $y \in {\mathbb{R}}^d$, $\sup_{(r,-,-,g) \in {{\mathbf{T}}}_n} \sum_{z=1}^r g_z(y) {\leqslant}\|b\|_1 \log n$, and by H\[hyp\_tails\], $$\inf_{(r,-,-,g) \in {{\mathbf{T}}}_n} \sum_{z=1}^r g_z(y)
    {\geqslant}\|b\|_1 m(y)/b(y){\,},$$ so that by Markov’s inequality, for all $t > 0$, with $\epsilon$ as in H\[hyp\_tails\], $$\begin{aligned}
{\mathbb{P}}_{K^\star, \gamma^\star} \left[ 
    \left(\inf_{(r,-,-,g) \in {{\mathbf{T}}}_n} \sum_{z=1}^r g_z(y)\right)^{-\epsilon}
        {\geqslant}t
\right]
    {\leqslant}\|b\|_1^{-\epsilon} \frac{{\mathbb{E}}_{K^\star, \gamma^\star} [(b(Y_1)/m(Y_1))^{\epsilon}]}{t}{\,},\end{aligned}$$ so that there exists a constant $C_{H\ref{hyp_tails}} > 0$ such that $$\begin{aligned}
{\mathbb{P}}_{K^\star, \gamma^\star} \left[ 
    \inf_{(r,-,-,g) \in {{\mathbf{T}}}_n} \log \sum_{z=1}^r g_z(y)
        {\leqslant}- \frac{1}{\epsilon} u
\right]
    {\leqslant}C_{H\ref{hyp_tails}} e^{-u}{\,}.\end{aligned}$$ Thus, there exists $n_\text{tail}$ such that **\[Atail\]** holds for any $n {\geqslant}n_\text{tail}$ and for any $B(n) {\geqslant}\max(2/\epsilon, \log(\|b\|_1 \log n))$. Choose $B(n) = \log n$.

Finally, **\[Aentropy’\]** is implied by the following assumption, which follows from H\[hyp\_densiteEmission\] and H\[hyp\_modelesParam\] with $c(r,D,A) = c(D,A) + C_\Gamma$.

**\[Aentropy”\]**

:   There exists a mapping $(r,D,A) \in {\mathbb{N}}^* \times {\mathbb{N}}^* \times {\mathbb{R}}_+ \longmapsto c(r,D,A)$ and a constant $c'$ such that $\log c(r,D,A) {\leqslant}c' ( \log m_{r,D} + A )$.  There exists a sequence $(\Theta_D)_{D {\geqslant}1}$ of sets such that for all $D {\geqslant}1$, $\Theta_D \subset [-1,1]^{\dim_D}$ and there exists a surjective mapping $\theta \in \Theta_D \longmapsto \gamma^\theta \in G_D$. For all $r {\geqslant}1$, $D {\geqslant}1$, $A {\geqslant}0$ and $y \in {\mathbb{R}}^d$ such that $\log(b(y)/m(y)) {\leqslant}A$, the mapping $
    (x, \theta) \in \Lambda^r \times \Theta_D \longmapsto (\gamma^\theta(y - x_z) / b(y))_{z \in \{1, \dots, r\}}
    $ is $c(r,D,A)$-Lipschitz (when $\Lambda$ and $\Theta_D$ are endowed with the supremum norm). 

Let us see how this implies **\[Aentropy’\]**.  Let ${{\mathcal{S}}}_{n,A} = \{ y \in {\mathbb{R}}^d : \log(b(y)/m(y)) {\leqslant}A \}$. By H\[hyp\_tails\] and Markov’s inequality, ${\mathbb{P}}^\star(Y_1 \in {{\mathcal{S}}}_{n,A}) {\leqslant}\exp(- A \epsilon / 2)$ for $A$ large enough.  Moreover, for all $A {\geqslant}\log(\|b\|_1 \log n)$ and $y \in {{\mathcal{S}}}_{n,A}$, $$\underset{(r',-,-,g') \in {{\mathbf{T}}}_n}{\sup} \left| \log \sum_{z=1}^{r'} g'_z(y) \right|
    {\leqslant}\max\left( \log \frac{b(y)}{\|b\|_1 m(y)}, \log (\|b\|_1 \log n) \right) {\leqslant}A.$$ A bracket covering of size $\delta$ of $[-1,1]^{rd} \times [-1,1]^{\dim_D}$ gives a bracket covering of size $\delta L$ of $\Lambda^r \times \Theta_D$, which in turn gives bracket covering of size $c(r,D,A) \delta L \|b\|_1$ of the set $$\left\{ \left(y \longmapsto \|b\|_1 \frac{\gamma(y-x_z)}{b(y)} {{\mathbf{1}}}_{y \in {{\mathcal{S}}}_{n,A}} \right)_{z = 1, \dots, r} : x \in \Lambda^r, \gamma \in G_D \right\}.$$ Since there exists a bracket covering of size $\delta$ of $[-1,1]$ with cardinality at most $\max(2/\delta, 1)$, Equation (\[eq\_bracketing\_entropy\]) of **\[Aentropy’\]** holds with $C_\text{aux}(r,D,n,A) = 2 c(r,D,A) L \|b\|_1$. Finally, since $\sup_{(r,D) \in {{\mathfrak{P}}}_n} \log c(r,D,A) {\leqslant}c' (\log n + A)$, the last part of **\[Aentropy’\]** holds. 

Thus, Theorem \[TH\_ORACLE\_SIMPLIFIE\] holds and ensures that there exists $n_0$, $C_{\mathrm{pen}}$ and $A$ such that if ${\mathrm{pen}}(n,r,D) {\geqslant}C_{\mathrm{pen}}(m_{r,D}+r^2-1) (\log n)^{14}/n$, then for all $n {\geqslant}n_0$ and $t {\geqslant}1$, with probability at least $1 - e^{-t} - 2n^{-2}$, $$\begin{gathered}
{{\mathbf{K}}}( {\mathbb{P}}_{K^\star, \gamma^\star} \| {\mathbb{P}}_{{\widehat}{{{\mathfrak{X}}}}_n, {\widehat}{Q}_n, {\widehat}{\gamma}_n})
    {\leqslant}2 \underset{(r,D) \in {{\mathfrak{P}}}_n}{\inf} \left\{ \inf_{({{\mathfrak{X}}},Q,\gamma) \in S_{r,D}}{{\mathbf{K}}}( {\mathbb{P}}_{K^\star, \gamma^\star} \| {\mathbb{P}}_{{{\mathfrak{X}}},Q,\gamma} )
     + 2 {\mathrm{pen}}(n,r,D) \right\} \\
        + A t \frac{(\log n)^8}{n}\end{gathered}$$ and Proposition \[prop\_oracle\_simplifie\] follows by taking $t = 2 \log n$ and recalling that $m_{r,D} = \dim_D + rd$ and ${{\mathfrak{P}}}_n = \{(r,D) : r {\leqslant}\log n \text{ and } \dim_D {\leqslant}n \}$.

Additional Simulations based on Least Squares for Characteristic Functions {#sec:simu:appendix}
==========================================================================

In this section, the empirical least squares criterion $M_n(R)$ introduced in Section \[sec:least:squares\] is approximated to obtain a practical estimate of $R$ using the same model as in Section \[sec:simu\].  The estimate $\widehat {\Phi}_{n}$ of the characteristic function of the observations $(Y_1,Y_2)$ is given for all $(t_{1},t_{2})\in\mathbb{R}^2$ by $$\widehat {\Phi}_{n}(t_1,t_2) = \frac{1}{n}\sum_{j=1}^{n-1} \mathrm{e}^{it_1 Y_j + it_2 Y_{j+1}}{\,}.$$ The function $w$ is set as the probability density function of a Gaussian random variable with standard deviation $\sigma =3$ and $M_n$ is estimated by the Monte Carlo estimate: $$\widehat{M}_n(R) = \frac{1}{N}\sum_{\ell=1}^N \left\vert   \widehat {\Phi}_{n}(U_1^\ell,U_2^\ell)\Phi_{R}(U_1^\ell;0)\Phi_{R}( 0; U_2^\ell)  -
  \Phi_{R}(U_1^\ell,U_2^\ell)\widehat {\Phi}_{n}(U_1^\ell;0)\widehat {\Phi}_{n}( 0; U_2^\ell)
  \right\vert^{2}{\,},$$ where $(U_1^\ell,U_2^\ell)_{1{\leqslant}\ell {\leqslant}N}$ are independent and identically distributed with distribution $w$. In the following experiments, $N$ is set to $5000$. This estimated criterion is minimized over the set $\mathcal{D}_r$ of piecewise constant probability densities on $(-1,1)\times(-1,1)$ with $r^2$ uniformly spaced cells: $$\mathcal{D}_r = \Big\{R: \mathbb{R}^2\to \mathbb{R}_+{\,};{\,}R = \sum_{i,j=1}^r \alpha_{i,j} \mathds{1}_{(x_i,x_{i+1})\times(x_j,x_{j+1})}\Big\}{\,},$$ where for all $1{\leqslant}i,j{\leqslant}r$, $x_i = -1 + 2(i-1)/r$, $\alpha_{i,j}{\geqslant}0$ and $\sum_{i,j=1}^r \alpha_{i,j} = r^{-2}$. In this setting where the support of the law of $(X_1,X_2)$ is compact and known, the up to translation indeterminacy is ruled out.  The optimization is performed using the Covariance Matrix Adaptation Evolutionary Strategy [@igel:hansen:roth:2007] which optimizes iteratively all parameters using $(\mu,\lambda)$-selection.  At each iteration, the best offsprings of the current parameter estimate are combined to form the population of the following iteration and the other offsprings are discarded. 

The performance of the least squares approach is assessed by comparing the estimated probability that $(X_1,X_2)$ lies in each cell $(x_i,x_{i+1})\times(x_j,x_{j+1})$, $1{\leqslant}i,j{\leqslant}r$, which is $\widehat\alpha^n_{i,j} r^2$ and the benchmark estimation $\widetilde\alpha^{\mathsf{n,emp}}_{i,j}$ that would be computed if the sequence $(X_k)_{1{\leqslant}k {\leqslant}n}$ were observed: $\widetilde p^{\mathsf{n,emp}}_{i,j}  = n^{-1}\sum_{k=1}^{n-1}\mathds{1}_{(x_i,x_{i+1})\times(x_j,x_{j+1})}(X_k,X_{k+1})$. The results are displayed in Figure \[fig:leastsquares:L1\] over $10$ independent runs, when the order $r$ is in $\{10,20,30\}$, with CMA-ES initialized at a random point, and a maximum number of evaluations of $\widehat{M}_n(R)$ set to 75000.  Each estimate is obtained with a sequence of $n=100000$ observations and the $\mathrm{L}_1$ score is $$\label{eq:L1scores}
\varepsilon^r_{1,n} = \frac{1}{r^2}\sum_{i,j=1}^{r}\left|r^2\widehat\alpha^n_{i,j}-\widetilde p^{\mathsf{n,emp}}_{i,j}\right|{\,}.$$ The associated estimated probabilities for the distribution of $X_1$ are displayed in Figure \[fig:leastsquares:X1\] with their confidence regions. 

![ $\mathrm{L}_1$ scores computed according to .  Each dot is an estimated value with the least squares approach.  For each value of $r$, the mean value (squares) over all runs as long as the empirical standard deviation (bars) are displayed.[]{data-label="fig:leastsquares:L1"}](LS_L1scores.png){width=".9\textwidth"}

![ Estimated probabilities associated with the marginal distribution of $X_1$ for $r=10$ (top), $r = 20$ (middle) and $r = 30$ (bottom).  The blue line is the empirical estimate when the sequence $(X_k)_{1{\leqslant}k {\leqslant}n}$ is observed (mean estimate over the 10 Monte Carlo runs).  Each dot is an estimated value with the least squares approach.  For each value of $r$, the mean value (squares) over all runs as long as the empirical standard deviation (bars) are displayed.[]{data-label="fig:leastsquares:X1"}](LS_hit_10.png){width=".83\textwidth"}

![ Estimated probabilities associated with the marginal distribution of $X_1$ for $r=10$ (top), $r = 20$ (middle) and $r = 30$ (bottom).  The blue line is the empirical estimate when the sequence $(X_k)_{1{\leqslant}k {\leqslant}n}$ is observed (mean estimate over the 10 Monte Carlo runs).  Each dot is an estimated value with the least squares approach.  For each value of $r$, the mean value (squares) over all runs as long as the empirical standard deviation (bars) are displayed.[]{data-label="fig:leastsquares:X1"}](LS_hit_20.png){width=".83\textwidth"}

![ Estimated probabilities associated with the marginal distribution of $X_1$ for $r=10$ (top), $r = 20$ (middle) and $r = 30$ (bottom).  The blue line is the empirical estimate when the sequence $(X_k)_{1{\leqslant}k {\leqslant}n}$ is observed (mean estimate over the 10 Monte Carlo runs).  Each dot is an estimated value with the least squares approach.  For each value of $r$, the mean value (squares) over all runs as long as the empirical standard deviation (bars) are displayed.[]{data-label="fig:leastsquares:X1"}](LS_hit_30.png){width=".83\textwidth"}
