# EliNAC: Autoencoder Approach for Electronic Invoices Data Clustering
###### Abstract
It is worth emphasizing that one of the main issues when it comes to most clustering algorithms is the average-case complexity, that in some cases, such as the agglomerative hierarchical algorithm, goes as far as \(O(N^{2})\)[21]. On the other hand, more optimized solutions are also available, where DBSCAN, which has average-case complexity \(O(\mathrm{N}\log_{2}N)\)[22], can cluster data faster than other conventional algorithms. However, even when considering fast approaches, once \(N\) reaches high numbers, time can still be a problem [23]. With that in mind, alternatives, such as Neural Networks (NNs), may provide promising solutions, as explored in this research. Several works in the current literature aim at improving clustering results [24; 25; 26; 27; 28; 29]. Many of those use NNs for preprocessing the data before feeding the data into a clustering algorithm [27; 28; 29], where most of them rely on algorithms, such as K-means, that are not time-efficient. Others also implement deep learning directly in the clustering process since it provides flexibility [24; 25; 26]. Still, they are more focused on improving the clustering rather than providing solutions that may enhance big data performance. Other works use the autoencoder as a solution for anomaly detection [30; 31; 32]. However, unlike this research, such complex solutions are not intended for faster clustering results for short-text data. Aiming at providing a new solution when dealing with NF-e data, we propose a service for clustering short-text data in NF-es that uses an autoencoder for data clustering, called ELINAC. ELINAC's purpose is to aid the auditing of transactions documented in NF-e, clustering similar data by short-text descriptions and making anomaly detection in numeric fields easier. For this, ELINAC transforms the data and creates clusters based on an autoencoder model. Doing so, ELINAC generates results that auditors can use to analyze NF-es or similar data in a time-efficient manner. The results show that the ELINAC can efficiently group data while performing three times faster than traditional algorithms in the worst case. Additionally, the data transformation provides better outcomes for the autoencoder and every other clustering algorithm used in the experiments. To the best of our knowledge, this is a novel study for the following reasons:  
* Our work clusters short-text data in a short time based on an autoencoder network. * We rely on the possibility of adjusting the clustering parameters without retraining. * Our autoencoder model implemented in ELINAC is faster than traditional and hierarchical models. * We identified outliers based on the reconstruction error values produced by our model. The remainder of this work is organized as follows. Section 2 discusses and analyses related works to what is being proposed in ELINAC. Section 3 presents the proposed service, describing the dataset used for experiments, how the data are transformed, the autoencoder model used and the algorithm used for clustering. Section 4 presents the results and analysis of the performed experiments to assess the ELINAC. Finally, Section 5 presents a retrospective of what was achieved with this research and discusses future works.