Counterfactual Explanations for Time-Series Classification via Constrained Flow Matching
Akihiro Yamaguchi, Shizuo Kaji, Kaname Matsue, Ryusei Shingaki
NeurIPS page · OpenReview · Open on the map
Category: Causality, Privacy & Learning Theory › Causal Evaluation · Type: new method · Keywords: counterfactual explanations, time-series classification, flow matching, model-agnostic, one-class
Summary
CTCF is a model-agnostic method for generating counterfactual explanations for time-series classification that works in both supervised and one-class settings without relying on classifier gradients.
Explained to a 5-year-old
We have a computer that looks at sequences of numbers (like a song or sensor readings) and says what they are. Sometimes we want to know what would happen if we changed a tiny part of those numbers to make the computer think they belong to a different group. The new idea makes pictures that show those changes while keeping the numbers realistic and the changes very small. It works even when we only have one example of a group, not many, and it doesn't need the computer to give us exact numbers. The idea also has a math proof that says it should work well when the changes are just right.
Explained to a 5-year-old, longer
A computer program can look at a long list of numbers and decide whether they belong to one category or another, like "this is a heartbeat pattern" or "this is a traffic pattern". Sometimes we want to understand why it made that decision by creating a new example that looks almost the same but would make the program say the opposite. This new example is called a counterfactual explanation because it shows what would have happened if a small part of the original data had been different. The method described in the paper works without needing the program to give us exact probabilities or gradients, which are often hard to get. It uses a special generator that can create new sequences of numbers that look realistic, like a painter drawing plausible scenes. The generator learns where the desired class should be by looking at points halfway between the original and the new example. At the same time, the method adds rules that keep the changes tiny and only affect a short segment of the sequence, so the new example is not too different. It also checks that the new example stays inside a safe region that the researchers defined, preventing unrealistic outputs. The approach works for both situations where we have many examples of each class and for situations where we only have one example of a class. The paper shows that the method works well on many standard time-series datasets used by researchers. There is also a mathematical proof that, under perfect conditions, the method’s risk matches the risk of the original continuous-time process. Overall, the idea helps us see how small changes can flip a decision while keeping the data believable.
For a technical reader
CTCF provides a model-agnostic way to generate counterfactual explanations for time-series classifiers, working both in supervised and one-class settings. It uses an unconditional Flow Matching generator and learns a time-dependent region that defines the desired class from interpolation states, avoiding reliance on classifier gradients. During inference, a dual-control mechanism applies fused-lasso steering for localized changes and a linearized projection to enforce region constraints. The authors prove that under ideal marginal matching, the surrogate risk on interpolated states equals the ODE-trajectory risk, giving a theoretical guarantee. Experiments on the UCR benchmark demonstrate strong quantitative and qualitative performance, showing the approach’s practicality for real-world time-series tasks.
Problem
Generating counterfactual explanations for time-series classification that flip predictions while keeping changes small and plausible is challenging, especially for hard-decision classifiers and one-class settings where gradient information is unavailable.
Method
The approach decouples generation from classifier control by using an unconditional Flow Matching generator and learning a flow-time-dependent desired-class region from interpolation states labeled by endpoint hard decisions. At inference, a dual-control mechanism combines fused-lasso steering for local changes with linearized projection correction to enforce region constraints. Under ideal marginal matching, the surrogate risk on interpolation states equals the ODE-trajectory risk.
Results
Experiments on UCR datasets show that CTCF achieves strong performance across quantitative metrics and qualitative case studies.
Contributions
The paper introduces a model-agnostic counterfactual generation framework that works for hard-decision classifiers and one-class settings without requiring gradients, and provides theoretical analysis linking surrogate and trajectory risks.
Limitations and assumptions
The theoretical result relies on ideal marginal matching, and the experiments are limited to UCR time-series datasets.
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction