Recurrent (RNN) and convolutional (CNN) neural networks have improved the performance over hidden Markov models (HMM) combined with gaussian mixtures models (GMMs) in automatic speech recognition (ASR) systems[1, 2, 3, 4, 5] during the last decade. More recently, end-to-end approaches received a growing interest due to the promising results obtained with connectionist temporal classification (CTC)  combined with RNNs  or CNNs .
However, despite such evolution of models and paradigms, the acoustic features remain almost the same. The main motivation is that filters spaced linearly at low frequencies and logarithmically at high frequencies make it possible to capture phonetically important acoustic correlates. Early evidence was provided in  showing that mel frequency scaled cepstral coefficients (MFCCs) are effective in capturing the acoustic information required to recognize syllables in continuous speech. Motivated by these analysis, a small number of MFCCs (usually ) with their first and second time-derivatives, as proposed in 
, have been found suited for statistical and neural ASR systems. In most systems, a time frame of the speech signal is represented by a vector with real-valued elements that express sequences of MFCCs, or filter energies, and their temporal context features. A concern addressed in this paper, is the fact that the relations between different views of the features associated with a frequency are not explicitly represented in the feature vectors used so far. Therefore, this paper proposes to:
Introduce a new quaternion representation (Section 2) to encode multiple views of a time-frame frequency in which different views are encoded as values of imaginary parts of a hyper-complex number. Thus, vectors of quaternions are embedded using operations defined by a specific quaternion algebra to preserve a distinction between features of each frequency representation.
There are advantages which could derive from bundling groups of numbers into a quaternion. Like capsule networks , quaternion networks create a tighter association between small groups of numbers rather than having one homogeneous representation. In addition, this kind of structure reduces the number of required parameters considerably, because only one weight is necessary between two quaternion units, instead of 4. The hypothesis tested here is whether these advantages lead to better generalization. The conducted experiments on the TIMIT dataset yielded a phoneme error rate (PER) of % for QCNNs which is significantly lower than the PER obtained with real-valued CNNs (%), with the same input features. Moreover, from a practical point of view, the resulting networks have a considerably smaller memory footprint due to a smaller set of parameters.
2 Quaternion algebra
The quaternions algebra defines operations between quaternion numbers. A quaternion Q is an extension of a complex number defined in a four dimensional space. , with, r, x, y, and z four real numbers, and , i, j, and k are the quaternion unit basis. Such a definition can be used for describing spatial rotations that can also be represented by the following matrix of real numbers:
In a quaternion, is the real part while is the imaginary part () or the vector part. Basic quaternion definitions are
all products of ,k are: ,
conjugate of is: ,
unit quaternion ,
the Hamilton product between and is defined as follows:
The Hamilton product is used in QCNNs to perform transformations of vectors representing quaternions, as well as scaling and interpolation between two rotations following a geodesic over a sphere in thespace as shown in .
3 Quaternion convolutional neural networks
This section defines the internal quaternion representation (Section 3.1), the quaternion convolution (Section 3.2), a proper parameter initialization (Section 3.3), and the connectionist temporal classification (Section 3.4).
3.1 Quaternion internal representation
The QCNN is a quaternion extension of well-known real-valued and complex-valued deep convolutional networks (CNN) [13, 14]. The quaternion algebra is ensured by manipulating matrices of real numbers. Consequently, a traditional convolutional layer, with a kernel that contains feature maps, is split into 4 parts: the first part equal to , the second one to , the third one to and the last one to of a quaternion
. Nonetheless, an important condition to perform backpropagation in either real, complex or quaternion neural networks is to have cost and activation functions that are differentiable with respect to each part of the real, complex or quaternion number. Many activation functions for quaternion have been investigated and a quaternion backpropagation algorithm have been proposed in . Consequently, the split activation [17, 18] function is applied to every layer and is defined as follows:
with corresponding to any standard activation function.
3.2 Quaternion-valued convolution
Following a recent proposition for convolution of complex numbers and quaternions , this paper presents basic neural networks convolution operations using quaternion algebra. The convolution process is defined in the real-valued space by convolving a filter matrix with a vector. In a QCNN, the convolution of a quaternion filter matrix with a quaternion vector is performed. For this computation, the Hamilton product is computed using the real-valued matrices representation of quaternions. Let be a quaternion weight filter matrix, and the quaternion input vector. The quaternion convolution w.r.t the Hamilton product is defined as follows:
and can thus be expressed in a matrix form:
An illustration of such operation is depicted in Figure 1.
3.3 Weight initialization
Weight initialization is crucial to efficiently train neural networks. An appropriate initialization improves training speed and reduces the risk of exploding or vanishing gradient. A quaternion initialization is composed of two steps. First, for each weight to be initialized, a purely imaginary quaternion
is generated following an uniform distribution in the interval. The imaginary unit is then normalized to obtain following the quaternion normalization equation. The later is used alongside to other well known initializing criterion such as  or  to complete the initialization process of a given quaternion weight named . Moreover, the generated weight has a polar form defined by :
Therefore, is generated as follows:
represents a randomly generated variable with respect to the variance of the quaternion weight and the selected initialization criterion. The initialization process follows and  to derive the variance of the quaternion-valued weight parameters. Therefore, the variance of W has to be investigated:
is equals to since the weight distribution is symmetric around . Nonetheless, the value of is not trivial in the case of quaternion-valued matrices. Indeed,
follows a Chi-distributed with four degrees of freedom (DOFs) andis expressed and computed as follows:
Therefore, in order to respect the He Criterion , the variance would be equal to:
3.4 Connectionist Temporal Classification
In the acoustic modeling part of ASR systems, the task of sequence-to-sequence mapping from an input acoustic signal to a sequence of symbols is complex due to:
and could be in arbitrary length.
The alignment between and is unknown in most cases.
Specially, is usually shorter than in terms of phoneme symbols.
To alleviate these problems, connectionist temporal classification (CTC) has been proposed 
. First, a softmax is applied at each timestep, or frame, providing a probability of emitting each symbolat that timestep. This probability results in a symbol sequences representation , with in the latent space . A blank symbol
is introduced as an extra label to allow the classifier to deal with the unknown alignment. Then,is transformed to the final output sequence with a many-to-one function defined as follows:
Consequently, the output sequence is a summation over the probability of all possible alignments between and after applying the function . Accordingly to 
the parameters of the models are learned based on the cross entropy loss function:
During the inference, a best path decoding algorithm is performed. Therefore, the latent sequence with the highest probability is obtained by performing argmax of the softmax output at each timestep. The final sequence is obtained by applying the function to the latent sequence.
The performance and efficiency of the proposed QCNNs is evaluated on a phoneme recognition task. This section provides details on the dataset and the quaternion features representation (Section 4.1), the models configurations (Section 4.2), and finally a discussion of the observed results (Section 4.3).
4.1 TIMIT dataset and acoustic features of quaternions
The TIMIT  dataset is composed of a standard 462-speaker training dataset, a 50-speakers development dataset and a core test dataset of sentences. During the experiments, the SA records of the training set are removed and the development set is used for early stopping. The raw audio is transformed into -dimensional log mel-filter-bank coefficients with deltas, delta-deltas, and energy terms, resulting in a one dimensional vector of length . An acoustic quaternion associated with a frequency and a time frame is defined as follows:
It represents multiple views of a frequency at time frame , consisting of the energy in the filter band corresponding to , its first time derivative describing a slope view, and its second time derivative describing a concavity view. Finally, a unique quaternion is composed with the three corresponding energy terms. Thus, the quaternion input vector length is ().
4.2 Models architectures
The architectures of both CNN and QCNN models are inspired by . A first D convolutional layer is followed by a maxpooling layer along the frequency axis. Then, D convolutional layers are included, together with dense layers of sizes and respectively for real- and quaternion-valued models (with ). Indeed, the output of a dense quaternion-valued layer has nodes and is times larger than the number of units. The filter size is rectangular
, and a padding is applied to keep the sequence and signal sizes unaltered. The number of feature maps varies fromto for the real-valued models and from to for quaternion-valued models. Indeed, the number of output feature maps is times larger in the QCNN due to the quaternion convolution, meaning quaternion-valued feature maps correspond to real-valued ones. The PReLU activation function is employed for both models . A dropout of and a regularization of
are used across all the layers, except the input and output ones. CNNs and QCNNs are trained with the Adam learning rate optimizer and vanilla hyperparameters during epochs. Then, a fine-tuning process of epochs is performed with a standard and a learning rate of . Finally, the standard CTC loss function defined in  and implemented in  is applied. Experiments are performed on Tesla P100 and Geforce Titan X GPUs.
4.3 Results and discussion
Results on the phoneme recognition task of the TIMIT dataset are reported in Table 1. It is worth noticing the important difference in terms of the number of learning parameters between real and quaternion valued CNNs. It is easily explained by the quaternion algebra. In the case of a dense layer with input values and hidden units, a real-valued model will have M parameters, while to maintain equal input and output nodes () the quaternion equivalent has quaternions inputs and quaternion-valued hidden units. Therefore the number of parameters for the quaternion model is M. Such a complexity reduction turns out to produce better results and may have other advantages such as a smallest memory footprint while saving NN models. Moreover, the reduction of the number of parameters does not result in poor performance in the QCNN. Indeed, the best PER reported is % from a QCNN with feature maps and layers, compared to a PER of % for a real-valued CNN with feature maps and layers. It is worth underlying that both model accuracies are increasing with the size and the depth of the neural network. However, bigger real-valued feature maps leads to overfitting. In fact, as shown in Table 1, the best PER for a real-valued model is reached with () feature maps and decreasing at (%) and (). The QCNN does not suffer from such weaknesses due to the smaller density of the neural network and achieved a constant PER improvement alongside with the increasing number of feature maps. Furthermore, QCNNs always performed better than CNNs independently of the model topologies.
|Models||Dev PER %||Test PER %||Params|
With much fewer learning parameters for a given architecture, the QCNN performs always better than the real-valued one on the reported task. In terms of PER, an average relative gain of % (w.r.t CNNs result) is obtained on the testing set. It is also worth recalling that the best PER of
% is obtained with just a QCNN without HMMs, RNNs, attention mechanisms, batch normalization, phoneme language model, acoustic data normalization or adaptation. Further improvements can be obtained with exactly the same QCNN by just introducing a new acoustic feature in the real part of the quaternions.
5 Related work
Early attempts to perform phoneme and phonetic feature recognition with multilayer perceptrons (MLP) were proposed in[24, 25, 26]. A PER of % is reported in  using RNNs. More recently, in 6] an approach called the Connectionist Temporal Classification (CTC) has been developed and can be used without an explicit input-output alignment. Bidirectional RNNs (BRNNs) are used in  for processing input data in both directions with two separate hidden layers, which are then composed in an output layer. With standard mel frequency energies, first and second time derivatives a PER of % was obtained. Other recent results with real-valued vectors of similar features are reported in [29, 4, 30, 31]. Other types of quaternion valued neural networks (QNNs) were introduced for encoding RGB color relations in image pixels [32, 33, 34], and for classifying human/human conversation topics [35, 36, 18]. A quaternion deep convolutional and residual neural network proposed in  have shown impressive results on the CIFAR images classification task. However, a specific quaternion is used for each RGB color value as in  rather than integrating pixel multiple views as in , and suggested in this paper for an ASR task.
This paper proposes to integrate multiple acoustic feature views with quaternion hyper complex numbers, and to process these features with a convolutional neural network of quaternions. The phoneme recognition experiments have shown that: 1) Given an equivalent architecture, QCNNs always outperform CNNs with significantly less parameters; 2) QCNNs obtain better results than CNNs with a similar number of learning parameters; 3) The best result obtained with QCNNs is better than the one observed with the real-valued counterpart. This demonstrates the initial intuition that the capability of the Hamilton product to learn internal latent relations helps quaternions-valued neural networks to achieve better results .
Limitations and Future Work. So far, traditional acoustic features, such as mel filter bank energies, first and second derivatives have shown that significantly good results can be obtained with a relative small set of input features for a speech time frame. Nevertheless, speech science has shown that other multi-view context-dependent acoustic relations characterize signals of phonemes in context. Future work will attempt to characterize those multi-view features that mostly contribute to reduce ambiguities in representing phoneme events. Furthermore, quaternions-valued RNNs will also be investigated to see if they can contribute to the improvement of recently achieved top of the line results with real number RNNs.
-  G. Hinton, L. Deng, D. Yu, G. E. Dahl, A.-r. Mohamed, N. Jaitly, A. Senior, V. Vanhoucke, P. Nguyen, T. N. Sainath et al., “Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups,” Signal Processing Magazine, IEEE, vol. 29, no. 6, pp. 82–97, 2012.
-  O. Abdel-Hamid, A.-r. Mohamed, H. Jiang, and G. Penn, “Applying convolutional neural networks concepts to hybrid nn-hmm model for speech recognition,” in Acoustics, Speech and Signal Processing (ICASSP), 2012 IEEE International Conference on. IEEE, 2012, pp. 4277–4280.
M. Ravanelli, P. Brakel, M. Omologo, and Y. Bengio, “Improving speech recognition by revising gated recurrent units,”Proc. Interspeech 2017, 2017.
-  K. Greff, R. K. Srivastava, J. Koutník, B. R. Steunebrink, and J. Schmidhuber, “Lstm: A search space odyssey,” IEEE transactions on neural networks and learning systems, vol. 28, no. 10, pp. 2222–2232, 2017.
A. Graves, S. Fernández, F. Gomez, and J. Schmidhuber, “Connectionist
temporal classification: labelling unsegmented sequence data with recurrent
neural networks,” in
Proceedings of the 23rd international conference on Machine learning. ACM, 2006, pp. 369–376.
-  Y. Zhang, M. Pezeshki, P. Brakel, S. Zhang, C. L. Y. Bengio, and A. Courville, “Towards end-to-end speech recognition with deep convolutional neural networks,” arXiv preprint arXiv:1701.02720, 2017.
-  S. B. Davis and P. Mermelstein, “Comparison of parametric representations for monosyllabic word recognition in continuously spoken sentences,” in Readings in speech recognition. Elsevier, 1990, pp. 65–74.
-  S. Furui, “Speaker-independent isolated word recognition based on emphasized spectral dynamics,” in Acoustics, Speech, and Signal Processing, IEEE International Conference on ICASSP’86., vol. 11. IEEE, 1986, pp. 1991–1994.
-  J. S. Garofolo, L. F. Lamel, W. M. Fisher, J. G. Fiscus, and D. S. Pallett, “Darpa timit acoustic-phonetic continous speech corpus cd-rom. nist speech disc 1-1.1,” NASA STI/Recon technical report n, vol. 93, 1993.
-  S. Sabour, N. Frosst, and G. E. Hinton, “Dynamic routing between capsules,” arXiv preprint arXiv:1710.09829v2, 2017.
-  K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in
-  C. Trabelsi, O. Bilaniuk, D. Serdyuk, S. Subramanian, J. F. Santos, S. Mehri, N. Rostamzadeh, Y. Bengio, and C. J. Pal, “Deep complex networks,” arXiv preprint arXiv:1705.09792, 2017.
-  D. Xu, L. Zhang, and H. Zhang, “Learning algorithms in quaternion neural networks using ghr calculus,” Neural Network World, vol. 27, no. 3, p. 271, 2017.
-  T. Nitta, “A quaternary version of the back-propagation algorithm,” in Neural Networks, 1995. Proceedings., IEEE International Conference on, vol. 5. IEEE, 1995, pp. 2753–2756.
-  P. Arena, L. Fortuna, L. Occhipinti, and M. G. Xibilia, “Neural networks for quaternion-valued function approximation,” in Circuits and Systems, 1994. ISCAS’94., 1994 IEEE International Symposium on, vol. 6. IEEE, 1994, pp. 307–310.
-  T. Parcollet, M. Morchid, P.-M. Bousquet, R. Dufour, G. Linarès, and R. De Mori, “Quaternion neural networks for spoken language understanding,” in Spoken Language Technology Workshop (SLT), 2016 IEEE. IEEE, 2016, pp. 362–368.
-  A. M. Chase Gaudet, “Deep quaternion networks,” arXiv preprint arXiv:1712.04604v2, 2017.
X. Glorot and Y. Bengio, “Understanding the difficulty of training deep
feedforward neural networks,” in
International conference on artificial intelligence and statistics, 2010, pp. 249–256.
K. He, X. Zhang, S. Ren, and J. Sun, “Delving deep into rectifiers: Surpassing human-level performance on imagenet classification,” inProceedings of the IEEE international conference on computer vision, 2015, pp. 1026–1034.
-  D. Kingma and J. Ba, “Adam: A method for stochastic optimization,” arXiv preprint arXiv:1412.6980, 2014.
-  F. Chollet et al., “Keras,” https://github.com/keras-team/keras, 2015.
-  H. Bourlard and S. Dupont, “A mew asr approach based on independent processing and recombination of partial frequency bands,” in Spoken Language, 1996. ICSLP 96. Proceedings., Fourth International Conference on, vol. 1. IEEE, 1996, pp. 426–429.
A. J. Robinson, “An application of recurrent nets to phone probability estimation,”IEEE transactions on Neural Networks, vol. 5, no. 2, pp. 298–305, 1994.
-  Y. Bengio, R. De Mori, G. Flammia, and R. Kompe, “Global optimization of a neural network-hidden markov model hybrid,” IEEE transactions on Neural Networks, vol. 3, no. 2, pp. 252–259, 1992.
-  G. Dahl, A.-r. Mohamed, G. E. Hinton et al., “Phone recognition with the mean-covariance restricted boltzmann machine,” in Advances in neural information processing systems, 2010, pp. 469–477.
-  A. Graves, A.-r. Mohamed, and G. Hinton, “Speech recognition with deep recurrent neural networks,” in Acoustics, speech and signal processing (icassp), 2013 ieee international conference on. IEEE, 2013, pp. 6645–6649.
-  J. Chorowski, D. Bahdanau, K. Cho, and Y. Bengio, “End-to-end continuous speech recognition using attention-based recurrent nn: First results,” arXiv preprint arXiv:1412.1602, 2014.
-  L. Lu, L. Kong, C. Dyer, N. A. Smith, and S. Renals, “Segmental recurrent neural networks for end-to-end speech recognition,” arXiv preprint arXiv:1603.00223, 2016.
-  L. Lu, L. Kong, C. Dyer, and N. A. Smith, “Multi-task learning with ctc and segmental crf for speech recognition,” arXiv preprint arXiv:1702.06378, 2017.
-  Y.-Z. Hsiao and S.-C. Pei, “Edge detection, color quantization, segmentation, texture removal, and noise reduction of color image using quaternion iterative filtering,” Journal of Electronic Imaging, vol. 23, no. 4, p. 043001, 2014.
B. Chen, H. Shu, G. Coatrieux, G. Chen, X. Sun, and J. L. Coatrieux, “Color image analysis by quaternion-type moments,”Journal of mathematical imaging and vision, vol. 51, no. 1, pp. 124–144, 2015.
M. A. Garg and M. S. Goyal, “Vector sparse representation of color image using quaternion matrix analysis based on genetic algorithm,”Imperial Journal of Interdisciplinary Research, vol. 3, no. 7, 2017.
-  T. Parcollet, M. Morchid, and G. Linares, “Deep quaternion neural networks for spoken language understanding,” in Automatic Speech Recognition and Understanding Workshop (ASRU), 2017 IEEE. IEEE, 2017, pp. 504–511.
-  P. Titouan, M. Morchid, and G. Linares, “Quaternion denoising encoder-decoder for theme identification of telephone conversations,” Proc. Interspeech 2017, pp. 3325–3328, 2017.
-  H. Kusamichi, T. Isokawa, N. Matsui, Y. Ogawa, and K. Maeda, “A new scheme for color night vision by quaternion neural network,” in Proceedings of the 2nd International Conference on Autonomous Robots and Agents, vol. 1315, 2004.