S ocial V is TUM : An Interactive Visualization Toolkit for Correlated Neural Topic Models on Social Media Opinion Mining (2021)

Abstract: Recent research in opinion mining proposed word embedding-based topic modeling methods that provide superior coherence compared to traditional topic modeling. In this paper, we demonstrate how these methods can be used to display correlated topic models on social media texts using SocialVisTUM, our proposed interactive visualization toolkit. It displays a graph with topics as nodes and their correlations as edges. Further details are displayed interactively to support the exploration of large text collections, e.g., representative words and sentences of topics, topic and sentiment distributions, hierarchical topic clustering, and customizable, predefined topic labels. The toolkit optimizes automatically on custom data for optimal coherence. We show a working instance of the toolkit on data crawled from English social media discussions about organic food consumption. The visualization confirms findings of a qualitative consumer research study. SocialVisTUM and its training procedures are accessible online.

## introduction web sources, such as social networks, internet forums, and customer reviews from online shops, provide large amounts of unstructured text data. along with the steady development of new platforms and the increasing number of internet users, the interest in methods that automatically extract the expressed opinions along with the corresponding topics and sentiments in text data has increased in recent years. scholars and organizations from different fields can utilize such methods to identify patterns and generate new insights. examples are opinion researchers investigating current opinions on political and societal issues, consumer researchers interested in figure 1 : socialvistum applied to our use case organic food -the topics, their occurrence (in brackets) and respective correlations. while these practical requirements are important for domain experts, modern opinion mining approaches target specific machine learning objectives. recently, there is a trend towards unsupervised neural methods for opinion target detection. attention-based aspect extraction (abae) enables clustering of short review texts with significantly higher coherence as traditional lda-based topic modeling, and it gives 70% f1 score for classification @xcite . this is improved recently @xcite @xcite , which underlines the recent impact and potential of related techniques. however, these have not been utilized for visualizations based on correlated topic modeling @xcite , where all pairs of topics "are" analyzed to determine if two topics generally tend to occur in the same texts of a given dataset. thus, the similarity between topics can be defined. this is successfully used to connect topics (nodes) among each other based on their correlations (edges) leading to more abstract and more meaningful meta topics (graph-clusters) which additionally improves topic coherence. consequentially, these meta topics, e.g., company-related events or research subdisciplines @xcite , can be successfully identified by graphbased visualization techniques. however, there is a lack of related prototypes on texts discussing consumption related issues in product reviews or social media. to the best of our knowledge, there is also no related integration of sentiment analysis into a system available for potential end users, i.e., domain experts. as according text data from customers is available on a large scale in social media, this can be considered as a shortcoming in the field. to address all denoted issues, we propose the socialvistum toolkit, a new visualization and labeling tool to give users a comprehensible overview of the topics discussed in social media texts. it integrates a neural method for unsupervised sentence and comment clustering based on word vectors and attention. we denote the respective clusters as topics hereafter. in addition, we provide a graphbased visualization showing the topics as labeled nodes and the correlation between them as edges. a force-directed graph layout maintains readability even while many relevant topics and topic relations are displayed. @xcite in our interactive graphical user interface, the number of topics displayed and the correlation threshold required to display a connection between two topics can be dynamically adjusted. further, contextual topic information is provided, such as the number of respective topic occurrences in the social media texts as node diameter, the correlation between the topic occurrences as edge width, example sentences from the data for each topic, a list of representative words for each topic, and the regarding sentiment distribution of a topic. it is a common practice to represent topics merely by word lists @xcite , which tend to be insufficient to comprehensively express a topic on our given dataset. @xcite to avoid manual labeling and to give users an immediate impression of each topic, topic labels are generated automatically based on a custom algorithm utilizing the most common wordnet hypernym in a topic's top words. furthermore, we find that topic hypernym statistics can serve as a metric for automatic hyperparameter optimization, which in our case gives practical advantages over widely used coherence scoring metrics. in addition to a more detailed description of our socialvistum toolkit, we show the results of a case study based on social media texts from online commenters debating about organic food consumption. we demonstrate that the correlated topics give a meaningful graph representation of the social media discussions supporting the understanding of the concerns of consumers. in this regard, we also show how the combined illustration of different types of relevant topic and sentiment information and automatic labeling of clusters are a contribution. ## related work correlated topic models were introduced 2006 @xcite to improve topic coherence and to provide graph visualizations based on topics as nodes and their correlations as edges. this shows potential to improve text mining for the end user as "powerful means of exploring, characterizing, and summarizing large collections of unstructured text documents" @xcite . meta topics, such as research domains and their inter-disciplinary overlaps, can thus be described clearly, automatically, and empirically @xcite . these correlated topic models are applied for more sophisticated visualization approaches. top-icpanorama models technology-related topics from various text corpora, including newspaper articles, blogs, and tweets @xcite . here, the domain expert is given the option to interactively modify the matching result of the labeled topic graph. another topic visualization called topic similarity networks is particularly addressing the visualization of large document sets @xcite . while claiming good scalability regarding the number of documents, beneficial methods to achieve automatic topic labeling are successfully quantified. topicatlas provides a graphical user interface to explore text networks, such as hyperlinked webpages and academic citation networks. for manual mining purposes, topic models are generated and related to one another to facilitate manual navigation and finding of relevant documents @xcite . these examples show a steady, meaningful, and promising development regarding the visualization of correlated topic modeling, partially also applied to social media texts such as micro-blogs. however, these examples do not include sentiment analysis as means to conduct market research and quantify customer satisfaction in specific and not yet explored market domains. furthermore, the widely used latent dirichlet allocation (lda) technique tends to be incoherent on short texts, such as, product reviews or social media comments, and thus insufficient to detect opinion targets in an unsupervised manner @xcite . automatic topic coherence optimization can be seen as desireable for a topic modeling visualization toolkit such as socialvistum, which tries to minimize manual optimization efforts for nontechnical users. therefore, we refer to two widely used coherence definitions @xcite . firstly, word co-occurrence-based methods measure how often pairs of representative topic words co-occur in the training data set or in an external reference data set. in that regard, it has been shown that the evaluation methods umass, uci and npmi correlate with human judges @xcite @xcite @xcite and are considered to be a default metric for topic coherence. secondly, word embedding similarity based coherence scores are recently utilized as these are also based on word cooccurrence statistics @xcite and behave similar to npmi coherence scoring @xcite , resulting in high correlation with hu-man perception. these methodologies show the undesirable effect of no distinct local optimum when the hyperparameters of the models are changed, e.g., number of clusters or vocabulary size. on our data, these parameters increase together with the coherence scores, while the subjective performance, i.e., the human perception, actually decreases. we describe this effect and our solution in the case study section. ## clustering architecture the unsupervised neural network model called attention-based aspect extraction (abae) @xcite clusters sentences based on glove word embeddings @xcite and attention @xcite to focus on the most important words in a sentence. every sentence s is represented by a vector z s that is defined as the weighted average of all the word vectors of that sentence. the weights are attentions calculated based on the contribution of the respective words to the meaning of the sentence and the relevance to the topics. these topics are defined by the actual centroids. in their publication, the topics are mapped to aspect classes for unsupervised aspect extraction, which we do not do for our case. @xcite the topics are initialized as the resulting centroids of k-means clustering on the word embeddings of the corpus dictionary. these are then stacked as topic embedding matrix t. during training, abae calculates sentence reconstructions r s for each sentence. these are linear combinations of the topic embeddings from t and defined as topic inspection users can double-click a node to receive additional information about a topic, i.e., representative words and sentences, as shown in figure 5 on the left and right respectively. as representative words, the top 10 words are shown sorted by the distance of their embeddings to the selected topic centroid in ascending order. the representative sentences are the ones with the highest probability from p t for the given topic. during topic inspection mode, only nodes that are connected to the clicked node and the associated links are displayed. a double click on the same node brings back the whole graph again. ## conclusion in this paper, a case of the proposed socialvistum demonstrates the visualization of coherent topics on a given corpus of social media texts about organic food. the graph-based visualization with topics as nodes and topic correlations as edges reflects the topics and patterns found in a related qualitative content analysis @xcite . the presentation of additional topic information, such as word lists, representative sentences, topic importance, and meaningful predefined labels, provide a basis for the understanding and interpretation of a topic for domain experts. the integrated hyperparameter optimization automatically yields interpretable topics and helps tailoring the model to the given data set. for future work, we plan to evaluate the correlated topics on other corpora and in other use cases. in addition to pearson correlation, other correlations could improve the approach. we plan to integrate multi-lingual word features, such as bert @xcite , for cross-cultural comparisons.