cs.LGDec 1, 2025

Temporal speckle enables probabilistic weights for uncertainty-aware photonic AI

Authors: F. Brückerhoff-Plückelmann, H. Borras, S. U. Hulyal, L. Meyer, X. Ji, J. Hu, J. Sun, B. Klein, 

Organizations: Kirchhoff-Institute for Physics, University of Heidelberg; Heidelberg, 69120, Germany. · Institute of Computer Engineering, University of Heidelberg; Heidelberg, 69120, Germany. · Institute of Physics, Swiss Federal Institute of Technology, Lausanne, CH-1015 Lausanne, Switzerland.

Abstract

Artificial intelligence increasingly guides decisions in safety-critical settings, yet neural networks can remain overconfident when confronted with ambiguous observations or unfamiliar inputs. Bayesian neural networks quantify such uncertainty by replacing every weight with a probability distribution, but sampling many distributions at prediction time overwhelms deterministic digital hardware. Here we show that the temporal speckle of broadband light provides a native physical representation of probabilistic weights. Random beating among the frequency components of individually amplitude-bandwidth programmed spectral channels enables optical-encoding of mean and variance in each channel independently. This way, a single broadband light source stores many probabilistic weights in parallel and delivers mutually uncorrelated samples without requiring computationally demanding random-number generation. We harness this mechanism in an ultrafast photonic processor that computes one probabilistic convolution every 37.5 ps and allows simultaneous classification and out-of-distribution detection in hybrid Bayesian neural networks. Our system classifies blood-cell images while recognizing withheld cell types as unfamiliar, and separates epistemic novelty from aleatoric ambiguity on standard uncertainty benchmarks. Programming probability distributions into the fluctuations of light removes the sampling bottleneck of Bayesian inference and opens a route to high-speed, uncertainty-aware photonic AI.

Explore similar work

Aug 3, 2026

Constrained Co-Design for Photonic Bayesian Neural Networks

Classical neural networks frequently produce overconfident predictions on ambiguous or out-of-distribution (OOD) data, a liability that grows with each AI system deployed in safety-critical real-world scenarios. Bayesian neural networks (BNNs) provide a principled framework for uncertainty-aware prediction by replacing deterministic parameters with probability distributions, but repeated sampling increases latency, memory traffic, and energy consumption. Photonic probabilistic computing offers a promising alternative by exploiting intrinsic optical stochasticity for fast and parallel sampling. However, photonic BNNs are not ideal samplers: analog constraints on quantization, programming error, dynamic range, and representable mean and variance restrict the variational families that can be implemented in hardware. In this work, we study which hardware-imposed constraints limit scalable photonic BNN inference, how these constraints can be represented, and which ranges can be tolerated by photonic BNNs beyond small proof-of-concept networks. We formulate photonic BNN inference as constrained stochastic variational inference and perform a systematic ablation study over stochasticity location, stochasticity modality, quantization, programming error, and mean/variance bounds. From these results, we derive concrete co-design guidelines that distinguish hardware constraints that can be compensated by training from those requiring hardware or architecture intervention. We validate these guidelines under coupled, hardware-realistic constraints on Dirty-MNIST, CIFAR-10, and CINIC-10, using Fashion-MNIST and SVHN as OOD benchmarks, showing that hardware-aware training recovers predictive performance and uncertainty quality whenever the required variational family remains representable, whereas violations of representational limits require targeted hardware modifications.
Nov 28, 2025

Accelerated Execution of Bayesian Neural Networks using a Single Probabilistic Forward Pass and Code Generation

Machine learning models perform well across domains such as diagnostics, weather forecasting, NLP, and autonomous driving, but their limited uncertainty handling restricts use in safety-critical settings. Traditional neural networks often fail to detect out-of-domain (OOD) data and may output confident yet incorrect predictions. Bayesian neural networks (BNNs) address this by providing probabilistic estimates, but incur high computational cost because predictions require sampling weight distributions and multiple forward passes. The Probabilistic Forward Pass (PFP) offers a highly efficient approximation to Stochastic Variational Inference (SVI) by assuming Gaussian-distributed weights and activations, enabling fully analytic uncertainty propagation and replacing sampling with a single deterministic forward pass. We present an end-to-end pipeline for training, compiling, optimizing, and deploying PFP-based BNNs on embedded ARM CPUs. Using the TVM deep learning compiler, we implement a dedicated library of Gaussian-propagating operators for multilayer perceptrons and convolutional neural networks, combined with manual and automated tuning strategies. Ablation studies show that PFP consistently outperforms SVI in computational efficiency, achieving speedups of up to 4200x for small mini-batches. PFP-BNNs match SVI-BNNs on Dirty-MNIST in accuracy, uncertainty estimation, and OOD detection while greatly reducing compute cost. These results highlight the potential of combining Bayesian approximations with code generation to enable efficient BNN deployment on resource-constrained systems.
Sep 6, 2026

Recovering topological information of light by topological learning

The evolution of modern-day communication networks towards enhanced capacity and robustness is driving interest in topological light wave as a next-generation information carrier. However, harnessing its potential is hindered by the lack of an effective topological reader, particularly when strong disorder renders conventional readout intractable. Here we address this by introducing TOPO2^{2}, an artificial intelligence framework that leverages on topological learning to recover topological information from light. We demonstrate it on highly distorted optical fields with embedded Skyrmion topologies, showing that we can extract the topological numbers in a single shot with just a conventional camera. We showcase its capability in a TOPO2^{2}-based communication scheme, sending and recovering information encoded in a topological alphabet, confirming that it outperforms conventional approaches. Our connection of topological photonics with topological AI as a powerful paradigm for robust high-capacity information encoding and processing opens a new path towards topological information optics.