AICRN: Attention-Integrated Conv Residual Network for ECG
- The paper demonstrates that AICRN improves ECG parameter regression accuracy by integrating explicit attention mechanisms in a residual network.
- The architecture utilizes CBAM for channel and spatial attention, enhancing feature emphasis and mitigating gradient issues through residual shortcuts.
- Quantitative evaluations on the PTB-XL dataset show significant reductions in MAE over baseline models, boosting both precision and clinical interpretability.
Attention-Integrated Convolutional Residual Network (AICRN) denotes a class of deep architectures that combine convolutional feature extraction, residual shortcut connections, and explicit attention mechanisms. In the ECG-specific formulation introduced in "AICRN: Attention-Integrated Convolutional Residual Network for Interpretable Electrocardiogram Analysis" (Jayakody et al., 16 Aug 2025), AICRN is a lightweight, end-to-end residual CNN augmented with a Convolutional Block Attention Module (CBAM) for regressing six clinically relevant ECG parameters: the PR interval, the QT interval, the QRS duration, the heart rate, the peak amplitude of the R wave, and the amplitude of the T wave. The model is designed to emphasize both the type of ECG features and their spatial location in time, while the residual backbone is used to address vanishing and exploding gradient problems (Jayakody et al., 16 Aug 2025).
1. Architectural definition in ECG regression
The ECG AICRN operates on an 8-lead ECG segment using leads , , and , sampled to a fixed time-series length. Its topology consists of a stem, eight Attention-Integrated Residual Modules (AIRM), and a regression head. The stem uses a Conv1D layer with kernel size $7$, stride $1$, and padding set to "same", with filters , followed by BatchNorm, LeakyReLU with , and AveragePooling1D with pool size $2$. Each AIRM contains two convolutional sub-blocks, a CBAM attention stage, an identity shortcut, and a final LeakyReLU. After the final AIRM, GlobalAveragePooling1D collapses the time dimension and a linear layer produces a single scalar output. A separate instance of the full network is trained for each target parameter (Jayakody et al., 16 Aug 2025).
| Component | Specification | Role |
|---|---|---|
| Input | 8-lead ECG segment: , , 0 | Fixed-length time series |
| Stem | Conv1D 1, stride 2, "same", filters 3; BatchNorm; LeakyReLU4; AveragePooling1D | Initial feature extraction |
| Body | Eight AIRM blocks with Conv1D 5, CBAM, identity shortcut; filters typically 6 | Residual attention processing |
| Head | GlobalAveragePooling1D; linear layer 7 single scalar | Parameter regression |
Within each residual module, the paper describes the integration sequence as follows: two convolution 8 BatchNorm 9 activation operations, channel attention, spatial attention, identity addition, and LeakyReLU. The CBAM-refined output is added to the original block input before the final activation. The stated intent is to emphasize both "what" and "where" features before gradient back-propagation (Jayakody et al., 16 Aug 2025).
2. Attention formulation and residual integration
The distinctive component of the ECG AICRN is CBAM, which is composed of a Channel Attention Module (CAM) followed by a Spatial Attention Module (SAM). Let 0 denote a feature map with 1 channels and 2 time-steps. CAM first performs temporal squeeze by average pooling and max pooling along the time axis: 3 These summaries are passed through a shared MLP with two fully connected layers and one hidden layer of size 4, where 5: 6 The resulting channel-attention weights are
7
and the channel-refined feature map is
8
Here, 9 denotes element-wise scaling across channels (Jayakody et al., 16 Aug 2025).
SAM then performs channel squeeze on $7$0: $7$1 After concatenation and convolution, the spatial attention map is
$7$2
and the final refinement is
$7$3
The overall AIRM block is summarized in the paper as
$7$4
followed by
$7$5
The implementation description otherwise specifies LeakyReLU$7$6 in the stem and residual blocks. Taken together, the attention module reweights channels first and time-steps second, and the residual pathway preserves direct feature and gradient transmission (Jayakody et al., 16 Aug 2025).
3. Data pipeline, targets, and optimization
The reported ECG experiments use the PTB-XL 12-lead ECG dataset while retaining leads $7$7, $7$8, and $7$9. Preprocessing removes incomplete records, normalizes each lead to zero mean and unit variance, segments or resamples signals to a uniform time-step length, and uses the default PTB-XL train/validation/test splits. The architecture is trained independently for PR interval, QT interval, QRS duration, heart rate, R-wave amplitude, and T-wave amplitude, so the published AICRN is a bank of six scalar regressors rather than a single multi-output model (Jayakody et al., 16 Aug 2025).
The regression head applies GlobalAveragePooling1D to convert $1$0 to $1$1, then uses a linear layer $1$2 to produce
$1$3
Training minimizes Mean Squared Error: $1$4 Optimization uses NAdam, described as a combination of RMSProp and Adam, with learning rate $1$5, batch size $1$6, and up to $1$7 epochs with early stopping on validation loss at patience approximately $1$8 epochs. Regularization comprises BatchNorm in every convolutional layer, dropout with $1$9 inside each residual block, early stopping, and model checkpointing on minimum validation loss (Jayakody et al., 16 Aug 2025).
This training configuration situates AICRN as an end-to-end supervised regression system. A plausible implication is that the architecture targets quantitative ECG morphometrics directly, rather than treating interpretability as a secondary post hoc analysis stage.
4. Quantitative performance on PTB-XL
The paper reports Mean Absolute Error (MAE) on PTB-XL and states that AICRN models outperform existing models in parameter regression with higher precision (Jayakody et al., 16 Aug 2025).
| Target | AICRN test MAE | Reported comparison models |
|---|---|---|
| PR interval | 0 | IKres 1; MEM 2 |
| QT interval | 3 | IKres 4; QTNet 5; QTNet2 6; MEM 7 |
| QRS duration | 8 | IKres 9; MEM 0 |
| Heart rate | 1 | IKres 2; QTNet2 3; MEM 4 |
| R-wave amplitude | 5 | LeNet 6; XResNet 7 |
| T-wave amplitude | 8 | LeNet 9; XResNet $2$0 |
The ablation study reports a 5-run mean $2$1 standard deviation for models trained with and without attention. In every case, adding CBAM improved both RMSE and $2$2 (Jayakody et al., 16 Aug 2025).
| Parameter | With attention | Without attention |
|---|---|---|
| PR | RMSE $2$3; $2$4 | RMSE $2$5; $2$6 |
| QT | RMSE $2$7; $2$8 | RMSE $2$9; 0 |
| QRS | RMSE 1; 2 | RMSE 3; 4 |
| HR | RMSE 5; 6 | RMSE 7; 8 |
| RPA | RMSE 9; 0 | RMSE 1; 2 |
| TWA | RMSE 3; 4 | RMSE 5; 6 |
These results support the specific claim that the attention component contributes not only to interpretability but also to regression fidelity. The most pronounced absolute reductions appear in interval estimation and heart-rate regression, while the amplitude tasks also improve, albeit with smaller numerical margins (Jayakody et al., 16 Aug 2025).
5. Interpretability, attention maps, and clinical inspection
A central feature of the ECG AICRN is explicit interpretability through attention visualization. The channel attention weights 7 can be plotted as a 8-vector to indicate which leads or channels the network deems most relevant for a given ECG parameter. The spatial attention maps 9 can be overlaid on the time axis to show which temporal regions receive emphasis during regression. The paper gives concrete examples: for PR interval regression, one typically observes high spatial attention around the P-wave onset and channel attention peaking in lead 00; for R-wave amplitude, channel attention often highlights precordial leads 01 with spatial attention tightly localized at the R-peak (Jayakody et al., 16 Aug 2025).
The attention maps are exposed through an open-source GUI so that clinicians can inspect exactly "what" and "where" the network is using in the signal. The paper presents this as a means of improving trust and facilitating model validation in clinical practice (Jayakody et al., 16 Aug 2025). In this formulation, interpretability is not external to the predictive model; it is implemented as a property of the forward computation itself through explicit channel and spatial reweighting.
The paper also frames the system as addressing traditional analysis challenges, including loss of focus due to human errors, and as facilitating the fast and easy detection of cardiac events while reducing manual efforts required to solve analysis tasks (Jayakody et al., 16 Aug 2025). A plausible implication is that the model targets a workflow in which automated regression and visual explanation are jointly required for cardiac monitoring and management.
6. Position within the broader attention-residual literature
The ECG AICRN belongs to a broader family of architectures that integrate learned attention into convolutional residual processing, but the specific attention mechanism varies substantially across domains. In image classification, the Residual Attention Network stacks Attention Modules comprising a trunk branch 02 and a mask branch 03, combined as
04
and reports 05 error on CIFAR-10, 06 error on CIFAR-100, and 07 top-5 error on ImageNet (Wang et al., 2017). In scene text recognition, "Reading Scene Text with Attention Convolutional Sequence Modeling" uses a small DenseNet-style encoder with Residual Attention Modules and a non-recurrent convolutional sequence model; the paper reports that the CNN stack is 08 times faster than BLSTM and that the sequence-modeling step falls from 09 to 10 in the reported comparison (Gao et al., 2017).
Sequence modeling work provides another variant. TCAN combines Temporal Attention with an Enhanced Residual path in a stack of dilated causal convolutions and reports 11 perplexity on word-level PTB, 12 bpc on character-level PTB, and 13 perplexity on WikiText-2 (Hao et al., 2020). In CSI-fingerprinting indoor localization, an Attention-Augmented Residual CNN replaces part of a residual block with a spatial self-attention branch over antenna and subcarrier dimensions, then couples the positioning network to a decoupled tracking-as-denoising stage with plug-and-play ADMM for IMU fusion (Zhang et al., 2022). In near-field channel estimation, RACNN uses Conv2D, BatchNorm, ReLU, self-attention, and residual addition; its abstract reports a normalized mean square error of 14 at an SNR of 15 in mixed far-field and near-field conditions (Lam et al., 4 Mar 2025). In automatic classification of phonation modes, a residual-attention network with a soft mask branch reports a highest classification accuracy of 16, 17 higher than the baseline (Sun et al., 2021).
Across these works, convolution supplies locality, attention reweights salient structure, and residual shortcuts stabilize optimization. The attention operator itself may be a bottom-up/top-down soft mask (Wang et al., 2017, Sun et al., 2021), CBAM with channel and spatial pooling (Jayakody et al., 16 Aug 2025), spatial self-attention over 2-D feature grids (Zhang et al., 2022), single-head self-attention over feature maps (Lam et al., 4 Mar 2025), or temporal attention over sequence positions (Hao et al., 2020). This suggests that "AICRN" is most accurately read as a design pattern rather than a single canonical block. In the ECG setting, that pattern is specialized to scalar regression and interpretability through explicit channel- and temporal-attention visualization, rather than to classification, denoising, or sequence decoding (Jayakody et al., 16 Aug 2025).