Multispectral, Hyperspectral, and Polarimetric Imaging TechnologyView this Special Issue
Research Article | Open Access
Stacked Denoise Autoencoder Based Feature Extraction and Classification for Hyperspectral Images
Deep learning methods have been successfully applied to learn feature representations for high-dimensional data, where the learned features are able to reveal the nonlinear properties exhibited in the data. In this paper, deep learning method is exploited for feature extraction of hyperspectral data, and the extracted features can provide good discriminability for classification task. Training a deep network for feature extraction and classification includes unsupervised pretraining and supervised fine-tuning. We utilized stacked denoise autoencoder (SDAE) method to pretrain the network, which is robust to noise. In the top layer of the network, logistic regression (LR) approach is utilized to perform supervised fine-tuning and classification. Since sparsity of features might improve the separation capability, we utilized rectified linear unit (ReLU) as activation function in SDAE to extract high level and sparse features. Experimental results using Hyperion, AVIRIS, and ROSIS hyperspectral data demonstrated that the SDAE pretraining in conjunction with the LR fine-tuning and classification (SDAE_LR) can achieve higher accuracies than the popular support vector machine (SVM) classifier.
Hyperspectral remote sensing images are becoming increasingly available and potentially provide greatly improved discriminant capability for land cover classification. Popular classification methods like -nearest-neighbor , support vector machine , and semisupervised classifiers  have been successfully applied to hyperspectral images. Besides, some feature matching methods in the computer vision area can also be generalized for spectral classification [4, 5].
Feature extraction is very important for classification of hyperspectral data, and the learned features may increase the separation between spectrally similar classes, resulting in improved classification performance. Commonly used linear feature extraction methods such as principal component analysis (PCA) and linear discriminant analysis (LDA) are simple and easily implemented. However, these methods fail to model the nonlinear structures of data. Manifold learning methods, which are proposed for nonlinear feature extraction, are able to characterize the nonlinear relationships between data points [1, 6, 7]. However, they can only process a limited number of data points due to their high computational complexity. Deep learning methods, which can also learn the nonlinear features, are capable of processing large scale data set. Therefore, we utilized deep learning for feature extraction of hyperspectral data in this paper.
Deep learning is proposed to train a deep neural network for feature extraction and classification. The training process includes two steps: unsupervised layer-wise pretraining and supervised fine-tuning. The layer-wise pretraining  can alleviate the difficulty of training a deep network, since the learned network weights which encode the data structure are used as the initial weights of the whole deep network. The supervised fine-tuning that is performed by logistic regression (LR) approach aims to further adjust the network weights by minimizing the classification errors of the labeled data points. Training the network can achieve both high level features and classification simultaneously. Popular deep learning methods include autoencoders (AE) , denoised autoencoders (DAE) , convolutional neural networks (CNN) , deep belief networks (DBN) , and convolutional restricted Boltzmann machines (CRBM) . In the field of hyperspectral data analysis, Chen utilized AE for data classification , and Zhang utilized CNN for feature extraction .
In this paper, we focus on the stacked DAE (SDAE) method , since DAE is very robust to noise, and SDAE can obtain higher level features. Moreover, since sparsity of features might improve the separation capability, we utilized rectified linear unit (ReLU) as activation function in SDAE to extract high level and sparse features. After the layer-wise pretraining by SDAE, LR layer is used for fine-tuning the network and performing classification. The features of the deep network that are obtained by SDAE pretraining and LR fine-tuning are called tuned-SDAE features, and the classification approach that utilizes LR classifier on the tuned-SDAE features is hereafter denoted as SDAE_LR in this paper.
Given a neural network, AE  trains the network by constraining the output values to be equal to the input values, which also indicates that the output layer has equally many nodes as the input layer. The reconstruction error between the input and the output of network is used to adjust the weights of each layer. Therefore, the features learned by AE can well represent the input data. Moreover, the training of AE is unsupervised, since it does not require label information. DAE is developed from AE but is more robust, since DAE assumes that the input data contain noise and is suitable to learn features from noisy data. As a result, the generalization ability of DAE is better than that of AE. Moreover, DAE can be stacked to obtain high level features, resulting in SDAE approach. The training of SDAE network is layer-wise, since each DAE with one hidden layer is trained independently. After training the SDAE network, the decoding layers are removed and the encoding layers that produce features are retained. For classification task, a logistic regression (LR) layer is added as output layer. Moreover, LR is also used to fine-tune the network. Therefore, the features are learned by SDAE pretraining in conjunction with LR fine-tuning.
2.1. Denoise Autoencoder (DAE)
DAE contains three layers: input layer, hidden layer, and output layer, where the hidden layer and output layer are also called encoding layer and decoding layer, respectively. Suppose the original data is , where is the dimension of data. DAE firstly produces a vector by setting some of the elements to zero or adding the Gaussian noise to . DAE uses as input data. The number of units in the input layer is , which is equal to the dimension of the input data . The encoding of DAE is obtained by a nonlinear transformation function:where denotes the output of the hidden layer and can also be called feature representation or code, is the number of units in the hidden layer, is the input-to-hidden weights, denotes the bias, stands for the input of the hidden layer, and is called activation function of the hidden layer. We chose ReLU function  as the activation function in this study, which is formulated as
If the value of is smaller than zero, the output of the hidden layer will be zero. Therefore, ReLU activation function is able to produce a sparse feature representation, which may have better separation capability. Moreover, ReLU can train the neural network for large scale data faster and more effectively than the other activation functions.
The decoding or reconstruction of DAE is obtained by using a mapping function :where is the output of DAE, which is also the reconstruction of original data . The output layer has the same number of nodes as the input layer. is referred to as tied weights. If is ranged from 0 to 1, we choose softplus function as the decoding function ; otherwise we preprocess x by zero-phase component analysis (ZCA) whitening and use a linear function as the decoding function:where . DAE aims to train the network by requiring the output data to reconstruct the input data , which is also called reconstruction-oriented training. Therefore, the reconstruction error should be used as the objective function or cost function, which is defined as follows:where cross-entropy function is used when the value of input is ranged from 0 to 1; the square error function is used otherwise. denotes th element of the th sample and is L2-regularization term, which is also called weight decay term. Parameter controls the importance of the regularization term. This optimization problem is solved by using minibatch stochastic gradient descent (MSGD) algorithm , and in (5) denotes the size of the minibatch.
2.2. Stacked Denoise Autoencoder (SDAE)
DAE can be stacked to build deep network which has more than one hidden layer . Figure 1 shows a typical instance of SDAE structure, which includes two encoding layers and two decoding layers. In the encoding part, the output of the first encoding layer acted as the input data of the second encoding layer. Supposing there are hidden layers in the encoding part, we have the activation function of the th encoding layer:where the input is the original data . The output of the last encoding layer is the high level features extracted by the SDAE network. In the decoding part, the output of the first decoding layer is regarded as the input of the second decoding layer. The decoding function of the th decode layer iswhere the input of the first decoding layer is the output of the last encoding layer. The output of the last decoding layer is the reconstruction of the original data .
The training process of SDAE is provided as follows.
Step 1. Choose input data, which can be randomly selected from the hyperspectral images.
Step 2. Train the first DAE, which includes the first encoding layer and the last decoding layer. Obtain the network weights and and the features which are the output of the first encoding layer.
Step 3. Use as the input data of the th encoding layer. Train the th DAE and obtain and and the features , where and is the number of hidden layers in the network.
It can be seen that each DAE is trained independently, and therefore the training of SDAE is called layer-wise training. Moreover, the trained network weights by SDAE acted as the initial weights in the following LR fine-tuning phase. Therefore, SDAE pretrains the network.
SDAE_LR includes SDAE pretraining and LR fine-tuning. SDAE trains the network weights and obtains features by the reconstruction-oriented learning, and the learned weights acted as the initial weights of the network. Further, LR is used to fine-tune the network weights and obtain the fine-tuned features. It is worth noting that SDAE is unsupervised, while LR is supervised and only the data with labeled information can be used in LR stage. The SDAE_LR network is illustrated in Figure 2, which shows a two-category classification problem (there are two output values). We can see that the decoding part of SDAE is removed and the encoding part of SDAE is retained to produce the initial features. In addition, the output layer of the whole network, which is also called LR layer, is added. The following sigmoid function is used as activation function of LR layer:where is the output of the last encoding layer. It is also the deep features that are pretrained by SDAE method. The output of sigmoid function is between 0 and 1, which denotes the classification results.
Labels are associated with the training data points, and therefore we can use the errors between the predicted classification results and the true labels to fine-tune the whole network weights. The cost function is defined as the following cross-entropy function:where denotes the label of the sample . Minimizing the cost function, we can update the network weights. This optimization problem is also solved by MSGD method.
The steps of SDAE_LR network training are as follows.
Step 1. SDAE is utilized to train the initial network weights, described in Section 2.2.
Step 2. Initial weights of the LR layer are randomly set.
Step 3. Training data are used as input data, and their predicted classification results are produced with the initial weights of the whole network.
Step 4. Network weights are iteratively tuned by minimizing the cost function in (9) using MSGD optimization method.
After the network training, we can calculate the features of any input data, which are the output of the last encoding layer. We call the features learned by SDAE pretraining and LR fine-tuning tuned-SDAE feature. It is worth noting that LR classifier is a part of the network. The output of LR layer, which is also the output of the whole network, denotes the classification results. Therefore, SDAE_LR obtains feature extraction and classification simultaneously. In addition, besides LR, other supervised classifiers like support vector machine (SVM) can also be combined with the tuned-SDAE features.
3. Experimental Results and Analysis
3.1. Data Description
Three hyperspectral images were used for experiments. One was collected over Indian Pine (INP) in 1992. The spatial resolution of this image is 20 m; the available band for analysis of the image is 200 after removal of noisy and water absorption bands. One was acquired by Hyperion instrument over the Okavango Delta, Botswana (BOT), in May 2001. The 224-band Hyperion data have 10 nm spectral resolution over the range of 400 nm–2500 nm. The last high spatial resolution hyperspectral image was collected by reflective optics system imaging spectrometer (ROSIS) over the University of Pavia (PU), Italy. This data set has 103 dimensions of a spectral range from 430 nm to 860 nm, and its spatial resolution is 1.3 m. Both BOT and PU data contain 9 land cover types, and INP has 13 land cover types. Figure 3 shows the RGB images and the ground referenced information with class legends of BOT, PU, and INP images. Table 1 lists the class names and number of the three data sets.
3.2. Network Configuration
We firstly normalized the data in the range between 0 and 1 and then randomly selected 20 thousand data points from BOT, PU, and INP images, which were used for unsupervised pretraining of SDAE. In supervised LR training stage, we randomly divided the labeled data into training data, validation data, and testing data, with a ratio of 5 : 2 : 3. The training data are used in LR for fine-tuning, the validation data are for parameter tuning and termination of the iteration in MSGD method, and the testing data are for evaluating the algorithm.
Network configuration contains three parameters, which are the number of hidden layers, the number of units in hidden layer, and the standard deviation of Gaussian noise. The number of hidden layers is selected in the range from 1 to 5, the number of units is chosen from , and the standard deviation of Gaussian noise is selected from . The optimal selection of these parameters is obtained according to the optimal classification results on the validation data. For BOT, PU, and INP data, the optimal number of layers is 4, 3, and 3, respectively; the best options for the number of units are 100, 300, and 200, respectively; the optimal selections of the standard deviation of Gaussian noise are 0.6, 0.6, and 0.2, respectively. In addition, network training includes two parameters: the epochs of pretraining and fine-tuning are set to be 200 and 1500, and the learning rates of pretraining and fine-tuning are selected as 0.01 and 0.1 empirically.
We used Theano for conducting the SDAE_LR classification. Theano is a Python library that can define, optimize, and evaluate mathematical expressions involving multidimensional arrays efficiently and can use GPU to speed up the calculation.
3.3. SDAE_LR Classification Performance
SDAE_LR method is compared with SVM classifier in this section, where SVM classifiers with linear and RBF kernels on the original data were conducted, which are denoted as LSVM and RSVM, respectively. The parameters in RSVM classifier are tuned by cross-validation method, and the penalty parameter in LSVM is set to be 2. The comparison results using overall accuracies (OA%) are shown in Table 2. It can be seen that the SDAE_LR outperformed LSVM for all the three data sets and obtained higher accuracies than RSVM on PU and INP data. It demonstrates that the features learned by the SDAE pretraining and LR fine-tuning can effectively increase the separation between classes. Figure 4 shows the classification results of the whole images using SDAE_LR for the three images. The acceptable results demonstrate good generalization ability of the SDAE_LR approach.
Using a machine with Intel Xeon CPU I7-4770, GPU NVIDIA Q4000, and 8 G RAM, the computational time of the three classifiers on BOT, PU, and INP data is shown in Table 3, where the LSVM and RSVM are implemented using CPU and SDAE_LR utilized GPU for computation. LSVM costs least time and RSVM is the most time-consuming because of the parameter tuning. We did not provide the exact time for RSVM on PU data since it is longer than 12 hours. The proposed SDAE_LR is much faster than RSVM, since it is implemented using Theano which accelerates the computation significantly. It is worth noting that the SDAE pretraining is fast and the LR fine-tuning costs time, because the former is layer-wise training and the latter propagates errors through the whole network.
3.4. Comparison of Different Feature Extraction Methods
Features of SDAE_LR network are obtained by SDAE pretraining and LR fine-tuning, which is called tuned-SDAE features. We compare the proposed method with four popular feature extraction methods, including PCA, Laplacian Eigenmaps (LE), locally linear embedding (LLE), and LDA. The first three methods are unsupervised methods and LDA is supervised. In addition, PCA and LDA are linear methods, while LE and LLE are nonlinear methods. We set the number of features to be 50 for PCA, LE, and LLE empirically. The tuned-SDAE features are obtained by using the same network configuration described in Section 3.2.
After feature extraction by PCA, LE, LLE, LDA, and SDAE_LR, we used SVM classifiers (LSVM and RSVM) for classification. In addition, we also conducted SVMs on the raw hyperspectral data. Tables 4 and 5 show the overall accuracies of these methods using LSVM and RSVM, respectively. Several observations can be obtained: (1) for different feature extraction methods, tuned-SDAE performed the best. It significantly outperformed the others with the LSVM classifier for all the three data sets. When the RSVM classification was employed, the tuned-SDAE features also obtained the highest accuracies on most of the data sets; (2) compared to the SVM classification on the raw hyperspectral data, the four feature extraction methods (PCA, LE, LLE, and LDA) may not improve the accuracies, while the proposed tuned-SDAE features can consistently obtain better performance on most data sets; (3) in the four feature extraction methods (PCA, LE, LLE, and LDA), we cannot find one method that is consistently better than the others. The features obtained by SDAE_LR produced stable and good performances on all the data sets; (4) RSVM performed better than LSVM on the raw data and the features extracted by PCA, LE, LLE, and LDA, while RSVM and LSVM provided similar results on the tuned-SDAE features.
From the last column of Tables 2, 4, and 5, we can also observe that, with the tuned-SDAE features, different classifiers (LR, LSVM, and RSVM) resulted in similar performances. Within the three classifiers, LR is simplest since it is a part of the network, and the output of the network is the LR classification results.
Computational times of different feature extraction methods on the three data sets are listed in Table 6. Since the computational complexity of LE and LLE is , where is the number of dimension and is the number of points, LE and LLE cannot process the large scale data sets. For PU data, we randomly selected 5000 data points for LE and LLE, and the features of the reminding data points are calculated by a kernel-based generalization method . We can see that PCA and LDA are very fast. For BOT data, LE and LLE cost little time, while for INP and PU data, LE is very time-consuming and LLE also costs time, since the numbers of processed data points of INP and PU are much larger than BOT data. Feature extraction of SDAE_LR also requires times, especially for PU data where 20 thousand data points are used in LR fine-tuning stage.
3.5. Analysis of SDAE_LR Network Configuration
Firstly, we provided sensitivity analysis of three parameters in network configuration (number of hidden layers, number of units in each hidden layer, and standard deviation of Gaussian noise). Secondly, we demonstrated the effect of ReLU activation function. Thirdly, we tested the classification performances relative to different rates of training data.
Figure 5 shows the results of parameter analysis. When one parameter was tested, the values of other parameters were set to be values described in Section 3.2. (1) For the layers of the deep network, we tested five different values , and , and the classification results are shown in Figure 5(a). For INP and PU data, the best number of layer is 3; for BOT data, the optimal selection is 4. Results on BOT and PU data are not sensitive to these parameters when the number of layer is larger than 2, while results on INP data indicate that only values of 2, 3, and 4 produced satisfactory performance. (2) For the number of units in each hidden layer, we evaluated seven different values , and . As is shown in Figure 5(b), the best numbers of unit are 100, 300, and 200 for BOT, PU, and INP data, respectively. For INP data, small values like 10 deteriorate the classification performance. However, SDAE_LR is not very sensitive to this parameter in a large range (number of units > 100). (3) For the standard deviation of Gaussian noise, we tested four different values and . The classification results with respect to this parameter is shown in Figure 5(c). The optimal values are 0.6, 0.6, and 0.2 for BOT, PU, and INP data, respectively. It can be been that SDAE_LR is not very sensitive to this parameter.
Selection of activation function of the network is very important, and we chose ReLU function as activation function in this paper, since it is able to produce sparse features. To demonstrate the effectiveness of the sparsity, we compared two activation functions: ReLU function and sigmoid function, where the latter cannot obtain sparse features. The extracted features of SDAE_LR are the outputs of the last hidden layer, and therefore the dimensionality of features is equal to the number of units in the hidden layer. We define sparsity rate as the ratio of the number of zeros in the feature to the dimensionality of the feature. A high sparsity rate means there are many zeros in the feature and the feature is highly sparse. Figure 6 plots the sparsity rates versus different unit numbers of hidden layer using the ReLU activation function. With different number of units, the sparsity rate is high, and the number of nonzero values in the feature is small. Take PU data for example; when the number of unit is 400, the sparsity rate is 0.9626. It means the number of zeros in the feature is 385, and the feature only contains 15 nonzero values. Table 7 shows the OA using SDAE_LR with ReLU function and sigmoid function. It can be seen that ReLU function outperformed sigmoid function on all the three data sets, which demonstrates the efficiency of the sparse features using ReLU function.
The number of training data also affects the network training, since LR fine-tuning is supervised and only training data can be used to further adjust the network weights. Figure 7 shows the SDAE_LR performance with respect to different rates of training data (1%, 5%, 10%, 25%, and 50%). In general, high training data rates resulted in high accuracies, since LR performs supervised fine-tuning and classification.
Deep learning by SDAE_LR is proposed for hyperspectral feature extraction and classification, where SDAE pretrains the network in an unsupervised manner, and LR fine-tunes the whole network and also performs classification. The features are learned by SDAE pretraining and LR fine-tuning. In the network, ReLU activation function was exploited to achieve the sparse features, which may improve the separation capability of the features. In experiments, SDAE_LR outperformed the popular SVM classifier with linear and RBF kernels. The tuned-SDAE features also provide better classification accuracies than several popular feature extraction methods, which demonstrates the good discriminant ability of extracted features. In SDAE, the utilized ReLU function performed better than sigmoid function, indicating the effect of the sparsity of features.
In SDAE_LR method, we only utilized spectral features of data. Plenty of spatial information of hyperspectral images can also be extracted and exploited [2, 19], such as the texture feature, morphological feature, the spatial coordinate information, and the relations between spatial adjacent pixels. Our further work is to combine spatial information in the SDAE_LR framework to further improve the classification performance.
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
This work was supported by National Natural Science Foundations of China (61102104, 81201067), the Fundamental Research Funds for National University, China University of Geosciences (Wuhan) (CUG120408, CUG120119), and Institute of Automation, Chinese Academy of Sciences.
- L. Ma, M. M. Crawford, and J. Tian, “Local manifold learning-based k-nearest-neighbor for hyperspectral image classification,” IEEE Transactions on Geoscience and Remote Sensing, vol. 48, no. 11, pp. 4099–4109, 2010.
- X. Huang and L. Zhang, “An SVM ensemble approach combining spectral, structural, and semantic features for the classification of high-resolution remotely sensed imagery,” IEEE Transactions on Geoscience and Remote Sensing, vol. 51, no. 1, pp. 257–272, 2013.
- L. Ma, M. M. Crawford, X. Yang, and Y. Guo, “Local-manifold-learning-based graph construction for semisupervised hyperspectral image classification,” IEEE Transactions on Geoscience and Remote Sensing, vol. 53, no. 5, pp. 2832–2844, 2015.
- J. Ma, W. Qiu, J. Zhao, Y. Ma, A. L. Yuille, and Z. Tu, “Robust estimation of transformation for non-rigid registration,” IEEE Transactions on Signal Processing, vol. 63, no. 5, pp. 1115–1129, 2015.
- J. Y. Ma, J. Zhao, Y. Ma, and J. W. Tian, “Non-rigid visible and infrared face registration via regularized gaussian fields criterion,” Pattern Recognition, vol. 48, no. 3, pp. 772–784, 2015.
- L. J. P. van der Maaten, E. O. Postma, and H. J. van den Herik, “Dimensionality reduction: a comparative review,” 2008, http://www.iai.uni-bonn.de/~jz/dimensionality_reduction_a_comparative_review.pdf.
- L. Zhang, Q. Zhang, L. Zhang, D. Tao, X. Huang, and B. Du, “Ensemble manifold regularized sparse low-rank approximation for multiview feature embedding,” Pattern Recognition, vol. 48, no. 10, pp. 3102–3112, 2014.
- Y. Bengio, P. Lamblin, D. Popovici, H. Larochelle, U. D. Montral, and M. Qubec, “Greedy layer-wise training of deep networks,” in Advances in Neural Information Processing Systems, vol. 19, pp. 153–160, 2007.
- C. C. Tan and C. Eswaran, “Reconstruction of handwritten digit images using autoencoder neural networks,” in Proceedings of the IEEE Canadian Conference on Electrical and Computer Engineering, pp. 465–469, May 2008.
- P. Vincent, H. Larochelle, Y. Bengio, and P. A. Manzagol, “Extracting and composing robust features with denoising autoencoders,” in Proceedings of the 25th International Conference on Machine Learning, pp. 1096–1103, 2008.
- A. Krizhevsky, I. Sutskever, and G. Hinton, “Imagenet classification with deep convolutional neural networks,” in Neural Information Processing Systems, vol. 25, pp. 1097–1105, 2012.
- G. E. Hinton, S. Osindero, and Y.-W. Teh, “A fast learning algorithm for deep belief nets,” Neural Computation, vol. 18, no. 7, pp. 1527–1554, 2006.
- M. Norouzi, M. Ranjbar, and G. Mori, “Stacks of convolutional restricted boltzmann machines for shift-invariant feature learning,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2735–2742, June 2009.
- Y. S. Chen, Z. H. Lin, X. Zhao, G. Wang, and Y. F. Gu, “Deep learning-based classification of hyperspectral data,” IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, vol. 7, no. 6, pp. 2094–2107, 2014.
- F. Zhang, B. Du, and L. Zhang, “Saliency-guided unsupervised feature learning for scene classification,” IEEE Transactions on Geoscience and Remote Sensing, vol. 53, no. 4, pp. 2175–2184, 2015.
- P. Vincent, H. Larochelle, I. Lajoie, Y. Bengio, and P.-A. Manzagol, “Stacked denoising autoencoders: learning useful representations in a deep network with a local denoising criterion,” Journal of Machine Learning Research, vol. 11, pp. 3371–3408, 2010.
- X. Glorot, A. Bordes, and Y. Bengio, “Deep sparse rectifier neural networks,” in Proceedings of the 14th International Conference on Artificial Intelligence and Statistics, vol. 15, pp. 315–323, 2011.
- L. Bottou, “Online algorithms and stochastic approximations,” in Online Learning and Neural Networks, D. Saad, Ed., pp. 9–42, Cambridge University Press, Cambridge, UK, 1998.
- L. Zhang, L. Zhang, D. Tao, and X. Huang, “On combining multiple features for hyperspectral remote sensing image classification,” IEEE Transactions on Geoscience and Remote Sensing, vol. 50, pp. 879–893, 2012.
Copyright © 2016 Chen Xing et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.