An AI-driven framework for the prediction of personalised health response to air pollution
Nazanin Zounemat Kermani, Sadjad Naderi, Claire H. Dilliway, Claire E. Heaney, Shrreya Behll, Boyang Chen, Hisham Abubakar-Waziri, Alexandra E. Porter, Marc Chadeau-Hyam, Fangxin Fang, Ian M. Adcock, Kian Fan Chung, Christopher C. Pain
1 Data Science institute, Imperial College London, London, UK 2 Department of Earth Science & Engineering, Imperial College London, London, UK
3 Centre for AI-Physics Modelling, Imperial-X, Imperial College London, UK
4 National Heart & Lung Institute, Imperial College London, London, UK
5 Department of Materials, Imperial College London, UK 6 MRC/PHE Centre for Environment and Health, Department of Epidemiology and Biostatistics, School of
Public Health, Imperial College London, London, UK
* denotes shared first authorship
Abstract
Air pollution poses a significant threat to public health, causing or exacerbating many respiratory and cardiovascular diseases. In addition, climate change is bringing about more extreme weather events such as wildfires and heatwaves, which can increase levels of pollution and worsen the effects of pollution exposure. Recent advances in personal sensing have transformed the collection of behavioural and physiological data, leading to the potential for new improvements in healthcare. We wish to capitalise on this data, alongside new capabilities in AI for making time series predictions, in order to monitor and predict health outcomes for an individual. Thus, we present a novel workflow for predicting personalised health responses to pollution by integrating physiological data from wearable fitness devices with real-time environmental exposures. The data is collected from various sources in a secure and ethical manner, and is used to train an AI model to predict individual health responses to pollution exposure within a cloud-based, modular framework. We demonstrate that the AI model — an Adversarial Autoencoder neural network in this case — accurately reconstructs time-dependent health signals and captures nonlinear responses to pollution.
Transfer learning is applied using data from a personal smartwatch, which increases the generalisation abilities of the AI model and illustrates the adaptability of the approach to real-world, user-generated data. 1 Introduction
Air pollution poses a significant threat to public health, contributing to approximately 7 million premature deaths annually worldwide, with over 90% of the global population exposed to excess levels of pollution. A range of diseases can be caused or exacerbated by pollution, including ischemic heart disease, stroke, chronic obstructive pulmonary disease (COPD), lung cancer and acute respiratory infections. In the UK, air pollution is recognised as a severe public health issue, comparable to cancer, obesity and heart disease . The annual mortality of human-made air pollution in the UK is estimated to be between 28,000 and 36,000 deaths every year . Despite efforts to reduce pollution levels, they remain high, and therefore there is a critical need to protect individuals by minimising their personal exposure, thus mitigating the adverse health effects of pollution . As a result of climate change and extreme weather events, levels of air pollution are projected to rise. Global warming, a key part of climate change, is marked by an increase in temperature of the earth’s surface, which will intensify the greenhouse effect by trapping heat, in turn, exacerbating climate change. In addition, the increasing occurrence of forest fires with the production of fine particulate matter (PM) and noxious gases, and the hot summers with increasing pollution emissions will increase the impact of air pollution on health . The respiratory system is particularly vulnerable to air pollution as the initial point of contact for inhaled pollutants. Key pollutants, including PM, nitrogen oxides (NO x ), sulphur dioxide, ozone and volatile organic compounds have been shown to impair lung function, and cause airway inflammation
. PM, categorised into coarse PM10, fine PM2.5 and ultrafine PM0.1, is particularly harmful, particularly in fine and ultra-fine size fractions, depositing more distally in the small airways. Both PM 2.5 and PM 0.1 may cross the blood vessels and traverse directly into the circulation, affecting other organs to exert multi-systemic effects. Chronic respiratory conditions continue to be an important source of mortality and morbidity globally
. Environmental factors play a significant role in determining the occurrence and progression of chronic respiratory diseases, of which asthma and COPD will be the most frequently affected . Exposure to air pollution reduces lung function and can induce both neutrophilic and eosinophilic inflammation in healthy and asthmatic subjects, with asthmatics being more sensitive . High spikes of pollution can be followed by an exacerbation of airway narrowing and inflammation particularly in people with asthma or COPD, who often need urgent treatment in hospitals. Extreme weather events have been associated with increased risk of asthma morbidity and mortality particularly in children and females . Mitigating strategies for minimising environmental exposures to air pollution are consistently undergoing revision . However, further work is required to identify factors that quantify individual-level risks in order to identify those particularly susceptible. At present, there are no tools to help an individual to determine this risk at the personal level. Our hypothesis is that it is possible to predict an individual's responses to air pollution by using artificial intelligence (AI)-based analysis of personal exposure data and the specific constituents of the pollutants. Recent advances in personal sensing have transformed the collection of behavioural and physiological data, bringing many benefits to healthcare . For example, personal data from smartphones and wearables can enable early diagnosis of a number of conditions and diseases, including seizures, depression, anxiety, Parkinson’s disease and pulmonary diseases . For a more complete picture of an individual’s health and environment, personal health data can be linked to surrounding air quality data, meteorological data and traffic data . Dealing with multi-modal data is just one challenge for those wishing to analyse personal health data, in addition to other issues such as noisy measurements, and time-series data that could be sparse or highly detailed (highly resolved) and irregular or continuous .
The PulsAir app was developed to integrate health data with environmental data avatars, points, and rewards to keep the user engaged . Concurrent to these advancements in personal sensing, breakthroughs in AI have significantly enhanced our ability to process and analyse complex, high-dimensional datasets efficiently. Techniques such as deep learning and transfer learning enable the rapid interpretation of large-scale, heterogeneous data streams, uncovering patterns and correlations that were previously inaccessible . By integrating these wearable sensing technologies with AI-driven analytical methods, it becomes possible to develop responsive systems that not only monitor but also predict health outcomes at the individual level . This convergence addresses the pressing challenge of air pollution and global warming with a level of precision and timeliness that traditional methods cannot achieve, paving the way for transformative advancements in personalised health monitoring and environmental interventions . In our previous study, Health Assessment across Biological Length Scales for Personal Pollution Exposure and its Mitigation (INHALE), we developed a physics-based, multi-scale approach across biological length scales starting from the cell and increasing to the lung, the individual and the neighbourhood scale, to assess the impact of air pollution on personal health in urban environments. Building on the results of INHALE, the primary goal of the AI-Respire project, has been to develop AI-driven models to predict individual health responses to pollution exposure. This article presents an integrated workflow developed during AI-Respire, which pipelines data collection from various sources and supports secure and ethical data interactions through an integrated data management platform (DMP) for AI model development and inference. The data sources used include: (i) existing health datasets from the INHALE project, (ii) temporal and spatial air pollution data from OpenWeather, (iii) and real-time personal health and GPS data collected via a smartwatch using BreathBot, a mobile app developed during this project. An Adversarial Autoencoder (AAE) model
is trained on the INHALE dataset to predict health outcomes related to pollution exposure is subsequently fine-tuned using transfer learning with individual smartwatch data, enabling continuous model updates and personalisation. Figure 1 provides an overview of the proposed workflow, illustrating the key modules and data flow. Figure 1: Overview of the AI-Respire data pipeline and model development workflow. This schematic illustrates the end-to-end architecture developed in AI-Respire for predicting personalised health responses to air pollution. The pipeline integrates two datasets: an offline dataset from the INHALE project containing air pollution exposure, respiratory health, environmental, and physical activity data; and an online dataset collected in real-time via the BreathBot mobile app, including smartwatch-derived physiological data, GPS data, and pollution data synchronised through OpenWeather. Model #1, an Adversarial Autoencoder (AAE), is pre-trained on the INHALE dataset to learn general patterns of pollution-health interactions. Using transfer learning, Model #1 is then fine-tuned with personalised data to yield Model #2, which captures individual-level responses. Both models are deployed within a secure Data Management Platform (DMP), supporting predictions that feed back to the user (e.g., via the mobile app) for potential health insights or interventions.
The system architecture ensures continuous data flow via secure AWS channels and supports scalable, ethical AI-driven personalised health monitoring. The paper is organised as follows: Section 2 introduces the data collection module, detailing the data sources and describing the datasets. This is followed in Section 3 by an explanation of the DMP and analytical engine. In Section 4, the methods for data processing and the development of AI models using the INHALE dataset are presented. The performance of these models is evaluated and discussed. Subsequently, in Section 5, the approach for implementing transfer learning on personal health data is described and analysed.
Finally, the paper concludes with a discussion on the workflow application, highlighting its limitations and proposing directions for future work. 2 Data Collection
2.1 BreathBot : Personal Health Data Collection
BreathBot is a custom-designed mobile application developed to facilitate the acquisition of health data, location, weather and air quality data in real-time. The app interfaces with third-party fitness devices such as Garmin and Fitbit, and fitness apps such as Apple Health and Android Health Connect, to retrieve sensor-recorded physiological and self-reported data from wearable devices (e.g., smartwatches, wearable sensors). The app leverages developer APIs (application programming interfaces) or regularly schedules data grabs via web-hooks to these companies to retrieve data in compliance with device-specific data structures and privacy standards. By consolidating data from these sources, BreathBot provides an efficient and scalable means of gathering and monitoring relevant health metrics, geolocation and environmental data, supporting high-frequency data collection required for temporal and spatial health analysis. Whilst the data types and resolution vary from one device or app to another, key health parameters collected include heart rate, respiratory rate and other relevant biometrics, as made available through connected wearables. BreathBot also collects self-reported data such as blood pressure and weight, where available. By querying these health metrics at regular intervals, it ensures continuous monitoring with a high degree of temporal precision. In addition to physiological data, BreathBot captures real-time GPS coordinates, obtained through a third-party plugin supplied by TransistorSoftware Ltd., which queries the background location tracking on participants’ phones to enable the geolocation of health events. This location data is accurate to 200m and reports to BreathBot every time a participant moves more than 200m. Weather and air quality data is provided by OpenWeather Ltd. BreathBot triggers sync jobs with OpenWeather via APIs to return time-stamped air quality and weather data for each of the participants’ GPS location data points. In addition, BreathBot runs an automated hourly check on participants’ location data and, where this has not changed due to the participant being stationary, a sync job is triggered to ensure that the resolution of air quality and weather data is at least hourly and therefore sufficient for the analysis. The use of location-based data provides essential contextual insights, allowing these environmental factors (e.g. pollen levels, wildfire smoke, and indoor sources of particulates) to be correlated with health metrics as they become relevant and/or available. This geolocation data enables spatial analysis, allowing the mapping of health events and identifying geographical patterns. Data is routed through secure API endpoints and web hooks, allowing continuous data uploads to AWS (Amazon Web Service) for remote storage and processing. Each data request transmits a batch of user health metrics or geolocation data, timestamped to ensure accurate historical tracking and longitudinal analysis. Transfer of data between the participant and the BreathBot app database is handled through secure HTTP connections (HTTPS) which are encrypted in transit. Once transferred, the data is securely stored on AWS using Amazon RDS (Relational Database Service), a scalable and structured database solution designed for high-frequency, multivariate data collection. AWS’s hybrid object storage enables efficient storage and retrieval of large volumes of data, essential for real-time health tracking. AWS security configurations, including encryption at rest and in transit, ensure data integrity and privacy compliance. Periodically, data from AWS is transferred to the DMP where it is integrated with other relevant datasets. BreathBot follows strong security standards, incorporating robust authentication mechanisms at organisation level, including multi-factor authentication and public-key infrastructure for securing user data and access control where applicable. Access to data collection settings and historical data is limited by role-based access control to safeguard personal health information (PHI).
All health and geolocation data collected is anonymised and encrypted, ensuring compliance with data protection regulations (e.g., GDPR). The API generates an access token for the user, which is stored in the secure storage provided by the mobile device (i.e. Keychain on iOS). Every request the app makes to the API is authenticated by this access token, which both allows us to restrict access to only registered users and allows the API to identify the user with whom to link the new data. Data is encrypted both in transit, using Transport Layer Security (TLS) protocols, and at rest within AWS, provided that encryption settings are enabled on the database configurations, ensuring user privacy across the entire data lifecycle. 2.2 Environmental Data Collection through OpenWeather
This study utilises environmental data sourced from OpenWeather, a meteorological data provider known for its comprehensive, hyperlocal forecasting models and extensive historical data archives. Its data ecosystem draws on a network of global sources, ensuring comprehensive geographical and temporal coverage that is augmented by satellite imagery. To achieve this breadth of data, OpenWeather integrates meteorological inputs from a range of reliable sources, including radar, global agency models (such as those from the UK Met Office, NOAA, and ECMWF), weather satellites, and an extensive network of weather stations worldwide. Sources of air quality information include anthropogenic emissions from the TNO-MACC dataset, IS4FIRES information on wild-land fires, as well as embedded emission computations for sea salt, pollen, wind-blown dust, and natural volatile organic compounds. The One Call 3.0 API from OpenWeather provides an approach to accessing an array of weather-related datasets, catering to real-time, forecasted, and historical weather data needs. For real-time and forecast data, a single API request retrieves multiple datasets, which include current weather metrics, a minuteby-minute forecast of precipitation for the next hour, hourly weather forecasts for the upcoming 48 hours, and daily forecasts covering up to 8 days. Moreover, the API delivers national weather alerts specific to a user’s location. Key weather parameters available through this API include air temperature, precipitation probability and volume, air pressure, humidity, dew point, cloud cover, visibility, UV index, wind metrics (speed, gusts and direction), and daily min-max temperatures . The API also offers critical astronomical information, such as sunrise, sunset, moonrise and moonset times. Furthermore, the system supports multiple units, time zones, and language options, with an extensive coverage of 46 languages, thus facilitating global applicability and ease of use. For long-term forecasting, users can access data projections up to 1.5 years in advance, offering a valuable resource for extended environmental trend analyses. Historical weather data is equally robust, with a 45-year archive accessible through a single API request. Researchers can retrieve data for specific timestamps or opt for daily aggregation to support longitudinal studies. Historical parameters mirror those provided for realtime and forecasted data, including air temperature, precipitation probability and volume, air pressure, humidity, dew point, cloud cover, visibility, UV index and wind characteristics. Complementing its weather datasets, OpenWeather also provides access to air pollution data through its Air Quality API, a crucial feature for studies assessing environmental influences on respiratory health. This API delivers global, hourly data on the Air Quality Index (AQI) along with concentration levels of specific pollutants, including sulphur dioxide (SO₂), nitrogen dioxide (NO₂), particulate matter (PM₁₀ and PM₂.₅), ozone (O₃) and carbon monoxide (CO).
Historical air quality data is available from November 27, 2020, while current and forecasted data can be accessed for hourly intervals over the next 5 days, supporting both retrospective and prospective analysis of air quality trends. 2.3 Overview of INHALE Dataset
The INHALE dataset contains data from 59 participants aged 20 to 75 years. These participants include 33 non-asthmatic and 26 asthmatic individuals, each equipped with wearable sensors: the AIRSpeck
and RESpeck devices. These capture information on air pollution exposure, respiratory health, and physical activity. Participants were monitored for two, two-week periods; one in summer and the other in winter.
The AIRSpeck measures PM concentrations and ambient conditions at a resolution of 30 seconds via: (i) an optical particle counter which measures particle counts across 16 size bins (grouping them into PM₁₀, PM₂.₅ and PM₁ size fractions), and (ii) temperature and relative humidity sensors. The RESpeck is a tri-axial accelerometer that is attached to each participant’s chest, and is validated in measuring respiratory rate, also measuring physical activity level, step count and classifying movement (e.g. sitting, standing, lying down), at one minute intervals. Additional weather and pollution data were supplemented from OpenWeather for corresponding timestamps and GPS location to enrich the dataset. Participants resided mainly in West London. The dataset focuses on the degree of exposure to environmental pollution and its potential respiratory effects. For this pilot study, we used data from 10 non-asthmatic INHALE participants. Hourly data was available, for each subject, two weeks of readings were available across both summer and winter periods; enabling the analysis of seasonal variations and environmental impacts on respiratory health. Table 1 summarises the primary features included in the analysis. Table 1: Summary of INHALE dataset features used for model training. Hourly aggregates of physiological and environmental data were obtained from 10 non-asthmatic participants over two-week periods in winter and non-winter months. Table 1 lists the description of each feature, units, value range, data type, and source (RESpeck, AIRSpeck, or OpenWeather), supporting analysis of pollution exposure and respiratory health. Feature Description Units Data Type Range Source
Timestamp Date and time of the measurement, with hourly resolution
Breathing Rate Average respiratory rate of the subject per minute
Breathing Rate STD Standard deviation of the respiratory rate per minute
- `datetime` Both Devices bpm (breaths/min)
bpm (breaths/min)
`float` 8 – 30 RESpeck
`float` 0 – 5 RESpeck
Activity Level Intensity of the subject’s activity - `float` 0-10 RESpeck
Step Count Number of steps taken by the subject per minute steps `integer` 0 – 120 RESpeck
Temperature Ambient temperature °C `float` -5 – 40 AIRSpeck/OpenWeather
Humidity Relative humidity % `float` 0 – 100 AIRSpeck/OpenWeather
PM2.5 Concentration Particulate matter ≤2.5 µm in diameter µg/m `float` 0 – 500 AIRSpeck/OpenWeather
3 DMP and Analytical Environment
To facilitate the integration and analysis of multi-modal data from a range of sources, we leverage an advanced DMP developed by the Data Science Institute (DSI) at Imperial College London. One foundational aspect of this DMP stems from its conceptual origins in tranSMART, an open-source data management platform initially released in January 2012. tranSMART received significant contributions from various institutions, including IMI eTRIKS and The Hyve, and has been instrumental in supporting projects such as U-BIOPRED and RASP-UK . DMP, first released in June 2020 by the DSI, was designed to serve as the dedicated data management solution for the IMI2 IDEA-FAST project, which focuses on identifying digital endpoints to assess fatigue, sleep, and activities of daily living. Since 2020, it has been used extensively within IDEA-FAST and is scheduled to support additional research initiatives, including the EPSRC PREMIERE and INHALE projects. The platform architecture, shown in Figure 2, demonstrates the key components and their interconnections, including: (i) data storage, (ii) backend operations, (iii) analytical environment, and (iv) web-based interface. This setup enables efficient data exchange, real-time synchronisation, and secure access to support health-related research. The infrastructure adheres to standards for data security, quality management, and accessibility. Hosted within an ISO-compliant data centre, the platform ensures information security by leveraging Imperial College London’s advanced AI Cloud infrastructure, which provides a substantial 2-petabyte (PB) hybrid object storage. This storage capacity supports large-scale, high-dimensional data required for our detailed pollution and health analysis. Data storage within the platform is managed through an industry-standard database optimised for multimodel data, accommodating raw data files, metadata, standardised integrated data, and analytical results. The design of the platform emphasises data integrity and continuity, with all stored data mirrored in real time to prevent accidental loss. Moreover, bi-weekly snapshots are maintained as part of a comprehensive backup strategy, ensuring data availability and resilience. Figure 2: Data Management Platform (DMP) architecture in the AI-Respire project. It includes four core components: a secure web interface, backend processing engine, analytical environment, and data storage. The storage system supports raw and integrated data, metadata, and model outputs, enabling scalable, traceable, and secure AI-driven health analysis. The DMP supports data sharing and exploration functionalities through an integrated web-based user interface and an Application Programming Interface (API). This flexibility in data ingestion supports clinical data and environmental datasets. For data exploration, the platform includes a raw file explorer that provides dataset statistics for initial review. Also, a specialised clinical and device data explorer offers summary statistics and visualisations. The DMP adheres to Clinical Data Interchange Standards Consortium (CDISC) standards, which are widely used in industry and academia . By embedding CDISC-compliant data standardisation pipelines, the platform ensures consistency and interoperability in data handling. Moreover, it supports extensibility to customised formats and standards. To ensure data security and controlled access, the platform implements a comprehensive user authentication and access management system. Multiple authentication options are available, including password-less methods, public-key authentication, and two-factor authentication combining passwords with time-based one-time passcodes (TOTP). Access control is managed through a role-based framework, allowing for fine-grained permissions that align with the specific roles and responsibilities of each user. This framework also includes account expiration controls, which are particularly useful for managing temporary users or time-bound project access. Furthermore, a detailed logging system tracks and records all user activities, providing a transparent and auditable history of interactions with the platform. These security measures collectively safeguard data and ensure that sensitive health and environmental information is accessible only to authorised personnel. The platform also includes a secure analytical environment that supports the development and execution of scripts for data analysis. This environment includes file and job management services, ensuring that users can efficiently organise data and track analytical workflows.
Interactive applications, including Jupyter Notebook, R Studio, and MATLAB, are integrated into the platform, providing a flexible workspace for researchers to perform in-depth analyses, run complex models, and visualise results. 4 Data Integration, Model Development, and Training Strategy
4.1 Data Acquisition
This study uses three main data streams: physiological and environmental data from the INHALE cohort, personal smartwatch data and publicly available pollution and weather data via the OpenWeather API. The subset of INHALE dataset used for this analysis included 10 healthy participants monitored using AIRSpeck (air quality) and RESpeck (respiratory rate and activity) sensors across two seasonal periods: Summer and Winter. Data were recorded hourly and geotagged with GPS coordinates, enabling alignment with external datasets. This dataset was temporally and spatially matched with OpenWeather pollution and meteorological records, retrieved using timestamps and GPS coordinates. Personal data were collected independently from a single user over 8 months via Apple Health (heart rate, step count) and Google Maps Timeline (location). This dataset was temporally and spatially matched with OpenWeather pollution and meteorological records, retrieved using timestamps and GPS coordinates.
All datasets were integrated into a secure, GDPR-compliant Data Management Platform and Analytical Environment (DMP-AE), supporting harmonised storage and scalable analysis. 4.2 Data Cleaning Initial exploratory analysis revealed temperature outliers in the INHALE dataset, with approximately 50% of participant records containing implausible values. These were corrected by capping values to realistic regional bounds, informed by typical historical weather patterns in London. Breathing rate values below 8 breaths per minute were flagged as physiologically implausible and replaced with the median value for the respective participant and seasonal period. Missing data were imputed in two stages: first, linear interpolation was performed within each participant-period group; second, any remaining missing values were filled using the group-specific mean. This approach preserved individual variability and seasonal trends while avoiding distortion from global averages. 4.3 Correlation Analysis The dataset was analysed to examine the minimum, maximum, and average values for all features across the P1 and P2 periods. Seasonal classification was used to account for environmental and physiological variations that may influence health outcomes. Temperature and breathing average showed the greatest variability, with notable seasonal effects observed in respiratory metrics. A Pearson correlation heatmap illustrates the relationship between environmental and physiological variables. Notable observations include: (i) weak or inconsistent Pearson correlation coefficients between features in the dataset.
Correlation strength was classified according to: poor, moderately strong, and very strong. Weak to fair correlations were observed between pollution levels and respiratory metrics (e.g. breathing average), suggesting that individual factors – such as age, preexisting conditions, and activity levels – may modulate responses to pollution exposure. Moderately strong to very strong correlations were detected between environmental variables, confirming consistency across data sources. Specific subgroups (e.g. individuals with pre-existing respiratory conditions) exhibited stronger correlations between pollution levels and respiratory indicators, reinforcing the need for personalised models rather than relying on general population trends.
Figure 3: A heatmap to depict correlations between the features in the INHALE dataset. 4.4 Data Preprocessing
4.4.1 Normalisation
Normalisation is a critical step in data preprocessing to prepare the data to train a model, particularly when working with time-series data that exhibit varying scales and ranges across features. Normalisation helps ensure that no single feature disproportionately influences the model due to its scale, which could otherwise slow convergence or lead to unstable training. All continuous features were scaled to the range using Min-Max normalisation. The Min-Max scaler was fitted exclusively on the training data to prevent data leakage, and the same transformation was then applied to the validation and test sets, maintaining consistency across all datasets.
This approach ensures that the model is evaluated in a fair and unbiased manner. After normalisation, the scaled features were reintegrated with their corresponding identifiers (e.g. patient ID, timestamp, period) for subsequent analysis. Min-Max scaling brings all features within abounded range, which is particularly beneficial when using neural networks with activation functions such as sigmoid or tanh . Categorical variables (e.g., time of day, day of week) were encoded cyclically using sine and cosine transformations to preserve their temporal structure. 4.4.2 Time Series Construction
To model sequential patterns in the data, time-series windows were constructed using a sliding window approach. Each sample was reshaped into a three-dimensional tensor with dimensions:[samples × timesteps × features]. A window length of 8 time steps and astride of 2 were selected after empirical testing. This configuration balanced the need to capture temporal dependencies while retaining sufficient training samples. Alternate window lengths were tested but resulted in reduced model performance. Cyclical features such as hour of day and day of week were encoded using sine and cosine transforms to reflect their periodic nature. This technique allows the model to capture recurring patterns, such as diurnal variations in pollution levels or weekly behavioural cycles, that might influence health responses.
For the INHALE dataset, where pollution and health metrics exhibit temporal variability, this method is well-suited to capture both short-term fluctuations and long-term trends. 4.4.3 Feature Engineering The INHALE dataset includes features of air pollution exposure from size fraction particle counts categorised into bin values. These were excluded from the training process due to their limited relevance in capturing predictive signals for health responses to pollution exposure, as determined through exploratory analysis. Moreover, a manually derived feature, heart rate, was introduced based on the approximation that heart rate is ~4 times the respiratory rate to reflect a realistic metric commonly available in wearable health devices such as fitness trackers and smartwatches. Recognising variability in real-world measurements, a noise factor of ±10% was applied to the simulated heart rate values to better mimic data collected from such devices. The addition of heart rate was motivated by its potential to strengthen the capacity of the model to capture physiological responses to pollution exposure. Although, the use of a fixed heart rate-torespiratory rate introduces assumptions that may not fully account for individual differences due to factors such as age, fitness level, or underlying health conditions.
Future iterations could refine this feature by incorporating actual observed heart rate data or subject-specific adjustments where available. 4.5 Model Architecture
The AAE framework forms the foundation of the proposed model, integrating the principles of autoencoders with adversarial learning to achieve robust feature representation and well-structured latent spaces. To enhance its predictive capabilities, the architecture is extended with Long Short-Term Memory (LSTM) layers to capture temporal dependencies inherent in the time-series data . Moreover, convolutional layers are incorporated to model spatial correlations effectively . Given the limited size of the training dataset, attention mechanisms were excluded to avoid overfitting and maintain computational efficiency. This hybrid architecture enables the model to capture both shortterm dynamics and long-range spatial patterns. Figure 4 provides a schematic representation of the model architecture, highlighting its key structural components: an encoder, a latent space regularisation mechanism, a decoder, LSTM layers to capture temporal dependencies, and convolutional layers for spatial correlations. Complementing these components are the objective function, the training process, and the model outputs. Figure 4: Overview of the adversarial autoencoder (AAE) architecture used in AI-Respire for time-series prediction of pollution-linked health outcomes. The input consists of an 8-timestep window of 29 features, reshaped to a 3D tensor. The encoder includes two 2D convolutional layers with ReLU activations, followed by an LSTM layer and a fully connected layer projecting to a 1000-dimensional latent space (Vector Z). The decoder mirrors this process with a linear layer followed by two transposed convolutional layers using ReLU and tanh activations to reconstruct the output. A discriminator network, composed of two hidden layers and a sigmoid output, enforces adversarial regularisation by distinguishing real samples from the prior p(z). During training, the model learns from both reconstruction and adversarial losses. This architecture supports both prediction and inpainting of missing data across time by iteratively passing sequences through the trained model. Colour-coded blocks indicate key layers: green (linear), blue (convolutional), yellow (sigmoid), purple (LSTM), and red (ReLU). The encoder 𝐸 maps the input data 𝒙 to a latent representation 𝒛 in a lower-dimensional space while preserving critical features. This process is defined as:
𝒛= 𝐸(𝒙) = 𝑓 (𝒙; 𝜃 )
where 𝑓 is the encoding function parameterised by weights 𝜃 . To impose structure on the latent space, a discriminator 𝐷 adversarially enforces similarity to a prior distribution 𝑃 𝑧 (e.g. a Gaussian distribution). The adversarial loss is given by:
ℒ = −𝔼 𝒛~𝑞 𝑧 [log𝐷(𝒛)] −𝔼 𝒛~𝑃 𝑧
where 𝑞 𝒛 is the posterior distribution of the latent space. The decoder 𝐺 reconstructs the input 𝒙 from the latent representation 𝒛, optimising a reconstruction loss:
𝒙̂ = 𝐺(𝒛) = 𝑓 (𝒛;𝜃 )
The reconstruction loss is defined as:
ℒ = 𝔼 𝒙~𝑃 
The final objective combines the reconstruction loss, adversarial loss, and any additional regularisation
terms:
ℒ = ℒ + 𝜆 ℒ 
where 𝜆 balances the contribution of the adversarial loss with the reconstruction loss. To model temporal patterns, the latent representation 𝒛 𝑡 at each timestep 𝑡 is processed using LSTM layers. The LSTM captures dependencies between timestep 𝑡 and 𝑡 – 𝑘 through its hidden states 𝒉 𝑡 and cell states 𝒄 𝑡 :
𝒊 𝑡 = 𝜎 𝒇 𝑡 = 𝜎 𝒐 𝑡 = 𝜎 𝒄 𝑡 = 𝒇 𝑡 ⨀𝒄 𝑡−1 + 𝒊 𝑡 ⨀tanh
𝒉 𝑡 = 𝒐 𝑡 ⨀tanh(𝑐 𝑡 )
where 𝜎 is the sigmoid activation function, ⨀ is the Hadamard product which denotes entry-wise multiplication of tensors, and 𝑈and 𝑏are learnable weights and biases. Data inpainting is a technique used to reconstruct missing or corrupted portions of data by leveraging contextual information from the surrounding regions . In this study, inpainting is integrated into the model to augment the dataset by filling gaps in time-series data caused by intermittent readings, or missing values. The inpainting process is formulated as a regression problem, where missing values 𝑥 missing are estimated based on the observed values 𝑥 observed and contextual dependencies. Mathematically, the reconstructed data 𝑋 reconstructed is defined as 𝑋 reconstructed = 𝑓(𝑥 observed, 𝒞), where 𝑓 represents the inpainting function and 𝒞 denotes temporal/spatial dependencies. For time-series data, the inpainting method uses the surrounding sequence {𝑥 , …, 𝑥 𝑡−1, 𝑥 𝑡+1, …, 𝑥 𝑡+𝑘 } to estimate the missing value 𝑥 𝑡 as 𝑥 𝑡 = 𝑔, where 𝑔 is a neural network trained for this
purpose. The inpainting function is modelled using layers that account for temporal correlations with LSTMs and spatial dependencies with convolutional operations. During training, the inpainting module operates in parallel with the AAE, ensuring that reconstructed sequences align with the regularised latent space structure. The reconstructed data, after inpainting, undergoes feature extraction in the encoder, representation in the latent space, and subsequent decoding for predictions or reconstructions. By augmenting the dataset, this approach not only improves the generalisability of the model but also ensures that temporal and spatial patterns are preserved within the learned representations. 5 Results
5.1 Model Training and Evaluation
The training and prediction workflow for the proposed AAE model involves three main stages: training, inpainting-based prediction, and evaluation. During training, the encoder and decoder learn feature representations and reconstruct the input data, while the discriminator ensures latent space regularisation using adversarial loss. The model is optimised iteratively using a combination of reconstruction and adversarial objectives. For prediction, missing values are iteratively reconstructed using inpainting, where the model leverages its learned representations to infer plausible data points. Finally, evaluation metrics such as MSE and visualisation techniques are used to assess the performance of the model. A detailed outline of the process is provided in Algorithm 1 .
Algorithm 1: Training and prediction with AAE and inpainting
``` Input: Training data(DTrain),Test data(DTest) Output: Predicted values for missing data, Evaluation metrics
1: Initialise model parameters(qEnc, qEnc, qDis) 2: Set hyperparameters: maximum iterartions (NEpochs), noise level (e), inpainting iterations (NInpaint) 3: Load training data into(trainloader), test data into(testloader)
--- Training Phase -- 4: for each epoch do 5: for each batch (xBatch, yBatch) in (trainloader) do
``` ``` 6: # Encoder-Decoder forward pass 7: z = Encoder(xBatch; qEnc) 8: xRecon = Decoder(z; qDec) 9: Compute reconstruction loss(LRecon = MSE(xBatch, xRecon)
10: # Latent space regularisation 11: Generate (zFake ~ pLatent) and (zReal = z) 12: Compute adversarial loss (LAdv) using (Discriminator(zFake, zReal; qDis))
13: # Update parameters 14: Update(qEnc, qDec) using (LRecon+ λAdvLAdv) 15: Update (qDis) using (LAdv) 16: end for
17: end for
--- Prediction Phase with Inpainting -- 18: for each sample (xSmaple) in (testloader) 19: # Add noise to simulate missing values 20: xNoise = xSample+e 21: Initialise missing values: set last time step of (xNoise) to second-to-last time step
22: # Iterative inpainting 23: for iteration do 24: Predict missing values: (xPred = Decoder(Encoder(xNoise; qEnc); qDec)) 25: Update noisy input: set missing values in (xNoise) to (xPred) 26: end for
27: Store final prediction: (xFinal = xNoise) 28: end for
--- Evaluation - 29: Compute evaluation metrics between (xFinal) and ground truth (yTruth) 30: Visualise results: plot actual vs. predicted values, latent space representations
```
The performance of the proposed AAE was evaluated using a real-world dataset, focusing on the ability of the model to reconstruct and predict normalised values of breathing rate ( ). Figure 5 shows the comparison between the actual and predicted values over a sample range, normalised for clarity. The results demonstrate that the predicted values (orange line) closely align with the actual values (blue line), capturing both short-term fluctuations and long-term trends. Quantitatively, the model achieved an MSE of 0.0029 on the validation dataset, which reflects its high accuracy in reconstructing breathing rate data. This low MSE suggests that the AAE framework, enhanced by convolutional and LSTM layers, effectively learns temporal dependencies and spatial correlations within the data, even in the absence of an attention mechanism. Figure 5: Comparison of actual and predicted normalised breathing rate ( ) values over half-hourly intervals. 5.2 Effect of Pollution Levels on Respiratory and Cardiovascular Health
The relationship between air pollution and physiological responses — specifically respiratory and cardiovascular metrics — was examined using the proposed AAE model. Initial analyses revealed poor correlations between pollution levels and both average breathing rate ( bravg ) and heart rate ( heartrt ). To further investigate these associations under different environmental conditions, all measured pollution variables were systematically increased by 20%, 50%, and 100% to simulate escalating exposure scenarios. The results revealed that minor increases of 20% and 50% in all pollution levels did not produce significant changes in the average breathing rate or heart rate, suggesting that small fluctuations may not be sufficient to cause noticeable physiological changes for healthy people within the current model framework. To enhance the ability of the model to detect more subtle or complex relationships, a polynomial feature transformation was applied, expanding the feature set from 29 original features to 462 derived features. This transformation enabled the model to capture higher-order interactions and nonlinear dependencies within the dataset. As shown in Figure 6, under conditions of a 100% increase in pollution levels, the enhanced model demonstrated clearer correlations. Specifically, the average breathing rate increased by ~3.5%, and the heart rate rose by ~2.5%. Figure 6: Comparison of predicted and actual trends for average breath rate (top) and heart rate (bottom) under baseline and 100% increased pollution levels. The impact of decreased pollution was evaluated by simulating pollution reductions of 20%, 50%, and 100%. Similar to the results for minor pollution increases, reductions of 20% and 50% did not produce significant changes in either the average breathing rate or heart rate.
Even with a 100% reduction in pollution, no noticeable improvement in the breathing rate was observed. 5.3 Transfer Learning for Personal Health Data using Smartwatch Measurements To improve the adaptability of the neural network initially pre-trained on the INHALE dataset, we applied transfer learning by fine tuning the model using personal health data collected over eight months from a smartwatch. The dataset comprises time-series data with 5-minute time intervals, including physiological metrics such as heart rate and step count, coupled with environmental factors such as weather and air pollution levels. The weather and pollution data were sourced from the OpenWeather API, providing a feature set for model training. The transfer learning process involved freezing the weights of the initial layers of the pre-trained model to retain their generalisable feature representations while fine-tuning the last two layers using the smartwatch dataset. This approach helps the model learn individual-level patterns while leveraging its prior knowledge, reducing training time and improving performance on the new dataset. Let the pre trained model 𝑓 pre (𝑥; θ pre ) be parameterised by θ pre, where 𝑥 represents the input features. The adaptation process can be expressed as:
𝑁
θ adapt = 𝜃
𝑁 [∑ℒ(𝑓] [adapt] [(𝑥] [𝑖] [; θ), 𝑦] [𝑖] [)]
𝑖=1
where 𝑓 adapt (𝑥; θ) represents the adapted model with parameters θ; 𝑦 𝑖 denotes the ground truth for the
𝑖 [𝑡ℎ] sample; ℒ is the MSE loss function, defined as ℒ(𝑦, 𝑦̂) = 𝑛1 [∑] 𝑛𝑖=1 (𝑦 𝑖 𝑖 ) ; and 𝑁 is the number of training samples. The smartwatch dataset was divided into training and test subsets, with 80% used for training the final two layers and 20% retained for evaluation. During training, the Adam optimiser was employed, with a learning rate of 10, to minimise the loss and update the model parameters of the last two layers. The performance of the model on the unseen 20% of the smartwatch data was evaluated using the MSE, yielding a value of 4.24 × 10 . When compared to the MSE values on the training and validation dataset, the model shows a similar performance, indicating its ability to generalise to a different and more complex dataset. A qualitative analysis of the predictions revealed that the model successfully captured trends and patterns in the physiological data, including variations influenced by environmental factors. This demonstrates its ability to adapt and perform well even when the input data differs significantly from the original training data. The successful application of transfer learning highlights the flexibility of the proposed approach. The ability to generalise across datasets with distinct characteristics makes it a promising tool for broader applications, such as personalised health monitoring and environmental health assessments. Future work will aim to explore other transfer learning strategies, such as freezing intermediate layers or using domain adaptation techniques, to further enhance performance on diverse datasets. 6 Conclusions and Future Work
This study presents a novel framework for predicting personalised health responses to pollution by integrating physiological data from wearables with real-time environmental exposures. The core predictive model — an Adversarial Autoencoder augmented with LSTM and convolutional layers — accurately reconstructed temporal health signals and captured nonlinear responses to pollution, including simulated increases in particulate matter. Applying transfer learning to the core model using personal smartwatch data confirmed the ability of the model to generalise across datasets with differing resolution, structure and context. The framework was able to maintain performance without the need to retrain the entire network, illustrating its adaptability to real-world, user-generated data. Although the core model used here was an adversarial autoencoder, any neural network could be chosen. To support scalable, secure, and standardised data integration, we deployed a dedicated Data Management Platform and Analytical Environment (DMP-AE) . This infrastructure enables compliant ingestion, harmonisation, and analysis of heterogeneous datasets — including INHALE cohort data, smartwatch time series, and API-linked environmental streams — through a modular, cloud-based architecture. Future development will expand the system to larger, more diverse populations and incorporate uncertainty quantification for personalised risk scoring.
Together, this AI- and infrastructure-enabled approach offers a foundation for real-time, individualised environmental health monitoring and precision intervention. Building on the findings of this study, we identify several key aspects that warrant further investigation to enhance our understanding of pollution exposure and its health implications at an individual level: - Identifying the main constituents of pollution that individuals are exposed to and quantifying their daily exposure levels. - Assessing the environmental factors that influence pollutant levels in an individual’s surrounding and their role in modulating exposure. - Establishing measurable health indices that can serve as reliable surrogates for an individual’s physiological response to air pollution. - Investigating potential biomarkers of risk that could provide early indicators of adverse health effects. - Developing methods to assess both exposure and respiratory system response at an individual level. - Exploring predictive models that link exposure patterns to long-term health outcomes at an individual scale. Addressing such questions in future research will contribute to a more comprehensive framework for assessing the health impacts of air pollution and guiding personalised mitigation strategies. 7 Acknowledgements
We would like to thank the following people who have kindly contributed their time and expertise to this paper. Dmytro Chupryna (Business Development and Strategic Partnerships Manager) and Daniil Mintc (Business Development and Community Manager) from OpenWeather Ltd. for their review and suggestions, and Yifeng Mao (Computational Privacy Group) from Imperial College’s Data Science Institute for help with issues concerning data management and privacy. 8 Funding Sources
The authors acknowledge the following EPSRC and NERC grants: AI-Respire, “AI for personalised respiratory health and pollution”; INHALE, “Health assessment across biological length scales”; D-XPERT, “AI-Powered Total Building Management System”; the PREMIERE programme grant, “AI to enhance manufacturing, energy, and healthcare”. Support from Imperial-X's Eric and Wendy Schmidt Centre for AI in Science (a Schmidt Sciences programme) is also gratefully acknowledged.