arXiv:2609.03707cs.AISep 2026

Manuscript Offprint

arXiv:2609.03707

Counterfactual Routing Using Integer Programming with Constraint Generation

Daniël Vos, Sterre Lutz

Abstract

We present our submission to the IJCAI 2025 'Counterfactual Routing Competition' (CRC 25). The goal of the competition is to find counterfactual explanations for the shortest path problem. This requires deciding what the minimal changes to a road network would make a route chosen by the user the optimal route. This enables explanations such as "Your suggested route would indeed have been optimal, if road X were not a bicycle path." Our solution models the problem as an integer program, iteratively incorporating constraints until an exact solution is found. In the final evaluation on held-out test instances, our method ranked fourth in solution quality and obtained its solution fastest on every instance, with an average runtime of 9.0 seconds compared to 118.8 seconds for the next-fastest submission.

Code https://github.com/SUMI-lab/CRC-competition

1 Introduction

We present our solution to the IJCAI 2025 'Counterfactual Routing Competition' (CRC 25). The competition addresses the challenge of safe and accessible navigation for wheelchair users, who face unique obstacles beyond simply reaching their destination quickly. Factors such as curb heights, sidewalk widths, and crossings significantly impact which routes are suitable.

While existing routing algorithms can generate optimal paths considering these constraints, they often do not explain why a particular route is chosen over others. The competition organizers emphasize that this lack of transparency can undermine users' trust in the recommended routes.

To address this, the competition requires participants to create counterfactual explanations that demonstrate why a chosen 'foil' route is suboptimal. Such explanations show how an alternative route would have been optimal if some road conditions had been different. Providing counterfactuals for routing requires identifying minimal changes in complex, weighted graphs representing the road maps.

Our solution models the problem as an integer program that iteratively incorporates constraints to ensure the counterfac-

tual route becomes optimal after minimal modifications to the road map in question.

Competition results In the final competition evaluation¹ on the held-out test instances, our submission ranked fourth in terms of solution quality. Notably, our method was the fastest on every single test instance, with an average runtime of 9.0 seconds compared to 118.8 seconds for the next-fastest submission.

Related Work We did not directly base our solution on other work; however, we applied the general idea of cutting plane methods for integer programs to the competition (Bradley et al. [1977], Chapter 9.8). This approach is useful, for example, when an (integer) linear program is too large to solve directly. Instead of solving the whole program, cuts are added iteratively until optimality has been proven.

Our use of integer programming was partly motivated by Kantchelian et al. [2016]. They use an integer program to find optimal adversarial examples, which is nearly equivalent to finding optimal counterfactual explanations, i.e., they minimize distance while ensuring a specific outcome.