To further investigate the phenomenon, we measured the excitatory postsynaptic current (EPSC) responses induced by ammonia (NH
3) concentrations of 1, 5, 10, 30, 50, and 100 ppm, and observed the transition from STP to LTP. The results indicate that both the peak current and the steady-state current exhibited an increasing trend with increasing NH
3 concentration, suggesting that higher NH
3 levels elicit stronger neural excitatory currents. Through the gradual augmentation of NH
3 concentration, the transition from STP to LTP was distinctly observable. This transition not only reflects an enhancement in synaptic weight associated with LTP but also corresponds to a marked increase in the EPSC peak, thereby enhancing memory retention capabilities. Essentially, whether through elevated NH
3 concentration, prolonged exposure duration, or enhanced light irradiation, an increase in the number of light-induced electron–hole pairs leads to a subsequent rise in EPSC levels. This transition from STP to LTP is visually represented in Fig.
2H and Fig. S9A to I. In our investigation of LTP dynamics, we also manipulated the pulse numbers of NH
3 exposure to validate the LTP characteristics, as shown in Fig.
2I and Fig. S10A to F. This modulation holds important importance in simulating the learning and memory attributes of biological systems [
40–
43]. Our system demonstrated an important increase in both EPSC values and holding currents when subjected to multiple gas pulses. Specifically, following a series of 50 gas stimuli, our synapse exhibited substantial EPSC peaks of 576.57 μA, with a notable holding current of 344.49 μA sustained even 50 s after stimulation. These results effectively model the synaptic weight modulation process, achieving the transition from STP to LTP through iterative training, which closely resembles the behavior of native biological synapses. The transition between these 2 behavioral states can be attributed to the increased capture of electrons in contact with NH
3, as the concentration of gas, pulse duration, or pulse frequency rises. Consequently, a longer time is required to neutralize the carriers within the depletion layer after the gas source is removed [
44,
45]. The unique selectivity of the prepared olfactory system for NH
3 was determined by testing the STP/LTP characteristics of 100 ppm NO
2, H
2, CO
2, and CO for different pulse numbers, and the results are shown in Figs. S11 to S14. The exceptional selectivity of the MXene@SnS
2@PANI composite toward NH
3 can be attributed to the synergistic effects of material composition and interfacial energy band alignment. PANI, as a p-type semiconductor, exhibits a strong affinity toward electron-donating gases such as NH
3 due to its protonation–deprotonation mechanism. Upon exposure to NH
3, the deprotonation of PANI leads to a decrease in hole carriers, thereby modulating the conductance. Meanwhile, the n-type SnS
2 and highly conductive MXene framework facilitate efficient electron transfer, enhancing the sensitivity and response dynamics. The heterojunction formed at the MXene@SnS
2/PANI interface further promotes charge separation and provides a tailored energy barrier that preferentially interacts with NH₃ molecules over other gases such as NO
2, H
2, CO
2, and CO. This selective interaction is corroborated by the distinct STP/LTP behaviors observed under NH
3 exposure compared to other gases (Figs. S11 to S14), underscoring the role of both chemical affinity and electronic structure in governing gas selectivity. For reducing gases (NH
3 and H
2), the primary interaction occurs with the p-type PANI component. As electron donors, these gases increase the electron concentration in PANI. This hole injection widens the depletion layer at the heterojunction interface, as described for NH₃. To maintain charge neutrality, this prompts an injection of holes from the n-type MXene@SnS
2 into PANI. For the oxidizing gas (NO
2), the interaction mechanism differs. NO
2, a strong electron acceptor, primarily interacts with the n-type MXene@SnS
2 component. Upon adsorption, NO
2 molecules extract electrons from the conduction band of MXene@SnS
2. To compensate for this electron loss, electrons are injected from the PANI side into MXene@SnS
2. Crucially, the injection of electrons from PANI is equivalent to the injection of holes in the opposite direction (from MXene@SnS
2 into PANI). This process similarly increases the positive space charge on the PANI side and the negative space charge on the MXene@SnS
2 side, leading to a widening of the depletion layer. Therefore, although their chemical properties are opposite, both of these gases will trigger the same response.