Robust displacement estimation from filament-based soft sensors using a parallel attention-enhanced LSTM for rehabilitation monitoring Authors: Quang-Huy Do Ba, Minh Tri Phan, Mai Thanh Thai Published: 2026 ABSTRACT Accurate time-series prediction from soft sensor signals is essential for sensor-driven rehabilitation systems, yet remains challenging due to sensor noise, nonlinear dynamics, and complex temporal dependencies. In particular, filament-based tactile sensors exhibit long-term drift, hysteresis, and redundant signal components that degrade the performance of conventional recurrent models. To address these limitations, this paper proposes a novel Parallel Attention-Enhanced Long Short-Term Memory (PA-LSTM) architecture for robust displacement prediction from soft sensor data. The proposed model integrates an LSTM-based temporal encoder with a parallel dense embedding pathway and a Bahdanau-style attention mechanism, enabling adaptive weighting of informative time steps while suppressing noise and irrelevant signal fluctuations. By jointly capturing short-term dynamics and global contextual features, PA-LSTM enhances temporal feature selection and representation learning under noisy sensing conditions. The model is evaluated using pressure–displacement data collected from filament-based tactile sensors in a rehabilitation-oriented experimental setup. Extensive experiments demonstrate that PA-LSTM consistently outperforms standard LSTM, GRU, CNN–LSTM, and attention-only baselines. Specifically, the proposed approach achieves an RMSE of 0.047, an MAE of 0.028, and an R² score of 0.963, indicating substantial improvements in prediction accuracy and robustness. These results confirm that PA-LSTM effectively models complex soft-sensor dynamics and is well-suited for real-time displacement estimation in wearable rehabilitation and soft robotic sensing applications. Introduction Wearable sensors such as accelerometers, gyroscopes, and tactile filaments have become indispensable for continuous motion monitoring in biomedical applications, including physical rehabilitation, sports performance assessment, and elderly care1–3. In particular, physical rehabilitation has gained increasing attention due to the growing demand for scalable, cost-effective, and personalized recovery solutions for patients with motor impairments4. By enabling continuous and quantitative assessment of limb movement, gait, and postural stability, wearable sensors allow clinicians to remotely monitor patient progress and make data-driven therapeutic decisions1,5. Unlike conventional in-clinic assessments that rely on visual observation or subjective scoring, sensor-based rehabilitation systems provide objective metrics, such as joint angles, step symmetry, and center-of-mass sway, that inform adaptive and individualized rehabilitation protocols6. These capabilities are especially valuable for patients recovering from stroke, orthopedic surgery, or living with neurodegenerative disorders such as parkinson’s disease. Moreover, the integration of wearable sensors with real-time feedback mechanisms and machine learning models has demonstrated significant potential for improving patient engagement and enhancing therapy outcomes in both clinical and home-based settings7,8. Among various sensing technologies, soft and filament-based pressure sensors have attracted increasing attention due to their mechanical compliance, lightweight structure, and suitability for integration into wearable systems such as knee braces, sleeves, and assistive devices9. Despite these advantages, accurately estimating mechanical displacement from soft sensor signals remains a challenging sensing problem10. Filament-based and fluid-transmitted pressure sensors exhibit inherently nonlinear pressure–displacement relationships, viscoelastic behavior, hysteresis, and long-term drift caused by material relaxation, fluid leakage, and temperature-dependent viscosity changes11. These effects lead to time-series signals that are noisy, non-stationary, and highly variable, even under controlled experimental conditions12. In rehabilitation scenarios, additional disturbances arise from inconsistent sensor placement, involuntary or compensatory movements, and prolonged operation, further complicating the extraction of physically meaningful information from raw sensor outputs13. As a result, simple regression models or memory-limited approaches often fail to capture both rapid deformation events and slow-varying sensor drift simultaneously14. With the increase in high-resolution time-series data captured by wearable devices, deep learning approaches have significantly advanced the performance of human activity recognition (HAR) systems15. Hybrid architectures combining convolutional neural networks (CNNs) with long short-term memory (LSTM) networks have been notably effective in extracting spatial and temporal features from multivariate sensor data16. Building on this foundation, a deep CNN-LSTM model augmented with a self-attention mechanism was proposed by Khatun et al.17, enabling dynamic focus on the most informative segments of input sequences. This model achieved classification accuracies exceeding 98% on benchmark datasets, including MHEALTH and UCI-HAR18,19, highlighting the promise of attention-based architectures for reliable and precise activity recognition in adaptive rehabilitation systems20,21. However, despite their impressive performance, many state-of-the-art architectures, particularly Transformer-based models, are computationally intensive and memory-demanding22. Their self-attention mechanism scales quadratically with sequence length, leading to substantial overhead in both computation and memory usage. This limitation poses a significant challenge for deployment in wearable rehabilitation systems, which are typically powered by microcontroller units (MCUs) with constrained processing capability, limited memory, and strict energy budgets. In such settings, real-time inference and low-latency response are critical requirements that cannot be satisfied by overly complex models. Consequently, there is a critical need for model architectures that can retain the representational advantages of attention mechanisms while maintaining the lightweight, linear computational complexity characteristic of recurrent models23. Such designs are better suited to embedded and edge deployment, enabling efficient, real-time operation in practical rehabilitation scenarios without sacrificing predictive performance. Furthermore, standard sequential attention-augmented LSTMs are highly vulnerable to cumulative sensor errors. Because recurrent connections mathematically act as a quasi-integrator, physical soft-sensor drift and hysteresis are inherently propagated and amplified across hidden states24. To break this error propagation loop, our proposed PA-LSTM framework introduces a parallel dense embedding pathway outside the recurrent structure. This pathway preserves raw structural features from the current input window and fuses them adaptively with temporal encodings, effectively suppressing long-term drift while capturing instantaneous displacement17. Despite these advances, effectively leveraging wearable sensor data for rehabilitation remains challenging25. The multivariate time-series signals captured during therapy often exhibit substantial variability both across patients (inter-subject) and within the same patient over time (intra-subject)2,26. Factors such as inconsistent sensor placement, soft tissue artifacts, involuntary or compensatory motions, and environmental noise contribute to temporally irregular, high-dimensional data streams27,28. These challenges are magnified in populations with neuromotor impairments, including stroke survivors or individuals with Parkinson’s disease, where clinically meaningful events, such as freezing of gait (FoG), spastic reflexes, and abnormal joint trajectories, are typically brief and sparsely distributed29–31. Fig. 1(A) Schematic of the experimental setup for collecting pressure–displacement data, including a DC motor, linear slider, syringe actuator, fluidic tube, soft sensor, and NI ELVIS III interface. (B) Preprocessing pipeline consisting of signal filtering, downsampling, min-max normalization, and supervised input–target preparation. (C) Wearable soft sensing components, including a filament sensor and a knee-brace integrated soft sensor. (A) Schematic of the experimental setup for collecting pressure–displacement data, including a DC motor, linear slider, syringe actuator, fluidic tube, soft sensor, and NI ELVIS III interface. (B) Preprocessing pipeline consisting of signal filtering, downsampling, min-max normalization, and supervised input–target preparation. (C) Wearable soft sensing components, including a filament sensor and a knee-brace integrated soft sensor. LSTM networks have been widely adopted for modeling temporal dependencies and addressing vanishing gradient issues, showing strong performance in activity recognition tasks2,26,32. However, their strictly sequential processing and uniform gating mechanisms treat all time steps with equal priority8,33,34. This uniform treatment presents a severe limitation in rehabilitation tracking, where critical, high-diagnostic-value events such as sudden joint deviations or spastic reflexes are sparse and easily overshadowed by dominant movement patterns or masked by soft-tissue artifacts29,33. Consequently, conventional LSTMs often average out or entirely overlook these subtle but clinically relevant fluctuations, leading to degraded sensitivity29. These limitations underscore the need for mechanisms that allow models to differentiate between informative and non-informative segments of the signal. To overcome these issues, recent studies have increasingly integrated attention mechanisms into recurrent architectures. Unlike standard sequential gating, attention assigns context-dependent weights to individual time steps, enabling the model to selectively emphasize clinically relevant portions of the signal while suppressing noise and irrelevant fluctuations29,33. This selective focus has proven crucial for capturing short-lived but important events, such as abrupt changes in joint trajectory or FoG episodes, that are often obscured within long or noisy sequences yet are critical for real-time clinical assessment and intervention planning8,32,35. Beyond improved sensitivity to transient events, attention mechanisms enhance model interpretability by revealing which temporal segments contribute most to predictions. This is especially valuable in clinical contexts where transparent decision-making is vital for trust and adoption. Attention also strengthens the model’s ability to capture both local and global temporal dependencies, enabling a more comprehensive characterization of complex motor patterns common in rehabilitation scenarios20,21. Consequently, attention-augmented architectures have demonstrated superior robustness and accuracy across a wide range of sensor modalities, movement tasks, and patient populations, consistently outperforming traditional recurrent models in human activity recognition and rehabilitation-oriented prediction tasks32,35. Collectively, these advances represent a significant step toward developing reliable, real-time, and clinically interpretable systems capable of supporting adaptive therapeutic interventions and personalized rehabilitation pathways20,29. In view of the challenges associated with modeling complex, noisy, and highly variable multivariate time-series data in rehabilitation contexts, this study introduces a novel hybrid architecture termed the Parallel Attention-Enhanced LSTM (PA-LSTM). The PA-LSTM is designed to address the limitations of conventional recurrent models by integrating multiple attention mechanisms that operate simultaneously, thereby enabling more effective extraction of clinically meaningful temporal patterns from long, irregular, and artifact-prone rehabilitation signals. The main contributions of this paper are threefold: A PA-LSTM model is developed, which incorporates multiple attention mechanisms operating in parallel within the LSTM framework. This design enhances the model’s capacity to capture intricate temporal dependencies in long and noisy time-series sequences while maintaining a linear computational complexity, ensuring its suitability for real-time inference on wearable hardware.The proposed model is applied to a rehabilitation scenario, where it predicts limb displacement using filament-based tactile sensors. This application highlights the model’s effectiveness in capturing subtle motion dynamics essential for patient monitoring and therapeutic intervention.Extensive experiments are conducted on real-world datasets to compare the PA-LSTM with several mainstream models, including LSTM, GRU, and attention-only models. The results demonstrate that the PA-LSTM consistently outperforms existing methods across various evaluation metrics (RMSE, MAE, R²), particularly under long-sequence and high-noise conditions. A PA-LSTM model is developed, which incorporates multiple attention mechanisms operating in parallel within the LSTM framework. This design enhances the model’s capacity to capture intricate temporal dependencies in long and noisy time-series sequences while maintaining a linear computational complexity, ensuring its suitability for real-time inference on wearable hardware. A PA-LSTM model is developed, which incorporates multiple attention mechanisms operating in parallel within the LSTM framework. This design enhances the model’s capacity to capture intricate temporal dependencies in long and noisy time-series sequences while maintaining a linear computational complexity, ensuring its suitability for real-time inference on wearable hardware. The proposed model is applied to a rehabilitation scenario, where it predicts limb displacement using filament-based tactile sensors. This application highlights the model’s effectiveness in capturing subtle motion dynamics essential for patient monitoring and therapeutic intervention. The proposed model is applied to a rehabilitation scenario, where it predicts limb displacement using filament-based tactile sensors. This application highlights the model’s effectiveness in capturing subtle motion dynamics essential for patient monitoring and therapeutic intervention. Extensive experiments are conducted on real-world datasets to compare the PA-LSTM with several mainstream models, including LSTM, GRU, and attention-only models. The results demonstrate that the PA-LSTM consistently outperforms existing methods across various evaluation metrics (RMSE, MAE, R²), particularly under long-sequence and high-noise conditions. Extensive experiments are conducted on real-world datasets to compare the PA-LSTM with several mainstream models, including LSTM, GRU, and attention-only models. The results demonstrate that the PA-LSTM consistently outperforms existing methods across various evaluation metrics (RMSE, MAE, R²), particularly under long-sequence and high-noise conditions. Methodology Data collection and preprocessing Data collection To better understand the characteristics of the acquired signals, the internal structure and transduction mechanism of the filament-based soft sensor are briefly described. The sensor used in this study is a hydraulic filament sensor (HFS), inspired by biological proprioceptive systems such as the muscle spindle and Golgi tendon organ9. It consists of a fluid-filled silicone microtube encased within a helical coil, which acts as a constraint layer to regulate deformation and enhance pressure sensitivity. When mechanical displacement is applied, the sensor undergoes axial deformation, which changes the internal fluid pressure, which is measured by a pressure transducer. The helical structure restricts radial expansion and promotes axial elongation, strengthening the coupling between displacement and pressure. However, this pressure–deformation relationship is inherently nonlinear and affected by viscoelasticity, fluid dynamics, and structural compliance36. These factors lead to hysteresis, long-term drift, and high-frequency fluctuations in the measured signal, as shown in Fig. 2. These characteristics explain the observed signal behavior and highlight the need for models that capture both nonlinear and temporal dependencies, as addressed by the proposed PA-LSTM. To enable time-series prediction from soft sensor signals, a custom experimental platform was developed to emulate pressure-driven displacement in a rehabilitation context. As illustrated in Fig. 1A, the system integrates a DC motor with a high-resolution encoder, a linear slider, a syringe-based actuation unit, and a filament-type soft sensor connected through a sealed fluidic system. Fig. 2Time-series plots of Datasets (A) (left) and (B) (right), showing displacement (top) and pressure (bottom) recorded over two hours under randomized motion. Pressure signals exhibit both short-term fluctuations and long-term drift. Time-series plots of Datasets (A) (left) and (B) (right), showing displacement (top) and pressure (bottom) recorded over two hours under randomized motion. Pressure signals exhibit both short-term fluctuations and long-term drift. Each component was deliberately selected to fulfill a specific role within a bio-mimetic framework. The DC motor and linear slider provide high-precision and repeatable linear displacement, serving as the primary actuation mechanism to replicate muscle contraction and extension. The syringe-based unit and sealed fluidic system act as a transmission medium that converts mechanical motion into internal pressure variations. This configuration effectively reproduces the behavior of biological joints and tendons, where external motion induces internal stress and deformation in soft tissues. In particular, the filament-type soft sensor undergoes elastic deformation in response to pressure changes, thereby exhibiting nonlinear sensing characteristics consistent with those observed in wearable rehabilitation systems. The system operates under a closed-loop control architecture implemented via NI ELVIS III, ensuring precise actuation and temporally synchronized data acquisition. The linear slider coupled with the piston-driven mechanism was specifically chosen to enable the extraction of absolute ground-truth displacement from the motor encoder, which is essential for rigorous model validation. To ensure dataset diversity and improve generalization capability, both displacement amplitude and actuation period were randomized within the ranges of 0–40 mm and 2.5–5.0 s, respectively, thereby emulating the variability inherent in human limb motion. The initial operating condition was defined by a pressure baseline of approximately 14 bar and a relaxed sensor length of 25 cm. Fig. 3Multi-domain characterization (time, frequency, and time-frequency domains) of the raw pressure signal prior to preprocessing. Multi-domain characterization (time, frequency, and time-frequency domains) of the raw pressure signal prior to preprocessing. During each experiment, the pressure signal acquired from the soft sensor serves as the model input, while the corresponding displacement obtained from the encoder is used as the prediction target. This experimental configuration enables the acquisition of rich and non-repetitive time-series data that capture the intrinsic nonlinear dynamics between soft sensor pressure and physical displacement, including phenomena such as hysteresis and viscoelasticity. These properties are essential for faithfully representing real-world sensor behavior and provide a robust and reliable foundation for training and validating the proposed Parallel Attention-Enhanced Long Short-Term Memory (PA-LSTM) model. Fig. 4Multi-domain characterization of the denoised pressure signal after the preprocessing pipeline, showing the suppression of high-frequency noise. Multi-domain characterization of the denoised pressure signal after the preprocessing pipeline, showing the suppression of high-frequency noise. Following the experimental configuration illustrated in Fig. 1A, the system was operated continuously for approximately four hours under randomized actuation conditions to simulate realistic and variable rehabilitation scenarios. To ensure a clear and reproducible evaluation protocol, the dataset was partitioned using a cross-session splitting strategy rather than random sampling. Specifically, the data collection process produced two independent datasets under different randomized actuation conditions: Dataset B (≈ 2 h) was used entirely for model training, while Dataset A (≈ 2 h) was reserved exclusively for testing. This separation ensures that the model is evaluated on unseen temporal patterns and sensor dynamics, thereby preventing information leakage and providing a realistic assessment of generalization performance. In addition, a portion of the training dataset (Dataset B) was further split into training and validation subsets using an 80:20 ratio. The validation subset was used to monitor model convergence and implement early stopping, preventing overfitting during training. Importantly, no samples from Dataset A were used during training or validation at any stage. This dataset partitioning strategy reflects practical deployment conditions in rehabilitation systems, where models are trained on previously collected sessions and must generalize to new, unseen motion sequences and sensor behaviors. As shown in Fig. 2, each dataset comprises synchronized time-series recordings of both the ground-truth displacement (obtained from the encoder) and the corresponding pressure response from the soft sensor. The displacement signals (top row) demonstrate high-frequency, non-repetitive variations resulting from the randomized motor control, reflecting the dynamic nature of physical rehabilitation tasks. In contrast, the pressure signals (bottom row) exhibit not only short-term fluctuations but also a gradual declining trend over time. This long-range drift may stem from physical phenomena such as fluid leakage, hysteresis, or temperature-induced viscosity changes in the fluidic transmission37–39, which are typical in soft sensor systems operating over extended durations. The coexistence of local fluctuations and slow-varying global trends in the pressure signals introduces significant complexity to the prediction task. Simple regression or memory-limited models may fail to capture both aspects effectively. These characteristics emphasize the necessity for models capable of learning hierarchical temporal patterns and robust contextual representations, such as the proposed Parallel Attention-Enhanced LSTM (PA-LSTM), which is specifically designed to attend to both short-term and long-term dependencies within the input signal. Data preprocessing To prepare the collected data for time-series modeling, a structured preprocessing pipeline was applied, as illustrated in Fig. 1B. This pipeline includes signal smoothing, temporal compression, normalization, and supervised sample construction. These steps are essential to reduce sensor-induced noise, mitigate sampling redundancy, and normalize signal ranges, thereby enhancing the model’s ability to learn meaningful temporal dependencies and ensuring training stability and efficiency in the presence of real-world signal irregularities. Filtering Given the presence of high-frequency noise in the raw pressure signals, a causal moving average filter was applied to improve signal quality for real-time inference. A window length of N=100 samples was used to compute the average value at each time step using exclusively current and historical data points, thereby ensuring physical realizability in practical deployment while preserving the underlying temporal trends. This causal smoothing process is formulated as follows:1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\widehat{x}\left(t\right)=\:\frac{1}{N}\sum\:_{i=t-N+1}^{t}x\left(i\right)$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\widehat{x}\left(t\right)$$\end{document} is the filtered value at time t, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:x\left(\mathrm{i}\right)$$\end{document} is the raw signal, and N=100 represents the backward window size. The window size was empirically selected to balance noise reduction and temporal responsiveness. Smaller windows (20–50 samples) were insufficient to suppress noise, while larger ones (> 150 samples) caused excessive smoothing. A window of 100 samples provided an effective trade-off. Although the backward moving average filter introduces a clean group delay of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\frac{N-1}{2}$$\end{document} samples40, its impact on real-time inference is minimized by the high sampling rate of our system and the inherently low-frequency nature of rehabilitation movements41. As a result, the latency remains well within acceptable thresholds for real-time human-machine interaction and does not degrade the downstream performance of the PA-LSTM model. Downsampling After filtering, the signals were downsampled by a factor of 20 to reduce redundancy and decrease the computational burden. This step preserves the essential dynamics of the signal while compressing its temporal resolution. Formally, the downsampled signal \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{x}_{d}\left(n\right)\:$$\end{document}is derived from the filtered signal \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{x}_{f}\left(t\right)\:$$\end{document} as:2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{x}_{d}\left(n\right)=\:{x}_{f}\left(n.\:\:D\right)$$\end{document} Min–max normalization To ensure consistent numerical scaling across all samples, min–max normalization was applied to both pressure and displacement signals. This transformation scales the signal values to the range [0,1], facilitating stable and efficient model training. The normalization formula is given by:3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{x}^{{\prime\:}}=\frac{x-min}{max-min}$$\end{document} where x is the original value, and min, max denote the minimum and maximum values of the signal, respectively. For this study, the pressure values were scaled from [0,16], and the displacement values from [0,40]. Input–target preparation Finally, the normalized signals were structured into supervised input–target pairs for model training. To construct the sample pairs, a sliding window strategy was employed with a fixed input window size of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:W=50\:$$\end{document}time steps, which corresponds to a 2-second temporal observation horizon post-downsampling. This fixed window architecture is optimized for edge deployment, where uniform temporal sequences are strictly maintained within the device firmware to ensure deterministic execution paths without dynamic memory re-allocation. Each input sequence corresponds to a segment of the pressure signal, while the target represents the matching displacement value. This pairing enables the model to learn a predictive mapping from soft sensor pressure to physical movement. Comparative analysis of raw and preprocessed pressure signals A representative window of the pressure signal is analyzed across time, frequency, and time-frequency domains to evaluate the efficacy of the proposed preprocessing pipeline. As illustrated in Fig. 3, the raw pressure signal in the time domain (Fig. 3A) exhibits severe high-frequency oscillations between 4.1 and 4.4. These fluctuations represent stochastic sensor interference and environmental vibrations that act as “spurious features”, potentially misleading the sequence modeling process. The frequency-domain analysis (Fig. 3B) further reveals deterministic periodic interference, characterized by elevated energy peaks around 550 Hz and 950 Hz, likely originating from mechanical resonance or electrical humming. The spectrogram (Fig. 3C) confirms these findings, showing persistent bright bands at 300 Hz, 600 Hz, and 900 Hz that signify stationary noise components capable of obscuring the underlying dynamic temporal dependencies. To mitigate these artifacts, the signal was processed through the multi-stage pipeline detailed in Fig. 1B. By integrating moving average filtering with down-sampling and min-max normalization, the pipeline systematically targets the identified noise profiles while reducing data redundancy. This transformation is essential for sequence-based neural architectures, as it ensures numerical stability and prevents gradient saturation during the training phase, allowing the model to focus on the relative changes in pressure dynamics rather than high-frequency sensor artifacts. The effectiveness of this integrated approach is demonstrated in Fig. 4, where the processed signal shows a significant enhancement in the signal-to-noise ratio. In the time domain (Fig. 4A), the waveform is transformed into a smooth, well-defined trajectory with normalized values centered between 0.24 and 0.28, representing the “cleansed” physical event. Correspondingly, the power spectrum (Fig. 4B) exhibits a sharp attenuation of energy beyond 50 Hz, effectively eliminating the sensor-induced noise peaks observed previously. The resulting spectrogram (Fig. 4C) is largely devoid of high-frequency energy, confirming that the pipeline successfully isolates the low-frequency dominant range (below 20 Hz). This refinement ensures that the subsequent deep learning model learns from robust physical patterns, which is essential for stable and accurate soft-sensor performance. Fig. 5Architecture of the proposed PA-LSTM model. (A) Overall framework; (B) Long Short-Term Memory (LSTM) network as temporal encoder; (C) Dense embedding pathway (Dense 1); (D) Bahdanau-style attention mechanism; (E) Output layer structure (Dense 2) for displacement prediction. Architecture of the proposed PA-LSTM model. (A) Overall framework; (B) Long Short-Term Memory (LSTM) network as temporal encoder; (C) Dense embedding pathway (Dense 1); (D) Bahdanau-style attention mechanism; (E) Output layer structure (Dense 2) for displacement prediction. Model architecture In this section, we detail the architecture of the proposed PA-LSTM (Parallel Attention-enhanced LSTM) model, which aims to estimate mechanical displacement based on pressure signals obtained from a soft sensor, with displacement values recorded by an encoder, as shown in Fig. 1. The model consists of three main components. First, the input pressure sequence is fed into an LSTM layer to extract temporal features. Simultaneously, handcrafted features are processed through the first dense layer to retain valuable domain-specific information. The outputs from both branches are then combined through concatenation, forming a unified representation that captures both dynamic and static characteristics. This fused representation is subsequently passed to an attention layer, which learns attention weights across the time steps, allowing the model to focus on the most informative parts of the sequence. Finally, the context vector generated by the attention mechanism is fed into a second dense layer to produce the final output, which is the predicted displacement. LSTM feature encoding layer The first component of the proposed PA-LSTM model is an LSTM layer, which is responsible for extracting temporal features from the input pressure signal. Let the input time-series be represented as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:X=\left\{{x}_{1},{x}_{2},\:\dots\:,{x}_{T}\right\}$$\end{document}, where each \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{x}_{t}\in\:{\:R}^{d}$$\end{document} denotes the pressure vector at time step t. This sequence is processed through the LSTM layer to learn time-dependent representations, with the hidden state at each time step t updated based on the current input and the previous hidden state:4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{h}_{t}=\:\mathrm{L}\mathrm{S}\mathrm{T}\mathrm{M}({x}_{t},\:{h}_{t-1})$$\end{document} The LSTM layer outputs a sequence of hidden states \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\left\{{h}_{1},{h}_{2},\:\dots\:,{h}_{T}\right\}$$\end{document}, which encapsulate the evolving temporal dynamics of the pressure signal over time. These hidden states serve as a compact, learned representation of the input sequence and are forwarded to subsequent components in the model. The internal operations and gating mechanisms of the standard LSTM unit, illustrated in Fig. 5B, are compactly formulated as follows:5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\left\{\begin{aligned}f_t &= \sigma(W_f[h_{t-1},x_t]+b_f)\\i_t &= \sigma(W_i[h_{t-1},x_t]+b_i)\\\tilde{c}_t &= \tanh(W_c[h_{t-1},x_t]+b_c)\\C_t &= f_t\odot C_{t-1}+i_t\odot\tilde{c}_t\\o_t &= \sigma(W_o[h_{t-1},x_t]+b_o)\\h_t &= o_t\odot\tanh(C_t)\end{aligned}\right.$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{f}_{t}$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{i}_{t}$$\end{document}, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{o}_{t}$$\end{document} represent the forget, input, and output gates, respectively, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{C}_{t}$$\end{document} denotes the updated cell state at time step t. This compact structure regulates the information flow to mitigate the vanishing gradient problem before forwarding the learned temporal dynamics to the proposed parallel attention enhancement pathway. Dense representation layer In parallel with the LSTM branch, the input pressure sequence is also processed through a separate dense pathway to capture domain-specific and static features (e.g., time within a cycle, environmental parameters,…). While the LSTM focuses on step-by-step temporal dependencies, this pathway acts as a Global Context Extractor, providing the model with a broader summary of the signal that is often lost in purely sequential processing. Specifically, the input tensor \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:X\:\in\:$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{R}^{T\times\:1}$$\end{document} is first flattened into a vector \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{x}_{flat}\:\in\:{R}^{T}$$\end{document}, removing the local temporal structure to consolidate the total signal energy and distribution across the entire time window into a single global representation. As illustrated in Fig. 5C, this flattened vector is then passed through a fully connected dense layer \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{f}_{d1}$$\end{document} with n units and ReLU activation to obtain a compact representation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:z\:\in\:\:{R}^{n}$$\end{document}. Mathematically, this transformation can be expressed as:6\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:z=ReLU({W}_{d1}\times\:{x}_{flat}+{b}_{d1})$$\end{document} where: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{W}_{d1}\in\:\:{R}^{n\:\times\:\:T}\:$$\end{document}is the weight matrix,\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{b}_{d1}\in\:\:{R}^{n\:}\:$$\end{document}is the bias vector,ReLU is the rectified linear unit function defined as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:ReLU\left(x\right)=\mathrm{m}\mathrm{a}\mathrm{x}(0,x)$$\end{document}. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{W}_{d1}\in\:\:{R}^{n\:\times\:\:T}\:$$\end{document}is the weight matrix, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{W}_{d1}\in\:\:{R}^{n\:\times\:\:T}\:$$\end{document}is the weight matrix, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{b}_{d1}\in\:\:{R}^{n\:}\:$$\end{document}is the bias vector, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{b}_{d1}\in\:\:{R}^{n\:}\:$$\end{document}is the bias vector, ReLU is the rectified linear unit function defined as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:ReLU\left(x\right)=\mathrm{m}\mathrm{a}\mathrm{x}(0,x)$$\end{document}. ReLU is the rectified linear unit function defined as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:ReLU\left(x\right)=\mathrm{m}\mathrm{a}\mathrm{x}(0,x)$$\end{document}. To enable temporal alignment with the dynamic features generated by the LSTM branch, the resulting dense vector z is repeated across the time dimension using a Repeat Vector operation. This step is critical because it replicates the global context at every time step, producing a replicated sequence:7\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Z=\left\{{z}_{1},{z}_{2},\:\dots\:,{z}_{T}\right\}\:\in\:\:{R}^{T\times\:n},\:where\:{z}_{t}=\:z,\:\forall\:t$$\end{document} This repeated dense feature sequence Z is then concatenated with the LSTM output \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Z=\:\left\{{h}_{1},{h}_{2},\:\dots\:,{h}_{T}\right\}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\in\:\:{R}^{T\times\:{d}_{h}\:}$$\end{document}at each time step to form the unified feature representation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{X}^{{\prime\:}}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\in\:\:{R}^{T\times\:({d}_{h}+n)\:}$$\end{document}:8\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{x}_{t}^{{\prime\:}}=\:\mathrm{c}\mathrm{o}\mathrm{n}\mathrm{c}\mathrm{a}\mathrm{t}({h}_{t},\:{z}_{t})$$\end{document} As a reults, this dual-stream architecture ensures that PA-LSTM is robust against localized noise and noise and sensor drift, as it maintains a global memory of the pressure state throughout the entire prediction process. Attention layer Following the concatenation of temporal features from the LSTM branch and static features from the dense pathway, the resulting combined representation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{X}^{{\prime\:}}=\:\left\{{x}_{1}^{{\prime\:}},{x}_{2}^{{\prime\:}},\:\dots\:,{x}_{T}^{{\prime\:}}\right\}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\in\:\:{R}^{T\times\:{d}^{{\prime\:}}\:}$$\end{document} is passed through an attention mechanism to enable dynamic weighting of time steps. As illustrated in Fig. 5D, we employ a variant of Bahdanau attention-\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\boldsymbol{f}}_{\boldsymbol{a}}$$\end{document}, which computes attention scores across the time dimension without reducing the temporal resolution. This design allows the model to retain time-step-level structure while emphasizing the most informative parts of the sequence. For each time step t, the attention mechanism computes an alignment score based on a learned projection:9\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{e}_{t}={v}^{T}\mathrm{t}\mathrm{a}\mathrm{n}\mathrm{h}({Wx}_{t}^{{\prime\:}}+b)$$\end{document} where: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:W\in\:\:{R}^{{d}^{{\prime\:}}\times\:\:u},b\:\in\:\:{R}^{u},\:and\:v\:\in\:\:{R}^{u}\:\:$$\end{document}are trainable parameters, u denotes the attention dimensionality (here set to 64),\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{x}_{t}^{{\prime\:}}\:\in\:\:{R}^{{d}^{{\prime\:}}}$$\end{document} is the concatenated feature vector at time step t. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:W\in\:\:{R}^{{d}^{{\prime\:}}\times\:\:u},b\:\in\:\:{R}^{u},\:and\:v\:\in\:\:{R}^{u}\:\:$$\end{document}are trainable parameters, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:W\in\:\:{R}^{{d}^{{\prime\:}}\times\:\:u},b\:\in\:\:{R}^{u},\:and\:v\:\in\:\:{R}^{u}\:\:$$\end{document}are trainable parameters, u denotes the attention dimensionality (here set to 64), u denotes the attention dimensionality (here set to 64), \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{x}_{t}^{{\prime\:}}\:\in\:\:{R}^{{d}^{{\prime\:}}}$$\end{document} is the concatenated feature vector at time step t. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{x}_{t}^{{\prime\:}}\:\in\:\:{R}^{{d}^{{\prime\:}}}$$\end{document} is the concatenated feature vector at time step t. The alignment scores are then normalized via the softmax function:10\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\alpha\:}_{t}=\frac{\mathrm{e}\mathrm{x}\mathrm{p}\left({e}_{t}\right)}{{\varSigma\:}_{k=1}^{T}\mathrm{e}\mathrm{x}\mathrm{p}\left({e}_{k}\right)}$$\end{document} The final output of the attention layer is a context-enhanced sequence \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\stackrel{\sim}{X}=\:\left\{{\stackrel{\sim}{x}}_{1},{\stackrel{\sim}{x}}_{2},\:\dots\:,{\stackrel{\sim}{x}}_{T}\right\}$$\end{document}, where each step is modulated by its corresponding attention weight:11\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\stackrel{\sim}{x}}_{t}={\alpha\:}_{t}\:\times\:\:{x}_{t}^{{\prime\:}}$$\end{document} This operation preserves the original sequence length T, while adaptively amplifying the contribution of more relevant time steps. The attention-enhanced representation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\stackrel{\sim}{X}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\in\:\:{R}^{T\times\:{d}^{{\prime\:}}\:}$$\end{document}is then forwarded to the final dense output layer for regression. Output layer Following the attention mechanism, the context-aware feature sequence \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\stackrel{\sim}{X}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\in\:\:{R}^{T\times\:{d}^{{\prime\:}}\:}$$\end{document} is first flattened into a single vector to aggregate temporal information across all time steps. This transformation collapses the temporal dimension, allowing the model to summarize the entire sequence into a compact representation suitable for final prediction. As illustrated in Fig. 5E, the flattened vector is passed through a fully connected dense layer with ReLU activation, which projects the aggregated sequence into a higher-level feature space. This intermediate transformation captures complex nonlinear interactions among time-encoded features, producing a hidden representation. Finally, the output of this layer is fed into a regression head, implemented as a single-unit dense layer with linear activation, to produce the final displacement prediction \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\widehat{y}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\in\:\:R$$\end{document}. This process can be formally expressed as:12\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\widehat{y}=\:\:{f}_{d1}\left(C\right)=\:{W}_{2}\times\:ReLU\times\:\left({W}_{1}\times\:Flatten\left(\stackrel{\sim}{X}\right)+\:{b}_{1}\right)+\:{b}_{2}$$\end{document} Where: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{W}_{1}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\in\:\:{R}^{h\times\:\:T{d}^{{\prime\:}}\:}$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{b}_{1}\:\in\:\:{R}^{h\:}$$\end{document}: parameters of the intermediate dense layer,\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{W}_{2}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\in\:\:{R}^{h\times\:\:T{d}^{{\prime\:}}\:}$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{b}_{1}\:\in\:\:R$$\end{document} : parameters of the output layer, h: number of hidden units in the intermediate dense layer (e.g., 64), \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{W}_{1}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\in\:\:{R}^{h\times\:\:T{d}^{{\prime\:}}\:}$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{b}_{1}\:\in\:\:{R}^{h\:}$$\end{document}: parameters of the intermediate dense layer, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{W}_{1}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\in\:\:{R}^{h\times\:\:T{d}^{{\prime\:}}\:}$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{b}_{1}\:\in\:\:{R}^{h\:}$$\end{document}: parameters of the intermediate dense layer, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{W}_{2}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\in\:\:{R}^{h\times\:\:T{d}^{{\prime\:}}\:}$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{b}_{1}\:\in\:\:R$$\end{document} : parameters of the output layer, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{W}_{2}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\in\:\:{R}^{h\times\:\:T{d}^{{\prime\:}}\:}$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{b}_{1}\:\in\:\:R$$\end{document} : parameters of the output layer, h: number of hidden units in the intermediate dense layer (e.g., 64), h: number of hidden units in the intermediate dense layer (e.g., 64), This configuration ensures that the model outputs a single continuous value per sequence, aligned with the objective of point-wise regression for displacement estimation. Loss function & training details To train the proposed PA-LSTM model effectively for the task of displacement prediction, we formulate the learning objective as a univariate regression problem. Let \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\widehat{y}\:\in\:\:R$$\end{document} denote the predicted mechanical displacement at a given time window, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:y\:\in\:\:R$$\end{document} be the corresponding ground truth value obtained from the encoder. The model is optimized to minimize the Mean Squared Error (MSE) between predictions and true values. The MSE loss encourages the model to produce estimates that are, on average, close to the ground truth in a squared-error sense, and penalizes larger deviations more heavily. The network parameters, including those in the LSTM layer, the dense pathway, and the Bahdanau attention module, are learned in an end-to-end manner using the Adam optimizer. Adam is well-suited for non-stationary time-series tasks due to its adaptive learning rate and bias correction mechanisms. The choice of hyperparameters was determined through a systematic manual tuning process to ensure stable convergence and minimize the prediction error. Unless otherwise stated, the optimizer’s hyperparameters are set as follows: Learning rate \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{\upalpha\:}\:=10}^{-3}$$\end{document}: Controls the step size during parameter updates. This value was selected after evaluating a range of rates from \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{10}^{-2}$$\end{document} to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{10}^{-4}$$\end{document}, where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{10}^{-3}$$\end{document} provided the optimal balance between convergence speed and stability (as shown in Table 1).Exponential decay rate for the first moment estimate \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\beta\:}_{1}$$\end{document}= 0.9: determines how much past gradients influence the current estimate of the mean of the gradients.Exponential decay rate for the second moment estimate \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\beta\:}_{2}$$\end{document}= 0.999: controls the moving average of the squared gradients (i.e., the uncentered variance).Epsilon \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\epsilon={10}^{-7}$$\end{document}: a small constant to avoid division by zero. Learning rate \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{\upalpha\:}\:=10}^{-3}$$\end{document}: Controls the step size during parameter updates. This value was selected after evaluating a range of rates from \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{10}^{-2}$$\end{document} to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{10}^{-4}$$\end{document}, where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{10}^{-3}$$\end{document} provided the optimal balance between convergence speed and stability (as shown in Table 1). Learning rate \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{\upalpha\:}\:=10}^{-3}$$\end{document}: Controls the step size during parameter updates. This value was selected after evaluating a range of rates from \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{10}^{-2}$$\end{document} to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{10}^{-4}$$\end{document}, where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{10}^{-3}$$\end{document} provided the optimal balance between convergence speed and stability (as shown in Table 1). Exponential decay rate for the first moment estimate \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\beta\:}_{1}$$\end{document}= 0.9: determines how much past gradients influence the current estimate of the mean of the gradients. Exponential decay rate for the first moment estimate \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\beta\:}_{1}$$\end{document}= 0.9: determines how much past gradients influence the current estimate of the mean of the gradients. Exponential decay rate for the second moment estimate \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\beta\:}_{2}$$\end{document}= 0.999: controls the moving average of the squared gradients (i.e., the uncentered variance). Exponential decay rate for the second moment estimate \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\beta\:}_{2}$$\end{document}= 0.999: controls the moving average of the squared gradients (i.e., the uncentered variance). Epsilon \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\epsilon={10}^{-7}$$\end{document}: a small constant to avoid division by zero. Epsilon \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\epsilon={10}^{-7}$$\end{document}: a small constant to avoid division by zero. These parameters allow Adam to effectively handle sparse gradients and noisy data, characteristics commonly observed in time-series sensor signals. To prevent overfitting and ensure optimal generalization, an Early Stopping mechanism was employed, monitoring the validation loss with a patience of 10 epochs. The training process exhibited rapid and stable convergence, confirming the effectiveness of the selected hyperparameter configuration for the displacement prediction task. The mathematical formulation of the Adam update rule is given by:13\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{m}_{t}={\beta\:}_{1}\times\:{m}_{t-1}+\left(1-{\beta\:}_{1}\right)\times\:{g}_{t}$$\end{document}14\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{v}_{t}={\beta\:}_{2}\times\:{v}_{t-1}+\left(1-{\beta\:}_{2}\right)\times\:{g}_{t}^{2}$$\end{document}15\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\widehat{m}}_{t}=\frac{{m}_{t}}{1-{\beta\:}_{1}^{t}}$$\end{document}16\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\widehat{v}}_{t}=\frac{{v}_{t}}{1-{\beta\:}_{2}^{t}}$$\end{document}17\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\theta\:}_{t}={\theta\:}_{t-1}-{\upalpha\:}\times\:\frac{{\widehat{m}}_{t}}{\sqrt{{\widehat{v}}_{t}}-\epsilon}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{g}_{t}$$\end{document} is the gradient at time step t,\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\theta\:}_{t}$$\end{document} denotes the model parameters,\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{m}_{t},\:{v}_{t}$$\end{document} are the first and second moment estimates respectively,\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\widehat{m}}_{t}$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\widehat{v}}_{t}$$\end{document} are the bias-corrected estimates of the first and second moments. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{g}_{t}$$\end{document} is the gradient at time step t, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{g}_{t}$$\end{document} is the gradient at time step t, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\theta\:}_{t}$$\end{document} denotes the model parameters, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\theta\:}_{t}$$\end{document} denotes the model parameters, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{m}_{t},\:{v}_{t}$$\end{document} are the first and second moment estimates respectively, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{m}_{t},\:{v}_{t}$$\end{document} are the first and second moment estimates respectively, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\widehat{m}}_{t}$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\widehat{v}}_{t}$$\end{document} are the bias-corrected estimates of the first and second moments. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\widehat{m}}_{t}$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\widehat{v}}_{t}$$\end{document} are the bias-corrected estimates of the first and second moments. The training process is conducted using the TensorFlow 2.13 framework and executed on a NVIDIA GeForce RTX 5060 Ti GPU, which provides significant acceleration during training by enabling fast parallel computation, especially in the LSTM and attention layers. The batch size is set to 16, and the number of epochs is capped at 50. To prevent overfitting and reduce unnecessary computation, an early stopping mechanism is employed with a patience of 5 epochs, monitoring the validation loss. Table 1Performance of PA-LSTM under different hyperparameter settings.Learning Rate (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\upalpha\:}$$\end{document})Batch SizeRMSEConvergence stability0.01320.0842Unstable (Oscillatory) 0.001 (Proposed) 32 0.0474 Highly stable 0.0001320.0615Slow convergence0.001640.0521ModerateSignificant values are in bold. Table 1Performance of PA-LSTM under different hyperparameter settings.Learning Rate (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\upalpha\:}$$\end{document})Batch SizeRMSEConvergence stability0.01320.0842Unstable (Oscillatory) 0.001 (Proposed) 32 0.0474 Highly stable 0.0001320.0615Slow convergence0.001640.0521ModerateSignificant values are in bold. Performance of PA-LSTM under different hyperparameter settings. Significant values are in bold. This training configuration enables the PA-LSTM model to effectively learn both local temporal dynamics and global contextual patterns from noisy pressure signals, ultimately improving the accuracy of displacement prediction in soft-sensor-enabled systems. Results & discussion Evaluation metrics The performance of the proposed PA-LSTM model in predicting mechanical displacement from pressure signals is rigorously assessed using a set of widely accepted regression evaluation metrics. These metrics offer complementary insights into both the accuracy and robustness of the model’s predictions: Mean squared error (MSE) The primary loss funtion used during training, MSE quantifies the average squared difference between the predicted displacement \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\widehat{y}}_{i}$$\end{document} and the grouth truth \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{y}_{i}$$\end{document}:18\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:MSE=\frac{1}{N}\sum\:_{i=1}^{N}{({y}_{i}-{\widehat{y}}_{i})}^{2}$$\end{document} MSE penalizes larger errors more heavily, making it particularly sensitive to significant devitations and thus suitable for applications where high precision is critical. Fig. 6A - Architecture of a Vanilla LSTM Model. B - Architecture of a GRU Model. C - Architecture of an LSTM followed by a Dense Layer. D - Architecture of a CNN followed by LSTM for Spatiotemporal Modeling. A - Architecture of a Vanilla LSTM Model. B - Architecture of a GRU Model. C - Architecture of an LSTM followed by a Dense Layer. D - Architecture of a CNN followed by LSTM for Spatiotemporal Modeling. Root mean squared error (RMSE) As the square root of MSE, RMSE has the same unit as the ouput variable (displacement), offering a more interpretable measure of error magnitude:19\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:RMSE=\sqrt{MSE}=\sqrt{\frac{1}{N}\sum\:_{i=1}^{N}{({y}_{i}-{\widehat{y}}_{i})}^{2}}$$\end{document} Mean absolute error (MAE) MAE measures the average absolute different between predictions and actual values:20\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:MAE=\frac{1}{N}\sum\:_{i=1}^{N}\left|{y}_{i}-{\widehat{y}}_{i}\right|$$\end{document} Compared to MSE, MAE is less sensitive to outliers and provides a more balanced view of overall prediction accuracy. Coefficient of Dertemination ( R2 Score) \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{R}^{2}$$\end{document} quantifies the proportion of variance in the target variable that is captured by the model. It is defined as:21\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{R}^{2}\:=1-\frac{\sum\:_{i=1}^{N}{({y}_{i}-{\widehat{y}}_{i})}^{2}}{\sum\:_{i=1}^{N}{({y}_{i}-\bar{y})}^{2}}$$\end{document} Where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\bar{y}$$\end{document} is the mean of the ground truth displacement. An \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{R}^{2}$$\end{document} score of 1 indicates perfect predictions, whereas a score closer to 0 or negative reflects poor model performance. Benchmarking against standard architectures The effectiveness of the proposed PA-LSTM architecture is benchmarked against several representative baseline models widely used in time-series regression. These models span both standard recurrent architectures and convolution-recurrent hybrids, providing a comprehensive context for performance evaluation. As illustrated in Fig. 6, the first baseline (A) is a Vanilla LSTM model, consisting of a single-layer LSTM network without any attention mechanism. While capable of capturing temporal dependencies, this model lacks the capacity to emphasize salient time steps within the sequence. The second baseline (B) employs a Gated Recurrent Unit (GRU), a simplified recurrent cell designed to address vanishing gradient issues with fewer parameters. This model shares the same structural configuration as the Vanilla LSTM, providing a direct comparison between recurrent unit types. The third baseline (C) augments the Vanilla LSTM with an additional dense output layer, enhancing the model’s ability to perform nonlinear regression by refining the latent representation before prediction. Finally, the fourth baseline (D) explores a CNN–LSTM hybrid, where a convolutional neural network is first applied to extract local temporal features from the pressure signal, which are then fed into an LSTM layer to capture sequential dependencies. This configuration examines whether spatial filtering can improve temporal modeling in the displacement prediction task. Table 2Performance comparison of different models on displacement prediction.ModelTest lossRMSEMAE\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\boldsymbol{R}}^{2}$$\end{document}ScoreVanilla LSTM0.0119\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00060.0749\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00210.0515\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00180.9088\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.0045LSTM with dense output0.0109\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00050.0683\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00190.0441\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00150.9242\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.0038GRU Model0.0178\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00090.0792\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00250.0559\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00220.8980\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.0052CNN-LSTM hybrid0.0118\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00070.0722\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00220.0489\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00170.9152\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.0041 PA-LSTM 0.0043 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document} 0.0002 0.0474 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document} 0.0011 0.0276 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document} 0.0009 0.9634 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document} 0.0018 Significant values are in bold. Table 2Performance comparison of different models on displacement prediction.ModelTest lossRMSEMAE\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\boldsymbol{R}}^{2}$$\end{document}ScoreVanilla LSTM0.0119\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00060.0749\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00210.0515\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00180.9088\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.0045LSTM with dense output0.0109\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00050.0683\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00190.0441\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00150.9242\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.0038GRU Model0.0178\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00090.0792\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00250.0559\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00220.8980\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.0052CNN-LSTM hybrid0.0118\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00070.0722\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00220.0489\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.00170.9152\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.0041 PA-LSTM 0.0043 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document} 0.0002 0.0474 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document} 0.0011 0.0276 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document} 0.0009 0.9634 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document} 0.0018 Significant values are in bold. Performance comparison of different models on displacement prediction. Significant values are in bold. All baseline models are trained under identical experimental conditions as PA-LSTM, including input sequence length, optimization settings, batch size, and early stopping criteria. To ensure a fair comparison, hyperparameters such as the number of hidden units and activation functions are kept consistent across models where applicable. Quantitative results This section presents the quantitative performance comparison of the proposed PA-LSTM model against several baseline architectures described in Sect. 3.2, using the evaluation metrics outlined in Sect. 3.1. Table 2 presents the comparative performance of the proposed PA-LSTM model and four baseline architectures on the task of displacement prediction. The evaluation is conducted using four widely adopted regression metrics: test loss (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and the coefficient of determination (R²). These metrics collectively assess both the accuracy and reliability of the predicted displacement values against ground-truth measurements. To ensure robustness, all models were evaluated over 5 independent runs with randomized initializations, and results are reported as the mean \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:\:$$\end{document}standard deviation. As shown in Table 2, the PA-LSTM model clearly outperforms all other baselines across all evaluation criteria. Specifically, it achieves the lowest RMSE (0.0474) and MAE (0.0276), indicating superior prediction accuracy and reduced average deviation from the true displacement values. Additionally, the PA-LSTM yields the highest R² score (0.9634), demonstrating a strong fit to the observed data and suggesting that it captures the underlying temporal and contextual dynamics more effectively than its counterparts. Compared to the Vanilla LSTM, which records an RMSE of 0.0749 and R² of 0.9088, the PA-LSTM achieves a 36.7% reduction in RMSE and a notable 5.4% improvement in R². The LSTM with Dense Output and the CNN-LSTM Hybrid also show competitive results (R² of 0.9242 and 0.9152, respectively), yet they fall short of the proposed model’s performance. Even the GRU-based model, which is known for its parameter efficiency, exhibits significantly higher errors (RMSE: 0.0792, MAE: 0.0559, R²: 0.8980), highlighting the advantage of the parallel attention-enhanced design in PA-LSTM. Overall, the results validate the effectiveness of integrating LSTM with a dense pathway and attention mechanism. The PA-LSTM model not only excels in predictive accuracy but also demonstrates greater robustness in capturing both short-term fluctuations and long-term dependencies within pressure sequences. To thoroughly evaluate the computational and accuracy trade-offs against alternative sequence architectures, we supplement our results with an academic baseline comparison against a Lightweight Temporal Convolutional Network (TCN)42 and a Simplified Transformer (2-layer encoder structure with reduced head dimensionality)43,44. Within the short temporal horizon ( W=50), contemporary time-series benchmarks42,44 demonstrate that a Simplified Transformer and a Lightweight TCN operate within predictable performance boundaries, establishing representative localized RMSE margins of 0.058 and 0.071, respectively. Although the computational overhead of the self-attention mechanism in the Simplified Transformer remains well within the tolerable processing thresholds of modern microcontrollers for short sequences, its accuracy remains lower than that of the proposed PA-LSTM (RMSE of 0.047). This quantitative disparity highlights that merely stacking standard sequential attention or temporal convolutions is insufficient to insulate the system against soft-sensor non-linearities; the explicit isolation of instantaneous spatial-like features offered by our parallel dense embedding pathway remains vital for robust calibration. Furthermore, while the physical datasets capture initial non-linear drift within 4-hour windows, long-term deployments introduce extended viscoelastic relaxation and diurnal thermal fluctuations. To evaluate the model’s theoretical resilience against such low-frequency degradation, a controlled drift-injection sensitivity analysis was conducted by superimposing a synthetic artifact onto the raw inputs \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{x}_{t}$$\end{document}, yielding the corrupted sequence \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{x}_{t}^{drift}=\:{x}_{t}+\:{A}_{drift}\left(1-{e}^{-\frac{t}{\tau\:}}\:\right)+\:{B}_{drift}\mathrm{sin}\left(\omega\:t\right)$$\end{document}, where the exponential and sinusoidal terms emulate long-term material relaxation and environmental thermal cycles, respectively. Under these severe drift conditions, the standard sequential LSTM exhibited tracking breakdown, with its RMSE deteriorating to 0.124 due to error accumulation across its step-by-step hidden states \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{h}_{t}$$\end{document}. Conversely, the proposed PA-LSTM sustained highly robust performance, preserving an RMSE of 0.053. This architectural resilience is driven by the parallel dense embedding pathway (Eq. 6) working in tandem with the Bahdanau attention mechanism (Eq. 11). This dual-pathway structure allows the attention weights \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\alpha\:}_{t}$$\end{document} to act as an adaptive spatial-temporal filter, dynamically de-weighting the time steps heavily corrupted by the low-frequency baseline shift within the concatenated features, while isolating the fast-varying kinematic features essential for precise displacement estimation. In addition to predictive accuracy, computational efficiency was evaluated to assess real-time deployment feasibility. All recurrent-based models, including PA-LSTM, exhibit linear complexity with respect to sequence length. The proposed model introduces only a minor overhead from the dense and attention components while preserving the same asymptotic efficiency as standard LSTM. In contrast, Transformer-based models incur quadratic complexity, leading to significantly higher computational and memory demands. As a result, PA-LSTM achieves an effective balance between accuracy and efficiency, making it well-suited for low-latency inference in resource-constrained wearable rehabilitation systems. Visualization A comprehensive analysis of the predictive behavior of all evaluated models is provided through the visualization presented in Fig. 7. Each row corresponds to a different model, with the left panel showing the entire sequence of predicted and ground truth displacement values, and the right panel offering a zoomed-in view to highlight local temporal dynamics. Among all models, the PA-LSTM architecture exhibits the most accurate alignment with the ground truth. Its predicted displacement curve closely follows the reference trajectory both globally and locally, successfully capturing not only long-term trends but also rapid fluctuations and sharp transitions. The Vanilla LSTM and GRU models, by contrast, display noticeable discrepancies, especially around peaks and areas of abrupt change, suggesting a tendency to underfit the dynamic characteristics of the signal. The CNN-LSTM hybrid shows moderate improvements, benefiting from the convolutional layer’s ability to extract local features. However, it still struggles to maintain high precision in complex or noisy segments. The LSTM model with an additional dense output layer provides smoother predictions than the baseline LSTM, but its performance remains inferior to the proposed model, particularly in capturing fine-grained variations. These qualitative observations are consistent with the quantitative results reported in Table 2, further validating the benefits of combining dense representation learning with attention-based temporal weighting. The visualization highlights the PA-LSTM model’s capacity to learn intricate mappings from pressure signals to displacement, even under challenging sensor conditions. To complement the training analysis and assess generalization capability, Fig. 8 illustrates the displacement prediction results on an unseen test dataset for all evaluated models. The layout mirrors the training visualization, where each row corresponds to a different model architecture. The left-hand plots present the entire predicted and ground truth sequences, while the right-hand plots zoom into representative segments to examine local prediction accuracy. Fig. 7Qualitative comparison of predicted and ground truth displacement signals on the training dataset (approximately 2 h) for different model architectures. Each row corresponds to a specific model, with the left plot showing the full signal and the right plot providing a magnified view of a representative segment. Qualitative comparison of predicted and ground truth displacement signals on the training dataset (approximately 2 h) for different model architectures. Each row corresponds to a specific model, with the left plot showing the full signal and the right plot providing a magnified view of a representative segment. Fig. 8Qualitative comparison of predicted and ground truth displacement signals on the unseen test dataset (Dataset A) across different model architectures. Each row corresponds to a specific model, with the left plot showing the full prediction sequence and the right plot presenting a magnified view for local accuracy analysis. Qualitative comparison of predicted and ground truth displacement signals on the unseen test dataset (Dataset A) across different model architectures. Each row corresponds to a specific model, with the left plot showing the full prediction sequence and the right plot presenting a magnified view for local accuracy analysis. Among all models, the PA-LSTM continues to demonstrate the highest fidelity in capturing both global displacement patterns and subtle fluctuations. The predicted signals from PA-LSTM align closely with the ground truth, even in regions characterized by abrupt transitions or noisy measurements. In contrast, traditional architectures such as Vanilla LSTM and GRU show increased deviation, particularly in high-frequency or rapidly changing segments. This performance gap indicates their limited ability to adapt to unseen temporal dynamics. The CNN-LSTM Hybrid maintains moderate alignment but still exhibits occasional overshooting and lag. Notably, the LSTM with Dense Output performs better than purely recurrent models by producing smoother curves, yet it struggles to fully adapt in scenarios with signal noise and nonlinearity. These test-time visualizations provide further evidence of the robustness and generalization strength of the proposed PA-LSTM model. Its superior performance across both training and unseen data underscores the benefit of integrating a dense representation pathway and attention mechanism in modeling complex sensor-driven displacement dynamics. Computational efficiency and hardware benchmarking To evaluate the feasibility of the proposed PA-LSTM for real-time applications in wearable rehabilitation systems, we performed a comprehensive hardware benchmarking analysis. The execution metrics were evaluated across two distinct computing environments: (1) our laboratory workstation GPU (NVIDIA GeForce RTX 5060 Ti), and (2) a standard laptop CPU (Intel Core i7) executing in single-thread mode to simulate a portable, general-purpose edge computing setup. The inference metrics were averaged over 1,000 continuous individual test trials to ensure numerical consistency. Table 3 summarizes the hardware benchmarking results for all evaluated architectures. Table 3Hardware benchmarking and computational efficiency profile of different models.ModelPlatformInference Latency (ms)Model Size (MB)Peak Memory Footprint (MB)Vanilla LSTMLab Workstation (RTX 5060 Ti)0.08\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.019.5482.4 (VRAM)LSTM with dense outputLab Workstation (RTX 5060 Ti)0.11\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.0112.3486.8 (VRAM)GRU modelLab Workstation (RTX 5060 Ti)0.09\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.0110.8484.5 (VRAM)CNN-LSTM hybridLab Workstation (RTX 5060 Ti)0.12\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.0214.2489.1 (VRAM) PA-LSTM Lab Workstation (RTX 5060 Ti) 0.14 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document} 0.01 16.5 492.4 (VRAM) Vanilla LSTMStandard Laptop (CPU)0.32\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.029.538.8 (RAM)LSTM with dense outputStandard Laptop (CPU)0.45\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.0312.342.1 (RAM)GRU ModelStandard Laptop (CPU)0.38\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.0210.840.5 (RAM)CNN-LSTM hybridStandard Laptop (CPU)0.61\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.0414.245.4 (RAM) PA-LSTM Standard Laptop (CPU) 0.72 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document} 0.05 16.5 48.3 (RAM) Significant values are in bold. Table 3Hardware benchmarking and computational efficiency profile of different models.ModelPlatformInference Latency (ms)Model Size (MB)Peak Memory Footprint (MB)Vanilla LSTMLab Workstation (RTX 5060 Ti)0.08\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.019.5482.4 (VRAM)LSTM with dense outputLab Workstation (RTX 5060 Ti)0.11\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.0112.3486.8 (VRAM)GRU modelLab Workstation (RTX 5060 Ti)0.09\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.0110.8484.5 (VRAM)CNN-LSTM hybridLab Workstation (RTX 5060 Ti)0.12\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.0214.2489.1 (VRAM) PA-LSTM Lab Workstation (RTX 5060 Ti) 0.14 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document} 0.01 16.5 492.4 (VRAM) Vanilla LSTMStandard Laptop (CPU)0.32\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.029.538.8 (RAM)LSTM with dense outputStandard Laptop (CPU)0.45\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.0312.342.1 (RAM)GRU ModelStandard Laptop (CPU)0.38\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.0210.840.5 (RAM)CNN-LSTM hybridStandard Laptop (CPU)0.61\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document}0.0414.245.4 (RAM) PA-LSTM Standard Laptop (CPU) 0.72 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\pm\:$$\end{document} 0.05 16.5 48.3 (RAM) Significant values are in bold. Hardware benchmarking and computational efficiency profile of different models. Significant values are in bold. As demonstrated in Table 3, although the integration of parallel attention pathways slightly increases the computational overhead compared to the standard recurrent baselines, the proposed PA-LSTM maintains an exceptional real-time execution profile across both hardware tiers. On our laboratory workstation’s NVIDIA GeForce RTX 5060 Ti GPU, the parallel computation capabilities accelerate the inference to a mere 0.14 ms per sample. Even when deployed on a standard laptop CPU environment, the model achieves a remarkably low latency of 0.72 ms. Given that human joint kinematics and soft sensor dynamics in rehabilitation environments operate at low frequencies (typically requiring a control loop budget of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\le\:$$\end{document} 20 ms for a 50 Hz threshold), an inference speed well below 1 ms is more than sufficient for high-fidelity, real-time closed-loop displacement tracking. Furthermore, the compact model size (16.5 MB) and the highly optimized peak memory footprint firmly validate that the PA-LSTM can be comfortably deployed in practical monitoring setups without causing memory-bound performance degradation. Discussion The experimental results presented in the previous section demonstrate the superior performance of the proposed PA-LSTM model in modeling pressure-to-displacement dynamics. By integrating a parallel dense pathway and an attention mechanism, the model is able to effectively capture both short-term temporal features and static, domain-specific characteristics. This integration results in improved prediction accuracy over conventional LSTM-based architectures. This advancement directly addresses the core challenges of wearable sensing through two major contributions. First, the noisy and unstable nature of soft sensor signals typically plagued by high frequency artifacts and long term drift27,28 was successfully mitigated by our preprocessing pipeline. While prior studies often overlook high frequency noise in soft tactile filaments25, our approach utilizing moving average filtering, downsampling, and min max normalization effectively suppressed noise components above 50 Hz, as confirmed by spectral analysis (Fig. 4B). This pipeline provides a significantly cleaner and more structured input than the raw, unfiltered data streams commonly utilized in baseline recurrent models21,23. Second, from an architectural perspective, the PA-LSTM overcomes the inherent nonidealities of soft sensors and the uniform gating limitations of conventional models2,14,21. By fusing a dense global pressure embedding with temporally resolved LSTM features, the attention mechanism gains simultaneous access to instantaneous dynamics and window-level context. This allows the model to selectively highlight physically meaningful deformation events while suppressing slow-varying drift and motion artifacts without requiring explicit physical modeling. Furthermore, unlike recent hybrid models such as the one by Khatun et al.17 that rely on a single attention pathway and risk overlooking sparse clinical events, our parallel attention-enhanced structure ensures that transient, high diagnostic value indicators like spastic reflexes or freezing of gait (FoG) are effectively preserved and prioritized. Crucially, this dual-stream architecture addresses a fundamental limitation of standard sequential attention-augmented LSTMs regarding error propagation. In traditional architectures where attention is applied serially to the hidden states, the recurrent connections mathematically function as a quasi-integrator. Consequently, physical nonidealities intrinsic to filament-based soft sensors, such as long-term drift and hysteresis, are inherently accumulated and amplified across successive hidden states. By routing raw structural features through the parallel dense embedding pathway outside the recurrent loop, the PA-LSTM effectively breaks this error propagation loop. This mathematical decoupling ensures that instantaneous displacement cues are preserved and fused adaptively with temporal encodings, thereby preventing the severe degradation of prediction accuracy caused by cumulative sensor drift over extended operation cycles. By contrast, the proposed combination of a dense embedding pathway and a Bahdanau-style attention mechanism allows for a dual-stream focus. This enables the model to assign dynamic importance across time steps more effectively than traditional LSTMs or single-attention frameworks, thereby focusing on clinically relevant signal segments and ignoring irrelevant fluctuations caused by soft-tissue artifacts20,22. Furthermore, although recent lightweight Transformer-based sequence models provide strong global representation capability, they were not included in our baseline comparisons due to two practical limitations. First, the quadratic computational complexity of self-attention \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\left(O\left({T}^{2}\right)\right)\:$$\end{document} introduces considerable memory and processing overhead, making real-time deployment on resource-constrained wearable microcontrollers difficult43. Second, compared with recurrent architectures, Transformers do not inherently encode temporal continuity, which may reduce robustness when learning from localized and noisy soft-sensor time-series data44. The model architecture (Fig. 5A–E) illustrates this full pipeline, demonstrating how parallel feature encoding achieves a more robust and precise prediction process compared to the strictly sequential or serial-attention architectures discussed in previous literature8,9,21. These architectural choices not only improved interpretability but also enhanced robustness in both training and testing phases. Quantitative results shown in Table 2 indicate that PA-LSTM consistently outperforms baseline models, achieving an RMSE of 0.0474, MAE of 0.0276, and R² of 0.9634. Qualitative visualizations in Fig. 7 (training data) and Fig. 8 (test data) further confirm that PA-LSTM closely tracks both global and local displacement patterns, even in segments with rapid transitions or irregularities. Unlike other models, which tend to underfit sharp transitions or oversmooth noisy regions, PA-LSTM maintains high fidelity in both steady and dynamic intervals. From a practical standpoint, this performance holds promising implications for real-time displacement estimation in soft robotic and rehabilitation systems. Physiotherapists or assistive devices could benefit from more precise feedback, improving monitoring and control during therapeutic sessions or human–robot interactions. The strong temporal alignment between predicted and actual displacement signals supports the feasibility of deploying PA-LSTM in real-world clinical environments. Regarding the experimental setup, while this study utilizes data from a controlled linear slider and piston-driven system, this choice was deliberate to ensure a high-fidelity “Proof of Concept”. By using a mechanical platform, we were able to obtain absolute ground truth measurements from high-precision motor encoders, which is essential for validating the fundamental accuracy of the PA-LSTM architecture. Testing on human subjects at this early stage would introduce significant confounding variables, such as involuntary movements, soft-tissue artifacts, and inconsistent sensor donning, which could obscure the evaluation of the model’s intrinsic predictive capabilities. Therefore, the current controlled environment serves as a rigorous baseline, establishing the necessary technical validation before proceeding to complex clinical trials and wearable deployment on human limbs. Future work will focus on extending the proposed framework to wearable implementations on human subjects, including clinical evaluation during active knee rehabilitation tasks in collaboration with medical institutions and subject to standard ethical approvals. Additionally, incorporating multi-modal sensing (e.g., IMU or EMG signals) and subject-specific adaptation strategies may further improve robustness under real-world conditions. Looking forward, transitioning from controlled mechanical platforms to practical wearable devices introduces the critical challenge of label scarcity, as high-precision encoders cannot be integrated into daily-wear garments. To bridge this gap, future evolutionary pathways must leverage emerging unsupervised and self-supervised time-series sensing paradigms. To eliminate the dependency on strictly aligned paired labels, unsupervised cross-domain mapping utilizing Generative Adversarial Networks, such as the HEROS-GAN framework45, can be adapted to map raw, uncalibrated soft sensor signals directly to idealized displacement topologies. Furthermore, drawing inspiration from pioneering self-supervised frameworks in the inertial sensing field46, self-supervised learning can be seamlessly integrated into our architecture. By pre-training the temporal encoder on large-scale, unlabeled multi-subject movement datasets via pretext tasks (e.g., masked signal reconstruction), the model can learn universal, robust motion representations. This foundation will enable few-shot adaptation and self-calibration in unconstrained, real-world rehabilitation environments, accelerating the transition from laboratory settings to broad clinical adoption. Despite its strong performance, the proposed model has several limitations. First, the risk of overfitting remains, particularly when training on small or unbalanced datasets. Although early stopping was employed to mitigate this issue, further validation on larger and more diverse datasets is necessary. Second, while the current study used synthetic and controlled experimental data, real-world scenarios may introduce additional noise sources and inter-subject variability that were not fully captured. Third, although PA-LSTM is more efficient than Transformer-based models, its integration into ultra-low-power microcontrollers still requires careful optimization. Future work will explore techniques such as model compression and pruning to reduce computational overhead. Moreover, applying transfer learning to new sensor modalities or adapting the model to patient-specific contexts could enhance generalization. Integrating multi-modal signals, including EMG and joint angle sensors, may also improve prediction accuracy and system robustness, further supporting the goal of adaptive and personalized rehabilitation monitoring. Conclusion This paper presents PA-LSTM, a parallel attention-enhanced architecture for predicting mechanical displacement from soft pressure signals in rehabilitation-oriented sensing systems. The model integrates an LSTM-based temporal encoder with a parallel dense representation pathway and a Bahdanau-style attention mechanism, enabling effective extraction of both temporal dynamics and global contextual features. By applying attention to the fused representation, the model can emphasize informative signal segments while mitigating the effects of noise, drift, and nonlinear sensor behavior. Experimental results show that PA-LSTM consistently outperforms baseline models, including Vanilla LSTM, GRU, and CNN–LSTM, across RMSE, MAE, and R² metrics. The model demonstrates strong capability in capturing both short-term fluctuations and long-term trends, supported by qualitative and quantitative evaluations. In addition, its linear computational complexity makes it suitable for real-time inference in resource-constrained environments. From an application perspective, PA-LSTM provides a promising solution for wearable rehabilitation and soft robotic sensing systems, where accurate and efficient displacement estimation is required. However, the current study is based on a controlled experimental setup, which does not fully reflect real-world variability. Future work will focus on validation in wearable deployments on human subjects, as well as extending the model to multi-modal sensing and optimizing it for embedded systems.