GBSK (Granular-Ball SKeleton clustering) is a MATLAB implementation for scalable clustering on large-scale data. This repository packages the public code path, demo data, and reproduction entrypoints for the accepted TPAMI paper, including the main script and supplementary material.
- Open MATLAB R2021a or newer.
- Add the repository to the MATLAB path:
addpath(genpath('path_to_GBSK')); - Run one of the public demos:
algorithms/GBSK/demo1.mforPendigitsalgorithms/GBSK/demo2.mforMNISTalgorithms/GBSK/main_big.mforMNIST8M
Outputs are written to experiment outcomes/<dataset>/... under the repository root.
algorithms/GBSK/: unified GBSK / AGBSK entrypoints and shared MATLAB implementationdatasets/: small datasets and demo datasets bundled with the releasedemo/: lightweight public demo wrappers and evaluation helperexperiment_records/: historical run logs kept for reference
The public release focuses on the experiments explicitly described there:
- Visual demos:
SYN1,SYN2,SYN3,Twenty,Chainlink - Quality benchmarks:
S3,EngyTime,Twenty,Segmentation,Waveform,Pendigits - Large-scale benchmarks:
Pendigits,DryBean,MoCap,CoverType,3M2D5,MNIST,CIFAR-10,MNIST8M,AGC100M - Sensitivity analysis:
N-BaIoT,AGC100M,MNIST8M - Ablation study:
Pendigits,MNIST,N-BaIoT,MNIST8M,AGC100M
For very large datasets, the repository keeps instructions and code paths, but not the raw data blobs by default.
These datasets are already included under datasets/ and should be used first when reproducing the public demos and small-scale experiments:
3M2D5DryBeanMNISTMoCap Hand Postures(MoCapin the paper)PendigitsSYN1SYN2SYN3CoverTypebanana
The table below only lists links that are explicitly given in appendices.tex.
For large datasets, this README keeps the source link and usage note only; the raw data is not bundled by default.
- The MATLAB loader resolves files by dataset name and standard filenames such as
data.mat,data.txt, or<dataset_name>_data.h5. - For bundled datasets, the repository copy is the recommended default.
- For missing or very large datasets, use the appendix source links above and keep the downloaded files outside the repo if desired.
The MATLAB shared entrypoint is algorithms/GBSK/run_gbsk.m.
It accepts a data matrix and a config struct with:
datasetNameresultsRootknumSampleSetsalphamultiplierMseed
Default AGBSK settings use alpha = 1/sqrt(n) and M = 10*k.
Each run writes a folder with:
labels.txtaggRepBallCenters.txtkeyBallCenters.txtlog.txt
The log stores the seed, parameters, total runtime, and per-step runtimes.
A smoke test checks that the public entrypoints, dataset resolver, output writing, and metric reader work end to end on a small dataset.
For this repository, the recommended smoke-test set is:
algorithms/GBSK/demo1.monPendigitsalgorithms/GBSK/demo2.monMNISTalgorithms/GBSK/main.mon3M2D5- one competing baseline demo on the same small dataset, such as
algorithms/KMeansPlus/KMeansPlus.moralgorithms/FHC-LDP/main.mwhen its dataset is available
Pass criteria:
- the script runs without hardcoded-path edits
- result files are written under
experiment outcomes/ labels.txtcan be consumed by the evaluation helper- missing large datasets fail fast with a clear message instead of a silent fallback
To compute ACC / ARI / AMI from saved labels, run:
python demo/ClusteringQualityEvaluation.pyEdit the dataset name and label paths inside the script if you are evaluating a different dataset.
See reproduction_manifest.json for a machine-readable list of the paper’s main experiment groups.
@ARTICLE{11641755,
author={Chen, Yewang and Li, Junfeng and Xia, Shuyin and Lai, Qinghong and Gao, Xinbo and Wang, Guoyin and Cheng, Dongdong and Liu, Yi and Wang, Yi},
journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
title={GBSK: Skeleton Clustering via Granular-ball Computing and Multi-Sampling for Large-Scale Data},
year={2026},
volume={},
number={},
pages={1-13},
keywords={Skeleton;Algorithms;Educational institutions;Labeling;Machining;Timing;Conferences;Runtime;Accuracy;Computers;Granular-ball;Skeleton Clustering;Multiple Sampling;KDE},
doi={10.1109/TPAMI.2026.3719825}}- 论文正文以
./paper/GBSK main script.pdf为准。 - 运行
algorithms/GBSK/demo1.m或demo/demo1.m可直接看Pendigits示例。 - 大规模实验建议先准备对应数据,再运行
algorithms/GBSK/main_big.m。