Table of Contents
Fetching ...

ClusTEK: A grid clustering algorithm augmented with diffusion imputation and origin-constrained connected-component analysis: Application to polymer crystallization

Elyar Tourani, Brian J. Edwards, Bamin Khomami

TL;DR

ClusTEK introduces a diffusion-enhanced grid clustering framework that combines Laplacian-diffusion imputation with origin-constrained connected-component analysis on a fixed grid to robustly recover cluster topology in large molecular simulations. A data-driven preprocessing stage selects grid resolution and a prediffusion threshold; diffusion fills sparse regions while OC-CCA preserves physical topology by forbidding spurious merges. The approach achieves atom-level fidelity in polymer crystallization datasets across scales ($9k$, $180k$, and $989k$ atoms) with substantial speedups, and outperforms standard grid- and density-based baselines in accuracy and robustness, without requiring the true number of clusters. The method is scalable to long MD trajectories and large systems, offering a practical foundation for future GPU-accelerated or parallel implementations and broader applications in spatially embedded clustering of simulation data.

Abstract

Grid clustering algorithms are valued for their efficiency in large-scale data analysis but face persistent limitations: parameter sensitivity, loss of structural detail at coarse resolutions, and misclassifications of edge or bridge cells at fine resolutions. Previous studies have addressed these challenges through adaptive grids, parameter tuning, or hybrid integration with other clustering methods, each of which offers limited robustness. This paper introduces a grid clustering framework that integrates Laplacian-kernel diffusion imputation and origin-constrained connected-component analysis (OC-CCA) on a uniform grid to reconstruct the cluster topology with high accuracy and computational efficiency. During grid construction, an automated preprocessing stage provides data-driven estimates of cell size and density thresholds. The diffusion step then mitigates sparsity and reconstructs missing edge cells without over-smoothing physical gradients, while OC-CCA constrains component growth to physically consistent origins, reducing false merges across narrow gaps. Operating on a fixed-resolution grid with spatial indexing ensures the scaling of O(nlog n). Experiments on synthetic benchmarks and polymer simulation datasets demonstrate that the method correctly manages edges, preserves cluster topology, and avoids spurious connections. Benchmarking on polymer systems across scales (9k, 180k, and 989k atoms) shows that optimal preprocessing, combined with diffusion-based clustering, reproduces atomic-level accuracy and captures physically meaningful morphologies while delivering accelerated computation.

ClusTEK: A grid clustering algorithm augmented with diffusion imputation and origin-constrained connected-component analysis: Application to polymer crystallization

TL;DR

ClusTEK introduces a diffusion-enhanced grid clustering framework that combines Laplacian-diffusion imputation with origin-constrained connected-component analysis on a fixed grid to robustly recover cluster topology in large molecular simulations. A data-driven preprocessing stage selects grid resolution and a prediffusion threshold; diffusion fills sparse regions while OC-CCA preserves physical topology by forbidding spurious merges. The approach achieves atom-level fidelity in polymer crystallization datasets across scales (, , and atoms) with substantial speedups, and outperforms standard grid- and density-based baselines in accuracy and robustness, without requiring the true number of clusters. The method is scalable to long MD trajectories and large systems, offering a practical foundation for future GPU-accelerated or parallel implementations and broader applications in spatially embedded clustering of simulation data.

Abstract

Grid clustering algorithms are valued for their efficiency in large-scale data analysis but face persistent limitations: parameter sensitivity, loss of structural detail at coarse resolutions, and misclassifications of edge or bridge cells at fine resolutions. Previous studies have addressed these challenges through adaptive grids, parameter tuning, or hybrid integration with other clustering methods, each of which offers limited robustness. This paper introduces a grid clustering framework that integrates Laplacian-kernel diffusion imputation and origin-constrained connected-component analysis (OC-CCA) on a uniform grid to reconstruct the cluster topology with high accuracy and computational efficiency. During grid construction, an automated preprocessing stage provides data-driven estimates of cell size and density thresholds. The diffusion step then mitigates sparsity and reconstructs missing edge cells without over-smoothing physical gradients, while OC-CCA constrains component growth to physically consistent origins, reducing false merges across narrow gaps. Operating on a fixed-resolution grid with spatial indexing ensures the scaling of O(nlog n). Experiments on synthetic benchmarks and polymer simulation datasets demonstrate that the method correctly manages edges, preserves cluster topology, and avoids spurious connections. Benchmarking on polymer systems across scales (9k, 180k, and 989k atoms) shows that optimal preprocessing, combined with diffusion-based clustering, reproduces atomic-level accuracy and captures physically meaningful morphologies while delivering accelerated computation.

Paper Structure

This paper contains 48 sections, 10 equations, 11 figures, 9 tables, 1 algorithm.

Figures (11)

  • Figure 1: Conceptual illustration of the weighted diffusion imputation. Each dense cell (blue) propagates its normalized field value to its neighboring sparse cells (orange arrows) through the discrete Laplacian operator, while empty cells remain clamped at zero. The diffusion step reconstructs continuity across sparse regions prior to the selection threshold $C_{\mathrm{sel}}$ being applied.
  • Figure 2: Stage I overlays for the selected datasets. Grids represent the $(n_x, n_y)$ structure and each panel shows the grid configuration with the highest $Q$ score identified for that dataset (see Table \ref{['tab:stageI-final-used']}). Axes and ticks are omitted for clarity. All panels share identical spatial extents.
  • Figure 3: Visual comparison of diffusion and connectivity stages on three synthetic benchmarks. Each row corresponds to one dataset (Aggregation, R15, and s_set1), whereas columns show the clustering (a,d,g) before diffusion, (b,e,h) after diffusion with standard CCA, and (c,f,i) after diffusion with OC-CCA. Diffusion improves continuity across sparse regions, but standard CCA may spuriously merge nearby clusters through diffusion halos (highlighted by dashed red circles in panels b,e,h). OC-CCA removes these artificial bridges and restores correct cluster topology and count.
  • Figure 4: Qualitative comparison on synthetic 2D benchmarks using each method’s best-performing hyperparameters (Tables \ref{['tab:aggregation-bench']}--\ref{['tab:s-set1-bench']}). Columns: (left) CLIQUE, (middle) ClusTEK, (right) DBSCAN. Rows: Aggregation, R15, and s_set1. ClusTEK preserves narrow intercluster gaps while maintaining continuity within clusters. Density-based methods may over-connect crowded regions or absorb boundary points due to sensitivity to hyperparameter tuning. CLIQUE displays strong resolution dependence. Axes are omitted for clarity; all panels share identical spatial extents.
  • Figure 5: Grid resolution benchmarking and effect of diffusion-based imputation for the 9k-atom quiescent system. (a) Percent volume difference between grid-based and atom-based cluster $\alpha$-shapes over a range of cell sizes and crystallinity thresholds $C_\mathrm{thr}$ for the non-imputed grid clustering. The red circle marks the near-optimal setting at $(C_\mathrm{thr}, \text{cell size}) = (0.4, 1.0)$. (b) 3D comparison of atom-based cluster atoms (purple) and grid-based cluster atoms (blue) at the optimal setting. The red-circled region highlights points consistently identified in the atom-based cluster but missed by the grid-based method. (c) Cross-sectional $x$--$z$ slice through the red-circled region. Atom-based points are shown as squares, grid-based points as circles, and diffusion-imputed points as triangles. Orange surfaces represent the local $\alpha$-shape polygon, and black crosses mark the slice vertices. (d) Volume-difference heatmap over the diffusion hyperparameter space $(\beta, n_{\mathrm{iter}})$ using the optimal grid resolution from panel (a). The error remains low across a broad range of parameters, indicating robust imputation. (e) 3D comparison of atom-based (purple) and diffusion-enhanced grid-based (green) cluster atoms. The previously missed region is now recovered by imputation. (f) Wall-clock runtime (blue curves, left axis) and peak Python memory usage (red curves, right axis) for grid-based clustering at $C_\mathrm{thr} = 0.4$ across cell sizes. Solid lines with circular/square markers show the non-imputed grid runs, dotted lines with triangular/star markers show diffusion-enhanced grid runs, and dashed horizontal lines show the atom-based reference values.
  • ...and 6 more figures