NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Kernel computations from large-scale random features obtained by Optical Processing Units

Ruben Ohana, Jonas Wacker, Jonathan Dong, Sébastien Marmin, Florent Krzakala, Maurizio Filippone, Laurent Daudet

Abstract

Kernel methods are a cornerstone of machine learning, prized for their ability to handle non-linear data with strong theoretical guarantees. However, their computational cost typically scales quadratically or cubically with the number of data points, creating a significant bottleneck for large-scale applications. While Random Features (RFs) can mitigate this by projecting data into a high-dimensional space, the projection itself becomes a bottleneck on traditional hardware. This paper introduces the use of Optical Processing Units (OPUs) that utilize light scattering to compute massive random projections in constant time. We provide the first rigorous mathematical proof of the specific kernel function these optical units approximate and demonstrate that OPUs outperform high-end GPUs in both speed and energy efficiency for high-dimensional machine learning tasks.

Introduction

The "big data" challenge in kernel methods stems from the need to compute and store the kernel matrix. Random Features (RFs) transform these complex kernel problems into simple linear ones by projecting data into a high-dimensional random space. However, as we scale to millions of features, the matrix multiplication required for these projections consumes significant time and electricity on standard CPUs and GPUs. This work explores a physical alternative to electronic computation: using the propagation of light through a scattering medium to perform these projections.

The Optical Processing Unit (OPU) Architecture

The Optical Processing Unit (OPU) utilizes the physical properties of light to perform computations. Instead of using transistors to perform arithmetic, the OPU leverages the natural scattering of light to implement a massive random matrix multiplication.

Overview of the OPU architecture, illustrating the transformation of input field x through a scattering medium (Transfer matrix U) to produce a speckle pattern |Ux|².

The process consists of three main stages:

  1. Input Encoding: A laser encodes data onto a light beam using a Digital Micromirror Device (DMD) or Spatial Light Modulator (SLM).
  2. Physical Projection: The light passes through a physical scattering medium, such as opaque glass. This scattering acts as a massive, fixed, complex-valued random matrix multiplication ($Ux$).
  3. Non-linear Detection: A camera sensor captures the resulting "speckle pattern." Because cameras measure light intensity, they naturally perform a squared absolute value operation ($|Ux|^2$).

Theoretical Foundation: The OPU Kernel

A primary contribution of this work is the theoretical derivation of the kernel implemented by the OPU. The researchers prove that this physical process approximates a dot-product kernel: $$k_2(\mathbf{x}, \mathbf{y}) = \|\mathbf{x}\|^2\|\mathbf{y}\|^2 + (\mathbf{x}^\top \mathbf{y})^2$$

Illustration of light scattering within the medium, which physically implements the random matrix multiplication.

This derivation confirms that the OPU is not merely a "black box" randomizer but a mathematically sound tool for kernel approximation. The OPU doesn't need to store the random matrix in RAM; the "matrix" is the physical structure of the scattering medium itself. This bypasses the memory bandwidth bottlenecks that plague modern AI hardware. Furthermore, the authors show how the OPU can be generalized to approximate kernels of arbitrary even powers ($m=2s$).

Experimental Evaluation

The OPU-based approach was evaluated on two primary benchmarks: Fashion MNIST for direct classification and CIFAR-10 for transfer learning using features extracted from pre-trained deep networks (ResNet34, AlexNet, and VGG16).

Key Results

  • Competitive Accuracy: On Fashion MNIST, the OPU-based kernel achieved test errors (approx. 11%) comparable to standard Radial Basis Function (RBF) kernels, demonstrating that the inherent noise of analog optical computing does not degrade model performance.
  • Constant-Time Projections: Unlike GPUs, where computation time scales with the number of features ($D$), the OPU’s projection time is constant. Whether generating 10,000 or 1,000,000 features, the light travels through the medium at the same speed.
  • The Crossover Point: The OPU becomes more time-efficient than an NVIDIA P100 GPU at $D \approx 45,000$ features and more energy-efficient at $D \approx 18,000$ features.
  • Energy Savings: At $D = 58,000$ (the GPU's memory limit), the GPU consumed over 10 times more energy than the OPU to perform the same computation.
  • Scalability: The OPU successfully handled projections up to $D = 10^6$, a scale prohibitively expensive for standard hardware.

Discussion and Limitations

While the OPU offers massive scaling potential, certain limitations remain. The hardware used in this study primarily supports binary input data, requiring thresholding techniques for continuous data. Additionally, while higher-order kernels are theoretically possible, they exhibit increased variance, requiring more dimensions for convergence. Finally, while the OPU accelerates feature generation, the subsequent linear system solver (e.g., Ridge Regression) remains a downstream bottleneck, suggesting a shift toward stochastic gradient descent (SGD) for extremely large feature sets.

Conclusion

Optical Processing Units represent a significant leap in hardware for machine learning, offering a path to scale kernel methods to millions of features with minimal energy consumption. By grounding this physical process in rigorous mathematics, this work paves the way for hybrid optical-electronic computing systems that can handle the next generation of high-dimensional data challenges.

Summary updated

BibTeX
@inproceedings{ohana2019kernel,
  author = {Ruben Ohana and Jonas Wacker and Jonathan Dong and Sébastien Marmin and Florent Krzakala and Maurizio Filippone and Laurent Daudet},
  title = {{Kernel computations from large-scale random features obtained by Optical Processing Units}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2019},
  doi = {10.1109/icassp40776.2020.9053272},
}
Figure