## 3 Experiment and Validation of the Proposed Method  
### Experiment Setup  
All data in this paper are from the public dataset. A system diagram of methane sensor arrays is shown in Figure 3a. The experimental system is mainly composed of six parts:  
Figure 2: Illustration of the architecture of dot-product and Gaussian-linearized attention. the gas circuit part, the gas chamber part, the fault transmitter, the communication module, and the host computer. The air path part includes a standard air bag; the air chamber part includes five parts: sensor array, environmental sensor, humidifier, heater, and condensation device. The environmental stress simulator includes a vibration generator and a sway generator. The fault transmitter includes a program-controlled relay, program-controlled potentiometer, and program-controlled voltage device. The communication module realizes two-way communication and data transmission with the host computer. The host computer is the main platform of the test system, which is responsible for sending down control commands and receiving all kinds of temperature, humidity, air pressure, vibration, sway, and gas concentration detection information from the communication module, collecting sensor array output signals, extracting characteristic information, and processing fault data. The structure of the sensor signal pickup circuit is shown in Figure 3b. The MQ-6 gas sensor cylinder core structure is shown in Figure 3c. The program was run on a 2.8-GHz Intel CPU with 16 GB of RAM running Windows 10. In the fault-diagnosis task, the original curve of sensor fault data is shown in Figure 4. A total of 9 primary failure types and methane background gas were tested, i.e., heating wire disconnection irregularly (HWDI) fault, heating wire disconnection (HWD) fault, exfoliation of sensitive body irregularly (ESBI) fault, and exfoliation of sensitive body (ESB) fault, HWDI+HWD, ESBI+ESB, ESBI+HWD, offset fault (OF), partial exfoliation of the sensitive body (PESB), and normal. Figure 3: **(a)** Experimental system diagram for methane gas sensor array; **(b)** Gas sensor circuit diagram; **(c)** The pictures of methane gas sensor. The methane gas curves were combined with six fault models, as shown in Table S1. There are 6 models of fault diagnosis patterns, all of which are based on methane gas. In the real working conditions of the methane sensor array, the types of failures are extremely complex. Considering that there is no single fault in the methane sensor array under actual conditions, different sensors may have different failures at the same time. Therefore, we added different faults in each pattern to simulate the situation under actual conditions. Our six fault-diagnosis models are as complex as real conditions, which can be equivalent to the fault\(-\)diagnosis task in a real situation. The noise information and sway information were also added in the background state to simulate the complex environment. There were 37,200 pieces of training and test data for each failure mode. The sensors' fault diagnosis task data are shown in Figure S2. From Figure S2, the data are slightly different for each model. The correlation between sensors of the fault diagnosis task is shown in Figure S3. From Figure S3, each sensor has a certain similarity with other sensors, which generally occurs in real situations, and it also increases the difficulty of the sensor fault diagnosis. Regarding the fault\(-\)prediction task, considering the actual working conditions, it would have improved the work efficiency and saved costs to detect the methane sensor failure in the early stage and replace the sensor in time. The data are derived from the sensor ESBI situation, and as the failure occurs, the failure time increases and the interval decreases until an ESB occurs. The data are composed of 6000 points, the first peak is the early warning of failure under actual working conditions, in order to alert the staff to the occurrence of the sensor fault.