Abstract
Miniaturized spectrometers have great potential for use in portable optoelectronics and wearable sensors. However, current strategies for miniaturization rely on von Neumann architectures, which separate the spectral sensing, storage, and processing modules spatially, resulting in high energy consumption and limited processing speeds due to the storage-wall problem. Here, we present a miniaturized spectrometer that utilizes a single SnS2/ReSe2 van der Waals heterostructure, providing photodetection, spectrum reconstruction, spectral imaging, long-term image memory, and signal processing capabilities. Interface trap states are found to induce a gate-tunable and wavelength-dependent photogating effect and a non-volatile optoelectronic memory effect. Our approach achieves a footprint of 19 μm, a bandwidth from 400 to 800 nm, a spectral resolution of 5 nm, and a > 104 s long-term image memory. Our single-detector computational spectrometer represents a path beyond von Neumann architectures.
Similar content being viewed by others
Introduction
Spectrometers play a crucial role in scientific research and numerous industrial applications1,2. However, traditional spectrometers typically comprise bulky mechanical parts such as optical gratings and Michelson interferometers3. Therefore, the miniaturization of spectrometers while retaining high spectral resolution, broad spectrum sensing, and fast response, at low cost, is a subject of intense research interest due to potential applications in portable and wearable optoelectronics4,5,6,7,8,9,10,11,12,13,14,15. Common spectrometer miniaturization strategies rely on integrated detector arrays and separate optical elements with wavelength-dependent optical properties, including compact interferometers4,12,16, quantum dots5,12, photonic crystals8,10, and metasurfaces6,13,17. Despite recent advances, miniaturizing these spectrometers down to the micrometer scale remains challenging due to limitations imposed by the optical path length11. Recently, a computational spectroscopy technology that leverages reconstructive mathematical algorithms has been established, allowing for the fabrication of detector-only spectrometers without separate optics. These approaches include various photodetectors and photodetector arrays such as bandgap engineered nanowire arrays14,18, and two-dimensional (2D) van der Waals (vdW) materials7 and heterostructures11,15 with gate-tunable and wavelength-dependent photoresponsivity. However, the commercialization and practical applications of miniaturized spectrometers and imaging systems rely on their integration with silicon chips19,20, which are often constructed with von Neumann architectures21 where the spectral sensing, storage, and processing modules are spatially separated22. This leads to high energy consumption23 and slow processing speeds due to the storage-wall problem24.
In this work, we demonstrate the possibility of fabricating a miniaturized spectrometer using a single SnS2/ReSe2 vdW heterostructure with the capabilities of photodetection, spectrum reconstruction, spectral imaging, and detectivity within the visible spectral range. By leveraging the gate-tunable photoresponse, reconstructive algorithms, and compressed sensing methodologies, we demonstrate a miniaturized spectrometer and spectral imager with a footprint of merely 19 μm, a bandwidth from 400 to 800 nm, a spectral resolution of 5 nm, and a 104 s long-term image memory. Additionally, our miniaturized spectrometer not only serves as storage but also has processing capabilities when alternate laser and gate pulses are applied. Our approach represents a significant step towards single-detector computational spectrometers beyond von Neumann architectures.
Results
Device arrangement and photocurrent mechanism
Figure 1a displays a vertically stacked SnS2/ReSe2 heterostructure, used in this experiment with an active region of approximately 28-nm-thick SnS2 and 40-nm-thick ReSe2 (Supplementary Fig. 1). The vdW flakes were mechanically exfoliated from high quality single crystals, verified by Raman spectroscopy and high-resolution transmission electron microscopy (HRTEM) characterization (Fig. 1b–d). The overlapped region (green plot) exhibited both materials’ characteristic Raman peaks, indicating the presence of two distinct materials25,26,27,28. The contact interface showed a typical type-II band structure (Supplementary Figs. 2 and 3) and the individual SnS2 and ReSe2 both showed strong light absorption within the visible spectrum range (Supplementary Fig. 4), resulting a strong photoresponse to visible light. Our vdW heterostructure device achieves a large photocurrent (Iph) of approximately 0.6 μA (Fig. 1e), with the highest photoresponsivity (R) calculated to be approximately 200 A/W at a gate voltage (Vg) of 50 V and an incident laser power density (Pin) of 0.22 mW/cm2 (Supplementary Fig. 5). The device exhibited a high specific detectivity (D*) of 3.4 × 1012 cm Hz1/2 W−1 due to its ultralow dark current in the off state (Vg < 2 V, Supplementary Fig. 5). The photocurrent of our device increased linearly with incident light power in the low power density range (<0.8 mW/cm2), and its slope depends on the gate voltage (Fig. 1g), laying an important foundation for its application in spectrometry, as discussed later14.
Interestingly, photocurrent peaks were observed in the spectrum, which moved from ~580 nm to ~670 nm when the gate voltage was increased from −20 V to 20 V (Fig. 1f). Scanning photocurrent maps under 532, 633, and 785 nm laser illuminations for a fixed laser power of 0.5 mW (Fig. 2a) showed that the SnS2 and ReSe2 regions’ photocurrent decreased with λ, while the photocurrent in the junction area exhibited a peak (Fig. 2b–d). This indicates that the SnS2 and ReSe2 interface dominates the photon absorption and energy conversion process. Moreover, the photocurrent of the junction area is even greater than the sum of the photocurrent in the SnS2 and ReSe2 regions, pointing to the junction’s essential role in establishing the photocurrent. TEM analysis and XPS characterization suggest that our SnS2 possesses ~2% sulfur vacancies, while the ReSe2 has ~2.4 % Re vacancies (Fig. 1c, d and Supplementary Fig. 6). First-principle calculations reveal Re vacancies result in the appearance of three defect bands, labeled DFR1 (0.26 eV below bottom of conduction band (CB)), DRR2 (0.49 eV below the bottom of CB), and DFR3 (0.37 eV above the top of the valence band (VB)). In the case of SnS2 with sulfur vacancies, a single defect band (DFS) emerges, positioned 0.7 eV below the bottom of the CB (Supplementary Fig. 7). Moreover, due to the upward bending of the energy band, hole trapping plays a unique role in the overlapping region as excited holes will move to the overlapped region and electrons move to the nonoverlapped region (Fig. 2e and Supplementary Fig. 8f). Thus, under illumination, holes are excited and move to the overlapping region and some of the holes will be trapped by DFR3, resulting a photogating effect, which would have the effect of enhancing the photocurrent. When the light is switched off, the trapped holes remain and sustain the photocurrent, resulting in a memory effect. This is also key to the electrically tunable memory effect, discussed further in the paper. Moreover, the interfacial trap states, such as neutral traps (NT), are generally observed in 2D heterostructures during the stacking process, which also result in photogating and memory effects (Supplementary Fig. 9). Details of the calculation can be found in Supplementary Note 1. For photodetectors dominated by a photogating effect29, the photocurrent in the interface (\({I}_{{{{{{\rm{interface}}}}}}}\)) can be written as \({I}_{{{{{{\rm{interface}}}}}}}=\frac{\partial {I}_{{{{{{\rm{ds}}}}}}}}{\partial {V}_{{{{{{\rm{g}}}}}}}}\triangle {V}_{{{{{{\rm{g}}}}}}}\), where \(\triangle {V}_{{{{{{\rm{g}}}}}}}\) is the local gate voltage generated by photoexcited carrier trapping at the interface30. In Fig. 2f, the calculated \(\triangle {V}_{{{{{{\rm{g}}}}}}}\) is shown to decrease with increasing gate voltage. We would like to stress that the number of holes trapped depends on the built-in potential at ReSe2 (\({V}_{{{{{{\rm{biR}}}}}}}\)). Increasing Vg, \({V}_{{{{{{\rm{biR}}}}}}}\) decreases, resulting in a decrease in the number of trapped holes, which is consistent with the experimental results. The total photocurrent (\({I}_{{{{{{\rm{ph}}}}}}}\)) has three main contributions: the photocurrents generated in the ReSe2 (\({I}_{{{{{{\rm{R}}}}}}}\)) and SnS2 regions (\({I}_{{{{{{\rm{S}}}}}}}\)), and the photocurrent generated in the overlapping region (\({I}_{{{{{{\rm{interface}}}}}}}\)) due to the photogating effect. As the Au electrode has a much greater work function in comparison with both SnS2 and ReSe2, the built-in potential between Au and ReSe2 (\({\phi }_{{{{{{\rm{B}}}}}}1}\)) is greater than \({V}_{{{{{{\rm{biR}}}}}}}\). Thus, \({I}_{{{{{{\rm{S}}}}}}}\) and \({I}_{{{{{{\rm{R}}}}}}}\) are in opposite directions. Therefore,\(\,{I}_{{{{{{\rm{ph}}}}}}}={I}_{{{{{{\rm{S}}}}}}}-{I}_{{{{{{\rm{R}}}}}}}+{I}_{{{{{{\rm{interface}}}}}}}\). Moreover, \({I}_{{{{{{\rm{interface}}}}}}}=\frac{\partial {I}_{{{{{{\rm{ds}}}}}}}}{\partial {V}_{{{{{{\rm{g}}}}}}}}\triangle {V}_{{{{{{\rm{g}}}}}}}\) is almost constant when far from the photocurrent peak (15 V in Fig. 2f). Thus, the peak of photocurrent can be explained by \({{|I}}_{{{{{{\rm{S}}}}}}}-{I}_{{{{{{\rm{R}}}}}}}|\). Figure 2c plots the \({I}_{{{{{{\rm{R}}}}}}}-{I}_{{{{{{\rm{S}}}}}}}\) and it does show a peak around 600 nm, which is consistent with the photocurrent of the device. Moreover, the built-in potential of the SnS2 side decreases the most with increasing Vg and that in the ReSe2 side remains quite stable (Supplementary Fig. 8e). In other words, the photocurrent decreases much faster with increasing Vg (Supplementary Note 2). Thus, the peak position of the photocurrent moves to longer wavelength with increasing Vg, which is consistent with the experimental observation (Fig. 2f).
Spectrum reconstruction
The fabricated SnS2/ReSe2 heterostructure exhibits a gate-tunable spectral response with high responsivity and detectivity across a wide range of wavelengths, making it suitable for use as a spectrometer1. The reconstruction process is briefly outlined in Fig. 3 (see Supplementary Fig. 10 for a detailed workflow diagram). In the non-saturated region (linear region, as shown in Fig. 1g) at a given gate voltage (denoted as Gi), the photocurrent (Ii) can be calculated as an integral of the product of the incident light power density (P(λ)) and the responsivity (Ri(λ)) over the entire spectral range of interest from λ1 to λ2:
where λ1 and λ2 define the operational spectral range of the spectrometer and index i implies different gate voltage values. Here, the unknown spectrum to be determined is denoted by P(λ) and is schematically illustrated by an arbitrary narrowband emission spectrum, represented by the dashed line curve in Fig. 3a. Additionally, three representative responsivity curves corresponding to the three different gate voltages (Gi, Gj and Gk) are sketched in Fig. 3a. Using Eq. (1), we can calculate the photocurrent of the device for a given gate voltage, determined by the integral of the shaded area in Fig. 3b. Figure 3c shows the measured photocurrents at all different gate voltages, where Gi, Gj and Gk are highlighted in different colors. By varying the gate voltage from G1 to Gn, we obtain n integral equations that consider small windows of wavelengths in (1). These equations can be discretized and grouped into a matrix equation:
or \({{{{{{\bf{P}}}}}}}_{\lambda }\times {R}_{G,\lambda }={{{{{{\bf{I}}}}}}}_{G}\) in a more compact form. To enable accurate reconstruction of an unknown spectrum using the SnS2/ReSe2 heterostructure, we employed prior robust principal component analysis (RPCA) on the responsivity matrix \({R}_{G,\lambda }\) to stabilize the solution against various types of noise and errors. Subsequently, we used a regression model with elastic net regularization to solve the resulting matrix Eq. (2) by minimizing the sum of the squared errors loss function, with the added penalty term being a combination of \({\ell }_{1}\) and \({\ell }_{2}\) (Lasso and Ridge) norms. Details are provided in Methods and Supplementary Figs. 10 and 11.
To determine the responsivity matrix \({R}_{G,\lambda }\), we utilized a tunable light source with a wavelength ranging from 400 to 800 nm and 81 sampling points, measured at 81 different voltages from −20 V to 20 V. The resulting 81 × 81 \({R}_{G,\lambda }\) matrix is shown in Fig. 3e, exhibiting a tunable response within the visible and near-infrared spectrum range, enabling broadband spectrum reconstruction. To demonstrate the SnS2/ReSe2 heterostructure’s capability for reconstructing different types of spectra, we measured a series of quasi-monochromatic spectra in the range of 400 ~ 800 nm with our single-heterostructure spectrometer, which agree well with reference spectra acquired using a commercial spectrometer, verifying the broad spectral range of our device (Fig. 3f). We also demonstrate the reconstruction of 532 nm and 635 nm laser spectra in Supplementary Fig. 12 and Fig. 3g, respectively. Note, while recording the corresponding current values, we continuously illuminated the device with light for 1 min to stabilize the photocurrent, and then swept the gate voltage from -20 V to 20 V (sweep rate 1 V/s). Thus, the time required to measure a single complete spectrum is approximately 100 s, which can be reduced by decreasing the illuminating time, increasing the sweep rate, or/and using compressive sensing techniques. The full-width at half-maximum (FWHM) of the reconstructed laser spectrum’s was about 12 nm, with an optimal resolution of 11.3 nm according to the Nyquist–Shannon sampling theorem31. Note, although the Shannon-Nyquist theorem is primarily concerned with the sampling and reconstruction of time-dependent signals, in this work, this theorem is extended to the spatial frequency content of the signal and applied to the wavelength sampling. To further showcase device’s ability for broadband spectrum reconstruction, we measured the spectrum of a white flashlight from a mobile phone, as shown in Fig. 3h, revealing excellent agreement between the reconstructed and measured reference spectra. We also used the lowest irradiance suppliable by the apparatus available to us (23 μW/cm2) and a faithful reconstruction was produced with such low power density (Supplementary Fig. 13). We measured around 10 devices, and all showed essentially similar capabilities to reconstruct visible light spectra. An imaging array was also fabricated, using chemical vapor deposition (CVD) grown SnS2 and ReSe2 (Supplementary Fig. 14). Although all the devices worked properly, further optimization is needed to improve their performance.
Compressed sensing
Improving the resolution of a spectrometer is a key challenge in developing advanced spectroscopy techniques. The resolution of a spectrometer is limited by the number of sampling points, as previously discussed. However, the number of sampling points cannot be increased indefinitely due to the numerical properties of the responsivity matrix \({R}_{G,\lambda }\). To overcome this limitation and achieve a higher resolution32,33, we employ compressed sensing. For this, we utilized the singular value decomposition (SVD) technique, a well-known compression technique to achieve full spectrum reconstruction from surprisingly few p measurements of \({I}_{G}\) as described in the Methods section. In our case, a singular value (\({\sigma }_{i}\)) represents the contribution of each feature of \({R}_{G,\lambda }\). To determine the optimal number of sensors p or, alternatively, distinct gate voltage values for measurements, we followed methodology similar to that used by ref. 34. through QR decomposition and column pivoting. By gradually decreasing the p value from 81 to 9 and comparing the mean square error (\({{{{{\rm{MSE}}}}}}=\frac{1}{n}{\sum }_{i=1}^{n}{({I}_{G}-{\widetilde{I}}_{G})}^{2}\)), where \({\widetilde{I}}_{G}\) represent the reconstructed photocurrent from the p sensors, \({I}_{G}\) is the original photocurrent curve, and n = 81. Figure 4a shows the singular values \({\sigma }_{r}\) and the optimal modal is noted to occur for this system at \(r=9\), capturing 99% of the main features of \({R}_{G,\lambda }\) (\(\frac{\mathop{\sum }\nolimits_{i=1}^{r}{\sigma }_{i}}{\mathop{\sum }\nolimits_{i=1}^{n}{\sigma }_{i}}\times 100\)). Figure 4b, c shows measurement matrices for a random and optimized sampling obtained by QR decomposition and column pivoting. The reconstructed photocurrents versus gate voltage\(\,{\widetilde{I}}_{G}\) from a random and optimized sampling for \(p=9\) are shown in Fig. 4d. Compressed sensing leads to a more accurate reconstruction of the measured photocurrent than the randomly sampled system. One can also see that the estimated error for the optimized sampling is much smaller than that for the randomly selected one (Fig. 4e). Our results demonstrate that compressed sensing enables us to reconstruct the photocurrent versus gate voltage from merely 9 selected points (minimum 9 sensors) out of a total of 81, which is around 12% of our original sampling. The optimized sampling corresponds to gate voltages located where the first derivative \({{{{{\rm{d}}}}}}I/{{{{{\rm{d}}}}}}{V}_{{{{{{\rm{g}}}}}}}\) shows the largest variation (Fig. 4b, c). To ensure accurate compressed sensing, as shown in Fig. 4f, we reconstructed our spectrum using random and optimized sampling with elastic net regression as described in the Methods section. We observed that the spectrum reconstructed from the optimized sampling agrees well with the measured reference spectrum, whereas the reconstruction from random sampling shows an erroneous spectrum. Furthermore, we demonstrate that we can reconstruct the spectrum of a red LED with only 9 points, with very little difference compared to the reconstructed spectrum with \(n=81\) and the reference spectrum (Fig. 4g).
We compared our 2D heterostructure spectrometer with other miniaturized spectrometers in terms of their footprints, spectral range, and resolution, as shown in Fig. 4h (see Supplementary Table 1 for details). Compared to separate optical elements, 2D materials-based spectrometers offer distinct advantages in terms of footprint miniaturization7,11,15. Our device has a small footprint of 19 μm and an enhanced spectral resolution of 5 nm, making it comparable to state-of-the-art visible and near-infrared spectrometers. Here, the maximum length along any axis of the heterostructure is considered to be the device footprint. The device has an area of ~220 μm2. Furthermore, the footprint of a 2D materials-based device can be scaled down to sub-micrometer dimensions, and the resolution can be further improved by increasing wavelength sampling points. Our device also has an advantage in processing speed over other computational spectrometers due to the compressed sensing techniques employed. While the spectrum reconstruction capability of our device relies on the nature of SnS2 and ReSe2 with trap states, this approach can be extended to other 2D materials by intentionally introducing trap states34 to expand the spectral range.
Spectral imaging and image memory demonstration
To demonstrate the potential application of our single heterostructure spectrometer for spectral imaging, we designed a spatial scanning system for the device (Fig. 5a). A broadband light source was used to project an image consisting of red, green, blue, and yellow colors, which could be scanned across the x-y plane on the centimeter scale. The reflected light was focused by a lens onto the device, and we measured the photocurrents of each mapping step. The reflected spectrum was then reconstructed using the method discussed above. The reconstructed spectra at two positions indicated in Fig. 5a are shown in Fig. 5b, which are in good agreement with the corresponding reference spectra. All the measured photocurrents were grouped into a three-dimensional \(I(x,y,G)\) data cube (Fig. 5c, e), which was then converted to a spectral data cube \(P(x,y,\lambda )\) by the reconstruction algorithm (Fig. 5d, f). By applying standardized color-matching functions to the spectral cube, we were able to form a pseudocolored image (Fig. 5h) with an accurately recreated colored “BIT” pattern, which was consistent with the original image (Fig. 5g). In this configuration, the image resolution is defined by the mapping step, which was set to around 1 cm. By fabricating device arrays, we could produce large-scale imaging systems with the single-heterostructure device possessing high spatial resolution at the micrometer or nanometer scale35. Our results demonstrate the potential of our single heterostructure spectrometer in spectral imaging, with the ability to accurately reconstruct the reflected spectrum of a colored image. The device’s high spatial resolution at the micrometer or nanometer scale15, when integrated into device arrays, opens up possibilities for large-scale imaging systems.
We have demonstrated the light detection, spectrum reconstruction, and spectral imaging capabilities of our single-heterostructure device, which can also be achieved in other systems such as quantum dots5,12, nanowires14,18, black phosphorus7 and MoS2/WSe2 heterojunctions15. However, our SnS2/ReSe2 device has a unique feature in producing a gate-tunable photocurrent via trap states at the interface, offering a tantalizing route for the design of image memory36,37. In Fig. 6a, we show the time-dependent variation of current in the device when applying laser illumination and gate pulses. After being illuminated by a 635 nm laser, the current immediately increases sharply and then gradually approaches a set value, indicating a long-term positive persistent photoconductivity (PPC) effect in our device attributed to trap states at the interface38,39(see Supplementary Note 1 for details). To further investigate the time evolution of the PPC as well as the switching action, we used laser pulses (pulse-width ~0.1 s), instead of continuous laser illumination, to excite the photocurrent in the device. As expected, after applying the laser pulses, a large quantity of carriers is produced in the device, leading to a rise in the current (Fig. 6b). The carriers are easily retained beyond the timeframe of minutes in dark conditions, completing a program operation. This state is defined as the ‘optical program state’. These carriers can be eliminated by applying a positive gate pulse, that is, an erase operation, setting the current back to its initial value, which is defined as the ‘electrical erase state’. Figure 6c shows the retention characteristic of the program and the erase state. It is found that the programming and erasing current are clearly retained after 104 s, though a slight decline appears to occur for t < 10 s, after which the current stabilizes (Supplementary Fig. 15). An endurance test of repeated programming and erasing operation was also performed, of which the results are shown in Fig. 6d. It can be observed that both the program and the erase states remain stable even after 1000 cycles. However, such a strong memory effect indicates a slow response speed in our detector. This problem can be simply solved by changing the detection mode from the ‘memory mode’ to the ‘fast mode’ (Fig. 6e, f). At Vds = 0, our device shows a remarkable short-circuit current and a fast response speed (response time ~0.43 ms, Supplementary Fig. 16). This characteristic essentially enables our device to adapt to different application scenarios. To demonstrate its imaging memory capacity, we performed a proof-of-concept demonstration using three different lasers and scanning masks with different patterns in Fig. 6g. We show that the photocurrent at each mapping position can be used to reconstruct the incident light spectra and can also be coherently stored in the device for a long period of time (Fig. 6h), confirming the imaging memory capacity of our device.
Neuromorphic computing spectroscopy
Optical memory effects have been reported by ref. 40. We would like to stress that our device’s memory function is due to interface trap states, making it promising for applications in artificial synapses41, neural networks38,42, machine vision42, and imaging processing43. To demonstrate the multifunctionality of our compact spectrometer, which not only serves as a storage device but also possesses processing capabilities. We applied periodic light pulses (Pin ~ 10 mW/cm2, pulse-width ~1 s) to produce an increment in the conductivity, leading to multiple memory states for data storage. Subsequently, by applying periodic gate voltage pulses (amplitude ~5 V, pulse-width ~2 s), we could decrement the conductivity, thus performing erasure the stored states (Fig. 7a). In this context, the increase and decrease in device conductance are termed as potentiation and depression, respectively. Given that our vdW SnS2/ReSe2 device system changes conductance, it can thus be utilized in a neural network and serve as both a neuron and a synapse. Long-term potentiation (LTP) and depression (LTD) cycles were observed, suggesting that our device mimics the function of a synapse with a nonlinear behavior for training the artificial neural network (ANN) (Fig. 7b and Supplementary Fig. 17). Generally, achieving high classification accuracy often relies on the use of artificial synapses that have linear characteristics. However, in our case, we rely on non-linear LTP induced by blue light stimuli and LTD by voltage gate pulses. To attain a high classification accuracy, it is essential to consider the inherent asymmetric non-linearity of our LTP and LTD as well as considering the complete plasticity range represented by the ratio Imax/Imin. To accomplish this, we used an asymmetric nonlinear relationship to fit the LTP and LTD curves, thereby deriving the nonlinearity (NL) and the weight change of the LTP and LTD, the details are further discussed in Supplementary Note 3. Moreover, the long-term potentiation shape shows a dependency on the incident light, suggesting the possibility of reconstructing the spectrum of incident light with a defined number of memory cells (Fig. 7c). In this study, we simulated a two-layer ANN based on the SnS2/ReSe2 vdW heterostructures synaptic behavior to classify handwritten data on the MNIST data (Fig. 7d). Details of the training process can be found in the Methods section. Figure 7e, f presents the classification accuracies as function of epoch (which represents a single iteration over the complete training dataset) and varying the numbers of synaptic states (ranging from 10 to 40 states). As the synaptic states increase from 10 to 40, the classification accuracy exhibits a gradual improvement, starting at 87% and nearly reaching 90% after just 50 epochs with 40 states. Furthermore, it is noteworthy that employing a greater number of synaptic states results in shorter training times. In Fig. 7f, we have represented the confusion matrix that demonstrates the classification accuracy for each label.
Discussion
In-sensor storage and processing capabilities are important for next-generation sensing, but also optical sensing is becoming more reliant on computational systems44. For such technological changes to become a reality, apart from device reconfigurability, advanced algorithms, would be required to reduce the physical complexity of sensors. Therefore, it is important to develop device concepts that can do more with less, with designs that can enable direct multiplexing of sensing and computing functions45. Here, we showed that a single SnS2/ReSe2 van der Waals heterostructure, can provide photodetection, spectrum reconstruction, spectral imaging, and long-term image memory capabilities. By applying light pulses and gate voltage pulses, our miniaturized spectrometer can realize image-encoding and -classification functions based on artificial neural networks. Although, our approach can potentially overcome the limitations of present single-device systems and pave the way for the design of single-detector computational spectrometers beyond von Neumann architectures. This breakthrough could possibly impact the field of optoelectronics, with applications ranging from artificial synapses, neural networks, machine vision, and imaging processing, to spectroscopy and analytical chemistry.
Methods
Device fabrication and characterization
For the fabrication of the vdW heterostructures, a highly n-doped silicon wafer with a 300-nm-thick SiO2 layer was used as the substrate. Heterostructures were fabricated via a standard dry transfer method46. Two types of multilayer vdW materials, ReSe2 and SnS2, were obtained by mechanical exfoliation onto PDMS stamps with scotch tape. Then, they were released onto the prepared substrate to form vertically stacked vdW heterostructures. The heterostructures were annealed in a furnace at 150 °C for 2 h under an Ar (200 sccm) atmosphere to achieve better contact. For the patterning of the electrodes, we utilized standard photolithography and high-vacuum electron-beam evaporation. The thickness of the deposited Ti/Au electrodes was 10/40 nm, respectively. Raman spectra were acquired with a Bruker Senterra confocal spectrometer with an excitation wavelength of 532 nm to identify the properties of SnS2 and ReSe2 as well as their heterostructures. Atomic force microscopy characterization was performed with a Bruker MM8 system and HRTEM characterization was performed using a JEOL JEM-2100 F with a probe size of less than 0.5 nm at a working voltage of 200 kV.
Reconstruction process
Before spectrum reconstruction, the spectral responsivity matrix \({R}_{G,\lambda }\) was decomposed by RPCA (robust principal component analysis) into a structured low–rank matrix \({\widetilde{R}}_{G,\lambda }\) and a sparse matrix \({S}_{G,\lambda }\), thus discarding the outliers and noise as shown in Supplementary Figs. 10 and 11:
where the principal components of \({\widetilde{R}}_{G,\lambda }\) are robust to the outliers and the noise in \({S}_{{V}_{G},\lambda }\) matrix. We observe that the \({S}_{{V}_{G},\lambda }\) sparse matrix is one to two orders of magnitude lower than the \({\widetilde{R}}_{G,\lambda }\) spectral matrix, and the original spectral matrix RG, λ. In order to reconstruct the unknown spectrum, we use the elastic net regression that minimizes the sum of squared errors by applying a penalty to these coefficients which is a combination of \({\ell }_{1}\) and \({\ell }_{2}\) (Lasso and Ridge) approaches. From Eq. (4), we can see that if α is equal to 1, elastic net regression is the same as Lasso regression. As α decreases toward 0, it approaches the Ridge regression. In our reconstruction, we observe a small \(\alpha\) (0.01), meaning that we are close to Tikhonov regularization. However, we observe that adding a \({\ell }_{1}\) penalization term provides us with a slightly better reconstruction than the Ridge regression alone:
where λ is the amount of penalization, which is chosen by cross-validation.
Compressed sensing
The photocurrent values as function of gate voltage \({{{{{{\bf{I}}}}}}}_{G}\in {{\mathbb{R}}}^{n}\) can be represented as a sparse vector \({{{{{\bf{s}}}}}}\in {{\mathbb{R}}}^{n}\) in a transform basis \(\varPsi \in {{\mathbb{R}}}^{n\times n}\):
Using compressed sensing, it is possible to effectively achieve full spectrum reconstruction from surprisingly few p measurements instead of directly measuring \({{{{{{\bf{I}}}}}}}_{G}\in {{\mathbb{R}}}^{n}\) (which requires n measurements). These few p measurements, denoted as \({{{{{{\bf{I}}}}}}}_{{Gp}}\in {{\mathbb{R}}}^{p}\), can then be used to solve the non-zero elements of the transformed sparse vector s. The relationship between the measurements \({{{{{{\bf{I}}}}}}}_{{Gp}}\in {{\mathbb{R}}}^{p}\) and the compressible signal \({{{{{{\bf{I}}}}}}}_{{Gn}}\in {{\mathbb{R}}}^{n}\) is given by the Eq. (6):
Where, the measurement matrix \(C\in {{\mathbb{R}}}^{p\times n}\) represents a set of p (sensors) measurements at specific gate voltages.
By combining Eqs. (5) and (6), we obtain the relationship between the compressed measurement \({{{{{{\bf{I}}}}}}}_{{Gp}}\) and the sparse vector s:
In this work, a singular value decomposition technique47,48,49 was used to achieve a highly transformative basis. To do this, we first extracted the low-dimensional pattern of the spectral responsivity matrix \({R}_{G,\lambda }\) through singular value decomposition, leading to a tailored library \({\varPsi }_{r}\in {{\mathbb{R}}}^{n\times r}\), containing the first r columns of Ψ (features or eigenmodes):
The diagonal elements of the matrix \({\varSigma }_{r}\) are the singular values (\({\sigma }_{i}\)) of \({R}_{G,\lambda }\). The rank r is chosen by optimal hard thresholding to capture the main features and to avoid residual noise in the data50.
Based on the work of ref. 51, in order to find the optimum measurement matrix C, the best possible full reconstruction \({\mathop{I}\limits^{ \sim }}_{G}\,\)(n = 81) is performed by seeking the row of \({\varPsi }_{r}\) corresponding to the best location in the G row space of \({\varPsi }_{r}\) that optimally condition the inversion of \(C{\varPsi }_{r}\). To select the optimum row in the \({\varPsi }_{r}\) tailored basis, we used reduced matrix QR factorization with column pivoting, enabling the decomposition of \({\varPsi }_{r}\) into a unitary matrix Q, upper-triangular matrix R and a column of permutation matrix C such that \({\varPsi }_{r}^{T}{C}^{T}={QR}\), when the number of p sensors is equal to rank r. In the case of the oversampled (p > r), where the number of p exceeds the number of features (eigenmodes) used in the reconstruction52,53, we use the following relationship \({\varPsi }_{r}{\varPsi }_{r}^{{{{{{\rm{T}}}}}}}{C}^{{{{{{\rm{T}}}}}}}={QR}\). After knowing \({\varPsi }_{r}\) and the C matrix, we are able to approximate the sparse vector s with the Moore–Penrose pseudo-inverse \({{{{{\bf{s}}}}}}={\varTheta }^{{{\dagger}} }{{{{{{{\boldsymbol{I}}}}}}}_{G}}_{p}={(C{\Psi }_{r})}^{{{\dagger}} }{{{{{{{\bf{I}}}}}}}_{G}}_{p}\) for \(p > r\) or the inverse \({{{{{\bf{s}}}}}}={\varTheta }^{-1}{{{{{{{\bf{I}}}}}}}_{G}}_{p}={(C{\varPsi }_{r})}^{-1}{{{{{{{\bf{I}}}}}}}_{G}}_{p}\) for \(p=r\). Finally, when the sparse vector s is known, we can reconstruct the photocurrent \({\mathop{I}\limits^{ \sim }}_{G}\) from the Eq. (5).
Neuromorphic computing
To demonstrate the neuromorphic computing capabilities based on our vdW SnS2/ReSe2 devices, which function as both memory and synapses, we employed a simple neural network for a multiclass classification problem. As depicted in Fig. 7d, the neural network is composed of two layers: an input layer with a dimension of 784 (representing each pixel in the 28 × 28 images), and an output layer with 10 neurons, each dedicated to recognizing a specific label (\({f}_{m,n}\)). We trained and tested our neural network by using the MNIST dataset, which contains handwritten digits images (0, 1,…,9).
The training dataset consists of 60,000 images, while the testing dataset contains 10,000 images. During the training process, each input neuron in the input layer receives the corresponding pixel value from the image, assigns it to input vector (\({{{{{{\bf{X}}}}}}}_{i}\)), and converts it into 10 outputs values using the linear relation represented as \({\varSigma }_{n}={\sum }_{i=1}^{784}{{{{{{\bf{X}}}}}}}_{i}{W}_{i,n}\), where \({W}_{i,n}\) denotes the synaptic weight matrix. Initially, the weight matrix was randomly initialized based on our vdW SnS2/ReSe2 synaptic states. To determine the direction of weight updates, the output values \({\varSigma }_{n}\) were transformed by using a Softmax activation function \((\sigma {(\varSigma )}_{i}=\frac{{e}^{{\varSigma }_{i}}}{{\varSigma }_{j=1}^{K}{e}^{{\varSigma }_{j}}})\), resulting in a probability distribution denoted as (\({O}_{m,n}\)). When we compare the label value (\({f}_{m,n}\)) of each image ‘m’ with the probability distribution, it allows us to calculate the delta value \({\delta }_{m,n}={O}_{m,n}-{f}_{m,n}\)). If \({\delta }_{m,n}\) is greater than 0, the synaptic weight (w) is increased; otherwise, the synaptic weight is decreased. The magnitude of the weight changes (\(\triangle w\)) is determined by the fitting formulas (Supplementary Note 3).
Data availability
The data that support the findings of this study are available from the corresponding author upon request. Source data are provided in this paper. Source data are provided with this paper.
Code availability
The code for the simulations are available from the corresponding author upon request. The Code for spectrum reconstruction and neuromorphic computing is provided with the Source Data.
References
Yang, Z., Albrow-Owen, T., Cai, W. & Hasan, T. Miniaturization of optical spectrometers. Science 371, 480 (2021).
Bacon, C. P., Mattley, Y. & DeFrece, R. Miniature spectroscopic instrumentation: applications to biology and chemistry. Rev. Sci. Instrum. 75, 1–16 (2003).
Uhmann, W., Becker, A., Taran, C. & Siebert, F. Time-resolved FT-IR absorption spectroscopy using a step-scan interferometer. Appl. Spectrosc. 45, 390–397 (1991).
le Coarer, E. et al. Wavelength-scale stationary-wave integrated Fourier-transform spectrometry. Nat. Photonics 1, 473–478 (2007).
Bao, J. & Bawendi, M. G. A colloidal quantum dot spectrometer. Nature 523, 67–70 (2015).
Yesilkoy, F. et al. Ultrasensitive hyperspectral imaging and biodetection enabled by dielectric metasurfaces. Nat. Photonics 13, 390–396 (2019).
Yuan, S., Naveh, D., Watanabe, K., Taniguchi, T. & Xia, F. A wavelength-scale black phosphorus spectrometer. Nat. Photonics 15, 601–607 (2021).
Redding, B., Liew, S. F., Sarma, R. & Cao, H. Compact spectrometer based on a disordered photonic chip. Nat. Photonics 7, 746–751 (2013).
Pohl, D. et al. An integrated broadband spectrometer on thin-film lithium niobate. Nat. Photonics 14, 24–29 (2020).
Wang, Z. et al. Single-shot on-chip spectral sensors based on photonic crystal slabs. Nat. Commun. 10, 1020 (2019).
Deng, W. et al. Electrically tunable two-dimensional heterojunctions for miniaturized near-infrared spectrometers. Nat. Commun. 13, 4627 (2022).
Grotevent, M. J. et al. Integrated photodetectors for compact Fourier-transform waveguide spectrometers. Nat. Photonics 17, 59–64 (2023).
Tittl, A. et al. Imaging-based molecular barcoding with pixelated dielectric metasurfaces. Science 360, 1105–1109 (2018).
Yang, Z. et al. Single-nanowire spectrometers. Science 365, 1017–1020 (2019).
Yoon, H. H. et al. Miniaturized spectrometers with a tunable van der Waals junction. Science 378, 296–299 (2022).
Kita, D. M. et al. High-performance and scalable on-chip digital Fourier transform spectroscopy. Nat. Commun. 9, 4405 (2018).
Faraji-Dana, M. et al. Compact folded metasurface spectrometer. Nat. Commun. 9, 4196 (2018).
Meng, J., Cadusch, J. J. & Crozier, K. B. Detector-only spectrometer based on structurally colored silicon nanowires and a reconstruction algorithm. Nano Lett. 20, 320–328 (2020).
Behura, S. K., Wang, C., Wen, Y. & Berry, V. Graphene–semiconductor heterojunction sheds light on emerging photovoltaics. Nat. Photonics 13, 312–318 (2019).
Akinwande, D. et al. Graphene and two-dimensional materials for silicon technology. Nature 573, 507–518 (2019).
Wu, P. et al. Next-generation machine vision systems incorporating two-dimensional materials: progress and perspectives. InfoMat 4, e12275 (2022).
Amer, M. & Maul, T. A review of modularization techniques in artificial neural networks. Artif. Intell. Rev. 52, 527–561 (2019).
Chai, Y. In-sensor computing for machine vision. Nature 579, 32–33 (2020).
Liu, C. et al. Two-dimensional materials for next-generation computing technologies. Nat. Nanotechnol. 15, 545–557 (2020).
Huang, Y. et al. Tin disulfide-an emerging layered metal dichalcogenide semiconductor: Materials properties and device characteristics. ACS Nano 8, 10743–10755 (2014).
Kim, S. et al. Gate-switchable rectification in isotype van der Waals heterostructure of multilayer MoTe2/SnS2 with large band offsets. npj 2D Mater. Appl 4, 7 (2020).
Jo, S. H. et al. Broad detection range rhenium eiselenide photodetector enhanced by (3-aminopropyl)triethoxysilane and triphenylphosphine treatment. Adv. Mater. 28, 6711–6718 (2016).
Wolverson, D., Crampin, S., Kazemi, A. S., Ilie, A. & Bending, S. J. Raman spectra of monolayer, few-layer, and bulk ReSe2: An anisotropic layered semiconductor. ACS Nano 8, 11154–11164 (2014).
Guo, Q. S. et al. Black phosphorus mid-infrared photodetectors with high gain. Nano Lett. 16, 4648–4655 (2016).
Fang, H. & Hu, W. Photogating in low dimensional photodetectors. Adv. Sci. 4, 1700323 (2017).
Proakis, J. G. & Manolakis, D. G. Digital signal processing. Principles, Algorithms, and Applications 3rd edn (Prentice-Hall Inc., 1996).
Shannon, C. E. A mathematical theory of communication. Bell Syst. Tech. J. 27, 623–656 (2001).
Nyquist, H. Certain topics in telegraph transmission theory. Trans. Am. Ins. Electr. Eng. 47, 617–644 (1928).
Liao, F. et al. Bioinspired in-sensor visual adaptation for accurate perception. Nat. Electron. 5, 84–91 (2022).
Tseng, E. et al. Neural nano-optics for high-quality thin lens imaging. Nat. Commun. 12, 6493 (2021).
Roy, K. et al. Graphene-MoS2 hybrid structures for multifunctional photoresponsive memory devices. Nat. Nanotechnol. 8, 826–830 (2013).
Jeon, S. et al. Gated three-terminal device architecture to eliminate persistent photoconductivity in oxide semiconductor photosensor arrays. Nat. Mater. 11, 301–305 (2012).
John, R. A. et al. Optogenetics inspired transition metal dichalcogenide neuristors for in-memory deep recurrent neural networks. Nat. Commun. 11, 3211 (2020).
Seo, S. et al. An optogenetics-inspired flexible van der Waals optoelectronic synapse and its application to a convolutional neural network. Adv. Mater. 33, 2102980 (2021).
Xiang, D. et al. Two-dimensional multibit optoelectronic memory with broadband spectrum distinction. Nat. Commun. 9, 2966 (2018).
Luo, Z.-D. et al. Artificial optoelectronic synapses based on ferroelectric field-effect enabled 2D transition metal dichalcogenide memristive transistors. ACS Nano 14, 746–754 (2020).
Jang, H. et al. An atomically thin optoelectronic machine vision processor. Adv. Mater. 32, 2002431 (2020).
Lee, S., Peng, R., Wu, C. & Li, M. Programmable black phosphorus image sensor for broadband optoelectronic edge computing. Nat. Commun. 13, 1485 (2022).
Ballard, Z., Brown, C., Madni, A. M. & Ozcan, A. Machine learning and computation-enabled intelligent sensor design. Nat. Mach. Intell. 3, 556–565 (2021).
Yuan, S. et al. Geometric deep optical sensing. Science 379, eade1220 (2023).
Castellanos-Gomez, A. et al. Deterministic transfer of two-dimensional materials by all-dry viscoelastic stamping. 2D Mater. 1, 011002 (2014).
Brunton, S. L., Tu, J. H., Bright, I. & Kutz, J. N. Compressive sensing and low-rank libraries for classification of bifurcation regimes in nonlinear dynamical systems. SIAM J. Appl. Dyn. Syst. 13, 1716–1732 (2014).
Bai, Z. et al. Low-dimensional approach for reconstruction of airfoil data via compressive sensing. AIAA J. 53, 920–933 (2015).
Bright, I., Lin, G. & Kutz, J. N. Compressive sensing based machine learning strategy for characterizing the flow around a cylinder with limited pressure measurements. Phys. Fluids 25, 127102 (2013).
Gavish, M. & Donoho, D. L. The optimal hard threshold for singular values is 4/\(\sqrt{3}\). IEEE Trans. Inf. Theory 60, 5040–5053 (2014).
Manohar, K., Brunton, B. W., Kutz, J. N. & Brunton, S. L. Data-driven sparse sensor placement for reconstruction: demonstrating the benefits of exploiting known patterns. IEEE Control. Syst. Mag. 38, 63–86 (2018).
Drmač, Z. & Gugercin, S. A new selection operator for the discrete empirical interpolation method—Improved a priori error bound and extensions. SIAM J. Sci. Comput. 38, A631–A648 (2016).
Heck, L. P., Olkin, J. A. & Naghshineh, K. Transducer placement for broadband active vibration control using a novel multidimensional QR factorization. J. Vib. Acoust. 120, 663–670 (1998).
Sun, H. et al. In situ formed gradient bandgap‐tunable perovskite for ultrahigh‐speed color/spectrum‐sensitive photodetectors via electron‐donor control. Adv. Mater. 32, 1908108 (2020).
Guo, L. et al. A single‐dot perovskite spectrometer. Adv. Mater. 34, 2200221 (2022).
Shinoda, K. & Ohtera, Y. Alignment-free filter array: snapshot multispectral polarization imaging based on a Voronoi-like random photonic crystal filter. Opt. Express 28, 38867–38882 (2020).
Koshelev, A. et al. Combination of a spectrometer-on-chip and an array of Young’s interferometers for laser spectrum monitoring. Opt. Lett. 39, 5645–5648 (2014).
Nitkowski, A., Chen, L. & Lipson, M. Cavity-enhanced on-chip absorption spectroscopy using microring resonators. Opt. Express 16, 11930–11936 (2008).
Acknowledgements
This work was supported by the National Natural Science Foundation of China (No. 62374017, 61874010) and the Science and Technology Innovation Program for Creative Talents in Beijing Institute of Technology (No. 2017CX01006). C.-R.C. thanks the support of the National Science and Technology Council Taiwan (R.O.C.), under grant no. NSTC 112-2112-M-033-009.
Author information
Authors and Affiliations
Contributions
H.C.W. designed the experiment. G.W. fabricated the devices and carried out the electrical measurements. M.A. and M.Z. performed the spectrum reconstruction. J.C. and M.C. conducted the TEM characterization. C.ÓC., K.M.H., C.R.C., and I.V.S. analyzed the data. H.C.W. and G.W. wrote the article. All authors discussed the results and commented on the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Peer review
Peer review information
Nature Communications thanks Du Xiang and the other, anonymous, reviewers for their contribution to the peer review of this work. A peer review file is available.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Source data
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Wu, G., Abid, M., Zerara, M. et al. Miniaturized spectrometer with intrinsic long-term image memory. Nat Commun 15, 676 (2024). https://doi.org/10.1038/s41467-024-44884-1
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41467-024-44884-1
This article is cited by
-
Two-dimensional materials for future information technology: status and prospects
Science China Information Sciences (2024)
Comments
By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.