REVIEW 5 major objections 4 minor 17 references
FAISS and ball trees speed up Ball Mapper by two orders of magnitude
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 →
T0 review · deepseek-v4-flash
2026-08-03 12:48 UTC pith:26K5P3HW
load-bearing objection Useful benchmark, but the abstract promises approximate-error results that the body never delivers, and the benchmark setup leaves the exact-vs-approximate question open. the 5 major comments →
Exact and Approximate Range Queries for Efficient Ball Mapper Construction
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
On its own terms, the paper establishes that the ε-net cover construction in Ball Mapper reduces to repeated fixed-radius range queries, and that two classes of accelerators—hierarchical metric pruning (ball trees) and hardware-aware algebraic distance computation (FAISS)—speed these queries up dramatically. FAISS factors squared Euclidean distance into a per-query norm, a precomputed per-point norm, and an inner product evaluated as a dense matrix operation with SIMD/BLAS support; with up to 12 threads it keeps runtime low even at dimension 1000. Ball trees prune by the triangle inequality and degrade in high dimensions. On the benchmark data, FAISS attains speedups exceeding two orders of
What carries the argument
The load-bearing object is the fixed-radius range query inside the greedy ε-net construction: given a new landmark, return every point within distance ε. The ball tree answers it by storing points in nested metric balls and discarding a subtree whenever d(q, center) − radius > ε, a direct triangle-inequality bound; this reduces the number of distances evaluated. FAISS answers the same query for Euclidean data by expanding d²(q,x) = ||q||² + ||x||² − 2q·x, precomputing ||x||², and turning the collection of dot products into a single matrix operation run through SIMD/BLAS routines; this reduces the cost per distance rather than the number of distances. The paper also formulates additive and mu
Load-bearing premise
The speedup comparison assumes FAISS runs in an exact-index configuration with threads enabled while the baseline runs single-threaded; Section 4 never names the FAISS index, so if an approximate index was used, the two methods are not building the same Ball Mapper graph.
What would settle it
Re-run the n=5000, D=500 benchmark with a single-threaded exact FAISS index (IndexFlatL2) and compare the output edge set to the baseline implementation; if edges differ or the speedup drops below about two orders of magnitude, the central speedup claim as stated fails.
If this is right
- If the accelerations are exact, both FAISS and the ball tree produce the same ε-net and Ball Mapper graph as the baseline, so users can adopt them without changing interpretation.
- FAISS makes Ball Mapper practical for datasets and dimensions where the baseline runtime grows near-quadratically.
- The ball tree remains a workable alternative at low dimension and keeps memory usage comparatively low.
- Memory usage rises with speed, especially for FAISS, so the practical choice depends on available RAM.
- If approximate indexes are conservative as claimed, the resulting Ball Mapper graph is a subgraph of the exact one, which could support fast exploratory passes.
Where Pith is reading between the lines
- Editorial: The benchmark never disables FAISS's threading or states which index type was used, so the two-order-of-magnitude figure likely bundles hardware parallelism with algorithmic gains; a single-threaded exact-index run would separate the two.
- Editorial: The conservative-approximation claim appears only in the abstract; the body provides no experiments exercising approximate indexes, so it should be read as a hypothesis rather than a demonstrated result.
- Editorial: The same norm-expansion identity applies to cosine similarity, suggesting FAISS-style acceleration could transfer to other inner-product metrics without the Euclidean restriction.
- Editorial: If approximate indexes truly only delete edges, downstream graph algorithms could safely operate on the thinned graph, treating missing edges as omissions rather than hallucinations.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes accelerating the cover-construction stage of Ball Mapper by replacing the baseline range-query loop of pyBallMapper with scikit-learn ball-tree queries and FAISS similarity-search routines. It reviews the Ball Mapper nerve construction, proves two Lipschitz coloring bounds, describes ball-tree pruning and FAISS/BLAS inner-product acceleration, and reports benchmarks of median runtime, speedup, memory usage, and fitted power-law scaling exponents on synthetic datasets. The body's main empirical claim is that FAISS and Ball Tree are substantially faster than pyBallMapper, especially at large n and D. The abstract additionally claims that approximate FAISS indexes behave conservatively, removing but not adding ball memberships and edges; the supplied full text contains no approximate-index error model or experiments supporting that claim.
Significance. If the exact-acceleration claim is established, the paper would provide useful practical guidance: replacing the search routine in pyBallMapper with an exact index preserves the Ball Mapper graph while reducing wall-clock time. The coloring propositions are straightforward but cleanly stated, and the abstract's exact-vs-approximate distinction is a valuable framing. However, the manuscript as submitted does not deliver the approximate part promised in the abstract, and the exact benchmark lacks sufficient configuration detail—dataset generation, epsilon, FAISS index type, and thread configuration—to verify that the accelerated queries compute the same cover. The provided code link is a useful start, but the absence of data-generation scripts, seeds, and explicit index/thread settings makes the central speedup claim difficult to reproduce or validate.
major comments (5)
- [§4] The central speedup claim cannot be evaluated because the benchmark does not state which FAISS index is used. The manuscript says only 'FAISS is configured to allow up to 12 CPU threads' (§4). Exact query semantics require an exact index (e.g., IndexFlatL2 with exact range search); if an approximate IVF/HNSW/PQ index was used, the accelerated ball memberships differ from pyBallMapper's, so the benchmark is not measuring the same Ball Mapper output. In addition, pyBallMapper's thread configuration is not given. The authors must specify the FAISS index, state whether searches are exact or approximate, report epsilon, describe dataset generation, and verify that exact accelerated range queries return identical memberships to the baseline on all trials.
- [§4.1] The speedup definition is inverted. The text defines speedup as 'the ratio between the runtime of proposed algorithm over the runtime of pyBM' (i.e., proposed/pyBM), but then reports 'speedups exceeding two orders of magnitude.' Since the proposed methods are faster, proposed/pyBM < 1. If the plotted quantity is actually pyBM/proposed, the definition must be corrected; if not, the reported speedups are inconsistent. This blocks quantitative interpretation of Figs. 3–4 and the headline claim.
- [Abstract; §§1–4] The abstract's approximate-range-query contribution is absent from the body. It promises deterministic additive/multiplicative error models and experiments showing approximate FAISS indexes 'do not introduce false-positive memberships or spurious edges,' but the body ends at §4.3 with no such models, no approximate index experiments, and no error analysis. Either the missing section must be added, or the title/abstract must be revised to claim only exact acceleration; the current manuscript does not support the abstract's central approximate claim.
- [§4.3 / Table 1] The complexity analysis is not well-defined. It states a log–log regression of T(D) versus dimension D, but Table 1 reports different exponents p for D = 100, 200, 500, 1000. If D is the regressor, there should be one exponent per algorithm (or per fixed n), not exponents that 'increase with D'; if the rows correspond to separate regressions over something else (e.g., n), the independent variable is not stated. The values are fits to the same runtime data used in the rest of Section 4, so the scaling exponents are descriptive summaries, not independent predictions; the text should avoid implying they validate a complexity model. Report n, the regression ranges, and standard errors/confidence intervals for p.
- [§4, Figs. 1–6] No variance measures are reported despite 65 trials per condition; only medians are reported. Without quartiles, confidence intervals, or a description of the 65-trial procedure (seeds, warm-up, measurement methodology), it is impossible to judge whether FAISS's advantage is stable or dominated by noise. This is particularly important because the claimed speedups span orders of magnitude and may be affected by threading.
minor comments (4)
- [Throughout] Typos and grammatical errors: 'preicse', 'inregration', 'contructs', 'whicih', 'lienar', 'alllowed', 'dimensionsFor', and 'an widely used'. A careful proofreading pass is needed.
- [§3.1] The center formula c_i = (max(x_i)+min(x_i))/2 is ambiguous: if x_i denotes the i-th coordinate, the max/min should be taken per coordinate over the data. Also, 'Suppose we have a dataset (X,d) of dimension n' followed by 'X is the root' should be clarified.
- [§3.2] The claim that FAISS 'reduces the constant factors associated with distance evaluation without altering the underlying algorithmic complexity' is correct but should be stated more explicitly in §4.3: for an exact flat index, worst-case query cost is still O(nD), so the lower Table 1 exponents for FAISS are empirical constant/parallelization effects, not asymptotic improvements.
- [§4] The dataset generation is described only as 'synthetic datasets with different geometries' in the abstract and not at all in the body. Please state the generative models (e.g., uniform, Gaussian, clustered), the value of epsilon, and the range of dataset sizes used for the dimensionality experiments.
Circularity Check
No circularity: the paper benchmarks external libraries against an external baseline; the empirical exponents are fits to runtime data, not independent predictions.
full rationale
The central claim (FAISS/Ball Tree speedups) is an empirical comparison of third-party implementations against pyBallMapper. The acceleration logic in §3 is standard (triangle-inequality pruning; BLAS/SIMD), and the runtime data in §4 are externally generated. No parameter is fitted and then called a prediction; Table 1 exponents are explicitly least-squares fits to the same observed runtimes and are presented as descriptive scaling, not as predictions of independent data. There is no self-citation chain: citations [2], [5], [6], [7] are to the original Ball Mapper paper, scikit-learn, and FAISS, none by the present authors. Two non-circular validity concerns should be noted: (1) §4 never states which FAISS index type was used (exact vs approximate), so the abstract's claim that approximate indexes 'do not introduce false-positive memberships' is unsupported in the body; (2) §4.1 defines speedup as 'proposed runtime over pyBM runtime', which is the inverse of the usual speedup and contradicts the reported two-orders-of-magnitude claims. These affect benchmark correctness, not circularity of derivation.
Axiom & Free-Parameter Ledger
free parameters (4)
- Ball tree leaf size =
40
- FAISS thread count =
12
- Ball Mapper radius epsilon =
not reported
- Empirical scaling exponents p =
0.533 to 2.045 per Table 1
axioms (5)
- standard math Triangle inequality holds for the metric used in ball-tree pruning.
- standard math Squared Euclidean distance decomposes as ||q-x||^2 = ||q||^2 + ||x||^2 - 2q·x.
- domain assumption The metric-space and epsilon-net framework of Ball Mapper is accepted from prior work.
- domain assumption The synthetic datasets generated for benchmarking are representative of real settings where Ball Mapper is used.
- ad hoc to paper Runtime follows a power-law T(D) = k D^p.
read the original abstract
Ball Mapper is a tool in topological data analysis that summarizes a finite metric dataset by covering it with metric balls and encoding their overlaps as a graph. Its construction requires repeated fixed-radius range queries, which can become computationally expensive for large or high-dimensional datasets. This work studies two approaches to accelerating this step: ball tree data structures, which use metric-space pruning, and the FAISS library, which uses optimized similarity-search routines for dense vectors. We distinguish between exact acceleration, where the range sets are preserved, and approximate search, where ball memberships may change. For approximate range queries, we formulate deterministic additive and multiplicative error models and show how these errors affect the covering radius, landmark separation, and graph structure of Ball Mapper. We then evaluate several FAISS index configurations on synthetic datasets with different geometries. The experiments show that the tested approximate indexes behave conservatively. They remove ball memberships and graph edges but do not introduce false-positive memberships or spurious edges. The severity of these effects depends strongly on dataset geometry, with the isotropic Gaussian dataset being more sensitive than clustered or low-dimensional structured data.
Reference graph
Works this paper leans on
-
[1]
Richard E. Bellman. Dynamic Programming. Princeton University Press, Princeton, NJ, 1957
1957
-
[2]
On the imbedding of systems of compacta in simplicial complexes
Karol Borsuk. On the imbedding of systems of compacta in simplicial complexes. Fundamenta Mathematicae, 35 0 (1): 0 217--234, 1948
1948
-
[3]
Ball mapper: A shape summary for topological data analysis
Pawe D otko. Ball mapper: A shape summary for topological data analysis. arXiv preprint arXiv:1901.07410, 2019. URL https://arxiv.org/abs/1901.07410
Pith/arXiv arXiv 1901
-
[4]
Matthijs Douze, Alexandr Guzhva, Chengqi Deng, Jeff Johnson, Gergely Szilvasy, Pierre-Emmanuel Mazar \'e , Maria Lomeli, Lucas Hosseini, and Herv \'e J \'e gou. The faiss library, 2025. URL https://arxiv.org/abs/2401.08281. arXiv version 4
Pith/arXiv arXiv 2025
-
[5]
Michael J. Flynn. Some computer organizations and their effectiveness. IEEE Transactions on Computers, C-21 0 (9): 0 948--960, 1972. doi:10.1109/TC.1972.5009071. Foundational reference for SIMD/MIMD computer organization terminology
arXiv 1972
-
[6]
Teofilo F. Gonzalez. Clustering to minimize the maximum intercluster distance. Theoretical Computer Science, 38: 0 293--306, 1985. doi:10.1016/0304-3975(85)90224-5
-
[7]
Kazushige Goto and Robert A. Van de Geijn. Anatomy of high-performance matrix multiplication. ACM Transactions on Mathematical Software, 34 0 (3): 0 12:1--12:25, 2008. doi:10.1145/1356052.1356053
arXiv 2008
-
[8]
pyballmapper
Davide Gurnari. pyballmapper. URL https://github.com/dioscuri-tda/pyBallMapper. Python implementation of the Ball Mapper algorithm
-
[9]
Product quantization for nearest neighbor search
Herv \'e J \'e gou, Matthijs Douze, and Cordelia Schmid. Product quantization for nearest neighbor search. IEEE Transactions on Pattern Analysis and Machine Intelligence, 33 0 (1): 0 117--128, 2011. doi:10.1109/TPAMI.2010.57
-
[10]
Yury A. Malkov and Dmitry A. Yashunin. Efficient and robust approximate nearest neighbor search using hierarchical navigable small world graphs. IEEE Transactions on Pattern Analysis and Machine Intelligence, 42 0 (4): 0 824--836, 2020. doi:10.1109/TPAMI.2018.2889473
arXiv 2020
-
[11]
Faiss indexes
Meta AI Research . Faiss indexes. https://github.com/facebookresearch/faiss/wiki/Faiss-indexes, 2025. GitHub Wiki, accessed 2026-06-19
2025
-
[12]
Guidelines to choose an index
Meta AI Research . Guidelines to choose an index. https://github.com/facebookresearch/faiss/wiki/Guidelines-to-choose-an-index, 2026 a . GitHub Wiki, accessed 2026-06-19
2026
-
[13]
Struct faiss::IndexFlat
Meta AI Research . Struct faiss::IndexFlat . Faiss, 2026 b . URL https://faiss.ai/cpp_api/struct/structfaiss_1_1IndexFlat.html
2026
-
[14]
Omohundro
Stephen M. Omohundro. Five balltree construction algorithms. Technical Report TR-89-063, International Computer Science Institute, Berkeley, CA, December 1989. URL https://steveomohundro.com/wp-content/uploads/2009/03/omohundro89_five_balltree_construction_algorithms.pdf
1989
-
[15]
Scikit-learn: Machine learning in python
Fabian Pedregosa, Ga \"e l Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier Grisel, Mathieu Blondel, Peter Prettenhofer, Ron Weiss, Vincent Dubourg, Jake Vanderplas, Alexandre Passos, David Cournapeau, Matthieu Brucher, Matthieu Perrot, and \'E douard Duchesnay. Scikit-learn: Machine learning in python. Journal of Machine Learning ...
2011
-
[16]
sklearn.neighbors.BallTree
scikit-learn developers . sklearn.neighbors.BallTree . scikit-learn, 2026. URL https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.BallTree.html
2026
-
[17]
Video google: A text retrieval approach to object matching in videos
Josef Sivic and Andrew Zisserman. Video google: A text retrieval approach to object matching in videos. In Proceedings of the IEEE International Conference on Computer Vision, pages 1470--1477, 2003. doi:10.1109/ICCV.2003.1238663
Pith/arXiv arXiv 2003
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.