Introduction

Neuromorphic computing using light has become an area of significant renewed interest in recent years1,2,3,4,5,6,7,8,9,10,11,12. Light has advantages in realizing the vast number of node connections that is a central feature of neural networks: it can carry several signals in the same channels, information transfer will be inherently fast, and energy consumption can be much lower than in electrical circuits1,2,3,5,6. The use of efficient nanoscale optical components is important to reduce energy consumption to orders of magnitudes below present hardware solutions1,3,11,13.

A bio-inspired neuromorphic hardware concept must realize both artificial neuron nodes as well as synaptic connections between these nodes. Here, an important consideration is that there can be thousands of synaptic connections for each neuron node. Integrating organic photochromic dyes to create the synaptic function in the connections with III-V solid state semiconductor nanowires (NWs), which provide the necessary neuron node signal interpretation as well as functioning as on-chip light emitters/receivers, efficiently uses the specific excellent and unique properties of each component. As no electrical connections is needed to the dyes (they exclusively communicate optically with the nano-optoelectronics) their deposition can be done in a simple polymer matrix (e.g. polystyrene) and the fabrication of circuits is much simplified. The III-V nanocomponents that perform the neuron node evaluation and emission of signals in a controllable and energy efficient fashion, are much fewer than the synapses, making the number of electrical connections manageable.

The synaptic components of an artificial neural network are represented in the weights (transmission efficiency) of the connections between the neural nodes. These synaptic weights largely govern the function of the network and serve as the memory of the neural system. For optical neuromorphic computing, such a materials system that can act as local weights responding to light, is a key outstanding challenge4 that is suggested to require a 0D molecular component14. Several important features must characterize a potential connection weight solution: the weights should be programmable in a predictable and monotone fashion, so that if a specific connection is used often, the weight strength is increased. Additionally, this increase of the weights should last (memory), but also be reversible, to allow both internal decay and an external reset. For some functions, both setting and reversing the memory with communication signals should be available. The weight dynamic process should be repeatable over more cycles than needed to perform the task. Variability in the available memory decay times allows the system to function in different real-time scenarios. Here it is important to realize that for operating in a natural world environment, solving real world problems, the relevant memory decay constants relate to how long a given task lasts, thus it will be between seconds and days. The possibility to memorize different wavelengths separately allows for several communication channels and connectivity weights in the same physical space. Furthermore, the memory should be analog, allowing for many different levels of settings. Finally, it is important that the medium used for weights can be integrated with standard semiconductor optoelectronic platforms to facilitate implementation.

Photochromic dyes potentially fulfill all the above-mentioned combined requirements excellently. They possess an intrinsic ability to undergo structural rearrangement in response to light. Such changes are manifested as changes in color (light absorption), geometry, and redox properties15. The ability of these chromophores to be reset to the original state reversibly via thermal relaxation, or by excitation with light of a different wavelength, enables the creation of a dynamic memory16,17,18,19. The spectral character and the photoswitching kinetics can be fine-tuned via molecular engineering20,21,22 and a large range of spectral and kinetic properties can be reached by varying the dye20,23,24. This allows for memories that operate in the same space, but at different wavelengths (multiplexing) as well as to have several memories with several different time constants as also found in biological systems. Multi-stage switching is also available which enables the use of one light wavelength for setting the memory and one for controlling the dynamics25. While some dyes have been explored as memories with external optical excitation for memories16,17, a key unexplored element for this and other organic systems is the incorporation as a weight component in the neural network connections. Among the several photoswitching chromophores, donor-acceptor Stenhouse adducts (DASA) represent a unique class of push-pull chromophores that comprise an electron donor and an electron acceptor unit connected via a substituted triene-2-ol bridge20,21,25,26,27,28,29,30. Owing to their outstanding negative photochromic properties, simple synthesis, strong red/NIR absorption, and robust structure the DASA photoswitches have gathered large interest recently for both fundamental studies and practical applications20,21,25,26,27,28,29,30. As they can be combined with standard polymers they can be integrated easily with semiconductor platforms.

Other solutions for on-chip synapses that work with light such as perovskites31,32, quantum dots4,31 and a variety of materials including dyes31,33 usually employs the optical material system as an electrical switch or field effect transistor responding to external light sources31. As a result, the light only acts as initial input to the synaptic weights, e.g. inputting image information, however the connectivity in the complete network is still achieved electrically31. An exception is phase change memories34 in which the light can heat the material to induce a bleaching effect, but the wavelength sensitivity and size needed for function is different from the dye systems. This highlights a key point of the present solution in which the dye does not need any electrical connections for serving as a complete synaptic solution, but can be implemented together with standard optoelectronics simply embedded in any a non-conducting polymer. This is a considerable advantage, as the number of synaptic connections in a neural network can be very large, and thus the complexity and connections needed in each synapse will significantly increase the complexity in fabricating a solution. Getting reliable electrical connections between solid semiconductors and organics and using this for synaptic effects, is challenging to realize and can result in significant loss of efficiency and energy. Using exclusively light communication between the dye and the solid-state optoelectronics allows the application of the optimal properties of each component without the significant challenge of controlling their electrical interfaces. Additionally, several of the optical systems rely on e.g. trap states or other elements which are not always predictable in their dynamics. In contrast the behavior of the DASA dyes is reproducible and robust.

In the present case, the high speed of a light driven system can be used for fast reaction times of a trained system, while the dye response times sets the speed of learning and memory processes. In a light driven system with dyes as memory components this would mean that the system can respond extremely fast if the dye weights have already been set (then limited by the ps response of the optoelectronic nanocomponents in the neurons). However, a learning process would be slower as that would correspond to the time it takes the dyes to react to light and turn colorless. While the photo absorption step itself occurs in the fs regime3,12, the complete structural change of the molecule takes longer time and depends on the surrounding material, temperature and structure of the molecule. This is not fully understood, but the complete time will be in the order of ns or more3,12 depending on the surrounding material, which together with the light intensity will set an ultimate limit. For navigation assignments as we explore below, the memory needs to be updated with relation to the speed of the insect and then 1 s to 100 ms is needed. This timescale is well achievable with the DASAs in general3, as well as with the dyes that are available to us23. Orders of magnitude further improvement of response times have been found with further development of molecules35,36.

Information input to a photonic artificial neural network will be external light signals, but to realize a complete on-chip solution, the hardware must provide internal light emission, detection and interpretation1,2,3,12,13. While this can be provided by e.g. organic electronics32,33, such as photodiodes and Field Effect Transistors32,33,37, III-V optoelectronics outperform these components substantially on important physical parameters35,38,39,40,41. This includes efficiency of photovoltaics36 where III-Vs reach efficiencies of 30-47% (single and multijunction) while organics including perovskites reach 20-33% (single and multijunction), as well as electron mobility where III-Vs reach values of 5000-30000 cm2/Vs38 compared to 1-10 cm2/Vs for organic electronics37. III-V semiconductor nanowires (NWs) have been demonstrated for future high-performance nanophotonic devices such as photodetectors, solar cells and light emitting diodes35,42. III-V NWs have favorable optoelectronic properties based efficient photon-electron conversion and ability to concentrate light absorption/emission27,28,43. Due to radial strain relaxation, lattice-mismatched materials can be combined, widening the range of wavelengths accessible17,35,36,40,41. The use of III-V NWs as components in nanophotonic neuromorphic computing circuits has been suggested recently13,44,45. However, this does not provide the memory of the interconnects found in neural networks.

One interesting neural system to emulate is the insect brain, which has the advantage (compared to mammal brains) of being better understood in terms of hardware and has a hierarchical nature making it easier to practically implement. The central complex (CX) area of the insect brain is organized in layers of ring attractors with sinusoidal patterns of activity that communicate with each other46,47,48. The CX is key for many different insects’ ability to navigate. The CX functions via path integration (PI), which integrates the insect’s velocity into its home vector (location of home relative to the insect’s current pose). Using this vector, the insect can return home even in a complex terrain with obstacles using only optical information from its surroundings. The CX neural network requires a memory for the integration of the velocity into a home vector and subsequent use for finding home.

We demonstrate that a DASA embedded in a polymer can act as an on-chip weight memory unit (synapse) for optically connected neural networks. We find that the DASA (open-form) absorbs light in a specific wavelength range on top of a NW array and in single NW devices. Sufficiently strong light leads to a structural switch of the DASA into a non-absorbing state, which is reversed over time when the light input is decreased. We map out the temporal behavior for the switching as a function of light intensity and temperature. We perform measurements systematically changing dye transmission via pulsed (spike) light signals. We perform many light pulse cycles demonstrating the long-term reproducibility. Based on the measured time and intensity dependence of the dye we successfully implement it in an anatomically derived model for the insect navigation circuit (CX).

Results and discussion

Functionality of tunable photoswitch weights in neural interconnects

In the proposed artificial neural network implementation (seen in Fig. 1a), the photoswitching molecular dye recreates the time dependent and controllable strength of the synaptic connection between the neurons, while nano-optoelectronic components13,44 carry out the non-linear in-neuron signal evaluation. Focusing on the molecular photoswitches, they must allow several functional behaviors at different time scales to emulate traits of the synapses8. 1) Long-term plasticity (LTP), where connection strength can be changed to a range of (analog) values that remain stable until reset. 2) Dynamic short-term plasticity (STP), where a time-dependent memory exists that gives a decay of the synaptic connection (leaky memory). When using light as the communication signal between the artificial neurons, the synaptic weight behavior can be emulated effectively by the DASAs as illustrated in Fig. 1b. By placing the DASA in a poly-(α-methylstyrene) (PAMS) matrix with a nanoscale light emitter/receiver system, we obtain the desired influence on the light transmitted through the DASA/polymer layer. Figure 1b depicts the absorbance of the DASA for the open (colored) form and the closed (colorless) form obtained via red-light photoexcitation (\({\lambda }_{{ex}}\) ≥ 600 nm) in both solution (toluene) and for the thin films of DASA/PAMS deposited on a NW device. The chemical structure of the specific DASA used here is depicted in Fig. 1b (further characterization given in ref. 23). We note that the absorbance spectrum may show slight variations depending on the solvent or microenvironment23,49,50. In Fig. 1c, we sketch the cases of LTP and STP of a using high/low intensity pulses, heating and varying memory decay times. In LTP (as shown in Fig. 1c), strong light pulses will change the dye transmission for the duration of the computation and it can be read out by weaker laser pulses that do not affect the dye transmission. A reset can then be performed by a thermal pulse. STP refers to a situation where a memory state can change significantly without direct outside stimuli during the computation cycle40,41. This can result in a variety of different functionalities17 depending on how fast the change is compared to the task being computed and the signals transmitted between neural nodes. In Fig. 1c, this is illustrated by having a higher or lower frequency of light pulses. With a fast-decaying memory the high frequency of pulses still change transmission and induce a memory effect even after the pulse sequence, while in the low frequency case, the transmission can be unchanged or even decreased after the pulse sequence.

Fig. 1: DASA photoswitch synaptic effect and fundamental function with III-V optoelectronic components.
Fig. 1: DASA photoswitch synaptic effect and fundamental function with III-V optoelectronic components.
Full size image

a Sketch of the concept. The DASA is deposited on nano-optoelectronic components such as a single III–V NW. Light acts as signal carrier, the dye acts to give (synaptic) weight to the transmission which can be modulated via light. A NW optoelectronic device receives the light signal and interprets it via a sigmoid function thus acting as an artificial neuron13. The combined behavior can be expressed as a synaptic strength G(t)=W(t) – F(t) where W(t) is the change in connection due to signals between neural nodes and F(t) represents a time dependent decay. b At the top we show the two reversible structural configurations of the DASA. The DASA response in toluene solution and on a NW array device are shown in the middle, both give a clear directly visual (color) response (scalebars are 10 mm and 1 mm, respectively). The absorption spectra in toluene solution of the colored (open) and transparent (closed) DASA photoswitch is shown in the bottom of B, the break in curve around 500 nm is an artifact of the measurement method. The absorption maximum, cross-section, and kinetics can also be varied by the chemistry of the photoswitch and/or the embedding polymer. c Fundamental functions that the photoswitch can perform. At the top we sketch long term plasticity (LTP) with a long memory time constant in which stronger (write) light pulses will make the photoswitch more transparent, thus the connection becomes enhanced for weaker (read) light pulses that acts as signals between neurons. The memory can be reset with a mild thermal pulse as this significantly lowers the memory time constant. At the bottom we sketch short term plasticity (STP) in which the memory time-constant of the photoswitch is on a similar timescale as the dye response to the light pulses (in essence the time interval between pulses). This results in a dynamic interplay between the pulses/spikes of the neural system and the memory. When a neural network is constructed using such a dynamic weight situation highly complex behavior can emerge. Here, we illustrate the STP effect by different frequency of pulses. A high frequency will lead to a gradual increase in transmission from pulse to pulse (memory change), while a low frequency will leave the transmission unchanged between pulses or even decreasing.

To quantify the situation, a time dependent analytical description of the absorption of the dye as a function of light intensity is formulated in Supplementary Text S1. In brief, the light transmission will be proportional to the concentration of non-absorbing (closed) photoswitch molecules coff:

$$\frac{d{c}_{{{{\rm{off}}}}}}{{dt}}={I* k}_{{{{\rm{wrt}}}}}* \left(1-T\right)-{k}_{{{{\rm{rec}}}}}* {c}_{{{{\rm{off}}}}}$$
(1)

where krec is the recovery rate of the photoswitch, kwrt is the conversion (write) rate of the photoswitch into the non-absorbing (closed) state, T is the light transmittance as defined in the Beer-Lambert law (see Supplementary Text S1) and I is the light intensity. A low krec (compared to the input signal rate, so krec * coff « I×kwrt) will result in a LTP scenario, where the dye can be written and will remember until being reset. Reset is done by increasing krec, by e.g. raising the temperature. krec * coff ≥ I×kwrt will result in a dynamic (STP) behavior in which the memory will be decaying during the processing. Both krec and kwrt can be altered by chemical modification of the molecular photoswitch or by judicious selection of the polymer matrix31,32,34. The size of I*kwrt will set the response time of the network.

Photoswitch functionality on solid substrates and devices

In Fig. 2a, we illustrate the basic function of the DASA embedded in a PAMS film and deposited on an InP semiconductor NW array. These pin NWs were developed for solar cells42, but can be used as efficient light receivers for on-chip neuromorphic computing and communication13. Initial measurements (Supplementary Fig. S1) verified significant absorption in DASA/PAMS films of relevant thicknesses (1–5 µm)13. Experiments were performed on the III–V NW array chip by measuring the short-circuit current generated in the NW array as a function of the light illumination wavelength in an external quantum efficiency (EQE) measurement (see also Methods). In Fig. 2b, EQE curves with and without a layer of DASA/PAMS on the NW array are compared. The attenuating effect of the DASA is manifested as a decrease of EQE in the spectral region between 600 and 700 nm. The absorption profile of the DASA (added for comparison on the figure) demonstrates the high degree of consistency between the DASA absorption spectrum and the attenuation of the NW EQE. As the DASA absorbs light in a limited wavelength range (which depends on the dye) it can be used for a wavelength dependent signal multiplexing.

Fig. 2: Fundamental dynamics of dye system on a NW chip.
Fig. 2: Fundamental dynamics of dye system on a NW chip.
Full size image

a Schematic of NW array with a DASA/PAMS thin film. Higher intensity light will write the DASA (make it more transparent), lower intensity will not result in any absorption change and can be used for read out (recovery from any written state will occur depending on photoswitch memory time-constant). b NW array EQE response with/without DASA (EQE vs wavelength). DASA absorption spectra shown in light blue for comparison. Absorption spectra match the change due to the deposition of the DASA. c EQE of NW array with DASA/PAMS polymer film during recovery in the dark, the spectrum shows a gradual recovery of all spectral components.

The reversibility of the DASA/NW hybrid device memory is shown in Fig. 2c (see Supplementary Fig. S2 for the time-resolved transmittance of a DASA/PAMS film on sapphire). Here, a significant fraction of the DASA on the NW chip has been converted to its non-absorbing (closed) state using a high on-chip light exposure. Figure 2c shows how the EQE reverts when only exposed to a low light level (readout level), which activates the photodetector cell, but only converts a negligible number of molecules. The results demonstrate the well-defined spectral and temporal properties of the DASA for memory writing (de-coloring) and subsequent color recovery (memory decay/reversal). The spectral shapes in Fig. 2c indicate the presence of some aggregation of DASA molecules in the PAMS matrix50, which could lead to slower kinetics as compared to a monomeric solution as well as multiexponential decay rates23. However, decay processes reported here are well-described by single exponentials, and the achieved kinetics are well-suited for biologically relevant tasks (see below).

To understand the kinetics of the DASA/NW hybrid device we explore the writing response with light intensity. As can be seen in Fig. 3a, increasing the light intensity leads to a faster conversion of the DASA colored (open) to the colorless (closed) state. This is quantified in Fig. 3b. The dynamics will depend on the molecular structure of the photoswitch, polymer type and the processing conditions for the film formation20,24,49. It can be concluded that a large variation in conversion can be achieved, thus allowing for a strong light signal to perform a write action and a weaker signal to perform a read action, as seen in Fig. 1c. This will be demonstrated additionally in Fig. 4 below. In Fig. 3c, we show the measured recovery time as a function of NW chip temperature. This shows how a reset of the photoswitch can be accelerated by raising the temperature by 30 degrees. This temperature window is compatible with the operation of standard electronics (upper limits ~70 °C) and represent a low energy input into the system. The behavior can be quantified in an Arrhenius plot as seen in Fig. 3d. The derived energy barrier of 120 kJ/mol is higher than values found for the DASA in a toluene solution (39 kJ/mol, see Supplementary Fig. S9) which is consistent with the constraining of the dye in the polystyrene matrix. The rate of recovery krec (defining the memory lifetime) can be controlled over many orders of magnitude. In the polymer matrix we can observe krec of 10−2 s−1 to 10−6 s−1 by varying temperature (see Fig. 3d and Supplementary Figs. S7 and S8) and/or the properties of the polymer matrix embedding the dye (see Supplementary Fig. S12 and Supplementary Table S1). Temperature also affects kwrt; see Supplementary Fig. S10. Using other dyes additional variation is achievable e.g. reaching below 1 s−1 range at room temperature20,24,49. Thus, memory decay time scales from days to sub-seconds is possible for operating in most real environments. Combined with the variation in light write time scales, dynamic behavior as seen in Fig. 1c can be achieved.

Fig. 3: Intensity and temperature dependence of dynamics of DASA on a NW chip.
Fig. 3: Intensity and temperature dependence of dynamics of DASA on a NW chip.
Full size image

a Photocurrent response of the NW solar cell at high light intensities around a wavelength of 650 nm as a function of time. Writing (inducing transparency in the DASA) is observed. The speed of the change in transmission depends on the light intensity. The photocurrent is normalized between the initial value and the endpoint of a fitted exponential decay function. As the operation of the III–V optoelectronic components can be controlled down to the nanosecond scale44, they can be regarded as operating instantaneously compared to the DASA. b Rate of transmission change (write rate) as a function of light intensity. c Photocurrent under low illumination levels after the dye has been made transparent using high light intensity. Increasing the temperature leads to a significant decrease in DASA recovery time indicating a simple way to reset the memory system. d Recovery rate of the DASA as a function of temperature, shown in an Arrhenius plot. The fitted line corresponds to an energy barrier of 120 kJ mol−1 for the thermally activated back reaction in PAMS polymer films.

Fig. 4: Spiking functionality of the DASA and single NW device combined.
Fig. 4: Spiking functionality of the DASA and single NW device combined.
Full size image

a Measurements using pulsed light signals, showing how the addition of the DASA leads to a highly controllable memory effect. Top is the measurement on a NW array with no DASA, and no memory effect is seen. Bottom is the measurement of the current seen in the NW array with DASA on top and a clear memory effect is seen. The low and high intensity of light can be used for read and write respectively (high also gives a measurement of DASA transparency). Shorter pulse time durations are not limited by the dye, but by the experimental setup. b The DASA is stable over many pulses and pulse cycles as shown here for the first and last of 5 consecutive writing series of 20 square pulses each (inset shows nominal pulse shape). The write pulses used here have a 30 times larger intensity than the pulses used in panel A. The light was completely turned off in-between the pulse sets for 1000 seconds, giving the DASA layer ample time to recover to its original absorbing (open) form. c Response to light by a single NW photodetector with a DASA/PAMS thin film deposited on top. The illumination is switched on at time = 0 s (vertical dashed line). The bleaching of the DASA occurs within approximately 120 s and 60 s, respectively, depending on the illumination intensity. This illustrates that the concept of our paper functions for single nanoscale optoelectronic components.

To demonstrate the functionality towards neural computations, a pulse (spiking type) experiment was performed. In Fig. 4a, a NW array is exposed to a series of short light pulses before and after DASA/PAMS thin film deposition (black and cyan curve, respectively). As the switching of the molecules themselves occurs on a much faster (down to ns) timescale, spiking can be faster, the time here is set by the limits of the equipment. After DASA deposition, there is a pronounced memory effect: each subsequent light pulse generates a larger photocurrent, corresponding to the increasing transmittance through the DASA layer. Furthermore, the rate of de-colorization is observed to be closely related to the pulse repetition rate, i.e. it is a direct effect of the time-integrated illumination. The lower light intensity in-between the pulses can be used for direct read-out that does not induce a memory effect. At t > 1700 s., the illumination is changed to constant low intensity. The NW array without the DASA now gives a constant photocurrent, while the DASA/NW array hybrid photocurrent decreases over time (dynamic memory). In Fig. 4b, a DASA/NW array hybrid is exposed to five identical sets of intense pulses. This illustrates the robustness of the process, as the response of the system is not significantly degraded by the repeated high-intensity illumination. From these and additional measurements (see Supplementary Fig. S3) we infer that (even without further material improvements) the rate of permanent photobleaching is <2×10−5 % (mJ cm−2)−1. This translates to an increase in permanent bleaching of less than 0.6% after 15,000 spikes as used in Fig. 4a. The response compares well to simulations using a model of the photoswitch behavior (see Supplementary Fig. S5).

Interestingly, we also demonstrate the DASA functionality on single NW devices, for scaling of the networks to sub-wavelength components. The devices were fabricated on a Si substrate (described in the methods) and are directly applicable for single NW communication13. In Fig. 4c, we show the results of light transmission to a single NW device with the DASA (see Supplementary Fig. S11 for the full measurement). The increase in transmission of DASA is seen as an increase in photocurrent measured on the single NW photodetector. The illumination is turned on at time = 0 s and the observed dynamics is well in line with what was observed for the NW arrays. This shows that the dye function can be scaled to the single NW device level.

Returning to the evidence of both LTP and STP, we note that inherently because the dyes we presently use can be made to provide memory decay times that are much shorter than the time of computing (e.g. down to the timestep 0.1−1 s relevant for the biological navigation system discussed in the next section) STP is possible. Much longer times are also available which will lead to a LTP scenario.

A basic illustration of STP that we observe in our data is the case of the rate of light spike signals. For a LTP dye memory, how fast the photocurrent changes will be proportional to the rate of spikes, while for a STP dye memory how fast the photocurrent changes depend non-linearly on the spike rate. Based on this, STP behavior can be seen in Fig. 4a. During the scan we decreased the spike rate by a factor of 2 after a third of the scan. In an LTP scenario this would then also decrease how fast the photocurrent changes with each spike by a factor of 2. However, the change in the slope of photocurrent increase is not a factor of 2 but instead 2.7 as in a STP scenario.

For further illustration of a STP scenario we also refer to Supplementary Fig. S4, where the spiking pattern is the same as in Fig. 4a, but we have altered the dye memory decay rate to be faster. As seen, we now come into a situation where the initial fast spike rate results in a build-up of a higher photocurrent (due to de-colorization of the dye), however the slower spike rate is not able to keep up with the memory decay and a decrease in the photocurrent is in fact observed. Thus, only a sufficiently fast spike rate will lead to a memory build-up - a STP scenario as also sketched in Fig. 1c.

How dynamic STP response can be variably introduced is also seen in the Supplementary Fig. S6. Here we show that by changing the sample temperature (which increases the memory decay rate) we can go from a situation of very little change in the memory between pulses to a complete decay of the memory between pulses. To tailor the memory decay to a specific real-time scenario and address different STP scenarios, dyes with varying time constants can be chosen, or their dynamics can be altered by adding an additional laser pulse26 or the base temperature.

Photoswitch functionality on memory formation at the insect navigation circuit

Turning now to the neural network implementation of the photoswitch for the specific purpose of insect navigation, we succinctly show the model of the CX in Fig. 5a. The model is composed of a series of ring attractors. The connectivity among them implements a variety of operations and allows the model to integrate its allocentric velocity into a vector that points to its starting location i.e. path integration (PI), as seen in Fig. 5a. In the original model46, the acquisition and extinction of the memory component were linear, as opposed to the exponential retention and decay of the DASA (see Fig. 5b). Here, we demonstrate that the DASA function can also effectively integrate the velocity into a target location. The photoswitch is applied onto NWs (as above) that we can use for creating the artificial neurons of the ring attractor circuit13. We modified the memory component of the model to match the dynamics of the DASA (Supplementary Text S1) and to parameters of our measurements (see Supplementary Text S2, Supplementary Fig. S12, and Supplementary Table S1).

Fig. 5: Insect model description and results.
Fig. 5: Insect model description and results.
Full size image

a Schematic of the neural model of the insect central complex. The different layers of processing are visualized as separate ring attractors, the function of the attractors is grouped by the different colors. The first layer is the ring neurons, which represent the heading direction with respect to some directional cue (for example, the sun or wind). The EPG and Δ7 neurons integrate the different orientational cues from the ring neurons into a single compass47. The PFN neurons integrate the compass with the translational speed of the animal into its velocity48. This is integrated over time by the FC2 neurons into the goal direction48, which in our case is the animal’s starting location. Like the Δ7, the hΔ neurons ensure that the goal direction is represented by a sinusoidal pattern as input to the PFL3 neurons. This last layer takes the difference between the goal and heading direction to calculate whether the animal should turn left or right. b We replace the memory layer (linear dynamics) with the DASA (exponential dynamics). We selected the parameters related to the S2 (thinner) sample, after annealing (see Supplementary Table S1). Top: the sample is exposed to light for 7 min (bleach) before putting to darkness for 1000 hours. Bottom: memory layer is now implemented using the photoswitch. c Schematic of the respective connections of the model in insect brain. d Example of an agent navigating using both models. In grey, we show a route generated randomly for the agent, while both models path integrate. In magenta, we show the route of the agent when controlled using the responses of the original (linear) model. In orange, we show a similar route, generated by using the responses of the photoswitch (exponential) model. e The distance from home over the distance travelled (tortuosity) for the above example, using both models. The red dashed line highlights the tortuosity of a perfect return in a straight line. f Tortuosity for 100 examples and both models. g Difference of the decoded memory vector from the starting point. In (F and G), the thick line shows the median; the colored area marks the first and third quartiles. In all examples, 10% random noise was added to the responses of all the neurons. The routes created using the photoswitch model are slightly more tortuous than the ones created by the original model, which suggests that the photoswitch model is more sensitive to the noise added on the responses. This was confirmed by decoding their route memories, which seem to have higher error than in the original model at the turning point.

In the model, there are six sets of neurons that form distinct ring attractors46 and is described in Fig. 5a. The path integration memory is formed in the FC2 layer and was implemented using properties of the DASA (Fig. 5b). The schematic in Fig. 5c shows the different regions of the fruit fly’s CX and how they are connected using the neurons described above. The implementation of connections between layers and path integration memory are described in detail in Supplementary Texts S3 and S4, and Supplementary Fig. S13).

By using the CX model, we demonstrate that the DASA can be used effectively as a memory layer. We create a simulation of a navigation task, where an insect forages for a roughly 100 m long path, before it is allowed to use the model’s output to return to the starting point (for another 150 m; see Supplementary Texts S5 and S6 for how we generated the random foraging and return paths). Figure 5d illustrates an example route using 10% noise in the responses of the models. The foraging (grey) path was generated randomly before the linear model (i.e., original; magenta) or its exponential variant (i.e., dye imitation; orange) generate their return paths. The responses of the neurons from both models can be found in Supplementary Fig. S14. Figure 5e shows the tortuosity of the routes (i.e., distance travelled over distance from the starting point). Both models successfully returned to the starting point and stayed close to it, demonstrating their ability to path integrate. The DASA memory safely operates for around 41 min, after which it saturates. Thus, the speed of the insect in our simulation is set to be 10 cm sec-1 to cover the 250 m distance of the return route, which is around a tenth of a desert ant’s speed. We could navigate successfully longer distances by increasing the speed of the insect.

The success of the models presented is not specific to the route. Figure 5f summarizes the tortuosity of both models across 100 different routes (median and quartiles). We run the same simulation varying the response noise from 0% to 40%: the original model breaks at a 30% noise level, while the photoswitch model is less tolerant to noise, and breaks at a 20% noise level (see Supplementary Fig. S15). This effect is not related to the exponential properties of the DASA, instead it occurs because light can only increase the memory stored in each neuron (transmittance of the DASA). This is not the case in the original model, where the in-neuron memory can be both actively stored and actively erased. In contrast, the in-neuron memory for the DASA case can only be actively stored, while the erasing of memory occurs passively through the thermally activated back-reaction of the DASA. This limitation gives rise to the lower noise tolerance of the photoswitch (DASA) model. A multiwavelength signal that allows differential increase or decrease of the photoswitch transmittance (like in ref. 29) could resolve this by introducing a light induced back-reaction. We note however, that the current noise tolerance level still is considerable, and sufficient for realistic use-cases. Overall, our results show that the properties of the DASA memory allow for the model to perform its tasks.

Conclusions

In conclusion, we demonstrate that photochromic dyes embedded in a polymer matrix are excellent candidates for on-chip neuromorphic computing at biologically relevant timescales. Both LTP and STP behavior can be realized, durability and compatibility (with device technology) are demonstrated. Finally, simulations of a functional model of the insect brain CX complex demonstrate the applicability to biological inspired neural networks. While a specific DASA was used in the present case, the general behavior can be found in several different molecules and a wide tuneability across response timescales and wavelengths is possible22,51. Thus, this proof-of-concept opens for a broad exploration of photoswitches as a means of memory in networks communicating with light. From Figs. 3a and  4a, we can also see that a predictable and linear programming of the dye with the light is possible. While we perform reversal of the DASA by heating, other dyes exist that allow the reversal to be performed via additional light signals at other wavelengths26,51. Another question is how the properties of the dye can be varied with high resolution spatially across a chip to induce functionality. First, in the simplest implementation of the dye, where it is evenly distributed between nano-optoelectronic components that emit and receive light between them (as in the network for insect navigation), local weight tuning of the dye will inherently occur, since the dye in areas where much light communication occurs will become more transparent, while in areas with little communication the dye will remain absorbing. How dense a network that can then be produced will depend on the ability to focus light locally to affect the polymer in specific regions, which can be sub-wavelength using either plasmonic effects or dielectrics38,42. Further, the possible network density depends on how long a distance the light must travel in the polymer medium to experience significant absorption. The DASAs have a high molar absorption coefficient (Table S1 and ref. 3). Thickness of 1 micron is already available, while further decrease in the thickness (where the DASA still functions3) down to ~200 nm should be possible. Second, local permanent modification of the absorption properties of the dyes is possible using strong light signals that can lead to permanent de-colorization (dependent on intensity and duration of the light). As a result, optical lithography can be used to pattern areas where the dyes absorb light more and areas where they absorb less with the precision of lithography as used for microelectronics fabrication. This will then introduce areas of different memory weight capabilities. Third, printing patterns in the polymers using lithographic tools is also available51 which can allow variation of absorption. It can be noted that dyes can be infused into e.g. a polymer also after initial deposition, opening up for patterning with several different dyes in the same region52. In the present case, highly efficient InP NWs were used to demonstrate the concept. However, by varying the III-V compound materials a wide variety of wavelengths can be addressed indicating even broader applicability. Here an interesting aspect is that the light response of the photoswitch is limited to a certain wavelength window which implies that multiplexing using different light wavelengths is a future option. While we demonstrated the implementation for a specific biological network, the generality of the behavior indicates that our concept should be applicable to many different types of artificial neural networks. As the response times can be widely varied, the systems can be tailored to respond to the natural timescales of whatever real system the network should respond to, making it highly efficient and robust.

Methods

DASA synthesis, brief description

The complete syntheses and characterization of DASA and intermediates are discussed in the Supplementary Texts 7.1–7.3 and Supplementary Figs. 16.116.6. The DASA used herein, depicts the combination of a weak aryl electron donor (2-methylindoline) with a strong electron acceptor (trifluoromethyl pyrazolone).

Nanowire synthesis and device fabrication

The nanophotonic InP nanowires were grown using metal-organic vapor phase epitaxy (MOVPE) as described previously43,53,54. For this, a hexagonal pattern with a pitch of 500 nm was defined on a 2” InP (111)B substrate using displacement Talbot lithography, and Au particles were deposited using E-Beam evaporation and lift-off. A low-pressure (100 mBar) Aixtron 200/4 MOVPE reactor was used to grow the nanowire arrays, using the III–V precursors trimethylindium (TMIn, \(\chi =5.94\times {10}^{-3}\)) and phospine (PH3 \(\chi =6.92\times {10}^{-3}\)) as well as the dopant precursors tetraethyltin (TESn) and diethylzinc (DEZn). The precursor gases were transported by H2 at a total flow rate of 13 l min−1. To preserve the Au particle positions, a pre-nucleation step at 280 °C was used, followed by annealing at 550 °C and nanowire growth at 440 °C. The nanowires with a diameter of 200 nm and length of 2000 nm were doped in a p-i-n structure, using the dopant molar fractions of \({\chi }_{{DEZn}}=1.1\times {10}^{-5}\), \({\chi }_{{DEZn}}=0.3\times {10}^{-7}\) and \({\chi }_{{TESn}}=4.3\times {10}^{-5}\), respectively. The Zn doping of the intrinsic segment acts as compensation doping. In-situ monitoring using a LayTec EpiR DA UV optical reflectometry system was used to control the length of each segment to the desired length of 500 nm (p-type), 1300 nm (intrinsic) and 200 nm (n-type), respectively \(\chi =1.23\times {10}^{-4}\) to suppress radial growth.

Nanowire arrays were processed into photodetector devices using the same processing steps as described in more detail in ref. 54. Atomic-layer deposition of SiOx is used to isolate the nanowires from each other. The structure is planarized using Cyclotene 3022-46 (BCB) and reactive ion etching (RIE) to expose the nanowire tips. To enable an electrical contact, the SiOx is etched using RIE and the Au particles are wet etched. To enable device definition, a frame of S1828 photoresist is defined and hard-baked. A 150 nm thick ITO transparent front contact is sputter coated and selectively etched between devices. Finally, Au contact pads are deposited using E-Beam evaporation and lift-off.

Single-nanowire devices

The longer segment InP NWs grown were transferred onto a substrate using a motorized micromanipulator with a needle tip of ~100 nm attached to it. The needle was used to physically detach NWs from the growth substrate. On detachment most NWs tend to cling onto the needle due to van der Waals forces. The motorized stage then moves over to the target sample, wherein the NWs were dropped and appropriately positioned for further processing.

InP NWs thus deposited were imaged and incorporated into a lithography design to deposit electrical contacts. Electron beam lithography was used to transfer pattern onto the substrate. Ar ion milling was used to remove native oxide, followed by metal deposition by e-beam evaporation. A metal stack of Ti/Au:5 nm/160 nm was used as electrical contacts. Post lift-off, thermal processing was done in an RTP unit at 300 °C for 90 s in an N2 environment.

Deposition of DASA embedded in poly(α-methylstyrene) [PAMS]

The thin films of the DASA embedded in PAMS matrix were deposited onto the nanowire array and single-nanowire samples through drop-casting or spin coating. The stock photoswitch/polymer mixture contained 1% weight ( ~ 5 mM stock concentration) of the DASA relative to the PAMS matrix. The concentrations can be varied, but our primary focus was on the 5 mM concentration. To achieve a homogenous thickness after drop-casting, the samples were tilted at a 45° angle and allowed to air-dry. When depositing onto sapphire, spin coating was employed at varying spin speeds of 1500, 2500, 4000, and 6000 rpm.

Measurement systems

External quantum efficiency (EQE) measurements of the nanowire array devices with and without dye were performed in a Bentham PVE300 Photovoltaic EQE setup. Transmission measurements of the dye coated on sapphire were conducted in the same measurement setup by using an integrating sphere.

The current generated by the nanowire array devices was measured under short circuit conditions as a function of time with varying illumination. For this, an LED with a spectral range of 633–711 nm in a G2V Pico solar simulator was used.

To obtain precise thickness measurements of the dye layer, a mechanical mask was meticulously applied onto a sapphire substrate prior to the spin-coating or drop-casting process. Following this preparation, the Bruker DektakXT stylus profilometer was employed to accurately measure the thickness of the dye layer.

The single nanowire photocurrent measurements were performed using a Keysight B2980A Series Femto/Picoammeter. For temperature dependent measurements, a metal ceramic heater (Thorlabs HT19R) was powered using a small power source. A nanowire array with dye deposited on it, and mounted on a copper coin, was placed on the heater, and an IR camera (FLIR Systems P620) was used to read off the temperature of the nanowire array surface.

Computational model and parameters

The modelling methods were implemented in Python. The mathematical formulation of the dyes and their photo-switching dynamics are described in detail in Supplementary Text S1. To create a more realistic scenario for the simulations, we took measures of some dye parameters and optimized the rest to fit our collected data. Our measured parameters, include the molecular absorption coefficient (ϵ), the optical path length (l), the quantum yield (ϕ), and the wavelength of absorbed light (λ). We also assumed that the maximum optical effect is the same in all our test and equal to \({W}_{\max }=1.30{10}^{-7}\) J sec-1. The SciPy library was used to optimize the remaining parameters: the back-reaction rate coefficient (k), the total concentration of the dye (\({c}_{{tot}}\)) and the volume of the material (V). Supplementary Text S2 describes the optimization process, while the result parameters for the different samples are summarized in Supplementary Table S1. The computational model that we implemented follows the model of Stone et al.48 (also described in Supplementary Text S3). For the dye model, we replaced the linear ‘memory’ layer of the model with the exponential dynamics of the dye using the parameters described above (see Supplementary Text S4 for details). For the navigation experiments, a random foraging route was calculated as a collection of angular velocities randomly distributed in time and low pass filtered to create a smooth route. The linear speed of the animal was assumed to be constant and at 10 cm sec−1, and it was only moving towards its heading direction (more details in Supplementary Text S5). During the return route, either the original or dye model was used to steer the animal, which moves towards its heading direction and for the same constant speed (Supplementary Text S6). The distance of the animal at the turning point is calculated as

$${l}_{{{{\rm{turn}}}}}=\sqrt{{\left(x\left(1000\sec \right)-x\left(0\sec \right)\right)}^{2}+{\left(y\left(1000\sec \right)-y(0\sec )\right)}^{2}}$$

In each timestep, the distance of the animal from the starting point relative to the turning point is calculated as

$$L(t)=\frac{1}{{l}_{{{{\rm{turn}}}}}}\sqrt{{\left(x(t)-x(0\sec )\right)}^{2}+{\left(y(t)-y(0\sec )\right)}^{2}\,\cdot 100 \% ,}$$

where x(t) and y(t) are the coordinates of the animal in space at timestep t, t=0 sec represents the time at the starting point and t = 1000 sec at the turning point. Thus, the denominator (normalization factor) represents the distance of the turning point from the starting point. Normalizing the absolute distance at every time step with that distance, we get the animal’s relative distance from the starting point. This allows the distances from different experiments (with different starting-to-turning point distances) to be compared and summarized in Fig. 4f over the same horizontal axis. The relative cumulative distance travelled was used as the horizontal axis in Fig. 4e–g and was calculated as,

$$C\left(t\right)=\frac{1}{{l}_{{{{\rm{turn}}}}}}v\left(t\right)\cdot t\cdot 100 \% ,$$

where v(t) is the speed of the animal. The encoded vector in the FC2 neurons of the animal is decoded as

$${x}^{{{{\rm{mem}}}}}\left(t\right)= \, {{\mathrm{Re}}}\left[{z}^{{{{\rm{mem}}}}}\left(t\right)\right], {y}^{{{{\rm{mem}}}}}\left(t\right)={{{\rm{Im}}}}\left[{Z}^{{{{\rm{mem}}}}}\left(t\right)\right], {z}^{{{{\rm{mem}}}}}\left(t\right)\\ = \, \frac{1}{g}{\sum }_{k=0}^{15}{{r}_{k}}^{{{{\rm{FC}}}}2}\left(t\right){e}^{\frac{{{{\rm{i}}k\pi}}}{4}},$$

where \({r}_{k}^{{\mbox{FC}}2}\)(t) is the response of the kth FC2 neuron at the timestep, \({\mbox{i}}\) is the imaginary unit, and g is the system’s gain. Subsequently, the memory error is calculated as

$${{{{\mathcal{E}}}}}^{{{{\rm{mem}}}}}\left({{{\rm{t}}}}\right)=\frac{1}{{l}_{{{{\rm{turn}}}}}}\sqrt{{\left({x}^{{{{\rm{mem}}}}}\left(t\right)+x\left(t\right)\right)}^{2}+{\left({y}^{{mem}}\left(t\right)+y\left(t\right)\right)}^{2}}.100 \% \cdot$$

Note that in the above equation, the perfect encoded memory would point to \(\left(-x\left(t\right),-y\left(t\right)\right)\).