# Streamlining Visual UI Design: Mining UI Design Patterns for Top App Bars
## 6 Discussion  
### Clustering Methods  
Early studies on UI representation learning [20; 23; 24; 25; 26] primarily relied on qualitative analyses to interpret their results. Some also used subjective validation methods, such as evaluating a limited number of retrieval outcomes in downstream tasks. These approaches make it difficult to objectively compare results across studies. More recently, [PERSON] et al. [27; 28] reported external evaluation metrics for clustering results in representation learning for activity (page) clustering. Our discussion will primarily compare our findings with their results.  
K-means effectively identifies clusters of similar TAB designs based on their vector representations and consistently outperforms other clustering models across most evaluation metrics. This is consistent with the findings of [PERSON] et al. [27], who demonstrated that K-means achieved significantly better clustering performance across multiple indicators. Its success can be attributed to its alignment with the Euclidean properties of vector representations, which influence its distance-based calculations. However, K-means has notable limitations, including sensitivity to the initial selection of centroids and a tendency to form spherical clusters [43].  
GMM, a soft clustering method, offers greater flexibility by accommodating complex cluster shapes and data distributions. In theory, GMM should perform comparably to K-means, as suggested by [PERSON] et al.'s findings [27]. However, in our results, while GMM achieved the highest Purity score among external evaluation metrics, its performance on the JC and F-1 score was significantly lower. This suggests that GMM may not be well-suited for our specific task. As [PERSON] et al. did not report JC or F-1 scores, it is unclear whether similar issues arose in their study. Furthermore, their representation model differs fundamentally from ours. They employed a hybrid approach combining visual and textual features derived from multiple autoencoders, whereas our model is based on an autoregressive text representation. This fundamental difference may account for the observed variations in performance.  
BIRCH and Spectral clustering methods might face challenges due to data bias and have shown mixed results. This does not mean that they are not suitable for mining the TAB. BIRCH demonstrates efficiency in memory usage and computational complexity, which enhances its suitability for extracting TAB design patterns from extensive datasets. Additionally, BIRCH can effectively manage noise and outliers, a crucial aspect in real-world data scenarios. Spectral clustering can uncover underlying structures in the data that may not be apparent in the original feature space, enabling the discovery of intricate design patterns.  
In summary, each clustering algorithm offers unique advantages and considerations, and the choice of algorithm depends on the specific characteristics of the data and the desired outcome of the pattern mining process. Future research should explore advanced and interpretable clustering methods for pattern mining in TAB designs. Advanced algorithms can handle complex data and uncover intricate patterns [44], while interpretable methods provide clearer insights into the clusters [45]. Combining these approaches can enhance the accuracy, depth, and understanding of pattern extraction.