Sketching based Representations for Robust Image Classification with Provable Guarantees

Nishanth Dikkala, Sankeerth Rao Karingula, Raghu Meka, Jelani Nelson, Rina Panigrahy, Xin WangNeurIPS 2022

Overview

In modern computer vision, deep neural networks (such as CNNs) are the gold standard for generating image embeddings. However, these embeddings operate as "black boxes"—they are notoriously difficult to interpret and often brittle, meaning imperceptible changes to an image can cause drastic fluctuations in the resulting embedding. Prior to deep learning, hand-crafted features like SIFT were utilized, but these relied on heuristics and lacked formal theoretical guarantees.

This NeurIPS 2022 paper bridges the gap between empirical performance and mathematical rigor by proposing a novel method for representing images using Locality Sensitive Hashing (LSH) "sketches." These sketches are provably invertible, isomorphic to the image's latent parameters, and mathematically "smooth," enabling robust classification and the creation of a global dictionary of shapes with formal performance guarantees.

The LSH-Sketch Methodology

The authors model images as Polynomial Threshold Functions (PTFs). In this framework, images are treated as compositions of mathematical shapes (e.g., ellipses, rectangles, or hyperbolas) defined by inequalities. To represent these images succinctly, the authors introduce the LSH-Sketch:

  1. Simple LSH-Sketch: The image's pixels are partitioned into distinct regions, or "buckets," using Locality Sensitive Hashing. For each bucket, the model trains a simple scalar value or a small set of parameters to optimally reconstruct the pixels within that specific region.
  2. Multi-Level LSH-DAG Sketch: For more complex images, the method employs a recursive "LSH-Tree." If a region is too intricate for a simple representation, it is further subdivided. To maintain a succinct representation, near-duplicate sub-trees are merged into a Directed Acyclic Graph (DAG), effectively compressing the data.

Key Theoretical Properties

The theoretical contributions of this paper center on the mathematical guarantees provided by the sketch representation:

  • Parametric Isomorphism and Smoothness: Raw pixel data is not "smooth" with respect to its underlying coefficients; a microscopic shift in a shape's boundary can cause a discontinuous jump in pixel values. The authors prove that their sketch is "isomorphic" to the underlying shape parameters. The LSH-Sketch acts as a smoothening operator, creating a differentiable mapping between the sketch and the actual coefficients (e.g., the axes of an ellipse).
  • Invertibility: Unlike standard deep learning embeddings, which often discard semantic information, the LSH-Sketch allows for the reconstruction of the original image. The authors prove that for a polynomial image of degree $s$, a sketch of size $O(s)$ is sufficient for full reconstruction.
  • The Global Dictionary: Because the sketches are locally defined and highly stable, identical shapes across different images (e.g., the curve of a wheel on two different cars) will hash to the same values. This enables the creation of an "index" of shapes, allowing images to be represented as sets of pointers into a global dictionary of visual concepts.
  • Provable Robustness: The paper provides formal proofs demonstrating that if a shape can be classified in its original "coefficient space," it can also be classified with a high margin in the "sketch space."

Empirical Validation

The paper focuses heavily on theoretical validation, supported by experiments on synthetic and real-world datasets:

  • Stability on Synthetic Shapes: Using datasets of mathematically generated ellipses, hyperbolas, and rectangles, the authors measured the "average absolute discrete derivative"—a metric for how much a representation jumps when underlying parameters change. The LSH-Sketch proved to be significantly more stable than raw images, demonstrating over a 5x stability improvement for ellipses.
  • Classification on Fashion MNIST: To prove practical viability, the authors tested the sketches on a subset of the Fashion MNIST dataset. A simple two-layer neural network trained on these sketches achieved 100% training accuracy and 79.3% test accuracy, confirming that the sketches retain the necessary information for real-world classification tasks.

Limitations and Future Directions

While the theoretical framework is robust for images composed of polynomial shapes, natural "in-the-wild" photographs exhibit far greater geometric complexity. Furthermore, the computational overhead of constructing recursive LSH-DAGs for high-resolution, high-entropy images presents a scalability challenge. Finally, as the current research focuses on 2D grayscale images, extending these provable guarantees to multi-channel color data and 3D structures remains a logical and necessary next step for future work.

Summary updated

BibTeX
@inproceedings{dikkala2022sketching,
  author = {Nishanth Dikkala and Sankeerth Rao Karingula and Raghu Meka and Jelani Nelson and Rina Panigrahy and Xin Wang},
  title = {{Sketching based Representations for Robust Image Classification with Provable Guarantees}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=fDWNnSiHeka},
}
Figure