PolyClustX
A Unified Framework for Multi-View and Multimodal Representation Learning and Clustering from Feature Views to Attributed Graphs
Prepare data, compare algorithms, tune hyperparameters and visualize results through one Python API, command line or graphical interface. Work with one or many feature views, optional graphs and optional ground-truth labels.
Documentation · Models · Examples
Install
Python 3.10+ is required. Installation includes PyTorch, the interface and Optuna; Hugging Face datasets use ordinary HTTP downloads.
From PyPI:
python -m pip install polyclustx
Or install the repository:
git clone https://github.com/AbdelheqMokhtari/PolyClustX.git
cd PolyClustX
python -m pip install .
Choose how you want to work: Interface · Python · CLI.
1. Interactive interface
polyclustx-display
Open the printed address, normally http://localhost:8501.
If the launcher is not found, use python -m polyclustx.display.
Load a dataset, inspect its features/graphs, and compose named views. Prepare models, run comparisons or searches, visualize results and download reports from the independent pages. Variant controls appear only for datasets with alternate representations. Interface guide.
2. Python package
Compare two methods on two feature views of a small offline dataset:
from sklearn.datasets import load_wine
from sklearn.preprocessing import StandardScaler
from polyclustx.data import MultiViewDataset
from polyclustx.models import LMGEC, MultiViewKMeans
from polyclustx.metrics import clustering_accuracy, nmi_score
from polyclustx.experiment import Experiment
X, labels = load_wine(return_X_y=True) # small, offline example
X = StandardScaler().fit_transform(X)
data = MultiViewDataset([X[:, :6], X[:, 6:]], labels=labels, name="Wine")
results = Experiment(
datasets=data,
models=[
LMGEC(n_clusters=3, embedding_dim=3, max_iter=20, random_state=42),
MultiViewKMeans(n_clusters=3, random_state=42),
],
metrics={"ACC": clustering_accuracy, "NMI": nmi_score},
runs=3,
save_path="experiments/comparison",
).run()
run() prints a model-configuration table followed by a results table for each
dataset. No extra print is needed. Example result output:
Results — Wine
┌────────┬──────────────────┬────────────────────┐
│ Metric │ LMGEC │ MultiViewKMeans │
├────────┼──────────────────┼────────────────────┤
│ ACC │ 0.9551 (±0.0000) │ 0.9663 (±0.0000) * │
│ NMI │ 0.8352 (±0.0000) │ 0.8770 (±0.0000) * │
│ Alphas │ [0.481, 0.519] │ │
│ Time │ 0.03s │ 0.02s │
└────────┴──────────────────┴────────────────────┘
Values are means and standard deviations over three runs; * marks the best
mean. Timing and numerical results can vary between environments. Tables adapt
to terminal width and remain scrollable in notebooks. The JSON/CSV reports are
saved separately; to download one bundle:
results.export("experiments/comparison.zip")
Use load_data("acm") instead of constructing data to work with a catalog
dataset. For several datasets, pass datasets={"Study A": data_a, "Study B": data_b};
prepare estimators with the K needed for your study.
For a learned embedding and a plot, fit a model directly:
from polyclustx.visualization import plot_clusters
model = data.fit(LMGEC(n_clusters=3, embedding_dim=3, random_state=42))
plot_clusters(model.embedding_, model.labels_, method="pca")
3. Command line
polyclustx models
polyclustx datasets
lmgec --help
lmgec acm --embedding-dim 8 --runs 3
scm acm --embedding-dim 16 --max-iter 50
idec acm --hidden-dims '128,64' --pretrain-epochs 20
Each method has its own command and parameter help. Use --variant for a dataset
variant, --clusters to override K, and --output to select the report directory.
Without an explicit K, labeled datasets use their number of reference classes.
Search candidates or continuous ranges:
lmgec acm --search grid --vary 'temperature=[0.5,1,2]' --objective nmi
lmgec acm --search optuna --vary 'temperature={"low":0.1,"high":5.0}' --trials 10
multiview-kmeans acm --no-benchmark --clusters 3 --metrics silhouette db
Compare several methods and datasets in one report:
polyclustx experiment --datasets acm dblp --models lmgec scm --runs 3
polyclustx experiment --datasets acm --models lmgec scm --param lmgec.embedding_dim=8
polyclustx experiment --config examples/experiment_plan.yaml
The example plan keeps larger studies readable:
name configurations, set per-model parameters, choose datasets and specify repeats.
Dataset-specific default K is handled automatically. Short commands may conflict
with other installed tools; use a dedicated environment or polyclustx lmgec acm.
Interface: polyclustx-display is a standalone command.
See the CLI guide with complete examples.
Datasets
37 dataset families provide 66 MATLAB representation files. All download links are direct Hugging Face URLs: no extra download package or account is needed.
| Category | What the data contains |
|---|---|
| MVAGC | Same-modality attributes and one or more structural graphs |
| MVC | Several feature representations of the same modality; no graphs |
| MMC | Different modalities, such as images and text; no graphs |
| MMAGC | Multimodal node features and graph relationships |
Missing observations are independent of these categories. Simulate them with
load_data("acm", 0.2, random_state=42), or align your own views using sample IDs.
Different methods support different inputs; see the method table below.
Multi-view attributed graph clustering (MVAGC)
| Dataset | Samples / nodes | Classes | Stored feature matrices | Graphs | Download | Reference / background |
|---|---|---|---|---|---|---|
ACM |
3,025 | 3 | 1 | 2 | MAT | Reference |
Amazon_photos |
7,487 | 8 | 1 | 1 | MAT | Reference |
DBLP |
4,057 | 4 | 1 | 3 | MAT | Reference |
IMDB |
4,780 | 3 | 1 | 2 | MAT | Reference |
Wiki |
2,405 | 17 | 1 | 1 | MAT | Reference |
Multi-view clustering (MVC)
| Dataset | Samples / nodes | Classes | Stored feature matrices | Graphs | Download | Reference / background |
|---|---|---|---|---|---|---|
100leaves |
1,600 | 100 | 3 | 0 | MAT | Reference |
3sources |
169 | 6 | 3 | 0 | MAT | Reference |
aloi |
10,800 | 100 | 4 | 0 | MAT | Reference |
bbcsport |
544 | 5 | 2 | 0 | MAT | Reference |
caltech101-7 |
1,474 | 7 | 6 | 0 | MAT | Reference |
handwritten |
2,000 | 10 | 6 | 0 | MAT | Reference |
mnist-10k |
10,000 | 10 | 3 | 0 | MAT | Reference |
mnist-4 |
4,000 | 4 | 3 | 0 | MAT | Reference |
msrc-v5 |
210 | 7 | 5 | 0 | MAT | Reference |
outdoorscence |
2,688 | 8 | 4 | 0 | MAT | Reference |
proteinfold |
694 | 27 | 12 | 0 | MAT | Reference |
reuters-1200 |
1,200 | 6 | 5 | 0 | MAT | Reference |
reuters-1500 |
1,500 | 6 | 5 | 0 | MAT | Reference |
uci |
2,000 | 10 | 3 | 0 | MAT | Reference |
webkb |
1,051 | 2 | 2 | 0 | MAT | Reference |
yale |
165 | 15 | 3 | 0 | MAT | Reference |
Multimodal clustering (MMC)
| Dataset | Samples / nodes | Classes | Stored feature matrices | Graphs | Download | Reference / background |
|---|---|---|---|---|---|---|
coco-all |
23,189 | 43 | 2 | 0 | MAT | Reference |
coco-cross |
7,429 | 10 | 2 | 0 | MAT | Reference |
esp-game |
11,032 | 7 | 2 | 0 | MAT | Reference |
iapr-tc12 |
7,855 | 6 | 2 | 0 | MAT | Reference |
mirflickr |
12,154 | 6 | 2 | 0 | MAT | Reference |
nus-wide |
20,000 | 8 | 2 | 0 | MAT | Reference |
pascal |
1,000 | 20 | 2 | 0 | MAT | Reference |
wikipedia-test |
693 | 10 | 2 | 0 | MAT | Reference |
Multimodal attributed graph clustering (MMAGC)
| Dataset | Samples / nodes | Classes | Stored feature matrices | Graphs | Download | Reference / background |
|---|---|---|---|---|---|---|
Arts |
58,487 | 11 | 2 | 1 | MAT | Reference |
grocery |
84,379 | 20 | 2 | 1 | MAT | Reference |
grocery-S |
17,074 | 20 | 2 | 1 | MAT | Reference |
movies |
16,672 | 20 | 2 | 1 | MAT | Reference |
photo |
36,731 | 12 | 2 | 1 | MAT | Reference |
reddit |
99,638 | 50 | 2 | 1 | MAT | Reference |
reddit-s |
15,894 | 20 | 2 | 1 | MAT | Reference |
toys |
20,695 | 18 | 2 | 1 | MAT | Reference |
Alternate feature representations
Variants reuse the same samples with different encoders, rather than adding
new families. Select one with load_data("pascal", variant="clip").
Grocery-S and Reddit-S are separate smaller datasets, each with its own variants.
| Dataset family | Additional representations: download and stored image/text widths |
|---|---|
Arts |
clip (768/768) |
coco-all |
clip (512/512) · resnet_minilm (2048/384) · vit_minilm (768/384) · vit_sbert (768/768) |
coco-cross |
clip (512/512) · resnet_minilm (2048/384) · vit_minilm (768/384) · vit_sbert (768/768) |
grocery |
clip (768/768) |
grocery-S |
clip (768/768) · clip_minilm (512/384) · resnet_clip (2048/512) · resnet_minilm (2048/384) |
movies |
clip (768/768) · clip_minilm (512/384) · resnet_clip (2048/512) · resnet_minilm (2048/384) |
pascal |
clip (512/512) · resnet_minilm (2048/384) · vit_minilm (768/384) · vit_sbert (768/768) |
photo |
clip (768/768) |
reddit |
clip (768/768) |
reddit-s |
clip (768/768) |
toys |
clip (768/768) · clip_minilm (512/384) · resnet_clip (2048/512) · resnet_minilm (2048/384) |
Pascal and COCO default to ResNet + Doc2Vec (2048/300 columns).
MMAGC defaults to CLIP-ViT + Gemma-7B (768/3072 columns).
ESP-Game, IAPR-TC12, MIRFlickr and NUS-WIDE have VGG-16/BERT source
representations but store processed 100/100-column views in the supplied MAT files.
Actual shapes are always available in data.feature_dims and the interface.
Photo/Arts origins and Grocery-S subset construction remain undocumented;
reference links provide background rather than verified provenance for every processed artifact.
See dataset descriptions, graph meanings and all variants. If an upload is still pending, its loader reports the unavailable file; the same download link becomes usable once published.
Load data and choose views
from polyclustx.data import load_data, load_mat
data = load_data("acm", views={
"Co-authorship": ("X1_features", "A1_PAP"),
"Shared subjects": ("X1_features", "A2_PLP"),
"Both relations": ("X1_features", ["A1_PAP", "A2_PLP"]),
"Keywords only": "X1_features",
})
# The same feature is reused; each view has the graphs you selected.
captions = load_data("pascal", variant="clip")
my_data = load_mat("my_data.mat") # recognizes X*, A* and labels
One named entry creates a single view; several graphs in one entry are fused at fitting/preparation time. Source files and previous experiment results stay unchanged. Loading and composition guide.
Available methods
Graphs ✓ means the method uses supplied adjacency matrices. Missing views ✓ means native support for an observation mask.
| Category | Method / command | Graphs | Missing views |
|---|---|---|---|
| Graph-aware | LMGEC / lmgec |
✓ | — |
| Graph-aware | DGF / dgf |
✓ | — |
| Graph-aware | SGLA / sgla |
✓ | — |
| Feature-based | MultiViewKMeans / multiview-kmeans |
— | — |
| Feature-based | MultiViewSpectralClustering / multiview-spectral |
— | — |
| Feature-based | G-CoMVKM / g-comvkm |
— | — |
| Feature-based | IDEC / idec |
— | — |
| Feature-based | CONAN / conan |
— | — |
| Feature-based | SCM / scm |
— | — |
| Feature-based | MFLVC / mflvc |
— | — |
| Feature-based | UMC / umc |
— | — |
| Incomplete-view | COMPLETER / completer |
— | ✓ |
| Incomplete-view | DCP / dcp |
— | ✓ |
Capabilities differ by method. Some single-view and multi-view cases are framework adaptations; UMC uses supplied features without pretrained encoders. See algorithm details, assumptions and references. These implementations do not claim to reproduce the papers' benchmark scores.
Explore and visualize
The interface provides dataset preparation, named models, repeated experiments, hyperparameter search, visualizations and JSON/CSV/ZIP exports. Labels enable benchmark metrics; without labels, use internal metrics. Interface guide.
The notebooks are unexecuted tutorials for you to run. Start with the end-to-end study to compare methods on Iris and Wine, add graphs, visualize embeddings and losses, search hyperparameters and export results.
Documentation
Browse the documentation, start with the worked examples, or follow the interactive interface guide.
Research affiliations
Centre Borelli · Université Paris Cité. Institutional marks remain separate from PolyClustX and do not imply endorsement.
References
Cite the original papers when using these methods in research. Reference code links identify the implementations that informed the framework adaptations.
| Method | Paper | Reference implementation |
|---|---|---|
| LMGEC | Fettal et al., WSDM 2023 | Code |
| DGF | Zheng et al., Dual Graph Filtering | Code |
| SGLA | Li et al., ICDE 2025 | Code |
| MultiViewKMeans | Bickel & Scheffer, ICDM 2004 | Code |
| MultiViewSpectralClustering | Kumar & Daumé, ICML 2011 | Code |
| G-CoMVKM | Sinaga & Yang, Electronics 2025 | Code |
| IDEC | Guo et al., IJCAI 2017 | Code |
| CONAN | Ke et al., BigData 2021 | Code |
| SCM | Luo et al., IJCAI 2024 | Code |
| MFLVC | Xu et al., CVPR 2022 | Code |
| UMC | Zhang et al., ACL 2024 | Code |
| COMPLETER | Lin et al., CVPR 2021 | Code |
| DCP | Lin et al., TPAMI | Code |
License
The software license and third-party notices are in LICENSE. Institutional logos are not covered by the software's MIT license. Cite the original algorithm papers when publishing results.
Metadata
Release files for polyclustx 1.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| polyclustx-1.4.2.tar.gz | 747.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| polyclustx-1.4.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.4 MB
Release files / polyclustx-1.4.2.tar.gz
| Download URL | polyclustx-1.4.2.tar.gz |
|---|---|
| Size | 747.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e09c07a7384df0ac4f35036d998fc68460283a35c7fec8373c2c1af9ea94a575
|
|
BLAKE2b-256 checksum How to use checksums |
ce7e645652555842c2fc05b54e40a93a3e9d75a508062e61275394bf035f6ecf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.
Transparency logRelease files / polyclustx-1.4.2-py3-none-any.whl
| Download URL | polyclustx-1.4.2-py3-none-any.whl |
|---|---|
| Size | 667.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb628e3b029a0ef53a55862b777489fe68416044661b3b19f9351cf9a7ff165a
|
|
BLAKE2b-256 checksum How to use checksums |
8ed1e9cba6520f70d97302d2024e95426a004d3c4547092c63ada6aa500713ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.
Transparency log