An Odor Labeling Convolutional Encoder–Decoder for Odor Sensing in Machine Olfaction

Deep learning methods have been widely applied to visual and acoustic technology. In this paper, we propose an odor labeling convolutional encoder–decoder (OLCE) for odor identification in machine olfaction. OLCE composes a convolutional neural network encoder and decoder where the encoder output is constrained to odor labels. An electronic nose was used for the data collection of gas responses followed by a normative experimental procedure. Several evaluation indexes were calculated to evaluate the algorithm effectiveness: accuracy 92.57%, precision 92.29%, recall rate 92.06%, F1-Score 91.96%, and Kappa coefficient 90.76%. We also compared the model with some algorithms used in machine olfaction. The comparison result demonstrated that OLCE had the best performance among these algorithms.


Introduction
Machine olfaction is the intelligent technology that captures odorous materials and identifies them by distinguishing the differences in response patterns. Machine olfaction is usually crystallized as electronic noses (e-noses) which consist of an array of gas sensors mimicking biological noses to 'smell' and 'sense' odors [1]. Gas sensors in the array should be carefully selected based on several specifications (sensitivity, selectivity, response time, recovery time, etc.) for specific detecting purposes. On the other side, some general-purpose e-noses may have an array of gas sensors that are sensitive to a variety of odorous materials so that such e-noses can be applied to many fields.
An increasing number of researches and applications utilized machine olfaction in recent years. In the early 20th century, some studies applied e-noses to the analysis of products along with gas chromatography-mass spectrometers (GC-MS) [2]. Some linear methods such as principal component analysis (PCA), linear discriminant analysis (LDA), support vector machines (SVM), etc. were used in the analysis [3]. Non-linear methods such as artificial neural networks (ANN) [4] were also introduced in machine olfactions. In recent years, deep learning methods have been significantly developing and widely used in various fields such as computer visions, computer auditions, automatic drive, etc. An increasing number of deep learning methods are also applied to machine olfactions and gains relatively decent performances [5].
There are several advantages that machine olfaction technology applies to many fields. Firstly, machine olfaction technology can be placed around objects to detect their odorous volatiles so that it is not necessary to damage them. Secondly, e-nose is usually portable equipment because of its smaller size, which makes it possible to detect odors anywhere and anytime. Thirdly, e-noses extend the olfaction perceptual scope since gas sensors are capable of detect volatiles which humans are unable to smell and sense. Furthermore, e-noses can be used in extreme environments where are smell-unfriendly or dangerous to humans [6,7].
In this paper, we proposed a Odor Labeling Convolutional Encoder-Decoder (OLCE) for odor sensing. We will first describe the experimental setups and the modeling of OLCE. After that, experimental results will be illustrated. Finally, some discussions about machine olfaction will be demonstrated.

Research scheme
The OLCE was modeled and verified by self-collecting sensing datasets. Here Chinese herbal medicines were selected as experimental materials for verification. A general-purpose commercial electronic nose PEN-3 was applied for collecting response data with a normative sampling experimental procedure. In order to view the performance of the model, several algorithms already used in machine olfaction was also built to compare and analyze the performance. The basic research scheme was described in Figure 1

Experiment Setup
The instrument and tools used in the experiment included beakers, a PEN-3 electronic nose, and a computer. 200ml beakers were used for the enrichment of volatiles released from experimental subjects which here were Chinese herbal medicines. The PEN-3 electronic nose manufactured by AirSense Inc. was used for collecting gas sensing responses. The computer with installed Winmuster software was used to connect and control the e-nose. The architecture experimental setup is displayed in Figure 2. The architecture of the experimental setup for collecting odor response data. Experimental materials were placed in a clean beaker, then the beaker was sealed by a thin film. The clean air refilling inflation needle was inserted onto the bottom. The collecting inflation needle was inserted into the roof for headspace collecting.

PEN-3 Electronic Nose
Response data were collected from an e-nose, PEN-3, AirSense Inc. The PEN-3 e-nose is a general-purpose gas response signal sampling instrument with 10 metal-oxide gas sensors each of which has different sensitivity to a different gases as shown in Table 1. Since the combination of these 10 sensors, PEN-3 has the ability to sense various gases, which makes it a suitable instrument for the research. The settings of the e-nose are illustrated in Table 2. Table 1. Descriptions of the sensor array in PEN-3 e-nose.

W5S
Very sensitive, broad range of sensitivity, reacts to nitrogen oxides, very sensitive with negative signals.

W3C
Ammonia, used as sensor for aromatic compounds.

The Preparation of Experimental Materials
We selected seven Chinese herbal medicines (Betel Nut, Dried Ginger, Rhizoma Alpiniae Officinarum, Tree Peony Bark, Fructus Amomi, Rhioxma Curcumae Aeruginosae, Fructus Aurantii) for the experiment. In order to ensure the consistency of gas sensor responses, the procedures of preparing these materials were carefully set as follows: 1. Materials were not damaged but only gathered volatiles naturally released from these medicines. 2. Materials were placed in clean beakers individually and kept still for over 20 minutes for the enrichment of volatiles. 3. The temperature was kept around 25 • C and the humidity was kept around 75%.

OLCE Modeling
Suppose the input is X which here is the sensing response collected by gas sensors. The labels of Chinese herbal medicines are defined as y which is one-hot encoding. The encoder is defined as F (•) and the decoder is defined as G(•). So the encoder can be presented as and the decoder can be presented as where X output of the decoder. The aim of building the encoder-decoder is to gain an accurate labeling results y. In order to achieve this, the re-build responses X must approximate to the original responses X: X → X. In other words, the aim of the encoder-decoder can be illustrated as follow: The encoder was designed with a convolutional neural network. The convolutional layer extract features by computing the product sum of the input variables. ReLU was used to introduce non-linearity in the convolutional network. ReLU A max-pooling layer was introduced to reduce spatial size of the convolved data. After that, a fully connected layer was introduced to learn non-linear combinations of the high-level features. Softmax was implemented through the output layer as a classifier to identify odor labels. Symmetrically, the decoder was a convolutional neural network with the same structure. The architecture of the encoder and decoder can be seen in Figure 3 and parameters can be viewed in Table 3.

Comparison Models
In order to take a view on the performance of OLCE, several algorithms that had been applied to machine olfactions were selected for comparison. LDA is not only used for dimensionality reduction but also used as a robust classifier, which had been commonly used in odor identification [8]. LDA reduces in-class distances and increases the distances between classes.
MLP classifier is an artificial neural network and has been applied to odor identification [9]. MLP is is a supervised non-linear function approximator learns a function f (•) : R m → R n , where m = 1200 was a 120 * 10 sample and n = 7 is the labels. The MLP consisted of 4 hidden layers with the ReLU activation function.
DT is a non-parametric supervised learner which classifies data based on already-known sample distribution probability. It performed decently in odor classification [10]. We here set the classification criterion to Gini, where X m is samples used the node m. The proportion of class k in node m is It represents a region R with N observations. In order to prevent overfitting, the maximum depth of a tree was limited to 10. PCA-LDA is a combination model and has been applied to odor identification [11]. PCA implemented the dimensionality reduction through orthogonally projecting input data onto a lower-dimensional linear space by singular value decomposition with scaling each component. LDA was implemented for the classification.
In the CNN-SVM model, CNN is a typical feedforward neural network for feature extraction. SVM is a supervised learning algorithm for classification. The CNN consisted of 2 one-dimension convolutional layers, fully max-pooling layers, and a fully-connected layer. The model has been applied to identify beer, which beer odors were detected by an e-nose [12].

Original Responses
The patterns of original responses of the PEN-3 e-nose were different from 7 Chinese herbal medicines as shown in Figure 4. It can be seen that the responses of different herbal materials were diverse in amplitudes, the interval between the initial state and steady-state. The "W5S" sensor has the highest sensitivity to each herbal materials. The "W2W" sensor has the lowest sensing rate that the response time is longer than other sensors. The response patterns of Chinese herbs were different since the volatile materials of each herb are different.

OLCE Evaluation
There were 10 OLCE models built and several performance evaluation indexes (accuracy, precision, recall rate, F-score, Kappa rate, and Hamming loss) were calculated to view the effectiveness of the model. The results were displayed in Table 4.
OLCE had the maximum accuracy 0.96 and minimum accuracy 0.8457. It had a decent precision rate (between 0.8397 and 0.9635) and recall rate (0.8419 and 0.9576). The F 1 score of the model was between 0.8379 and 0.9591. It demonstrated that OLCE had less false positive and false negative predicting output.
Kappa coefficient was also calculated to evaluate the consistency and classifier precision.
where P o is the accuracy and P e is calculated as follow: a i and b i (classes i = 1, 2, ..., 7) represents the number of actual true samples and predicting true sample, respectively. n is the total number of samples. The Kappa revealed that OLCE has perfect consistency.

Comparison
Several algorithms used in machine olfactions were built for the purpose of comparing them with OLCE. Each model was built 10 times to view predicting scores, results of these models are illustrated in Table 5. OLCE got the highest score 0.9714, which MLP got the lowest accuracy score 0.12. Comparing the accuracy scores in the same algorithm, OLCE got the highest minimum score 0.88 among these algorithms. LDA got the lowest variance of accuracy scores, which demonstrated LDA had the highest consistency of predicting accuracy. OLCE had the third best variance 0.0009 and the highest average predicting accuracy 0.9257.
Considering that OLCE had the decent accuracy, precision, recall rate, F 1 score, and Kappa coefficients, OLCE is sufficiently suitable to classify odors from gas responses detected by e-nose. Compared with other algorithms, LDA, CNN-SVM, and OLCE were appropiate to machine olfaction because they had better average predicting accuracy and better consistency.

The Decoder
OLCE is an encoder-decoder structure model, and the representation layer consists of several odor labels. It is interesting to take a view on decoded responses. We randomly selected one original response and one decoded response from both the training set and test set. For the convenient investigation, normalization of these responses data was implemented. Figure 5 displayed responses from several samples.
OLCE learns and distinguishes significant variations from one or several small response windows in a gas-response sample. The response state, which is the interval between the base-line and the steady-state, is the most significant feature for OLCE. In the steady-state or reduced state, OLCE distinguishes these variations according to the relative amplitude-change of response data and response curve intersections, where response curve intersections have a higher priority for distinguishing. OLCE is capable of learning vast variations if there are significant changes in response data. If response data are relatively smooth and steady, OLCE may concentrate on those smaller variations as features. Furthermore, the model ignores response fluctuations from one single gas sensor. As shown in Figure 5a, the "W3S" response (brown line) in subfigure "Fructus Amomi" (row 5, column 1) fluctuates obviously, but the decoder did not take it as a feature.

Challenges of Machine Olfactions
Machine olfactions have been applied widely to many fields in recent decades, thanks to the development of gas sensor fabrications, odor signal preprocessing, and pattern recognition for odor sensing [15]. There are various types of gas sensors which can be divided into several types: catalytic combustion, electrochemical, thermal-conductive, infrared absorption, paramagnetic, solid electrolyte, and metal oxide semiconductor sensors [16]. In recent years, paper-based sensors, which are a new type of gas sensor fabricated by cellulose paper, have the characteristics of flexibility, low-cost, lightweight, tailorablity, and environmental-friendly [17]. The performance of gas sensors is commonly evaluated by sensitivity, selectivity, response time, and recovery time. For the detections of target odors, we usually take advantage of the cross-sensitivity effects in gas sensors. The cross-sensitivity effect in a gas sensor occurs because of the poor selectivity. Some odorants are classified as so-called reduced gases which suppress sensor responses. Accordingly, the response of a gas sensor is a synthetically non-linear sensing process to all odorants in an odor. The response patterns of different odors are difficult to interpret. Although studies of the gas sensor fabrications mainly concentrate on the sensitivity and selectivity to some typical gases, the cross-sensitivity effect of gas sensors is a characteristic to mimic biological noses because that an olfaction system senses odor by the patterns of activating olfactory neurons [18]. However, the majority of gas sensors are fabricated for the purpose of sensing industrial gases and volatile organic chemicals (VOCs) according to those major electronic component suppliers. Odors are somewhere complex in nature since the ingredients of an odor are difficult to identify. The concentration ratios of each ingredient varied may change odor and smell different.
The dimensionality of olfactory perceptual space is still a challenging issue because the mechanism of olfactory perceptions has not yet been clearly investigated. In biology, studies had identified that the human olfactory system consists of 400 odorant receptor types [19]. An odor activates some of these odorant receptor types to generate a specific pattern so that humans can discriminate against it. The number of odorant receptor types sets the upper bound on the dimensionality of the perceptual space. In major languages such as Chinese, English, and Spanish, there are not dedicated vocabulary to describe odors. Instead, words about objects (flowers and animals) or emotion (pleasantness) are applied to describe (a) Training Set (b) Test set (c) A typical response Figure 5. The original responses and decoded responses. In 5a and 5b, the left column shows the input responses of OLCE encoder, and the right column describes the output responses of OLCE decoder. The subfigure 5c highlighted the significant features extracted by decoder. olfactory perceptions. J. E. Amoore claimed that odors were divided into 7 groups which were regarded as primary odors [20]. Markus Meister suggested that olfactory perceptual space may contain around 20 dimensions or less [18], and Yaara and Noam reviewed that humans are good at odor detection and discrimination, but are bad at odor identification and naming [21]. Semantic descriptors profiled from a list of defined verbal words are rated by human sniffers. Up to now, there is not a universal list of odor semantic descriptors yet.
Currently, there is not an odor space to describe the variety of odors in nature. Some studies revealed a significant relationship between odor molecular structure information and olfactory perceptions [22]. Functional groups and hydrocarbon structural features were considered to be factors influencing olfactory perceptions. A hypothesis demonstrated that odorants possessing the same functional groups activate the same glomerular modules [23] which generate similar perceptual patterns so that humans identify them as the same type of odor. Recent studies revealed that 3D structure information of odorous molecules has a more noticeable impact on olfactory perceptions [24]. Considering the complexity of molecular structure information, the mapping to odor space may be non-linear.
Several studies investigated the map between odor responses and odorous perceptual labels. T. Nakamoto designed an odor sensing system that consisted of a mass spectrum and a large-scale neural networks to predict odor perceptual information [25]. R. Haddad et al. investigated the relationship between odor pleasantness and e-nose sensing responses by modeling a fead-forward back-propagation neural network [26]. D. Wu et al. designed a convolutional neural network for predicting odor pleasantness [5]. These studies concentrated on one or multiple odor perceptual labels since the It is worth establishing some forms of odor space to describe a sufficiently complete group of odors in nature. An odor space should be some form of numerical values with definite dimensionality. The odor space should be a linear space for convenient interpreting because of the non-linear map. Those semantic olfactory descriptors are only some points in the quantization just as the color "red" is quantified to (255, 0, 0) in RGB color space. The importance of such odor space is a quantization form so that odors can be converted to information for data storage or transmission. The odors can be reproduced by blending some similar odorants to generate the odor.

Conclusions
In this paper, we proposed an Odor Labeling Convolutional Encoder-decoder (OLCE). Experimental setups, modeling for the validation of the model has been described. The results demonstrated that OLCE performed decently in machine olfaction. The decoded responses from OLCE revealed that the model extracts significant variations from response data. We discussed the challenge of machine olfaction. To establish a general odor space for describing odorous information is a challenge to us.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: