{'fraction_non_alphanumeric': 0.028420754583421817, 'fraction_numerical': 0.006016847172081829, 'mean_word_length': 5.10654851955911, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Neuromorphic scaling advantages for energy- efficient random walk computations

Computing stands to be radically improved by neuromorphic computing (NMC) approaches inspired by the brain's incredible efficiency and capabilities. Most NMC research, which aims to replicate the brain's computational structure and architecture in man-made hardware, has focused on artificial intelligence; however, less explored is whether this brain-inspired hardware can provide value beyond cognitive tasks. We demonstrate that high-degree parallelism and configurability of spiking neuromorphic architectures makes them well-suited to implement random walks via discrete time Markov chains. Such random walks are useful in Monte Carlo methods, which represent a fundamental computational tool for solving a wide range of numerical computing tasks. Additionally, we show how the mathematical basis for a probabilistic solution involving a class of stochastic differential equations can leverage those simulations to provide solutions for a range of broadly applicable computational tasks. Despite being in an early development stage, we find that NMC platforms, at a sufficient scale, can drastically reduce the energy demands of high-performance computing (HPC) platforms.

cognitive applications is less clear. Quantum computing provides a precedent for emerging hardware to have impact beyond its original inspiration: while quantum computing was conceived as a means for efficient chemistry simulations [11,22], it is now recognized that it can impact a much broader range of computing applications [4,18,36]. Along these lines, there is growing evidence that neuromorphic hardware can provide theoretical complexity advantages on a growing set of non-cognitive, non-AI applications [2, 3, 7, 12, 25, 27-29, 33, 37]. Unlike quantum computing, which still faces technical challenges in scaling up to sizes necessary for real-world impact (as noted by the recent findings concerning quantum supremacy [4]), NMC platforms can already be scaled to non-trivial sizes, with several multi-chip spiking NMC systems achieving scales of over a hundred million neurons. Nevertheless, NMC systems remain smaller and less efficient than the human brain, and the critical scales for NMC remain unknown since the appropriateness of an analogous concept of neuromorphic supremacy remains unclear.
Identifying NMC's value for an application is complicated by the fact that its advantage primarily derives from its energy-efficiency as opposed to a promise of faster computation (although speed benefits remain a possibility, and because NMC is an immature technology compared to conventional von Neumann (VN) systems, which have been optimized and advanced over decades in both hardware and software. We define an algorithm as having a neuromorphic advantage if that algorithm shows a demonstrable advantage (compared to a VN architecture) in one resource (e.g., energy) while exhibiting comparable or better scaling in other resources (e.g., time). Given NMC's currently realized advantages in power consumption, we are seeking algorithms that show comparable or better time-scaling compared to a VN architecture while still requiring less total energy (i.e., "energy efficiency") to perform the same computation.
Observing a neuromorphic advantage for non-cognitive applications should not be taken as a given, as the specialization of computer architectures to improve performance on a subset of tasks (in the case of NMC, towards the brain) will result in degraded performance in other tasks [41]. Therefore, observing a neuromorphic advantage on non-cognitive applications would demonstrate that NMC can have a broader impact than previously assumed and provide a concrete framework by which to develop the technology.
In this paper, we identify for the first time an explicit neuromorphic advantage for large-scale spiking neuromorphic hardware on a fundamental numerical computing task: solving partial integro-differential equations (PIDEs) that have probabilistic representations involving a jump-diffusion stochastic differential equation (SDE). The solutions to these PIDEs can be approximated by averaging over many independent random walks (RWs), a process often referred to as Monte Carlo. Diffusion is a quintessential component of the underlying SDEs used in the probabilistic solution of the PIDEs. We can show our NMC algorithm for generating RW approximations to diffusion satisfies our neuromorphic advantage criteria on two current large-scale neuromorphic platforms: the IBM Neurosynaptic system [26], also known as TrueNorth and introduced in 2014, and the Intel Loihi system [9], introduced in 2018. While distinct neural architectures, both directly implement a large number of neurons in silicon (1 million and 128 thousand per chip, respectively), are readily-scalable to multi-chip platforms, and are reflective of the long-term technology trends in spiking neuromorphic hardware. We then show that our NMC algorithm for random walks can be extended to account for more sophisticated jump-diffusion processes that are useful for addressing a wide range of applications, including financial economics (e.g., option pricing models), particle physics (e.g., radiation transport), and machine learning (e.g., diffusion maps).

Spiking Neuromorphic Hardware Shows Neuromorphic Advantage on Simulating Random
Walks Random walk solutions are often an attractive option for large scale modeling efforts since independent RWs can readily be computed in parallel. Countering these benefits is the large number of RWs required to approximate solutions via a Monte Carlo method, and translating large-scale RW-based particle codes to GPU-heavy computing platforms is an active area of research [16,17]. Our approach leverages two key features of spiking neuromorphic hardware -the parallel computation of neurons and the event-driven spiking communication between them -to perform a highly efficient mapping of stochastic processes. While deterministic numerical solutions of PIDEs often rely on relatively few large complex calculations, RWs typically rely on many simple computations. As we show, these computations can be efficiently implemented within circuits of spiking neurons.  Our neural algorithm for RWs is based on a previously described circuit to model diffusion, in which we demonstrated that neural circuits can simulate random walks, but did not show how this process could extend to efficiently solve PDEs [34]. In this algorithm, each mesh-point consists of a simple neural circuit that uses common leaky-integrate and fire (LIF) neurons ( Fig. 1A) to count the number of incoming spikes and a circuit to stochastically distribute spikes to output nodes (Fig. 1B). These nodes are then assembled into a graph whose edges represent the transition probabilities from one state to another (Fig. 1C). An initial count of walkers is set at the appropriate starting location mesh point (either through input spikes or an initial voltage condition), and once the supervisor circuit initiates the model, the spikes' propagation through this mesh directly reflects the movement of RWs through the corresponding state space. Stated differently, the NMC hardware implements both the stochastic and deterministic components of the stochastic process.
Importantly, this neural algorithm can be generally configured to represent any time-homogeneous Discrete-Time Markov Chain (DTMC) by configuring the shape of this graph and setting the output probabilities within each node to represent the problem description. For instance, a nearest-neighbor mesh with uniform probabilities would lead to Brownian motion in the limit as the mesh and time step go to zero (Fig. 1D). More sophisticated RWs, including those with non-local and jump diffusion, walker absorption and creation, can readily be implemented with location-dependent transition probabilities in this framework, allowing the algorithm to realize the processing-in-memory advantages of NMC.
We first performed scaling studies to assess the computational costs inherent in simulating RWs on two NMC platforms, IBM TrueNorth and Intel Loihi, relative to a commodity server-class Intel Xeon E5-2662 CPU. The benchmark task, uniform diffusion on a small torus, was selected to be a simple "best-case" for conventional platforms; we expect any added complexity, such as non-uniform transition probabilities and larger mesh, to preferentially benefit the NMC implementations. For single-threaded implementations of the benchmark task, the CPU is faster than both Loihi and TrueNorth, however Increasing the density of RWs on the NMC platforms required relatively less additional time, whereas additional walkers scale linearly on the CPU (Fig. 1E). Distributing the RWs over multiple threads showed comparable time-scaling on multiple cores on CPUs and replicated meshes on TrueNorth (Fig. 1F).
Despite the slower base clock-rates of these less technologically mature NMC platforms, TrueNorth and Loihi exhibit better single-mesh scaling than conventional platforms and similar multi-threaded capabilities compared to conventional platforms (Fig. 1G). Combined, these scaling results satisfy our weaker condition for a neuromorphic advantage.
We next compared the total energy cost of the RW calculations on NMC and conventional platforms for equivalent amounts of computational work. To estimate energy, we scaled the top power estimates for each platform by the relative percentage of the chip used (e.g., number of cores or threads) and integrated over the total simulation time. TrueNorth and Loihi implementations show both a considerable absolute advantage and preferential scaling in total walker-updates-per-Joule compared to the CPU (Fig. 1g), satisfying our strong condition for a neuromorphic advantage. Notably, Loihi and TrueNorth appear to occupy different places on the energy-time trade space, possibly in part due to Loihi's incorporation of conventional processors on chip.

Neuromorphic-compatible random walks apply to broad class of PIDEs
While RW solutions to PIDEs have mixed appeal to conventional computing programmers, they have been utilized to provide solutions in a variety of fields, including computer science, physics, medicine, and operations research [23]. * The decision between using a deterministic approach and a random walk approach is a complicated and important question. However, this question is beyond the scope of this paper. Rather, we aim to demonstrate that NMC can efficiently implement random walks and, consequently, are able to solve a variety of PIDEs, while potentially mitigating some of the disadvantages of RW solutions (such as the high costs associated with the required number of walkers).

The connection between RWs and the heat equation is well-known. Einstein's 1905 work posits that
there exist particles small enough that they may be viewed (with a microscope) but large enough that their Brownian motion is measurable, further arguing that such particles exert a measurable thermodynamic force [10]. Langevin related the mean squared displacement of Einstein's particles to a differential equation describing the particle's motion [21]. A more detailed discussion of the history of this fundamental relationship can be found in [14].
To motivate the probabilistic solution for a larger class of PIDEs, we explore the heat equation. Consider the one-dimensional heat equation with initial condition given by ( ):

Equation 1
Let ( ) be a standard Brownian motion on ℝ. The key relationship relates an expectation (i.e. expected or average value) involving ( ) with the solution :

Equation 2
In words, the expectation of a function evaluated at Brownian motion is exactly the solution to the onedimensional heat equation. This probabilistic representation allows us to approximate the function ( , ) using RWs. Traditionally, this is accomplished by employing some sampling procedure to generate sample paths of ( ), typically involving a discretization of time and value sampling over a continuous space [15].
Discussed in detail later, in order to make this process amenable to our neural RW algorithm, we must sample our paths through a DTMC ( Δ ) that approximates the process ( ). For each spatial location , several RWs starting at are generated from the Markov chain. Letting , represent the th RW generated starting from location , the Monte Carlo approximation gives

Equation 3
Regardless of modifications needed for NMC implementation, this simple result can be extended to a more computationally challenging set of problems. Consider the family of PIDEs defined by the equation

Equation 4
As with Eq. 1, there is an underlying stochastic process, albeit slightly more complicated than just Brownian motion. The stochastic process related to this PIDE is

Equation 5
The process (t) is defined by a drift, diffusion, and a non-local jump. In this form, gives the drift and Pairing Eq. 4 with the initial condition (0, ) = ( ), under certain conditions the solution to the initial value problem can be represented as

Equation 6
A proof for the one-dimensional case can be found in SN2.  Here, ( ) is the process given by Eq. 5 with omitted as the first argument in , , and ℎ. Since time is still an argument for the process, the probabilistic solution requires the use of the stopping time , or the time for which the random process ( ), starting at (0) = exits the domain . A proof for the one-dimensional case can be found in SN2.

Non-Zero Terms in Eq. 4 Example Application
Time , Fig. 4C)

Steady-state problems
, Electrostatic Scalar Potential, Heat Transport, or Simple Beam Bending [38] , , , , ℎ Particle Fluence SN3 Reduced problem, Fig. 3E-I. These PIDEs are important within many application domains, including particle physics, quantitative finance, and molecular dynamics, among others. When viewed probabilistically, the steady-state problems are particularly interesting for neuromorphic because the long run-times required for RWs to reach steady-state solutions are often computationally prohibitive on conventional hardware.
The preceding discussion on the two families of PIDEs and their probabilistic solution representations are largely known results -we merely reformulate these results in forward time (see SN2). The new contribution we provide is the use of well-understood DTMC approximations to SDEs in order to make the probabilistic sampling of paths viable on the NMC diffusion algorithm.
A DTMC approximating Eq. 5 is compatible with the neural algorithm we described for diffusion (Fig 1D).
In particular, the drift and non-local diffusion terms and h can naturally be reflected within the definition of the mesh and transition probabilities (Fig 1C), in effect providing those extensions to diffusion. Similarly, non-conservation of walkers (walker absorption or creation) can be easily integrated into the system we described. Such a situation may be desirable when the form of lends itself towards an absorption interpretation.
To approximate Eq. 5 with a DTMC, one must employ some sort of temporal and spatial discretization scheme. Having NMC approximate the DTMC introduces additional sources of uncertainty (Fig 2F).
Specifically, the finite node structure of NMC architectures forces the DTMC to have a finite state space.
In one dimension, this equates to having a maximum and minimum value in the state space. The error of enforcing a finite state space for the DTMC would vary from application to application. The discrete state space arising from the DTMC also introduces error depending on the problem at hand. If the state space of the random walk is already discrete, it introduces no error. In the continuous case, it could introduce error on the order of 1 2 Δ Δ on each time step in a special best-case scenario (see Methods). Additional error could arise from hardware specific limitations. For instance, the IBM's TrueNorth and Intel's Loihi pseudo-random number generators that we use are effectively limited to 8 bits.
Both conventional simulations, which model each random walker independently and track the evolution of state variables, and our neuromorphic simulations, which model the parallel evolution of random walkers over a state-space represented by the neural circuit, are impacted by each of these error sources.
However, the high numerical precision of conventional processing minimizes the impacts of discretizing the values and ranges of state variables, making the dominant errors due to time discretization and the number of random walkers. In contrast, our neuromorphic implementation enables a very large number of walkers at negligible cost, but the dedication of neurons to explicitly representing state variables raises the cost of reducing the meshing error. The implication of these errors will differ considerably across applications in practice.

Results/Examples
To demonstrate the ability of neuromorphic hardware to implement the DTMCs required for solving these PIDEs, we provide a handful of examples. These are grouped into two main categories: particle equations and geometries. The results of our simulations on hardware and spiking neuron simulators can be found in Fig. 3 and Fig. 4. We cover the more salient points of these examples in the next two subsections and relegate the remaining details to SN3. Neuromorphic hardware can simulate particle transport First, we showcase two examples of particle transport equations with probabilistic representations suitable for our spiking algorithm. The first is an initial-value time-dependent problem detailing the angular flux density of a hypothetical particle (Fig. 3A). Consider a hypothetical particle that has a property called 'direction'. This direction property takes on the value +1 or −1. According to a Poisson process with rate , the particle can experience a 'scattering' event. When a scattering event occurs, the particle chooses a new direction with uniform probability. A second Poisson process with rate controls when the particle is absorbed and ceases to exist. These rates correspond to and , respectively, in Eq. 4. The function ℎ is represented by the change in direction the particle experiences after a scattering event.
Coupled with an initial condition , a population of these particles is assumed to obey the Boltzmann equation for angular flux density (see SN3).
The angular flux density, Φ( , Ω), is a function of both time and direction Ω. We will leave the PIDE in SN3, but it takes the form of Eq. 3 with , , and all equal to zero. Assigning some initial condition , the solution is given by

Equation 8
The SDE almost behaves like our hypothetical particle. The 'direction' at time is given by ( ). ( ) is a Poisson process with parameter , and ( ) is the random change in direction of the random walk after a scattering event given the previous direction. The direction remains the same until the Poisson process fires (signaling a scattering event). Once this occurs, the value of ( ) increments by the random change in direction ( ) . Notably, the random process differs from the hypothetical particle in that it does not account for absorption. Instead, absorption is resolved through the exponential term in the expectation.
We deployed a neural circuit of a DTMC approximating the dynamics of the stochastic process ( ) on TrueNorth. The description of the random walk and the parameter values used can be found in SN3. In this scenario, an analytic solution exists. Fig. 3C shows that the true solution is well approximated by sampling just 1000 random walks per each starting condition. Moving to 10,000 RWs per starting position (Fig 3D), we see notable improvement in approximation. This simplified example of particle transport has broad implications. Directly, if we can well-approximate the analytic solution for this reduced particle transport problem, then it will be possible to approximate more complicated particle transport problems where no solution is available. To that end, we have examined a second particle transport inspired example for which no analytical solution is readily available. In our second example, we consider a similar particle. This hypothetical particle is subject to scattering events according to a Poisson process with rate , however the direction can assume any value in [−1, 1] with a uniform distribution. We assume that this particle is not subject to absorption. In addition to direction, this hypothetical particle also has a spatial coordinate. The particle travels at a speed in the direction Ω updating its position (Fig 3E). We seek to find the angular fluence Ψ, Both ( ) and ( ) are the same as in the previous example. The SDE in this case describes a process with a position given by ( ) and direction given by ( ). The position updates with velocity − ( ).
The direction only changes by ( ) whenever the Poisson process ( ) fires.
We deployed a RW approximation from a DTMC of this joint process on Intel's Loihi platform. Details on the DTMC and parameters used are in SN3. We completed a 1M walker/location simulation in MATLAB to use as a baseline comparison. One interpretation of the angular fluence is the cumulative density of particles traveling from the source location. From the MATLAB simulation, we see that these particles appear to have mostly traveled with speed in their original direction assigned by the source, with lessening bands of deviations due to scattering events (Fig 3F). Similar to the Boltzmann example on TrueNorth, implementing this simulation on Loihi was able to replicate the numerical examples (Fig. 3G) with a low overall error (Fig. 3H-I). This low error in the neuromorphic implementation is of particular importance since the low output probabilities due to the high-fan out in this model (up to 30 output nodes) are potentially at risk due to the relatively low 8-bit precision of Loihi's random number generator.
Neuromorphic approach to simulating on non-Euclidean geometries where ( ) represents Brownian motion on the surface of the sphere. By choosing a particular initial condition, this problem has a tractable analytic solution (SN3). The initial condition selected resembles a soccer ball pattern (Fig. 4A).
To employ our neuromorphic approach, we must be able to approximate Brownian motion on the surface of the sphere with a DTMC. There are several ways to describe Brownian motion on the sphere, including using the von-Mises Fisher distribution [40], employing representations with spherical coordinates [6], or limiting from higher dimensions [8]. Since it is applicable to other curved shapes, we elect to use a tangent plane approximation. Setting = 42, we deploy a RW approximating the process ( ) on Intel's Loihi platform. Starting 3000 RWs on each position yields the approximate solution found in Fig. 4A for a collection of time points. We would expect better agreement with a greater number of nodes and walkers per starting location. Further, as shown in Fig. 4B, we see that the low precision of probability transition has acutely increased the amount of error accrued for this example when compared to a MATLAB simulation.
This example provides compelling evidence that complex geometries where analytic methods are less tractable represent an opportunity for NMC impact. These could arise where domains are more complicated than just a single sphere. One could imagine an object with many spines or with several crevices. To start down this path, we present an initial-value problem on the surface of a barbell shaped object. Consider the heat flow on a barbell with cooling and an initial condition. Let represent the surface of the barbell shape. Again, we set ( , ) = , some positive scalar. Then, to account for cooling, we take ( , ) = , another positive scalar. All other coefficients in Eq. 4 are assumed to be zero. Again letting ( ) be an initial condition, the probabilistic solution is Equation 11 where ( ) now represents Brownian motion on . Our discretization of the shape required 748 mesh points (more details on the mesh construction and DTMC are in SN3). Due to the mesh-size relative to the currently limited neuromorphic chip sizes available to us, we deployed this example on a spiking net simulator. We implemented a random walk approximating the stochastic process. The results of simulation for various time points can be found in Fig 4C. The temperature equilibration of the left (Fig.   4D) and right (Fig 4E) sides of the barbell proceed as one would expect from thermodynamics.

Discussion
The results here demonstrate that spiking neuromorphic hardware technology is suitable for implementing a scalable energy-efficient approach to solving an important set of numerical computing problems. Neuromorphic hardware is still immature relative to conventional hardware in terms of both physical scale and clock speed, although it already demonstrates considerable power advantages. Here, we show that our neural RW algorithm scales comparably to a parallel CPU approach, allowing us to observe a significant energy advantage in current neuromorphic platforms today while being positioned to take full advantage of large-scale neuromorphic hardware once realized. We further focus our exploration on demonstrating the broad application impact of our algorithm approach, showing that with simple extensions this approach can apply to a wide range of complex application domains.
Notably, the approach taken here does not leverage all the brain-inspired features present in many emerging neuromorphic hardware technologies. For instance, our approach does not leverage learning; however, we expect that the neural formulation of stochastic processes may make them more amenable to model calibration against experimental observations, and in situ neuromorphic learning may make this process more efficient. Likewise, we focused our demonstrations on large-scale digital spiking platforms, such as Loihi and TrueNorth, because they exist at the requisite neural scales for our algorithms. There is considerable interest in analog neuromorphic approaches that should similarly be compatible with this approach [19,30,32], although we would have to consider the precision implications of analog devices alongside the other approximation considerations (Fig. 2b).
One important consideration of this work is that the numerical accuracy of our neural approach is relatable to typical numerical precision considerations in conventional computing. Stated differently, this approach avoids the approximation pitfalls associated with many AI algorithms, wherein the implications of numerical precision and interpretability is still an open question. While understanding and accounting for these approximation errors will be critical for any application, the graph-based approach taken here provides several well-understood design choices to tailor the algorithm and hardware solution appropriately given precision concerns. For instance, in applications with clearly defined state spaces, such as diffusion over a social network, the mesh can directly map to the system, and resources can be dedicated to adding more walkers. Alternatively, in complex geometries or unbounded systems, it may be necessary to commit considerable neuromorphic hardware to a larger mesh.
Whatever the eventual set of capabilities that future neuromorphic platforms have, we expect that neuromorphic hardware will eventually exist primarily in heterogeneous system architectures alongside CPUs, GPUs, and other accelerators [20]. The neuromorphic algorithms for solving PIDEs described here complement AI as an application for brain-inspired hardware, and they strengthen the long-term value proposition for neuromorphic hardware in future computing systems. Further, in contrast to neural network applications, where neuromorphic hardware has struggled to match the speed of GPUs and linear algebra accelerators, our work shows that in the realm of numerical computing, neuromorphic hardware not only can deliver concrete energy advantages today, but is capable of scaling effectively in terms of processing time and overall efficiency.