Artificial Intelligence/Machine Learning in Respiratory Medicine and Potential Role in Asthma and COPD Diagnosis

Arti ﬁ cial intelligence (AI) and machine learning, a subset of AI, are increasingly used in medicine. AI excels at performing well-de ﬁ ned tasks, such as image recognition; for example, classifying skin biopsy lesions, determining diabetic retinopathy severity, and detecting brain tumors. This article provides an overview of the use of AI in medicine and particularly in respiratory medicine, where it is used to evaluate lung cancer images, diagnose ﬁ brotic lung disease


Abbreviations used AI-Artificial intelligence CT-Computed tomography DNN-Deep neural network FDA-Food and Drug Administration
context of heterogeneous conditions such as asthma and chronic obstructive pulmonary disease where diagnostic criteria overlap, how AI use fits into everyday clinical practice, and how issues of patient safety should be addressed. AI has a clear role in providing support for doctors in the clinical workplace, but its relatively recent introduction means that confidence in its use still has to be fully established. Overall, AI is expected to play a key role in aiding clinicians in the diagnosis and management of respiratory diseases in the future, and it will be exciting to see the benefits that arise for patients and doctors from its use in everyday clinical practice.

INTRODUCTION
The terms artificial intelligence (AI), machine learning, and deep learning are often used interchangeably but are actually hierarchical. AI is the overarching concept and is the simulation of human intelligence by computer systems (ie, the use of a computer to model intelligent behavior with minimal human intervention); it covers tasks such as reasoning, learning, language processing, and the display of knowledge or information.
Machine learning is a subset of AI in which the goal is for the computer to learn a task automatically and improve from experience without being explicitly programmed. Machine learning encompasses a group of AI methods by which computers can identify patterns and relationships between data and outcomes of interest. There are 2 main types of machine learning, supervised and unsupervised: in supervised learning, the computer infers a function on the basis of data using guidance (the data are "labeled"); in unsupervised learning, the computer discovers a pattern without any guidance. Traditionally, statistical methods such as calculus and regression modeling have been used to establish a mathematical equation that identifies and characterizes the interactions and patterns between different variables, but these methods can be limited if the volume of data is large and includes complex interrelationships. With machine learning, computers can analyze large volumes of data to establish complex, nonlinear relationships that cannot easily be expressed in the form of an equation, enabling greater accuracy in the outcome. Machine learning also enables the analysis of types of data that were previously not amenable to computational analysis, such as imaging and auditory data. One underappreciated aspect of traditional machine learning approaches is the impact that feature engineering, the transformation or combination of different data points into new information, can have on the final classification accuracy. 1 Deep learning is a subset of machine learning that has gained popularity recently with the rapid increase in the amount of data available to researchers. Rather than relying on a researcher's intuition and experience to select and engineer features, these methods allow the algorithm to automatically discover the specific features and transformations required for the task in the raw data. 2 Deep learning is currently being used to make major advances in image 3,4 and speech recognition, [5][6][7] to predict the activity of potential drug molecules, 8 and to predict the effects of noncoding DNA mutations on gene expression and disease. 9,10 It is anticipated that deep learning will have continued success in the future because it often requires very little "hands-on" engineering, and it is able to take advantage of increases in computer processing power and the amount of data becoming available.
This article provides an overview of some of the key developments in the use of AI in medicine and particularly in respiratory medicine, where it is used to evaluate lung cancer images and diagnose fibrotic lung disease. There is also discussion on the development of AI to aid the interpretation of pulmonary function tests and the diagnosis of a range of obstructive and restrictive lung diseases.

USE OF AI IN MEDICINE
The accelerating creation of vast amounts of health care data will fundamentally change the nature of medical care. The patient-doctor relationship will be the cornerstone of the delivery of care to many patients, and the relationship will be enriched by additional insights from machine learning. 11 Machine learning is useful because it allows important relationships between disparate pieces of data to be inferred from the data, rather than requiring explicit human definition. At the most basic level, a machine learningebased approach may lead to a more accurate diagnosis by being able to consider a wider range of information than a physician. However, taken further, by making the patterns with the data more apparent, it allows improved understanding of the disease ("Big Data"). From a scientific/medical research perspective, machine learning is also likely to play a role in aiding clinicians to deliver care to patients. 12 Classification is one area that is ideal for machine learning; these include medical image recognition where the input is a digital photograph and the output is binary ("normal" or "disease"). For example, following initial training of an AI system in the classification of suspicious skin lesions as either benign or malignant with input from dermatologists, AI has demonstrated superior sensitivity and specificity compared with dermatologists when classifying previously unseen photographs of biopsy-validated lesions. 13 One benefit of the use of AI for the analysis of medical tests such as imaging is that it facilitates evaluation of tests carried out in geographically remote or underserved locations; this can result in accurate and timely diagnosis, and, if needed, the individual can be directed to expert care at an earlier stage of disease, which could potentially transform outcome. For example, in many tuberculosis-prevalent countries, there is a lack of radiological expertise at remote centers. 14 However, using AI, radiographs remotely uploaded from these centers can be interpreted by a single central system-a recent study involving such a system reported that AI (which had been pretrained using active pulmonary tuberculosis images confirmed by a cardiothoracic radiologist) correctly diagnosed active pulmonary tuberculosis with a sensitivity of 97.3% (sensitivity ¼ true positive/[true positive þ false negative]) and specificity of 100% (specificity ¼ true negative/[true negative þ false negative]). 15 Moreover, assuming the amount of imaging performed in medicine continues to increase more quickly than the pool of qualified radiologists, AI will have an increasingly important role in image interpretation.
In 2018, the US Food and Drug Administration (FDA) approved a medical device that uses AI to detect greater than a mild level of the eye disease diabetic retinopathy in adults who have diabetes. 16 When doing this, the FDA evaluated the results from a clinical study of retinal images obtained from 900 patients with diabetes at 10 primary care sites. The AI algorithm analyzed images of eyes taken using a retinal camera in the offices of primary care physicians and provided the doctors with a binary output-1 of 2 results: (1) "more than mild diabetic retinopathy detected: refer to an eye care professional" or (2) "negative for more than mild diabetic retinopathy; rescreen in 12 months." The AI software correctly identified (accuracy ¼ correct diagnosis/total number of cases) the presence of more than mild diabetic retinopathy in 87.4% of cases and correctly identified those patients who did not have more than mild diabetic retinopathy in 89.5% of cases. This device provides a screening decision point without the need for a specialist to interpret the image or results, which makes it usable by health care providers who may not normally be involved in eye care, and means patients do not have to wait to be referred to specialists for an initial decision regarding diagnosis and severity.
In addition, in 2018, the FDA approved a clinical decision supporting software that analyzes computed tomography (CT) images of the brain for indicators associated with a stroke and notifies a neurovascular specialist if a suspected large-vessel blockage has been identified. 17 The algorithm automatically notifies the specialist at the same time as the first-line health care provider is conducting a standard review of the images; this involves the specialist earlier in the process than the usual standard of care in which patients wait for a radiologist to review the CT images and then notify a neurovascular specialist. Thus, patients receive optimal treatment sooner for a condition for which a positive outcome is very time dependent.
The effective use of AI in image analysis was highlighted recently in China where an AI algorithm to detect brain tumors based on imaging correctly diagnosed 87% of 225 cases in 15 minutes, whereas a team of 15 doctors correctly diagnosed 66% of the 225 cases based on the same images in 30 minutes. 18 Although health systems have developed sophisticated mechanisms to ensure the safe delivery of pharmaceutical agents to patients, 11 the wide applicability of machine learning will require a similarly sophisticated structure of regulatory oversight, legal frameworks, and local practices to ensure the safe development, use, and monitoring of AI systems. 11,19,20 Moreover, the use of AI will require scalable computing platforms to handle the large amounts of data associated with the use of these models.
What is clear from all the above examples is that the role of AI is in providing support for doctors in the clinical workplace, not as a replacement for them. The relatively recent introduction of the use of AI in medical diagnosis means that patients' trust in its use and output still has to be fully established. Hence, it is important that patients perceive that doctors lead consultations involving outputs using AI.
When errors do occur with AI, they mostly result from issues that arise during the learning step, usually poor quality training data or an irrelevant evaluation metric. 21 Hence, it is essential to ensure that the data set expresses the complete range of data and the real associations between them, that it does not contain misclassified examples, and does not present any bias that could lead the AI to learn false assumptions. 22 Other sources of error include the use of an inappropriate AI model for the learning process and stopping learning too early in the process. 22 Clinicians, AI researchers, as well as developers of AI applications and devices should work together to accelerate progress and to limit adverse consequences of applying AI in health care. 23 Rigorous translation pipelines will be needed to support their work. This technology can optimize human intelligence to improve decision making and operational processes. Physicians need to actively engage to adapt their practice and to shape the technology. 23

USE OF AI IN RESPIRATORY MEDICINE
AI has been used in a tool that evaluates CT scans of the chest for lung cancer; here, the AI algorithm recognizes patterns in both temporal and spatial changes, as well as changes in nodule and nonnodule features, to predict 3-year lung cancer risk and accurately guide clinical management in a longitudinal screening program. 24 In fibrotic lung disease, high-resolution CT plays a central role in the diagnosis of the disease, so when high-resolution CT appearances are those of usual interstitial pneumonia, a diagnosis of idiopathic pulmonary fibrosis can be made without surgical lung biopsy. 25 Using a deep learning algorithm for automated classification of fibrotic lung disease on high-resolution CT according to criteria specified in 2 international diagnostic guideline statements (American Thoracic Society, European Respiratory Society, Japanese Respiratory Society, and Latin American Thoracic Society guidelines for the diagnosis and management of idiopathic pulmonary fibrosis, and the Fleischner Society diagnostic criteria for idiopathic pulmonary fibrosis), the algorithm took 2.31 seconds to evaluate 150 individual cases with an accuracy of 73.3%; the median accuracy of the thoracic radiologists for the same cases was 70.7%. 26 The algorithm provided prognostic discrimination between usual interstitial pneumonia and nonusual interstitial pneumonia diagnoses (hazard ratio, 2.88; 95% CI, 1.79-4.61; P < .0001) that was comparable with the majority opinion of the thoracic radiologists (hazard ratio, 2.74; 95% CI, 1.67-4.48; P < .0001). 26 The authors concluded that high-resolution CT evaluation by a deep learning algorithm might provide low-cost, reproducible, almost instantaneous classification of fibrotic lung disease with human-level accuracy, and that these methods could be of benefit to centers at which thoracic imaging expertise is scarce.
Deep neural networks (DNNs) are a form of AI with multiple layers between the input and output layers; these layers are used to progressively extract higher-level features from the raw input. The application of DNNs to respiratory disease diagnosis especially in chest radiographs and CT scans has resulted in a step change in diagnostic accuracy compared with qualitative features such as tumor spiculation and quantitative features such as shape and texture derived using image analysis software. 27 The advantage of DNNs is that they derive features directly from the data, resulting in greater accuracy than with hand-crafted qualitative or quantitative analyses. DNNs can be trained to recognize specific pathologies on chest radiographs including tuberculosis, 28-30 malignant pulmonary nodules, 31 congestive J ALLERGY CLIN IMMUNOL PRACT VOLUME 9, NUMBER 6 cardiac failure, 32 and pneumothorax. 33 Hwang et al 34 developed a DNN that could recognize lung cancer, tuberculosis, pneumonia, and pneumothorax on chest radiographs as well as provide visual localization of the abnormality. A chest radiograph triage system developed by Yates et al, 35 using a binary classification of "normal" or "abnormal," had a final model accuracy of 94.6% in the test data set. Lu et al 36 developed a DNN that accurately predicted all-cause mortality over a follow-up period of 12 years on the basis of a single plain chest radiograph, even after adjusting for radiologists' diagnostic findings and standard risk factors for mortality. Ardila et al 37 trained a DNN to predict the risk of lung cancer on the basis of current and previous chest CT scans using cases from the National Lung Cancer Screening Trial; the DNN achieved an area under the curve of 0.944 for predicting biopsy-proven cancer in the test data set, and the accuracy of the DNN was higher than that of 6 board-certified radiologists when only the current CT scan was available and was equivalent to that of the radiologists when both current and previous CT scans were available for review.

AI IN THE DIAGNOSIS OF ASTHMA AND CHRONIC OBSTRUCTIVE PULMONARY DISEASE
The diagnosis of respiratory conditions such as asthma and chronic obstructive pulmonary disease (COPD) relies on much more than image analysis; it involves taking a patient's history, a physical examination together with pulmonary function tests (to some level) and possibly imaging (X-rays, CT scans, bronchoscopy). Although respiratory physicians are able to interpret variations in pulmonary function tests and analyze images, it is possible that AI might be able to play a role in supporting physicians, in particular nonrespiratory physicians and primary care physicians with limited experience with regard to obstructive lung diseases. Airflow limitation is common to both asthma and COPD, but the definitions of asthma and COPD are not mutually exclusive. Furthermore, both asthma and COPD are known to be heterogeneous, and their prognosis and management strategies differ. 38,39 A crucial step in the optimal management of airway diseases is to make a reliable diagnosis. By definition, COPD is characterized by an absence of fully reversible airflow limitation, but this is also seen in many patients with long-standing asthma. 38,39 In addition, even in secondary care clinics it can be difficult to distinguish between the 2 conditions in various patient groups, and especially in smokers older than 40 years. 40,41 Access to, or training in the use of, spirometry is often limited in primary care, making it more challenging to diagnose asthma and COPD, and also to differentiate between the 2 diseases. Underdiagnosis of asthma in primary care has been reported in 20% to 73% of cases, whereas overdiagnosis has been reported in 30% to 61% of cases. 42 Similarly for COPD, underdiagnosis and overdiagnosis have been reported in approximately 70% 27 and 30% to 62% of cases, [38][39][40][41][43][44][45][46] respectively.
Underdiagnosis of asthma can lead to impaired quality of life, increased number of general practitioner visits, absence from school or work, and increased hospitalizations compared with those with diagnosed asthma, and failure to prescribe appropriate medication(s) 31 ; indeed, failure to prescribe inhaled corticosteroids in asthma (with or without a codiagnosis of COPD) is associated with an increased risk of asthma hospitalizations and death. [47][48][49][50][51] In contrast, overdiagnosis of asthma can lead to inadequate treatment of the actual problem, nonindicated medication use, exposure of patients to potential adverse effects from medications unlikely to provide clinical benefit, and cost of medication without the potential benefit. 42,52 Although inhaled corticosteroids are the cornerstone of therapy for asthma, this is not the case in COPD. Hence, incorrect diagnosis or overdiagnosis of COPD, if high-dose inhaled corticosteroids are prescribed, can result in exposure of patients to potential adverse effects, 53,54 which include local adverse events such as pharyngitis, dysphonia, reflex cough, bronchospasm, and oropharyngeal candidiasis, and systemic adverse events such as suppressed hypothalamic-pituitary-adrenal axis function, reduced bone mineral density, skin thinning and bruising, increased risk of infection (pneumonia and tuberculous and nontuberculous mycobacteria), and increased diabetes risk.
The challenges in diagnosing asthma and COPD, and the potential complications associated with not treating or mistreating the disease, highlight the importance of evaluating any novel aid to diagnosis, including the use of AI algorithms.
For a broader range of respiratory diagnoses, a recent study explored the accuracy and interrater variability of pulmonologists when interpreting full pulmonary function tests compared with  AI-based software that had been previously developed and validated using more than 1430 historical patient cases. 55 55 In the study, both the sensitivity and positive predictive value of the AI-based algorithm were superior to pulmonologist-based diagnostic category allocation in each of the 8 disease groups evaluated (Figure 1).
The authors explained that AI achieved this goal by taking complete input data of a large number of known disease cases, with known magnitudes and patterns between all input data, and mapping them into a high-dimensional space; once presented with the data of a new patient, AI mapped these data into the same highdimensional space and categorized the patient. The authors concluded that the interpretation of pulmonary function tests by pulmonologists led to marked variations and errors, whereas the AI-based software provided interpretations that were more accurate (and consistent) and could serve as a powerful decision support tool to improve clinical practice. 55 However, it has been noted elsewhere that the true clinicians' performance might have been underestimated because they received limited clinical information. 57 Irrespective of whether the clinicians' performance was underestimated, this study showed that AI has a potential role in respiratory medicine that is beyond that of image analysis. Furthermore, diagnosis is one of the areas of respiratory research in which clinicians and researchers in the primary care field feel there is a great need for urgent solutions. 58 A recurring finding from a prioritization exercise performed by the International Primary Care Respiratory Group was the need for "simple tools" (eg, questionnaires) that enable disease diagnosis and assessment in community settings. 58

CONCLUSIONS
These findings suggest that AI/machine learning offers an innovative approach to develop diagnostic algorithms that have the potential to aid diagnosis and differentiation of-among other conditions/diseases-respiratory diseases. AI-based algorithms are able to evaluate multiple issues at the same time, whereas persons tend to be more linear in associations, which explains the increased speed/efficiency associated with AI. Indeed, the US FDA has approved a number of AI-based algorithms in medicine (Table I). 59 However, good performance metrics are dependent on the data available for the machine training, and are impacted by deficiencies in the database used to create the "rules"; these metrics do not guarantee a positive clinical impact, and algorithms must be validated through prospective trials in clinical settings. Although the development and validation of AI algorithms require large volumes of well-structured data, the algorithms must then be able to work with variable levels of data quality. It is also important that clinicians review the learned data logic to make sure it makes sense in the situation of incomplete health record data to train the model, and that they review how AI can function in the context of heterogeneous conditions such as asthma and COPD where diagnostic criteria overlap.
Although there has been an increasing use of AI in asthma research, 60 with encouraging results in small-scale studies in areas such as the interpretation of pulmonary function tests, breath analysis, and lung sound analysis, larger studies are needed to validate current findings and to boost its adoption by the medical community. 61 It will also be important to consider how the use of AI fits into clinical workflow (ie, everyday practice), and how issues of patient safety and physician liability should be addressed. Overall, AI is likely to play a key role in aiding clinicians in the diagnosis and differentiation of respiratory diseases in the future, 62 and it will be exciting to see the benefits that arise for the patients and doctors from its use in everyday clinical practice.