Clustering keywords is an important Natural Language Processing task that can be adopted by several businesses since it helps to organize and group related keywords together. By clustering keywords, businesses can better understand the topics their customers are interested in. This thesis project provides a detailed comparison of two different approaches that might be used for performing this task and aims to investigate whether having the labels associated with the keywords improves the clusters obtained. The keywords are clustered using both supervised learning, training a neural network and applying community detection algorithms such as Louvain, and unsupervised learning algorithms, such as HDBSCAN and K-Means. The evaluation is mainly based on metrics like NMI and ARI. The results show that supervised learning can produce better clusters than unsupervised learning. By looking at the NMI score, the supervised learning approach composed by training a neural network with Margin Ranking Loss and applying Kruskal achieves a slightly better score of 0.771 against the 0.693 of the unsupervised learning approach proposed, but by looking at the ARI score, the difference is more relevant. HDBSCAN achieves a lower score of 0.112 compared to the supervised learning approach with the Margin Ranking Loss (0.296), meaning that the clusters formed by HDBSCAN may lack meaningful structure or exhibit randomness. According to the evaluation metrics, the study reveals that the supervised learning approach with the Margin Ranking Loss creates more accurate clusters than the unsupervised learning techniques, but training with a BCE loss function provides different results, obtaining that the unsupervised algorithms are better than this latter supervised learning approach.

Il clustering delle parole chiave è un'importante ramo di Natural Language Processing che può essere adottata da diverse aziende, poiché aiuta a organizzare e raggruppare diverse parole chiave. Il clustering delle parole chiave consente alle aziende di comprendere meglio gli argomenti a cui sono interessati i loro clienti. Questo progetto di tesi fornisce un confronto dettagliato di due diversi approcci che potrebbero essere utilizzati per svolgere questo compito e mira a indagare se la presenza di etichette associate alle parole chiave migliora i cluster ottenuti. Le parole chiave vengono raggruppate utilizzando sia supervised learning, addestrando una rete neurale e applicando algoritmi di community detection come Louvain, sia algoritmi di unsupervised learning, come HDBSCAN e K-Means. La valutazione si basa principalmente su metriche come NMI e ARI. I risultati mostrano che il supervised learning può produrre cluster migliori rispetto all'unsupervised learning. Osservando il punteggio NMI, l'approccio di supervised learning composto dal training di una rete neurale con Margin Ranking Loss e l'applicazione di Kruskal raggiunge un punteggio leggermente migliore di 0,771 contro lo 0,693 dell'approccio di unsupervised learning proposto, ma osservando il punteggio ARI, la differenza è più rilevante. HDBSCAN ottiene un punteggio inferiore di 0,112 rispetto all'approccio di supervised learning con Margin Ranking Loss (0,296), il che significa che i cluster formati da HDBSCAN potrebbero mancare di una struttura significativa o presentare una certa casualità. In base alle metriche di valutazione, lo studio rivela che l'approccio di supervised learning con Margin Ranking Loss crea cluster più accurati rispetto alle tecniche di unsupervised learning, ma l'addestramento con BCE come loss function fornisce risultati diversi, ottenendo che gli algoritmi unsupervised sono migliori di quest'ultimo approccio di supervised learning.

Advancing Keyword Clustering Techniques: A Comparative Exploration of Supervised and Unsupervised Methods

CALIÓ, FILIPPO
2022/2023

Abstract

Clustering keywords is an important Natural Language Processing task that can be adopted by several businesses since it helps to organize and group related keywords together. By clustering keywords, businesses can better understand the topics their customers are interested in. This thesis project provides a detailed comparison of two different approaches that might be used for performing this task and aims to investigate whether having the labels associated with the keywords improves the clusters obtained. The keywords are clustered using both supervised learning, training a neural network and applying community detection algorithms such as Louvain, and unsupervised learning algorithms, such as HDBSCAN and K-Means. The evaluation is mainly based on metrics like NMI and ARI. The results show that supervised learning can produce better clusters than unsupervised learning. By looking at the NMI score, the supervised learning approach composed by training a neural network with Margin Ranking Loss and applying Kruskal achieves a slightly better score of 0.771 against the 0.693 of the unsupervised learning approach proposed, but by looking at the ARI score, the difference is more relevant. HDBSCAN achieves a lower score of 0.112 compared to the supervised learning approach with the Margin Ranking Loss (0.296), meaning that the clusters formed by HDBSCAN may lack meaningful structure or exhibit randomness. According to the evaluation metrics, the study reveals that the supervised learning approach with the Margin Ranking Loss creates more accurate clusters than the unsupervised learning techniques, but training with a BCE loss function provides different results, obtaining that the unsupervised algorithms are better than this latter supervised learning approach.
ING - Scuola di Ingegneria Industriale e dell'Informazione
5-ott-2023
2022/2023
Il clustering delle parole chiave è un'importante ramo di Natural Language Processing che può essere adottata da diverse aziende, poiché aiuta a organizzare e raggruppare diverse parole chiave. Il clustering delle parole chiave consente alle aziende di comprendere meglio gli argomenti a cui sono interessati i loro clienti. Questo progetto di tesi fornisce un confronto dettagliato di due diversi approcci che potrebbero essere utilizzati per svolgere questo compito e mira a indagare se la presenza di etichette associate alle parole chiave migliora i cluster ottenuti. Le parole chiave vengono raggruppate utilizzando sia supervised learning, addestrando una rete neurale e applicando algoritmi di community detection come Louvain, sia algoritmi di unsupervised learning, come HDBSCAN e K-Means. La valutazione si basa principalmente su metriche come NMI e ARI. I risultati mostrano che il supervised learning può produrre cluster migliori rispetto all'unsupervised learning. Osservando il punteggio NMI, l'approccio di supervised learning composto dal training di una rete neurale con Margin Ranking Loss e l'applicazione di Kruskal raggiunge un punteggio leggermente migliore di 0,771 contro lo 0,693 dell'approccio di unsupervised learning proposto, ma osservando il punteggio ARI, la differenza è più rilevante. HDBSCAN ottiene un punteggio inferiore di 0,112 rispetto all'approccio di supervised learning con Margin Ranking Loss (0,296), il che significa che i cluster formati da HDBSCAN potrebbero mancare di una struttura significativa o presentare una certa casualità. In base alle metriche di valutazione, lo studio rivela che l'approccio di supervised learning con Margin Ranking Loss crea cluster più accurati rispetto alle tecniche di unsupervised learning, ma l'addestramento con BCE come loss function fornisce risultati diversi, ottenendo che gli algoritmi unsupervised sono migliori di quest'ultimo approccio di supervised learning.
File allegati
File Dimensione Formato  
POLIMI_Thesis_Filippo_Caliò.pdf

accessibile in internet per tutti

Dimensione 1.7 MB
Formato Adobe PDF
1.7 MB Adobe PDF Visualizza/Apri

I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/10589/209989