Random perturbations of stochastic processes with unbounded variable length memory

We consider binary inﬁnite order stochastic chains perturbed by a random noise. This means that at each time step, the value assumed by the chain can be randomly and independently ﬂipped with a small ﬁxed probability. We show that the transition probabilities of the perturbed chain are uniformly close to the corresponding transition probabilities of the original chain. As a consequence, in the case of stochastic chains with unbounded but otherwise ﬁnite variable length memory, we show that it is possible to recover the context tree of the original chain, using a suitable version of the algorithm Context, provided that the noise is small enough.


Introduction
The original motivation of this paper is the following question.Is it possible to recover the context tree of a variable length Markov chain from a noisy sample of the chain.We recall that in a variable length Markov chain the conditional probability of the next symbol, given the past, depends on a variable portion of the past whose length depends on the past itself.This class of models were first introduced by Rissanen (1983) who called them finite memory sources or tree machines.They recently became popular in the statistics literature under the name of variable length Markov chains coined by Bühlmann and Wyner (1999).
The notion of variable memory model can be naturally extended to a non Markovian situation where the contexts are still finite, but their lengths are no longer bounded.We refer the reader to Galves and Löcherbach (2008) for a recent survey of the topic.This leads us to consider not only randomly perturbed unbounded variable length memory models, but more generally randomly perturbed infinite order stochastic chains.
We will consider binary chains of infinite order in which at each time step the value assumed by the chain can be randomly and independently flipped with a small fixed probability.Even if the original chain is Markovian, the perturbed chain is in general a chain of infinite order.(we refer the reader to Fernández et al. (2001) for a self contained introduction to chains of infinite order).We show that the transition probabilities of the perturbed chain are uniformly close to the corresponding transition probabilities of the original chain.More precisely, we prove that the difference between the conditional probabilities of the next symbol given a finite past of any fixed length is uniformly bounded above by the probability of flipping, multiplied by a fixed constant.This is the content of our first theorem.
Using this result we are able to solve our original problem of recovering the context tree of a chain with unbounded variable length from a noisy sample.To make this point clear, we recall the notion of context.In his original paper, Rissanen used the word context to designate the minimal suffix of the string of past symbols which is enough to define the probability of the next symbol.Rissanen also observed that the set of all contexts satisfies the suffix property, which means that no context is a proper suffix of another context.This property allows to represent the set of all contexts as the set of leaves of a rooted labeled tree, henceforth called the context tree of the chain.With this representation the process is described by the tree of all contexts and an associated family of probability measures over the set of symbols, indexed by the leaves of the tree.Given a context, its associated probability measure gives the probability of the next symbol for any past having this context as a suffix.
In his paper Rissanen not only introduced the class of variable memory models but he also introduced the algorithm Context to estimate both the context tree and the associated family of probability transition.The way the algorithm Context works can be summarized as follows.Given a sample produced by a chain with variable memory, we start with a maximal tree of candidate contexts for the sample.The branches of this first tree are then pruned until we obtain a minimal tree of contexts well adapted to the sample.
From Rissanen (1983) to Galves et al. (2008), passing by Ron et al. (1996) and Bühlmann and Wyner (1999), several variants of the algorithm Context have been presented in the literature.In all the variants the decision to prune a branch is taken by considering a cost function.A branch is pruned if the cost function assumes a value smaller than a given threshold.The estimated context tree is the smallest tree satisfying this condition.The estimated family of probability transitions is the one associated to the minimal tree of contexts.
The proof of the weak consistency of the algorithm Context when the tree of contexts is finite was done in Rissanen (1983).This result was extended in Bühlmann and Wyner (1999) where the weak consistency of the algorithm was proved in the finite case, but allowing the maximal length of the memory to grow with the size of the sample.In both papers the cost function was defined using the log likelihood ratio test to compare two candidate trees and the main ingredient of the consistency proofs was the chi-square approximation to the log likelihood ratio test for Markov chains of fixed order.
The unbounded case was considered by Ferrari and Wyner (2003), Duarte et al. (2006) and Csiszár and Talata (2006).The first two papers essentially extend to the unbounded case the original chisquare approach introduced by Rissanen.Instead of the chi-square, the last paper uses penalized likelihood algorithms, related to the Bayesian Information Criterion (BIC), to estimate the context tree.We refer the reader to Csiszár and Talata (2006) for a nice description of other approaches and results in this field, including the context tree maximizing algorithm by Willems et al. (1995).
In the present paper we use a variant of the algorithm Context introduced in Galves et al. (2008) for finite trees and extended to unbounded trees in Galves and Leonardi (2008).In this variant, the decision of pruning a branch is taken by considering the difference between the estimated conditional probabilities of the original branch and the pruned one, using a suitable threshold.Using exponential inequalities for the estimated transition probabilities associated to the candidate contexts, these papers not only show the consistency of this variant of the algorithm Context, but also provide an exponential upper bound for the rate of convergence.This version of the algorithm Context does not distinguish transition probabilities which are closer than the threshold level used in the pruning decision.Our first theorem proves that the conditional probabilities of the original variable memory chain and of the perturbed one are uniformly close if the probability of random flipping is small enough.Hence it is natural to expect that with this version of the algorithm Context, one should be able to retrieve the original context tree out from the noisy sample.This is actually the case, as we prove in the second theorem.
The paper is organized as follows.In section 2 we give the definitions and state the main results.Section 3 and 4 are devoted to the proof of Theorem 1 and 2, respectively.Given two sequences w and v, with (w) < ∞, we will denote by vw the sequence of length (v) + (w) obtained by concatenating the two strings.We say that the sequence s is a suffix of the sequence w if there exists a sequence u, with (u) ≥ 1, such that w = us.In this case we write s ≺ w.When s ≺ w or s = w we write s w.Given a finite sequence w we denote by suf(w) the largest suffix of w.

Let
We consider a stationary ergodic stochastic process (X t ) t∈ over A = {0, 1}.Given a sequence w ∈ A −1 −∞ and a symbol a ∈ A, we denote by the regular version of the conditional probability of the process.Given a finite sequence w ∈ A −1 − j we denote by p(w) = (X −1 − j = w) the stationary probability of the cylinder defined by the sequence w.
We assume the process (X t ) satisfies the following conditions 2. Summable continuity rate, that is where the sequence {β k } k∈ is defined by Here, w k = v means that there exists a sequence u with (u) = k such that u ≺ w and u ≺ v.The sequence {β k } k∈ is called the continuity rate.
In this paper we are interested on the effect of a Bernoulli noise flipping, independent from the successive symbols of the process (X t ).Namely, let (ξ t ) t∈ be an i.i.d.sequence of random variables taking values in {0, 1}, independent of (X t ), with where ε is a fixed noise parameter in (0, 1).For a and b in {0, 1}, we define and ā = 1 ⊕ a.We now define the stochastically perturbed chain (Z t ) t∈ by In the case ε = 1/2, (Z t ) is an i.i.d.uniform Bernoulli.However, generically it is a process of infinite order.
In what follows we will use the shorthand notation q(w −1 − j ) to denote the transition probabilities corresponding to the process (Z t ).We can now state our first theorem.
Theorem 1.For (X t ) and (Z t ) as above, for any ε ∈ (0, 1) and for any k ≥ 0, sup {|q(a|w where Remark.Here and throughout the rest of the paper we accept conditional events defined by empty sequences, for example the ones appearing in Theorem 1 when k = 0.In these cases the convention is that these events are removed from the conditional expressions. Definition 2.1.A sequence w ∈ A −1 − j is a context for the process (X t ) if it satisfies 1.For any semi-infinite sequence x −1 −∞ having w as a suffix , for all a ∈ A.

No suffix of w satisfies (1).
An infinite context is a semi-infinite sequence w −1 −∞ such that any of its suffixes w −1 − j , j = 1, 2, . . . is a context.Definition 2.1 implies that the set of all contexts (finite or infinite) can be represented as a rooted tree.This tree is called the context tree of the process (X t ) and will be denoted by .The nonnullness hypothesis implies that the context tree of the process (X t ) is complete, i.e., any sequence in A −1 −∞ belongs to or has a suffix that belongs to .We say that the context tree is bounded if it has a finite number of sequences.In the infinite case we say that is unbounded.Examples of bounded and unbounded context trees related to renewal processes are presented in Csiszár and Talata (2006).
Given an integer K we will denote by | K the tree truncated to level K, that is Our interest is to recover the truncated context tree of the process (X t ) from a sample of the noisy process (Z t ).We will assume z 1 , z 2 . . ., z n is a sample of the process (Z t ).For any finite string w with (w) ≤ n, we denote by N n (w) the number of occurrences of the string in the sample, that is For any element a ∈ A and any finite sequence w, the empirical transition probability qn (a|w) is defined by where The variant of Rissanen's context tree estimator is defined as follows.First of all, let us define for any finite string w, The ∆ n (w) operator computes a distance between the empirical transition probabilities associated to the sequence w and the one associated to the sequence suf(w). .
In order to state our second theorem we need some definitions.Given an integer k ≥ 1, define for some a ∈ A} and From the definition we can see that D k > 0 for all k ≥ 1.
The second main result in this paper is the following.
Theorem 2. Let K be an integer and let z 1 , z 2 . . ., z n be a sample of the perturbed process (Z t ).Then, there exist constants c, n 0 and an integer d depending on the process (X t ) such that for any ε ∈ (0, D d /2c), any δ ∈ (cε, D d − cε) and any n ≥ n 0 we have The constants are all explicit and are given by .
As a consequence we obtain the following strong consistency result.
Corollary 3.For any integer K and for almost all infinite sample z 1 , z 2 . . .there exists a n such that, for any n ≥ n we have , where d and δ are chosen as in Theorem 2.

Proof of Theorem 1
We start by proving three preparatory lemmas.
Lemma 4. For any ε ∈ (0, 1), any k > j ≥ 0, any w 0 −∞ and any a, b ∈ A, Proof.We observe that for j ≥ 0 it follows from conditioning on the values of X and the independence of the flipping procedure that It is easy to see using conditioning on the infinite past that Then, using continuity we have and the assertion of the Lemma follows immediately.
Lemma 5.For any ε ∈ (0, 1), any k ≥ 0 and any w Proof.We first observe that It is therefore enough to prove the second assertion.From conditioning on the value of X −1 −l , the independence of the flipping procedure and the inequalities in (3.1) we have and for each l, the expression in the right hand side is lower bounded by α.Then, the same holds for the limit when l → ∞.For the last assertion we first observe that and using non-nullness and log-continuity this can be bounded below by This finishes the proof of the Lemma.
Lemma 6.For any ε ∈ (0, 1), any k > j ≥ 0 and any w 0 −k , Proof.We have It follows from Lemma 5 that This concludes the proof of Lemma 6.
Proof of Theorem 1.We first observe that for any a ∈ A and any and if k = 0 the Theorem is proved.We will now assume k ≥ 1 and we write We will bound each term in the sum separately.We can write The above sum has two terms.For the term with b = w−j−1 we can use Lemma 4, Lemma 6 and the inequalities in (3.1) to obtain For the other term with b = w − j−1 we can write Note that the term with c = w − j−1 vanishes.For c = w−j−1 we can use Lemma 4 and the inequalities in (3.1) to bound above the last sum with Putting all the above bounds together we get and the Theorem follows.

Proof of Theorem 2
The proof relies on five lemmas.The first one is Lemma 3.4 from Galves and Leonardi (2008).For the convenience of the reader we recall this result.
Lemma 7 (Galves, Leonardi).Let (X t ) be a stationary stochastic process satisfying the non-nullness and the summable continuity rate hypotheses.Then, there exists a summable sequence (ρ l ) l∈ , satisfying such that for any i ≥ 1, any k > i, any j ≥ 1 and any finite sequence w j 1 , the following inequality holds The constants α and β appearing in the statement of the lemma were defined in Section 2. For a probabilistic interpretation of the sequence (ρ l ) l∈ we refer the reader to Galves and Leonardi (2008).
The above lemma will be used in the proof of the following result involving the same quantities α, β and (ρ l ) l∈ .
Lemma 8.There exists a summable sequence (ρ l ) l∈ , satisfying l∈ such that for any i ≥ 1, any k ≥ i, any j ≥ 1 and any finite sequence w j 1 , the following inequality holds Proof.Observe that for any x i 1 , θ i 1 ∈ A i 1 , by the independence of the flipping procedure we have The last term can be rewritten as ) .
Using lemma 7, this last expression is bounded above by This concludes the proof of Lemma 8.
The proof of the next lemma uses Proposition 4 from Dedecker and Doukhan (2003).For the convenience of the reader, we recall this result.
Proposition 9 (Dedecker, Doukhan).Let (Y t ) t∈ be a sequence of centered and square integrable random variables and let i denote the σ-algebra generated by Y 0 , . . ., Then, for any p ≥ 2, Lemma 10.For any finite sequence w and any t > 0 we have .
Moreover, for any a ∈ A and any n > |A|+1 tq(w) + (w) we have .
Proof.Observe that for any finite sequence w j Define the process {U t : t ∈ } by and denote by i the σ-algebra generated by U 0 , . . ., U i .Applying Proposition 9 we obtain for any r ≥ 2 Note that U t r 2 ≤ 1 for any r ≥ 2. On the other hand we have sup Therefore, using Lemma 8 we obtain the bound Then, as in Dedecker and Prieur (2005) we obtain that, for any t > 0, .
Then, for all n ≥ (|A| + 1)/tq(w) + (w) we have that qn (a|w) − q(a|w) > t ≤ N n (wa) + 1 N n (w•) + |A| − (n − (w))q(wa) + 1 (n − (w))q(w) + |A| > t − |A| + 1 (n − (w))q(w) Denote by t = t − (|A| + 1)/(n − (w))q(w).Then A denote the binary alphabet {0, 1}, with size |A| = 2. Given two integers m ≤ n we denote by w n m the sequence w m , . . ., w n of symbols in A and A n m denotes the set of such sequences.The length of the sequence w n m is denoted by (w n m ) and is defined by (w n m ) = n − m + 1.Any sequence w n m with m > n represents the empty string.The same notation is extended to the case m = −∞.