Image Classification using Combination of Topological Features and Neural Networks

Mariana Dória Prata Lima,Gilson Antonio Giraldi,Gastão Florêncio Miranda Junior
DOI: https://doi.org/10.48550/arXiv.2311.06375
2023-11-11
Abstract:In this work we use the persistent homology method, a technique in topological data analysis (TDA), to extract essential topological features from the data space and combine them with deep learning features for classification tasks. In TDA, the concepts of complexes and filtration are building blocks. Firstly, a filtration is constructed from some complex. Then, persistent homology classes are computed, and their evolution along the filtration is visualized through the persistence diagram. Additionally, we applied vectorization techniques to the persistence diagram to make this topological information compatible with machine learning algorithms. This was carried out with the aim of classifying images from multiple classes in the MNIST dataset. Our approach inserts topological features into deep learning approaches composed by single and two-streams neural networks architectures based on a multi-layer perceptron (MLP) and a convolutional neral network (CNN) taylored for multi-class classification in the MNIST dataset. In our analysis, we evaluated the obtained results and compared them with the outcomes achieved through the baselines that are available in the TensorFlow library. The main conclusion is that topological information may increase neural network accuracy in multi-class classification tasks with the price of computational complexity of persistent homology calculation. Up to the best of our knowledge, it is the first work that combines deep learning features and the combination of topological features for multi-class classification tasks.
Computer Vision and Pattern Recognition,Machine Learning,Neural and Evolutionary Computing
What problem does this paper attempt to address?
The problem that this paper attempts to solve is: How to combine topological features with deep - learning techniques to improve the accuracy of image classification tasks. Specifically, the authors used the persistent homology method to extract important topological features from the data space and combined them with deep - learning features, applying them to the multi - class image classification task on the MNIST dataset. Through this method, they hope to improve the accuracy of neural networks in multi - class classification tasks without sacrificing too much computational complexity. ### Main contributions of the paper include: 1. **Application of topological feature encoding**: In different neural network architectures, combine topological features for multi - class image classification, especially on the MNIST dataset. 2. **Computational experiments**: Use multiple persistence diagram (PD) vectorization methods and consider deep - learning architectures and their combinations to conduct experiments on the MNIST dataset. 3. **Improve the accuracy of MNIST MLP**: Compared with the baseline model that only inputs the original image, by introducing topological features, the accuracy of the MLP neural network in multi - class classification tasks is improved. ### Method overview: 1. **Data pre - processing**: - Convert grayscale images to binary images. - Apply three binary image processing functions: heat function, radial function and density function to capture pixel - value information at different levels. 2. **Topological feature extraction**: - Construct a cubical complex. - Filter the complex. - Calculate cubical persistent homology. - Construct a persistence diagram. - Vectorize the persistence diagram to make it compatible with machine - learning algorithms. 3. **Neural network architectures**: - Single - stream architecture: Use MNIST - CNN and MNIST - MLP for classification separately. - Dual - stream architecture: One MNIST - MLP processes topological features, and the other MNIST - MLP or MNIST - CNN processes the original image. 4. **Experimental results**: - Evaluate the accuracy of different feature spaces and architectures on the MNIST dataset. - The conclusion is that topological information can improve the accuracy of the MLP neural network in multi - class classification tasks, but no performance improvement is observed in CNN. ### Formula examples: - **Definition of cubical complex**: \[ K=\bigcup_{d = 1}^{\infty}K_d \] where \(K_d\) represents the set of all basic cubes in \(\mathbb{R}^d\). - **Boundary operator**: \[ \partial_k:C_k^d\rightarrow C_{k - 1}^d \] For a basic chain \(bQ\in bK_k^d\), the boundary operator is defined as: \[ \partial_kbQ=\begin{cases} 0, &\text{if }Q = [l]\\ [l + 1]-[l], &\text{if }Q = [l, l + 1] \end{cases} \] - **Vectorization of persistence diagrams**: - **Betti curve**: \[ B_d(\epsilon)=\left|\{(b_i, d_i);\epsilon\in[b_i, d_i)\}\right| \] - **Persistent landscape**: \[ \Lambda_i(t)=\begin{cases} t - b_i, &\text{if }t\in[b_i, b_i+\frac{d_i}{2}]\\ t + b_i, &\text{if }t\