REVIEW 3 major objections 4 minor 52 references
DCFO partitions the feature space by nearest-neighbour structure to make LOF scores differentiable, then uses gradient-based search to find the closest change that turns an outlier into an inlier.
Reviewed by Pith at T0; open to challenge. T0 means a machine referee read the full paper against a public rubric. the ladder, T0–T4 →
DCFO partitions the feature space by nearest-neighbour structure to make LOF scores differentiable, then uses gradient-based search to find the closest change that turns an outlier into an inlier.
T0 review reviewed 2026-08-03 challenge →
load-bearing objection DCFO's key-space-partition idea is genuinely new, but Algorithm 1's recursive restart changes the query point, so the headline validity claim for the original outlier doesn't follow from the algorithm as written. the 3 major comments →
DCFO: Density-Based Counterfactuals for Outliers -- Additional Material
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
DCFO's key idea is to notice that LOF only depends on a point's k nearest neighbors and on the neighbors of those neighbors. DCFO groups the data space into regions where this neighborhood structure is fixed. Inside one of these regions, the LOF score is a smooth function of the point's location, so a standard constrained optimizer (SLSQP) can find the closest point whose LOF score is below the outlier threshold. If the optimizer crosses into a new region, DCFO restarts the search from that boundary point in the new region.
The paper tests DCFO on 50 OpenML datasets. DCFO finds valid counterfactuals for every outlier and returns closer counterfactuals than a Bayesian method, an evolutionary method, and a naive baseline. However, there is no proof that the restart procedure always succeeds — the perfect validity is an empirical result. The paper also suggests that asking for a lower LOF score produces more plausible counterfactuals, but it does not actually measure plausibility.
Core claim
DCFO is able to provide a counterfactual explanation for every outlier detected, having validity 1.0 across all 50 OpenML datasets, and 'consistently outperforms benchmarked competitors, offering superior proximity and validity of generated counterfactuals' (abstract, Section 4.1). If true, DCFO is the first counterfactual explainer that reliably handles LOF's non-continuous score landscape via gradient-based optimization.
Load-bearing premise
The recursive region-restart algorithm in Algorithm 1 is assumed to terminate at a valid counterfactual (LOF(x) <= t); the paper provides no convergence proof, only empirical validity=1.0. The optimization relies on the key-based partition keeping the neighbor set fixed so SLSQP sees a smooth constraint, but SLSQP is never constrained to stay within R_K; every boundary crossing must be repaired by an empirical restart heuristic. If the restart loop fails to find a feasible point, there is no formal guarantee of success, and constrained cases already show validity dropping to 0.87.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes DCFO, a counterfactual explanation method for Local Outlier Factor (LOF). LOF is non-differentiable, so DCFO partitions the feature space into regions defined by keys K(x) = (k-NN of x, k-NN of each neighbour). Within a fixed key, LOF is argued to be C^2 almost everywhere, and a constrained optimisation problem (Eq. 4) is solved with SLSQP. If the optimiser leaves the starting region, Algorithm 1 recursively restarts from the intermediate point x_f. The paper reports validity 1.0, superior proximity, and higher diversity across 50 OpenML datasets, and includes extensions for non-actionable features, plausibility, and multiple counterfactuals.
Significance. If the validity and proximity claims were made rigorous, DCFO would be a practically useful first gradient-based, LOF-aware counterfactual method. The paper's strengths are its extensive 50-dataset benchmark with full result tables, reproducible code, explicit analysis of why competitors fail, and a plausible smoothness argument (Proposition 3.1) for LOF restricted to a fixed key. The main weakness is not the empirical evaluation but the formal definition of the algorithm: the recursive restart in Algorithm 1 shifts the reference point, so the optimisation problem actually solved at recursion depth greater than zero is not the one stated in Eq. (4). This makes the headline validity and proximity claims not logical consequences of the algorithm as written.
major comments (3)
- [Section 3.2, Eq. (4), Algorithm 1] The recursive call `return DCFO(x_f)` changes the reference point. Eq. (4) defines the counterfactual as the minimiser of d(x,p_i) subject to LOF(x) <= t, with p_i excluded from all k-NN computations. Inside DCFO(x_f), however, the input outlier is x_f, so the objective becomes d(x,x_f) and the LOF constraint is evaluated with x_f (not p_i) as the excluded point. The stopping condition `K'=K` only checks that x_f's key is stable with respect to x_f, not that the returned point satisfies LOF <= t with p_i excluded. Consequently, validity 1.0 and the proximity ranking do not follow from Algorithm 1 as written. If the implementation silently keeps p_i as the excluded point through all recursions, then the final point may be valid for p_i, but it is not the minimiser of Eq. (4), and the proximity claim must be re-examined. The authors should thread p_i explicitly through the recursion, re-ch
- [Algorithm 1; Section 4.3] The algorithm has no termination or convergence proof. The text says 'the recursion terminates in two scenarios' but provides no argument that SLSQP's iterates, the FIFO queue, or the region restarts will ever reach a feasible point or exhaust the queue in finite time. The empirical validity of 1.00 across 50 datasets in Table 6 is an observation, not a guarantee; Section 4.3 already shows validity 0.87 in the non-actionable-feature setting. Since a central selling point is reliability compared with competitors, the paper should either state this as an empirical property or add a formal analysis of failure modes.
- [Section 3.1, Eq. (3)] The displayed formula for LOF is incorrect. As printed it reads LOF(p_i) = (1/k) * lrd(p_i) * sum_{p_j in knn(p_i)} lrd(p_j), which is proportional to lrd(p_i) and would give high scores to high-density points. The standard definition, and the one used in Appendix B and in the experiments, is LOF(p_i) = (1/k) * sum_{p_j in knn(p_i)} lrd(p_j) / lrd(p_i). Please correct the equation and check that no later argument relies on the misprinted form.
minor comments (4)
- [Introduction, contribution bullet] The claim of being 'The first Local Outlier Factor counterfactual explanation method' is overstated. Section 2.2 already cites Yamao et al. [47], which uses LOF in counterfactual path search, and EACE [48], which uses LOF in its loss. The distinctive contribution is the region-based gradient optimisation, not the first use of LOF for counterfactuals.
- [Appendix B, proof of Proposition B.1] The proof's non-differentiability set is correctly identified as having measure zero, but the argument should also mention the singularities of d(x,y1) at x=y1 (though these too form a measure-zero set). The proof is acceptable in essence but needs a small clarification.
- [Tables 3 and 5] The captions say 'NA as the standard error of the mean implies that only one counterfactual is present in the dataset,' but the first appearance of NA in Table 2 is unclear. Please standardise the notation and explicitly distinguish 'only one counterfactual' from 'no valid counterfactual'.
- [Table 3 caption] Typo: 'datset' should be 'dataset'.
Circularity Check
No significant circularity: DCFO optimizes proximity and validity directly, but the paper's contribution is an empirical optimization method, not a derived prediction; benchmarks are self-contained.
full rationale
The strongest candidate for circularity is that DCFO's objective (Eq. 4) minimizes d(x, p_i) subject to LOF(x) <= t, and the evaluation in Section 4.1 measures exactly proximity and validity. However, this is not a circular derivation: DCFO is an optimization procedure, and reporting performance on the objective it optimizes is the normal operation of an optimization method, not a prediction derived from its inputs. The paper's claims are empirical comparisons against Baycon, EACE, and Baseline on 50 OpenML datasets, with competitors that also aim at proximity/validity; the fact that DCFO incorporates LOF's structure and directly enforces the LOF constraint explains its empirical advantage without making the comparison vacuous. The region-based partition and differentiability proof (Proposition 3.1 and Appendix B) are self-contained and do not import the target conclusion. Self-citations to Zimek and coauthors are background references, not load-bearing. The recursive restart in Algorithm 1 does change the reference point and could in principle return a point valid for an intermediate x_f rather than the original outlier p_i; the paper also provides no formal convergence proof. These are correctness and robustness concerns, and the paper itself reports honest limitations (validity drops to 0.87 with non-actionable features; FullOpt without regions fails; Baycon beats DCFO on two datasets in proximity). Such limitations and gaps are not circularity under the required definitions. No step in the derivation reduces by construction or by self-citation to its own inputs.
Axiom & Free-Parameter Ledger
free parameters (4)
- LOF neighborhood size k =
10, 15, or 20 (randomly selected per dataset)
- Outlier threshold t =
1.5, or 95th percentile of LOF scores if no score exceeds 1.5
- Distance function =
Euclidean
- Plausibility strictness (stricter LOF threshold) =
e.g., 1.25 when t=1.5
axioms (5)
- domain assumption LOF as defined by Breunig et al. (Eqs. 1-3) with a single neighborhood parameter k and a threshold t to label outliers.
- standard math The key K(x) = (knn(x), {knn(p_j) | p_j in knn(x)}) is constant on the regions R_K, making LOF_K(x) twice continuously differentiable almost everywhere (Prop 3.1).
- domain assumption SLSQP solves the constrained optimization min d(x,p_i) s.t. LOF_K(x) <= t within a region.
- domain assumption Excluding the original outlier p_i from all kNN computations when evaluating LOF(x) gives the correct counterfactual semantics.
- domain assumption The 50 OpenML datasets are representative of real outlier-detection tasks.
invented entities (1)
-
key K(x) region partition
no independent evidence
Cite this review
Pith. "Pith review of DCFO: Density-Based Counterfactuals for Outliers -- Additional Material." pith.science (2026). https://pith.science/paper/FNT45U3O
@misc{pith2026251210659,
author = {Pith},
title = {Pith review of: DCFO: Density-Based Counterfactuals for Outliers -- Additional Material},
year = {2026},
howpublished = {\url{https://pith.science/paper/FNT45U3O}},
note = {Machine review of arXiv:2512.10659}
}
read the original abstract
Outlier detection identifies data points that significantly deviate from the majority of the data distribution. Explaining outliers is crucial for understanding the underlying factors that contribute to their detection, validating their significance, and identifying potential biases or errors. Effective explanations provide actionable insights, facilitating preventive measures to avoid similar outliers in the future. Counterfactual explanations clarify why specific data points are classified as outliers by identifying minimal changes required to alter their prediction. Although valuable, most existing counterfactual explanation methods overlook the unique challenges posed by outlier detection, and fail to target classical, widely adopted outlier detection algorithms. Local Outlier Factor (LOF) is one the most popular unsupervised outlier detection methods, quantifying outlierness through relative local density. Despite LOF's widespread use across diverse applications, it lacks interpretability. To address this limitation, we introduce Density-based Counterfactuals for Outliers (DCFO), a novel method specifically designed to generate counterfactual explanations for LOF. DCFO partitions the data space into regions where LOF behaves smoothly, enabling efficient gradient-based optimisation. Extensive experimental validation on 50 OpenML datasets demonstrates that DCFO consistently outperforms benchmarked competitors, offering superior proximity and validity of generated counterfactuals.
Figures
Reference graph
Works this paper leans on
-
[1]
Omar Alghushairy, Raed Alsini, Terence Soule, and Xiaogang Ma. 2020. A review of local outlier factor algorithms for outlier detection in big data streams.Big Data and Cognitive Computing5, 1 (2020), 1–22
2020
-
[2]
Alastair Anderberg, James Bailey, Ricardo J. G. B. Campello, Michael E. Houle, Henrique O. Marques, Milos Radovanovic, and Arthur Zimek. 2024. Dimensionality-Aware Outlier Detection. InSDM. SIAM, 652–660
2024
-
[3]
Fabrizio Angiulli, Fabio Fassetti, Simona Nisticó, and Luigi Palopoli. 2023. Coun- terfactual explanations for outliers via subspaces density contrastive loss. In International Conference on Discovery Science. Springer, Springer, Cham, Switzer- land, 159–173
2023
-
[4]
Fabrizio Angiulli, Themis Palpanas, and Corrado Pizzuti. 2009. Detecting out- lying properties of exceptional objects. InProceedings of the 15th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, 17–26
2009
-
[5]
1996.Voronoi Diagrams
Franz Aurenhammer and Rolf Klein. 1996.Voronoi Diagrams. Citeseer, Herndon, VA
1996
-
[6]
1994.Outliers in Statistical Data(3 ed.)
Vic Barnett and Toby Lewis. 1994.Outliers in Statistical Data(3 ed.). Wiley, New York, NY
1994
-
[7]
Show Me How
Aditya Bhattacharya, Tim Vanherwegen, and Katrien Verbert. 2025. “Show Me How”: Benefits and Challenges of Agent-Augmented Counterfactual Explanations for Non-Expert Users. InProceedings of the 33rd ACM Conference on User Modeling, Adaptation and Personalization. ACM, Dublin, Ireland, 174–184
2025
-
[8]
Markus M Breunig, Hans-Peter Kriegel, Raymond T Ng, and Jörg Sander. 2000. LOF: Identifying Density-based Local Outliers. InProceedings of the 2000 ACM SIGMOD International Conference on Management of Data. ACM, Dallas, Texas, USA, 93–104
2000
-
[9]
Ricardo J. G. B. Campello, Davoud Moulavi, Arthur Zimek, and Jörg Sander. 2015. Hierarchical Density Estimates for Data Clustering, Visualization, and Outlier Detection.ACM Transactions on Knowledge Discovery from Data10, 1 (2015), 5:1–5:51. doi:10.1145/2733381
doi:10.1145/2733381 2015
-
[10]
Sanjay Chawla and Aristides Gionis. 2013. k-Means-: A Unified Approach to Clustering and Outlier Detection. InProceedings of the 13th SIAM International Conference on Data Mining. SIAM, Austin, Texas, USA, 189–197
2013
-
[11]
Arun Das and Paul Rad. 2020. Opportunities and Challenges in Explainable Artificial Intelligence (XAI): A Survey.arXiv preprint arXiv:2006.11371(2020). arXiv:2006.11371 urlhttps://arxiv.org/abs/2006.11371
Pith/arXiv arXiv 2020
-
[12]
Debanjan Datta, Feng Chen, and Naren Ramakrishnan. 2022. Framing Algorith- mic Recourse for Anomaly Detection. InProceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining. ACM, Washington, DC, USA, 283–293
2022
-
[13]
Janez Demsar. 2006. Statistical Comparisons of Classifiers over Multiple Data Sets.Journal of Machine Learning Research7 (2006), 1–30. \url{https://jmlr.org/ papers/v7/demsar06a.html}
2006
-
[14]
Alessandro Fontanella, Grant Mair, Joanna Wardlaw, Emanuele Trucco, and Amos Storkey. 2024. Diffusion Models for Counterfactual Generation and Anomaly Detection in Brain Images.IEEE Transactions on Medical Imaging43, 4 (2024), 1123–1135
2024
-
[15]
Frank E Grubbs. 1969. Procedures for detecting outlying observations in samples. Technometrics11, 1 (1969), 1–21
1969
-
[16]
Riccardo Guidotti. 2024. Counterfactual Explanations and How to Find Them: Literature Review and Benchmarking.Data Mining and Knowledge Discovery38, 5 (2024), 2770–2824
2024
-
[17]
Victoria Hodge and Jim Austin. 2004. A survey of outlier detection methodologies. Artificial Intelligence Review22 (2004), 85–126
2004
-
[18]
Xiayan Ji, Anton Xue, Eric Wong, Oleg Sokolsky, and Insup Lee. 2024. AR- Pro: Counterfactual Explanations for Anomaly Repair with Formal Properties. Advances in Neural Information Processing Systems37 (2024), 16133–16159
2024
-
[19]
Wen Jin, Anthony K. H. Tung, Jiawei Han, and Wei Wang. 2006. Ranking Out- liers Using Symmetric Neighborhood Relationship. InLecture Notes in Computer Science, Vol. 3918 (Advances in Knowledge Discovery and Data Mining (PAKDD 2006)). Springer, Singapore, 577–593
2006
-
[20]
Kentaro Kanamori, Takuya Takagi, Ken Kobayashi, and Hiroki Arimura. 2020. DACE: Distribution-Aware Counterfactual Explanation by Mixed-Integer Linear Optimization. InProceedings of the 29th International Joint Conference on Artificial Intelligence (IJCAI). IJCAI Organization, Yokohama, Japan, 2855–2862
2020
-
[21]
Michael Knorr and Raymond T
E. Michael Knorr and Raymond T. Ng. 1999. Finding intensional knowledge of distance-based outliers.ACM SIGMOD Record28, 2 (1999), 14–25
1999
-
[22]
Dieter Kraft. 1988. A software package for sequential quadratic programming. Forschungsbericht- Deutsche Forschungs- und Versuchsanstalt fur Luft- und Raum- fahrt(1988)
1988
-
[23]
Hans-Peter Kriegel, Matthias Schubert, and Arthur Zimek. 2008. Angle-based outlier detection in high-dimensional data. InKDD. ACM, 444–452
2008
-
[24]
Hans-Peter Kriegel, Peer Kröger, Erich Schubert, and Arthur Zimek. 2009. LoOP: Local Outlier Probabilities. InProceedings of the 18th ACM Conference on Infor- mation and Knowledge Management. ACM, Hong Kong, China, 1649–1652
2009
-
[25]
Hans-Peter Kriegel, Peer Kroger, Erich Schubert, and Arthur Zimek. 2011. Inter- preting and unifying outlier scores. InProceedings of the 2011 SIAM International Conference on Data Mining. SIAM, 13–24
2011
-
[26]
Dan Ley, Umang Bhatt, and Adrian Weller. 2022. Diverse, Global and Amortised Counterfactual Explanations for Uncertainty Estimates. InProceedings of the AAAI Conference on Artificial Intelligence, Vol. 36. AAAI Press, Virtual Conference, 7390–7398
2022
-
[27]
Zhong Li, Yuxuan Zhu, and Matthijs Van Leeuwen. 2023. A Survey on Explainable Anomaly Detection.ACM Transactions on Knowledge Discovery from Data18, 1 (2023), 1–54
2023
-
[28]
Angelica Liguori, Ettore Ritacco, Francesco Sergio Pisani, and Giuseppe Manco
-
[29]
Ramaravind K Mothilal, Amit Sharma, and Chenhao Tan. 2020. Explaining Machine Learning Classifiers through Diverse Counterfactual Explanations. In Proceedings of the 2020 Conference on Fairness, Accountability, and Transparency. ACM, Barcelona, Spain, 607–617
2020
-
[30]
Michael Müller, Matthias Zehlike, and Matthias Kirchberg. 2012. OutRules: A framework for outlier descriptions in multiple context spaces. In2012 IEEE International Conference on Data Mining. IEEE, 867–872
2012
-
[31]
Jorge Nocedal and Stephen J Wright. 1999. Numerical Optimization. (1999)
1999
-
[32]
Egawati Panjei, Le Gruenwald, Eleazar Leal, Christopher Nguyen, and Shejuti Silvia. 2022. A survey on outlier explanations.The VLDB Journal31, 5 (2022), 977–1008
2022
-
[33]
Rafael Poyiadzi, Kacper Sokol, Raul Santos-Rodriguez, Tijl De Bie, and Peter Flach
-
[34]
Sridhar Ramaswamy, Rajeev Rastogi, and Kyuseok Shim. 2000. Efficient algo- rithms for mining outliers from large data sets. InProceedings of the 2000 ACM SIGMOD international conference on Management of data. 427–438
2000
-
[35]
Piotr Romashov, Martin Gjoreski, Kacper Sokol, Maria Vanina Martinez, and Marc Langheinrich. 2022. BayCon: Model-agnostic Bayesian Counterfactual Generator. InProceedings of the 31st International Joint Conference on Artificial Intelligence (IJCAI). IJCAI Organization, Macau, China, 740–746
2022
-
[36]
Chris Russell. 2019. Efficient Search for Diverse Coherent Explanations. In Proceedings of the Conference on Fairness, Accountability, and Transparency. ACM, Atlanta, GA, USA, 20–28
2019
-
[37]
Erich Schubert, Arthur Zimek, and Hans-Peter Kriegel. 2014. Local Outlier Detection Reconsidered: A Generalized View on Locality with Applications to Spatial, Video, and Network Outlier Detection.Data Mining and Knowledge Discovery28, 1 (2014), 190–237. doi:10.1007/S10618-012-0300-Z
-
[38]
Jonas Herskind Sejr and Anna Schneider-Kamp. 2021. Explainable Outlier Detec- tion: What, for Whom and Why?Machine Learning with Applications6 (2021), 100172
2021
-
[39]
Deborah Sulem, Michele Donini, Muhammad Bilal Zafar, Francois-Xavier Aubet, Jan Gasthaus, Tim Januschowski, Sanjiv Das, Krishnaram Kenthapadi, and Cedric Archambeau. 2022. Diverse Counterfactual Explanations for Anomaly Detection in Time Series.arXiv preprint arXiv:2203.11103(2022). arXiv:2203.11103 urlhttps://arxiv.org/abs/2203.11103
Pith/arXiv arXiv 2022
-
[40]
Violeta Teodora Trifunov, Maha Shadaydeh, Björn Barz, and Joachim Denzler
-
[41]
Joaquin Vanschoren, Jan N Van Rijn, Bernd Bischl, and Luis Torgo. 2014. OpenML: Networked Science in Machine Learning.ACM SIGKDD Explorations Newsletter 15, 2 (2014), 49–60
2014
-
[42]
Sahil Verma, Varich Boonsanong, Minh Hoang, Keegan Hines, John Dickerson, and Chirag Shah. 2024. Counterfactual Explanations and Algorithmic Recourses for Machine Learning: A Review.Comput. Surveys56, 12 (2024), 1–42
2024
-
[44]
Braulio Valentin Sanchez Vinces, Erich Schubert, Arthur Zimek, and Robson L. F. Cordeiro. 2025. A comparative evaluation of clustering-based outlier detection. Data Min. Knowl. Discov.39, 2 (2025), 13
2025
-
[45]
Sandra Wachter, Brent Mittelstadt, and Chris Russell. 2017. Counterfactual Explanations without Opening the Black Box: Automated Decisions and the GDPR.Harvard Journal of Law & Technology31 (2017), 841–887
2017
-
[46]
Hongzhi Wang, Mohamed Jaward Bah, and Mohamed Hammad. 2019. Progress in outlier detection techniques: A survey.IEEE Access7 (2019), 107964–108000
2019
-
[47]
arXiv:2010.10596 urlhttps://arxiv.org/abs/2010.10596
Pith/arXiv arXiv 2010
-
[48]
Peng Zhou, Qihui Tong, Shiji Chen, Yunyun Zhang, and Xindong Wu. 2025. EACE: Explain Anomaly via Counterfactual Explanations.Pattern Recognition DCFO: Density-Based Counterfactuals for Outliers - Additional Material SIGKDD ’26, August 09–13, 2026, Jeju, Korea 164 (2025), 111532
2025
-
[49]
Arthur Zimek and Peter Filzmoser. 2018. There and back again: Outlier detection between statistical reasoning and data mining algorithms.WIREs Data Mining Knowl. Discov.8, 6 (2018). doi:10.1002/WIDM.1280 Appendices A Multiple Counterfactual Algorithm We present here how DCFO’s algorithm is modified in order to propose multiple counterfactuals. After findi...
-
[51]
Shoki Yamao, Ken Kobayashi, Kentaro Kanamori, Takuya Takagi, Yuichi Ike, and Kazuhide Nakata. 2024. Distribution-Aligned Sequential Counterfactual Explanation with Local Outlier Factor. InPacific Rim International Conference on Artificial Intelligence. Springer, Nagoya, Japan, 243–256
2024
-
[2020]
InProceedings of the AAAI/ACM Conference on AI, Ethics, and Society
FACE: Feasible and Actionable Counterfactual Explanations. InProceedings of the AAAI/ACM Conference on AI, Ethics, and Society. ACM, New York, NY, USA, 344–350
-
[2021]
In2021 20th IEEE International Conference on Machine Learning and Applications (ICMLA)
Anomaly Attribution of Multivariate Time Series Using Counterfactual Reasoning. In2021 20th IEEE International Conference on Machine Learning and Applications (ICMLA). IEEE, Punta Cana, Dominican Republic, 166–172
-
[2024]
Knowledge and Information Systems66, 12 (2024), 7437–7468
Robust Anomaly Detection via Adversarial Counterfactual Generation. Knowledge and Information Systems66, 12 (2024), 7437–7468
2024
This paper was first reviewed by deepseek-v4-flash on August 3, 2026.
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.