Introduction

During normal quiet tidal breathing, the rib cage (RC) and abdomen (ABD) compartments move in unison to provide the most effective respiration. Asynchronous movement of the two compartments during dysfunctional breathing is referred to as thoracoabdominal asynchrony (TAA).1 Thoracoabdominal asynchrony has been identified as a clinical diagnostic indicator for many pulmonary diseases such as asthma,2 chronic obstructive pulmonary disease,3 and obstructive sleep apnea,4,5,6,7 as well as other diseases like heart failure and panic disorder.8 Giordano et al.2 found that objective assessment of TAA can assist in the evaluation of asthma exacerbation. Allen et al.9 found substantial asynchrony between RC and ABD exists in infants with bronchopulmonary dysplasia (BPD) compared with normal control infants. Bronstein et al.4 and many others5,6,7 have demonstrated that objective measurements of TAA can be used to predict obstructive sleep apnea in both children and adults. Boulding et al.,8 in an effort to provide systematic classification of the dysfunctional breathing patterns, found TAA to be linked to conditions of obstruction, respiratory failure, and neuromuscular disease. Hammer and Newth,1 in their review article, found many clinical applications for TAA monitoring. As such, they reference studies where the measurement of TAA reflected the clinical improvement due to stridor and ventilation in children with upper respiratory infections. They also found TAA measurements demonstrate changes in lung function following bronchodilator therapy in children with obstructive airway diseases such as BPD and asthma.

Respiratory inductance plethysmography (RIP) is a noninvasive method used to assess TAA by recording the RC and ABD movements during quiet breathing.1,10 pneuRIP (device provided by Creative Micro Designs, Inc., Newark, DE, USA) is a newly developed research RIP device that is less expensive, portable, and can be used for continuous monitoring. The device records RC and ABD movements and transmits the data to an iPad. Variables that assess coordinated movement between RC and ABD are automatically extracted from the recordings and displayed almost instantaneously.11 This device was validated by Rahman et al.11 when they showed that the variables computed by pneuRIP were similar to those computed by the standard RIP device (Respitrace System, Sensormedics, Yorba Linda, CA, USA) with no statistically significant difference. Additionally, since the device requires no active effort on the part of the subject, 100% compliance was obtained from young children and patients with disability.2,12,13

Diagnosing pulmonary dysfunction using pneuRIP variables uses a simplistic mean statistic to compare with normal values or a more time-consuming interpretation of the distribution of variables. With machine learning (ML), the process of identifying pulmonary dysfunction, using the entire distribution of the variables over a prolonged period time, can be automated, making it more accurate and reducing time required for assessment. Developing accurate ML models requires good features, the right ML training algorithm, and sufficient data. Phase difference between RC and ABD has been shown as an important variable for detection of TAA,1 since it quantifies the time lag between the signals. Furthermore, observing the distribution of the phase difference over time is important in detecting dysfunctional breathing.13,14,15 There are many ML training algorithms,16 both supervised17 and unsupervised.18 Supervised training requires a training set where the class (normal/abnormal) is known for each observation, and these usually perform better than unsupervised training. The tradeoff between various supervised training algorithms is interpretability of the features and the complexity of training algorithm based on the amount of training data available. Elastic-net regularization19 is a supervised training algorithm that is easily interpretable and has demonstrated success when limited data are available for training.19 To distinguish normal and TAA breathing in our study, we developed an ML model trained using elastic-net regularization with data collected from healthy pediatric volunteers and children with neuromuscular (NM) disease. This data set was chosen because it has been shown that TAA is a common occurrence in patients with NM disorder.1 With the current trend toward in-home ventilation to improve quality of life for NM patients,20 a noninvasive approach that automatically detects TAA can improve care.

Methods

Data acquisition

pneuRIP11 measures changes in cross-sectional area of RC and ABD during breathing. It consists of two elastic bands, each with an embedded insulated wire. They are placed around the RC and the ABD (Fig. 1a). An AC current passed through the wire generates a self-inductance that oscillates in a cyclic pattern and tracks changes in the cross-sectional area associated with respiration. These inductive signals are transmitted to and displayed on an iPad.

Fig. 1: pneuRIP device with elastic bands strapped around the RC and ABD of a subject.
figure 1

a The bands are connected to a box that transmits data to the iPad. Typical RC and ABD pneuRIP recordings of synchronized (b: normal) and asynchronous (c: abnormal/TAA) breathing over time.

Data recorded from healthy subjects and patients with NM disorders aged 5–17 years were used to train and test the ML models. Approval from the Institutional Review Board (IRB) of Nemours/Alfred I. duPont Hospital for Children, as well as assent/consent from the subjects and subjectsʼ guardians, was obtained prior to recording. The subjects were all in a sitting position during the recordings, and approximately 3 min of data were collected from each subject. Data collected from two independent populations of subjects were used in this study: one for training the ML model, and another for testing the performance of the model.

Training data set

This data set included recordings from ten typically developing subjects (10–17 years) under two different breathing conditions. One was quiet tidal breathing and the other was with an added resistive load (loaded). The resistive load was added to simulate asynchronous breathing encountered during respiratory distress. Resistance was provided by an external bidirectional laminar resistive load (Hans Rudolph, Shawnee, KS, USA) 20 cm H2O/L/s, which was placed in the mouth while the subject wore a nose-clip. We chose to use the resistive load because it was easier to administer on children. Allen et al.9 showed that changes in the relative movements of RC and ABD are nonspecific to changes in airway obstruction (as experienced by subjects breathing through resistive load), to low lung compliance, or to weak respiratory muscle reserve as seen in NM patients.

Test set

Data recorded from a different set of 31 subjects aged 5–17 were used as the test set. Eleven were healthy volunteers, and 20 were patients from the NM clinic at the Nemours/Alfred I. duPont Hospital for Children who had been genetically and clinically diagnosed with various forms of neuromuscular disease, including Becker’s muscular dystrophy, Charcot−Marie−Tooth disease, collagen VI mutation, Duchenne muscular dystrophy, mitochondrial myopathies, myotonic muscular dystrophy, Pompe disease, and spinal muscular atrophy.13 Six patients had comorbidities of obstructive sleep apnea; three were obese; one had cardiomyopathy; one had asthma; and one had neuropathy, ataxia, and retinitis pigmentosa. Also noteworthy was that seven patients used wheelchairs.

Computation of the features

Phase difference

The signals recorded by the pneuRIP from the elastic bands (Fig. 1b, c) are mostly sinusoidal, wherein each point is characterized by a magnitude and a phase. The magnitude represents the compartment excursion, and the phase defines how far the signal is from the start of a cycle. Typically, clinicians visually inspect the signals to see if the RC and ABD signals are synchronous or asynchronous and evaluate the breathing as normal or abnormal (TAA), respectively.

Using signal processing,10,11 we can compute the phase difference between the RC and ABD signals. When the signals are synchronized, as seen in Fig. 1b, the phase difference is near zero. However, the phase difference increases when the two signals become asynchronous, as shown in Fig. 1c. Since our objective was to assess pulmonary dysfunction by incorporating the entire distribution of data over time, the phase difference was computed at every recorded sample. The signals were recorded for at least 2.675 min (=160.5 s), and they were sampled at ten samples per second so 1605 phase difference (ϕ) values were considered, which is the dimensionality of the ϕ variable.

Inverse cumulative percent

We computed a new variable that is the inverse of the cumulative frequency. It is calculated by aggregating the number of data points with value greater than a reference value. This number, represented as a percentage of the total number of points in the recording, is the inverse cumulative percent (ICP). The ICP value was calculated for every degree between the minimum and maximum range for the phase difference, which is 0–179°. Hence, the ICP dimension was 180. Example plots of the ICP parameter for phase difference (ϕ) are shown in Fig. 2.

Fig. 2: Example ICP plots.
figure 2

Example ICP plots of the phase difference for a a healthy subject with normal breathing and b a healthy subject breathing with a resistive load experiencing TAA. The plots are the percentage of data (ICP values) as a function of the phase difference.

The x-axis is the range of the phase difference values from 0 to 179°. The y-axis is the ICP values (which is the number of data points as a percent of the total data). The plots all begin with 100% because all data points have a value that is above 0°, and, as the reference value is incremented, the number of data points with value greater than the reference value drops. The median (indicated by an asterisk) shows the value that 50% of the data lie above. The 25th and 75th percentiles are the quartiles. The 25th percentile points indicate that 25% of the points have values greater than that value. For example in Fig. 2a, 25% of the points have value greater than 22°.

Comparing the ICP plots for healthy (Fig. 2a) and loaded (Fig. 2b) subjects, we see the slope for the healthy subject is steeper; the highest phase value is about 60°, and only about 25% of the points have phase values greater than 22°. Whereas for the loaded subject with asynchronous breathing, the slope is shallower, and more than 75% of the points have phase values higher than 55°, indicating larger phase differences that last for a longer duration.

Graphical display of ICP

The difference between normal and abnormal ICP plots in Fig. 2a, b is clear when the two plots are compared against each other. However, in isolation, it would be harder to identify the type of pattern, because the normal and abnormal ranges for the ICP variable have not been defined. Hence, the display shown in Fig. 3 was developed, which includes the normal and abnormal regions. These regions were determined from the training set by plotting the ICP values of the training data and demarcating the normal breathing by healthy subjects (green) from breathing through a resistive load (orange). The region in between is undefined. Since abnormal TAA is characterized by high phase, the abnormal region could extend all the way to the top orange dashed lines and the normal region all the way to bottom green dashed lines. The purple line is the ICP plot for the same subject from Fig. 2b superimposed on the abnormal and normal regions.

Fig. 3: An ICP plot (purple line) for a subject superimposed on the regions of normal and abnormal breathing.
figure 3

The asterisk represents the median phase difference value, open circle represents the 75th percentile, and the cross mark represents the 25th percentile value. The orange (abnormal) region shows the ICP values for subjects breathing through a resistive load with asynchronous breathing and the green (normal) region shows the ICP values for healthy subjects breathing normally with near synchronous breathing. The orange dotted line is the extreme edge for the abnormal patterns, and the blue dotted line is the edge for the normal patterns.

Elastic-net modeling

Elastic-net regularization is an established ML technique for automated classification of patterns. Its prominent attribute is feature selection. When the number of features is large, some of them might be redundant and even provide misinformation. Additionally, when the dimensionality of the feature is large in comparison with the training data size, as is the case with our task, elastic-net regularization has been used successfully.19 In our case, we had a training data set of 20 and we explored two types of feature sets: one was the phase difference with a dimension of 1605 and the other was the ICP parameter with a dimension of 180.

Elastic-net defines the classification task as a regression problem where the response variable is defined using a weighted sum of the predictors. For our task, the identification of normal vs. abnormal breathing was the response variable (y) and the phase difference (see section “Phase difference”), and the ICP parameters (see section “Inverse cumulative percent”) were the predictors (x). The response was assigned two values: y = 0 for normal and y = 1 for abnormal. The model prediction (ŷ) of normal or abnormal breathing was calculated using a weighted sum of the predictor variables (xp) as shown in Eq. (1).

$$\hat y = \hat \beta _0 + x_1\hat \beta _1 + \cdots + x_p\hat \beta _p,$$
(1)

where ŷ is the predicted response variable, xi is the p-dimensional input feature vector, and β are the coefficients estimated using penalized least squares as shown in Eq. (2) below.

$$L\left( {\lambda ,\beta } \right) = \left| {y - X\beta } \right|^2 \, + \, \lambda \left( {\left( {1 - \alpha } \right)\left| \beta \right|_1 \, + \, \alpha \left\| {\beta ^2} \right\|} \right),$$
(2)

where \(\left| \beta \right|_1 = \mathop {\sum}\nolimits_{k = 1}^p {\beta _k}\) and \(\left\| {\beta ^2} \right\| = \mathop {\sum}\nolimits_{k = 1}^p {\beta _k^2}\) are the l1 and l2 regularization terms, respectively. λ is the penalization constant, and α sets the balance between the l1 and l2 terms.

The first term in Eq. (2) minimizes the error between the model prediction and the true prediction and leads to high accuracy on the training data (over fitting) but does not guarantee reliable performance on a test set. The second term is the regularization term that helps generalize the model to a different data set not seen during training. The Ɩ1 regularization term removes ineffective input variables and retains the salient ones. The Ɩ2 part stabilizes the regularization and selects groups of variables that have high correlation between them. So all variables that affect the identification of the class, including those correlated to each other, will be selected.

The “glmnet” package in R was used to run the elastic-net training.21 By setting α to 0.5, both Ɩ1 and Ɩ2 regularization is employed. λ, which determines the bias-variance tradeoff, is determined empirically using a tenfold cross-validation run as shown in Fig. 4. The log (lambda) value of −0.43, one standard deviation away from best classification error, is used, which is standard practice. At that lambda, the number of coefficients (top axis) is reduced to 17.

Fig. 4: Plot of the misclassification error as a function of log (lambda) and the reduction in coefficients (top axis) with each validation run.
figure 4

The dotted lines indicate the region one standard deviation from the minimum classification error point.

Two models were trained. One used the phase difference as predictors, and the other used the ICP parameters as predictors. The results of two experiments are presented in the “Results” section.

Expert opinions and model performance evaluation

To classify the breathing patterns, five pulmonary experts were recruited. They were asked to evaluate the patterns using (a) the traditional phase-time plot and (b) the ICP plot. Experts were asked to evaluate the phase difference plots for all healthy and NM subjects (an example is shown in Fig. 5a). The experts evaluated the recordings from 20 healthy participants, 20 NM patients, and 11 healthy participants who were recorded while breathing with a resistive load. So, a total of 51 breathing patterns were evaluated. They had to classify the breathing pattern as either normal or abnormal (TAA) and were blinded to whether the subject was healthy breathing normally, was breathing with a resistive load, or was an NM patient. A similar evaluation was repeated using the ICP plots (example in Fig. 5b). The degree of agreement between the experts was computed using an inter-rater reliability measure called Krippendorff’s alpha.22 This measure is used to evaluate categorical classification (normal vs. abnormal), and an agreement of ɑ > 0.667 is considered reliable.

Fig. 5: Example phase difference and ICP plots.
figure 5

a An example phase difference plot as a function of time. The dashed line is the median, and the dotted/dashed line is the average phase for healthy children as determined by Balasubramaniam et al.27 b Example of the ICP plot as a function of the phase difference. The asterisk represents the median phase difference value, open circle represents the 75th percentile, and the cross mark represents 25th percentile values. The numbers in parentheses are the phase difference values at the 75th percentile, median, and 25th percentile points, respectively. The orange (abnormal) region shows the ICP values for subjects breathing through a resistive load with asynchronous breathing, and the green (normal) region shows the ICP values for healthy subjects breathing normally with near synchronous breathing. The orange dotted line is the extreme edge for the abnormal patterns, and the blue dotted line is the edge for the normal patterns.

The performance of the elastic-net model was determined by evaluating its prediction on the test data set and comparing it with the experts’ evaluations. The majority opinion from the five experts’ evaluations was used as the gold standard for determining whether a breathing pattern was normal or abnormal. The accuracy, sensitivity (or true-positive rate, which is the percentage of true abnormal breathing that the model predicted as abnormal), and specificity (or true-negative rate, which is the number of normal breathing patterns that the model predicted as being normal) were computed.

Results

Expert opinion evaluations

The number of normal and abnormal breathing patterns identified by each expert out of the 51 total recordings is represented in Fig. 6 as a bar plot. They evaluated normal vs. abnormal breathing based on the phase difference plots (Fig. 6a) and the ICP plots (Fig. 6b).

Fig. 6: Histograms showing breathing patterns evaluated by the five experts.
figure 6

Histogram of the number of normal and abnormal breathing patterns as evaluated by five experts using the a phase difference and b ICP plots.

There is wide variability in the number of normal/abnormal patterns that each expert identified in their evaluations when using the phase difference plots (Fig. 6a). For example, expert 1 judged 34 of the 51 patterns as normal and the remaining 17 as abnormal while expert 3 had an opposite evaluation, with 14 normal and 37 abnormal. However, with the ICP plots, judgements of normal vs. abnormal were more evenly matched (Fig. 6b) among the various experts.

We also checked the inter-rater reliability (i.r.r.) using Krippendorff’s alpha. As shown in Table 1, the i.r.r. using the phase difference plots was lower than that for ICP and far below the minimum accepted score of 0.667 for reliable agreement.22

Table 1 Inter-rater reliability using phase difference and ICP phase plots.

Model predictions

The performance of the elastic-net models was determined by comparing the predicted response on the test set with the majority opinion of the experts. As seen in Table 2, the overall accuracy that includes predicting the breathing patterns of both healthy and NM patients is significantly improved with the ICP parameter compared with using the phase difference feature.

Table 2 Accuracy, sensitivity, and specificity of elastic-net evaluated on the test set.

Recall that the models were trained on abnormal breathing patterns generated by healthy subjects breathing through a resistive load to simulate TAA breathing while the test set included breathing experienced by NM patients. Yet the model predictions on the abnormal breathing patterns collected from NM patients were excellent. This indicates that the method used to simulate TAA breathing was a good representation of an NM patient’s breathing distress pattern, and that the ML model generalizes well to test data that are different from the training set.

Feature selection

Using elastic-net regularization, salient features that best modeled the response were determined. When the phase difference feature was used for training the model, the input predictor dimensionality was 1605, which is extremely large considering we have only 20 patterns (10 normal and 10 abnormal) for training. Regularization found 66 of them were salient for our task.

When ICP features were used, the dimensionality of the input vector was 180; of those, 15 phase difference features from 21° to 35° were selected for modeling the response.

Discussion and future work

In this pilot study, we have shown that machine learning, specifically elastic-net regularization, can be used effectively to automatically identify normal and TAA breathing patterns with the ICP feature set. The pneuRIP device along with the use of the ICP parameter and logistic regression training makes our ML approach accurate, portable, and easy to implement, and it can be extended to study a variety of pulmonary disorders.

Several devices have been developed to record the movement of the RC and the ABD compartments, like the Respitrace system (Sensormedics, Yorba Linda, CA),12 VivoSense LifeShirt (Newport Coast, CA),23 passive infrared technology,24 polysomnography,4 or piezoelectric sensors placed below the bed (EarlySense, Ltd., Israel) to measure vital signs during sleep.25 These devices are expensive and not easily adaptable to studying other respiratory conditions. In contrast, the pneuRIP is portable, inexpensive, and displays the variables in real time. This approach can be used in the emergency room, in an outpatient setting, and in a home environment with equal ease. Finally, it has been demonstrated that pediatric patients, including those with disability, were 100% compliant with this noninvasive testing method.12,13,26

Recent studies have been developed for automatic detection of pulmonary dysfunction using data from the RC and ABD movements.5,6,7 These studies detected sleep apnea/hypopnea either using a rule-based approach,5 global metric,6 or artificial neural networks (ANN)-based7 algorithms. These methods are specific to sleep apnea/hypopnea study and cannot be extended for other disorders; furthermore, the ANN-based method is computationally intensive. The logistic regression method we used is less complex and it can be extended easily to other studies. Further, the regularization aspect of the elastic-net identified salient features for the detection, which the ANN approach cannot do.

The efficiency of the machine-learning algorithm depends partly on the dimensionality and nature of the feature vector. Features need to contain sufficient information to discriminate between the classes (normal/abnormal) yet be concise enough to estimate accurate model parameters with available data. The ICP parameter we calculated was able to improve the recognition accuracy because it had a smaller dimension and contained all information present in the features over the entire duration of the recording. As a result, a 29% improvement in the accuracy was obtained over using phase difference features. The regularization aspect of the elastic-net algorithm was useful in further reducing the feature set and thus reducing the redundancy in information.

Prior studies have identified significant differences in RIP parameters between diseased and healthy subjects2,3,4,12,13,15 by using ANCOVA analysis, which looks for significant differences in the means. However, some of these studies identified situations where bimodal distributions of the parameters were observed. de Jongh et al.15 found bimodal distributions in their study on infants. Strang et al.13 also observed bimodal and diffuse phase distributions in NM patients. Though the two studies were conducted on different subject populations, the characteristic of weak respiratory muscles was common to the two populations. Both studies noted that identifying bimodal and diffuse phase distributions is critical. An ANCOVA mean analysis as conducted by the above-mentioned studies and many others is therefore limiting. In the analysis we presented here, we considered the variables for the entire duration of the recording, which represented the distribution of the whole data.

The added benefit of the ICP parameter is its suitability to develop an informative graphical display. The standard procedure of calculating the respiratory indices using the tracings and Konno−Mead loops9 from an RIP device is done post hoc and is time consuming.2,4,12 Even analyzing the variables extracted by the pneuRIP device requires expertise and visually estimating the percent of time there is asynchrony to diagnose abnormal breathing.11,13 With the introduction of the ICP parameter and its graphical display, we reduced the ambiguity and uncertainty in evaluation.

A limitation of this analysis is the small sample size. The amount of data required to train an algorithm is partly dependent on the number of parameters that need to be estimated. Thus, a less complex model requires a smaller data set. Our choice of logistic regression modeling effectively took into consideration our small sample size, and the high accuracy (including specificity and sensitivity) we obtained on the test set shows that the model was well trained. Though, in general, larger data sets can lead to possibly more accurate and more “generalizable” models. To this end, we are in the process of recruiting more subjects with normal breathing and patients with a variety of NM disorders.

Conclusions

An ML approach to detect TAA automatically has been implemented. The approach identified TAA in NM patients with an accuracy of 90.3%. Such an automated system can be a useful tool for monitoring and assessing respiration in patients. We also presented a different representation for the variables (ICP) that not only improves the machine-learning performance but also provides a comprehensive graphical display of variation in pulmonary function over time. The pneuRIP device in conjunction with the ML automation can be easily adapted for numerous environments such as in-home, outpatient clinics, intensive care units, sleep apnea detection, or emergency room settings.