Learning From Incomplete Features by Simultaneous Training of Neural Networks and Sparse Coding

Cesar F. Caiafa, Ziyao Wang, Jordi Solé-Casals, Qibin Zhao

Abstract

Standard machine learning models typically assume complete feature vectors, yet real-world data is frequently plagued by missing values due to sensor failure, occlusions, or incomplete records. Traditional approaches rely on sequential imputation—filling in missing values before training—which often fails to preserve class-discriminative information. We present a simultaneous learning and coding framework that integrates a sparse coding reconstruction objective directly into the neural network's classification loss. By allowing class labels to guide the reconstruction process, the model achieves significantly higher accuracy on incomplete datasets compared to traditional unsupervised imputation methods.

Introduction

In many practical domains, such as medical diagnostics or autonomous driving, input features are often incomplete. The standard remedy is to apply an imputation technique (e.g., mean substitution, K-nearest neighbors, or generative modeling) to "complete" the data before feeding it into a classifier. However, this sequential approach is fundamentally limited because the imputation step is typically unsupervised; it reconstructs missing values to minimize general reconstruction error without regard for the decision boundaries of the downstream task. Consequently, the imputed values may inadvertently blur the distinctions between classes.

Simultaneous Learning and Coding

To address this, we propose a unified objective function that optimizes for classification and reconstruction simultaneously:

$$J = \mathcal{L}_{class}(\Theta, s) + \lambda_1 \| \Phi x - \Phi D s \|_2^2 + \lambda_2 \| s \|_1$$

Where:

  • $\mathcal{L}_{class}$ is the classification error (e.g., cross-entropy).
  • $D$ is a learned dictionary of "atoms."
  • $s$ is a sparse coefficient vector representing the input $x$.
  • $\Phi$ is a masking matrix representing the observed entries.
Conceptual framework of simultaneous learning and coding. (a-b) Digits represented as combinations of dictionary atoms. (c) Handling unavailable entries. (d-e) How class-aware reconstruction moves incomplete observations relative to the decision boundary.

Optimization Strategy

The model is trained using an alternating optimization procedure. In the first phase, the sparse coefficients ($s$) are fixed, and the classifier weights ($\Theta$) and dictionary ($D$) are updated via backpropagation. In the second phase, the classifier and dictionary are fixed, and the sparse coefficients are updated using a sub-gradient method to satisfy the sparsity constraint. This ensures that the dictionary and the resulting reconstructions are not just accurate, but specifically tailored to aid the classification task.

Experimental Evaluation

We evaluated the proposed method against several baselines, including Zero Fill (ZF), Mean Imputation (MU), and K-Nearest Neighbors (KNN), across datasets like MNIST, Fashion-MNIST, and CIFAR-10. Missing data was simulated using both random masks (up to 95% missing) and structured occlusions.

Test accuracy vs. percentage of missing entries for various methods. The simultaneous approach (red line) consistently outperforms sequential baselines across different sparsity levels (K) and dictionary coherence (d).

Key Findings

  1. Label-Informed Reconstruction: The primary advantage of the simultaneous approach is that class labels inform the "filling in" of missing features. For instance, if a digit is partially occluded but labeled as a '3', the dictionary-based reconstruction will prioritize features that distinguish a '3' from an '8', even if both are plausible given only the observed pixels.
  2. Robustness to High Sparsity: On the MNIST dataset with 75% of features missing, the simultaneous method achieved 98.09% accuracy, significantly outperforming Zero Fill (84.86%) and competitive generative models like NN-GMM (96.36%).
  3. Implicit Regularization: Training on incomplete data acts as a form of input-layer dropout. In some cases, the model trained on incomplete data performed better on full-feature test sets than a model trained only on complete data, suggesting improved generalization.

Conclusion and Future Work

By integrating sparse coding into the neural network training loop, we demonstrate that reconstruction and classification are mutually beneficial tasks. While the current iterative optimization for sparse coefficients is computationally intensive, the gains in accuracy—especially in high-sparsity regimes—are substantial. Future research will focus on accelerating the sparse coding step using second-order optimization methods and scaling the dictionary learning process to high-resolution natural imagery.

Summary updated

BibTeX
@inproceedings{caiafa2021learning,
  author = {Cesar F. Caiafa and Ziyao Wang and Jordi Solé-Casals and Qibin Zhao},
  title = {{Learning From Incomplete Features by Simultaneous Training of Neural Networks and Sparse Coding}},
  booktitle = {Workshops @ CVPR},
  year = {2021},
  doi = {10.1109/cvprw53098.2021.00296},
}
Figure