# Patent

## Title
Embedded bayesian network for pattern recognition

## Abstract

A pattern recognition procedure forms a hierarchical statistical model using a hidden Markov model and a coupled hidden Markov model. The hierarchical statistical model supports a pa 20 layer having multiple supernodes and a child layer having multiple nodes associated with each supernode of the parent layer. After training, the hierarchical statistical model uses observation vectors extracted from a data set to find a substantially optimal state sequence segmentation.

## Background
FIELD OF THE INVENTION
The present invention relates to computer mediated pattern detection. More particularly, the present invention relates to improved Bayesian networks for classifying data.
BACKGROUND
Bayesian networks such as those represented by the hidden Markov model (HMM) and coupled Hidden Markov (CHMM) models have long been used to model data for the purposes of pattern recognition. Any discrete time and space dynamical system governed by such a Bayesian network emits a sequence of observable outputs with one output (observation) for each state in a trajectory of such states. From the observable sequence of outputs, the most likely dynamical system can be calculated. The result is a model for the underlying process. Alternatively, given a sequence of outputs, the most likely sequence of states can be determined.
For example, one dimensional HMMs have been widely used in speech recognition to model phonemes, words, or even phrases, and two dimensional HMMs have been used for image processing tasks. One of the important characteristics of a HMM is its ability to cope with variations in feature space, allowing data modeling with variations along different dimensions. Coupled hidden Markov models can be similarly employed, since they correspond to a generalization of a HMM. A CHMM may comprise a collection of HMMs, each of which corresponds to a data channel.



BRIEF DESCRIPTION OF THE DRAWINGS
The inventions will be understood more fully from the detailed description given below and from the accompanying drawings of embodiments of the inventions which, however, should not be taken to limit the inventions to the specific embodiments described, but are for explanation and understanding only.
FIG. 1 schematically illustrates a data classification system;
FIG. 2 generically illustrates an embedded hidden Markov model-coupled hidden Markov model (HMM-CHMM) structure;
FIG. 3 is a flow diagram illustrating training of an embedded HMM-CHMM; and
FIG. 4 generically illustrates an embedded coupled hidden Markov model-hidden Markov model (CHMM-HMM) structure.



DETAILED DESCRIPTION
FIG. 1 generally illustrates a system 10 for data analysis of a data set 12 using an embedded Bayesian network that includes a hidden Markov model (HMM) and a coupled hidden Markov model (CHMM). A embedded Bayesian network is used because it has good generalization performance even for high dimensional input data and small training sets.
The data set 12 can include static or video imagery 14 containing objects to be identified or classified, including but not limited to textual characters, ideographs, symbols, fingerprints, or even facial imagery 15. In addition, non-image data sets such as bioinformatic databases 16 containing, for example, gene or protein sequences, DNA microarray data, sequence data, phylogenetic information, promoter region information; or textual, linguistic, or speech analysis data suitable for machine learning/identification 18 can be used. The same data set can be optionally used both to train and classify data with the appropriate training module 20 and classification module 22.
The processing procedure for system 10 maybe performed by a properly programmed general-purpose computer alone or in connection with a special purpose computer. Such processing may be performed by a single platform or by a distributed processing platform. In addition, such processing and functionality can be implemented in the form of special purpose hardware, custom application specific integrated circuits (ASICs), configurable FPGA circuits, or in the form of software or firmware being run by a general-purpose or network processor. Data handled in such processing or created as a result of such processing can be stored in any memory as is conventional in the art. By way of example, such data may be stored in a temporary memory, such as in the RAM of a given computer system or subsystem. In addition, or in the alternative, such data may be stored in longer-term storage devices, for example, magnetic disks, rewritable optical disks, and so on. For purposes of the disclosure herein, a computer-readable media may comprise any form of data storage mechanism, including such existing memory technologies as well as hardware or circuit representations of such structures and of such data.
FIG. 2 generically illustrates a logical structure 30 of an embedded hidden Markov model-coupled hidden Markov model (HMM-CHMM). As seen in FIG. 2, HMM-CHMM is a hierarchical statistical model that includes a HMM parent layer 32 (collectively formed from nodes 33) and a CHMM child layer 34 (collectively formed from nodes 35). The child layer 34 associates one CHMM node 35 to each node 33 in the parent layer 32, and the parameters of the individual CHMMs remain independent from each other. Instead, the parameters of each child layer CHMM depend upon the state of the connected parent node 33. Typically, for multidimensional data sets, the HMM in the parent layer 32 is associated with at least one dimension, and the CHMM child layers are associated with data in an orthogonal dimension with respect to the parent layer.
Formally defined, the elements of an embedded HMM-CHMM have:an initial super state probability π0,0 and a super state transition probability from super state j to super state i, a0,t|j, where super state refers to the state of the parent layer 32 HMM node 33.
For each super state k the parameters of the corresponding CHMM are defined to have an initial state probability in a channel of

c=1, . . . , C1,π1,0k,c;

a state transition probability from state sequence j to state:

ic,a1,iC|j;k,c 

and an observation probability:

bt0,t1k,c(jc).

In a continuous mixture with Gaussian components, the probability of the observation vector O is given by:





  
    
      
        
          
            b
            
              k
              ,
              c
            
          
          ⁡
          
            (
            
              j
              c
            
            )
          
        
        =
        
          
            ∑
            
              m
              =
              1
            
            
              M
              j
              
                k
                ,
                c
              
            
          
          ⁢
          
            
          
          ⁢
          
            
              ω
              
                j
                ,
                m
              
              
                k
                ,
                c
              
            
            ⁢
            
              N
              ⁡
              
                (
                
                  O
                  ,
                  
                    μ
                    
                      j
                      ,
                      m
                    
                    
                      k
                      ,
                      c
                    
                  
                  ,
                  
                    U
                    
                      j
                      ,
                      m
                    
                    
                      k
                      ,
                      c
                    
                  
                
                )
              
            
          
        
      
    
  
  
    
      
        where
        ⁢
        
          
        
        ⁢
        
          μ
          
            j
            ,
            m
          
          
            k
            ,
            c
          
        
        ⁢
        
          
        
        ⁢
        and
        ⁢
        
          
        
        ⁢
        
          U
          
            j
            ,
            m
          
          
            k
            ,
            c
          
        
      
    
  




are the mean and covariance matrix of the mth mixture of the Gaussian mixture corresponding to the jth state in the cth channel,

Mjk,c 

is the number of mixtures corresponding to the jth state of the cth channel, and

ωj,mk,c 

is a weight associated with the corresponding mixture.

Observation sequences are used to form observation vectors later used in training and classifying. For example, the observation sequence for a two-dimensional image maybe formed from image blocks of size Lx×Ly that are extracted by scanning the image from left-to-right and top-to-bottom. Adjacent image blocks may be designed to have an overlap by Py rows in the vertical direction and Px columns in the horizontal direction. In one possible embodiment, with blocks size of Ly=8 rows and Lx=8 columns, a six DCT coefficients (a 3×2 low-frequency array) may be employed to create the overlap.
The resulting array of observation vectors may correspond to size of T0×T1, where T0 and T1 are the number of observation vectors extracted along the height (H) and the width (W) of the image, respectively. T0 and T1 may be computed accordingly as:




  
    
      
        
          
            T
            0
          
          =
          
            
              
                H
                -
                
                  L
                  y
                
              
              
                
                  L
                  y
                
                -
                
                  P
                  y
                
              
            
            +
            1
          
        
        ,
      
    
  
  
    
      
        
          T
          1
        
        =
        
          
            
              W
              -
              
                L
                x
              
            
            
              
                L
                x
              
              -
              
                P
                x
              
            
          
          +
          1
        
      
    
  




Consecutive horizontal and vertical observation vectors may also be grouped together to form observation blocks. This may be used as a way to consolidate local observations and at the same time to reduce the total amount of observations. In practice, this data grouping serves application needs and improve recognition efficiency.
To compute the number of observation blocks, denote the number of observation blocks in the vertical and horizontal direction be T00 and T10, respectively. Then,




  
    
      
        
          T
          0
          0
        
        =
        1
      
    
  
  
    
      
        
          T
          1
          0
        
        =
        
          
            T
            1
          
          
            C
            1
          
        
      
    
  




In addition, denote the number of observation vectors in the horizontal and vertical direction within each observation block by T01 and T11, respectively, where





  
    
      
        
          T
          0
          1
        
        =
        
          T
          1
        
      
    
  
  
    
      
        
          T
          1
          1
        
        =
        
          C
          1
        
      
    
  




Furthermore, denote Ot0,t1,c as the t1th observation vector corresponding to the cth channel within the observation block t0.

Although any suitable state sequence segmentation can be used, a modified Viterbi algorithm for the HMM-CHMM is preferred. Application of this modified Viterbi algorithm determines the optimal state and super state segmentation of the observation sequence. The best super state probability for the observation block t0 given super state i of super channel s, is denoted as Pt0 (i). Corresponding optimal state and optimal state sequence βt0,t1,c (i) may then be computed for each super observation. The following states are first initialized:

δ(i)=π0,0(i)Pt0(i)

ψ0(i)=0

The following states are then recursively determined:





  
    
      
        
          
            δ
            
              t
              0
            
          
          ⁡
          
            (
            i
            )
          
        
        =
        
          
            max
            j
          
          ⁢
          
            {
            
              
                
                  δ
                  
                    
                      t
                      0
                    
                    -
                    1
                  
                
                ⁡
                
                  (
                  j
                  )
                
              
              ⁢
              
                a
                
                  0
                  ,
                  
                    i
                    |
                    j
                  
                
              
              ⁢
              
                
                  P
                  
                    t
                    0
                  
                
                ⁡
                
                  (
                  i
                  )
                
              
            
            }
          
        
      
    
  
  
    
      
        
          
            ψ
            
              t
              0
            
          
          ⁡
          
            (
            i
            )
          
        
        =
        
          arg
          ⁢
          
            
          
          ⁢
          
            
              max
              j
            
            ⁢
            
              {
              
                
                  
                    δ
                    
                      
                        t
                        0
                      
                      -
                      1
                    
                  
                  ⁡
                  
                    (
                    j
                    )
                  
                
                ⁢
                
                  a
                  
                    0
                    ,
                    
                      i
                      |
                      j
                    
                  
                
                ⁢
                
                  
                    P
                    
                      t
                      0
                    
                  
                  ⁡
                  
                    (
                    i
                    )
                  
                
              
              }
            
          
        
      
    
  




The termination condition is then computed:

P=maxi{δT0(i)}

αT0=arg maxi{δT0(i)}

Based on the computed termination condition, a backtracking operation is performed:

αT0=ψ0,t+1(αT0+1)

qt0,t1,c0=αt0 

qt0,t1,c1=βt0,t1,c(αt0)

FIG. 3 is a flow diagram 40 illustrating training of an embedded HMM-CHMM based on the Viterbi algorithm, according to embodiments of the present invention. To train an HMM-CHMM based on given training data, observation vectors are first extracted from the training data set and organized in observation blocks (module 42). These observation blocks are uniformly segmented (module 44), replaced by an optimal state segmentation algorithm (module 46), have their model parameters estimated (module 48), and observation likelihood determined (module 50). As will be appreciated, the training may be iterative, with each training data set used individually and iteratively to update model parameters until the observation likelihood computed is smaller than a specified threshold.
More specifically, the training data set may be segmented along a first dimension according to the number of super states, into a plurality of uniform segments each of which corresponding to a super state. Based on the uniform segmentation at the super layer, the observation vectors within each uniform segment may then be uniformly segmented according to the number of channels and number of states of each child CHMM.
The density function of each state (including both super states as well as child states) may be initialized before the training takes place. For example, if Gaussian mixture model is adopted for each state, Gaussian parameters for each of the mixture component may need to be initialized. Different approaches may be employed to achieve the initialization of model parameters. For example, one embodiment may be implemented where the observation sequence assigned to each channel c and state j, and super state k and super channel s may be assigned to Mjk,c clusters using, for example, the K-means algorithm.
During the process of training, the original uniform segmentation is updated based on the optimal state segmentation using the Viterbi algorithm or other suitable algorithms. To update the density function of a state, particular relevant parameters to be updated may be determined prior to the update operation.
The selection of a Gaussian mixture component for each state j channel c and super state k is also required. One exemplary criterion to make the selection may correspond to assigning the observation to Ot0,t1,c(r) from the rth training sample in the training set to the Gaussian component for which the Gaussian density function




  N
  ⁡
  
    (
    
      
        
          O
          
            
              t
              0
            
            ,
            
              t
              1
            
            ,
            c
          
          
            (
            r
            )
          
        
        ;
        
          μ
          
            j
            ,
            m
          
          
            k
            ,
            c
          
        
      
      ,
      
        U
        
          j
          ,
          m
        
        
          k
          ,
          c
        
      
    
    )
  




is the highest.

The parameters are then estimated using, for example, an extension of the segmental K-means algorithm. In particular, the estimated transition probability




  a
  
    0
    ,
    
      
        i
        c
      
      |
      j
    
  
  ′




between super states is and j may be obtained as follows:





  
    a
    
      0
      ,
      
        i
        |
        j
      
    
    ′
  
  =
  
    
      
        
          ∑
          r
          
            
          
        
        ⁢
        
          
        
        ⁢
        
          
            ∑
            
              t
              0
            
            
              
            
          
          ⁢
          
            
          
          ⁢
          
            ∑
            
              t
              1
            
            
              
            
          
        
      
      ⁢
      
        
      
      ⁢
      
        ∈
        
          t
          0
        
        
          (
          r
          )
        
      
      ⁢
      
        (
        
          i
          ,
          j
        
        )
      
    
    
      
        
          ∑
          r
          
            
          
        
        ⁢
        
          
        
        ⁢
        
          
            ∑
            
              t
              0
            
            
              
            
          
          ⁢
          
            
          
          ⁢
          
            
              ∑
              
                t
                1
              
              
                
              
            
            ⁢
            
              ∑
              l
              
                
              
            
          
        
      
      ⁢
      
        
      
      ⁢
      
        ∈
        
          t
          0
        
        
          (
          r
          )
        
      
      ⁢
      
        (
        
          i
          ,
          l
        
        )
      
    
  




where ∈t0(r) (i,l) may equal to one if a transition from super state l to the super state i occurs for the observation block (t0) and zero otherwise. The estimated transition probabilities





  a
  
    1
    ,
    
      
        i
        c
      
      |
      j
    
  
  
    
      ′
      ⁢
      
        
      
      ⁢
      k
    
    ,
    c
  




from embedded state sequence j to the embedded state ic in channel c of super state k may then be obtained as follows,





  
    a
    
      1
      ,
      
        
          i
          c
        
        |
        j
      
    
    
      
        ′
        ⁢
        
          
        
        ⁢
        k
      
      ,
      c
    
  
  =
  
    
      
        ∑
        r
        
          
        
      
      ⁢
      
        
      
      ⁢
      
        
          ∑
          
            t
            0
          
          
            
          
        
        ⁢
        
          
        
        ⁢
        
          
            ∑
            
              t
              1
            
            
              
            
          
          ⁢
          
            
          
          ⁢
          
            
              θ
              
                
                  t
                  0
                
                ,
                
                  t
                  1
                
              
              
                (
                r
                )
              
            
            ⁡
            
              (
              
                k
                ,
                c
                ,
                
                  i
                  c
                
                ,
                j
              
              )
            
          
        
      
    
    
      
        ∑
        r
        
          
        
      
      ⁢
      
        
      
      ⁢
      
        
          ∑
          
            t
            0
          
          
            
          
        
        ⁢
        
          
        
        ⁢
        
          
            ∑
            
              t
              1
            
            
              
            
          
          ⁢
          
            
              ∑
              l
              
                
              
            
            ⁢
            
              
            
            ⁢
            
              
                θ
                
                  
                    t
                    0
                  
                  ,
                  
                    t
                    1
                  
                
                
                  (
                  r
                  )
                
              
              ⁡
              
                (
                
                  k
                  ,
                  c
                  ,
                  
                    i
                    c
                  
                  ,
                  l
                
                )
              
            
          
        
      
    
  




where θt0,t1(r) (s, k, c, ic, l) may be one if in the observation block (t0) from the rth training sample a transition from state sequence j to state ic in channel c occurs for the observation to Ot0,t1,c(r) and zero otherwise.

The parameters of the selected Gaussian mixture component may also be accordingly updated. The involved Gaussian parameters may include a mean vector




  μ
  
    j
    ,
    m
    ,
    a
  
  
    
      ′
      ⁢
      
        
      
      ⁢
      k
    
    ,
    c
  




covariance matrix





  U
  
    j
    ,
    m
  
  
    
      ′
      ⁢
      
        
      
      ⁢
      k
    
    ,
    c
  




of the Gaussian mixture, and the mixture coefficients





  ω
  
    j
    ,
    m
  
  
    
      ′
      ⁢
      
        
      
      ⁢
      k
    
    ,
    c
  




for mixture m of state j channel c and super state k. The updated Gaussian parameters may be obtained according to the following formulations:





  
    
      
        
          μ
          
            j
            ,
            m
          
          
            
              ′
              ⁢
              
                
              
              ⁢
              k
            
            ,
            c
          
        
        =
        
          
            
              ∑
              r
              
                
              
            
            ⁢
            
              
            
            ⁢
            
              
                ∑
                
                  t
                  0
                
                
                  
                
              
              ⁢
              
                
              
              ⁢
              
                
                  ∑
                  
                    t
                    1
                  
                  
                    
                  
                
                ⁢
                
                  
                
                ⁢
                
                  
                    
                      ψ
                      
                        
                          t
                          0
                        
                        ,
                        
                          t
                          1
                        
                      
                      
                        (
                        r
                        )
                      
                    
                    ⁡
                    
                      (
                      
                        k
                        ,
                        c
                        ,
                        j
                        ,
                        m
                      
                      )
                    
                  
                  ⁢
                  
                    O
                    
                      
                        t
                        0
                      
                      ,
                      
                        t
                        1
                      
                      ,
                      c
                    
                    
                      (
                      r
                      )
                    
                  
                
              
            
          
          
            
              ∑
              r
              
                
              
            
            ⁢
            
              
            
            ⁢
            
              
                ∑
                
                  t
                  0
                
                
                  
                
              
              ⁢
              
                
              
              ⁢
              
                
                  ∑
                  
                    t
                    1
                  
                  
                    
                  
                
                ⁢
                
                  
                
                ⁢
                
                  
                    ψ
                    
                      
                        t
                        0
                      
                      ,
                      
                        t
                        1
                      
                    
                    
                      (
                      r
                      )
                    
                  
                  ⁡
                  
                    (
                    
                      k
                      ,
                      c
                      ,
                      j
                      ,
                      m
                    
                    )
                  
                
              
            
          
        
      
    
  
  
    
      
        
          U
          
            j
            ,
            m
          
          
            
              ′
              ⁢
              
                
              
              ⁢
              k
            
            ,
            c
          
        
        =
        
          
            
              ∑
              r
              
                
              
            
            ⁢
            
              
            
            ⁢
            
              
                ∑
                
                  t
                  0
                
                
                  
                
              
              ⁢
              
                
              
              ⁢
              
                
                  ∑
                  
                    t
                    1
                  
                  
                    
                  
                
                ⁢
                
                  
                
                ⁢
                
                  
                    
                      ψ
                      
                        
                          t
                          0
                        
                        ,
                        
                          t
                          1
                        
                      
                      
                        (
                        r
                        )
                      
                    
                    ⁡
                    
                      (
                      
                        k
                        ,
                        c
                        ,
                        j
                        ,
                        m
                      
                      )
                    
                  
                  ⁢
                  
                    (
                    
                      
                        O
                        
                          
                            t
                            0
                          
                          ,
                          s
                          ,
                          
                            t
                            1
                          
                          ,
                          c
                        
                        r
                      
                      -
                      
                        μ
                        
                          j
                          ,
                          m
                        
                        
                          
                            ′
                            ⁢
                            
                              
                            
                            ⁢
                            k
                          
                          ,
                          c
                        
                      
                    
                    )
                  
                  ⁢
                  
                    
                      (
                      
                        
                          O
                          
                            
                              t
                              0
                            
                            ,
                            
                              t
                              1
                            
                            ,
                            c
                          
                          
                            (
                            r
                            )
                          
                        
                        -
                        
                          μ
                          
                            j
                            ,
                            m
                          
                          
                            
                              ′
                              ⁢
                              
                                
                              
                              ⁢
                              k
                            
                            ,
                            c
                          
                        
                      
                      )
                    
                    T
                  
                
              
            
          
          
            
              ∑
              r
              
                
              
            
            ⁢
            
              
            
            ⁢
            
              
                ∑
                
                  t
                  0
                
                
                  
                
              
              ⁢
              
                
              
              ⁢
              
                
                  ∑
                  
                    t
                    1
                  
                  
                    
                  
                
                ⁢
                
                  
                
                ⁢
                
                  
                    ψ
                    
                      
                        t
                        0
                      
                      ,
                      
                        t
                        1
                      
                    
                    
                      (
                      r
                      )
                    
                  
                  ⁡
                  
                    (
                    
                      k
                      ,
                      c
                      ,
                      j
                      ,
                      m
                    
                    )
                  
                
              
            
          
        
      
    
  
  
    
      
        
          ω
          
            j
            ,
            m
          
          
            
              ′
              ⁢
              
                
              
              ⁢
              k
            
            ,
            c
          
        
        =
        
          
            
              ∑
              r
              
                
              
            
            ⁢
            
              
            
            ⁢
            
              
                ∑
                
                  t
                  0
                
                
                  
                
              
              ⁢
              
                
              
              ⁢
              
                
                  ∑
                  
                    t
                    1
                  
                  
                    
                  
                
                ⁢
                
                  
                
                ⁢
                
                  
                    ψ
                    
                      
                        t
                        0
                      
                      ,
                      
                        t
                        1
                      
                    
                    
                      (
                      r
                      )
                    
                  
                  ⁡
                  
                    (
                    
                      k
                      ,
                      c
                      ,
                      j
                      ,
                      m
                    
                    )
                  
                
              
            
          
          
            
              ∑
              r
              
                
              
            
            ⁢
            
              
            
            ⁢
            
              
                ∑
                
                  t
                  0
                
                
                  
                
              
              ⁢
              
                
              
              ⁢
              
                
                  ∑
                  t1
                  
                    
                  
                
                ⁢
                
                  
                    ∑
                    
                      m
                      =
                      1
                    
                    M
                  
                  ⁢
                  
                    
                  
                  ⁢
                  
                    
                      ψ
                      
                        
                          t
                          0
                        
                        ,
                        
                          t
                          1
                        
                      
                      
                        (
                        r
                        )
                      
                    
                    ⁡
                    
                      (
                      
                        k
                        ,
                        c
                        ,
                        j
                        ,
                        m
                      
                      )
                    
                  
                
              
            
          
        
      
    
  




where ψt0,t1(r) (k, c, j, m) may equal to one if the observation Ot0,t1,c(r) is assigned to super state k, state j in channel c and mixture component m, and zero otherwise.

The update of parameters based on a training sample may be carried out iteratively This may be necessary because the Viterbi algorithm may yield different optimal segmentation during each iteration before convergence. Between two consecutive iterations, if the difference of observation likelihood computed with the Viterbi algorithm is smaller than a specified threshold, the iteration may be terminated. The HMM-CHMM corresponds to a complexity of quadratic with respect to the number of states in the model. In addition, HMM-CHMM may be efficiently implemented in a parallel fashion.
An alternative logical structure that includes an embedded CHMM-HMM (in contrast to an HMM-CHMM) is generically illustrated by FIG. 4. As seen in that Figure, a logical structure 60 of an embedded hidden Markov model-coupled hidden Markov model. As seen in FIG. 4, the CHMM-HMM is a hierarchical statistical model that includes a CHMM parent layer 62 (collectively formed from nodes 63) and a HMM child layer 64 (collectively formed from nodes 65). The child layer 64 associates one HMM node 65 to each node 63 in the parent layer 62, and the parameters of the individual HMMs remain independent from each other. Instead, the parameters of each child layer HMM depend upon the state of the connected parent node 63. Typically, for multidimensional data sets, the CHMM in the parent layer 62 is associated with at least one dimension, and the HMM child layers are associated with data in an orthogonal dimension with respect to the parent layer.
Formally defined, the elements of an embedded CHMM-HMM have: an initial super state probability π0,0s in super channel s and a super state transition probability from super state sequence j to super state i in super channel s, α0,i|js where super state refers to the state of the parent layer 32 CHMM node 33.
For each super state k the the super channel s the parameters of the corresponding HMM are defined so that the initial state probability is

π1,0s,k 

the state transition probability from state j to state i is

a1,i|js,k,c 

and the observation probability is:

bt0,t1s,k(j).

In a continuous mixture with Gaussian components, the probability of the observation vector O is given by:





  
    
      
        
          
            b
            
              s
              ,
              k
            
          
          ⁡
          
            (
            j
            )
          
        
        =
        
          
            ∑
            
              m
              =
              1
            
            
              M
              j
              
                S
                ,
                C
              
            
          
          ⁢
          
            
          
          ⁢
          
            
              ω
              
                j
                ,
                m
              
              
                s
                ,
                k
              
            
            ⁢
            
              N
              ⁡
              
                (
                
                  O
                  ,
                  
                    μ
                    
                      j
                      ,
                      m
                    
                    
                      s
                      ,
                      k
                    
                  
                  ,
                  
                    U
                    
                      j
                      ,
                      m
                    
                    
                      s
                      ,
                      k
                    
                  
                
                )
              
            
          
        
      
    
  
  
    
      
        where
        ⁢
        
          
        
        ⁢
        
          μ
          
            j
            ,
            m
          
          
            s
            ,
            k
          
        
        ⁢
        
          
        
        ⁢
        and
        ⁢
        
          
        
        ⁢
        
          U
          
            j
            ,
            m
          
          
            s
            ,
            k
          
        
      
    
  




are the mean and covariance matrix of the mth mixture of the Gaussian mixture corresponding to the jth state and mth mixture,

Mjs,k 

is the number of mixtures corresponding to the jth state and,

ωj,ms,k 

is a weight associated with the corresponding mixture.

Observation sequences are used to form observation vectors later used in training and classifying. For example, the observation sequence for a two-dimensional image may be formed from image blocks of size Lx×Ly that are extracted by scanning the image from left-to-right and top-to-bottom. Adjacent image blocks may be designed to have an overlap by Py rows in the vertical direction and Px columns in the horizontal direction. In one possible embodiment, with blocks size of Ly=8 rows and Lx=8 columns, a six DCT coefficients (a 3×2 low-frequency array) may be employed to create the overlap.
The resulting array of observation vectors may correspond to size of T0×T1, where T0 and T1 are the number of observation vectors extracted along the height (H) and the width (W) of the image, respectively.
Consecutive horizontal and vertical observation vectors may also be grouped together to form observation blocks. This maybe used as a way to consolidate local observations and at the same time to reduce the total amount of observations. In practice, this data grouping serves application needs and improve recognition efficiency.
To compute the number of observation blocks, denote the number of observation blocks in the vertical and horizontal direction be T00 and T10, respectively. Then,

T00=C0 

T10=T1 

In addition, denote the number of observation vectors in the horizontal and vertical direction within each observation block by T01 and T11, respectively, where



  
    
      T
      0
      1
    
    =
    
      
        T
        1
      
      
        C
        0
      
    
  




  
    
      T
      1
      1
    
    =
    1
  



Furthermore, denote Ot0,s,t1 as the t1th observation vector corresponding to the observation block (t0,s).

Although any suitable state sequence segmentation can be used, a modified Viterbi algorithm for the HMM-CHMM is preferred. Application of this modified Viterbi algorithm determines the optimal state and super state segmentation of the observation sequence. The best super state probability for the observation block (t0,s) given super state is of super channel s, is denoted as Pt0s(is). Corresponding optimal state and optimal state sequence βt0,t1,s(is) may then be computed for each super observation. The following states are first initiazed:




  
    
      
        
          
            δ
            
              0
              ,
              0
            
          
          ⁡
          
            (
            i
            )
          
        
        =
        
          
            
              Π
              ⁢
              
                
              
            
            s
          
          ⁢
          
            
          
          ⁢
          
            
              π
              
                0
                ,
                0
              
              s
            
            ⁡
            
              (
              
                i
                s
              
              )
            
          
          ⁢
          
            
              P
              
                
                  t
                  0
                
                ,
                s
              
            
            ⁡
            
              (
              
                i
                s
              
              )
            
          
        
      
    
  
  
    
      
        
          
            ψ
            
              0
              ,
              0
            
          
          ⁡
          
            (
            i
            )
          
        
        =
        0
      
    
  




The following states are then recursively determined:





  
    
      
        
          
            δ
            
              0
              ,
              
                t
                0
              
            
          
          ⁡
          
            (
            i
            )
          
        
        =
        
          
            max
            j
          
          ⁢
          
            {
            
              
                
                  δ
                  
                    0
                    ,
                    
                      
                        t
                        0
                      
                      -
                      1
                    
                  
                
                ⁡
                
                  (
                  j
                  )
                
              
              ⁢
              
                
                  ∏
                  s
                  
                    
                  
                
                ⁢
                
                  
                
                ⁢
                
                  
                    a
                    
                      0
                      ,
                      
                        i
                        s
                      
                      ,
                      
                        |
                        
                          
                            j
                            s
                          
                          -
                          1
                        
                      
                      ,
                      
                        j
                        s
                      
                      ,
                      
                        
                          j
                          s
                        
                        +
                        1
                      
                    
                    s
                  
                  ⁢
                  
                    
                      P
                      
                        
                          t
                          0
                        
                        ,
                        s
                      
                    
                    ⁡
                    
                      (
                      
                        i
                        s
                      
                      )
                    
                  
                
              
            
            }
          
        
      
    
  
  
    
      
        
          
            ψ
            
              0
              ,
              
                t
                0
              
            
          
          ⁡
          
            (
            i
            )
          
        
        =
        
          arg
          ⁢
          
            
          
          ⁢
          
            
              max
              j
            
            ⁢
            
              {
              
                
                  
                    δ
                    
                      0
                      ,
                      
                        
                          t
                          0
                        
                        -
                        1
                      
                    
                  
                  ⁡
                  
                    (
                    j
                    )
                  
                
                ⁢
                
                  
                    ∏
                    s
                    
                      
                    
                  
                  ⁢
                  
                    
                  
                  ⁢
                  
                    
                      a
                      
                        0
                        ,
                        
                          
                            i
                            s
                          
                          |
                          
                            
                              j
                              s
                            
                            -
                            1
                          
                        
                        ,
                        
                          j
                          s
                        
                        ,
                        
                          
                            j
                            s
                          
                          +
                          1
                        
                      
                      s
                    
                    ⁢
                    
                      
                        P
                        
                          
                            t
                            0
                          
                          ,
                          s
                        
                      
                      ⁡
                      
                        (
                        
                          i
                          s
                        
                        )
                      
                    
                  
                
              
              }
            
          
        
      
    
  




The termination condition is then computed:

P=maxi{δT0(i)}

{αT0,1, . . . , αT0,S}=arg maxi{δT0(i)}

Based on the computed termination condition, a backtracking operation is performed:

{αT0,1, . . . , αT0,S}=ψ0,t+1(αT0+1,1, . . . , αT0+1,S)

qt0,s,t10=αt0,s 

qt0,s,t11=βt0,s,t1(αt0,s)

Training of an embedded CHMM-HMM based on the Viterbi algorithm is substantially similar to that illustrated with respect to training of a HMM-CHMM as seen in FIG. 3. To train an CHMM-HMM based on given training data, observation vectors are first extracted from the training data set and organized in observation blocks. These observation blocks are segmented uniformly and at consecutive iterations through an optimal state segmentation algorithm, have their model parameters estimated and observation likelihood determined. As will be appreciated, the training may be iterative, with each training data set used individually and iteratively to update model parameters until the observation likelihood computed is smaller than a specified threshold.

More specifically, the training data set maybe segmented along a first dimension into S super channels. Then within each of such super channels, training data may further be uniformly segmented, according to the number of super states in each super channel, into a plurality of uniform segments each of which corresponding to a super state. Based on the uniform segmentation at the super layer, the observation vectors within each uniform segment may then be uniformly segmented according to the number of states of each child HMM. The density function of each state (including both super states as well as child states) may be initialized before the training takes place. For example, if Gaussian mixture model is adopted for each state, Gaussian parameters for each of the mixture component may need to be initialized. Different approaches may be employed to achieve the initialization of model parameters. For example, one embodiment may be implemented where the observation sequence assigned to state j, super state k and super channel s may be assigned to Mjs,k clusters using, for example, the K-means algorithm.
During the process of training, the original uniform segmentation is updated based on the optimal state segmentation using the Viterbi algorithm or other suitable algorithms. To update the density function of a state, particular relevant parameters to be updated may be determined prior to the update operation. Depending on the density function used for each state, the selection may be carried out accordingly.
The selection of a Gaussian mixture components for each state j and super state k and super channel s is also required. One exemplary criterion to make the selection may correspond to assigning the observation Ot0,s,t1(r) from the rth training sample in the training set to the Gaussian component for which the Gaussian density function




  N
  ⁡
  
    (
    
      
        
          O
          
            
              t
              0
            
            ,
            s
            ,
            
              t
              1
            
          
          
            (
            r
            )
          
        
        ;
        
          μ
          
            j
            ,
            m
          
          
            s
            ,
            k
          
        
      
      ,
      
        U
        
          j
          ,
          m
        
        
          s
          ,
          k
        
      
    
    )
  




is the highest.

The parameters are then estimated using, for example, an extension of the segmental K-means algorithm. In particular, the estimated transition probability a′0,is|js between super states is and the super state sequence j may be obtained as follows:




  
    a
    
      0
      ,
      
        
          i
          s
        
        |
        j
      
    
    
      ′
      ⁢
      
        
      
      ⁢
      s
    
  
  =
  
    
      
        
          ∑
          r
          
            
          
        
        ⁢
        
          
        
        ⁢
        
          
            ∑
            
              t
              0
            
            
              
            
          
          ⁢
          
            
          
          ⁢
          
            ∑
            
              t
              1
            
            
              
            
          
        
      
      ⁢
      
        
      
      ⁢
      
        ∈
        
          t
          0
        
        
          (
          r
          )
        
      
      ⁢
      
        (
        
          s
          ,
          
            i
            s
          
          ,
          j
        
        )
      
    
    
      
        
          ∑
          r
          
            
          
        
        ⁢
        
          
        
        ⁢
        
          
            ∑
            
              t
              0
            
            
              
            
          
          ⁢
          
            
          
          ⁢
          
            
              ∑
              
                t
                1
              
              
                
              
            
            ⁢
            
              ∑
              l
              
                
              
            
          
        
      
      ⁢
      
        
      
      ⁢
      
        ∈
        
          t
          0
        
        
          (
          r
          )
        
      
      ⁢
      
        (
        
          s
          ,
          
            i
            s
          
          ,
          l
        
        )
      
    
  




where ∈t0(r) (s, is, l) may equal to one if a transition from state sequence l to the super state is in super channel s occurs for the observation block (t0, s) and zero otherwise. The estimated transition probabilities between embedded states a′l,i|js,k may then be obtained as follows,





  
    a
    
      1
      ,
      
        i
        |
        j
      
    
    
      
        ′
        ⁢
        
          
        
        ⁢
        s
      
      ,
      k
    
  
  =
  
    
      
        ∑
        r
        
          
        
      
      ⁢
      
        
      
      ⁢
      
        
          ∑
          
            t
            0
          
          
            
          
        
        ⁢
        
          
        
        ⁢
        
          
            ∑
            
              t
              1
            
            
              
            
          
          ⁢
          
            
          
          ⁢
          
            
              θ
              
                
                  t
                  0
                
                ,
                
                  t
                  1
                
              
              
                (
                r
                )
              
            
            ⁡
            
              (
              
                s
                ,
                k
                ,
                i
                ,
                l
              
              )
            
          
        
      
    
    
      
        ∑
        r
        
          
        
      
      ⁢
      
        
      
      ⁢
      
        
          ∑
          
            t
            0
          
          
            
          
        
        ⁢
        
          
        
        ⁢
        
          
            ∑
            
              t
              1
            
            
              
            
          
          ⁢
          
            
              ∑
              l
              
                
              
            
            ⁢
            
              
            
            ⁢
            
              
                θ
                
                  
                    t
                    0
                  
                  ,
                  
                    t
                    1
                  
                
                
                  (
                  r
                  )
                
              
              ⁡
              
                (
                
                  s
                  ,
                  k
                  ,
                  i
                  ,
                  l
                
                )
              
            
          
        
      
    
  




where θt0,t1(r)(s, k, i, l) may be one if in the observation block (t0, s) a transition from state j to state is is channel c occurs for the observation Ot0,s,t1(r) and zero otherwise. The parameters of the selected Gaussian mixture component may also be accordingly updated. The involved Gaussian parameters may include a mean vector μ′j,ms,k, a covariance matrix U′j,ms,k of the Gaussian mixture, and the mixture coefficients ω′j,ms,k for mixture m of state j in super state k and super channel s. The updated Gaussian parameters may be obtained according to the following formulations:





  
    
      
        
          μ
          
            j
            ,
            m
          
          
            
              ′
              ⁢
              
                
              
              ⁢
              s
            
            ,
            k
          
        
        =
        
          
            
              ∑
              r
              
                
              
            
            ⁢
            
              
            
            ⁢
            
              
                ∑
                
                  t
                  0
                
                
                  
                
              
              ⁢
              
                
              
              ⁢
              
                
                  ∑
                  
                    t
                    1
                  
                  
                    
                  
                
                ⁢
                
                  
                
                ⁢
                
                  
                    
                      ψ
                      
                        
                          t
                          0
                        
                        ,
                        
                          t
                          1
                        
                      
                      
                        (
                        r
                        )
                      
                    
                    ⁡
                    
                      (
                      
                        s
                        ,
                        k
                        ,
                        j
                        ,
                        m
                      
                      )
                    
                  
                  ×
                  
                    O
                    
                      
                        t
                        0
                      
                      ,
                      s
                      ,
                      
                        t
                        1
                      
                    
                    
                      (
                      r
                      )
                    
                  
                
              
            
          
          
            
              ∑
              r
              
                
              
            
            ⁢
            
              
            
            ⁢
            
              
                ∑
                
                  t
                  0
                
                
                  
                
              
              ⁢
              
                
              
              ⁢
              
                
                  ∑
                  
                    t
                    1
                  
                  
                    
                  
                
                ⁢
                
                  
                
                ⁢
                
                  
                    ψ
                    
                      
                        t
                        0
                      
                      ,
                      
                        t
                        1
                      
                    
                    
                      (
                      r
                      )
                    
                  
                  ⁡
                  
                    (
                    
                      s
                      ,
                      k
                      ,
                      j
                      ,
                      m
                    
                    )
                  
                
              
            
          
        
      
    
  
  
    
      
        
          U
          
            j
            ,
            m
          
          
            
              ′
              ⁢
              
                
              
              ⁢
              s
            
            ,
            k
          
        
        =
        
          
            
              
                
                  
                    ∑
                    r
                    
                      
                    
                  
                  ⁢
                  
                    
                  
                  ⁢
                  
                    
                      ∑
                      
                        t
                        0
                      
                      
                        
                      
                    
                    ⁢
                    
                      
                    
                    ⁢
                    
                      
                        ∑
                        
                          t
                          1
                        
                        
                          
                        
                      
                      ⁢
                      
                        
                      
                      ⁢
                      
                        
                          
                            ψ
                            
                              
                                t
                                0
                              
                              ,
                              
                                t
                                1
                              
                            
                            
                              (
                              r
                              )
                            
                          
                          ⁡
                          
                            (
                            
                              s
                              ,
                              k
                              ,
                              j
                              ,
                              m
                            
                            )
                          
                        
                        ×
                      
                    
                  
                
              
            
            
              
                
                  
                    (
                    
                      
                        O
                        
                          
                            t
                            0
                          
                          ,
                          s
                          ,
                          
                            t
                            1
                          
                        
                        r
                      
                      -
                      
                        μ
                        
                          j
                          ,
                          m
                        
                        
                          
                            ′
                            ⁢
                            
                              
                            
                            ⁢
                            s
                          
                          ,
                          k
                        
                      
                    
                    )
                  
                  ×
                  
                    
                      (
                      
                        
                          O
                          
                            
                              t
                              0
                            
                            ,
                            s
                            ,
                            
                              t
                              1
                            
                          
                          
                            (
                            r
                            )
                          
                        
                        -
                        
                          μ
                          
                            j
                            ,
                            m
                          
                          
                            
                              ′
                              ⁢
                              
                                
                              
                              ⁢
                              s
                            
                            ,
                            k
                          
                        
                      
                      )
                    
                    T
                  
                
              
            
          
          
            
              ∑
              r
              
                
              
            
            ⁢
            
              
            
            ⁢
            
              
                ∑
                
                  t
                  0
                
                
                  
                
              
              ⁢
              
                
              
              ⁢
              
                
                  ∑
                  
                    t
                    1
                  
                  
                    
                  
                
                ⁢
                
                  
                
                ⁢
                
                  
                    ψ
                    
                      
                        t
                        0
                      
                      ,
                      
                        t
                        1
                      
                    
                    
                      (
                      r
                      )
                    
                  
                  ⁡
                  
                    (
                    
                      s
                      ,
                      k
                      ,
                      j
                      ,
                      m
                    
                    )
                  
                
              
            
          
        
      
    
  
  
    
      
        
          ω
          
            j
            ,
            m
          
          
            
              ′
              ⁢
              
                
              
              ⁢
              s
            
            ,
            k
          
        
        =
        
          
            
              ∑
              r
              
                
              
            
            ⁢
            
              
            
            ⁢
            
              
                ∑
                
                  t
                  0
                
                
                  
                
              
              ⁢
              
                
              
              ⁢
              
                
                  ∑
                  
                    t
                    1
                  
                  
                    
                  
                
                ⁢
                
                  
                
                ⁢
                
                  
                    ψ
                    
                      
                        t
                        0
                      
                      ,
                      
                        t
                        1
                      
                    
                    
                      (
                      r
                      )
                    
                  
                  ⁡
                  
                    (
                    
                      s
                      ,
                      k
                      ,
                      j
                      ,
                      m
                    
                    )
                  
                
              
            
          
          
            
              ∑
              r
              
                
              
            
            ⁢
            
              
            
            ⁢
            
              
                ∑
                
                  t
                  0
                
                
                  
                
              
              ⁢
              
                
              
              ⁢
              
                
                  ∑
                  t1
                  
                    
                  
                
                ⁢
                
                  
                    ∑
                    
                      m
                      =
                      1
                    
                    M
                  
                  ⁢
                  
                    
                  
                  ⁢
                  
                    
                      ψ
                      
                        
                          t
                          0
                        
                        ,
                        
                          t
                          1
                        
                      
                      
                        (
                        r
                        )
                      
                    
                    ⁡
                    
                      (
                      
                        s
                        ,
                        k
                        ,
                        j
                        ,
                        m
                      
                      )
                    
                  
                
              
            
          
        
      
    
  




where ψt0,t1(r) (s, k, j, m) may equal to one if the observation Ot0,s,t1(r) is assigned to super state k in super channel s, state j and mixture component m, and zero otherwise.

The update of parameters based on a training sample maybe carried out iteratively. This may be necessary because the Viterbi algorithm may yield different optimal segmentation during each iteration before convergence. Between two consecutive iterations, if the difference of observation likelihood computed with the Viterbi algorithm is smaller than a specified threshold, the iteration may be terminated. The CHMM-HMM corresponds to a complexity of quadratic with respect to the number of states in the model. In addition, CHMM-HMM may be efficiently implemented in a parallel fashion.
As will be understood, reference in this specification to “an embodiment,” “one embodiment,” “some embodiments,” or “other embodiments” means that a particular feature, structure, or characteristic described in connection with the embodiments is included in at least some embodiments, but not necessarily all embodiments, of the invention. The various appearances “an embodiment,” “one embodiment,” or “some embodiments” are not necessarily all referring to the same embodiments.
If the specification states a component, feature, structure, or characteristic “may”, “might”, or “could” be included, that particular component, feature, structure, or characteristic is not required to be included. If the specification or claim refers to “a” or “an” element, that does not mean there is only one of the element. If the specification or claims refer to “an additional” element, that does not preclude there being more than one of the additional element.
Those skilled in the art having the benefit of this disclosure will appreciate that many other variations from the foregoing description and drawings may be made within the scope of the present invention. Accordingly, it is the following claims, including any amendments thereto, that define the scope of the invention.

## Claims

1. A pattern recognition method, comprising:
forming a hierarchical statistical model using a hidden Markov model (HMM) and a coupled hidden Markov model (CHMM), the hierarchical statistical model supporting a parent layer having multiple supernodes and a child layer having multiple nodes associated with each supernode of the parent layer; wherein either the parent layer is formed of an HMM and the child layer is formed of a CHMM, or the parent layer is formed of a CHMM and the child layer is formed of an HMM; the hierarchical statistical model applied to two dimensional data, with the parent layer describing data in a first direction and the child layer describing data in a second direction orthogonal to the first direction;
training the hierarchical statistical model using observation vectors extracted from a data set;
obtaining an observation vector sequence from a pattern to be recognized; and
identifying the pattern by finding a substantially optimal state sequence segmentation for the hierarchical statistical model.

2. The method according to claim 1, wherein the hierarchical statistical model defines an initial super state probability in a super channel.

3. The method according to claim 1, wherein the hierarchical statistical model defines super state transition probability from a sequence of states in the super channel.

4. The method according to claim 1, wherein the hierarchical statistical model defines observation likelihood given a state of a channel.

5. The method according to claim 1, wherein identifying the object comprises using a Viterbi algorithm to determine a substantially optimal state sequence for the hierarchical statistical model based on the observation vector sequence.

6. The method according to claim 1, wherein the data set includes two-dimensional data.

7. An article comprising a computer readable storage medium having stored thereon instructions that when executed by a machine result in:
forming a hierarchical statistical model using a hidden Markov model (HMM) and a coupled hidden Markov model (CHMM), the hierarchical statistical model supporting a parent layer having multiple supernodes and a child layer having multiple nodes associated with each supernode of the parent layer; wherein either the parent layer is formed of an HMM and the child layer is formed of a CHMM, or the parent layer is formed of a CHMM and the child layer is formed of an HMM; the hierarchical statistical model applied to two dimensional data, with the parent layer describing data in a first direction and the child layer describing data in a second direction orthogonal to the first direction;
training the hierarchical statistical model using observation vectors extracted from a data set;
obtaining an observation vector sequence from a pattern to be recognized; and
identifying the pattern by finding a substantially optimal state sequence segmentation for the hierarchical statistical model.

8. The article of claim 7, wherein the hierarchical statistical model defines an initial super state probability in a super channel.

9. The article of claim 7, wherein the hierarchical statistical model defines super state transition probability from a sequence of states in the super channel.

10. The article of claim 7, wherein the hierarchical statistical model defines observation likelihood given a state of a channel.

11. The article of claim 7, wherein identifying the object comprises using a Viterbi algorithm to determine a substantially optimal state sequence for the hierarchical statistical model based on the observation vector sequence.

12. The article of claim 7, wherein the data set includes two-dimensional data.

13. A system comprising:
a hierarchical statistical model to use both hidden Markov models and coupled hidden Markov models to model patterns, the hierarchical statistical model supporting a parent layer having multiple supernodes and a child layer having multiple nodes associated with each supernode of the parent layer; wherein either the parent layer is formed of a hidden Markov model (HMM) and the child layer is formed of a coupled HMM (CHMM), or the parent layer is formed of a CHMM and the child layer is formed of an HMM; the hierarchical statistical model applied to two dimensional data, with the parent layer describing data in a first direction and the child layer describing data in a second direction orthogonal to the first direction;
a training module to train for the hierarchical statistical model using observation vectors extracted from a data set; and
an identification module to obtain an observation vector sequence for a pattern to be recognized, and to identify the pattern by finding a substantially optimal state sequence segmentation for the hierarchical statistical model.

14. The system according to claim 13, wherein the hierarchical statistical model defines an initial super state probability in a super channel.

15. The system according to claim 13, wherein the hierarchical statistical model defines super state transition probability from a sequence of states in the super channel.

16. The system according to claim 13, wherein the hierarchical statistical model defines observation likelihood given a state of a channel.

17. The system according to claim 13, wherein the identification module is adapted to use a Viterbi algorithm to determine a substantially optimal state sequence for the hierarchical statistical model based on the observation vector sequence.

18. The system according to claim 13, wherein the data set includes two-dimensional data.