TL;DR
This paper introduces CFETVR, a novel algorithm for generating more realistic counterfactual explanations for changes in rankings. Unlike previous methods that only consider a single agent, CFETVR accounts for how changes in one agent's features might affect the rankings of all agents over time, preventing combinatorial explosion and improving explanation utility.
What Problem Does This Paper Address?
In Explainable AI (XAI), counterfactual explanations are crucial for understanding how to alter an outcome by changing input features. However, existing methods often focus on individual outcomes, like changing a classification label. When applied to ranking systems (e.g., product recommendations, search results), a significant limitation arises: counterfactual explanations typically only consider how to change the ranking of a single target agent. This is problematic because in a dynamic ranking system, if one agent changes its features (e.g., a retailer improving its marketing), other agents might also adapt, altering the overall ranking landscape. This means a counterfactual explanation for one agent might become inaccurate if it doesn't account for the ripple effects across all agents. Furthermore, calculating sequential changes for all agents simultaneously can lead to a combinatorial explosion, making it computationally infeasible.
Methods
The proposed algorithm, Counterfactual Explanations of Time Varying Rankings (CFETVR), addresses these limitations by incorporating predictions of future feature values for all agents in the ranking system. The core of CFETVR involves three main steps:
- Initial Ranking Generation: The algorithm first generates an initial ranking of agents based on the current input data using a machine learning model (Mlmodel).
- Forecast Variation using ARIMA: It then employs the Auto Regressive Integrated Moving Average (ARIMA) model to predict future feature values for all agents based on their historical time-series data. This step is key to capturing the dynamic nature of the ranking system.
- Feature Search for Counterfactuals: Based on these predicted future values, the algorithm searches for the minimum set of feature changes required for a target agent to achieve a desired rank. This search is guided by a greedy algorithm, ensuring that the modifications are practical. The ranking is re-evaluated after each feature adjustment, and the process continues until the desired rank is met or no feasible changes are found.
A significant advantage of CFETVR is its ability to prevent combinatorial explosion by focusing on predicted future states rather than exhaustively simulating all possible future scenarios.
Datasets
The authors evaluated their CFETVR algorithm using the Walmart sales prediction dataset from a Kaggle competition (2019). This dataset contains time-series data for multiple agents (stores), including features, outcome labels, and time-series information. No new benchmarks were introduced.
Key Insights and Ideas
- Realism in Counterfactuals: The most significant insight is that realistic counterfactual explanations for rankings must consider the dynamic interactions and potential future actions of all agents in the system, not just the target agent.
- Time-Varying Nature: Ranking systems are not static. Capturing the time-varying nature of features and their impact on rankings is crucial for generating useful explanations.
- Computational Feasibility: By using predictive models like ARIMA, CFETVR offers a computationally tractable way to handle the complexity of multi-agent ranking systems, avoiding combinatorial explosions.
- Practicality of Explanations: The algorithm aims to find minimal feature changes, making the generated explanations more actionable for users (e.g., retailers).
Key Results
The paper presents experimental results using the Walmart dataset, with XGBoost as the ranking model and SHAP for feature importance.
- Demonstrated Effectiveness: The CFETVR algorithm was evaluated in three experiments.
- Example Scenario: For a target agent (store ID 23) aiming for a 5-rank increase, the explanation suggested expanding store size to 87,972 square feet. This change resulted in a rank improvement from 10th to 5th.
- System-Wide Impact: Notably, the predicted sales values for all agents changed during the process, illustrating the algorithm's consideration of system-wide dynamics.
- Achieving Goals with Minimal Changes: In some cases, the ARIMA predictions alone were sufficient to increase the target agent's rank, demonstrating that feature search might not always be necessary if future trends are favorable.
- Qualitative Finding: The authors observed that drastic ranking changes were not always necessary, and the algorithm could achieve desired rank shifts with relatively small adjustments, especially when the target rank change was modest.
Limitations and Future Work
- Feature Dependencies: The current CFETVR algorithm assumes that feature changes are independent. The authors acknowledge that this is a simplification and that dependencies among features can significantly impact explanation quality.
- Future Direction: The primary future work suggested is to generalize the algorithm to incorporate these dependencies among features into the search process, thereby enhancing the accuracy and robustness of the counterfactual explanations.
Summary updated