Internet-scale Topic Modeling using Large Language Models
Loading...
URL
Journal Title
Journal ISSN
Volume Title
Perustieteiden korkeakoulu |
Master's thesis
Unless otherwise stated, all rights belong to the author. You may download, display and print this publication for Your own personal use. Commercial use is prohibited.
Authors
Date
2024-05-20
Department
Major/Subject
Machine Learning, Data Science and Artificial Intelligence
Mcode
SCI3044
Degree programme
Master’s Programme in Computer, Communication and Information Sciences
Language
en
Pages
80 + 5
Series
Abstract
Topic models attempt to uncover latent themes underlying a corpus. Traditionally, topics have consisted of n-grams selected from a set of training documents. However, these topic representations are often overly restrictive in the domain of internet data. Contemporary topic models also face significant challenges with short documents, multilinguality, noisiness and topic specificity, especially when the breadth of topics increases. These challenges, among others, make previous models nonviable for the task of truly generic topic modeling. This thesis presents Topic Large Language Model (TLLM), a 7 billion parameter Large Language Model (LLM) that has been fine-tuned for topic modeling. The dataset used for training TLLM is a mixture of manual labeling and knowledge distillation from a larger LLM. Combined with the training procedure, this results in a model that is a general expert instead of a narrow specialist. Due to the usage of a LLM, the model is inherently multilingual and exhibits levels of general knowledge not present in prior approaches. TLLM consistently produces less unique topics when compared to its nearest counterparts while remaining accurate. This makes it more effective for analyzing large datasets and demonstrates the model's capabilities at separating important pieces of information from irrelevant ones. Our human evaluation shows that TLLM outperforms GPT-3.5-turbo both with and without prompt engineering. In the same evaluation, TLLM is approximately tied with a model 10 times its size, while producing the least failures out of all the models tested. We show that topic modeling of universal themes is possible with both general instruction following LLMs and LLMs trained for topic modeling. However, TLLM greatly improves on other LLMs in terms of predictability, topic granularity and computational efficiency, making it the first model capable of internet-scale topic modeling. As far as the authors are aware, this is the first work to fine-tune LLMs for the task of topic modeling.Aihemallit analysoivat luonnollisen kielen latentteja aiheita. Perinteisesti näitä aiheita ovat edustaneet koulutusdokumenteista valikoidut n-grammit. Internet-dataa käsiteltäessä tämä aiheiden määritelmä on kuitenkin usein liian rajoittava. Nykyiset aihemallit kohtaavat myös merkittäviä haasteita lyhyiden, monikielisten ja epäformaalien dokumenttien kanssa, jonka lisäksi niiden aiheiden täsmällisyyttä on vaikea hallita aiheiden määrän kasvaessa. Nämä haasteet, yhdessä muiden kanssa, tekevät nykyisistä lähestymistavoista riittämättömiä aidosti geneeriseen aihemallinnukseen. Tämä työ esittelee TLLM:n (Topic Large Language Model), seitsemästä miljardista parametrista koostuvan suuren kielimallin joka on koulutettu aihemallinnukseen. TLLM:n koulutusdatan luomisessa on yhdistetty suuremman kielimallin osaamista ja manuaalista annotointia. Yhdistettynä koulutusprosessiin, tuloksena on geneerinen asiantuntija perinteisen, kapean spesialistin sijaan. Suuren kielimallin käytön ansiosta malli on luonnostaan monikielinen ja yleistiedoiltaan huomattavasti aikaisempia malleja edistyneempi. TLLM tuottaa johdonmukaisesti vähiten uniikkeja aiheita verrattuna sen lähimpiin vastineisiin, samalla ylläpitäen aiheiden oikeellisuuden. Tämä helpottaa suurten datamassojen analysoimista ja tarjoaa todisteita siitä, että TLLM kykenee erottelemaan dokumenttien tärkeät yksityiskohdat tarpeettomista. Ihmisevaluaatiomme osoittaa, että TLLM menestyy paremmin kuin GPT-3.5-turbo sekä normaalilla että optimoidulla kehotteella. Samassa evaluaatiossa TLLM on pisteiltään keskimäärin tasoissa itseään kymmenen kertaa suuremman mallin kanssa, samalla tuottaen vähiten suoranaisia epäonnistumisia kaikista koestetuista malleista. Osoitamme, että yleismaailmallisten aiheiden mallinnus on mahdollista sekä yleispätevillä että tarkoitukseen koulutetuilla kielimalleilla. TLLM on kuitenkin muihin kielimalleihin verrattuna huomattavasti ennustettavampi, nopeampi ja tuottaa helpommin analysoitavia aiheita. Tämä tekee siitä ensimmäisen mallin, joka kykenee internetin mittakaavassa toteutettavaan aihemallinnukseen. Kirjoittajien parhaan tietämyksen mukaan tämä on ensimmäinen tutkimus, joka hienosäätää kielimalleja aihemallinnukseen.Description
Supervisor
Marttinen, PekkaThesis advisor
Toivola, JanneOksanen, Kenneth
Keywords
natural language processing, topic modeling, large language models, fine-tuning, low-rank adaptation