"A pattern recognition device using an Artificial Neural Network for context dependent modelling"
The invention relates to a pattern recognition device comprising an artificial neural network set-up having K X M output units and provided for calculating probabilities of observing a feature vector (xt) on a class (qk ) (1≤k≤K) conditioned on predetermined contextual models (cm) (1≤m≤M), said device having an input for receiving a data stream and comprising sampling means provided for sequentially fetching data samples by sampling said data stream and for determining said feature vector (xt) from a data sample, each of said classes being represented by at least one model belonging to a finite set of models (M) governed by statistical laws.
Such a device is known from the article of H. Bourlard and C.J. Wellekens, entitled "Links between Markov Models and Multilayer Perceptrons" and published in IEEE Transactions of pattern analysis and Machine intelligence, vol. 12, N° 12, December 1990 p. 1167-1178. In the known device the patterns to be recognized are human speech patterns. For the recognition of the patterns use is made of hybrid ANN (Artificial Neural Network) / HMM (Hidden Markov Models) speech recognition. Hidden Markov Models have provided a good representation of speech characteristics. Artificial Neural Networks are used to solve difficult problems in speech recognition and algorithms have been developped for calculating emission probabilities. According to HMM the speech is supposed to be produced by a particular finite state automaton build up from a set of classes Q = { q 1 , q2, ...,qκ } governed by statistical laws. In order to recognize the inputted data stream, the inputted speech is sampled and transformed into a sequence of acoustic vectors X = { x1 x2,...xt, ...xT } where x represents the acoustic vector at a time t. In the known device use is made of Multilayer Perceptrons (MLP) which is a particular form of ANN's. The MLP are trained to
generate Bayes probabilities or a posteriori probabilities p(qk | xt ) which can be transformed for determining emission probabilities by using Bayes rule.
A drawback of the known device is that for more complex models such context-dependent models, a lot of parameters must be estimated with a same limited amount of data. Indeed, if there are K possible classes and M possible contexts, and if use has to be made of the information of left and right contexts of the considered class there are K
X M X M possible combinations of qk , where and
respectively represent left and right contexts belong to a set C = { c
1 , c
2, ..., c
M } of possible contextual models. Whether likelihoods are generated by MLP's or by standard training methods for HMM's, neither will be a good probabilistic estimation for a phonetic condition that is rarely or never observed. A simply use of the known device for calculating emission probabilities of observing a vector (x
t) on a current class (q
k ) within predetermined contextual rrodels would lead to an
output layer with thousands of units and millions of parameters to train.
In order to solve this problem interpolations in HMM systems are used.
This solution reflects the trade-off between detailed models which are poorly estimated because not enough training material is available and rough models which are well estimated because of a limited number of parameters. However, this interpolation still causes errors in the recognition of the pattern which renders the device not liable enough.
It is an object of the present invention to mitigate the afore mentioned drawbacks.
A device according to the invention is therefore characterized in that said neural network set-up is splitted into a first neural network having K output units and being provided for calculating a posteriori probabilities of said class (qk ) given said observed vector (xt), and at least one further neural network having M output units and provided for calculating a posteriori probabilities of said contextual models, conditioned on said class. By splitting the network set-up into a first and at least a further neural network where each network is provided for the determination of a particular a posteriori probability as set out herebefore it is no longer necessary to make any assumption or
simplification to obtain the emission probability of observing a vector (x t) on a class (qk ) conditioned on predetermined contextual models
In comparison to the known device, where a direct network implementation was used, this solution greatly reduces the number of parameters and thus the memory capacity of the device.
A first preferred embodiment of a device according to the invention is characterized in that said further neural network is provided for determining independently of each other a first Zj(xt) respectively a second Yj(c) pre-sigmoid output value, wherein said first respectively said second pre-sigmoid value being determined on an inputted feature vector respectively on inputted classes, said further neural network comprises a set of upper units provided for determining p(c| qk, xt) values from said pre-sigmoid output values. The pre-sigmoid output values Zj and Yj being independent of each other implies that they can be determined independently from each other, which simplifies even more the neural network set up. The determination of the output value is then easily realised by a set of upper units receiving the pre-sigmoid values, resulting in a more efficient set-up.
Preferably in that said further neural network comprises a first hidden layer provided for determining upon a received feature vector xt values
Zh = f d.. xt)
ln
wherein dih is a weighting factor, f a sigmoid function and 1 h H, H being the total number of hidden units in said first hidden layer, said first hidden layer being connected with summing units provided for determining said first pre-sigmoid value by Zj(xt) = zh
wherein bh j is a weighting factor. An efficient architecture for determining the first pre-sigmoid value is thus obtained.
A second preferred embodiment of a device according to the invention is characterized in that said further neural network comprises a memory provided for storing said second pre-sigmoid output value Yj(c), said device further comprises an address wherein the second pre-sigmoid value Yj(c) assigned to said class qk is stored. The independency of Zj and Yj enables a pre-calculation of the contextual contribution to the output. This computation is for exemple realised at the end of the training phase and enables thus a storage of the second pre-sigmoid values for each model. Because those pre-sigmoid values are now stored into a memory it is no longer necessary to calculate them each time, thus saving a lot of computation time. The pre-sigmoid value has thus only to be read from the memory, once it has been stored.
Preferably it comprises a second hidden layer provided for determining upon a received class qk further values ]
wherein wk l are trained weighting factors and f a sigmoid function, said second hidden layer being connected with a further summing unit provided for determining said second pre-sigmoid value a
wherein alj are trained weighting factors, 1 1 L, L being the total number of hidden units in said second hidden layer. An efficient architecture for determining the second pre-sigmoid value is thus obtained.
A third preferred embodiment of a device according to the invention is characterised in that it comprises a memory provided for storing third presigmoid output values Yj (qK, c m ) determined on inputted classes (qk ) and contextual models (cm), said pre-sigmoid values being storable according to a K X M X N matrix, said device further comprises an address generator provided for generating upon a received q, , m set an address wherein the third pre-sigmoid values assigned to said set are stored. Because the pre-sigmoid value Yj (qk , cm ) is also
independent of the feature vector a pre-calculation and storage thereof is possible which thus reduces the calculation amount.
Preferably said class and said contextual models together form a triphone said first network being provided
for calculating p (q
k | x
t), said further networks comprising a second, respectively a third, a fourth and a ifth network provided for calculating p( q
k, x
t), respectively
q
k ,
x
t), q
k,
and p( q
k ). Triphone recognition is thus easily realised.
The invention will now be described in detail in connection with the drawings in which :
Figure 1 shows a schematic view of a device according to the invention ;
Figure 2 shows a flow diagram illustrating the operation of a device according to the invention ;
Figure 3, respectively 4 schematically illustrates neural networks belonging to a device according to the invention.
Patterns to be recognized can be of various kinds such as for example pictures or speech. The present invention will be described by using speech recognition as an example. This is however only done for the purpose of clarity and it will be clear that the described device can also be used for other pattern recognition than speech.
Speech is build up of phonemes. For example the word "cat" is composed of three phonemes : the "k" sound, the short "a" and the final "t". Speech recognition signifies the determinantion of the sequence of elements at least as large as phonemes in order to determine the linguistic content.
An example of a pattern, in particular speech, recognition device is schematically shown in figure 1. Data, in particular speech, is supplied via a line 1 to sampling means 2. After being sampled by the sampling means the data samples are supplied to a processing unit 3 comprising an Artificial Neural Network set-up in abreviation ANN, provided for determining emission probabilities. Those emission probabilities are then supplied to a further processing device 4 provided for the recognition of the inputted data, for example an
inputted sentence in the case of speech.
Automatic speech recognition (ASR) performed by the device illustrated in figure 1 comprises several steps such as illustrated in the flow diagram of figure 2. In a first step 5 the inputted data is collected, for example by means of a microphone in the case of speech. The electrical signal outputted by the microphone is thereafter preprocessed 6, which comprises for example a filter operation in order to flatten the spectral slope using a time constant which is much longer than a speech frame.
After the pre-processing step 6 a feature extraction
7 is performed which comprises the determination of representations of the speech signal which are independent of acoustic variations, but sensitive to linguistic content. Typically, speech analysis is realised over a fixed length "frame", or analysis window. For instance, suppose speech is sampled at 16 kHz after being filtered at 6,4 kHz to prevent spectral
"aliasing". A window of 32 msec (512 points) is for example used as the input to a spectral analysis module, with one analysis performed at regular intervals, for example every 10 msec (160 points). In this way, the speech signal is transformed into a sequence of feature vectors X = { x1 , x2, ..., xt , ...xT } , where xt represents the feature vector at time t. In the case of speech such a feature vector is an acoustic vector.
Once the feature extraction has been realised, a hypothesis generation 8 starts where use is made of the neural networks. The hypothesis generation step comprises i.a. a classification for producing a label for a speech segment, for example a word, or some measure of similarity between a speech frame and a "reference" speech fragment. Alternatively the input can be fitted with statistical models yielding probabilistic measures of the uncertainty of the fit.
After the hypothesis generation step 8 starts a cost estimation step 9 where for determining the minimum cost match use is for example made of the dynamic programming algorithm of Bellman which is for example described in an article of R. Bellman R.S.Dreyfus published in Applied Dynamic Programming, Princeton University Press 1962. The recognition 10 itself is then realised once the cost estimation is achieved.
Before starting a detailed description of the invention some general knowledge of speech recognition will be given in order to have a clear definition of the used terminology.
Most state-of-the art speech recognizers are based on Hidden Markov Models (HMM), which is a statistical approach. In this formalism, the speech is supposed to be produced by a particular finite state automation built up from a set of classes Q = { q 1 , q2, ...qκ } governed by statistical laws. In that case, each speech unit (e.g. each vocabulary word or each phoneme) is associated with a particular HMM made up of L classes q1∈Q, with 1 = 1, ...,L, according to a predefined topology. In the HMM approach, one has to estimate the probability of an observed spectrum for each hypothetical speech sound, as well as the probability of each permissible transition. Negative log of these probabilities can be used as distances in the Dynamic Programming algorithm [Bellman & Dreyfus, 1962] to determine the minimum cost path
(defined as the match with the minimum sum of local distances plus any cost for permitted transitions). This path represents the best warping of the models to match the data.
In a model for a speech sound (phoneme), the sound has a beginning, middle, and end, each with its own properties. This speech is assumed to remain entirely in one of these "classes" for each frame (e.g., 10 msec), at which time it can proceed to the next permissible class.
Associated with each transition is a probability p(xt, q1 | qk ) of emitting a speech feature vector x when moving from a present class q. to a new class q1. A distinction is made between an emission probability p(x t | qk ) (for each class qk ) and a transition probability p(q1 | qk ) (for each transition qk → q1). For any particular utterance, the observed features have a probability (for any hypothesized path through the possible classes) that is the product of the emission probabilities for each class and the corresponding transitions. This is true because of an assumed independence between the local probabilities. For instance, suppose a path of q1→ q 1→ q 2, and input features x1 , x2, x3. The probability of the assumed path would then be
p(x1 | q1).p(q1 | q1).p(x2 | q1).P(q2 | q1).P(x 3 l q2).
Taking negative logs to get costs, addition takes the place of multiplication, and dynamic programming can be used to determine the least-cost path.
For continuous speech recognition, phonemic HMMs can be concatenated to represent words, which in turn can be concatenated to represent complete utterances. Model variations can also be introduced to represent common effects of coarticulation between neighboring phonemes or words. In particular, context-dependent phone models such as for example triphones can be used to represent allophonic variations caused by coarticulation from neighboring phones. In this case, sequences of three phonemes are considered to capture the coarticulation effects. Each phoneme has several models associated with it depending on its left and right phonemic contexts. Of course, the drawback of this approach is the drastically increased number of models and, consequently, the number of parameters to determine. If there are M phonemes and K possible classes, there is a maximum of K X M X M possible phonemic contexts for each class ; even if all of them are not permissible (because of phonological rules or the clustering of similar contexts), the number of possible triphone models remain very large.
The article entitled "Continuous speech recognition using Multilayer Perceptrons (MLP) with hidden Markov Models" written by the present inventors and published in IEEE 90 CH 2847-2 p. 413-416 describes how MLP, a particular form of ANN'S are used to compute the emission probabilities used in HMM systems. In these studies it is shown that if each output unit of an MLP is associated with a particular class q, of the set of classes Q = { q
1 , q
2, ...q
k } on which the Markov models are defined, it is possible to train the MLP to generate probabilities like p(q
k | x
t) when x is provided to its input. Probabilities like p(q
k 1 x
t) are generally referred to as Bayes probabilities or a posteriori probabilities and can be transformed into likelihoods for use as emission probabilities in HMMs by Bayes' rule :
As shown in the referred article, the advantage of such an approach is the possibility to estimate the emission probabilities needed for the HMMs with better discriminant properties and without any hypotheses about the statistical distribution of the data. Since the result holds with a modified input field to the MLP which takes the context or other information into account, it is also shown how this approach allows to overcome other major drawbacks of HMMs.
As described above, MLPs are provided for estimating emision probabilities for HMMs. There has also been shown that these estimates have led to improved performance over counting estimation or Gaussian estimation techniques in the case where a fairly simple HMM was used. However, current state-of-the-art continuous speech recognizers require HMMs with greater complexity, e.g. multiple densities per phone and/or context-dependent models. State-of-the-art HMM-based speech recognizers now model context-dependent phonetic units such as triphones instead of phonemes to improve their performance. For instance, returning to the example already given, the English word "cat" is composed of three phonemes : the "k" sound, the short "a", and the final "t". In the standard phonetic approach, the Markov model of word "cat" is then obtained by concatenating the models of its constituting phonemes, i.e. "k-a-t". In the triphone approach, the model of a phoneme depends on its left and right phonetic contexts, and the sequence of models constituting the isolated word "cat" is now
"#ka-kat-at#", where "#" is the "nothing" or "silence" symbol. In this example, "#ka" represents the model of phoneme "k" with a phoneme "#" on its left and a phoneme "a" on its right. This approach takes phonetic coarticulation into account. In this case, emission probabilities p(x
t | q
k ) that have to be estimated for use in HMMs (or hybrid ANN/HMMs) are replaced by p(x
t | q
k i.e. the probability of observing acoustic
feature vector x
t on the current phonemic class q
k with phonemic contexts on its left and on its right. The contextual models
and belonging to a set C = { c
l , ...,c
m , ...C
M } . Each class q
k being represented by at least one model. The models of said set C being
governed by statistical la ws.
However, the difficulty with these more complex models is that many more parameters must be estimated, with the same limited amount of data. Indeed, if there are K possible classes and M possible phonemic contextual models, we have K X M X M possible combinations of With neural networks as well, this is a
significant problem. Whether likelihoods are generated by MLPs having K X M X M output units or by standard training methods for HMMs, neither will be good probabilistic estimate for a phonetic condition that it is rarely or never observed. Furthermore, a simple application of the known techniques to tπphones, for instance, would result in an output layer with thousands of units, and many millions of connections (i.e. parameters) to train. This is rather cumbersome for the present data sets, which have on the order of 100,000 to 1,000,000 training tokens. In HMM systems, these problems have been handled by interpolating between levels of context-dependence, i.e. phones, biphones and tnphones, depending on the frequency of occurrence of each level. In this case, p(x
t | q
k , is expressed in terms of estimates of p(x
t | q
k , p(x
t | q
k, p(x
t | q
k) and p(x
t | q
k). In fact, this solut
ion
reflects the trade-off between good (i.e. detailed) models that are poorly estimated because of not enough training material and rough models that are very well estimated thanks to their limited number of parameters. As in the earlier discussion, each of these probabilities is typically estimated using restrictive assumptions, such as the form of distribution or statistical independence between multiple features.
The main problem in this contextual modelling lies in the estimation of emission probabilities like :
p(χt qk, (1)
In o
rder to estimate those probabilities, use is made of an artificial neural network set-up having K X M X M output units. Based on statistical mathematical rules the following relations are given :
P q
k,
m x
t) P q
k, c
r m, x
t) . | q
k, x
t) . p(q
k, x
t) (2)
and [
R
Application of Bayes' law on the emission probability (1) now gives p
Substitution of (2) and (3) in (4) now gives :
As will be described hereunder, this transformation, based on a well defined mathematical transformation of the emission probabilities to be calculated, will enable a precise calculation of the latter without making any assumption. The gist of the present invention is to have made a precise choice among the different mathematical possibilities to transform the emission probability (1) expression to be calculated. This choice enables a substantial simplification of the neural networks to be used for calculating the latter emission probability.
As can be deduced from expression (5) the neural network having K X M X M output units can now be splitted into networks having K + M + M or K + M output units. The probability can now be determined without any particular simplifying assumption. Based on theory of hybrid ANN/HMM for phoneme models, as briefly discussed herebefore, i.e. in classification mode where the output values of the ANN are estimated of the a posteriori probabilities of the output classes conditioned on the input, all probabilities present in expression (5) can be estimated by a respective neural network.
*p(q
k | x
t ) is estimated by a first neural network provided for modeling phonemes where the input field contains the current feature vector x
t only and the output limits are associated with the current class q
k. Such a neural network is described in detail in the article of
H. Bourlard and C. Wellekens, entitled "Links Between Markov Models and Multilayer perceptions", published in IEEE Transactions on pattern analysis and machine intelligence, Vol. 12, n° 12 December 1990, p. 1167-1178. is estimated by a second neural network (as illustrated
in figure 3 and in which the output units (117) are associated with the right phonemes
of the triphone and in which the input field is constituted by the element x
t i (s≤ i≤ I) of the current acoustic vector x
t and the current class q
k associated with x
t . is estimated by a third neural network as illustrated
in figure 4 and in which the output units are associated with the left phonemes of the tripones and in which the input field is constituted by the current acoustic vector x
t, the current class q
k and the right phonetic contexts in the triphones.
is estimated by a fourth neural network in which the
output units are associated with the left phonemes of the triphones
and where the input field represents the current class q
k and the right phonemes This provides the a priori probability of observing
a particular phoneme in the left part of a triphone given particular current class and right phonetic context. is estimated by a fifth neural network in which the output
units are associated with the right phonemes of the triphones
and where the input field represents the current class qk . This provides the a priori probability of observing a particular phoneme on the right side of a particular class. Given the limited number of parameters in this model (i.e. K X M), this probability can also be estimated by counting (i.e., this does not require a neural network).
* p(qk ) is the a priori probability of a phoneme as also used in the standard hybrid ANN/HMM phonetic approach, and is simply estimated by counting on the training set. No neural network is required for determining this probability.
* p(xt) is a constant value independent of the classes and is therefore not important for classification purposes. No neural network is required for determining this probability.
As set out herebefore the calculation of the emission probability is thus done by the first neural network and by further neural networks which each are provided for calculating a posteriori probabilities on each of said contextual models, i.e. on
and conditioned on the current class q
k . For limited training sets, thes
e estimates may still need to be smoothed with monophone models, as is done in conventional HMM systems. Additionally, if c
l and c
r are represent broad phonetic classes or clusters rather than phonemes, the above results apply to the estimation of "generalized triphones". Finally, when only left and right context is used, this technique is valid for only 2 networks, the monophone network and one of that estimates p(c | q
k, x
t ).
The input field containing the acoustic data (e.g., x
t) may also be supplied with contextual information. In this case, the x
t probabilities have to be replaced by This leads then to the
estimation of triphone probabilities given acoustic contextual information, which is even more important in the case of triphone models.
As set out herebefore the emission probabilities for triphone models can now be calculated without making any assumption. However the amount of calculation to be performed by each neural network remains rather large. For example in the case of the second neural network (figure 3) a K X M times computation is required. If enough performant neural networks would be available this wouldn't be a major problem.
The amount of calculation to be done can however be reduced by making a simple restriction on the network topology. As is shown in figure 3 the networks comprises two separate sections which only at an end layer are joined. Calculations applied on the inputted feature vector xt are at lower layers separated from the one applied on the classes qk . This restriction is possible since the classes have a binary value and belong to a finite set of states. This
restriction permits the pre-calculation of contextual contributions to the outputs. This computation is done at the end of the training phase, prior to the recognition of any pattern.
Considering the second neural network shown in figure 3 and provided for determining q
k, x
t), the feature vectors x
t inputted on unit 12 are supplied to the hidden units of layer 14. Each hidden unit h ( 1≤h≤H) provides a weighted sum value wherein f is a standard sigmoid function
and dih is a weighting factor.
The weighted sum values zh are then supplied to j summing units Zj which are provided for determining the first pre-sigmoid value zj M(xt) =∑ bhj zh
bh j being a weighting factor.
A comparable set-up is realized for the supplied status q
k (1≤k≤K) to input 11. A hidden layer 13 is provided for determining a further weighted sum value.
wherein w
k l are trained weighting factors. The latter weighted sum value y
l is supplied to L summing units Y
j (15) which are provided for determining the pre-sigmoid value
wherein al j are also trained weighting factors.
The probability q
k, x
t) is determined by the
upper layer 17 provided for calculating
f(Yj + Zj).
By partitioning the net so that no hidden unit receives input from both the context (c) and the input feature vector
(x
t), a simplification is obtained. Further since for each of the contextual models c the pre-sigmoid value Y
j is independent of the inputted feature vector, the pre-sigmoid value can be pre-calculated for all possible contextual models. Those pre-sigmoid values Y
j are then stored into a memory so that it is no longer necessary to calculate that pre-sigmoid value for each probability p q
k , x
t ) to
be determined. In order to provide a suitable adressing for the predetermined value Y
j(q
k) a 2-dimensional matrix set-up is chosen wherein the K values associated with each possible model are
stored. A simple addressing by means of the inputted qk and
values will provide the corresponding Y
j values which will then be used for calculating f(Y
j + Z
j). The major new computation (in comparison with the monophone case) then is simply the cost of some lookups both for the contextual contribution and for the final sigmoidal nonlinearity, which must now be re-computed for each hypothesized triphone.
The set-up as described hereabove gives the maximum pre-calculation possibilities together with the storage of the pre-calculated values. It will however be clear that alternative embodiments with less precalculation are also possible. So it would be possible to pre-calculate only the yl values and store them into a memory addressable by the inputted ck values.
A comparable set-up as the one illustrated in figure 3 is also applied for the third neural network which is provided for determining q
k, J For each set of inputted q
k, a
pre-sigmoid value y
j(q
k, can be pre-calculated and stored in a
memory. The calculation for the feature vector x t in order to obtain the pre-sigmoid value
Z
j(x
t) = b
hj z
n is analogous as described with respect to figure 3.
Since there is now an input to hidden layer 22 as well from unit 20 to which the q
k values are presented as from unit 21 to which the values are presented the calculation of the
Pre-sig moid value Y
j (qk, will be described in detail. Hidden layer
22 is provided for determining the values \
where f is again a standard sigmoid function and s
k l and r
nl are trainedweighting factors. The pre-sigmoid value is then determined by the adders 23
As can be seen from the expression (6) and (7) the pre-sigmoid value Y
j (q
k , is dependent on both input values q
k and which thus provid
es K X M values for Y
j. In order to
provide a suitable addressing for the pre-deter mined Y
j(q
k , stored
into a memory, a 3-dimensional matrix set-up is chosen wherein the K
X M X M values associated with each possible (1≤j≤M) are stored according to a K X M X M matrix. Given
a particular this
provides a matrix wherein a k
th row and n
th column of the matrix there is then stored the pre-sigmoid value Y
j(q
k , The stored values are thus easily addressed by the inputted q
k and value together
forming an address indicating the matrix position wherein the pre-sigmoid value is stored.
The set-up described herebefore is not only applicable in the case of triphones but also in a more general context of calculating probabilities of observing a feature vector (xt) on a class q conditioned on predetermined contextual models c. For the estimation of the probability of observing a current class q with a particular neighboring contextual model c the expression
p(q,c | xt) = p(q| xt) . p(c| q, xt).
The probability is thus decomposed into the product of a posteriori probabilities. This reduces the training of a single network with K X M outputs to the training of two networks with K and M outputs respectively, thus providing a potentially huge saving in time and in
parameters. By assuming that no hidden units are shared between inputs of q and x t, the contribution to the output vector (pre-sigmoid) originating from q can be pre-computed for all values of q and c.