Abstract
Large machine learning models achieve unprecedented performance on various tasks and have evolved as the go-to technique. However, deploying these compute and memory hungry models on resource constraint environments poses new challenges. In this work, we propose mathematically provable Representer Sketch, a concise set of count arrays that can approximate the inference procedure with simple hashing computations and aggregations. Representer Sketch builds upon the popular Representer Theorem from kernel literature, hence the name, providing a generic fundamental alternative to the problem of efficient inference that goes beyond the popular approach such as quantization, iterative pruning and knowledge distillation. A neural network function is transformed to its weighted kernel density representation, which can be very efficiently estimated with our sketching algorithm. Empirically, we show that Representer Sketch achieves up to 114x reduction in storage requirement and 59x reduction in computation complexity without any drop in accuracy.
Introduction
Deep neural networks have become the standard for high-performance machine learning, yet their deployment on edge devices—such as mobile phones, sensors, and embedded systems—remains a significant challenge. These environments are characterized by limited battery life and small memory caches, making them ill-suited for the "compute and memory hungry" nature of modern architectures.
The primary bottlenecks in standard neural network inference are twofold:
- Memory Access Latency: Fetching large model weights from external DRAM is approximately 65× more energy-intensive than accessing local cache.
- Computational Cost: Standard inference relies on massive matrix multiplications. In hardware, a single 32-bit floating-point multiplication can consume 4× more energy than a floating-point addition.
While techniques like pruning, quantization, and knowledge distillation offer improvements, they remain constrained by the underlying neural network architecture. This paper introduces REPRESENTER SKETCH, a fundamental alternative that moves beyond standard layers to transform inference into a high-speed retrieval task.
The Representer Sketch Framework
REPRESENTER SKETCH re-imagines the inference pass as a weighted kernel density estimation problem. The framework is built upon three theoretical pillars:
- The Representer Theorem: A classical result stating that any learned function $f(x)$ can be expressed as a weighted sum of kernels: $f(x) = \sum_{i=1}^N \alpha_i K(x, x_i)$.
- Universal LSH Kernels: The authors prove that specific Locality Sensitive Hashing (LSH) functions can serve as universal kernels, capable of approximating any continuous, bounded function.
- The RACE Sketch: To avoid the computational cost of exact kernel summation, the method utilizes a modified "Repeated Array-of-Counts Estimator" (RACE).
Workflow: Construction and Inference
- Construction: A trained neural network is first converted into its kernel representation. Training data points are hashed into a 2D array of counters (the sketch). Rather than simple increments, each cell is updated by the learned weight ($\alpha_i$) associated with the data point.
- Inference: When processing a new query, the system hashes the input to identify relevant cells in the sketch. It then aggregates these values using a "Median of Means" (MoM) approach. This process replaces thousands of floating-point multiplications with a small number of hash lookups and additions.
Experimental Evaluation
The researchers evaluated REPRESENTER SKETCH across several standard benchmarks, including binary classification (Adult, phishing, skin, SUSY) and regression (abalone, YearMSD) tasks. The results demonstrate that the framework can match the accuracy of original neural networks while providing massive efficiency gains.
Key Results
- Memory Efficiency: The method achieved a 114× reduction in memory footprint for the Adult dataset. This allows model sizes to shrink to the kilobyte scale, enabling them to fit entirely within local hardware caches.
- Computational Speedup: FLOPs (Floating Point Operations) were reduced by up to 59×.
- Stability: Unlike iterative pruning, which often sees accuracy plummet at high compression rates, REPRESENTER SKETCH remained stable across various compression levels, particularly on the "phishing" and "abalone" datasets.
Conclusion
REPRESENTER SKETCH provides a mathematically rigorous bridge between functional analysis and practical sketching algorithms. By treating inference as a density estimation problem and leveraging LSH, the framework effectively "pre-calculates" the heavy lifting of neural networks. While currently limited by linear scaling in multi-class scenarios, the framework represents a significant step toward making high-performance machine learning viable for the most resource-constrained edge environments.
Summary updated