Source-linked AI summary
Wave Physics as an Analog Recurrent Neural Network
Tyler W. Hughes, Ian A. D. Williamson, Momchil Minkov, Shanhui Fan
TL;DR
Machine-learning applications require increasing computing resources, motivating specialized analog hardware. This paper maps wave dynamics onto recurrent neural networks and demonstrates vowel classification with a physical wave system, achieving performance comparable to a conventional RNN.
Problem
Increasing computing requirements for complex machine-learning tasks motivate specialized hardware platforms for faster and more efficient execution.
Method
The paper maps wave-based physical dynamics onto recurrent neural-network computation so physical systems can be trained to process temporal signals directly in their native domain.
Results
86.3% ± 4.3% mean testing accuracy was achieved for vowel classification, while the conventional RNN attained comparable performance to the wave RNN.
Takeaways & Limitations
The approach suggests a new class of analog machine-learning platforms using wave physics for natural and potentially efficient RNN-like computation on dynamic signals.
Takeaways & Limitations
Exploration of more advanced recurrent models such as LSTMs and GRUs was outside the scope of the study.
Abstract
from arXiv · showhide
Analog machine learning hardware platforms promise to be faster and more energy-efficient than their digital counterparts. Wave physics, as found in acoustics and optics, is a natural candidate for building analog processors for time-varying signals. Here we identify a mapping between the dynamics of wave physics, and the computation in recurrent neural networks. This mapping indicates that physical wave systems can be trained to learn complex features in temporal data, using standard training techniques for neural networks. As a demonstration, we show that an inverse-designed inhomogeneous medium can perform vowel classification on raw audio signals as their waveforms scatter and propagate through it, achieving performance comparable to a standard digital implementation of a recurrent neural network. These findings pave the way for a new class of analog machine learning platforms, capable of fast and efficient processing of information in its native domain.
INTRODUCTION
The paper connects recurrent neural-network computation with wave dynamics, proposing trainable physical systems that process temporal signals through naturally evolving fields. A finite-difference wave equation supplies recurrence, while propagation and nonlinear measurements provide mechanisms analogous to hidden-state updates and outputs.
- Motivation: Analog computing uses continuous physical evolution for calculations, motivated by rising computational demands from complex machine-learning applications.The paper situates wave-based processing among specialized and neuromorphic hardware approaches for faster, more efficient execution.
- Core mapping: The proposed mapping lets wave-based physical systems operate as RNNs and process signals in their native domain without analog-to-digital conversion.Recurrence arises from the physics’ time dynamics, while waves propagating through space provide memory and information-processing capacity.
- RNN structure: An RNN updates its hidden state and output from the current input and previous hidden state, applying the same operation across a sequence.Trainable dense matrices and nonlinear activation functions define the conventional recurrence.
- Wave recurrence: Finite-difference discretization converts the wave equation into a recurrence over field values, with the hidden state formed by current and preceding fields.The discretized update uses a sparse matrix for source-free field evolution and connects wave dynamics to RNN operations.
- Physical implementation: Wave-equation inputs and outputs use sparse linear operators that specify injection and measurement points rather than trainable dense matrices.These operators remain unchanged during training and differ structurally from the dense input and output matrices of a standard RNN.
- Physical implementation: The wave speed distribution c(x, y, z) is trainable, corresponding physically to material configuration and layout within the propagation domain.The Laplacian enforces nearest-neighbor coupling and finite-velocity information propagation, while nonlinear wave physics can supply state-dependent behavior and intensity-based outputs.
Training a physical system to classify vowels
An inverse-designed inhomogeneous wave medium was trained to classify three vowel classes from raw audio as signals propagated through it. Optimization produced a structure that routed signal energy to class-specific probes and achieved strong cross-validated recognition.
- Dataset: The dataset contained 279 recordings selected from three vowel classes spoken by 45 male and 48 female speakers.The selected vowels were ae, ei, and iy, corresponding to sounds in had, hayed, and heed.
- System setup: The system injected raw waveforms for ae, ei, and iy vowels into a trainable wave-speed region with three class-assigned probes.Classification used normalized time-integrated power measured at the probes after each full recording propagated through the domain.
- Optimization outcome: The trained confusion matrices were diagonally dominant, showing that the optimized structure performed vowel recognition whereas the starting structure did not.The matrices were averaged over five cross-validated training runs.
- Performance: 92.6% ± 1.1% training accuracy and 86.3% ± 4.3% testing accuracy were obtained across cross-validated runs.The largest loss reduction and accuracy gain occurred during the first training epoch.
- Interpretation: The optimized structure routed most signal energy to the correct probe for representative samples, while distinguishing iy from ei less accurately than ae.The lower differentiation was especially apparent for unseen testing samples.
DISCUSSION
The wave-based recurrent neural network links wave dynamics to recurrent computation through local propagation and constrained energy evolution. This connection motivates analog platforms for processing temporally encoded signals in physical media.
- Wave-based RNN properties: The wave equation imposes nearest-neighbor hidden-state coupling because information propagates through the medium at finite velocity.The coupling is represented by a sparse update matrix derived from the wave equation’s hyperbolic structure.
- Wave-based RNN properties: The analog RNN’s hidden-state size and memory capacity are directly determined by the size of the propagation medium.This ties temporal memory to the physical extent of the medium.
- Wave-based RNN properties: An energy-conservation constraint prevents unbounded growth of the hidden-state norm and output signal.The paper contrasts this with unconstrained dense RNN updates, which can produce vanishing and exploding gradients during training.
- Implications: The wave equation’s dynamics are conceptually equivalent to those of a recurrent neural network and can be extended beyond scalar wave dynamics.The authors identify optics, acoustics, and seismics as candidate physical domains for RNN-like computation.
- Implications: Wave-based computation may support analog machine-learning devices that process dynamic signals naturally and efficiently in their physical domain.This is presented as a potential platform-level consequence rather than a demonstrated hardware result.
MATERIALS AND METHODS
The numerical study used five-fold cross-validation, gradient-based material optimization, and spectral analysis of three downsampled vowel classes. Overlapping frequency content made the classification task non-trivial.
- Training procedure: The 279 samples were divided into five approximately equal groups for cross-validation, with four groups for training and one for testing.Each group served as the testing set in an independent training run, and metrics were averaged across runs.
- Training procedure: Training used 30 epochs of Adam optimization, with each training sample windowed to 1000 points to reduce gradient-tracking cost.The stated learning rate was 0.0004.
- Material optimization: The optimizer minimized categorical cross-entropy between probe probability distributions and one-hot vowel labels while updating the material density distribution.The density was optimized to encourage a binarized wave-speed distribution with relatively large feature sizes.
- Frequency analysis: The mean energy spectra showed that most energy lay below 1 kHz, with strong overlap between ei and iy peak energy.The ae peak was also close to the other vowels’ peak energies.
- Frequency analysis: The overlapping spectral peaks made vowel recognition non-trivial despite the three-class task.This conclusion follows from the reported similarity of the classes’ mean energy spectra.
Numerical modeling
The wave dynamics are discretized into a recurrent update that maps the physical field evolution onto an RNN computation. Numerical gradients with respect to the material distribution enable inverse design, while damping approximates open boundaries.
- Numerical implementation: Reverse-mode automatic differentiation computes gradients of the loss with respect to the material distribution during numerical wave simulations.The implementation uses a custom Python package built on PyTorch.
- Wave equation: The scalar field dynamics are governed by a wave equation whose Laplacian uses the spatial wave-speed distribution and a source term.The Laplacian is the sum of second spatial derivatives, while c varies across the domain and f supplies the source.
- Discretization: Centered finite differences in time convert the wave equation into a discrete recurrence with time-indexed field values.The discretization uses temporal step size ∆t.
- RNN mapping: The wave system connects to an RNN by expressing the discretized update in matrix form, with the nonlinear dependence entering through wave speed.The resulting matrix update has the same form as the main-text RNN equations.
- Boundary treatment: An absorbing region uses a spatially varying damping coefficient to approximate an open boundary condition.The damping coefficient has a cubic dependence on distance from the layer’s interior boundary and is assumed frequency-independent.
S2. Realistic physical platforms and nonlinearities
The wave-RNN framework is considered across practical optical and acoustic platforms, with material nonlinearities providing the hidden-state nonlinearity. The discussion addresses how the general scalar-wave model can translate into implementations using different materials and nonlinear responses.
- Model-to-platform translation: The general physical model assumes a scalar field and a hidden-state nonlinearity originating from intensity-dependent wave speed.The section translates these assumptions into practical optical and acoustic platforms.
- Implementation pathways: Practical implementations can use different materials and forms of nonlinearity while retaining the wave-based RNN framework.The section discusses platform-specific realizations in optics and acoustics.
- Experimental considerations: The section examines experimental considerations for realizing the scalar-wave model in physical systems.These considerations concern practical platforms and their nonlinear responses.
Optics
Optical realizations include Kerr nonlinearity and saturable absorption in integrated platforms. Saturable absorption numerically supports vowel classification with reported training and testing accuracies comparable to the nonlinear-wave-speed analog RNN.
- Kerr nonlinearity: Kerr nonlinearity is a direct route to nonlinear wave speed in optical platforms using silicon or chalcogenide glasses.Chalcogenide glasses have high damage thresholds and can process sub-picosecond pulses with peak powers of 10-50 MW.
- Saturable absorption: Saturable absorption provides an alternative optical nonlinearity through intensity-dependent absorption or damping.The response can be realized by patterning graphene or other absorptive 2D materials on a dielectric optical circuit.
- Numerical demonstration: 95.5% ± 1.4% training accuracy and 90.3% ± 6.4% testing accuracy were achieved for vowel classification with saturable absorption.The results used cross-validated training on vowel samples and were reported as comparable to the analog RNN with nonlinear wave speed.
- Device footprint: Planar integrated optical circuits can realize the considered 2D physics through out-of-plane index confinement.Similar planar circuits produced by inverse-design techniques have previously been demonstrated experimentally.
Acoustics
Acoustic and elastic implementations offer accessible components, stronger nonlinear material responses, and lower operating frequencies than optical platforms. Candidate realizations include transducer-based polymer systems, hard-material sidewalls, and nonlinear fluids.
- Acoustic advantages: Acoustic implementations offer off-the-shelf components, stronger nonlinear material responses, and lower operating frequencies than optical platforms.Lower frequencies naturally provide larger relative signal bandwidths and avoid ultra-narrowband spectral features.
- Polymer implementation: A practical acoustic wave RNN could combine free-space ultrasonic transducers and receivers with a 3D-printed or laser-cut polymer.The polymer can provide a slower sound speed than air, although lower sound speed is not fundamentally required.
- Material choices: Hard-material sidewalls could replace slower printed materials, with acoustic metamaterial structures providing sound speeds above 2000 m/s.The framework does not fundamentally require the printed material to have a lower sound speed.
- Nonlinear fluids: Fluids containing embedded gas bubbles can provide strong nonlinear responses modeled with the nonlinear acoustic Westervelt equation.The equation includes additional terms beyond the linear wave dynamics, and patterned materials can be infiltrated with nonlinear fluids.
- Summary: Several realistic pathways exist for implementing the wave-based RNN, including its required nonlinearities.The section’s summary covers optical and acoustic material realizations.
S3. Input and output connection matrices
The wave RNN uses linear operators to inject inputs and measure outputs within the discretized wave-field domain. These operators act on flattened field representations and selected portions of the hidden state.
- Input and output connection matrices: Input and measurement locations are defined by linear operators P (i) and P (o) acting on flattened field vectors.Matrices M (i) and M (o) specify the spatial distributions of injection and measurement points in the flattened basis.
- Input and output connection matrices: The input vector x_t is injected through a matrix-vector multiplication using the input-location operator.
- Input and output connection matrices: The wave RNN output at each time step is obtained from intensity measurements of the scalar fields.
- Input and output connection matrices: Because the hidden state h_t concatenates u_t and u_t−1, convenience matrices are defined to act only on the u_t portion.
- Input and output connection matrices: The fixed injection and measurement matrices play roles analogous to the conventional RNN’s input and output weights, while the spatial Laplacian is implemented by convolution.The spatial-grid step size h appears in the discretized Laplacian implementation.
S4. Comparison of wave RNN and conventional RNN
The wave RNN is compared with conventional RNNs using different parameter counts and nonlinearities. Conventional RNN accuracy is comparable overall but varies with the number of trainable parameters, while advanced recurrent models remain outside scope.
- Performance comparison: The conventional RNN uses trainable matrices whose parameter count is determined by the hidden-state size.For N_h = 70 and N_h = 100, the models contain 5250 and 10500 free parameters, respectively.
- Performance comparison: Conventional RNN performance is comparable to the wave RNN on vowel recognition, but parameter matching changes the relative accuracy.With a similar number of trainable parameters, conventional RNN accuracy is approximately 6% lower; with about twice as many, it is approximately 3% higher.
- Scope: Exploration of more advanced recurrent architectures such as LSTM and GRU is outside the scope of the current study.
- Model differences: The wave RNN trains the spatial wave-speed distribution, which can be physically implemented as a material configuration after training.
- Model differences: Wave-RNN nonlinearity arises from intensity-dependent wave velocity or damping, making the update dynamics nonlinear.Output nonlinearity is introduced through wave-intensity measurement, which includes a squaring operation.
S5. Binarization of the wave speed distribution
The material design is optimized through a density representation, spatial filtering, and projection to produce a binarized wave-speed distribution with controlled feature sizes.
- Density filtering and projection: Optimization updates a material density ρ(x, y) rather than directly updating the wave-speed distribution.The density describes the material density in each pixel within the design region.
- Density filtering and projection: A low-pass spatial filter is applied to the density to create larger feature sizes in the structure.
- Density filtering and projection: A projection scheme converts the filtered density into a projected density for binarizing the structure and reconstructing the final wave speed.
- Projection parameters: The projection midpoint η lies between 0 and 1, typically at 0.5, while β controls projection strength and is typically around 100.The projected density varies between 0 and 1.
- Wave-speed reconstruction: The final wave speed is determined from the projected density using background and optimized material speeds c0 and c1.