{'fraction_non_alphanumeric': 0.03140184444517899, 'fraction_numerical': 0.009090007602551813, 'mean_word_length': 4.987334256877102, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Adaptation of Autoencoder for Sparsity Reduction From Clinical Notes Representation Learning

When dealing with clinical text classification on a small dataset recent studies have confirmed that a well-tuned multilayer perceptron outperforms other generative classifiers, including deep learning ones. To increase the performance of the neural network classifier, feature selection for the learning representation can effectively be used. However, most feature selection methods only estimate the degree of linear dependency between variables and select the best features based on univariate statistical tests. Furthermore, the sparsity of the feature space involved in the learning representation is ignored. Goal: Our aim is therefore to access an alternative approach to tackle the sparsity by compressing the clinical representation feature space, where limited French clinical notes can also be dealt with effectively. Methods: This study proposed an autoencoder learning algorithm to take advantage of sparsity reduction in clinical note representation. The motivation was to determine how to compress sparse, high-dimensional data by reducing the dimension of the clinical note representation feature space. The classification performance of the classifiers was then evaluated in the trained and compressed feature space. Results: The proposed approach provided overall performance gains of up to 3% for each evaluation. Finally, the classifier achieved a 92% accuracy, 91% recall, 91% precision, and 91% f1-score in detecting the patient's condition. Furthermore, the compression working mechanism and the autoencoder prediction process were demonstrated by applying the theoretic information bottleneck framework.

Impact Statement-Autoencoder effectively tackles the problem of sparsity in the representation feature space from a small clinical narrative dataset. Significantly, it can learn the best representation of the training data because of its lossless compression capacity as compared to other approaches. Consequently, its downstream classification ability can also be significantly improved, which cannot be done using deep learning models.

I. INTRODUCTION
C LINICAL decision support systems (CDSS) are continuously being developed and play a crucial role in promoting a personalized healthcare system, as more and more data are collected and stored continuously [1]. These data represent decisive points in advancing and enhancing the efficiency and effectiveness of CDSS operations. Predictive models have been developed based on the latter for preventive treatment and patient diagnosis, culminating in intelligent, precise, and timely healthcare improvement [2]. In one notable example, a recent study [3] analyzed the effect of CDSS on cardiovascular risk in 18,578 patients in 70 community health centers. In that case, CDSS significantly reduced the risk of cardiovascular disease among vulnerable high-risk patients.
Following the above successes, a CDSS was developed at CHU Sainte-Justine Research Center (CHUSJ). The system monitors the management of pediatric intensive care for all patients ranging in age from 0 to 18. Fig. 1 illustrates two fundamental processes in the CDSS workflow at CHUSJ, which involve collecting and processing critical care data. First, clinical data are collected and stored in a clinical data warehouse. The data processing unit is then systematically aggregated and processed to convert raw data to a machinereadable form in the data processing unit. This process helps analyzing the unknown data interpretation and presentation. The CDSS can thus integrate the advanced analytic result of the data processing unit and learning algorithms; then clinicians can adequately use the CDSS to guide early intervention and prevention for healthcare management.
One of the goals of the CDSS system in CHUSJ is automatically screening the data from electronic medical records, chest X-rays and other data sources, which has the potential to increase the diagnosis rate and then improve the management of acute respiratory distress syndromes (ARDS) in real time. Usually, the diagnosis of ARDS was delayed or missed in twothirds of patients, and the diagnosis was missed completely in 40% of patients [4]. To make the diagnosis of ARDS, three main conditions need to be detected: hypoxemia (low blood oxygenation), presence of infiltrates on chest X Ray and absence of cardiac failure [5]. Our research team has developed algorithms for hypoxemia [6], chest X-ray analysis [7], and identification of the absence of cardiac failure [8], [9]. Technically, we successfully performed extensive analyzes of machine learning algorithms (ML) aimed at detecting cardiac failure from clinical narratives using natural language processing based on such algorithms [8]. The study included the clinical notes of 1386 patients classified by two independent physicians using a standardized approach. It confirmed that the framework proposed herein yields an overall classification performance with 89% accuracy, 88% recall, and 89% precision by applying a multilayer perceptron neural network (MLP-NN) classifier in combination with a term frequency × inverse document frequency (TF-IDF) learning representation for clinical notes.
These results were made possible by the contributions of the feature selection process, also known as SelectKBest. The advantage of the process was proven for supervised models as the classifier performance brought overall improvements of up to 3-4% over the case without the feature selection. It is obvious to understand because there are fewer misleading features; after selecting the best K features, the classifier accuracy effectively improves. Unfortunately, the SelectKBest feature selection continues to have certain limitations in the proposed framework. One reason is that the feature selection method is based on a statistical test that estimates the degree of linear dependency between random variables. Then, it removes irrelevant features and ignores the correlation between data elements. As a result, more samples are required for an accurate estimation and avoidance of overfitting, which is not possible in our case [10]. Furthermore, SelectKBest does not deal mainly with the sparsity of the feature space in the note representation matrix [11]. Consequently, the sparsity that characterizes the learning representation vector space is ignored.
In the health care field, the autoencoder algorithm (AE) has lived up to its promises and has shown its effectiveness when it comes to improving outcomes for efficient clinical decision making. First, AE can find informative transformed feature vectors through the compressed latent representation. For example, a study [12] demonstrates an efficient framework for automatically learning compact representations from heterogeneous raw data sources from patient health data. In addition, AE can improve the predictability of the six different learning models to detect Parkinson's classification [13].
Another study [14] shows that AE improved the performance of a novel outlier detection mechanism by retrofitting word vectors for the biomedical ontology matching task. Second, having rich and accurate clinical data is very challenging [15] because the acquisition and sharing of medical data faces a significant obstacle in the form of privacy issues and the sensitive nature of the data. Fortunately, AE can be applied for sparsity reduction in clinical representation feature space to allow to tackle problems related to limited data availability. It could effectively discover the low dimensional embeddings, and reveal the underlying effective manifold structure from a sparse high dimensional document-term matrix [16]. Therefore, the present study examines alternatives to feature selection and focuses mainly on compressing data without loss of information by employing an AE algorithm. First, we aim to achieve a better feature space without any sparsity. We are interested in compressing the sparse TF-IDF matrix and reducing its dimensions to improve the efficiency of the feature space representation. Notably, we incorporate a neural network to learn efficient codings of unlabeled data to address the issues caused by sparse vectors generated from the TF-IDF representation feature space for clinical notes. Then, the compressed vector space from the TF-IDF matrix is fed into the classifiers as a refined input. Finally, ML classifiers conduct the learning process to draw comparative results, which are then used to evaluate performance for the classification task.
Our study confirms that AE effectively compresses the vector space of the TF-IDF representation for clinical narratives into a lower dimension. The proposed approach can retain the critical feature by capturing the correlation between attributes during the training process, hence; the downstream classification task can generally be increased to 2-3% for each evaluation criterion. Furthermore, we also highlight the value of AE behaviors in a limited data set. We analyze the working mechanism of the AE, which explains how the AE works to compress data through the encoder and decoder. Based on the information-theoretic framework, the working mechanism of the AE is to optimize the information bottleneck during the compression and prediction process, respectively. As a result, the behavior of AE in limited data is exactly in harmony with such cases where there are much larger data availability.
Section II will discuss the materials and methods. The experimental results and discussion then will be discussed in section III, IV. Finally, section V provides concluding remarks.

A. Data Sparsity Challenges
In numerical analysis, a sparse matrix or sparse array is a matrix in which most elements are zero [17]. The number of zero-valued elements divided by the total number of elements (e.g., m × n for a m × n matrix) is called the matrix sparsity (equal to 1 minus the density of the matrix). Using these definitions, a matrix will be sparse when its sparsity is more significant than 0.5. In our case, we have more than 580000 (n-grams) word count from 5444 single lines of notes with 1941 positive cases (36% of total) and 3503 negative cases. We applied the SelectKBest to select top best 'k=20000' of the vectorized features for the TF-IDF preresentation learning feature space. Finally, we have a matrix of features of (5444 × 20000). With the sparsity, it is calculated by the Eq. 1, and the sparsity of the TF-IDF matrix is greater than 0.9.
It confirms that the representation matrix from the TF-IDF is sparse because every word is treated separately. Hence, the semantic relationship between separated entities is ignored, which would cause information loss. Although the combination of TF-IDF and MLP-NN consistently outperformed other combinations with overall performance and was the most stable under all circumstances [8], the sparsity remains. Therefore, the motivation is how we can compress the sparse, highdimensional data by reducing the dimension from the feature space of clinical notes representation TF-IDF feature space. sparsity = 1 − count nonzero(TF-IDF) total elements of (TF-IDF) (1)

B. Autoencoder Learning Algorithm
An AE was originated by [18] to solve a nonlinear dimensional reduction; later AE was famously promoted by training a MLP-NN with a small central layer to reconstruct highdimensional input vectors [19], [20]. Technically, AE takes an input X ∈ R N×D and, maps it to a latent representation Z ∈ R N×M via a nonlinear mapping. Let us call x ∈ X, and z ∈ Z, we will have: W is a weight matrix during training, b is a bias vector, and g(·) stands for a nonlinear function, such as the logistic sigmoid function or a hyperbolic tangent function. The encoded feature representation x is then used to reconstruct the input x by reverse mapping, leading to the reconstructed input x : where W is usually limited to the form of W = W T , i.e. the same weight is used to encode the input and decode the latent representation. f (·) is also a non-linear function. The AE tries to learn a function f W ,b (x) ≈ x . In other words, it is trying to learn an approximation of the identity function for the output x that is similar to x. Still, by placing constraints on the network, such as limiting the number of hidden units, we can discover interesting data structures. Then, the reconstruction error is defined as the Euclidean distance between x and x that is constrained to approximate the input data x (that is, minimizing ||x − x || 2 ).
For the reconstruction evaluation between the original data x, and the reconstructed output x , we will apply the statistical measure R 2 i for the i th variable of x i . It can be computed as: Since R 2 = 1 will be a perfect reconstruction; we will evaluate the reconstruction by how much the value of R 2 is close to 1. Ideally, an effective AE can be designed and trained based on the minimization of reconstruction error from Eq. 4 and maximization of the reconstructed effectiveness from Eq. 5; however, it is substantially based on its width (number of neuron units or latent representation dimension M) and its depth (number of hidden layers). First, conventional AE relies on the dimension of the latent representation z being smaller than that of the input x (M < D), which means that it tends to learn a low-dimensional compressed representation. The study [21] presents methods to learn the decoder function f (·) as a learnable function through the reconstruction error in Eq. 4 in several representation learning approaches. It is concluded that the compression depends on dimension M but less on dimension D. Second, it has been shown that training a neural network-based by increasing the number of hidden layers (in combination with an increase in the number of neuron units per layer) achieves less consistent results [22]. Therefore, in our case, we use a small and simple AE. We employ an AE with three layers (one input layer, one hidden layer, and one output layer). Mainly, to reduce the parameters from the latent space of the AE, we apply the regularization technique from study [23] to remove redundant parameters.
After training, we use the weight matrix from the hidden layer as a pre-trained tool. A classifier subsequently use this pre-train latent space representation to perform the binary classification, as shown in Fig. 2. For the classifiers, it is essential to have consistency in evaluating the proposed ap-proach's performance. Then, we employ six different ML classifiers, including Random Forest (RF), Multinomial Naive Bayes (MultinomialNB), Logistic Regression (LR), Support Vector Machine (SVC), Gaussian Naive Bayes (GaussianNB) and Multilayer Perceptron Neural Network (MLP-NN).
Furthermore, to understand the dynamics of learning and the behavior of AE; especially, in our case with limited data, we also analyze the behavior of AE during the training process from the encoder and decoder. Technically, we capture to understand how the AE can retain the information during the compression process. To do that, we apply the information-theoretic quantities and their estimators based on information-theoretic learning, which compute and optimize information-theoretic descriptors named mutual information. The information-theoretic framework [24]- [26] has been utilized for a detailed theoretical explanation of an AE. These studies rely on the "information bottleneck" [27], [28] to understand and estimate how the AE works by quantifying its information plane coordinates. The information bottleneck can be used as an optimal bound that maximally compresses the input x, for a given mutual information on the desired output x . There are comprehensive overviews of recent studies [29]- [31]. Technically, we first bin the output activation as stated in [28], and we treat each hidden layer i (1 ≤ i ≤ K) as a single variable T i . Then we will be able to estimate the mutual information between all the hidden layers and the input/output layers by estimating the joint distribution P(X, T i ) and P(T i , X ), and use them to calculate the mutual information of the encoder (between the input X and the hidden layer T i ), and the mutual information of the decoder (between the hidden layer T i and the desired output X ) using the following equations Eq. 6, 7. Finally, we can learn the good representation T (X), which is characterized by its encoder and decoder distribution P(T |X), and P(X |T ), respectively, to effectively map the input patterns X to a good prediction of the desired output X .
III. RESULTS To assess the performance of our method, metrics including accuracy, precision, recall (or sensitivity), and F1 score were used [32]. These metrics are defined as follows.   patients correctly classified. FP and FN represent false positives and false negatives, respectively, and represent the number of positive and negative patients incorrectly predicted. For implementation, we used the same hyperparameters from our previous study [8] for all classifiers so that we can have a consistent evaluation for the performance. The data was also divided into 60% training, 20% validation, and 20% testing. The implementation was done using Python Scikit learn [33] and Keras [34]. We performed a grid search for up to three hidden layers and 500 neurons per layer, and other hyperparameters are summarized in Table I for AE training. For the optimizers, we used the Stochastic Gradient Descent (SGD) and Adaptive Moment Estimation (ADAM) with small scalar ε, and the forgetting factors for gradients and second moments of gradients, β 1 and β 2 , respectively. Then, a combination with the highest estimations was considered the best performance.

IV. DISCUSSION
To deal with the sparsity, many researchers simply focus on dimension reduction. There are two most popular techniques, namely Linear Discriminant Analysis (LDA) and Principal Component Analysis (PCA), for their simplicity among other dimension reduction techniques [35], even with a large dataset [36]. Especially when the training data set is small, the PCAsupervised discriminative approach can outperform; it is also less sensitive to the variability of the training sets [37]. The study [38] shows that PCA can increase the performance of different ML classifiers for the prediction of cardiac failure.
It can be said that the classifiers performed better after applying LDA to the linear data set. So, in the case of linear data, LDA can reduce the dimensionality and be used in different classification tasks [39]. However, the TF-IDF enhanced with the LDA approach did not allow the classifier to score high accuracy compared to the other two methods when smaller datasets were fed [40]. One of the reasons was explained in [36]; the results showed that ML algorithms with PCA produce better results when the dimensionality of the data sets is high. When the dimensionality of datasets is low, the ML algorithms without dimensionality reduction yield better results. Another possible way is using an unsupervised generative Latent Dirichlet allocation to estimate the topic distribution (topics) by using observed variables (words). Latent Dirichlet allocation shows the effectiveness of overcoming the sparsity from the feature space matrix of TF-IDF [41]. It can also help to make texts more semantically focused and reduce sparseness [42]. However, its selection of characteristics does not improve performance with small data [43].
We explored the possibility of PCA for sparsity reduction because of their advantages mentioned above. The training was tuned and performed, and the best performance was achieved with a decrease to 2 principal dimensions. The completed test has an accuracy of 88%; this is less than the performance of SelectKBest with 89%. Furthermore, following the recommendation of [44], we also tested a statistical method, Neighborhood Component Analysis (NCA) [45], to reduce the dimensions of the data set. NCA has shown that it works well on a small dataset for the medical domain. However, the result is slightly better than PCA; NCA only achieves an accuracy of 89% (the same as SelecKBest). Consequently, neither PCA nor NCA can improve the classification accuracy. It confirms the limitation of these approaches by linearly approximating a feature subspace to maximize class separability.
Furthermore, non-linear activation function AE (AE) shows its best performance on compression the sparse TF-IDF representation space. We compare the effectiveness of reconstruction based on the reconstruction evaluation from Eq. 5 between PCA, linear activation function AE (LAE), AE, and stacked AE (SAE) [46]. The results confirm that the PCA and LAE have the same performance, achieving about 80% of the reconstruction. When the activation of AE is linear, then PCA and LAE are identical. In addition, there is no improvement if the SAE is used to extract the features in cases of limited data. Besides, the effectiveness of non-linear activation in AE is proved, when it can maximally reconstruct up to 86% compared to the original spare data. It is one of the advantages of nonlinear transformation from AE, which is trained by a neural network, superior to linear transformation from conventional approaches.
Overall, the downstream classification performances are effectively improved by feeding the compressed feature space output from the AE to ML classifiers. Fig. 3 shows the loss during the training and validation process by optimizing the loss function from Eq. 4 for training the AE; the loss converges perfectly. After successfully training the AE, we have a pre-trained compressed, low-dimension feature space. We continue to the machine learning classifiers to perform the classification and evaluate the performance. Instead of performing on MLP-NN, LR, and GaussianNB, we also tested  with other classifiers such as Random Forest (RF), Multinomial Naive Bayes, and Support Vector Machine. Fig. 5 shows the comparison, using a box plot, of the 5-fold cross-validation. Again, MLP-NN gives the best performances; LR follows right after; GaussianNB is comparatively similar to LR. And all other classifiers are less effective. The best performance from MLP-NN is achieved at 92%, 91%, 91% and 91%, respectively, for accuracy, precision, recall, anf f1 score. And, the detailed confusion matrix showing the classification of positive cases (1) and negative cases (0) between predicted and actual labels is shown in Fig. 4. The experimental results are improved to 2-3 % for each evaluation criterion from [8], which had a general classification performance in a sparse TF-IDF feature space at 89% accuracy, 88% recall, and 89% precision. It confirms that the AE method can deal with the sparsity by compressing the TF-IDF feature space. Consequently, it finally improves the downstream task performance of the MLP-NN classifier, and is also more robust than other methods. Recent work [47] also confirmed a similar effect, but it was applied to a different dataset type and larger data availability. These results confirm the effectiveness of compressing the feature representation learning space into a low-dimensional representation using the AE algorithm. Notably, the robust transformation can outplay the deep learning models with limited data resources.
Furthermore, an important aspect of performance analysis is that the proposed approach still shows its advantageous capacity to increase data availability. We investigated the effectiveness of AE for compressing feature space, and studied how algorithm performance varies with the increasing of training  examples from the compressed feature space. We assessed the performance of two classifiers GaussianNB and MLP-NN to evaluate the effectiveness. When it possibly increases data availability in the future, whether the classifier improves performance or not. In this case, study [48] confirms that when the number of training examples increases, the generative model based on Naive Bayes would expect to perform better. However, our results are in contrast to that confirmation. Fig.  6 shows the GaussianNB training and validation score when increasing the number of training examples. Technically, the GaussianNB reaches a plateau of performance after around 2000 training examples with the same dataset size, and the cross-validation score could not improve. We should expect that this is one of the limitations of GaussianNB, namely the linear discrimination characteristic for a real-world dataset, discussed in [49]. In contrast, the MLP-NN shows improvement with the increasing size of the dataset. Its cross-validation score gradually increases and shows no signs of reaching a maximum point. In short, we can confirm that when data is possibly increased, our approach still perfectly works and continually improves its performance for the downstream classification.
Moreover, the behavior of AE in limited data is in harmony with more significant data cases based on the information-theoretic framework. We analyzed the behavior of AE based on an information-theoretic framework, as mentioned in Eq. 6, and 7. We want to understand how the AE behaves during the compression process by analyzing the mutual information of each hidden layer from the encoder and decoder. Generally, this type of analysis has been performed for a larger data set and has mainly focused on other data sources compared to our case; such as computer vision [50], medical imaging [51], and genetics [52]. We performed the analysis for two AE models with respecting to varying number of hidden layers (three hidden layers, and five hidden layers). As shown in Fig.  7, there are two phases of the information plane in each hidden layer of the three-layer and five-layer cases. It is noted that from left to right it illustrates the behavior for each hidden layer. And in each hidden layer, from top to bottom, it captures the mutual information for each training epoch. Finally, all trajectories seem to follow a similar path during the learning process, then eventually converge and get closer to the optimal points in the theoretic information bottleneck bound.
Specifically, it can be divided into two phases for the working mechanism of AE in Fig. 7. The first phase is called the drift phase, where the AE attempts to learn the latent representation T (X) with a smaller dimension compared to the original data X. During the compression, there will be information lost, that is why we can see the trend of decreasing the mutual information of encoder I(X; T ). At the end of this step, we will have a compressed latent representation T (X), and an optimal mutual information I(X; T ). Then, the second phase is named the diffusion phase. Within this step, the AE tries to find the reconstructed data X , which are optimally close to the original data X. The AE maps the latent representation T (X) to the reconstructed data X by maximizing the mutual information of the decoder I(T ; X ). By doing that, we can see the increasing trend of I(T ; X ); until I(T ; X ) reaches its optimal bound for each layer. One more interesting point is that the optimal mutual information will get smaller, when AE has more hidden layers. In case of three hidden layers, the optimal mutual information of the encoder I(X, T ) is larger by 6.0, but is maximum at 5.5 for five hidden layers. It is the same for the optimal mutual information of the decoder I(T, X ) at nearly 7.0 and 6.5 for three hidden layers and five hidden layers, respectively. These results illustrate the mechanism of an AE is to optimize the information bottleneck trade-off T (X) during compression and prediction, respectively, for each layer. Remarkably, it is trained on a small and sparse dataset; still, it proves its effectiveness by compressing and maximizing the mutual information from the TF-IDF feature space.

V. CONCLUSION
First, this study has shown that the participation of an AE in training can effectively compress the feature space of TF-IDF. The AE with a nonlinear activation function can achieve the reconstruction capacity at 86% compared to the original data. It outperforms other approaches such as PCA, NCA, LAE (AE with linear activation function), and stacked AE. It concludes that AE can learn the best representation of the training data due to its lossless compression capacity.
Additionally, the AE also works well with a small clinical dataset; especially, in harmony with the information-theoretic mechanism of an AE for a larger dataset, and from different data sources. It has two phases of learning: the drift phase of the encoder by trying to compress the data. The second phase is related to the diffusion phase by maximizing the mutual information process in the decoder. Consequently, it shows the effectiveness of losses information in compressing the data. By doing so, we also capture the interpretability, comprehensibility, and transparency of the proposed model for decision making in our CDSS system as recommended by [53].
The second stage involves the use of an MLP-NN to predict the health status based on the compressed feature space. It has also been shown that the sparsity reduction for the feature space strongly affects the classifier performance in downstream task. AE learning algorithm effectively leverages the sparsity reduction. As a result, it helps the MLP-NN classifier achieve 92% accuracy, 91% recall, 91% precision, and 91% f1-score. This efficient ensemble model can outperform all alternative approaches: GaussianNB, LR, RF, MultimonialNB, and SVC.
The proposed approach is still proving successful in cases where data availability is increased. The MLP-NN is effective in achieve a better performance after the GaussianNB reaches its maximum capacity. In future work, we will choose the optimal parameters and validate our method on more datasets. We will explore the weak supervision approach that recently proved its effectiveness in 4,000 cardiac magnetic resonance sequences with imperfect labels [54]; because it can maximize the use of unlabeled data at scale, which is costly to annotate.