Systems and methods for a counterfactual framework for predicting and preventing adverse health events

The system addresses the challenge of using machine learning predictions to modify human behavior by employing an AI model to generate counterfactual data points and apply a grid search methodology, resulting in effective and user-preference-aligned behavior interventions that prevent adverse health outcomes.

WO2025054464A1PCT designated stage expired Publication Date: 2025-03-13THE ARIZONA BOARD OF REGENTS ON BEHALF OF THE UNIV OF ARIZONA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
PCT/US2024/045606
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-08-15
Filing Date
2024-09-06
Publication Date
2025-03-13

AI Technical Summary

Technical Problem

Current technologies struggle to effectively use predictions from machine learning algorithms to modify human behavior and prevent adverse health outcomes such as diabetes and heart disease, due to challenges in sustaining long-term behavior changes and incorporating user preferences.

Method used

A system that utilizes a processor to access user data and predict modifiable behavior interventions using an AI model trained to generate counterfactual data points. The system applies a grid search methodology to find an optimal counterfactual data point that translates into a behavior intervention, while maintaining user preferences and ensuring minimal distance from the original data.

Benefits of technology

The system effectively predicts and prevents abnormal health outcomes by providing personalized and actionable behavior interventions that align with user preferences, thereby promoting sustainable health improvements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US2024045606_13032025_PF_FP_ABST
    Figure US2024045606_13032025_PF_FP_ABST
Patent Text Reader

Abstract

A computer implemented system ("ExAct") generates counterfactual explanations for chronic disease prevention and management. Leveraging insights from adversarial learning, ExAct characterizes the decision boundary for high-dimensional data and performs a grid search to generate actionable interventions. ExAct is unique in integrating prior knowledge about user preferences of feasible explanations into the process of counterfactual generation. ExAct is evaluated extensively using four real-world datasets and external simulators.
Need to check novelty before this filing date? Find Prior Art

Description

Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a SYSTEMS AND METHODS FOR A COUNTERFACTUAL FRAMEWORK FOR PREDICTING AND PREVENTING ADVERSE HEALTH EVENTS CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This is a PCT Patent Application that claims benefit to U.S. Provisional Patent Application Serial No.63 / 537,409 filed 8 September 2023 and U.S. Provisional Patent Application Serial No.63 / 683,699 filed 15 August 2024, which are herein incorporated by reference in its entirety. GOVERNMENT SUPPORT

[0002] This invention was made with government support under 2210133 awarded by the National Science Foundation. The government has certain rights in the invention. FIELD

[0003] The present disclosure generally relates to computer-assisted health monitoring, and in particular, to a system and associated methods for computer- assisted health monitoring and behavioral intervention that accounts for user preferences and habits. BACKGROUND

[0004] Unhealthy lifestyle contributes to chronic complications like diabetes and cardiovascular disease and increases risks of morbidity and mortality. However, preventing these abnormal events through lifestyle changes is challenging due to ingrained habits, societal influences, and the difficulty in sustaining long-term behavior modifications. Wearables technologies (e.g., CGMs, smartwatches, insulin pumps) can continuously monitor dietary intake, exercise, medication behavior and AI algorithms can predict abnormal events ahead of time leveraging sensor data, thus providing opportunities to prevent such events. However, it is currently unknown how exactly predictions made by machine learning algorithms can be used to modify human behavior to prevent adverse outcomes. 1 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a

[0005] It is with these observations in mind, among others, that various aspects of the present disclosure were conceived and developed. SUMMARY

[0006] A system for preventing abnormal health outcomes includes a processor having access to instructions stored in a memory that configure the processor to: access data associated with a user; and predict, by implementation of an artificial intelligence (AI) model and in view of the data, a modifiable behavior intervention to prevent an abnormal health outcome, the AI model being trained to generate one or more counterfactual data points to characterize a decision boundary of the AI model and apply a grid search methodology to find an optimal counterfactual data point of the one or more counterfactual data points that translates into the modifiable behavior intervention to prevent abnormal health outcomes. Importantly, the optimal counterfactual data point maintains one or more features of the data associated with the user based on a ranked preference of the user.

[0007] The processor can further have access to instructions stored in the memory that configure the processor to: identify, based on the decision boundary of the AI model and by implementing the grid search methodology, the optimal counterfactual data point having a minimal distance from the data associated with the user and that results in a normal health outcome classification.

[0008] The processor can further have access to instructions stored in the memory that configure the processor to: predict, by implementation of a classifier of the AI model, the abnormal health outcome based on the data associated with the user, the decision boundary of the AI model corresponding to the classifier; and generate, by implementation of an autoencoder of the AI model, adversarial examples that characterize the decision boundary of the classifier.

[0009] To generate adversarial examples that characterize the decision boundary of the classifier, the processor can further have access to instructions stored in the memory that configure the processor to: generate a first adversarial example by implementation of a first autoencoder of the AI model, the first adversarial example having an abnormal health outcome classification and being a minimal distance from a 2 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a normal data point having a normal health outcome classification; generate a second adversarial example by implementation of a second autoencoder of the AI model, the second adversarial example having a normal health outcome classification and being a minimal distance from an abnormal data point having an abnormal health outcome classification; and generate one or more borderline examples that correspond to the decision boundary using a bisection method that combines the first adversarial example and the second adversarial example. The optimal counterfactual data point can correspond to a borderline example of the one or more borderline examples that maintains one or more features of the data associated with the user and results in a normal health outcome classification.

[0010] The processor can further have access to instructions stored in the memory that configure the processor to: translate the optimal counterfactual data point into the modifiable behavior intervention for communication to the user by a display device in communication with the processor.

[0011] The processor can further have access to instructions stored in the memory that configure the processor to: recommend the modifiable behavior intervention when data is detected by the AI model that is indicative of an abnormal heath outcome.

[0012] In some examples corresponding to blood glucose monitoring and control, the data can be accessed from at least one data source device including a wearable sensor that monitors one or more of physical activity, glucose, and insulin intake. The processor can further have access to instructions stored in the memory that configure the processor to: recommend the modifiable behavior intervention when data is detected by the AI model that is indicative of abnormal glucose levels. Further, the data can be being accessed from a data source device including a continuous glucose monitoring sensor that measures blood glucose regularly at predetermined intervals. The processor can further have access to instructions stored in the memory that configure the processor to: estimate an amount of macronutrient consumption by the user based on the blood glucose.

[0013] In some examples corresponding to cardiovascular function monitoring and control, the data can be accessed from a data source device including a 3 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a wearable sensor that monitors one or more of physical activity, blood pressure, heart rate, respiration, and blood oxygen saturation. The processor can further have access to instructions stored in the memory that configure the processor to: recommend the modifiable behavior intervention when data is detected by the AI model that is indicative of abnormal cardiovascular function.

[0014] The data can also be accessed from a data source device including a mobile device associated with the user, the data having been provided to the mobile device by the user to track one or more of food intake and medication intake. The processor can further have access to instructions stored in the memory that configure the processor to: predict a change in a blood glucose level of the user that may occur if the user consumes the food intake and / or medication intake defined by the data. Alternatively, or in addition, processor can further have access to instructions stored in the memory that configure the processor to: predict a change in cardiovascular function of the user that may occur if the user consumes the food intake and / or medication intake defined by the data.

[0015] In a further aspect, a method outlined herein includes: accessing data associated with a user; and predicting, by implementation of an artificial intelligence (AI) model and in view of the data, a modifiable behavior intervention to prevent an abnormal health outcome, the AI model being trained to generate one or more counterfactual data points to characterize a decision boundary of the AI model and apply a grid search methodology to find an optimal counterfactual data point of the one or more counterfactual data points that translates into the modifiable behavior intervention to prevent abnormal health outcomes. The method can further include: identifying, based on the decision boundary of the AI model and by implementing the grid search methodology, the optimal counterfactual data point having a minimal distance from the data associated with the user and that results in a normal health outcome classification, the optimal counterfactual data point maintaining one or more features of the data associated with the user based on a ranked preference of the user.

[0016] In a further aspect, a non-transitory, computer-readable medium outlined herein stores instructions encoded thereon, the instructions, when executed by one or more processors, cause the one or more processors to perform operations to: 4 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a access data associated with a user; and predict, by implementation of an artificial intelligence (AI) model and in view of the data, a modifiable behavior intervention to prevent an abnormal health outcome, the AI model being trained to generate one or more counterfactual data points to characterize a decision boundary of the AI model and apply a grid search methodology to find an optimal counterfactual data point that translates into the modifiable behavior intervention to prevent abnormal health outcomes, the optimal counterfactual data point of the one or more counterfactual data points having a minimal distance from the data associated with the user and that results in a normal health outcome classification as predicted by the classifier, and the optimal counterfactual data point maintaining one or more features of the data associated with the user based on a ranked preference of the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] FIGS.1A-1C are a series of graphical representations illustrating an approach to solve an optimization problem outlined herein. (FIG.1A) A classifier (black dashed line) is trained to identify normal (green) vs. abnormal (red) classes. (FIG. 1B) Many adversarial critical samples (borderline instances in blue and yellow) are generated along the decision boundary to approximate the decision hyperplane. (FIG. 1C) The real samples can be removed once substantial number of critical samples are in place. For a test sample outside of the normal region, predicted class can be toggled following an infinite number of trajectories. However, ExAct follows the path that requires minimal changes or emphasizes users preferences and restricts some features while flipping the class.

[0018] FIG.2 is a graphical representation illustrating how autoencoders produce borderline instances (blue and yellow), while the addition of a bisection algorithm adds finesse to them (teal triangles). The numbers are class probabilities.

[0019] FIGS.3A-3C are a series of graphical representations illustrating how Constrained Intervention involves altering the predicted class of the test sample with as few one-dimensional moves as possible. Considering the blue volume as the normal region and its surface as the decision hyperplane, (FIGS.3A and 3B) the test sample has two of the three feature values within the range of the decision hyperplane. 5 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a (FIG.3C) Hence, a move along y-axis is sufficient to place the sample within the normal zone.

[0020] FIGS.4A-4C are a series of diagrams illustrating an example implementation of the system. FIG.4A illustrates user data acquisition and a general flow for steps implemented by the systems outlined herein to communicate a modifiable behavior intervention to the user based on the user data. FIG.4B is a simplified block diagram showing a general overview of the systems outlined herein, including an artificial intelligence model that classifies user data to predict a health outcome and generates adversarial examples to identify an optimal counterfactual data point that corresponds to a modifiable behavior intervention to avert abnormal health outcomes. FIG.4C is a simplified block diagram that elaborates on the adversarial example generation aspect of the system of FIG.4B.

[0021] FIGS.5A and 5B are a pair of illustrations showing example implementations of the system of FIGS.4A-4C, respectively applied in the context of blood glucose control (FIG.5A) and blood pressure control (FIG.5B).

[0022] FIGS.5C and 5D show example user interfaces that may be displayed to a user for blood glucose management using the system of FIG.4B.

[0023] FIGS.5E and 5F show example clinician interfaces that may be displayed to a clinician for blood glucose management of a patient using the system of FIG.4B.

[0024] FIGS.6A-6C are a series of graphical representations showing outputs of the autoencoders and the bisection algorithm, i.e., the borderline instances, are shown across three plots. The plots display six out of the seven features, grouped as (a) pre-meal BGL (i.e. SBGL), insulin intake, CHO, (b) CHO, fiber intake, CHO composition, and (c) DFB (i.e. time elapsed since last insulin), fiber intake, insulin intake. This visualization demonstrates the precise placement of critical instances between the quasi-hyperglycemic and normoglycemic samples.

[0025] FIG.7 is a graphical representation showing proximity-invalidity trade-off across all methods evaluated herein. 6 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a

[0026] FIGS.8A and 8B are a pair of graphical representations showing comparison of average feature diversity captured by different methods in Heart Disease (FIG.8A) and PimaDM dataset (FIG.8B).

[0027] FIGS.9A and 9B are a pair of graphical representations showing simulated outcomes of counterfactual explanations.

[0028] FIG.10 is a graphical representation showing how overfitting prevention results in NICE achieving better normalized distance. NICE identifies normoglycemic samples lying on the hyperglycemic side of the classifier for test sample a and b, while this is not the case for c.

[0029] FIG.11 is a simplified diagram showing examples of upward and downward counterfactual explanations.

[0030] FIG.12 is a simplified diagram showing a tradeoff plot for NA dataset. Each point corresponds to a CF. All the CFs are generated for a single test point.

[0031] FIG.13 is a simplified diagram showing an example computing system for implementation of the systems outlined herein.

[0032] FIGS.14A and 14B are a pair of process flow diagrams illustrating a method for implementation of the systems outlined herein.

[0033] Corresponding reference characters indicate corresponding elements among the view of the drawings. The headings used in the figures do not limit the scope of the claims. DETAILED DESCRIPTION 1 Introduction

[0034] Monitoring unexpected health events and taking actionable measures to avert them beforehand is central to maintaining health and preventing disease. Therefore, a tool capable of predicting adverse health events and offering users actionable feedback about how to make changes in their diet, exercise, and medication to prevent abnormal health events could have significant societal impacts. Counterfactual explanations can provide insights into why a model made a particular prediction by generating hypothetical instances that are similar to the original input but 7 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a lead to a different prediction outcome. Therefore, counterfactuals can be viewed as a means to design AI-driven health interventions to not only predict but also prevent adverse health outcomes such as blood glucose spikes, diabetes, and heart disease.

[0035] To address the knowledge gap in how predictions made by machine learning algorithms can be used to modify human behavior, the present disclosure outlines a novel approach to determine minimum behavioral modifications that a person can make to avert abnormal health events.

[0036] CF explanations research is closely related to explainable AI (XAI). The adoption of XAI is gaining momentum across different domains, extending beyond conventional feature-importance methods and embracing techniques including causal, visual and CF explanations for instilling trust and fairness in black-box models. While technologies like LIME, TIME, and SHAP focus on creating a hierarchy of features based on their contributions to the model’s prediction, explanatory tools such as Grad- CAM and SmoothGrad provide visual interpretations highlighting the specific segments within continuous data that contribute the most towards a specific class. CF explanations is a more targeted branch of XAI that emphasizes describing the smallest change to the feature values that changes the prediction outcome to a predefined output. CF are not necessarily actual instances from the training data, but can be adversarial samples made with a combination of feature values. Prior research formulated CF explanations generation as a multi-objective optimization problem (MOOP) and solved it leveraging different optimizers, including ADAM, SG, NSGA-II, and SAT solver, respectively. In contrast, DACE generated CF explanations based on mixed integer linear optimization with a custom loss function. Several researchers leveraged iterative steps to modify the actionable features greedily until the predicted class is changed. NICE generates plausible CFs similar to the original instance by searching for nearby instances in the data manifold that exhibit the desired outcome. However, prior research falls short in integrating a user’s ranking of plausible features into the optimization process for generating CF explanations. DiCE incorporates user- defined constraints on certain features by formulating the creation of CF explanations as a mixed-integer optimization problem. However, DiCE first generates counterfactuals 8 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a without considering the constraints and then enforces some constraints through post- processing to ensure certain preferences are met.

[0037] CF explanations serve as a way to design clinical interventions. While designing behavior change interventions, focusing on small changes is crucial to ensure sustainability of the behavior change - a key concept from both Social Cognitive theory and CF explanations. While minimum change is necessary in behavioral intervention, prioritizing user preferences in the selection of the modifiable features is also a key attribute for successful adoption of the AI system. However, such effective, sustainable and user-focused interventions have not been studied in CF explanation research. ExAct bridges these gaps by introducing a model-agnostic explainable AI intervention system for generating personalized CF explanations for chronic disease prevention and management. Contributions made by ExAct can be summarized as follows- ^ Using the predictive model, ExAct devises a new technique to generate CF explanations by approximating the decision boundary in high-dimensional data followed by a grid search. ^ It outlines a minimum change based behavioral modification scheme that is grounded in well-known theories in neuro-psychology. ^ Another scheme is also designed which reflects user preference to keep certain features unchanged of a test point in a high-dimensional space. ExAct models user preferences as soft constraints using a preference ranking approach. The user preferences can be those of an end-user (e.g., patient) or even a clinician who provides these user preferences based on their clinical knowledge. 2 Problem statement

[0038] Let ^^ = {( ^^1, ^^1), ( ^^2, ^^2), ... , ( ^^^^, ^^^^)} be a dataset of ^^ instances that captures longitudinal health data and corresponding health outcome such as bloodglucose, occurrence of diabetes, risk of heart disease. Each instance ^^ ^^ =[ ^^1^^ , ^^2^^ , ... , ^^ ^^^^ ] includes ^^ features including actionable behavioral parameters (e.g.,diet, medication) and non-actionable parameters (e.g., age, gender). Considering ^^ possible classes for health outcome ^^, where ^^^^∈ [1, ^^], a probabilistic AI 9 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a model or classifier ^^ can be trained to map the ^^-dimensional input features to the ^^ classes: ^^ ∶ ℝ^^→ ℝ^^ (1)

[0039] As part ofthe last layer, generating a probability score for each class. Therefore, for a sample ^^ ∈ ℝ^^, the assigned class is denoted as ^^̂ = ^^ ^^ ^^ ^^ ^^ ^^ ^^(^^ , and the corresponding class ^^)score or probability for ^^̂ = ^^ is ^^^^(^^)= ^^(^^ = ^^|^^)= ^^ ^^ ^^(^^(^^)). The predicted class can be categorized as normal (e.g., normoglycemia, healthy etc.) and abnormal (e.g. hyperglycemia, hypoglycemia, sleep disorder, diabetic etc.) in the problem under study in this disclosure.

[0040] If a test sample ^^^^is predicted to indicate an abnormal health event (e.g., argmax ^^ ( ^^^^) = ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^), an important question is how to provide an intervention plan to assist the patient with making appropriate behavior changes to prevent the impending abnormal event while considering user’s preferences at the same time. The user’s preferences for behavior changes can be represented in vector ^^( ^^^^) = { ^^1, ... , ^^^^} where each ^^^^∈ {1, ... , ^^} indicates the ranking of the ^^-th feature for modification during intervention. For example, if ^^4= 1, it means that the user ranks the fourth feature as the most favored behavioral factor for modification. Therefore, one goal of the systems outlined herein is to identify an optimal counterfactual data point ^^^∗^ that translates to a modifiable behavior intervention to prevent an abnormal health outcome and that satisfies the following requirements: (i) interventional: ^^^∗^ must change the class of the initial prediction from an abnormal class to the normal class; (ii) minimal: ^^^∗^ must be minimally distant from the factual sample ^^^^; (iii) realistic: ^^^∗^ must look realistic, i.e., the features of the CFs must fall within the distribution of the dataset ^^; (iv) partial: ^^^∗^ must favor user preferences expressed in feature rank ^^. The CF generation process can be formulated as shown in (2) where the interventional, minimal, realistic, and partial requirements are formalized, respectively, in the first to the fourth terms in the minimization problem. To reiterate, user preferences can be those of an end-user (e.g., patient) or even a clinician who provides these user preferences based on their clinical knowledge. 10 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a m ^^i ^∗n [ ^^ ^^( ^^( ^^^∗^), ^^ ) + ^^( ^^^∗^ , ^^^^) + ^^( ^^^∗^ , ^^) + ^^( ^^^∗^^, ^^^^) ∙ ^^( ^^^^)](2)on model’s prediction on the CF and normal class. Optimizing for this term addresses the interventional requirement while optimizing for ^^( ^^^∗^ , ^^^^) ensures that ^^^∗^ remains in close proximity of the factual instance. Minimizing ^^( ^^^∗^ , ^^) results in keeping the feature values of ^^^∗^ within range and ensures realism. The last term in 2 encourages the optimization problem to modify features preferred by the user and therefore satisfies the partial requirement. The optimization requirements are dissected into the sub-problems outlined herein.

[0042] Problem 1 (Accessing the decision boundary): One approach to produce CFs is by accessing the decision boundary of the trained model. Samples close to the decision boundary are minimally distant from ^^^^, hold the opposite class, have feature values within range and thus satisfies most of the requirements in Equation 2. Therefore, accessing the decision boundary could be a reasonable proxy to optimizing the objective function shown in Equation 2. The classifier ^^ divides the space ℝ^^into ^^ decision regions, represented as ^^1, ^^2, ... , ^^^^. The decision boundaries are thin regions where the classifier is most uncertain about the label to be assigned to a sample. Hence, mathematically, the decision boundary between classes ^^ and ^^ can be defined as ^^^^, ^^= ^^ ∈ ℝ^^∶ ^^(^^ = ^^|^^)= ^^(^^ = ^^|^^). To realize this approach to generating CF explanations, first, the decision boundary of the classifier trained on a high-dimensional feature set must be constructed.

[0043] Problem 2 (Designing intervention): Even if the high-dimensional decision boundary of the classifier is made accessible, a problem remains in designing an intervention that ensures a “normal” health outcome while requiring minimal behavioral changes and / or prioritizing user preferences. This means that, if a test sample ^^^^= ^^^1^ , ^^^2^ , ... , ^^^^^^is predicted to be ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^, i.e. argmax ^^(^^^^)= ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^, one needs path for transitioning from the abnormal factual instance to the normal region by leveraging the decision boundary of the classifier. To this end, the intervention design algorithm involves performing a series of operations on the test 11 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a sample such that the predicted class is altered, i.e., argmax ^^ ( ^^^∗^) = ^^ ^^ ^^ ^^ ^^ ^^ and the user preference requirement is entertained. 3 Problem solution 3.1 Solution Outline and Development

[0044] FIGS.1A-1C show an overview of how the systems outlined herein search for an optimal counterfactual data point (e.g., an optimal CF or CF explanation) that correlates with a modifiable behavior intervention to prevent an abnormal health outcome. Given that a classifier defines specific regions for the classes using decision hyper-plane, accessing it is critical in producing CFs. Once access to the decision hyperplane is gained, as in FIG.1C, an effective intervention plan can be outlined for users who fall into the abnormal region (FIG.1C) for an improved health outcome.

[0045] Approximating decision boundary: Linear models are limited to linear decision boundaries and they are easily accessible. Being highly non-linear and intricate, decision boundaries of neural networks cannot be defined easily using simple equations. Instead, the decision boundaries are implicitly defined by the network’s weights and activation functions, making their representation more challenging. Therefore, like FIG.1B, one possible approach is to use adversarial borderline samples as proxies to approximate the decision boundary.

[0046] To uncover the critical borderline instances, an autoencoder-driven technique is devised. While a vanilla autoencoder emphasizes on minimizing the disparity between its input and output, its capabilities need to be augmented to generate critical adversarial samples along the decision boundary. When fed with a normal sample ^^^^, the autoencoder ^^ ^^1would reconstruct an output ^^ ^^1( ^^^^) that closely resembles the input. At the same time, the anticipation is that this reconstructed sample, despite its similarity to the normal input, will be classified as abnormal by the predictive model ^^. To achieve this delicate balance, the loss function takes on a refined form- ℒ1= min ^^^^− ^^ ^^1^^ + ^^ × ^^ ^^ ^^ ^^ ^^1^^ (3) where, ^^ ^^encoded vector for abnormal class. The hyperparameter ^^ plays a crucial role in 12 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a balancing between the reconstruction loss and the generation of adversarial examples. A similar loss function can be defined for the opposite process i.e., producing critical samples by feeding abnormal samples to another autoencoder- ℒ2= ∑ min[‖^^^^− ^^ ^^2(^^^^)‖2+ ^^ × ^^ ^^( ^^( ^^ ^^2(^^^^)), ^^ )] (4) ∀ ^^^^borderline instances, the resulting adversarial samples may still fall considerably distant from the actual decision boundary. As pictured in FIG.2 which demonstrates a bisection method outlined herein to characterize the decision boundary, the blue and yellow samples, coming off the autoencoders, hold roughly 55-45% probability. Therefore, to address this limitation, a bisection algorithm comes into play to generate even more critical instances positioned precisely on the decision boundary with a balanced prediction probability of 50-50 (teal triangles in FIG.2). The bisection method is illustrated in Algorithm 1 (note: categorical features do not enter into the bisection algorithm). Algorithm 1 Bisection method to identify the critical borderline instances Input: close-proximity output pair from autoencoders ^^^^and ^^^^, predictive classifier ^^, threshold ^^ Output: borderline instance ^^^^Initialization: ^^^^= ^^^^, ^^^^= ^^^^1: while condition do 2:^^ ^^ =12( ^^ ^^ + ^^ ^^)3: if ^^^^(^^^^)> ^^^^(^^^^)then 4: ^^^^= ^^^^5: else if ^^^^( ^^^^) > ^^^^( ^^^^) then 6: ^^^^= ^^^^7: end if 8 if | ^^^^( ^^^^) − ^^^^( ^^^^)| ≤ ^^ then 9 return ^^^^10: end if 11: end while

[0048] Developing an intervention plan: FIG.1C demonstrates the Rashomon effect associated with CF explanations i.e., there could be an infinite number of possible pathways for any abnormal sample to penetrate the decision boundary and generate a CF. However, it is important to note that not all of these are feasible or practical. For instance, expecting an elderly patient to suddenly increase their physical 13 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a activity significantly may not be realistic. As stated previously, it is desirable to accommodate user preferences or adhere to doctor’s recommendations by keeping certain aspects (e.g., protein or medication intake) unchanged. Therefore, the objective is to identify the most effective intervention plan that ensures minimal changes or emphasizes user preferences, ensuring a successful transition towards the normal region.

[0049] The systems outlined herein can accommodate features with the same rank. With little change to the grid search, the features can have the same rank in preferences. This way, features of the same rank are modified concurrently in an alternating process. Note that adding rank constraints may increase violations, depending on rank settings.

[0050] Minimal intervention: For the test sample ^^^^∈ ℝ^^that is classified as abnormal, the aim is to find the smallest adversarial perturbation ^^^^ ^^ ^^, ^^, that can be added to the original test point ^^^^, such that the perturbed point ^^^^+ ^^ remains within a specified set of constraints ^^ and the classifier decision changes to normal. Therefore, the minimal adversarial perturbation for ^^^^with respect to the ^^^^- norm can be defined mathematically- ^^^^ ^^ ^^, ^^= min^^‖^^‖^^subject to ^^^^(^^^^+ ^^)> max ^^^^(^^^^+ ^^), ^^^^+ ^^ ∈ ^^ ^^∈ℝ ^^≠ ^^,∀ ^^

[0051] Since the decision boundary is approximated using critical borderline instances, the search for minimum perturbation narrows down to a search of minimum distance between the test point and a set of confusing or critical points. Therefore, the search can be illustrated further with the “Distance to Set Lemma” that relates to the expression- ^^(^^^^, ^^)= inf{^^(^^^^, ^^)∶ ^^ ∈ ^^}(5)

[0052] Finding the minimum distance from test point ^^^^to a set ^^ requires comparing the distance between ^^^^and each point in ^^ and selecting the minimum. If the dimensionality of the space is fixed, the complexity can be considered as ^^(| ^^|), with | ^^| being the cardinality of the set. To achieve minimal intervention, an approach to address Eqn.5 involves populating the decision boundary with an abundance of 14 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a adversarial samples and finding the one closest to ^^^^by leveraging normalized nearest neighbor algorithm- | ^^|^^^^^∗^ = ^^^^^̃^− ^^^^ 2(6) where, ^^ ^^^^and ^^^^areTrajectory 2 in FIG.1C is the approximated representation of minimal intervention.

[0053] Lemma 1. For a point ^^ and a non-empty set ^^ in a metric space, the distance from ^^ to ^^, denoted as ^^( ^^, ^^), is equal to the infimum of the distances between ^^ and all points in ^^ i.e. ^^( ^^, ^^) = inf{ ^^( ^^, ^^) ∶ ^^ ∈ ^^}.

[0054] Proof. Upper Bound: First thing to show is ^^( ^^, ^^) ≤inf{ ^^( ^^, ^^) ∶ ^^ ∈ ^^}. Let ^^ > 0 be arbitrary. By the definition of infimum, there exists apoint ^^ ^^ in ^^ such that ^^( ^^, ^^ ^^) < inf{ ^^( ^^, ^^) ∶ ^^ ∈ ^^} + ^^. This implies that ^^( ^^, ^^ ^^) − ^^ <inf{ ^^( ^^, ^^) ∶ ^^ ∈ ^^}. Since ^^ ^^ ∈ ^^, it follows that inf{ ^^( ^^, ^^) ∶ ^^ ∈ ^^} ≤ ^^( ^^, ^^ ^^). Combiningthe inequalities, ^^( ^^, ^^) ≤ ^^(^^, ^^^^)< inf{^^(^^, ^^)∶ ^^ ∈ ^^}+ ^^. Since ^^ was arbitrary, it concludes that ^^(^^, ^^)≤ inf{^^(^^, ^^)∶ ^^ ∈ ^^}.

[0055] Lower Bound: Next thing to show is ^^( ^^, ^^) ≥ inf{^^(^^, ^^)∶ ^^ ∈ ^^}. Let ^^ > 0 be arbitrary. By the definition of infimum, there exists a point ^^^^in ^^ such that ^^( ^^, ^^^^) < inf{^^(^^, ^^)∶ ^^ ∈ ^^}+ ^^. Since ^^^^∈ ^^, it follows that ^^( ^^, ^^^^) ≥ inf{^^(^^, ^^)∶ ^^ ∈ ^^}. Rearranging the inequality, obtain ^^( ^^, ^^^^) − ^^ ≥ inf{ ^^( ^^, ^^) ∶ ^^ ∈ ^^}. Since ^^ was arbitrary, it follows that ^^( ^^, ^^) ≥ inf{ ^^( ^^, ^^) ∶ ^^ ∈ ^^}.Combining the upper and lower bounds ( ){( ) }, it can be concluded that ^^ ^^, ^^ =inf ^^ ^^, ^^ ∶ ^^ ∈ ^^ . ^

[0056] Constrained Intervention: To ensure user preferences or adherence to physician recommendations, an additional constraint is needed into the previous optimization framework. While meeting minimal changes to toggle the predicted class, this constraint aims to preserve specific aspects or features of the test sample whenever deemed feasible. Therefore, the minimal adversarial perturbation- ^^^^ ^^ ^^, ^^= min^^‖ ^^‖ ^^^^, 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a ^^^^^^∙ ^^^^= 0, ∀ ^^ where ^^^^= {0, 1} and ∑ ^^^^< ^^

[0057] The key by the fact thatif certain features of the test sample fall within the upper and lower bound of the decision boundary, at least one of them can be kept unchanged while changing the predicted class. For example, two out three features of the red test sample in FIGS.3A and 3B reside within the range of the blue decision boundary. A mere shift along y-axis is all it takes to change the class of the test sample, while the remaining feature values stay unaffected. Algorithm 2 executes this subset-based intervention, ensuring that changes are only made to features that are not in their desired position (note: higher indexed features are preferred to remain unchanged). Algorithm 2 Subset-based intervention Input: Test sample ^^^^= ^^^^1, ... , ^^^^^^, order of features ^^, classifier ^^, set of borderline instances ^^ Output: Intervened test sample ^^^^∗Initialization: ^^^^∗← ∅ 1:if ^^^^^^[1]> max( ^^^^[1]∶ ^^ ∈ ^^) then 2:^^^^^^[1]∗← max( ^^^^[1]∶ ^^ ∈ ^^) 3:else if ^^^^^^[1]< min( ^^^^[1]∶ ^^ ∈ ^^) then 4:^^^^^^[1]∗← min( ^^^^[1]∶ ^^ ∈ ^^) 5: end if 6:closest indent, ^^ = arg min|^^^=^|1 | ^^[ ^^]^^[1]− ^^^^^^[1]|12: end for

[0058] Because Algorithm 2 loops over all the borderline instances to obtain the closest instance, once again, the complexity is ^^(‖ ^^‖ + ‖ ^^‖) → ^^(‖ ^^‖), where ‖ ^^‖ is the number of borderline instances and ‖ ^^‖ = ^^. 3.2 System Overview and Examples

[0059] FIGS.4A-4C illustrate a system 100 that implements the concepts herein for preventing abnormal health outcomes. As shown in FIGS.4A and 4B, an 16 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a artificial intelligence (AI) model 110 implemented at a computing device 102 accesses data captured from a data source device 102. The computing device 102 can predict, by implementation of the AI model 110 and in view of the data, a modifiable behavior intervention that the user can implement to prevent an abnormal health outcome. Essentially, the user data and modifiable behavior intervention could be presented to a patient but also a clinician who acts as an intermediary between the system 100 and the patient for intervention delivery.

[0060] In particular, the AI model 110 can predict (i.e., classify) a health outcome based on the user data by implementation of a classifier 112, and can generate one or more counterfactual data points (as adversarial edge cases) to characterize a decision boundary of the classifier 112 by implementation of one or more autoencoders 114. Upon characterization of the decision boundary, the AI model 110 can apply a grid search methodology to find an optimal counterfactual data point of the one or more counterfactual data points that translates into a modifiable behavior intervention (which can be achieved using natural language processing or another method). Importantly, the grid search methodology identifies the optimal counterfactual data point having a minimal distance from the data associated with the user, that results in a normal health outcome classification as predicted by the classifier 112, and that maintains one or more features of the data associated with the user based on a ranked preference of the user. The computing device 102 can communicate the modifiable behavior intervention to the user through a display device 106 (which may be integrated with or separate from the computing device 102).

[0061] Note that the user can include a patient, and the information captured and generated by the system 100 could also be made available to a clinician who learn how they can make recommendations to the patient to improve their health and prevent adverse events. For example, the results can be presented to a doctor using a web dashboard (see examples shown in FIGS.5E and 5F). Each time the doctor sees the patient they can discuss what changes in their physical activity, diet, and medication regimen the patient can make to optimize health. Further, the ranked user preferences can include those specified by the clinician. 17 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a

[0062] In FIG.4B, the AI model 110 can include the classifier 112 that accesses user data 10 and generates a health outcome prediction 212 based on the user data 10. In examples where the system 100 is used for blood glucose management, the health outcome prediction based on the user data can indicate hyperglycemia, hypoglycemia, or normoglycemia. In examples where the system 100 is used for blood pressure monitoring, the health outcome prediction based on the user data can indicate hypertension, hypotension, or normotension.

[0063] As outlined above, characterization of the decision boundary of the classifier is necessary in order to find a modifiable behavior intervention 220 that would result in a different health outcome prediction, that has a minimal distance from the user data (i.e., a minimal behavioral change), and that maintains one or more features of the data associated with the user based on a ranked preference of the user. As such, the AI model 110 can include autoencoders 114 that generate adversarial examples 214 to characterize the decision boundary of the classifier. The adversarial examples 214 can be used to find counterfactual data points near the decision boundary, one of which can be selected as the optimal counterfactual data point 216 that can be translated into the modifiable behavior intervention 220. In particular, the adversarial examples 214 can be used to identify borderline examples shown in FIG.1C that lie along the decision boundary (i.e., using the bisection method outlined herein). The process for generating adversarial examples 214 is elaborated on herein with respect to Eqs.3 and 4, as well as Algorithm 1 and FIGS.1C, 2, and 4C.

[0064] Once the AI model 110 has generated adversarial examples 214 to characterize the decision boundary of the classifier, the AI model 110 can identify, using the decision boundary of the classifier by implementing a grid search methodology (“grid search 116”), the optimal counterfactual data point 216 having a minimal distance from the user data 10 associated with the user and that results in a normal health outcome classification as predicted by the classifier 112, and that maintains one or more features of the data associated with the user based on a set of user preferences 20 of the user. The grid search methodology can include aspects of Algorithm 2 outlined herein ("subset-based intervention”). The set of user preferences 20 can be ranked, as outlined above. The optimal counterfactual data point can be translated into the modifiable 18 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a behavior intervention 220 that, if implemented by the user, would be expected to prevent or otherwise reduce abnormal health outcomes. The modifiable behavior intervention 220 can be communicated to the user by display device 106. In some examples, the AI model 110 can implement a natural language model to generate a counterfactual statement that communicates the modifiable behavior intervention 220 in a language understood by the user.

[0065] The AI model 110 can be operable for recommending the modifiable behavior intervention 220 when user data 10 is detected by the AI model 110 that is indicative of an abnormal heath outcome, where the modifiable behavior intervention is expected to result in a normal health outcome as identifiable by the classifier 12.

[0066] In a further aspect, the AI model 110 can be operable for recommending the modifiable behavior intervention 220 when user data 10 is detected by the AI model 110 that is indicative of a normal heath outcome. For example, the AI model 110 can provide positive reinforcement though counterfactual data points (e.g., “Good thing you had a low-sugar breakfast today because had you not, you could have had a hyperglycemic event”).

[0067] FIG.4C shows generation of the adversarial examples 214 using autoencoders 114, correlating with the discussion herein regarding Eqs.3 and 4, as well as Algorithm 1 and FIGS.1C and 2. In particular, the AI model 110 can generate a first adversarial example ( ^^ ^^1( ^^^^)) by implementation of a first autoencoder 114A of the AI model 110, the first adversarial example ( ^^ ^^1(^^^^)) having an abnormal health outcome classification ( ^^( ^^ ^^1(^^^^))) and being a minimal distance from a normal data point (i.e., normal example ^^^^) having a normal health outcome classification (Eq.3). Likewise, the AI model 110 can generate a second adversarial example ( ^^ ^^2(^^^^)) by implementation of a second autoencoder 114B of the AI model 110, the second adversarial example having a normal health outcome classification ( ^^( ^^ ^^2(^^^^))) and being a minimal distance from an abnormal data point (i.e., abnormal example ^^^^) having an abnormal health outcome classification (Eq.4). Based on the first adversarial example ( ^^ ^^1( ^^^^)) and the second adversarial example ( ^^ ^^2( ^^^^)), the AI model 110 can generate one or more borderline examples (borderline instances ^^^^) that correspond to the decision 19 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a boundary using a bisection method (see Algorithm 1) that combines the first adversarial example and the second adversarial example (“close-proximity output pair from autoencoders ^^^^and ^^^^”). As outlined in Algorithm 1, the bisection method uses the classifier 112 to verify classification of the first adversarial example and the second adversarial example, and to classify the one or more borderline examples that correspond to the decision boundary (see lines 3, 5, and 8 of Algorithm 1).

[0068] The AI model 110 can iteratively repeat the process of generating the first adversarial example, the second adversarial example, and the one or more borderline examples to characterize the decision boundary. The AI model 110 can obtain a set of borderline instances ^^ which includes a plurality of borderline examples which can be considered counterfactual data points.

[0069] To find the optimal counterfactual data point, the AI model 110 can apply the grid search methodology (e.g., Algorithm 2 “subset-based intervention”). The grid search methodology identifies the optimal counterfactual data point ^^^∗^ corresponding to a borderline example of the one or more borderline examples that: a. is a minimal distance from the user data (denoted as “test user data example” ^^^^= ^^^^1, ... , ^^^^^^); b.of the user data ( ^^^^= ^^^^1, ... , ^^^^^^) based on the ranked user preferences ( ^^^^∈ {1, ... , ^^}); and c. results in a health outcome classification that is opposite from the health outcome classification associated with the user data.

[0070] FIGS.5A and 5B illustrate two example implementations of the system 100, respectively corresponding to blood glucose management (FIG.5A) and blood pressure management (FIG.5B).

[0071] As illustrated herein with respect to FIG.5A, the system 100 can be implemented for blood glucose management. In such a case, the data source device can include a wearable sensor that monitors one or more of physical activity, glucose, and insulin intake. The data source device can also include a mobile device associated with the user, and the data can be provided to the mobile device by the user to track one or more of food intake and medication intake. In such an example, the system 100 can predict a change in a blood glucose level of the user that may occur if the user 20 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a consumes the food intake and / or medication intake defined by the data. The system 100 can recommend the modifiable behavior intervention when data is detected by the AI model that is indicative of abnormal glucose levels. Further, the data source device can include a continuous glucose monitoring sensor that measures blood glucose regularly at predetermined intervals. The system 100 can estimate an amount of macronutrient consumption by the user based on the blood glucose.

[0072] FIG.5A shows a continuous glucose monitoring sensor 102A and a wearable activity sensor 102B (i.e., a smart watch or a fitness watch) which can capture user data to be communicated to the AI model. FIG.5A also shows a mobile device as computing device 104, which can also be considered a data source device if the mobile device collects user data (such as user data captured by another data source device and / or user data entered in by the user). The mobile device in FIG.5A can also act as the display device for communicating information about the modifiable behavior intervention to the user. In another aspect, the AI model may be implemented at a remote or otherwise cloud-based device acting as the computing device 104 that communicates with the mobile device and any other data source devices.

[0073] In the example of FIG.5A, the data source devices can collect user data and provide the user data to the computing device 104 which runs the AI model. FIG.5A shows an example interface 230A that communicates information to the user which can include the user data, the health outcome classification, and the modifiable behavior intervention. In the (non-limiting) example of FIG.5A, the user data can indicate a glucose level of 7.2 mmol / L (as captured by continuous glucose monitoring sensor 102A), nutritional information about a meal including total carbohydrate (CHO), total fat, and total fiber (which can be provided to the mobile device by the user), and medication information (which can be manually provided by the user or automatically provided by an insulin delivery device). Based on the user data, the AI model can predict an impending (or already occurring) hyperglycemia event using the classifier. Further, based on the user data and based on ranked user preferences (e.g., the user may prefer to change a carbohydrate amount within their food rather than take more insulin), the AI model can identify the modifiable behavior intervention that could result in maintaining normoglycemia and prevent or otherwise reduce a hyperglycemia event. 21 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a In the example, the modifiable behavior intervention displayed to the user can include a counterfactual statement along the lines of “If CHO is reduced to 21.3g, normoglycemia may be maintained without having to take more insulin”.

[0074] Referring to the example of FIG.5B, the system 100 can also be implemented for cardiovascular health management. The example shown is in the context of blood pressure management, however other indicators of cardiovascular function can also be managed using the system 100. The data source device can include a wearable sensor that monitors one or more of physical activity, blood pressure, heart rate, respiration, and blood oxygen saturation. The system 100 can recommend the modifiable behavior intervention when data is detected by the AI model that is indicative of abnormal cardiovascular function. The data source device can also include a mobile device associated with the user, and the data can be provided to the mobile device by the user to track one or more of food intake and medication intake. In such an example, the system 100 can predict a change in cardiovascular function of the user that may occur if the user consumes the food intake and / or medication intake defined by the data.

[0075] FIG.5B shows a blood pressure monitoring cuff 102C and a wearable activity sensor 102B (i.e., a smart watch or a fitness watch) which can capture user data to be communicated to the AI model. FIG.5B also shows a mobile device as computing device 104, which can also be considered a data source device if the mobile device collects user data (such as user data captured by another data source device and / or user data entered in by the user). The mobile device in FIG.5B can also act as the display device for communicating information about the modifiable behavior intervention to the user. In another aspect, the AI model may be implemented at a remote or otherwise cloud-based device acting as the computing device 104 that communicates with the mobile device and any other data source devices.

[0076] In the example of FIG.5B, the data source devices can collect user data and provide the user data to the computing device 104 which runs the AI model. FIG.5B shows an example interface 230B that communicates information to the user which can include the user data, the health outcome classification, and the modifiable behavior intervention. In the (non-limiting) example of FIG.5B, the user data can 22 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a indicate biometrics such as heart rate, heart rate variability, and blood pressure (as captured by blood pressure monitoring cuff 102C or wearable activity sensor 102B), nutritional information about a meal or over the course of a few days such as total cholesterol (TC), total sodium, and total caffeine (which can be provided to the mobile device by the user), and medication information (which can be manually provided by the user or automatically provided by an insulin delivery device). Based on the user data, the AI model can predict an impending (or already occurring) hypertension event using the classifier. Further, based on the user data and based on ranked user preferences (e.g., on workdays the user may prefer to reduce daily sodium intake rather than reduce caffeine intake), the AI model can identify the modifiable behavior intervention that could result in maintaining normotension and prevent or otherwise reduce a hypertension event. In the example, the modifiable behavior intervention displayed to the user can include a counterfactual statement along the lines of “If total sodium intake for today is reduced by 25% relative to yesterday, normotension can be maintained”.

[0077] FIGS.5C and 5D show example user interfaces that may be displayed to a patient for blood glucose management using the system 100. In FIG.5C, a user interface 230C can display, at a display device such as a mobile device, information about user data (e.g., such as a graphical representation showing blood glucose levels as well as total carbs, exercise, and bolus insulin dosage) over time that indicate dysglycemia (specifically, hyperglycemia). In FIG.5D, a user interface 230D can display, at a display device such as a mobile device, information about modifiable behavior interventions (e.g., as “counterfactual behaviors”) that could have prevented the dysglycemic episode indicated in FIG.5C. Further, the system 100 can also determine what the user data could have hypothetically looked like if the modifiable behavior intervention had been implemented, as shown in the user interface 230D of FIG.5D. In the example, the user interface 230D of FIG.5D superimposes a graphical representation showing what the user’s blood glucose levels could have been over the graphical representation from FIG.5C. Further, in the example of FIG.5D, two potential modifiable behavior interventions are suggested to the user (e.g., “you could have prevented hyperglycemia by: reducing your carb from 72g to 21g, or, waiting until your blood glucose had reached 83 mg / dL before eating”). 23 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a

[0078] FIGS.5E and 5F show example clinician interfaces that may be displayed to a clinician for blood glucose management of a patient using the system 100. FIG.5E shows an example interface 230E that correlates with the hyperglycemia example in FIGS.5C and 5D, which may be viewed a clinician (or other entity) managing the user. FIG.5F shows an alternative example interface 230F pertaining to a hypoglycemia event, including information about user data (e.g., such as a graphical representation showing blood glucose levels as well as total carbs, exercise, bolus insulin amount, and bolus insulin timing) that indicate dysglycemia (specifically, hypoglycemia). In the example of FIG.5F, two potential modifiable behavior interventions are suggested (e.g., “the user could have prevented hypoglycemia by: taking 22.5 units of insulin (rather than 5.0 units) with the meal; or increasing carbs from 5g to 30g”).

[0079] It should be understood that other implementations of the system 100 are contemplated for other needs of a user such as, but not limited to: neurological function, other types of cardiovascular function, digestive function, weight loss or gain, immune system function, and chronic disease management. 4 Experimental Setup

[0080] Baselines: Consistent with prior research, experiments are based on tabular datasets with binary target variables. ExAct is compared against four state- of-the-art CF explanation methods:

[0081] DiCE generates a set of CFs by optimizing for proximity, diversity and sparsity.

[0082] Optbinning creates CFs by optimizing a set of binning rules to modify the input features with an aim to find the shortest path to a desired outcome.

[0083] CEML calculates gradients of the output with respect to the inputs and iteratively finds the smallest possible changes to the important features to alter the model’s predictions.

[0084] NICE generates CFs by searching for nearby instances in the data manifold that reflects the desired outcome.

[0085] Like ExAct, all the baselines are post-hoc methods and require a trained predictive model to proceed. For each dataset, a fair comparison is ensured by 24 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a employing either the model from ExAct or a model with comparable performance. All train / test splits are done randomly.

[0086] Datasets ExAct has been tested on four real-world binary classification datasets for chronic disease prevention and management: ^ Modified Heart Disease has 918 instances. Four categorical and five continuous features are used to predict whether an individual will have a heart disease ( ^^ = 1) or not ( ^^ = 0) and make interventions based on five features. ^ PimaDM has one categorical and seven continuous attributes from 768 subjects. The goal is to predict if a subject would have diabetes ( ^^ = 1) or not(^^ = 0) and make interventions based on four attributes to prevent a positivecase. ^ Nutrition Absorption (NA) dataset includes 668 hours’ worth of continuous glucose monitor (CGM) recordings resulting from 167 meals consumed by five diabetes patients. Given a meal, the task is to predict whether a patient would be hyperglycemic ( ^^ = 1) or remain normoglycemic ( ^^ = 0) and make suggestions on a subset of seven continuous features to prevent a hyperglycemic outcome. ^ The OhioT1DM has eight-week long clinical data including 1600 hours of CGM signals from 12 T1 diabetes patients. The task includes predicting post- prandial hyperglycemia ( ^^ = 1) or normo-glycemia ( ^^ = 0) and identifying interventions using a subset of seven continuous features to avoid hyperglycemia.

[0087] To keep the entire process free of bias, the data was split at random for training and testing. The bisection approach keeps the critical samples within the data manifold. The validation results (Plausibility, Table 11) show that not many CFs are outside of the data distribution.

[0088] Evaluation Metrics: Evaluating the explanations of XAI has been a two-decade long struggle. Therefore, the CF explanations are evaluated based on five common metrics found in the literature-

[0089] Validity evaluates whether or not the produced CFs really belong to the desired class. High validity indicates the technique’s effectiveness in creating 25 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a valid CF examples. A simulation-aided method (see Section 8) is designed to estimate the validity of the CFs.

[0090] Proximity is determined by calculating the ^^2norm distance between ^^^^and ^^^∗^ , and then dividing it by the cardinality of features. Proximity helps to ensure minimal changes are made to the factual sample by preserving as much as possible and not over-correcting (e.g., if the classifier predicts a hyperglycemia event, avoid suggesting changes that would result in hypoglycemia). Minimal changes are also more likely to be implemented by the user to successfully avert abnormal health events.

[0091] Sparsity quantifies the feature changes (via the ^^0norm) between ^^^^and ^^^∗^ . This comes from the notion of sparse explanations, where fewer feature modifications in CF explanations enhance user interpretability. Lower sparsity is preferred for better user understanding.

[0092] Violations estimates the extent to which user preferences (e.g. age, gender, insulin etc.) are breached. A good CF technique will have fewer violations per generated CF and promote fairness.

[0093] Plausibility measures what fraction of the generated CFs fall within the original data manifold. A higher plausibility ensures that the suggested modifications are not difficult-to-impossible to achieve and follow the data distribution. 4.1 Resource Specifications

[0094] All experiments are done with an AMD Ryzen 72700X 8-core CPU of 3.7 GHz speed, an NVIDIA GeForce GTX 1660 Ti GPU and 16 gigabyte RAM. 4.2 Dataset Descriptions 4.2.1 Heart Disease

[0095] The dataset contains patient characteristics and test results to predict the presence or absence of heart disease. The attributes used in training include Age, Sex, Chest pain type, Resting BP, Cholesterol, Fasting blood sugar, Resting electrocardiographic results, Maximum heart rate, ST depression induced by exercise. The explanations are based on changing Resting BP, Cholesterol, Fasting blood sugar, Maximum heart rate and ST depression. 26 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a 4.2.2 PimaDM

[0096] The PimaDM dataset is a widely used benchmark dataset for predicting diabetes based on patient characteristics. It includes medical records of 768 Pima Indian women aged 21 and above, living in Phoenix, Arizona. The prediction model is trained using all eight features (number of pregnancies, glucose level, blood pressure, skin thickness, insulin, BMI, diabetes pedigree function and age) while four features (glucose level, blood pressure, insulin and BMI) could be changed in the modifiable behavior intervention and other features are preferred to be kept unchanged. The goal is to predict whether a subject will have diabetes or not given the features. There are 268 positive cases and 500 negative cases. The positive cases were carefully up-sampled at random in the training data for balance. 4.2.3 Nutrition Absorption Dataset

[0097] The Nutrition Absorption dataset includes CGM recordings from 5 participants (4 male, 1 female, Age: 51.6 ± 16.1 y). All individuals were diabetic patients and given a total of 167 meals under fasting condition. The dataset includes meal macronutrient (carbohydrates, fat, and fiber) amounts, time elapsed since the last insulin dose (DFB), pre-meal blood glucose levels (SBGL), and CGM data spanning four hours post-meal. Since this dataset is small, it was supplemented with synthetic data made with conditional autoregressive model. 4.2.4 OhioT1DM

[0098] The OhioT1DM is an eight-week long clinical study of 12 deidentified T1 diabetes patients. Participants used insulin pumps and CGM sensors. Their physiological data (acceleration, skin response etc.) was recorded on wristbands while their self-reported CHO intake, work and exercise intensities were recorded on smartphones. Only seven subjects have been included in analysis to ensure coherence in input data.

[0099] The input to the prediction model is Carbohydrate intake, total basal intake, bolus intake, time since last bolus, total exercise (intensity × duration), total work (intensity × duration) and pre-meal blood glucose level from the past three-hour. The task is to predict post-prandial hyperglycemia for a two-hour long window. Each post- 27 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a prandial glycemic response (PPGR) was categorized into hyperglycemia (max(PPGR) ≥ 181 mmol / L) or normoglycemia (max(PPGR) < 181 mmol / L) as target classes. 4.3 Model Specifications

[0100] Model hyperparameters are tuned on a trial-and-error basis. All results are generated with the best set of hyper-parameters identified. 4.3.1 Heart Disease 4.3.1.1 Classifier

[0101] The fully-connected binary classifier is described in Table 1- Table 1: Classifier Specifications for Heart Disease data Layer Description Input Layer Dense, 16 neurons, ELU activation, ^^2regularizer (factor: 0.04), HeNormal initializer, Batch normalization, Dropout rate: 0.2 Hidden Layer 1 Dense, 8 neurons, ELU activation, ^^2regularizer (factor: 0.04), HeNormal initializer, Batch normalization, Dropout rate: 0.2 Output Layer Dense, 2 neurons, Sigmoid activation Optimizer Adam, learning rate: 0.001 Dataset Split 70% training set, 30% test set Training 100 epochs, batch size: 16 4.3.1.2 Autoencoders

[0102] Table 2 describes the identical autoencoders used for critical sample generation. Table 2: Autoencoder Specifications for Heart Disease dataset Layer Description Encoder Layer 1 Dense, 16 neurons, ReLU activation Layer 2 Dense, 8 neurons, ReLU activation Code Code Layer Dense, 8 neurons, ReLU activation Decoder Decoding Layer 1 Dense, 16 neurons, ReLU activation Output (Gender) Dense, 2 neurons, Softmax activation 28 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a Output (CPT) Dense, 4 neurons, Softmax activation Output (FBGL) Dense, 2 neurons, Softmax activation Output (RestECG) Dense, 2 neurons, Softmax activation Output (Continuous) Dense, 5 neurons, ReLU activation Concatenate Combine all output branches Optimizer Adam, learning rate: 0.001 Loss Function Custom loss where a = 80 Training 120 epochs, batch size: 16 4.3.2 PimaDM 4.3.2.1 Classifier

[0103] The fully-connected binary classifier is described in Table 3. Table 3: Classifier Specifications for Heart Disease data Layer Description Input Layer Dense, 16 neurons, ELU activation, ^^2regularizer (factor: 0.04), HeNormal initializer, Batch normalization, Dropout rate: 0.2 Hidden Layer 1 Dense, 8 neurons, ELU activation, ^^2regularizer (factor: 0.04), HeNormal initializer, Batch normalization, Dropout rate: 0.2 Output Layer Dense, 2 neurons, Sigmoid activation Optimizer Adam, learning rate: 0.001 Dataset Split 70% training set, 30% test set Training 100 epochs, batch size: 16 4.3.2.2 Autoencoders

[0104] Specifications of the two identical autoencoders are given in Table 4. Table 4: Autoencoder Specifications for PimaDM Layer Description Encoder Layer 1 Dense, 64 neurons, ReLU activation Dropout 1 Rate: 0.1 Layer 2 Dense, 32 neurons, ReLU activation Dropout 2 Rate: 0.1 Code 29 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a Code Layer Dense, 16 neurons, ReLU activation Decoder Layer 1 Dense, 32 neurons, ReLU activation Dropout 3 Rate: 0.1 Layer 2 Dense, 64 neurons, ReLU activation Dropout 4 Rate: 0.1 Output Layer Dense, ^^1. ^^ℎ ^^ ^^ ^^[1] neurons, ReLU activation Optimizer Adam, learning rate: 0.001 Loss Function Custom loss where a = 20 Training 50 epochs, batch size: 16 4.3.3 Nutrition Absorption Data 4.3.3.1 Classifier

[0105] The fully-connected binary classifier is described in Table 5- Table 5: Classifier Specifications for Nutrition Absorption Parameter Description Model Architecture Fully-connected network (two layers) Neurons per Layer 32 Activation Function LeakyReLU Regularization ^^2regularizer with factor 0.04 Dropout Rate 0.5 Optimizer SGD, learning rate: 1 ^^ − 4, Weight Decay:1^^ − 5Dataset Split 80% training set, 20% test set Synthetic Samples Approximately 400 used for model training 4.3.3.2 Autoencoders

[0106] Two identical fully-connected autoencoders have been fed with hyperglycemic and normoglycemic instances respectively to create critical samples. For any hyperglycemic sample, the nearest normo-glycemic from the data is set as the label. This process is reversed for normoglycemic samples. More details are given in Table 6- Table 6: Autoencoder Specifications for Nutrition Absorption Parameter Description Data Input Hyperglycemic and normoglycemic instances 30 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a Code Layer Neurons 8 Encoder / Decoder 2 layers with 16 neurons each Activation Function LeakyReLU Regularization ^^2regularizer with factor 0.02 Dropout Rate 0.5 Optimizer Adam Learning Rate 1 ^^ − 3 Weight Decay 1 ^^ − 5 ^ value a = 4 in Equation 3 for evenly distributed samples, prioritizing cross-entropy loss Alpha Adjustment Lower ^^ values prioritize reconstruction loss, concentrating points around a single feature space point 4.3.4 OhioT1DM 4.3.4.1 Classifier

[0107] The binary classifier for OhioT1DM is described in Table 7. Table 7: Classifier Specifications for OhioT1DM Parameter Description Model Architecture Fully-connected network (four layers) Neurons per Layer 256, 128, 64, and 32 neurons, respectively Activation Function tanh Regularization ^^2regularizer with factor 0.01 Dropout Rate 0.4 Optimizer Adam Learning Rate 1 ^^ − 4 Weight Decay 1 ^^ − 5 4.3.4.2 Autoencoders

[0108] The identical autoencoders for the OhioT1DM is described in Table 8. Table 8: Autoencoder Specifications for OhioT1DM Parameter Description Layers Two fully connected layers for encoder and decoder Neurons per Layer Encoder / Decoder: 150, 64 neurons Code Layer 32 neurons, ReLU activation Activation Function tanh for encoder and decoder 31 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a Regularization ^^2regularizer with factor 0.02 Dropout Rate 0.1 Optimizer Adam Learning Rate 1 ^^ − 3 Weight Decay 1 ^^ − 5 ^valuea = 3 in Equation 3 for diversified samples 4.4 Diversity

[0109] ExAct shows better average diversity for the continuous features compared to NICE and Optbinning in the Heart Disease dataset, and only NICE in the PimaDM dataset. FIGS.8A and 8B show the corresponding average diversities in radar plots. 4.5 Evaluation Metrics 4.5.1 Validity

[0110] Since the counterfactual explanations are samples themselves, they are fed into a model (external simulator) to verify whether they indeed belong to the desired class. Based on the simulation results, validity represents the fraction of counterfactuals that successfully flip to the desired class. |( ∗^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ =# ^^ ^^ ^^) ≠ ^^( ^^ ^^)|^^ 4.5.2 Proximity

[0111] Proximity between the counterfactual and the factual sample is calculated from the ^^2normalized distance of the continuous features and the hamming distance of the categorical features: 2 2 (7)respectively, with features denoted by superscript ^^ for continuous and ^^ for categorical features. 32 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a 4.5.3 Sparsity

[0112] Sparsity is defined as the average number of feature changes per counterfactual example. ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ =∑ ^^ ∗^^∗^^∈ ^^ ^^ ∑ ^^=1 ^^( ^^ ^^^^ ≠ ^^ ^^^^ )^^4.5.4 Violations

[0113] Violations metric is a measure of the average number of feature changes per counterfactual example that were preferred to remain unchanged. ^^mod^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ =∑ ^^∗^^∈ ^^ ^^ ∑ ^^=1 ^^( ^^∗ ^^^^ ≠ ^^ ^^^^ )^^ 4.5.5 Plausibility

[0114] Plausibility captures the fraction of explanations that satisfy certain rules set by the data. In this evaluation method, it is defined as the fraction of counterfactuals that fall within the feature ranges derived from the data- ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ =∑ ^^^∗^∈ ^^ ^^ ^^(dist( ^^∗^^) ⊆ dist( ^^))‖ ^^ ^^‖ where, dist( ^^^∗^)of feature values in the counterfactual instance ^^^∗^ , dist( ^^) represents the distribution of feature values in the training data and‖^^ ^^‖is the total number of counterfactual instances. 4.5.6 Feature diversity

[0115] Average feature diversity has been calculated using the followingformula-Average diversity for feature ^^∑ ^^ ∑ ^^ | ^^^^^^ − ^^^^^^|^^ ^^ 4.6 Simulator Specifications

[0116] The external simulators for Nutrition Absorption data are subject specific autoregressive models with 4-hour long prediction horizon while the ones for OhioT1DM are subject specific stacked CNN-LSTM regression models that forecast next 3-hour blood glucose levels given meal, insulin, pre-meal blood glucose level, exercise and work information of past hour. The subject specific simulators for 33 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a OhioT1DM have MAEs ranging from 9.9 mg / dL to 18.8 mg / dL. FIGS.9A and 9B show simulated outcomes of two different cases.

[0117] The simulators for the Heart Disease and PimaDM datasets are XGBoost and LGBM models, with accuracies of 85.65% and 82.78%, respectively. The simulator specifications are given in Table 9 and 10. Note that the external simulators are different models in terms of architecture. Even, the simulators are subject specific regression models for Nutrition Absorption and OhioT1DM. They forecast blood glucose levels given the counterfactuals. For Heart Disease and PimaDM, the simulators are subject agnostic models yet with different architectures. Table 9: Specification of the Simulator for Heart Disease dataset Parameter Value architecture XGBoostTable 10: Specification of the Simulator for PimaDM Parameter Value hit t LGBM d l34 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a 5 Results

[0118] Classifier Performance: The classifiers trained on the Heart Disease, PimaDM, Nutrition Absorption and OhioT1DM dataset have 81.52%, 80.86%, 82.4% and 81% prediction accuracy, respectively. Using accuracy metric is logical since the datasets are either originally class-balanced or have been balanced by upsampling.

[0119] Autoencoder Performance: The effectiveness of ExAct is highly reliant on generating a sufficient number of borderline instances along the decision hyperplane. Higher density of the critical samples on the decision hyperplane is crucial to quality CFs. To achieve a high density of critical samples, the NA dataset has been augmented with 1000 synthetic samples, which are later fed into the autoencoders. This approach allows for a detailed characterization of the decision boundary, resulting in granularity in critical samples and thus, meaningful CFs. FIGS.6A-6C show the critical instances along different axes as generated by the autoencoders.

[0120] Evaluating the Explanations: The summary in Table 11 outlines the quality of CFs generated by different methods. ExAct achieves an average validity that surpasses DiCE and CEML by 11% and exceeds Optbinning and NICE by 15%. Note that, no technique gets a perfect score as the CFs are evaluated by external simulators and not by the corresponding classifiers. The CFs produced by ExAct are at least 6.6% closer to the test samples than those from other techniques on three (Heart Disease, PimaDM and OhioT1DM) out of four datasets.

[0121] ExAct leads the list in preserving user preferences with the least number of feature violations per explanation. It achieves perfect violation scores for two datasets and incurs a few violations in the other two. With 1.68 feature changes per CF explanation on average, ExAct is only behind DiCE in terms of sparsity and leads the other three methods in most datasets.

[0122] ExAct falls behind NICE on two datasets (Nutrition Absorption and OhioT1DM) in generating plausible explanations. However, NICE’s ability to maintain 100% plausibility stems from the fact that it sources CF examples directly from the dataset without generating any new samples. Based on the two intervention plans, a pair of explanations are listed in Table 12. FIG.7 shows proximity-invalidity trade-off for all methods. Deep learning models are slightly inaccurate on the training data to avoid 35 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a overfitting. This way, some of the normoglycemic training instances end up on the hyperglycemic side of the classifier. NICE identifies the nearest training sample that has the desired class and returns it as the counterfactual. So, for a factual sample, when the nearest normoglycemic instance is searched from the training data, the nearest normoglycemic sample found could be one from the hyperglycemic side of the classifier which incurs small proximity compared to that of ExAct which searches adversarial normoglycemic samples lying close to the decision boundary. NICE achieves 100% Cover because the suggestions drawn by NICE are from the training set and they are always within the distribution of the training set.

[0123] Referring to FIG.10, as the classifier is prevented from overfitting, NICE achieves better normalized distance. NICE identifies normoglycemic samples lying on the hyperglycemic side of the classifier for test samples (a) and (b), however this is not the case for test sample (c). Table 11: Evaluating the CFs: ExAct outperforms others in validity, proximity, violations and achieves comparable results in sparsity and plausibility. Method Heart Disease PimaDM val. prox. spar. viol. plau. val. prox. spar. viol. plau. .

[0014] mtatons: One mtaton s t at x ct, e ot er approac es, may incur high computational overhead in a multi-class setting. Table 12: Examples of minimal and constrained interventions made for glucose control. Nutrition Absorption dataset Pre-meal context Intervention at36 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a minutes before lunch. He is predicted to and wait until blood glucose drops to experience postprandial hyperglycemia. 6 mmol / L to stay normoglycemic.

[0125] In this disclosure, the systems outlined herein (referred to as “ExAct”) are outlined as a technique for generating counterfactual explanations to enhance model interpretability and ensure trust and fairness in AI. Unlike many prior works, ExAct promises to reflect user preferences in the explanations by keeping certain features unchanged. Being model-agnostic, ExAct approximates the decision boundary of the classifier using critical adversarial instances and conducts a sophisticated grid search to ensure user preferences are preserved. Analysis conducted on four datasets demonstrates that ExAct outperforms other methods in terms of validity, proximity, and violation metrics, while also exhibiting competitive performance in terms of sparsity and plausibility. In summary, the approaches outlined herein represent a significant milestone in the field of generative counterfactual explanations.

[0126] Time complexity and scaling of the grid search: The grid search algorithm has three key components within it: i. Finding the min and max values of the first feature in the order of features ^^ from the critical samples ^^, which contributes ^^(‖^^‖) to the complexity. ii. Finding the closest index ^^ requires iterating over all elements in ^^ to compute the absolute differences and find the minimum. This step also contributes ^^(‖ ^^‖) to the complexity. iii. The for loop iterates over each element in ^^, which has a cardinality of ‖ ^^‖. Inside the loop, the operations are constant time, so the loop contributes ^^(‖ ^^‖) to the complexity. Hence, the time complexity of the algorithm is ^^(‖^^‖+‖^^‖) or ^^(‖^^‖), where‖^^‖is the size of the set of borderline instances,‖^^‖is the number of features and‖^^‖>>‖^^‖. In practice, the grid search mostly converged in fraction of a second. With an increased feature number, the grid search might take a bit longer but the complexity will remain ^^(| ^^|) as | ^^| >> 37 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a | ^^|. The impact of the number of features on the runtime is likely to be minimal compared to the size of the set of borderline instances.

[0127] Decision boundary approximation pipeline scaling: The decision boundary approximation approach can be time consuming as it requires training two autoencoders followed by the bisection method. If number of features increases, the autoencoders will take more time to train as well as the bisection method to converge. However, the runtime can be improved by modifying the condition to converge i.e., bisection will run for a maximum of 20 iterations for each pair etc. The NA dataset is small and was supplemented using synthetic data. Thus, the classification accuracy improved from 76% to 82.4% and granularity was observed in the approximated decision boundary when fed the autoencoders.

[0128] The utility of CFs in clinical interventions is well-studied. The role of diet and medication in preventing hyperglycemia is well known. However, optimal change in these features for successful intervention is poorly understood. ExAct fills this gap by providing feedback on what changes are needed to prevent dysglycemia. Although real-time usage of CFs are highlighted following the outcome of the prediction model, it is important to note that the approaches outlined herein to generate CFs are independent of the prediction outcome. CFs can serve as educational interventions to the users through retrospective recommendations. The Functional Theory of Counterfactual Thinking emphasizes the importance of thoughts about alternatives to past events and their role in behavior regulation and enhancing performance. ExAct can be used to improve glucose control by providing feedback on modifying past behaviors that could prevent hyperglycemia. Referring to FIG.11, the approaches outlined herein provide users with upward CFs (abnormality already took place, tell them how they could have prevented it). Similarly, ExAct can be used to provide downward CFs (normality took place, yet, tell them how it could have been abnormal).

[0129] Note that multiple CFs may be considered optimal. For the purposes of the present disclosure, and for evaluation of the systems outlined herein, an “optimal” CF can be considered as the CF that minimally flips the class and is minimally distant from the test sample while preserving the preferences. Each point on the plot (see FIG.12) corresponds to a CF while all the CFs are generated for a single 38 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a test (factual) sample. “ ^” in FIG.12 indicates the instance that gets suggested to the user, i.e., suggesting the one minimally distant from the factual sample.

[0130] Past studies also preserved user preferences within the generated counterfactuals (CFs); however, they treat user preferences as hard constraints meaning that each input must be either included in or excluded from CFs. This can result in unnecessarily modifying certain inputs and creating interventions that although prevent an abnormal outcome, lead to another abnormal outcome due to drastic changes in input features. For example, when using DICE, it was observed that the generated CFs suggest lowering pre-meal blood sugar level below 3 mmol / L resulting in dangerous hypoglycemic events. In contrast, the present system models user preferences as soft constraints using a preference ranking approach. This rank-based accommodation of user preferences has not been explored in the past. This way, the system avoids making drastic changes because it first approximates decision boundary carefully using autoencoders and bisection method, ensuring that all CFs lie close to the critical region, then uses preference ranks to ensure minimal change from the user’s current behavior and avoiding potential risk. ExAct allows users to prioritize behavioral factors to remain unchanged by ranking them, offering more options and flexibility. 7 COMPUTER IMPLEMENTED SYSTEM

[0131] FIG.13 is a schematic block diagram of an example device 300 that may be used with one or more embodiments described herein, e.g., as a component of system 100 such as computing device 104 implementing aspects of the AI model 110 outlined herein with respect to FIGS.1A-5B and Section 3 of the present disclosure, including Algorithms 1 and 2 and supporting functionalities.

[0132] Device 300 comprises one or more network interfaces 310 (e.g., wired, wireless, PLC, etc.), at least one processor 320, and a memory 340 interconnected by a system bus 350, as well as a power supply 360 (e.g., battery, plug- in, etc.). Device 300 can also include a display device 330 that displays information to a user.

[0133] Network interface(s) 310 include the mechanical, electrical, and signaling circuitry for communicating data over the communication links coupled to a 39 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a communication network. Network interfaces 310 are configured to transmit and / or receive data using a variety of different communication protocols. As illustrated, the box representing network interfaces 310 is shown for simplicity, and it is appreciated that such interfaces may represent different types of network connections such as wireless and wired (physical) connections. Network interfaces 310 are shown separately from power supply 360, however it is appreciated that the interfaces that support PLC protocols may communicate through power supply 360 and / or may be an integral component coupled to power supply 360.

[0134] Memory 340 includes a plurality of storage locations that are addressable by processor 320 and network interfaces 310 for storing software programs and data structures associated with the embodiments described herein. In some embodiments, device 300 may have limited memory or no memory (e.g., no memory for storage other than for programs / processes operating on the device and associated caches). Memory 340 can include instructions executable by the processor 320 that, when executed by the processor 320, cause the processor 320 to implement aspects of the systems and the methods outlined herein.

[0135] Processor 320 comprises hardware elements or logic adapted to execute the software programs (e.g., instructions) and manipulate data structures 345. An operating system 342, portions of which are typically resident in memory 340 and executed by the processor, functionally organizes device 300 by, inter alia, invoking operations in support of software processes and / or services executing on the device. These software processes and / or services may include ExAct processes / services 390, which can include aspects of the methods and / or implementations of various modules described herein. Note that while ExAct processes / services 390 is illustrated in centralized memory 340, alternative embodiments provide for the process to be operated within the network interfaces 310, such as a component of a MAC layer, and / or as part of a distributed computing network environment. The memory 340 can be a non-transitory, computer-readable medium storing instructions encoded thereon, the instructions, when executed by one or more processors, cause the one or more processors to perform operations corresponding to ExAct processes / services 390. 40 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a

[0136] It will be apparent to those skilled in the art that other processor and memory types, including various computer-readable media, may be used to store and execute program instructions pertaining to the techniques described herein. Also, while the description illustrates various processes, it is expressly contemplated that various processes may be embodied as modules or engines configured to operate in accordance with the techniques herein (e.g., according to the functionality of a similar process). In this context, the term module and engine may be interchangeable. In general, the term module or engine refers to model or an organization of interrelated software components / functions. Further, while the ExAct processes / services 390 is shown as a standalone process, those skilled in the art will appreciate that this process may be executed as a routine or module within other processes.

[0137] The ExAct processes / services can include aspects of method 400 shown in FIGS.14A and 14B, which can implement the processes outlined in section 3 herein.

[0138] Referring to FIG.14A, step 402 of method 400 includes accessing data associated with a user (i.e., a patient). Step 404 of method 400 includes predicting, by implementation of an artificial intelligence (AI) model and in view of the data, a modifiable behavior intervention to prevent an abnormal health outcome. In particular, the AI model is trained to generate one or more counterfactual data points to characterize a decision boundary of the AI model and apply a grid search methodology to find an optimal counterfactual data point of the one or more counterfactual data points that translates into the modifiable behavior intervention to prevent abnormal health outcomes. Step 404 can include various sub-steps including steps 406-414 where steps 408-412 can be nested within step 406.

[0139] Step 406 includes generating, by implementation of an autoencoder of the AI model, adversarial examples that characterize the decision boundary of the classifier. Referring to FIG.14B which expands upon step 406 to include steps 408-412, step 408 includes generating a first adversarial example by implementation of a first autoencoder of the AI model, the first adversarial example having an abnormal health outcome classification and being a minimal distance from a normal data point having a normal health outcome classification. Step 410 includes generating a second 41 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a adversarial example by implementation of a second autoencoder of the AI model, the second adversarial example having a normal health outcome classification and being a minimal distance from an abnormal data point having an abnormal health outcome classification. Step 412 includes generating one or more borderline examples that correspond to the decision boundary using a bisection method that combines the first adversarial example and the second adversarial example.

[0140] Referring back to FIG.14B, step 414 includes identifying, based on the decision boundary of the AI model and by implementing the grid search methodology, the optimal counterfactual data point having a minimal distance from the data associated with the user and that results in a normal health outcome classification. Importantly, the optimal counterfactual data point corresponds to a borderline example of the one or more borderline examples that maintains one or more features of the data associated with the user and results in a normal health outcome classification. The user preferences used to identify which features to be maintained can be those of an end- user (e.g., patient) or even a clinician who provides these user preferences based on their clinical knowledge.

[0141] Step 416 includes translating the optimal counterfactual data point into the modifiable behavior intervention for communication to the user by a display device in communication with the processor. Step 418 includes recommending the modifiable behavior intervention when data is detected by the AI model that is indicative of an abnormal heath outcome. Note that the information and resultant modifiable behavior intervention can be displayed to a patient, as well as a clinician who learn how they can make recommendations to the patient to improve their health and prevent adverse events. For example, the results can be presented to a patient or a doctor using a web dashboard. 42 98444700.1

Claims

Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a CLAIMS What is claimed is:

1. A system for preventing abnormal health outcomes, comprising: a processor having access to instructions stored in a memory that configure the processor to: access data associated with a user; and predict, by implementation of an artificial intelligence (AI) model and in view of the data, a modifiable behavior intervention to prevent an abnormal health outcome, the AI model being trained to generate one or more counterfactual data points to characterize a decision boundary of the AI model and apply a grid search methodology to find an optimal counterfactual data point of the one or more counterfactual data points that translates into the modifiable behavior intervention to prevent abnormal health outcomes.

2. The system of claim 1, the processor further having access to instructions stored in the memory that configure the processor to: predict, by implementation of a classifier of the AI model, the abnormal health outcome based on the data associated with the user, the decision boundary of the AI model corresponding to the classifier; and generate, by implementation of an autoencoder of the AI model, adversarial examples that characterize the decision boundary of the classifier.

3. The system of claim 1, the optimal counterfactual data point maintaining one or more features of the data associated with the user based on a ranked preference of the user.

4. The system of claim 1, the processor further having access to instructions stored in the memory that configure the processor to: 43 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a identify, based on the decision boundary of the AI model and by implementing the grid search methodology, the optimal counterfactual data point having a minimal distance from the data associated with the user and that results in a normal health outcome classification.

5. The system of claim 1, the processor further having access to instructions stored in the memory that configure the processor to: generate a first adversarial example by implementation of a first autoencoder of the AI model, the first adversarial example having an abnormal health outcome classification and being a minimal distance from a normal data point having a normal health outcome classification; generate a second adversarial example by implementation of a second autoencoder of the AI model, the second adversarial example having a normal health outcome classification and being a minimal distance from an abnormal data point having an abnormal health outcome classification; and generate one or more borderline examples that correspond to the decision boundary using a bisection method that combines the first adversarial example and the second adversarial example.

6. The system of claim 5, the optimal counterfactual data point corresponding to a borderline example of the one or more borderline examples that maintains one or more features of the data associated with the user and results in a normal health outcome classification.

7. The system of claim 1, the processor further having access to instructions stored in the memory that configure the processor to: translate the optimal counterfactual data point into the modifiable behavior intervention for communication to the user by a display device in communication with the processor. 44 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a 8. The system of claim 1, the processor further having access to instructions stored in the memory that configure the processor to: recommend the modifiable behavior intervention when data is detected by the AI model that is indicative of an abnormal heath outcome.

9. The system of claim 1, the data being accessed from at least one data source device including a wearable sensor that monitors one or more of physical activity, glucose, and insulin intake.

10. The system of claim 9, the processor further having access to instructions stored in the memory that configure the processor to: recommend the modifiable behavior intervention when data is detected by the AI model that is indicative of abnormal glucose levels.

11. The system of claim 1, the data being accessed from a data source device including a wearable sensor that monitors one or more of physical activity, blood pressure, heart rate, respiration, and blood oxygen saturation.

12. The system of claim 11, the processor further having access to instructions stored in the memory that configure the processor to: recommend the modifiable behavior intervention when data is detected by the AI model that is indicative of abnormal cardiovascular function.

13. The system of claim 1, the data being accessed from a data source device including a mobile device associated with the user, the data having been provided to the mobile device by the user to track one or more of food intake and medication intake.

14. The system of claim 13, the processor further having access to instructions stored in the memory that configure the processor to: 45 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a predict a change in a blood glucose level of the user that may occur if the user consumes the food intake and / or medication intake defined by the data.

15. The system of claim 13, the processor further having access to instructions stored in the memory that configure the processor to: predict a change in cardiovascular function of the user that may occur if the user consumes the food intake and / or medication intake defined by the data.

16. The system of claim 1, the data being accessed from a data source device including a continuous glucose monitoring sensor that measures blood glucose regularly at predetermined intervals.

17. The system of claim 16, the processor further having access to instructions stored in the memory that configure the processor to: estimate an amount of macronutrient consumption by the user based on the blood glucose.

18. A method, comprising: accessing data associated with a user; and predicting, by implementation of an artificial intelligence (AI) model and in view of the data, a modifiable behavior intervention to prevent an abnormal health outcome, the AI model being trained to generate one or more counterfactual data points to characterize a decision boundary of the AI model and apply a grid search methodology to find an optimal counterfactual data point of the one or more counterfactual data points that translates into the modifiable behavior intervention to prevent abnormal health outcomes. 46 98444700.1Atty: Docket No.055743-819649 Client’s Ref.: M24-052L^-WO1-a 19. The method of claim 18, further comprising: identifying, based on the decision boundary of the AI model and by implementing the grid search methodology, the optimal counterfactual data point having a minimal distance from the data associated with the user and that results in a normal health outcome classification, the optimal counterfactual data point maintaining one or more features of the data associated with the user based on a ranked preference of the user.

20. A non-transitory, computer-readable medium storing instructions encoded thereon, the instructions, when executed by one or more processors, cause the one or more processors to perform operations to: access data associated with a user; and predict, by implementation of an artificial intelligence (AI) model and in view of the data, a modifiable behavior intervention to prevent an abnormal health outcome, the AI model being trained to generate one or more counterfactual data points to characterize a decision boundary of the AI model and apply a grid search methodology to find an optimal counterfactual data point that translates into the modifiable behavior intervention to prevent abnormal health outcomes, the optimal counterfactual data point of the one or more counterfactual data points having a minimal distance from the data associated with the user and that results in a normal health outcome classification, and the optimal counterfactual data point maintaining one or more features of the data associated with the user based on a ranked preference of the user. 47 98444700.1

Citation Information

Patent Citations

  • Wearable physiological monitoring and notification system based on real-time heart rate variability analysis

    US20180296105A1

  • Multi-stage personalized longevity therapeutics

    US20220152116A1