Controlled Text Generation for Large Language Model with Dynamic Attribute Graphs
Fuente:
arXiv
Salvato in:
| Autori principali: | , , , , , , , |
|---|---|
| Natura: | Preprint |
| Pubblicazione: |
2024
|
| Soggetti: | |
| Accesso online: | |
| Tags: |
Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
|
| _version_ | 1866910458467844096 |
|---|---|
| author | Liang, Xun Wang, Hanyu Song, Shichao Hu, Mengting Wang, Xunzhi Li, Zhiyu Xiong, Feiyu Tang, Bo |
| author_facet | Liang, Xun Wang, Hanyu Song, Shichao Hu, Mengting Wang, Xunzhi Li, Zhiyu Xiong, Feiyu Tang, Bo |
| contents | Controlled Text Generation (CTG) aims to produce texts that exhibit specific desired attributes. In this study, we introduce a pluggable CTG framework for Large Language Models (LLMs) named Dynamic Attribute Graphs-based controlled text generation (DATG). This framework utilizes an attribute scorer to evaluate the attributes of sentences generated by LLMs and constructs dynamic attribute graphs. DATG modulates the occurrence of key attribute words and key anti-attribute words, achieving effective attribute control without compromising the original capabilities of the model. We conduct experiments across four datasets in two tasks: toxicity mitigation and sentiment transformation, employing five LLMs as foundational models. Our findings highlight a remarkable enhancement in control accuracy, achieving a peak improvement of 19.29% over baseline methods in the most favorable task across four datasets. Additionally, we observe a significant decrease in perplexity, markedly improving text fluency. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2402_11218 |
| institution | arXiv |
| publishDate | 2024 |
| record_format | arxiv |
| spellingShingle | Controlled Text Generation for Large Language Model with Dynamic Attribute Graphs Liang, Xun Wang, Hanyu Song, Shichao Hu, Mengting Wang, Xunzhi Li, Zhiyu Xiong, Feiyu Tang, Bo Computation and Language Controlled Text Generation (CTG) aims to produce texts that exhibit specific desired attributes. In this study, we introduce a pluggable CTG framework for Large Language Models (LLMs) named Dynamic Attribute Graphs-based controlled text generation (DATG). This framework utilizes an attribute scorer to evaluate the attributes of sentences generated by LLMs and constructs dynamic attribute graphs. DATG modulates the occurrence of key attribute words and key anti-attribute words, achieving effective attribute control without compromising the original capabilities of the model. We conduct experiments across four datasets in two tasks: toxicity mitigation and sentiment transformation, employing five LLMs as foundational models. Our findings highlight a remarkable enhancement in control accuracy, achieving a peak improvement of 19.29% over baseline methods in the most favorable task across four datasets. Additionally, we observe a significant decrease in perplexity, markedly improving text fluency. |
| title | Controlled Text Generation for Large Language Model with Dynamic Attribute Graphs |
| topic | Computation and Language |
| url | https://arxiv.org/abs/2402.11218 |