Adapter and prompt combined fine tuning method applied to distributed optical fiber sensing
By introducing a joint fine-tuning method of adapter and cue vector in a distributed optical fiber sensing system, the problems of computing resources and data dependence in the prior art are solved, the generalization ability and recognition accuracy of the model are improved, and the storage cost is reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ARTIFICIAL INTELLIGENCE INNOVATION RES INST OF ZHEJIANG UNIV OF TECH BINJIANG DISTRICT HANGZHOU
- Filing Date
- 2025-12-05
- Publication Date
- 2026-04-21
AI Technical Summary
Existing distributed fiber optic sensing technology has high computational resource requirements, relies on large-scale training data, and has weak generalization ability in signal recognition, resulting in high model deployment costs and limited applicability.
We employ the Adapter and Cue Joint Fine-Tuning (APT) method, which optimizes the network structure by introducing adapter modules and learnable visual cue vectors into the model. This enables efficient parameter fine-tuning, reduces storage costs, and improves the model's generalization ability.
It effectively improves the generalization and recognition accuracy of the model for downstream tasks, reduces the amount of labeled data, and significantly reduces storage costs.
Smart Images

Figure CN121904544A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of adapter and prompt joint fine-tuning method and distributed optical fiber sensing technology, and more specifically, relates to an adapter and prompt joint fine-tuning method applied to distributed optical fiber sensing. Background Technology
[0002] Since the 1980s, the development of new sensing technologies has attracted much attention, among which phase-sensitive optical time-domain reflectometers are a key area of research. Distributed fiber acoustic sensing (DAS) technology achieves continuous distributed measurement of sound waves, strain, and vibration signals by detecting phase changes in Rayleigh backscattering in optical fibers. It can also accurately locate events and capture dynamic characteristics by analyzing signal delay and phase features. Compared to traditional semiconductor sensors and point-type fiber optic sensors, DAS technology has unique advantages such as distributed coverage, long detection distance, high sensitivity, resistance to electromagnetic interference, corrosion resistance, and easy installation. It can reuse existing communication optical fibers to achieve comprehensive continuous monitoring and is currently widely used in oil and gas exploration, intelligent transportation, marine geophysics, earthquake monitoring, and perimeter security, demonstrating broad application prospects.
[0003] However, DAS systems, by merely detecting changes in the intensity or phase of scattered light in optical fibers, struggle to directly distinguish the specific attributes of events. In practical applications, different types of vibrations, shocks, and environmental noise often exhibit high similarity in signal morphology, leading to persistently high false alarm rates. While traditional machine learning methods can extract discriminative features from signals, their performance typically relies on large-scale labeled data and high-performance computing resources. This limitation makes efficient parameter fine-tuning a crucial technical path for deploying models in real-world scenarios.
[0004] In existing technologies, various model fine-tuning and transfer learning schemes have been proposed for distributed fiber optic sensor signal recognition. Tian Kangzhen et al. from Jiangsu Normal University (Reference 1: Distributed Fiber Optic Temperature Sensing Fire Detection Algorithm Based on CNN-LSTM and Attention Mechanism, CN 120808505 A) combined CNN-LSTM spatiotemporal feature extraction and attention mechanism to achieve cross-scene adaptation through pre-training and partial parameter fine-tuning. However, this method still requires updating approximately 50% of the model parameters during the fine-tuning stage, resulting in a large number of parameters and high model storage costs. Sun Qizhen et al. from Huazhong University of Science and Technology (Reference 2: A Cross-Domain Model Transfer Method and System for Fiber Optic Sensor Signal Recognition, CN 117556259 A) proposed a domain adaptation and ensemble model pseudo-label strategy, effectively utilizing unlabeled data and alleviating domain shift and label scarcity problems. However, this method requires training and evaluating the model in multiple rounds, resulting in significant computational and management overhead, which limits its applicability in resource-constrained scenarios. Summary of the Invention
[0005] To overcome the shortcomings of existing technologies and address the problems of high computational resource requirements, reliance on large-scale training data, and weak generalization ability in current DAS signal recognition, this invention provides a joint adapter-based prompt tuning method for distributed fiber optic sensing. Employing the APT (adapter-based prompt tuning) method, it effectively guides the model to generate the desired output by optimizing the adapter module introduced into the network structure and the prompt vector embedded in the input. This addresses the problems existing in the prior art and at least provides a beneficial option or creates favorable conditions.
[0006] The solution to the technical problem of this invention is:
[0007] A method for joint fine-tuning of adapters and prompts for distributed fiber optic sensing includes the following steps:
[0008] Step 1, Data Preparation: Collect signals using a distributed fiber optic sensing system as training samples;
[0009] Step 2, Data Preprocessing: The collected signal samples are preprocessed, including noise reduction, and then the one-dimensional signal is processed into a two-dimensional spatiotemporal graph;
[0010] Step 3, Model pre-training: Using the Masked Autoencoder (MAE) architecture, self-supervised learning is performed on the unlabeled DAS dataset to train a general DAS signal recognition basic model.
[0011] Step 4: Construct the APT fine-tuning architecture: Retain the pre-trained encoder as the backbone network, add learnable visual cue vectors to the input, insert lightweight adapter modules into each layer of the encoder, and add a task-specific classification head;
[0012] Step 5, Adapter and Cue Joint Fine-Tuning: In the downstream task, APT fine-tuning is used to freeze all parameters of the pre-trained encoder and train the cue vectors, adapter, and classification head parameters to achieve efficient parameter fine-tuning;
[0013] Step 6, Testing: Input the DAS signal into the frozen backbone network and the complete model consisting of the trained cue vectors and adapters, and identify the test data.
[0014] Furthermore, in step 1, signal acquisition includes acquiring signals in a laboratory setting, where X is the acquired sample. For the sample of the nth channel at time m,
[0015]
[0016] Furthermore, in step 2, the noise reduction is performed by applying wavelet threshold noise reduction to the acquired signal as follows:
[0017]
[0018] X′ is the denoised sample, where X is the original signal and ψ jk (t) represents the wavelet basis function, j is the scaling parameter, k is the translation parameter, c(j,k) represents the wavelet coefficients after thresholding, and C ψ As a normalization constant, the one-dimensional time signal from multiple channels is processed into a two-dimensional spatiotemporal sample as shown in the following formula, where each column of X′ represents the sampled value of each channel, and each row represents the sampled value at the same time.
[0019]
[0020] in, These are the sampled values at the initial time of the first channel and the nth channel, respectively. These are the sampled values of the first channel and the nth channel at time m, respectively.
[0021] Furthermore, in step 3, MAE pre-training is used. The MAE framework consists of two parts: an encoder and a decoder. The encoder adopts a Visual Transformer (ViT) structure, which processes only unmasked image patches to extract deep semantic features of visible regions. The decoder reconstructs the complete image based on the latent representations. Both the encoder and decoder are composed of stacked multi-level Transformer encoding modules. Each module contains an alternating structure of multi-head self-attention layers (MHSA) and multi-layer perceptrons (MLP). Layer normalization (LayerNorm) is applied before each module, and feature fusion is performed through residual connections.
[0022] Preferably, the input DAS image is divided into m fixed-size image blocks: Among them I j Let represent the j-th image patch, where h and w are the height and width of the image patch, respectively. A set of visible image patches This is a set of randomly masked image patches. Visible image patches. Embedding into the d-dimensional feature space via linear projection:
[0023]
[0024] in, Let d represent the embedding representation of the j-th visible image patch. This represents the set of embeddings of all visible image blocks in the i-th layer of the encoder. A category label x is appended before the embedding sequence. i The input sequence is then fed into an N-layer encoder for processing by adding positional encoding to preserve spatial structure information.
[0025]
[0026] L i This represents the i-th Transformer encoder layer. The class labels in this layer are formed by d-dimensional embedding vectors. After processing through N Transformer encoder layers, we obtain the semantic representation of the visible image patch. While maintaining the original image patch order, With mask mark E n The sequences are concatenated to form a complete sequence. Positional encodings are then added back to this sequence to preserve spatial structure. After processing the sequence, the decoder's output is projected back into pixel space through a linear layer to generate a reconstructed image. During training, the mean squared error reconstruction loss is calculated only for the masked image patches.
[0027] x represents the set of pixels within the occluded area.i and These are the values at pixel i in the original image and the reconstructed image, respectively.
[0028] Furthermore, in step 4, an APT fine-tuning architecture is constructed: the pre-trained encoder is retained as the backbone network, learnable visual prompt vectors are added to the input, and lightweight adapter modules are inserted into each layer of the encoder, along with a task-specific classification head.
[0029] x' l =S·(ReLU(LN(x) l )·W Down )·W Up )+x l ;
[0030]
[0031] The adapter module consists of a dimension reduction projection layer. Upward projection layer The two functions consist of the ReLU activation function and the scaling factor S, with LN representing layer normalization. To add the k-th cue vector to the i-th encoder layer, P i This is the set of cue vectors added before the input of the i-th encoder layer. Further, in step 5, the downstream task uses the APT fine-tuning method to load pre-trained model parameters, adds an adapter to the model structure, and adds cue vectors and a task-specific classifier to the input. During training, the pre-trained model parameters are frozen, and only the added adapter, cue vectors, and classifier are trained. The loss function is calculated as follows:
[0032]
[0033] Where N represents the number of samples and M represents the number of categories. It is the true probability that the nth sample belongs to class c, and This is the model's predicted probability that the sample belongs to category c. The backpropagation gradient descent algorithm is used to optimize the trainable parameters. The pre-trained model, the trained adapter, the cue vector, and the classification head are combined into a new model. The test data is input into the new model to obtain the classification results and evaluate the model's recognition performance. If the performance meets the standard, the model is saved; otherwise, the trainable parameters are optimized until the set conditions are met.
[0034] The beneficial effects of this invention are mainly reflected in the following aspects: First, the APT method can effectively improve the model's generalization ability to downstream tasks and increase the accuracy of recognition; second, the APT method can reduce the amount of label data for downstream tasks; finally, the APT method only saves trainable parameters, which significantly reduces storage costs. Attached Figure Description
[0035] Figure 1 This is a schematic diagram of the method flow of the present invention.
[0036] Figure 2 This is a schematic diagram of a distributed fiber optic sensing system.
[0037] Figure 3 This is a schematic diagram of a floor experiment scenario.
[0038] Figure 4 This is a diagram of the MAE pre-trained model structure.
[0039] Figure 5 This is a schematic diagram of the APT fine-tuning principle.
[0040] Figure 6 A comparison of the recognition accuracy of the APT fine-tuning method with other methods.
[0041] Figure 7 The impact of the scale of pre-training data on downstream tasks.
[0042] Figure 8 This refers to the generalization ability of a pre-trained model to unseen samples. Detailed Implementation
[0043] The invention will be further described below with reference to the accompanying drawings and embodiments.
[0044] Reference Figures 1 to 8 An adapter and cue joint fine-tuning method for distributed fiber optic sensing is proposed. Taking distributed fiber optic sensing gait recognition as an example, this example is based on the gait signal samples collected from four experimenters walking on the floor wearing different shoes. Through APT fine-tuning, different gait samples are identified.
[0045] The adapter and cue-based joint fine-tuning method for distributed fiber optic sensing includes the following steps:
[0046] Step 1: Gait data acquisition;
[0047] Using phase-sensitive optical time-domain reflectometry The distributed fiber optic sensing system collects gait signals from people walking on the floor. Its principle is based on... Figure 2The distributed fiber optic sensing system comprises an ultra-narrow linewidth laser, an acousto-optic modulator, an erbium-doped fiber amplifier, a circulator, a balanced photodetector, an optical coupler, a photodetector, a sensing fiber, and a high-speed data acquisition card, all integrated into a distributed fiber optic sensing demodulation instrument. The instrument used in the experiment has a detection range of 5 km, encompassing 960 points, a spatial resolution of 5 m, a gauge length of 5 m, a signal sampling rate of 20 kS / s, a 1000M Ethernet communication interface, and uses G.652.D single-mode fiber for sensing. The output interface is either FC or APC. The device connects to a 4 km long G.652.D single-mode fiber. The device first generates continuous light from the ultra-narrow linewidth laser, which is split into two paths by the coupler. One path enters the modulator, where it is modulated into pulsed light under the control of the modulation signal. After amplification by the erbium-doped fiber amplifier, the pulsed light enters the sensing fiber through the circulator. In the sensing fiber, the propagation of pulsed light generates a Rayleigh scattering signal, which is guided by a circulator and optically mixed with the local oscillator light extracted from the second output of coupler 1 to achieve heterodyne detection. The balanced photodetector converts the optical beat frequency signal into an electrical signal, which is then digitized by an analog-to-digital converter and demodulated digitally by I / Q to reconstruct the phase fluctuations caused by fiber disturbances.
[0048] Building such Figure 3 The experimental scenario of the distributed fiber optic sensing data acquisition system is shown. Fiber optic cables are laid in an "S" shape along the short side of the floor on the back of a 3cm high raised platform, with a spacing of 5cm between the cables. 40m of fiber optic cable (8 channels) is laid on the back of the floor. One end of each fiber is connected to a DAS demodulator. The fiber optic distance between the DAS demodulator and the ground fiber optic cable ranges from 0.35km to 4.5km. Four participants, wearing sneakers and slippers respectively, walked on the floor to collect data. Participant I was 178cm tall and weighed 75kg, wearing size 42 shoes; Participant II was 165cm tall and weighed 72kg, wearing size 39 shoes; Participant III was 175cm tall and weighed 80kg, wearing size 41 shoes; and Participant IV was 170cm tall and weighed 60kg, wearing size 40 shoes. A total of 8 types of data samples were collected.
[0049] Step 2: Data preprocessing;
[0050] The acquired signals are preprocessed, including wavelet decomposition for noise reduction, and then the one-dimensional signal is processed into a two-dimensional spatiotemporal graph. At the location of the event, corresponding to the row index of the spatiotemporal two-dimensional signal matrix, the data signal is extracted, and wavelet decomposition is used to denoise the signal as follows:
[0051]
[0052] Where x(t) is the original signal, ψ jk(t) is the wavelet basis function, a is the scale factor, j is the discrete coefficient of the scale factor, k is the translation factor, and b is the discrete parameter of the position. The wavelet basis function used is the db4 wavelet. Wavelet decomposition performs multi-scale analysis on the signal using different scales a and positions k. Through repeated wavelet decomposition, the signal x(t) is decomposed into low-frequency approximate components and high-frequency detail components. After wavelet decomposition, a soft threshold is applied as follows:
[0053]
[0054] Coefficients below a threshold are set to zero, while coefficients above the threshold are reduced. The coefficients that have undergone thresholding are retained and then subjected to inverse wavelet transform to reconstruct the signal. The denoised sample signal is X′. The one-dimensional time signal from multiple channels after denoising is processed into a two-dimensional spatiotemporal graph. Data from eight channels within 5 seconds is extracted into a single sample image, where rows represent time and columns represent channels, as shown in the following formula. The first column of X′ corresponds to the sampled values of the first channel at all times, and each row corresponds to the sampled values of each channel at the same time. These are the sampled values at the initial time of the first and eighth channels, respectively. These are the sampled values of the first and eighth channels at the 5th second, respectively;
[0055]
[0056] Step 3: Model pre-training;
[0057] MAE framework such as Figure 4 The diagram shows two parts: an encoder and a decoder. The encoder uses a ViT structure, processing only the unmasked image patches to extract deep semantic features from the visible regions. The decoder reconstructs the complete image based on the latent representations. Both the encoder and decoder consist of stacked multi-level Transformer coding modules. Each module contains alternating structures of MHSA and MLP. Layer normalization (LayerNorm) is applied before each module, and feature fusion is performed through residual connections. Specifically, the input 224*224*3 DAS image is divided into 196 fixed-size image patches. Among them I j Let represent the j-th image patch. A set of visible image patches This is a set of randomly masked image patches. Visible image patches. A vector of length 768 is obtained through linear projection mapping:
[0058]
[0059] in, This represents the 768-dimensional embedding representation of the j-th visible image patch. This represents the set of embeddings of all visible image blocks in the i-th layer of the encoder. A category label x is appended before the embedding sequence. i The input sequence is then fed into the encoder layer for further processing by incorporating positional encoding to preserve spatial structure information.
[0060]
[0061] L i This represents the i-th Transformer encoder layer. After processing through 12 Transformer encoder layers, the semantic representation of the visible image patch is obtained. While maintaining the original image patch order, With mask mark E n The sequences are concatenated to form a complete sequence. Positional encodings are then added back to this sequence to preserve spatial structure. After processing the sequence, the decoder's output is projected back into pixel space through a linear layer to generate a reconstructed image. During training, the mean squared error reconstruction loss is calculated only for the masked image patches.
[0062]
[0063] x represents the set of pixels within the occluded area. i and These are the values at pixel i in the original image and the reconstructed image, respectively.
[0064] During pre-training, all input images were normalized to 224×224 pixels by random cropping and scaling, with a random occlusion ratio of 75%. The AdamW optimizer was used, with an initial learning rate of 0.001, a cosine annealing strategy, a batch size of 16, and 300 training epochs.
[0065] Step 4: Construct the APT fine-tuning architecture;
[0066] like Figure 5 As shown, adapters are added to the model structure, and cue vectors are added to the input. Each adapter employs a bottleneck design, consisting of a dimensionality reduction projection layer. Upward projection layer The system consists of a ReLU activation function between the two layers, used to introduce non-linearity. The input 768-dimensional features are first mapped to a 128-dimensional low-dimensional bottleneck space, then undergo a non-linear transformation using the ReLU function, and finally projected back to the original dimensions through an upscaling projection layer. This bottleneck module is integrated into the backbone network via residual connections with a scaling factor S = 0.06, thereby achieving efficient feature fitting while maintaining model stability. For a given input... The output after passing through the adapter module can be expressed as:
[0067] x' l =S·(ReLU(LN(x) l )·W Down )·W Up )+x l ;
[0068] APT also inserts learnable cue vectors into the input of each Transformer encoder layer. These vectors have dimensions [1, 768]. For example, for the (i+1)th Transformer encoder layer L... i+1 A set of cue vectors P i Add to its input:
[0069]
[0070] This represents the three cue vectors inserted at the input of the i-th Transformer encoder layer. [x] i ,P i E i This constitutes the input of the encoder layer, where It is the 768-dimensional category label embedding of the i-th layer, E i This represents a 768-dimensional image patch embedding set. The resulting sequence is first passed through a multi-head self-attention (MHSA) layer, and then through a fully connected layer (MLP):
[0071] [x' i ,P' i ,E' i ] = MHSA(Norm([x i ,P i E i ]))+[x i ,P i E i ];
[0072] [x” i ,P” i ,E” i ] = MLP(Norm([x' i ,P' i ,E' i ]));
[0073] [x' i ,P' i ,E' i ] and [x” i ,P” i ,E” i] represent the outputs of the MHSA and MLP blocks of the i-th Transformer encoder layer, respectively. Additionally, the input [x' i ,P' i ,E' i It will also be processed through the adapter branch, and its output is:
[0074] [x”' i ,P”' i ,E”' i ] = S·(Relu(W Down ·([x' i ,P' i ,E' i ]))·W Up )+[x' i ,P' i ,E' i ];
[0075] Here, S represents the scaling factor applied to the output of the adapter module. The output of the i-th Transformer encoder layer is:
[0076]
[0077] y = Head(x) N );
[0078] Step 5: Fine-tune the adapter and prompts together;
[0079] In the downstream gait recognition task, a pre-trained model was loaded, and data from four participants wearing slippers and sneakers were used to identify them. All parameters of the pre-trained model were frozen, and training was performed only on the added adapter, cue vectors, and classifier head. The training set used 1920 samples (240 per class), the validation set used 720 samples (90 per class), and the test set used 2400 samples (300 per class). The learning rate (lr) was set to 0.0008, the batch size to 16, and weight decay was set. The decay is set to 0.00004, the momentum to 0.9, and the model is trained for 300 epochs. The cross-entropy loss function is calculated, and the trainable parameters are optimized using the SGD backpropagation gradient descent algorithm. The trained model parameters are saved, and the pre-trained model is combined with the trained adapter, cue vectors, and classification head parameters to form a new model. Test samples are input into the model to obtain classification results and evaluate the model's recognition ability. If the effect is good, the model is saved; if the effect is not good, the parameters are optimized again until the set total number of training epochs is reached.
[0080] Figure 6 (a) illustrates the relationship between recognition accuracy and the adapter's intermediate dimension. For the AT method, when the intermediate dimension increases to 2...7 At this point, the accuracy reaches saturation, peaking at 93.54%. The APT method used in this embodiment, based on the AP method (with a median dimension of 128), introduces 64 visual cue vectors as model input, improving the recognition accuracy to 94.21%. In contrast, the VPT method, using only 64 visual cue vectors as input, achieves an accuracy of 89.58%.
[0081] Figure 6 (b) illustrates the trend of recognition accuracy as the number of visual cue vectors changes. For the VPT method, the accuracy reaches its highest value of 89.58% when the number of cue vectors is 64. The APT method is based on the AP method with an intermediate dimension of 128 and integrates multiple sets of visual cue vectors as input. Its overall accuracy remains relatively stable as the number of cue vectors varies from 1 to 128. When the number of visual cue vectors is 8, the recognition accuracy reaches 94.75%, exceeding the 93.54% accuracy achieved by the AP method with an intermediate dimension of 128.
[0082] Figure 7 (a) shows the changes in recognition accuracy for each category after expanding the upstream pre-trained gait data and updating the model, followed by fine-tuning and testing on the downstream task. The results show that as the upstream training data volume increases from 35,000 to 56,000, the recognition accuracy of the APT method improves across all categories, indicating that increasing the upstream data volume significantly improves the performance of the downstream task. To further analyze the impact of the sample size of a specific category in the upstream training data on the model's recognition performance in the corresponding category downstream, Figure 7 (b) illustrates the accuracy trend after adding only the gait data of the experimenter's IV to the upstream pre-training data. The updated model was then fine-tuned using the APT method and tested on downstream tasks. The results show that as the amount of data for that category increases, the model's accuracy for that category in the downstream gait recognition task steadily improves from approximately 91.33% to approximately 93.16%. This trend indicates that even selectively increasing the sample size of a single category in the upstream dataset can significantly enhance the model's corresponding category recognition performance in downstream tasks.
[0083] This study also included a female subject (Experimenter V, height 165cm, weight 48kg, shoe size 38) who did not participate in the pre-training model. 630 walking gait samples from Experimenter V were used, of which 240 were used for downstream task fine-tuning training, 90 for validation, and 300 for testing. Figure 8(a) shows the confusion matrix of the model on experimenters V (categories IX and X) who were not pre-trained, and on experimenters I–IV, corresponding to categories I–VIII. Despite the absence of gait data for experimenters V in the upstream pre-training, the model still achieved high classification accuracy (90.00% for slippers and 93.67% for sneakers) after fine-tuning with a small amount of labeled data using the APT method. Furthermore, the model was updated using 1,800 gait samples from experimenters V and fine-tuned using the APT method. Figure 8 (b) shows the corresponding confusion matrix. (and) Figure 8 (a) Compared with the results, the experiment shows that even if the subject's gait data not included in the upstream training appears in the downstream task, a high gait recognition accuracy can still be achieved after fine-tuning, which fully demonstrates the excellent generalization ability of the base model combined with adapter and cue joint fine-tuning method in gait recognition task.
[0084] The above provides a detailed description of the adapter and prompting-based fine-tuning method for distributed optical fiber sensing, as described in this invention. The examples above are only for the purpose of helping to understand the method and core ideas of this invention and are not intended to limit it. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of this invention should be considered equivalent substitutions and are included within the protection scope of this invention.
Claims
1. A method for joint fine-tuning of adapter and cueing in distributed fiber optic sensing, characterized in that, The method includes the following steps: Step 1, Data Preparation: Collect signals using a distributed fiber optic sensing system as training samples; Step 2, Data Preprocessing: The collected signal samples are preprocessed, including noise reduction, and then the one-dimensional signal is processed into a two-dimensional spatiotemporal graph; Step 3, Model pre-training: Using the masked autoencoder (MAE) architecture, self-supervised learning is performed on the unlabeled DAS dataset to train the basic model for DAS signal recognition. Step 4: Construct the APT fine-tuning architecture: Retain the pre-trained encoder as the backbone network, add learnable visual cue vectors to the input, insert lightweight adapter modules into each layer of the encoder, and add task-specific classification heads. Step 5, Adapter and Cue Joint Fine-Tuning: In the downstream task, APT fine-tuning is used to freeze all parameters of the pre-trained encoder and train the cue vectors, adapter, and classification head parameters to achieve efficient parameter fine-tuning; Step 6, Testing: Input the DAS signal into the frozen backbone network and the complete model consisting of the trained cue vectors and adapters, and identify the test data.
2. The adapter and cueing joint fine-tuning method for distributed fiber optic sensing as described in claim 1, characterized in that, In step 1, signal acquisition includes acquiring signals in a laboratory setting. Let X be the acquired sample. For the sample of the nth channel at time m, 3. The adapter and cueing joint fine-tuning method for distributed fiber optic sensing as described in claim 1 or 2, characterized in that, In step 2, the noise reduction is performed by applying wavelet threshold noise reduction to the acquired signal, as shown in the following formula: Where X′ is the denoised sample, X is the original signal, and ψ jk (t) represents the wavelet basis function, j is the scaling parameter, k is the translation parameter, c(j,k) represents the wavelet coefficients after thresholding, and C ψ As a normalization constant, the one-dimensional time signal from multiple channels is processed into a two-dimensional spatiotemporal sample as shown in the following formula, where each column of X′ represents the sampled value of each channel, and each row represents the sampled value at the same time. in, These are the sampled values at the initial time of the first channel and the nth channel, respectively. These are the sampled values of the first channel and the nth channel at time m, respectively.
4. The adapter and cueing joint fine-tuning method for distributed fiber optic sensing as described in claim 1 or 2, characterized in that, In step 3, MAE pre-training is used. The MAE framework consists of two parts: an encoder and a decoder. The encoder adopts a visual Transformer (ViT) structure and processes only unmasked image patches to extract deep semantic features of the visible area. The decoder reconstructs the complete image based on the latent representation. Both the encoder and decoder are composed of stacked multi-level Transformer coding modules. Each module contains an alternating structure of multi-head self-attention layer (MHSA) and multilayer perceptron (MLP). Layer normalization (LayerNorm) is applied before each module, and feature fusion is performed through residual connections.
5. The adapter and cueing joint fine-tuning method for distributed fiber optic sensing as described in claim 4, characterized in that, In step 3, the input DAS image is divided into m image blocks of fixed size: Where I j Let h and w represent the height and width of the j-th image block, respectively. A set of visible image patches A set of randomly masked image patches, visible image patches Embedding into the d-dimensional feature space via linear projection: in, Let d represent the embedding representation of the j-th visible image patch. This represents the set of embeddings of all visible image patches in the i-th layer of the encoder; a category label x is appended before the embedding sequence. i The input sequence is then fed into an N-layer encoder for processing by adding positional encoding to preserve spatial structure information. L i This represents the i-th Transformer encoder layer, where the class labels are represented by d-dimensional embedding vectors. After processing through N Transformer encoder layers, we obtain the semantic representation of the visible image patch. While maintaining the original image patch order, With mask mark E n The sequences are concatenated to form a complete sequence; then, positional encodings are added back to the sequence to preserve spatial structure. After the decoder processes the sequence, its output is projected back into pixel space through a linear layer to generate a reconstructed image. During training, the mean squared error reconstruction loss is calculated only for the masked image patches. in, x represents the set of pixels within the occluded area. i and These are the values at pixel i in the original image and the reconstructed image, respectively.
6. The adapter and cueing joint fine-tuning method for distributed fiber optic sensing as described in claim 1 or 2, characterized in that, In step 4, the APT fine-tuning architecture is constructed: the pre-trained encoder is retained as the backbone network, learnable visual cue vectors are added to the input, and lightweight adapter modules are inserted into each layer of the encoder, along with a task-specific classification head. x l '=S·(ReLU(LN(x l )·W Down )·W Up )+x l ; The adapter module consists of a dimension reduction projection layer. Upward projection layer The two functions consist of the ReLU activation function and the scaling factor S, with LN representing layer normalization. To add the k-th cue vector to the i-th encoder layer, P i The set of cue vectors added before the input of the i-th encoder layer.
7. The adapter and cueing joint fine-tuning method for distributed fiber optic sensing as described in claim 1 or 2, characterized in that, In step 5, the downstream task uses the APT fine-tuning method to load pre-trained model parameters, adds an adapter to the model structure, and adds cue vectors and task-specific classification heads to the input. During training, the pre-trained model parameters are frozen, and only the added adapter, cue vectors, and classification heads are trained. The loss function is calculated as follows: Where N represents the number of samples and M represents the number of categories. It is the true probability that the nth sample belongs to class c, and This is the model's predicted probability that the sample belongs to category c. The backpropagation gradient descent algorithm is used to optimize the trainable parameters. The pre-trained model, the trained adapter, the cue vector, and the classification head are combined into a new model. The test data is input into the new model to obtain the classification results and evaluate the model's recognition performance. If the performance meets the standard, the model is saved; otherwise, the trainable parameters are optimized until the set conditions are met.