Papers
Topics
Authors
Recent
Search
2000 character limit reached

ICSpyLab: A Python package for invariant coordinate selection

Published 23 Jun 2026 in stat.ME | (2606.24521v1)

Abstract: Invariant coordinate selection (ICS) is a dimensionality reduction technique based on the joint diagonalization of two scatter matrices. While principal component analysis relies solely on variance, ICS seeks directions of maximal or minimal generalized kurtosis, making it a powerful alternative for clustering and anomaly detection. Despite its theoretical and practical relevance, no dedicated Python implementation of ICS is currently available, limiting its integration into modern machine-learning workflows. We introduce ICSpyLab, the first Python package implementing ICS. It provides a broad collection of scatter matrices, multiple algorithms for computing invariant components, and several component-selection criteria. Designed for both practitioners and researchers, ICSpyLab follows a standard estimator interface, facilitating its use within machine-learning pipelines while remaining flexible for methodological extensions. The documentation includes detailed explanations and reproducible examples. ICSpyLab is released under the MIT license and is openly available at: https://github.com/cbecquart/ICSpyLab.

Authors (1)

Summary

  • The paper's main contribution is introducing the first dedicated Python package for invariant coordinate selection, integrating varied scatter matrix methods.
  • The methodology employs joint diagonalization of multiple scatter matrices to reveal latent hyperplane structures, outperforming PCA in complex datasets like RANDU.
  • Empirical validation shows superior performance in clustering and outlier detection, with a modular design that seamlessly integrates with scikit-learn workflows.

ICSpyLab: A Python Package for Invariant Coordinate Selection

Overview of Invariant Coordinate Selection (ICS)

Invariant Coordinate Selection (ICS) is a robust dimensionality reduction technique that utilizes affine equivariant scatter matrices to identify directions in multivariate data which exhibit maximal or minimal generalized kurtosis. Unlike PCA, which targets directions of maximal variance by diagonalizing a single covariance matrix, ICS leverages the joint diagonalization of two scatter matrices, each differing in their sensitivity to data structure. This enables ICS to capture salient non-Gaussian features and provides enhanced discriminatory power in clustering and anomaly detection scenarios, notably outperforming PCA in mixture models and contaminated data settings.

ICS inherits affine invariance, ensuring consistent results across linear transformations. Its theoretical links to Fisherโ€™s linear discriminant subspace extend its interpretability in mixture models, motivating recent works that show ICS recovers group structure effectively when the correct scatter pair is chosen [Tyler et al., 2009; Becquart et al., 2026]. Implementation and applied research on ICS, however, have historically been limited to R packages (ICS, ICSOutlier, ICSClust), impeding seamless integration with modern Python-based machine learning workflows.

ICSpyLab Package Capabilities

ICSpyLab is the first dedicated Python package for ICS, consolidating methodologies scattered across the R ecosystem into a unified framework. The package provides a scikit-learn-compatible API for streamlined workflow integration, supporting:

  • Multiple scatter matrix families: Classical covariance, Minimum Covariance Determinant (MCD), Tukeyโ€™s biweight, fourth-order moments, pairwise scatter estimates, and others.
  • ICS computation algorithms: Standard, whitening, QR-based, and eigenvector routines, covering all established approaches for joint diagonalization.
  • Component selection methods: Criteria include median, normal, and unimodality tests, allowing flexible pruning of invariant coordinates for downstream tasks.

The package architecture is modular and extensible. The Scatter class abstracts scatter matrix estimation, enabling users to plug in custom scatter estimators, and the ComponentSelect class generalizes component selection logic. Computational performance is addressed using NumPy, SciPy, and JIT compilation via Numba, especially for computationally expensive pairwise scatter matrices.

Experimental Validation: The RANDU Dataset

The efficacy of ICSpyLab is demonstrated on the RANDU dataset, which notoriously exhibits structure along parallel hyperplanes that are invisible to PCA. When ICS is applied with the covariance and tcovAxis scatter pair, the last invariant component unambiguously reveals this hyperplane structure, while principal components fail to do so. This experiment underscores ICSโ€™s ability to expose latent, non-Gaussian structure inaccessible to variance-based methods. Figure 1

Figure 1

Figure 1: Projections of the RANDU dataset: (a) invariant components computed via ICSpyLab revealing the hyperplane alignments, and (b) principal components.

The results indicate that ICS-based projections retain critical structure necessary for clustering and outlier detection, even in cases where traditional PCA is inadequate. Thus, ICS, as implemented in ICSpyLab, is not only theoretically motivated but empirically validated for dimension reduction in complex settings.

Practical and Theoretical Implications

The release of ICSpyLab constitutes a substantial advance in operationalizing ICS for the Python scientific community. The packageโ€™s extensible design, adherence to scikit-learn conventions, and comprehensive documentation ensure accessibility to both practitioners and methodologists. Empirical evidence and simulation studies [Alfons et al., 2024] show that ICS often outperforms PCA as a preprocessing step for clustering in the presence of mixtures or contaminated distributions, particularly when proper scatter pairs and selection criteria are employed.

From a theoretical perspective, the ICS framework enables the exploration of structures dictated by higher-order moments and generalized kurtosis, offering a richer analytic lens than variance alone. It is therefore positioned as a superior choice for unsupervised learning tasks involving non-elliptical data, subgroup detection, and outlier analysis.

Future Directions in ICS and ICSpyLab

Ongoing research in ICS is converging on several key areas:

  • Extension to functional and complex data: There are efforts to generalize ICS frameworks to functional and distributional settings, expanding its reach beyond finite-dimensional vectors [Mondon et al., 2025].
  • Component selection advancements: Improved unimodality tests and model-based selection criteria are under development to better capture non-linear and multimodal data structures [Becquart et al., 2026].
  • High-dimensional adaptations: New algorithms are being pursued for joint diagonalization in high-dimensional low-sample contexts, an area of active statistical research.

As an open-source package under the MIT license, ICSpyLabโ€™s architecture encourages collaboration and contributions, supporting rapid methodological innovation and broad adoption in machine learning and statistical analysis pipelines.

Conclusion

ICSpyLab delivers a comprehensive, extensible Python implementation of Invariant Coordinate Selection, facilitating both methodological research and practical application in clustering, anomaly detection, and dimension reduction tasks. Its empirical superiority in extracting meaningful structureโ€”especially in cases where PCA failsโ€”marks ICS as a critical tool for modern unsupervised learning. The packageโ€™s robust integration with the machine learning ecosystem, together with ongoing developments in scatter selection and component analysis, signal significant potential for further advances in high-dimensional data analysis and interpretability.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.