Planned maintenance
A system upgrade is planned for 10/12-2024, at 12:00-13:00. During this time DiVA will be unavailable.
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Constrained Counterfactual Explanations for Temporal Data
Stockholm University, Faculty of Social Sciences, Department of Computer and Systems Sciences.ORCID iD: 0000-0002-8575-421x
2024 (English)Doctoral thesis, comprehensive summary (Other academic)
Abstract [en]

Recent advancements in machine learning models for temporal data have demonstrated high performance in predictive tasks like time series prediction and event sequence classification, yet these models often remain opaque. Counterfactual explanations offer actionable insights into these opaque models by suggesting input modifications to achieve desired predictive outcomes. In the context of explainable machine learning methods, there is a challenge in applying counterfactual explanation techniques to temporal data, as most previous research has focused on image or tabular data classification. Moreover, there is a growing need to extend counterfactual constraints to critical domains like healthcare, where it is crucial to incorporate clinical considerations.

To address these challenges, this thesis proposes novel machine learning models to generate counterfactual explanations for temporal data prediction, along with incorporating additional counterfactual constraints. In particular, this thesis focuses on three types of predictive models: (1) event sequence classification, (2) time series classification, and (3) time series forecasting. Furthermore, the integration of local temporal constraints and domain-specific constraints is proposed to emphasize the importance of temporal features and the relevance of application domains through extensive experimentation. 

This thesis is organized into three parts. The first part presents a counterfactual explanation method for medical event sequences, using style-transfer techniques and incorporating additional medical knowledge in modelling. The second part of the thesis focuses on univariate time series classification, proposing a novel solution that utilizes either latent representation or feature space perturbations, additionally incorporating temporal constraints to guide the counterfactual generation. The third part introduces the problem of counterfactual explanations for time series forecasting, proposes a gradient-based method, and extends to integrating domain-specific constraints for diabetes patients. The conclusion of this thesis summarizes the empirical findings and discusses future directions for applying counterfactual methods in real-world scenarios.

Place, publisher, year, edition, pages
Stockholm: Department of Computer and Systems Sciences, Stockholm University , 2024. , p. 84
Series
Report Series / Department of Computer & Systems Sciences, ISSN 1101-8526 ; 24-015
Keywords [en]
Counterfactual explanations; Deep learning; Explainable machine learning; Healthcare
National Category
Computer Sciences
Research subject
Computer and Systems Sciences
Identifiers
URN: urn:nbn:se:su:diva-234540ISBN: 978-91-8014-979-2 (print)ISBN: 978-91-8014-980-8 (electronic)OAI: oai:DiVA.org:su-234540DiVA, id: diva2:1906268
Public defence
2024-12-04, L50, NOD-huset, Borgarfjordsgatan 12, Kista, Stockholm, 09:00 (English)
Opponent
Supervisors
Available from: 2014-11-11 Created: 2024-10-16 Last updated: 2024-10-29Bibliographically approved
List of papers
1. Counterfactual Explanations for Survival Prediction of Cardiovascular ICU Patients
Open this publication in new window or tab >>Counterfactual Explanations for Survival Prediction of Cardiovascular ICU Patients
2021 (English)In: Artificial Intelligence in Medicine: 19th International Conference on Artificial Intelligence in Medicine, AIME 2021, Virtual Event, June 15–18, 2021, Proceedings / [ed] Allan Tucker; Pedro Henriques Abreu; Jaime Cardoso; Pedro Pereira Rodrigues; David Riaño, Cham: Springer, 2021, p. 338-348Conference paper, Published paper (Refereed)
Abstract [en]

In recent years, machine learning methods have been rapidly implemented in the medical domain. However, current state-of-the-art methods usually produce opaque, black-box models. To address the lack of model transparency, substantial attention has been given to develop interpretable machine learning methods. In the medical domain, counterfactuals can provide example-based explanations for predictions, and show practitioners the modifications required to change a prediction from an undesired to a desired state. In this paper, we propose a counterfactual explanation solution for predicting the survival of cardiovascular ICU patients, by representing their electronic health record as a sequence of medical events, and generating counterfactuals by adopting and employing a text style-transfer technique. Experimental results on the MIMIC-III dataset strongly suggest that text style-transfer methods can be effectively adapted for the problem of counterfactual explanations in healthcare applications and can achieve competitive performance in terms of counterfactual validity, BLEU-4 and local outlier metrics. 

Place, publisher, year, edition, pages
Cham: Springer, 2021
Series
Lecture Notes in Artificial Intelligence, ISSN 0302-9743, E-ISSN 1611-3349 ; 12721
Keywords
Counterfactual explanations, Survival prediction, Explainable models, Deep learning
National Category
Computer Sciences
Research subject
Computer and Systems Sciences
Identifiers
urn:nbn:se:su:diva-200373 (URN)10.1007/978-3-030-77211-6_38 (DOI)978-3-030-77210-9 (ISBN)978-3-030-77211-6 (ISBN)
Conference
19th International Conference on Artificial Intelligence in Medicine (AIME 2021), virtual, June 15-18, 2021
Available from: 2022-01-04 Created: 2022-01-04 Last updated: 2024-10-16Bibliographically approved
2. Style-transfer counterfactual explanations: An application to mortality prevention of ICU patients
Open this publication in new window or tab >>Style-transfer counterfactual explanations: An application to mortality prevention of ICU patients
2023 (English)In: Artificial Intelligence in Medicine, ISSN 0933-3657, E-ISSN 1873-2860, Vol. 135, article id 102457Article in journal (Refereed) Published
Abstract [en]

In recent years, machine learning methods have been rapidly adopted in the medical domain. However, current state-of-the-art medical mining methods usually produce opaque, black-box models. To address the lack of model transparency, substantial attention has been given to developing interpretable machine learning models. In the medical domain, counterfactuals can provide example-based explanations for predictions, and show practitioners the modifications required to change a prediction from an undesired to a desired state. In this paper, we propose a counterfactual solution MedSeqCF for preventing the mortality of three cohorts of ICU patients, by representing their electronic health records as medical event sequences, and generating counterfactuals by adopting and employing a text style-transfer technique. We propose three model augmentations for MedSeqCF to integrate additional medical knowledge for generating more trustworthy counterfactuals. Experimental results on the MIMIC-III dataset strongly suggest that augmented style-transfer methods can be effectively adapted for the problem of counterfactual explanations in healthcare applications and can further improve the model performance in terms of validity, BLEU-4, local outlier factor, and edit distance. In addition, our qualitative analysis of the results by consultation with medical experts suggests that our style-transfer solutions can generate clinically relevant and actionable counterfactual explanations.

National Category
Information Systems
Research subject
Computer and Systems Sciences
Identifiers
urn:nbn:se:su:diva-212771 (URN)10.1016/j.artmed.2022.102457 (DOI)000897143800009 ()36628793 (PubMedID)2-s2.0-85143973748 (Scopus ID)
Available from: 2022-12-12 Created: 2022-12-12 Last updated: 2024-10-16Bibliographically approved
3. Learning Time Series Counterfactuals via Latent Space Representations
Open this publication in new window or tab >>Learning Time Series Counterfactuals via Latent Space Representations
2021 (English)In: Discovery Science: 24th International Conference, DS 2021, Halifax, NS, Canada, October 11–13, 2021, Proceedings / [ed] Carlos Soares; Luis Torgo, Springer , 2021, p. 369-384Conference paper, Published paper (Refereed)
Abstract [en]

Counterfactual explanations can provide sample-based explanations of features required to modify from the original sample to change the classification result from an undesired state to a desired state; hence it provides interpretability of the model. Previous work of LatentCF presents an algorithm for image data that employs auto-encoder models to directly transform original samples into counterfactuals in a latent space representation. In our paper, we adapt the approach to time series classification and propose an improved algorithm named LatentCF++ which introduces additional constraints in the counterfactual generation process. We conduct an extensive experiment on a total of 40 datasets from the UCR archive, comparing to current state-of-the-art methods. Based on our evaluation metrics, we show that the LatentCF++ framework can with high probability generate valid counterfactuals and achieve comparable explanations to current state-of-the-art. Our proposed approach can also generate counterfactuals that are considerably closer to the decision boundary in terms of margin difference.

Place, publisher, year, edition, pages
Springer, 2021
Series
Lecture Notes in Computer Science (LNCS), ISSN 0302-9743, E-ISSN 1611-3349
Keywords
Time series classification, Interpretability, Counterfactual explanations, Deep learning
National Category
Computer Sciences
Research subject
Computer and Systems Sciences
Identifiers
urn:nbn:se:su:diva-200497 (URN)10.1007/978-3-030-88942-5_29 (DOI)978-3-030-88941-8 (ISBN)978-3-030-88942-5 (ISBN)
Conference
International Conference, DS 2021, Halifax, NS, Canada, October 11–13, 2021
Available from: 2022-01-06 Created: 2022-01-06 Last updated: 2024-10-16Bibliographically approved
4. Glacier: guided locally constrained counterfactual explanations for time series classification
Open this publication in new window or tab >>Glacier: guided locally constrained counterfactual explanations for time series classification
Show others...
2024 (English)In: Machine Learning, ISSN 0885-6125, E-ISSN 1573-0565, Vol. 113, p. 4639-4669Article in journal (Refereed) Published
Abstract [en]

In machine learning applications, there is a need to obtain predictive models of high performance and, most importantly, to allow end-users and practitioners to understand and act on their predictions. One way to obtain such understanding is via counterfactuals, that provide sample-based explanations in the form of recommendations on which features need to be modified from a test example so that the classification outcome of a given classifier changes from an undesired outcome to a desired one. This paper focuses on the domain of time series classification, more specifically, on defining counterfactual explanations for univariate time series. We propose Glacier, a model-agnostic method for generating locally-constrained counterfactual explanations for time series classification using gradient search either on the original space or on a latent space that is learned through an auto-encoder. An additional flexibility of our method is the inclusion of constraints on the counterfactual generation process that favour applying changes to particular time series points or segments while discouraging changing others. The main purpose of these constraints is to ensure more reliable counterfactuals, while increasing the efficiency of the counterfactual generation process. Two particular types of constraints are considered, i.e., example-specific constraints and global constraints. We conduct extensive experiments on 40 datasets from the UCR archive, comparing different instantiations of Glacier against three competitors. Our findings suggest that Glacier outperforms the three competitors in terms of two common metrics for counterfactuals, i.e., proximity and compactness. Moreover, Glacier obtains comparable counterfactual validity compared to the best of the three competitors. Finally, when comparing the unconstrained variant of Glacier to the constraint-based variants, we conclude that the inclusion of example-specific and global constraints yields a good performance while demonstrating the trade-off between the different metrics.

Keywords
Time series classification, Interpretability, Counterfactual explanation, s Deep learning
National Category
Other Computer and Information Science
Research subject
Computer and Systems Sciences
Identifiers
urn:nbn:se:su:diva-227717 (URN)10.1007/s10994-023-06502-x (DOI)001181943800001 ()2-s2.0-85187677577 (Scopus ID)
Available from: 2024-03-26 Created: 2024-03-26 Last updated: 2024-10-16Bibliographically approved
5. Counterfactual Explanations for Time Series Forecasting
Open this publication in new window or tab >>Counterfactual Explanations for Time Series Forecasting
2024 (English)In: 2023 IEEE International Conference on Data Mining (ICDM), IEEE conference proceedings , 2024, p. 1391-1396Conference paper, Published paper (Refereed)
Abstract [en]

Among recent developments in time series forecasting methods, deep forecasting models have gained popularity as they can utilize hidden feature patterns in time series to improve forecasting performance. Nevertheless, the majority of current deep forecasting models are opaque, hence making it challenging to interpret the results. While counterfactual explanations have been extensively employed as a post-hoc approach for explaining classification models, their application to forecasting models still remains underexplored. In this paper, we formulate the novel problem of counterfactual generation for time series forecasting, and propose an algorithm, called ForecastCF, that solves the problem by applying gradient-based perturbations to the original time series. The perturbations are further guided by imposing constraints to the forecasted values. We experimentally evaluate ForecastCF using four state-of-the-art deep model architectures and compare to two baselines. ForecastCF outperforms the baselines in terms of counterfactual validity and data manifold closeness, while generating meaningful and relevant counterfactuals for various forecasting tasks.

Place, publisher, year, edition, pages
IEEE conference proceedings, 2024
Series
IEEE International Conference on Data Mining. Proceedings, ISSN 1550-4786, E-ISSN 2374-8486
Keywords
Time series forecasting, Counterfactual explanations, Model interpretability, Deep learning
National Category
Computer Sciences
Research subject
Computer and Systems Sciences
Identifiers
urn:nbn:se:su:diva-226602 (URN)10.1109/ICDM58522.2023.00180 (DOI)001165180100171 ()2-s2.0-85185401353 (Scopus ID)979-8-3503-0788-7 (ISBN)
Conference
IEEE International Conference on Data Mining (ICDM), 1-4 December 2023, Shanghai, China.
Available from: 2024-02-14 Created: 2024-02-14 Last updated: 2024-11-14Bibliographically approved
6. COMET: Constrained Counterfactual Explanations for Patient Glucose Multivariate Forecasting
Open this publication in new window or tab >>COMET: Constrained Counterfactual Explanations for Patient Glucose Multivariate Forecasting
2024 (English)In: Annual IEEE Symposium on Computer-Based Medical Systems: 2024 IEEE 37th International Symposium on Computer-Based Medical Systems (CBMS), 26-28 June 2024, IEEE (Institute of Electrical and Electronics Engineers) , 2024, p. 502-507Conference paper, Published paper (Refereed)
Abstract [en]

Applying deep learning models for healthcare-related forecasting applications has been widely adopted, such as leveraging glucose monitoring data of diabetes patients to predict hyperglycaemic or hypoglycaemic events. However, most deep learning models are considered black-boxes; hence, the model predictions are not interpretable and may not offer actionable insights into medical practitioners’ decisions. Previous work has shown that counterfactual explanations can be applied in forecasting tasks by suggesting counterfactual changes in time series inputs to achieve the desired forecasting outcome. This study proposes a generalized multivariate forecasting setup of counterfactual generation by introducing a novel approach, COMET, which imposes three domain-specific constraint mechanisms to provide counterfactual explanations for glucose forecasting. Moreover, we conduct the experimental evaluation using two diabetes patient datasets to demonstrate the effectiveness of our proposed approach in generating realistic counterfactual changes in comparison with a baseline approach. Our qualitative analysis evaluates examples to validate that the counterfactual samples are clinically relevant and can effectively lead the patients to achieve a normal range of predicted glucose levels by suggesting changes to the treatment variables.

Place, publisher, year, edition, pages
IEEE (Institute of Electrical and Electronics Engineers), 2024
Series
IEEE International Symposium on Computer-Based Medical Systems, ISSN 2372-918X, E-ISSN 2372-9198
Keywords
Comet, Deep learning, Patents, Time series analysis, Predictive models, Glucose, Diabetes, time series forecasting, blood glucose prediction, counterfactual explanations, deep learning
National Category
Computer Sciences
Research subject
Computer and Systems Sciences
Identifiers
urn:nbn:se:su:diva-233744 (URN)10.1109/CBMS61543.2024.00089 (DOI)001284700700038 ()2-s2.0-85200437241 (Scopus ID)
Conference
2024 IEEE 37th International Symposium on Computer-Based Medical Systems (CBMS), 26-28 June 2024, Guadalajara, Mexico.
Available from: 2024-09-24 Created: 2024-09-24 Last updated: 2024-10-16Bibliographically approved

Open Access in DiVA

Constrained Counterfactual Explanations for Temporal Data(4889 kB)64 downloads
File information
File name FULLTEXT03.pdfFile size 4889 kBChecksum SHA-512
07ff88cd5439eff75309f0e03819c26dd7e7b964871da4e179438e82b7cfedc3c3394fea5cf7c6b3854ddb8469f857d743439188fcf8af27c5f76cb95e055db7
Type fulltextMimetype application/pdf

Authority records

Wang, Zhendong

Search in DiVA

By author/editor
Wang, Zhendong
By organisation
Department of Computer and Systems Sciences
Computer Sciences

Search outside of DiVA

GoogleGoogle Scholar
Total: 69 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

isbn
urn-nbn

Altmetric score

isbn
urn-nbn
Total: 339 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf