Add Batch a2274018-4abd-4ce1-82a7-8acb6249ea17 data
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +64 -0
- 2024/PAELLA_ Parameter-Efficient Lightweight Language-Agnostic Captioning Model/fd50ced0-acb3-442d-8d29-13b3ece4bcd9_content_list.json +0 -0
- 2024/PAELLA_ Parameter-Efficient Lightweight Language-Agnostic Captioning Model/fd50ced0-acb3-442d-8d29-13b3ece4bcd9_model.json +0 -0
- 2024/PAELLA_ Parameter-Efficient Lightweight Language-Agnostic Captioning Model/fd50ced0-acb3-442d-8d29-13b3ece4bcd9_origin.pdf +3 -0
- 2024/PAELLA_ Parameter-Efficient Lightweight Language-Agnostic Captioning Model/full.md +392 -0
- 2024/PAELLA_ Parameter-Efficient Lightweight Language-Agnostic Captioning Model/images.zip +3 -0
- 2024/PAELLA_ Parameter-Efficient Lightweight Language-Agnostic Captioning Model/layout.json +0 -0
- 2024/PEEB_ Part-based Image Classifiers with an Explainable and Editable Language Bottleneck/1ba00692-86a7-4b58-869f-16e7bb8017fa_content_list.json +0 -0
- 2024/PEEB_ Part-based Image Classifiers with an Explainable and Editable Language Bottleneck/1ba00692-86a7-4b58-869f-16e7bb8017fa_model.json +0 -0
- 2024/PEEB_ Part-based Image Classifiers with an Explainable and Editable Language Bottleneck/1ba00692-86a7-4b58-869f-16e7bb8017fa_origin.pdf +3 -0
- 2024/PEEB_ Part-based Image Classifiers with an Explainable and Editable Language Bottleneck/full.md +0 -0
- 2024/PEEB_ Part-based Image Classifiers with an Explainable and Editable Language Bottleneck/images.zip +3 -0
- 2024/PEEB_ Part-based Image Classifiers with an Explainable and Editable Language Bottleneck/layout.json +0 -0
- 2024/PRODIGy_ a PROfile-based DIalogue Generation dataset/0fe4edbf-ba8c-45c4-acca-cf1da700fa41_content_list.json +0 -0
- 2024/PRODIGy_ a PROfile-based DIalogue Generation dataset/0fe4edbf-ba8c-45c4-acca-cf1da700fa41_model.json +0 -0
- 2024/PRODIGy_ a PROfile-based DIalogue Generation dataset/0fe4edbf-ba8c-45c4-acca-cf1da700fa41_origin.pdf +3 -0
- 2024/PRODIGy_ a PROfile-based DIalogue Generation dataset/full.md +451 -0
- 2024/PRODIGy_ a PROfile-based DIalogue Generation dataset/images.zip +3 -0
- 2024/PRODIGy_ a PROfile-based DIalogue Generation dataset/layout.json +0 -0
- 2024/PersonaLLM_ Investigating the Ability of Large Language Models to Express Personality Traits/ee7e5113-42ec-413b-a673-b3a3d1db5d50_content_list.json +0 -0
- 2024/PersonaLLM_ Investigating the Ability of Large Language Models to Express Personality Traits/ee7e5113-42ec-413b-a673-b3a3d1db5d50_model.json +0 -0
- 2024/PersonaLLM_ Investigating the Ability of Large Language Models to Express Personality Traits/ee7e5113-42ec-413b-a673-b3a3d1db5d50_origin.pdf +3 -0
- 2024/PersonaLLM_ Investigating the Ability of Large Language Models to Express Personality Traits/full.md +593 -0
- 2024/PersonaLLM_ Investigating the Ability of Large Language Models to Express Personality Traits/images.zip +3 -0
- 2024/PersonaLLM_ Investigating the Ability of Large Language Models to Express Personality Traits/layout.json +0 -0
- 2024/Personalized Federated Learning for Text Classification with Gradient-Free Prompt Tuning/7c1a9b02-0857-4f3e-8e73-74fd15e4dff4_content_list.json +0 -0
- 2024/Personalized Federated Learning for Text Classification with Gradient-Free Prompt Tuning/7c1a9b02-0857-4f3e-8e73-74fd15e4dff4_model.json +0 -0
- 2024/Personalized Federated Learning for Text Classification with Gradient-Free Prompt Tuning/7c1a9b02-0857-4f3e-8e73-74fd15e4dff4_origin.pdf +3 -0
- 2024/Personalized Federated Learning for Text Classification with Gradient-Free Prompt Tuning/full.md +520 -0
- 2024/Personalized Federated Learning for Text Classification with Gradient-Free Prompt Tuning/images.zip +3 -0
- 2024/Personalized Federated Learning for Text Classification with Gradient-Free Prompt Tuning/layout.json +0 -0
- 2024/Planning and Editing What You Retrieve for Enhanced Tool Learning/8d8d80e4-468a-48ab-946e-0712d25e3540_content_list.json +2281 -0
- 2024/Planning and Editing What You Retrieve for Enhanced Tool Learning/8d8d80e4-468a-48ab-946e-0712d25e3540_model.json +0 -0
- 2024/Planning and Editing What You Retrieve for Enhanced Tool Learning/8d8d80e4-468a-48ab-946e-0712d25e3540_origin.pdf +3 -0
- 2024/Planning and Editing What You Retrieve for Enhanced Tool Learning/full.md +447 -0
- 2024/Planning and Editing What You Retrieve for Enhanced Tool Learning/images.zip +3 -0
- 2024/Planning and Editing What You Retrieve for Enhanced Tool Learning/layout.json +0 -0
- 2024/Plug-in Language Model_ Controlling Text Generation with a Simple Regression Model/e276efc4-71f5-478e-8c9c-6e7a9a8d6c39_content_list.json +0 -0
- 2024/Plug-in Language Model_ Controlling Text Generation with a Simple Regression Model/e276efc4-71f5-478e-8c9c-6e7a9a8d6c39_model.json +0 -0
- 2024/Plug-in Language Model_ Controlling Text Generation with a Simple Regression Model/e276efc4-71f5-478e-8c9c-6e7a9a8d6c39_origin.pdf +3 -0
- 2024/Plug-in Language Model_ Controlling Text Generation with a Simple Regression Model/full.md +400 -0
- 2024/Plug-in Language Model_ Controlling Text Generation with a Simple Regression Model/images.zip +3 -0
- 2024/Plug-in Language Model_ Controlling Text Generation with a Simple Regression Model/layout.json +0 -0
- 2024/PoLLMgraph_ Unraveling Hallucinations in Large Language Models via State Transition Dynamics/db1f57ed-599a-4380-b7bd-cee663c2e335_content_list.json +0 -0
- 2024/PoLLMgraph_ Unraveling Hallucinations in Large Language Models via State Transition Dynamics/db1f57ed-599a-4380-b7bd-cee663c2e335_model.json +0 -0
- 2024/PoLLMgraph_ Unraveling Hallucinations in Large Language Models via State Transition Dynamics/db1f57ed-599a-4380-b7bd-cee663c2e335_origin.pdf +3 -0
- 2024/PoLLMgraph_ Unraveling Hallucinations in Large Language Models via State Transition Dynamics/full.md +319 -0
- 2024/PoLLMgraph_ Unraveling Hallucinations in Large Language Models via State Transition Dynamics/images.zip +3 -0
- 2024/PoLLMgraph_ Unraveling Hallucinations in Large Language Models via State Transition Dynamics/layout.json +0 -0
- 2024/Probing the Category of Verbal Aspect in Transformer Language Models/f8d202eb-c47f-409f-870b-074684e65596_content_list.json +0 -0
.gitattributes
CHANGED
|
@@ -1445,3 +1445,67 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 1445 |
2024/On[[:space:]]the[[:space:]]Way[[:space:]]to[[:space:]]Gentle[[:space:]]AI[[:space:]]Counselor_[[:space:]]Politeness[[:space:]]Cause[[:space:]]Elicitation[[:space:]]and[[:space:]]Intensity[[:space:]]Tagging[[:space:]]in[[:space:]]Code-mixed[[:space:]]Hinglish[[:space:]]Conversations[[:space:]]for[[:space:]]Social[[:space:]]Good/1a644979-d342-4db3-a949-4f5d45ae6954_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1446 |
2024/On-the-Fly[[:space:]]Fusion[[:space:]]of[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]and[[:space:]]Machine[[:space:]]Translation/af55a2d0-ce0e-42ba-97a8-9806710659b5_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1447 |
2024/OpenFMNav_[[:space:]]Towards[[:space:]]Open-Set[[:space:]]Zero-Shot[[:space:]]Object[[:space:]]Navigation[[:space:]]via[[:space:]]Vision-Language[[:space:]]Foundation[[:space:]]Models/d4ee5c63-3e78-4cc3-afee-d7ebf99bd6f2_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1445 |
2024/On[[:space:]]the[[:space:]]Way[[:space:]]to[[:space:]]Gentle[[:space:]]AI[[:space:]]Counselor_[[:space:]]Politeness[[:space:]]Cause[[:space:]]Elicitation[[:space:]]and[[:space:]]Intensity[[:space:]]Tagging[[:space:]]in[[:space:]]Code-mixed[[:space:]]Hinglish[[:space:]]Conversations[[:space:]]for[[:space:]]Social[[:space:]]Good/1a644979-d342-4db3-a949-4f5d45ae6954_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1446 |
2024/On-the-Fly[[:space:]]Fusion[[:space:]]of[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]and[[:space:]]Machine[[:space:]]Translation/af55a2d0-ce0e-42ba-97a8-9806710659b5_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1447 |
2024/OpenFMNav_[[:space:]]Towards[[:space:]]Open-Set[[:space:]]Zero-Shot[[:space:]]Object[[:space:]]Navigation[[:space:]]via[[:space:]]Vision-Language[[:space:]]Foundation[[:space:]]Models/d4ee5c63-3e78-4cc3-afee-d7ebf99bd6f2_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1448 |
+
2024/PAELLA_[[:space:]]Parameter-Efficient[[:space:]]Lightweight[[:space:]]Language-Agnostic[[:space:]]Captioning[[:space:]]Model/fd50ced0-acb3-442d-8d29-13b3ece4bcd9_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1449 |
+
2024/PEEB_[[:space:]]Part-based[[:space:]]Image[[:space:]]Classifiers[[:space:]]with[[:space:]]an[[:space:]]Explainable[[:space:]]and[[:space:]]Editable[[:space:]]Language[[:space:]]Bottleneck/1ba00692-86a7-4b58-869f-16e7bb8017fa_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1450 |
+
2024/PRODIGy_[[:space:]]a[[:space:]]PROfile-based[[:space:]]DIalogue[[:space:]]Generation[[:space:]]dataset/0fe4edbf-ba8c-45c4-acca-cf1da700fa41_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1451 |
+
2024/PersonaLLM_[[:space:]]Investigating[[:space:]]the[[:space:]]Ability[[:space:]]of[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]to[[:space:]]Express[[:space:]]Personality[[:space:]]Traits/ee7e5113-42ec-413b-a673-b3a3d1db5d50_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1452 |
+
2024/Personalized[[:space:]]Federated[[:space:]]Learning[[:space:]]for[[:space:]]Text[[:space:]]Classification[[:space:]]with[[:space:]]Gradient-Free[[:space:]]Prompt[[:space:]]Tuning/7c1a9b02-0857-4f3e-8e73-74fd15e4dff4_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1453 |
+
2024/Planning[[:space:]]and[[:space:]]Editing[[:space:]]What[[:space:]]You[[:space:]]Retrieve[[:space:]]for[[:space:]]Enhanced[[:space:]]Tool[[:space:]]Learning/8d8d80e4-468a-48ab-946e-0712d25e3540_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1454 |
+
2024/Plug-in[[:space:]]Language[[:space:]]Model_[[:space:]]Controlling[[:space:]]Text[[:space:]]Generation[[:space:]]with[[:space:]]a[[:space:]]Simple[[:space:]]Regression[[:space:]]Model/e276efc4-71f5-478e-8c9c-6e7a9a8d6c39_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1455 |
+
2024/PoLLMgraph_[[:space:]]Unraveling[[:space:]]Hallucinations[[:space:]]in[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]via[[:space:]]State[[:space:]]Transition[[:space:]]Dynamics/db1f57ed-599a-4380-b7bd-cee663c2e335_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1456 |
+
2024/Probing[[:space:]]the[[:space:]]Category[[:space:]]of[[:space:]]Verbal[[:space:]]Aspect[[:space:]]in[[:space:]]Transformer[[:space:]]Language[[:space:]]Models/f8d202eb-c47f-409f-870b-074684e65596_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1457 |
+
2024/Product[[:space:]]Description[[:space:]]and[[:space:]]QA[[:space:]]Assisted[[:space:]]Self-Supervised[[:space:]]Opinion[[:space:]]Summarization/93db6e7e-4e81-4c0d-8f21-6d80090200d5_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1458 |
+
2024/Prompt[[:space:]]Space[[:space:]]Optimizing[[:space:]]Few-shot[[:space:]]Reasoning[[:space:]]Success[[:space:]]with[[:space:]]Large[[:space:]]Language[[:space:]]Models/845486dd-6ee5-46bf-ace2-3ca79802b0c4_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1459 |
+
2024/Prompting[[:space:]]Few-shot[[:space:]]Multi-hop[[:space:]]Question[[:space:]]Generation[[:space:]]via[[:space:]]Comprehending[[:space:]]Type-aware[[:space:]]Semantics/3c6e3aa6-474f-417c-9226-b91435c1dcce_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1460 |
+
2024/Prompting[[:space:]]Vision-Language[[:space:]]Models[[:space:]]For[[:space:]]Aspect-Controlled[[:space:]]Generation[[:space:]]of[[:space:]]Referring[[:space:]]Expressions/0f3189e0-3d8d-48ac-897f-6543b24c3b6f_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1461 |
+
2024/Pruning[[:space:]]as[[:space:]]a[[:space:]]Domain-specific[[:space:]]LLM[[:space:]]Extractor/75063279-6dc8-4653-a47e-97db2d701e32_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1462 |
+
2024/Psychometric[[:space:]]Predictive[[:space:]]Power[[:space:]]of[[:space:]]Large[[:space:]]Language[[:space:]]Models/4166e6ee-0220-4735-92a2-a6ffcf70f140_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1463 |
+
2024/Q-Tuning_[[:space:]]Queue-based[[:space:]]Prompt[[:space:]]Tuning[[:space:]]for[[:space:]]Lifelong[[:space:]]Few-shot[[:space:]]Language[[:space:]]Learning/b0d5c098-d9c3-46d9-87de-1b9743928eeb_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1464 |
+
2024/R-BASS[[:space:]]_[[:space:]]Relevance-aided[[:space:]]Block-wise[[:space:]]Adaptation[[:space:]]for[[:space:]]Speech[[:space:]]Summarization/8870f05a-573f-4574-926a-572572085c8d_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1465 |
+
2024/READ_[[:space:]]Improving[[:space:]]Relation[[:space:]]Extraction[[:space:]]from[[:space:]]an[[:space:]]ADversarial[[:space:]]Perspective/4d35761f-460b-4e19-9628-0bd297ddc613_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1466 |
+
2024/REMATCH_[[:space:]]Robust[[:space:]]and[[:space:]]Efficient[[:space:]]Matching[[:space:]]of[[:space:]]Local[[:space:]]Knowledge[[:space:]]Graphs[[:space:]]to[[:space:]]Improve[[:space:]]Structural[[:space:]]and[[:space:]]Semantic[[:space:]]Similarity/aa299d12-22de-4180-8faa-6b0b32e65b10_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1467 |
+
2024/RENOVI_[[:space:]]A[[:space:]]Benchmark[[:space:]]Towards[[:space:]]Remediating[[:space:]]Norm[[:space:]]Violations[[:space:]]in[[:space:]]Socio-Cultural[[:space:]]Conversations/d7825d67-7e14-4b9f-81e5-c05988a6ebd2_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1468 |
+
2024/REQUAL-LM_[[:space:]]Reliability[[:space:]]and[[:space:]]Equity[[:space:]]through[[:space:]]Aggregation[[:space:]]in[[:space:]]Large[[:space:]]Language[[:space:]]Models/2c7b9d06-216d-4e12-87d3-7e5f07facc08_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1469 |
+
2024/RS-DPO_[[:space:]]A[[:space:]]Hybrid[[:space:]]Rejection[[:space:]]Sampling[[:space:]]and[[:space:]]Direct[[:space:]]Preference[[:space:]]Optimization[[:space:]]Method[[:space:]]for[[:space:]]Alignment[[:space:]]of[[:space:]]Large[[:space:]]Language[[:space:]]Models/fb078650-d68f-4f38-9839-a5aa97a5a289_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1470 |
+
2024/Re-evaluating[[:space:]]the[[:space:]]Need[[:space:]]for[[:space:]]Visual[[:space:]]Signals[[:space:]]in[[:space:]]Unsupervised[[:space:]]Grammar[[:space:]]Induction/0b1344a0-ab81-454a-b17c-f8fe08408d89_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1471 |
+
2024/ReEval_[[:space:]]Automatic[[:space:]]Hallucination[[:space:]]Evaluation[[:space:]]for[[:space:]]Retrieval-Augmented[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]via[[:space:]]Transferable[[:space:]]Adversarial[[:space:]]Attacks/22804ada-10e1-4d00-b294-05468b123d7a_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1472 |
+
2024/Read[[:space:]]between[[:space:]]the[[:space:]]lines[[:space:]]-[[:space:]]Functionality[[:space:]]Extraction[[:space:]]From[[:space:]]READMEs/c3898274-a850-4ec7-a17d-58d62d4d9c32_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1473 |
+
2024/Reason[[:space:]]from[[:space:]]Fallacy_[[:space:]]Enhancing[[:space:]]Large[[:space:]]Language[[:space:]]Models’[[:space:]]Logical[[:space:]]Reasoning[[:space:]]through[[:space:]]Logical[[:space:]]Fallacy[[:space:]]Understanding/ef8543da-a456-4b93-a192-e2a03014a7b3_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1474 |
+
2024/RecMind_[[:space:]]Large[[:space:]]Language[[:space:]]Model[[:space:]]Powered[[:space:]]Agent[[:space:]]For[[:space:]]Recommendation/66a63104-cd27-4088-9457-31bbd10e038a_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1475 |
+
2024/Reinforcement[[:space:]]Learning[[:space:]]with[[:space:]]Token-level[[:space:]]Feedback[[:space:]]for[[:space:]]Controllable[[:space:]]Text[[:space:]]Generation/231dd6af-fc9d-48cb-8a22-d386b6deff3d_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1476 |
+
2024/Rethinking[[:space:]]Machine[[:space:]]Ethics[[:space:]]–[[:space:]]Can[[:space:]]LLMs[[:space:]]Perform[[:space:]]Moral[[:space:]]Reasoning[[:space:]]through[[:space:]]the[[:space:]]Lens[[:space:]]of[[:space:]]Moral[[:space:]]Theories_/58107a56-f152-417a-953c-cbbd2828eebd_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1477 |
+
2024/Retrieving[[:space:]]Examples[[:space:]]from[[:space:]]Memory[[:space:]]for[[:space:]]Retrieval[[:space:]]Augmented[[:space:]]Neural[[:space:]]Machine[[:space:]]Translation_[[:space:]]A[[:space:]]Systematic[[:space:]]Comparison/1a9635ef-d00f-4e04-a917-8a6a07bd4550_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1478 |
+
2024/Reverse[[:space:]]Chain_[[:space:]]A[[:space:]]Generic-Rule[[:space:]]for[[:space:]]LLMs[[:space:]]to[[:space:]]Master[[:space:]]Multi-API[[:space:]]Planning/2e0fc884-6c7a-4abd-bdf3-70be8ea6d47d_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1479 |
+
2024/RoDia_[[:space:]]A[[:space:]]New[[:space:]]Dataset[[:space:]]for[[:space:]]Romanian[[:space:]]Dialect[[:space:]]Identification[[:space:]]from[[:space:]]Speech/b949493e-cfa0-4569-bcbf-6e87a18931e0_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1480 |
+
2024/RobustSentEmbed_[[:space:]]Robust[[:space:]]Sentence[[:space:]]Embeddings[[:space:]]Using[[:space:]]Adversarial[[:space:]]Self-Supervised[[:space:]]Contrastive[[:space:]]Learning/787f3574-d243-44da-9c9b-ab72ebd852c6_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1481 |
+
2024/Role[[:space:]]Prompting[[:space:]]Guided[[:space:]]Domain[[:space:]]Adaptation[[:space:]]with[[:space:]]General[[:space:]]Capability[[:space:]]Preserve[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models/35b8f9e6-09f7-42fa-96bf-3e0219ba5949_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1482 |
+
2024/SELF-EXPERTISE_[[:space:]]Knowledge-based[[:space:]]Instruction[[:space:]]Dataset[[:space:]]Augmentation[[:space:]]for[[:space:]]a[[:space:]]Legal[[:space:]]Expert[[:space:]]Language[[:space:]]Model/4acafe4e-4ed5-4fcd-9cdb-fd3783c19db0_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1483 |
+
2024/SGSH_[[:space:]]Stimulate[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]with[[:space:]]Skeleton[[:space:]]Heuristics[[:space:]]for[[:space:]]Knowledge[[:space:]]Base[[:space:]]Question[[:space:]]Generation/ab53ef53-5761-4575-aad6-b343d0dee28e_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1484 |
+
2024/SLiM_[[:space:]]Speculative[[:space:]]Decoding[[:space:]]with[[:space:]]Hypothesis[[:space:]]Reduction/9d1e6d33-1320-4f2d-a53f-f214a5587267_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1485 |
+
2024/SMILE_[[:space:]]Multimodal[[:space:]]Dataset[[:space:]]for[[:space:]]Understanding[[:space:]]Laughter[[:space:]]in[[:space:]]Video[[:space:]]with[[:space:]]Language[[:space:]]Models/6ae2e7d4-386f-478d-bf14-1ed73eac0838_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1486 |
+
2024/SUQL_[[:space:]]Conversational[[:space:]]Search[[:space:]]over[[:space:]]Structured[[:space:]]and[[:space:]]Unstructured[[:space:]]Data[[:space:]]with[[:space:]]Large[[:space:]]Language[[:space:]]Models/55440f82-fd4f-428f-926e-b0cf762d2d60_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1487 |
+
2024/Secure[[:space:]]Your[[:space:]]Model_[[:space:]]An[[:space:]]Effective[[:space:]]Key[[:space:]]Prompt[[:space:]]Protection[[:space:]]Mechanism[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models/7bd21c7a-1669-4b1c-828c-b0234e175d86_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1488 |
+
2024/Select[[:space:]]and[[:space:]]Summarize_[[:space:]]Scene[[:space:]]Saliency[[:space:]]for[[:space:]]Movie[[:space:]]Script[[:space:]]Summarization/abc97c16-49a6-4514-aabc-6ad1101deb0e_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1489 |
+
2024/Self-Adaptive[[:space:]]Sampling[[:space:]]for[[:space:]]Accurate[[:space:]]Video[[:space:]]Question[[:space:]]Answering[[:space:]]on[[:space:]]Image[[:space:]]Text[[:space:]]Models/042dbe87-d981-4de1-8afb-6636f44d6a67_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1490 |
+
2024/Self-Checker_[[:space:]]Plug-and-Play[[:space:]]Modules[[:space:]]for[[:space:]]Fact-Checking[[:space:]]with[[:space:]]Large[[:space:]]Language[[:space:]]Models/779baf28-e95b-45d7-8b34-c7c196b532d7_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1491 |
+
2024/Self-Cleaning_[[:space:]]Improving[[:space:]]a[[:space:]]Named[[:space:]]Entity[[:space:]]Recognizer[[:space:]]Trained[[:space:]]on[[:space:]]Noisy[[:space:]]Data[[:space:]]with[[:space:]]a[[:space:]]Few[[:space:]]Clean[[:space:]]Instances/1a661566-ed71-45b3-a7b0-05a97ae53254_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1492 |
+
2024/Self-Demos_[[:space:]]Eliciting[[:space:]]Out-of-Demonstration[[:space:]]Generalizability[[:space:]]in[[:space:]]Large[[:space:]]Language[[:space:]]Models/7ebed7c0-1be8-4f21-bdbe-fbd806978540_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1493 |
+
2024/Self-Regulated[[:space:]]Sample[[:space:]]Diversity[[:space:]]in[[:space:]]Large[[:space:]]Language[[:space:]]Models/15593dee-cdc5-4399-aeb7-32faf96438c9_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1494 |
+
2024/Semantically-Prompted[[:space:]]Language[[:space:]]Models[[:space:]]Improve[[:space:]]Visual[[:space:]]Descriptions/e59c3714-d921-44e8-be15-61cacfdb786e_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1495 |
+
2024/Sentiment[[:space:]]Analysis[[:space:]]in[[:space:]]the[[:space:]]Era[[:space:]]of[[:space:]]Large[[:space:]]Language[[:space:]]Models_[[:space:]]A[[:space:]]Reality[[:space:]]Check/5ced475c-d707-4385-916a-70bc3498c546_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1496 |
+
2024/Signer[[:space:]]Diversity-driven[[:space:]]Data[[:space:]]Augmentation[[:space:]]for[[:space:]]Signer-Independent[[:space:]]Sign[[:space:]]Language[[:space:]]Translation/d0062daa-1d3a-433f-bae6-87bf4638793a_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1497 |
+
2024/SimSCOOD_[[:space:]]Systematic[[:space:]]Analysis[[:space:]]of[[:space:]]Out-of-Distribution[[:space:]]Generalization[[:space:]]in[[:space:]]Fine-tuned[[:space:]]Source[[:space:]]Code[[:space:]]Models/fea4ef6e-ba0f-4307-a734-3668b54d9653_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1498 |
+
2024/Simulating[[:space:]]Opinion[[:space:]]Dynamics[[:space:]]with[[:space:]]Networks[[:space:]]of[[:space:]]LLM-based[[:space:]]Agents/d8272ac6-cf2c-4485-8487-7e5e571e9a11_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1499 |
+
2024/SocREval_[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]with[[:space:]]the[[:space:]]Socratic[[:space:]]Method[[:space:]]for[[:space:]]Reference-free[[:space:]]Reasoning[[:space:]]Evaluation/cc0024a9-bf15-465e-96fa-6dc977020fa6_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1500 |
+
2024/Solving[[:space:]]Data-centric[[:space:]]Tasks[[:space:]]using[[:space:]]Large[[:space:]]Language[[:space:]]Models/38040fd9-7dad-412d-8512-6d3f29f17849_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1501 |
+
2024/Source-Free[[:space:]]Unsupervised[[:space:]]Domain[[:space:]]Adaptation[[:space:]]for[[:space:]]Question[[:space:]]Answering[[:space:]]via[[:space:]]Prompt-Assisted[[:space:]]Self-learning/fb7c1821-5df0-41b2-8d89-b727369b5990_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1502 |
+
2024/SpeedE_[[:space:]]Euclidean[[:space:]]Geometric[[:space:]]Knowledge[[:space:]]Graph[[:space:]]Embedding[[:space:]]Strikes[[:space:]]Back/9293d252-4b5b-4327-880e-cf174ae3d12f_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1503 |
+
2024/Structured[[:space:]]Pruning[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]Using[[:space:]]Coupled[[:space:]]Components[[:space:]]Elimination[[:space:]]and[[:space:]]Minor[[:space:]]Fine-tuning/3d9dfc6c-7829-46e1-8928-5d90b8e4857e_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1504 |
+
2024/Subword[[:space:]]Attention[[:space:]]and[[:space:]]Post-Processing[[:space:]]for[[:space:]]Rare[[:space:]]and[[:space:]]Unknown[[:space:]]Contextualized[[:space:]]Embeddings/83e2b45d-ee04-4718-acf4-0f03e120b6ff_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1505 |
+
2024/SumCSE_[[:space:]]Summary[[:space:]]as[[:space:]]a[[:space:]]transformation[[:space:]]for[[:space:]]Contrastive[[:space:]]Learning/502d1d9d-4ddc-4b69-be34-a77f28ab026e_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1506 |
+
2024/Synonym[[:space:]]relations[[:space:]]affect[[:space:]]object[[:space:]]detection[[:space:]]learned[[:space:]]on[[:space:]]vision-language[[:space:]]data/1cb4a394-4c1f-4a06-8c00-35f971abbdb7_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1507 |
+
2024/T3M_[[:space:]]Text[[:space:]]Guided[[:space:]]3D[[:space:]]Human[[:space:]]Motion[[:space:]]Synthesis[[:space:]]from[[:space:]]Speech/adac580f-b91a-45f4-9b55-ad556a197d14_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1508 |
+
2024/TagDebias_[[:space:]]Entity[[:space:]]and[[:space:]]Concept[[:space:]]Tagging[[:space:]]for[[:space:]]Social[[:space:]]Bias[[:space:]]Mitigation[[:space:]]in[[:space:]]Pretrained[[:space:]]Language[[:space:]]Models/c76e7ae9-ed01-4a6a-83ce-5847f7b03888_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1509 |
+
2024/Tailoring[[:space:]]Vaccine[[:space:]]Messaging[[:space:]]with[[:space:]]Common-Ground[[:space:]]Opinions/0e389c0c-5a97-4e0f-8b32-1446aa9622f1_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1510 |
+
2024/Targeted[[:space:]]Augmentation[[:space:]]for[[:space:]]Low-Resource[[:space:]]Event[[:space:]]Extraction/f2db35be-1c0c-4ae5-bb31-1210e73210a9_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 1511 |
+
2024/Task-Agnostic[[:space:]]Detector[[:space:]]for[[:space:]]Insertion-Based[[:space:]]Backdoor[[:space:]]Attacks/0102c997-ccfd-4dcf-a0a7-920c0150efe8_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
2024/PAELLA_ Parameter-Efficient Lightweight Language-Agnostic Captioning Model/fd50ced0-acb3-442d-8d29-13b3ece4bcd9_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/PAELLA_ Parameter-Efficient Lightweight Language-Agnostic Captioning Model/fd50ced0-acb3-442d-8d29-13b3ece4bcd9_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/PAELLA_ Parameter-Efficient Lightweight Language-Agnostic Captioning Model/fd50ced0-acb3-442d-8d29-13b3ece4bcd9_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ff3f2ff9c68c979323d82d57f87e18c8e9e5f876b400cc757e03b7772d8f27c2
|
| 3 |
+
size 1068911
|
2024/PAELLA_ Parameter-Efficient Lightweight Language-Agnostic Captioning Model/full.md
ADDED
|
@@ -0,0 +1,392 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# PAELLA: Parameter-Efficient Lightweight Language-Agnostic Captioning Model
|
| 2 |
+
|
| 3 |
+
Rita Ramos† Emanuele Bugliarello‡ Bruno Martins† Desmond Elliott*
|
| 4 |
+
|
| 5 |
+
†INESC-ID, Instituto Superior Técnico, University of Lisbon
|
| 6 |
+
|
| 7 |
+
Google Research
|
| 8 |
+
|
| 9 |
+
*Department of Computer Science, University of Copenhagen
|
| 10 |
+
|
| 11 |
+
ritaparadaramos@tecnico.ulisboa.pt
|
| 12 |
+
|
| 13 |
+
# Abstract
|
| 14 |
+
|
| 15 |
+
We introduce PAELLA, a Parameter-Efficient Lightweight Language-Agnostic image captioning model designed to be both parameter and data-efficient using retrieval augmentation. The model is trained by learning a small mapping network with 34M parameters between a pre-trained visual model and a multilingual language model that is conditioned on two types of input: (i) the image itself, and (ii) a set of retrieved captions in the target language. The retrieved examples play a key role in guiding the model to generate captions across languages. Through retrieval, the model can be lightweight in terms of the number of trainable parameters, which only exist in its mapping network, and also in the amount of multilingual training data that is required. Experiments on the XM3600 dataset, featuring 36 languages, show that PAELLA can outperform or compete against some models with $3 - 77 \times$ more learned parameters and $35 - 863 \times$ more data, particularly in low-resource languages. We also find that PAELLA can be trained on only monolingual data and still show strong zero-shot abilities in other languages. $^{1}$
|
| 16 |
+
|
| 17 |
+
# 1 Introduction
|
| 18 |
+
|
| 19 |
+
We tackle the problem of multilingual image captioning, aiming to provide textual descriptions of visual contents that can serve speakers of different languages, in contrast to most captioning models that only generate English captions. While significant progress has been made in recent years, training image captioning models has become more expensive due to the trend of scaling both data and model size (Hu et al., 2022; Wang et al., 2022). This trend is even more prominent in multilingual approaches (Chen et al., 2023b; Thapliyal et al., 2022), given the need for training data covering each target language, and the need of even
|
| 20 |
+
|
| 21 |
+
larger models to mitigate the curse of multilinguality (Conneau et al., 2020; Goyal et al., 2021).
|
| 22 |
+
|
| 23 |
+
Some recent research has focused on minimizing the cost of multilingual training, such as PALI-3 (Chen et al., 2023a) with 5B trainable parameters, and mBLIP (Geigle et al., 2023) with only 124M trainable parameters. Both these approaches use pre-trained multimodal language models or pretrained visual encoders that are kept frozen, reducing the number of trainable parameters. Nevertheless, both of these models still rely on training with millions or billions of examples, including in the context of image captioning alone.
|
| 24 |
+
|
| 25 |
+
This paper describes a Parameter-Efficient Lightweight Language-Agnostic captioning model (PAELLA). The model is designed to be efficient, not only in terms of the number of trainable parameters, but also lightweight in the amount of multilingual training data required. PAELLA has only 34 million trained parameters, and the model can be trained using just 566K examples, i.e., the size of the English COCO dataset.
|
| 26 |
+
|
| 27 |
+
PAELLA is based on frozen pre-trained models that are augmented with retrieved examples. The only learned parameters are in a compact mapping network of cross-attention layers between a frozen CLIP image encoder and a frozen XGLM multilingual language model. The model is trained to generate captions in the desired language using a prompt in that language. Furthermore, the retrieved examples assist the model in generating meaningful captions, by providing examples of what the predicted caption should resemble. The use of retrieved examples positively contributes to reducing both the number of trainable parameters, and the required amount of multilingual data.
|
| 28 |
+
|
| 29 |
+
We conduct experiments on XM3600 (Thapliyal et al., 2022), an established multilingual captioning benchmark that covers geographically diverse images with human-annotated captions in 36 languages. Experiments show that PAELLA can out
|
| 30 |
+
|
| 31 |
+
perform or compete with models that are more demanding in terms of trained parameters or training data. The performance of our model in low-resource languages is particularly noteworthy, in contrast to concurrent models like mBLIP, that often excel in English and related languages but struggle to generalize effectively to underrepresented languages.
|
| 32 |
+
|
| 33 |
+
Results also show that PAELLA demonstrates zero-shot multilingual capabilities when trained only with monolingual data such as the English COCO dataset. PAELLA achieves language transfer through retrieval, solemnly by retrieving captions in the target language during inference. Ablation studies further demonstrate the benefit of our retrieval-augmented approach.
|
| 34 |
+
|
| 35 |
+
# 2 Related Work
|
| 36 |
+
|
| 37 |
+
# 2.1 Image Captioning
|
| 38 |
+
|
| 39 |
+
In the last years, image captioning has witnessed impressive performance improvements through end-to-end Vision-and-Language Pretraining (VLP), considering the use of large-scale models and large image-text datasets in English (Wang et al., 2021; Hu et al., 2022; Li et al., 2022).
|
| 40 |
+
|
| 41 |
+
In an effort to alleviate the increasing computation costs, recent studies have adopted off-the-shelf pre-trained encoder and decoder models that remain frozen during training (Mokady et al., 2021; Luo et al., 2022; Ramos et al., 2023b; Manas et al., 2023). For instance, several studies have used CLIP (Radford et al., 2021) as the visual encoder, and GPT-2 (Radford et al., 2019) as the language decoder, keeping one or both of the models frozen during training, and instead learning a mapping network to align the two modalities. Having the models frozen speeds up training and reduces GPU memory usage (Mokady et al., 2021). Besides reducing computational costs, this is also a means to seamlessly integrate powerful unimodal models (Tsimpoukelli et al., 2021; Alayrac et al., 2022; Li et al., 2023; Dai et al., 2023), including large-scale pre-trained (Brown et al.; Zhang et al., 2022; Touvron et al., 2023) and instruction tuned language models (Wei et al., 2021; Chung et al., 2022; Taori et al., 2023), which would otherwise be impractical with end-to-end training, and could result in the loss of generalization from catastrophic forgetting (McCloskey and Cohen, 1989).
|
| 42 |
+
|
| 43 |
+
In the realm of multilingual image captioning, instead of expensive end-to-end training from scratch
|
| 44 |
+
|
| 45 |
+
(Thapliyal et al., 2022; Yang et al., 2020), recent models have also opted for frozen pre-trained visual encoders and/or language decoders. Examples include mBLIP (Geigle et al., 2023) or PALI-3 (Chen et al., 2023a). In contrast to these studies, we use a frozen pre-trained encoder and a frozen language model, that are augmented with retrieved examples to further reduce the number for trainable parameters, as well as the need for extensive multilingual training data.
|
| 46 |
+
|
| 47 |
+
# 2.2 Retrieval Augmentation
|
| 48 |
+
|
| 49 |
+
Retrieval-augmented language generation conditions the generation process by enhancing the input with information retrieved from an external datastore (Lewis et al., 2020). Retrieval augmented models have gained increased popularity (Khandelwal et al., 2020; Izacard et al., 2022; Shi et al., 2023; Yu et al., 2023), including in image captioning (Zhao et al., 2020; Xu et al., 2019; Ramos et al., 2021; Sarto et al., 2022; Ramos et al., 2023b; Yang et al., 2023).
|
| 50 |
+
|
| 51 |
+
The work that more closely resembles ours is SmallCap (Ramos et al., 2023b), a lightweight English captioning model that uses pre-trained encoder and decoder models, and that also uses prompting with retrieved captions. In this paper, we explore how retrieval augmentation can help to reduce not just the number of trainable parameters but also the amount of training data. Another key difference between the approaches is that PAELLA is based on a pre-trained multilingual language model instead of a monolingual English model. We explore how the prompt and retrieved captions should be designed to enable generation across different languages, instead of only English.
|
| 52 |
+
|
| 53 |
+
We note that retrieval augmentation remains largely unexplored in the multilingual image captioning scenario. Until now, only the multilingual LMCap (Ramos et al., 2023a) model has used retrieval augmentation, but solely in a training-free manner based on prompting a multilingual language model in an image-blind approach. In our work, we instead show the potential of retrieval augmentation in contributing to the training of a multilingual image captioning model.
|
| 54 |
+
|
| 55 |
+
# 3 Proposed Approach
|
| 56 |
+
|
| 57 |
+
The Parameter-Efficient Lightweight Language-Agnostic (PAELLA) captioning model uses retrieval augmentation to generate captions in multi-
|
| 58 |
+
|
| 59 |
+

|
| 60 |
+
Figure 1: PAELLA uses a frozen pre-trained image encoder and a frozen multilingual decoder, connected with a trainable mapping network. The decoder generates a multilingual caption conditioned on the encoded image, together with retrieved captions given as input within a prompt in the desired language.
|
| 61 |
+
|
| 62 |
+
ple languages. An overview of the model architecture can be seen in Figure 1.
|
| 63 |
+
|
| 64 |
+
We follow a similar design to the monolingual SMALLCAP model (Ramos et al., 2023b), by building on top of powerful pre-trained unimodal models. We also use CLIP (Radford et al., 2021) as the visual encoder, but instead of GPT-2 or OPT as the decoder, we use a multilingual auto-regressive language model, i.e. XGLM (Lin et al., 2021). Both the encoder and the decoder are kept frozen during training, except for a newly added mapping network of cross-attention layers, that allows the decoder to attend to the visual inputs. PAELLA generates captions conditioned on the image and on a set of $k$ retrieved captions from similar images. The retrieved captions are used to prompt the model to generate in the desired target language. The prompt follows a fixed-template which first includes examples of the $k$ retrieved captions and ends with an instruction for the multilingual decoder to generate a caption in a desired language. The English prompt is:
|
| 65 |
+
|
| 66 |
+
Similar images show [retrieved caption] ... [retrieved caption]. A caption I can generate to describe this image in [language] is: ...
|
| 67 |
+
|
| 68 |
+
The prompt and captions can be tailored to different languages, by having both these parts in the desired language (see some examples of the prompts for other languages in Appendix A).
|
| 69 |
+
|
| 70 |
+
The parameters in the mapping network $\theta_{M}$ are trained by minimizing the sum of the negative log-likelihood of predicting the ground truth image
|
| 71 |
+
|
| 72 |
+
caption for each token in the sequence $y_{1}\ldots y_{M}$ conditioned on the image $\mathbf{V}$ and the retrievalaugmented prompt $\mathbf{L}$ ..
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
L _ {\theta_ {M}} = - \sum_ {i = 1} ^ {M} \log P _ {\theta} \left(y _ {i} \mid y _ {< i}, \mathbf {V}, \mathbf {L}\right). \tag {1}
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
We quantitatively show in Section 5 that our retrieval-augmented approach has these properties:
|
| 79 |
+
|
| 80 |
+
Parameter-efficiency: Only the cross-attention layers between a frozen encoder and a frozen decoder need to be trained. To compensate for the small number of trainable parameters, the model is guided with examples of retrieved captions.
|
| 81 |
+
|
| 82 |
+
Data-efficiency: Through retrieval, the model does not need a huge amount of multilingual data for training, since it benefits from retrieved examples that demonstrate how to generate in the target language. We thus alleviate the data hunger of existing multilingual models, that are often trained with the same image associated to captions in multiple languages, having to repeatedly translate entire English captioning datasets for each language (e.g., COCO to COCO-35L (Thapliyal et al., 2022)).
|
| 83 |
+
|
| 84 |
+
Zero-shot Multilinguality: Our model demonstrates multilingual capabilities even when trained only on monolingual image captioning data. It can be trained on the specific in-domain distribution from the available data in a high-resource language, and still generate in different languages. This by relying exclusively, at inference time, on retrieval augmentation in the target language from an available multilingual captioning dataset.
|
| 85 |
+
|
| 86 |
+
# 4 Experimental Setup
|
| 87 |
+
|
| 88 |
+
# 4.1 Implementation and Training Details
|
| 89 |
+
|
| 90 |
+
We release our code and model at https:// github.com/RitaRamo/paella. PAELLA is implemented using the HuggingFace Transformers library (Wolf et al., 2020). The backbone of the model is based on the pre-trained CLIP model openai/clip-vit-base-patch32, and the pretrained XGLM facebook/xglm-2.9B.
|
| 91 |
+
|
| 92 |
+
The input image $\mathbf{V}$ is encoded by the CLIP encoder, and the language-based prompt $\mathbf{L}$ , which includes the $k$ retrieved captions, is processed by XGLM to generate a caption in the target language.
|
| 93 |
+
|
| 94 |
+
Encoder: CLIP is a powerful multimodal model that was pre-trained to encode images and text into a shared embedding space, using contrastive learning (Radford et al., 2021). We use CLIP-ViT-B/32 to encode the input image, producing a sequence of $N = 50$ visual features $\mathrm{V} = \{v_{1},\dots,v_{N}\}$ , each with an embedding size of 768 dimensions. This encoder has 86M million parameters, which are kept frozen during training.
|
| 95 |
+
|
| 96 |
+
Decoder: XGLM is a multilingual autoregressive language model that can generate in a diverse set of 30 languages $^{3}$ (Lin et al., 2021). In PAELLA, we use the variant with 2.9B parameters, which are frozen during training.
|
| 97 |
+
|
| 98 |
+
Retrieval: CLIP is also used for image-text retrieval. Specifically, it is used to encode both the candidate captions into a datastore, and each given input image. For each given image, the $k$ nearest captions are retrieved from the caption datastore. The datastore is indexed efficiently through the FAISS library (Johnson et al., 2017), specifically with the IndexFlatIP index that does not require any training, allowing for offline retrieval. The images are also encoded with CLIP, using the visual backbone, to retrieve the captions that are most similar based on cosine similarity. We select the top $k = 4$ retrieved captions, in-line with previous findings which indicate that this is the optimal number of captions in both monolingual and multilingual setups (Ramos et al., 2023a,b).
|
| 99 |
+
|
| 100 |
+
Mapping Network: The only part of PAELLA that is trained is the mapping network between the frozen encoder and decoder. The
|
| 101 |
+
|
| 102 |
+
$3en, ru, zh, de, es, fr, ja, it, pt, el, ko, fi, id, tr, ar, vi, th, bg, ca, hi, et, bn, ta, ur, sw, te, eu, my, ht, qu.$
|
| 103 |
+
|
| 104 |
+
mapping network consists of randomly initialized cross-attention layers (Vaswani et al., 2017) added to each of the 48 layers of XLGM, so the decoder can attend to the encoder outputs. In order to have a smaller number of trainable parameters, we use low rank cross-attention layers by reducing the original dimensionality $d$ of the projection matrices from 128 to 8, as in Ramos et al. (2023b). Accordingly, this amounts to only 34M trainable parameters (see Appendix G). These parameters are trained by predicting the tokens in the target caption, as shown in Equation 1.
|
| 105 |
+
|
| 106 |
+
Training Requirements: PAELLA is trained for 3 epochs with an initial learning rate of 1e-4, using the AdamW optimizer (Kingma and Ba, 2014) and a batch size of 16 with 4 gradient accumulation steps, on a single NVIDIA RTX A6000 GPU. In an effort to promote accessibility, our model can be trained in a day on a single GPU, unlike other multilingual image captioning models. With the CLIPViT-B/32 encoder and the XGLM-2.9B decoder, PAELLA takes 23h for training the 34M trainable parameters, occupying 46G RAM. If using instead XGLM-1.7B, it takes 14h and 29G RAM. For XGLM-564M, it only takes 7h and 19G RAM<sup>4</sup>. Moreover, we exclusively use publicly available datasets, as described next.
|
| 107 |
+
|
| 108 |
+
# 4.2 Data
|
| 109 |
+
|
| 110 |
+
We now describe the data used in our experiments, covering the benchmark we evaluate our model on and its training data, as well as the dataset used for the retrieval dataset.
|
| 111 |
+
|
| 112 |
+
Evaluation Data: We assess the performance of our model on the well-established XM3600 dataset (Thapliyal et al., 2022), that covers geographically-diverse images from 36 languages $(\mathrm{L}_{36})$ , including the core set of languages defined by Thapliyal et al. (2022): en, es, hi and zh $(\mathrm{L}_{\mathrm{CORE}})$ , and a set of low-resource languages $(\mathrm{L}_5)$ : bn, quz, mi, sw, te. Each language is represented by 100 images from Open Images, chosen based on the area the language is spoken. In total, XM3600 has 3600 images with 261375 human-annotated captions. Each image has at least 2 captions/language.
|
| 113 |
+
|
| 114 |
+
Most human-annotated captioning datasets are predominantly on English. Following Thapliyal et al. (2022), we extend the evaluation to include the COCO-35L dataset (Thapliyal et al., 2022),
|
| 115 |
+
|
| 116 |
+
which is automatically translated from the original English COCO dataset (Chen et al., 2015). COCO-35L has 5000 images for validation, and 113k images for training, each with 5 reference captions per language. The translations were obtained with the Google Translate API<sup>5</sup>, covering all the 36 languages in XM3600, with the exception of Cusco Quechua (quz), not supported by the API.
|
| 117 |
+
|
| 118 |
+
Training Data: Given the scarcity of multilingual human-annotated captions, multilingual models typically resort to training on machine translated data. The standard approach (Thapliyal et al., 2022) involves training on the aforementioned COCO35L dataset, which contains 566K training captions translated into 35 languages, resulting in a dataset with 20.3M captions. Existing multilingual models (Thapliyal et al., 2022; Geigle et al., 2023; Chen et al., 2023b) also benefit from large-scale pre-training, using datasets such as the machine translated CC3M-35L (Thapliyal et al., 2022), built from the CC3M dataset (Sharma et al., 2018), which contains 3M image-caption pairs for training, amounting to 105M translations.
|
| 119 |
+
|
| 120 |
+
In contrast, we only train on a subset of COCO-35L, which is downsampled to match the size of the original English COCO dataset (i.e., 565K examples instead of 20.3M examples). The subset is created by sampling captions from the COCO-35L dataset according to a uniform distribution across languages, using the same language for the 5 captions associated to each image. The exploration of other sampling strategies is left for future work.
|
| 121 |
+
|
| 122 |
+
Retrieval Data: The datastore of our model contains the training captions of the COCO dataset using the Karpathy splits (Karpathy and Fei-Fei, 2015). The English captions are indexed with their corresponding IDs. In this way, we apply image-text search based on CLIP-ViT-bigG- $14^{6}$ by retrieving, for each image, the $k = 4$ caption IDs from the nearest-neighbor images<sup>7</sup>. Given the retrieved caption IDs, we can readily integrate either the corresponding English captions from COCO, or use the associated translations from any of the other 35 languages, by cross-referencing the IDs with COCO-35L depending on the target language.
|
| 123 |
+
|
| 124 |
+
We emphasize that our retrieval system is monolingual. The datastore only contains the English
|
| 125 |
+
|
| 126 |
+
COCO captions, without demanding the scale of the entire COCO-35L dataset. We only use COCO-35L for cross-referencing the retrieved IDs to obtain the captions in the language that we desire.
|
| 127 |
+
|
| 128 |
+
# 4.3 Evaluation Metrics
|
| 129 |
+
|
| 130 |
+
Following previous work, we mostly evaluate multilingual captioning performance with CIDEr (Vedantam et al., 2015). CIDEr calculates the agreement between the generated caption and the consensus of the reference captions, computed through a similarity function that uses Term Frequency times Inverse Document Frequency (TF-IDF) weights. In contrast to previous multilingual captioning studies that solely report the CIDEr metric as per Thapliyal et al. (2022), our work extends the evaluation scope to a diverse set of captioning metrics, specifically BLEU-1, BLEU-4, ROGUE, and METEOR (see Appendix C). We used the COCO evaluation package<sup>8</sup> with Sacre-BLEU tokenization (Post, 2018) to compute the metrics. During evaluation, captions are generated by our model using beam search decoding with a beam size of 3.
|
| 131 |
+
|
| 132 |
+
# 4.4 Model Variants
|
| 133 |
+
|
| 134 |
+
We evaluate PAELLA alongside two additional variants, each trained on a more limited set of languages in order to assess the cross-lingual transfer abilities of our approach. Model selection is based on maximizing the average CIDEr across the LCore languages in the COCO-35 validation dataset. Here we detail the model variants we compare.
|
| 135 |
+
|
| 136 |
+
PAELLA: This is our main model, trained to generate for the 35 languages in COCO-35L. In this case, we sampled uniformly from COCO-35L to ensure the scale of the COCO English dataset.
|
| 137 |
+
|
| 138 |
+
$\mathbf{PAELLA}_{\mathrm{core}}$ : This model is trained to generate for $\mathrm{L}_{\mathrm{CORE}}$ , i.e. the core set of 4 languages proposed in the XM3600 dataset (en, es, hi and zh). We also sample uniformly from COCO-35L to maintain a scale consistent with the COCO English dataset, but within this restricted language set $\mathrm{L}_{\mathrm{CORE}}$ .
|
| 139 |
+
|
| 140 |
+
PAELLAMono: This model is trained to generate only on English. In this case, we use the original COCO English dataset.
|
| 141 |
+
|
| 142 |
+
# 5 Results
|
| 143 |
+
|
| 144 |
+
We first compare PAELLA against state-of-the-art models. We then discuss the performance of our other two variants trained on a smaller set of languages, i.e., $\mathrm{PAELLA}_{\mathrm{core}}$ and $\mathrm{PAELLA}_{\mathrm{mono}}$ .
|
| 145 |
+
|
| 146 |
+
# 5.1 Parameter- and Data-efficient Training
|
| 147 |
+
|
| 148 |
+
Table 1 shows that PAELLA performs competitively against state-of-the-art multilingual models, despite training with a fraction of their trainable parameters and with considerably less data. With just 34M trainable parameters and only 566K training instances, PAELLA achieves a CIDEr score of 26.2 on average across all the 36 languages, and a CIDEr of 28.2 across the languages on which the XGLM backbone was pre-trained. Also, our model is able to yield 20.7 CIDEr points across the set of low-resource languages L5 (bn, quz, mi, sw, te) $^9$ .
|
| 149 |
+
|
| 150 |
+
PAELLA surpasses Lg (Thapliyal et al., 2022), i.e. a fully-supervised model trained with 2.6 billion parameters in the entire COCO-35L dataset (86x more trainable parameters, and 35x more training examples), largely outperforming across the set of core languages and on average. PAELLA is also competitive against BB+CC, another model from Thapliyal et al. (2022) that is pre-trained on 135M examples in the combination of CC3M-35L and COCO-35L. Although PAELLA does not outperform BB+CC on average, it reaches better performance in 3/4 of the core languages, noteworthy considering their model was trained with 238x more data than our model.
|
| 151 |
+
|
| 152 |
+
PAELLA also competes with multilingual models that were trained on diverse multimodal data from different vision-and-language tasks, such as mBLIP (Geigle et al., 2023). Akin to our model, mBLIP leverages a pre-trained multilingual language model with an effort on computational and data efficiency. Our model surpasses these efforts by having significantly fewer parameters and operating on considerably less data (e.g., in the context of captioning data, mBLIP trains on machine translations of COCO alongside a diverse set of 2.3 million examples from the synthetic Web CapFilt dataset (Li et al., 2022)). PAELLA outperforms mBLIP BLOOMZ-7B by 2.8 CIDEr points on average, and has less 2.1 points than mBLIP mT0-XL. The mBLIP mT0-XL model demonstrates strong performance on English, yielding 80.2 CIDEr, yet we see a large gap in low-resource languages, with
|
| 153 |
+
|
| 154 |
+
13.4 CIDEr points while our model achieves 20.7 points. In Section 6.1, we discuss more extensively the performance across languages.
|
| 155 |
+
|
| 156 |
+
Similarly to other multilingual captioning models, PAELLA performs significantly worse than the large-scale 17B parameter PaLI model (Chen et al., 2023b) that is trained on 12 billion examples using the private WebLI dataset. The same holds for the recent PALI-3 (Chen et al., 2023a), which makes efforts towards a more efficient model, but still trains billions of parameters on billions of multilingual data. This is still notably costly and impractical for many applications. From a research perspective, our model can be trained in a single day in consumer hardware with a public dataset.
|
| 157 |
+
|
| 158 |
+
Lastly, we see a 15.2 CIDEr points improvement compared to LMCap (Ramos et al., 2023a), which is a few-shot retrieval-augmented approach that has no training. With minimal multilingual training, our model further closes the gap towards large-scale multilingual captioning models.
|
| 159 |
+
|
| 160 |
+
Overall, the results on XM3600 demonstrate the efficacy of our approach for efficient multilingual captioning, contributing to the reduction of both trainable parameters and data requirements. For a more comprehensive evaluation, we also report results on COCO-35L in Table 2, where we observe again that our model can outperform the fully-supervised models of Thapliyal et al. (2022). See qualitative examples in Appendix H.
|
| 161 |
+
|
| 162 |
+
# 5.2 Zero-shot Cross-lingual Transfer
|
| 163 |
+
|
| 164 |
+
In Table 1, we observe that PAELLAAcore (trained on en,es,hi,zh) and PAELLAAmono (trained only on en) have strong zero-shot performance in other languages, showing that our approach does not require captioning data for each of the languages during training. The generation can be conditioned on a different language beyond the training set, by providing the prompt and retrieved captions in the desired output language, solely at inference time.
|
| 165 |
+
|
| 166 |
+
We further observe that PAELLA is outperformed by $\mathrm{PAELLAA}_{\mathrm{mono}}$ on English, and by $\mathrm{PAELLAA}_{\mathrm{core}}$ on English and Spanish. This can be partially explained by the fact that PAELLA was pre-trained on a uniform sample of all 35 languages in COCO-35L, while these variants were pre-trained on a uniform sample of only those languages, i.e. with more English captions. Both the Core and Mono variants, on the other hand, are less able to generate captions for languages out
|
| 167 |
+
|
| 168 |
+
<table><tr><td>Model</td><td>Data</td><td>Train θ</td><td>Total θ</td><td>en</td><td>es</td><td>hi</td><td>zh</td><td>L5</td><td>L36</td></tr><tr><td colspan="10">Training-free</td></tr><tr><td>LMCap</td><td>-</td><td>0</td><td>2.9B</td><td>45.2</td><td>32.9</td><td>13.2</td><td>22.1</td><td>0.0</td><td>11.0</td></tr><tr><td colspan="10">Large-scale Training</td></tr><tr><td>PALI</td><td>12B</td><td>17B</td><td>17B</td><td>98.1</td><td>-</td><td>31.3</td><td>36.5</td><td>-</td><td>53.6</td></tr><tr><td>PALI-3</td><td>12B</td><td>5B</td><td>5B</td><td>94.5</td><td>-</td><td>-</td><td>-</td><td>-</td><td>46.1</td></tr><tr><td>mBLIP mT0-XL</td><td>489M</td><td>124M</td><td>4.9B</td><td>80.2</td><td>62.6</td><td>16.1</td><td>14.7</td><td>7.9</td><td>28.3</td></tr><tr><td>mBLIP BLOOMZ-7B</td><td>489M</td><td>124M</td><td>8.3B</td><td>76.4</td><td>60.0</td><td>24.9</td><td>14.7</td><td>6.7</td><td>23.4</td></tr><tr><td>BB+CC</td><td>135M</td><td>0.8B</td><td>0.8B</td><td>58.4</td><td>42.5</td><td>19.7</td><td>20.2</td><td>22.4</td><td>28.5</td></tr><tr><td>Lg</td><td>19.8M</td><td>2.6B</td><td>2.6B</td><td>34.3</td><td>22.0</td><td>11.1</td><td>9.9</td><td>12.5</td><td>15.0</td></tr><tr><td colspan="10">Data & Parameter-efficient Training</td></tr><tr><td>PAELLA</td><td>566K35L</td><td>34M</td><td>3B</td><td>57.3</td><td>44.9</td><td>20.8</td><td>25.9</td><td>20.7</td><td>26.2 (28.2*)</td></tr><tr><td>PAELLAcore</td><td>566Ken,es,hi,zh</td><td>34M</td><td>3B</td><td>58.2</td><td>45.0</td><td>20.4</td><td>25.4</td><td>11.8</td><td>16.8 (24.9*)</td></tr><tr><td>PAELLAmono</td><td>566Ken</td><td>34M</td><td>3B</td><td>58.2</td><td>42.2</td><td>17.1</td><td>23.5</td><td>12.1</td><td>15.5 (23.9*)</td></tr></table>
|
| 169 |
+
|
| 170 |
+
Table 1: CIDEr performance on XM3600, a multilingual benchmark with geographically-diverse images across 36 languages. We compare our model, PAELLA, and its two variants, PAELLA<sub>core</sub> (trained on en,es,hi,zh) and PAELLA<sub>mono</sub> (trained only on en) against other state-of-the-art multilingual models. L<sub>5</sub> represents the average performance across the set of low-resource languages (bn, quz, mi, sw, te), and L<sub>36</sub> over all the 36 languages. (*) corresponds to the average across the languages on which the XGLM decoder was pre-trained. We highlight in bold that our model has the lowest number of trainable parameters and requires the least amount of training data.
|
| 171 |
+
|
| 172 |
+
<table><tr><td>Model</td><td>en</td><td>es</td><td>hi</td><td>zh</td></tr><tr><td>BB+CC</td><td>98.0</td><td>96.2</td><td>75.9</td><td>74.8</td></tr><tr><td>Lg</td><td>87.5</td><td>85.9</td><td>62.4</td><td>65.6</td></tr><tr><td>PAELLA</td><td>113.6</td><td>113.9</td><td>86.2</td><td>123.3</td></tr><tr><td>PAELLAcore</td><td>118.5</td><td>120.3</td><td>94.7</td><td>130.7</td></tr><tr><td>PAELLAmono</td><td>120.8</td><td>91.48</td><td>45.9</td><td>59.1</td></tr></table>
|
| 173 |
+
|
| 174 |
+
Table 2: CIDEr scores on COCO-35L validation data. The fully-supervised models from Thapliyal et al. (2022) are shown on top, with our model variants at the bottom.
|
| 175 |
+
|
| 176 |
+
side those in the XGLM pre-training data, resulting in an average decrease of 9.4 and 10.7 points of CIDEr across all 36 languages, compared to PAELLA, respectively. Despite this limitation, we emphasize the performance of $\mathrm{PAELLA}_{\mathrm{mono}}$ that achieved a 15.5 CIDEr score on average, especially considering its training was exclusively on English. $\mathrm{PAELLA}_{\mathrm{mono}}$ even outperforms Lg across the set of 4 core languages and on average, even though this model had end-to-end large-scale training across the various languages with the complete COCO-35L dataset.
|
| 177 |
+
|
| 178 |
+
Our approach's capability for zero-shot crosslingual transfer holds particular importance with the predominance of English-centric captioning datasets. We note we did not use multilingual in
|
| 179 |
+
|
| 180 |
+
domain data in the retrieval datastore. The retrieved captions from COCO-35L have a different distribution than the XM3600 benchmark, that contains geographically diverse images and concepts. We also stress that the entire prompt (including the retrieved captions) needs to be in the target language for this zero-shot cross-lingual ability to emerge. Otherwise the PAELLAmono model defaults to English, as a result of having been exclusively exposed to this language and thus having a strong tendency to generate in English.
|
| 181 |
+
|
| 182 |
+
# 6 Discussion
|
| 183 |
+
|
| 184 |
+
We discuss PAELLA's performance across languages in relation to the different writing systems. We then conduct ablations studies, first discussing the monolingual data required to train $\mathrm{PAELLAMono}$ , followed by the importance of the retrieved information. These ablation studies were performed on the validation split of COCO-35L because XM3600 only contains evaluation data.
|
| 185 |
+
|
| 186 |
+
# 6.1 Writing Systems
|
| 187 |
+
|
| 188 |
+
In Figure 2, we observe the performance of PAELLA across the diverse writing systems of the 36 languages, alongside the mBLIP mT0-XL model for comparison. mBLIP has a notable performance on English and languages that share the
|
| 189 |
+
|
| 190 |
+

|
| 191 |
+
Figure 2: Performance by writing system. Horizontal lines denote corresponding English performance.
|
| 192 |
+
|
| 193 |
+
Latin script writing system. This specialization results in poor performance for some writing systems, for instance Persian and Korean. In contrast, our model demonstrates a more balanced performance across the various writing systems beyond the high-resource Latin script, achieving a better performance on the Arabic, Bengali, Cyrilic, Deveganari, Greek, simplified Chienese, Korean, Persian, and Tegulu writing systems.
|
| 194 |
+
|
| 195 |
+
# 6.2 Monolingual Supervision
|
| 196 |
+
|
| 197 |
+
We previously saw that our multilingual captioning model could also be trained on monolingual data (see Section 5.2). We now discuss whether $\mathrm{PAELLAA}_{\mathrm{mono}}$ works when trained with languages other than English. As seen in Table 3, $\mathrm{PAELLAA}_{\mathrm{mono}}$ exhibits zero-shot multilingual capabilities with the other 3 core languages as well. Surprisingly, training on Spanish yields better generalization to the other core languages compared to training on English. When trained on Chinese, on the other hand, the model loses its ability to generate captions in Hindi. Additionally, we investigated the model's behavior when trained with a language falling outside the pre-training of the XGLM decoder, such as Danish. Here, the model is able to generate captions in Danish, yet we see the interesting behaviour that this breaks the generalization to other languages.
|
| 198 |
+
|
| 199 |
+
# 6.3 Retrieval as PAELLA's Key Ingredient
|
| 200 |
+
|
| 201 |
+
We now study the importance of augmenting with retrieved examples, the key component of our approach. We start by ablating the retrieval component, by training without including the retrieved captions in the prompt.<sup>10</sup> As seen in Figure 3, the performance drops 24 CIDEr on average across
|
| 202 |
+
|
| 203 |
+

|
| 204 |
+
Figure 3: Ablation results on the COCO-35L validation data, reported with CIDEr metric. We ablate the retrieval (NoRAG) and the visual encoder (image-blind).
|
| 205 |
+
|
| 206 |
+
<table><tr><td>Model</td><td>en</td><td>es</td><td>hi</td><td>zh</td><td>da</td></tr><tr><td>PAELLAAen</td><td>120.8</td><td>91.5</td><td>45.9</td><td>59.1</td><td>2.7</td></tr><tr><td>PAELLAAes</td><td>93.3</td><td>125.3</td><td>52.6</td><td>95.3</td><td>2.9</td></tr><tr><td>PAELLAAhi</td><td>70.4</td><td>68.1</td><td>99.3</td><td>80.9</td><td>0.1</td></tr><tr><td>PAELLAAzh</td><td>65.0</td><td>49.9</td><td>1.4</td><td>130.6</td><td>0.4</td></tr><tr><td>PAELLAAda</td><td>5.1</td><td>1.2</td><td>2.8</td><td>4.1</td><td>107.5</td></tr></table>
|
| 207 |
+
|
| 208 |
+
Table 3: CIDEr results for the mono variants on the COCO-35L validation data. We denote in subscript and in bold the language each variant was trained on.
|
| 209 |
+
|
| 210 |
+
the 4 core languages without retrieval (noRAG), compared to PAELLA. We also ablate the visual encoder by training on empty input images, $^{11}$ and we see again a loss of performance (i.e., 13.4 CIDEr over the 4 languages), confirming that PAELLA does indeed attend to the image and not merely rephrases the retrieved captions. Moreover, we observe that the NoRAG model performs worse than the image-blind approach with retrieved captions, reinforcing the benefit of training multilin
|
| 211 |
+
|
| 212 |
+
gual image captioning with retrieval-augmentation. In Appendix F, we additionally discuss results for PAELLA<sub>mono</sub>, where retrieval is shown to be crucial to generate captions in languages that substantially diverge from the English supervision. We also discuss the importance of having the retrieved captions in the target language, in Appendix H.
|
| 213 |
+
|
| 214 |
+
# 7 Conclusions and Future Work
|
| 215 |
+
|
| 216 |
+
We proposed PAELLA, an efficient multilingual captioning model with retrieval-augmentation. Contrary to previous studies, PAELLA is lightweight to train, both in the number of parameters and multilingual data demands. Results demonstrate competitiveness across languages, including low-resource languages. PAELLA also exhibits strong zero-shot multilingual capabilities. In the future, we plan to further investigate cross-lingual transfer with monolingual supervision.
|
| 217 |
+
|
| 218 |
+
# 8 Acknowledgements
|
| 219 |
+
|
| 220 |
+
This research was supported by the Portuguese Recovery and Resilience Plan through project C645008882-00000055 (i.e., the Center For Responsible AI), and also by Fundação para a Ciência e Tecnologia (FCT), through the project with reference UIDB/50021/2020 (DOI:10.54499/UIDB/50021/2020) and the Ph.D. scholarship with reference 2020.06106.BD.
|
| 221 |
+
|
| 222 |
+
# Limitations
|
| 223 |
+
|
| 224 |
+
While our model aims to contribute to research beyond English-centric captioning, it has limitations in that the results are conditioned on retrieved captions from machine translated data from COCO, which is English-centric and lacks coverage of geographically diverse concepts (Liu et al., 2021). Previous research has also shown that COCO has significant gender imbalance, and using this data can further amplify the bias (Zhao et al., 2017; Hendricks et al., 2018). For instance, models can become more prone to generate woman in kitchen settings than man. For a better understanding of the biases PAELLA exhibits, we suggest an analysis of the retrieved captions used by the model, as illustrated in the figures within Appendix H.
|
| 225 |
+
|
| 226 |
+
Another limitation relates to our models' coverage of languages and concepts. Expanding the range of covered languages would be desirable to accommodate more diverse speakers. Additionally, our model was evaluated on a limited number of
|
| 227 |
+
|
| 228 |
+
datasets, similarly to other concurrent models, due to the scarcity of multilingual resources for assessing image captioning results.
|
| 229 |
+
|
| 230 |
+
PAELLA was only designed for the task of image captioning. In future work, we would like to investigate approaches to extend PAELLA to a range of multilingual multimodal tasks, such as those covered in IGLUE (Bugliarello et al., 2022).
|
| 231 |
+
|
| 232 |
+
# References
|
| 233 |
+
|
| 234 |
+
Jean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech, Iain Barr, Yana Hasson, Karel Lenc, Arthur Mensch, Katherine Millican, Malcolm Reynolds, Roman Ring, Eliza Rutherford, Serkan Cabi, Tengda Han, Zhitao Gong, Sina Samangooei, Marianne Monteiro, Jacob Menick, Sebastian Borgeaud, Andrew Brock, Aida Nematzadeh, Sahand Sharifzadeh, Mikolaj Binkowski, Ricardo Barreira, Oriol Vinyals, Andrew Zisserman, and Karen Simonyan. 2022. Flamingo: a visual language model for few-shot learning. In Advances in Neural Information Processing Systems.
|
| 235 |
+
|
| 236 |
+
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners. In Advances in Neural Information Processing Systems.
|
| 237 |
+
|
| 238 |
+
Emanuele Bugliarello, Fangyu Liu, Jonas Pfeiffer, Siva Reddy, Desmond Elliott, Edoardo Maria Ponti, and Ivan Vulic. 2022. IGLUE: A benchmark for transfer learning across modalities, tasks, and languages. In Proceedings of the International Conference on Machine Learning.
|
| 239 |
+
|
| 240 |
+
Xi Chen, Xiao Wang, Lucas Beyer, Alexander Kolesnikov, Jialin Wu, Paul Voigtlaender, Basil Mustafa, Sebastian Goodman, Ibrahim Alabdul-mohsin, Piotr Padlewski, et al. 2023a. PaLI-3 vision language models: Smaller, faster, stronger. arXiv preprint arXiv:2310.09199.
|
| 241 |
+
|
| 242 |
+
Xi Chen, Xiao Wang, Soravit Changpinyo, AJ Piergiovanni, Piotr Padlewski, Daniel Salz, Sebastian Goodman, Adam Grycner, Basil Mustafa, Lucas Beyer, Alexander Kolesnikov, Joan Puigcerver, Nan Ding, Keran Rong, Hassan Akbari, Gaurav Mishra, Linting Xue, Ashish V Thapliyal, James Bradbury, Weicheng Kuo, Mojtaba Seyedhosseini, Chao Jia, Burcu Karagol Ayan, Carlos Riquelme Ruiz, Andreas Peter Steiner, Anelia Angelova, Xiaohua Zhai, Neil Houlsby, and Radu Soricut. 2023b. PaLI: A jointly-scaled multilingual language-image model.
|
| 243 |
+
|
| 244 |
+
In Proceedings of the International Conference on Learning Representations.
|
| 245 |
+
Xinlei Chen, Hao Fang, Tsung-Yi Lin, Ramakrishna Vedantam, Saurabh Gupta, Piotr Dólár, and C Lawrence Zitnick. 2015. Microsoft COCO captions: Data collection and evaluation server. arXiv preprint arXiv:1504.00325.
|
| 246 |
+
Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Yunxuan Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Alex Castro-Ros, Marie Pellat, Kevin Robinson, Dasha Valter, Sharan Narang, Gaurav Mishra, Adams Yu, Vincent Zhao, Yanping Huang, Andrew Dai, Hongkun Yu, Slav Petrov, Ed H. Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V. Le, and Jason Wei. 2022. Scaling instruction-finetuned language models. arXiv preprint arXiv:2210.11416.
|
| 247 |
+
Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettle-moyer, and Veselin Stoyanov. 2020. Unsupervised cross-lingual representation learning at scale. In Proceedings of the Annual Meeting of the Association for Computational Linguistics.
|
| 248 |
+
Wenliang Dai, Junnan Li, Dongxu Li, Anthony Tiong, Junqi Zhao, Weisheng Wang, Boyang Li, Pascale Fung, and Steven Hoi. 2023. InstructBLIP: Towards general-purpose vision-language models with instruction tuning. In Advances in Neural Information Processing Systems.
|
| 249 |
+
Michael Denkowski and Alon Lavie. 2014. Meteor universal: Language specific translation evaluation for any target language. In Proceedings of the Workshop on Statistical Machine Translation.
|
| 250 |
+
Gregor Geigle, Abhay Jain, Radu Timofte, and Goran Glavaš. 2023. mBLIP: Efficient bootstrapping of multilingual vision-llms. arXiv preprint arXiv:2307.06930.
|
| 251 |
+
Naman Goyal, Jingfei Du, Myle Ott, Giri Anantharaman, and Alexis Conneau. 2021. Larger-scale transformers for multilingual masked language modeling. In Proceedings of the Workshop on Representation Learning for NLP.
|
| 252 |
+
Lisa Anne Hendricks, Kaylee Burns, Kate Saenko, Trevor Darrell, and Anna Rohrbach. 2018. Women also snowboard: Overcoming bias in captioning models. In Proceedings of the European Conference on Computer Vision (ECCV).
|
| 253 |
+
Xiaowei Hu, Zhe Gan, Jianfeng Wang, Zhengyuan Yang, Zicheng Liu, Yumao Lu, and Lijuan Wang. 2022. Scaling up vision-language pre-training for image captioning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.
|
| 254 |
+
|
| 255 |
+
Gautier Izacard, Patrick Lewis, Maria Lomeli, Lucas Hosseini, Fabio Petroni, Timo Schick, Jane Dwivedi-Yu, Armand Joulin, Sebastian Riedel, and Edouard Grave. 2022. Few-shot learning with retrieval augmented language models. arXiv preprint arXiv:2208.03299.
|
| 256 |
+
Jeff Johnson, Matthijs Douze, and Hervé Jégou. 2017. Billion-scale similarity search with GPUs. arXiv preprint arXiv:1702.08734.
|
| 257 |
+
Andrej Karpathy and Li Fei-Fei. 2015. Deep visual-semantic alignments for generating image descriptions. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.
|
| 258 |
+
Urvashi Khandelwal, Angela Fan, Dan Jurafsky, Luke Zettlemoyer, and Mike Lewis. 2020. Nearest neighbor machine translation. arXiv preprint arXiv:2010.00710.
|
| 259 |
+
Diederik P Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980.
|
| 260 |
+
Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Kuttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, and Douwe Kiela. 2020. Retrieval-augmented generation for knowledge-intensive NLP tasks. In Advances in Neural Information Processing Systems.
|
| 261 |
+
Junnan Li, Dongxu Li, Silvio Savarese, and Steven Hoi. 2023. BLIP-2: Bootstrapping language-image pretraining with frozen image encoders and large language models. arXiv preprint arXiv:2301.12597.
|
| 262 |
+
Junnan Li, Dongxu Li, Caiming Xiong, and Steven Hoi. 2022. BLIP: Bootstrapping language-image pretraining for unified vision-language understanding and generation. arXiv preprint arXiv:2201.12086.
|
| 263 |
+
Chin-Yew Lin. 2004. ROUGE: A package for automatic evaluation of summaries. In Proceedings of the Workshop Text Summarization Branches Out.
|
| 264 |
+
Xi Victoria Lin, Todor Mihaylov, Mikel Artetxe, Tianlu Wang, Shuohui Chen, Daniel Simig, Myle Ott, Naman Goyal, Shruti Bhosale, Jingfei Du, et al. 2021. Few-shot learning with multilingual language models. arXiv preprint arXiv:2112.10668.
|
| 265 |
+
Fangyu Liu, Emanuele Bugliarello, Edoardo Maria Ponti, Siva Reddy, Nigel Collier, and Desmond Eliott. 2021. Visually grounded reasoning across languages and cultures. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing.
|
| 266 |
+
Ziyang Luo, Yadong Xi, Rongsheng Zhang, and Jing Ma. 2022. I-tuning: Tuning language models with image for caption generation. arXiv preprint arXiv:2202.06574.
|
| 267 |
+
|
| 268 |
+
Oscar Manas, Pau Rodriguez Lopez, Saba Ahmadi, Aida Nematzadeh, Yash Goyal, and Aishwarya Agrawal. 2023. MAPL: Parameter-efficient adaptation of unimodal pre-trained models for vision-language few-shot prompting. In Proceedings of the Conference of the European Chapter of the Association for Computational Linguistics.
|
| 269 |
+
Michael McCloskey and Neal J Cohen. 1989. Catastrophic interference in connectionist networks: The sequential learning problem. In Psychology of learning and motivation, volume 24.
|
| 270 |
+
Ron Mokady, Amir Hertz, and Amit H. Bermano. 2021. Clipcap: Clip prefix for image captioning. arXiv preprint arXiv:2111.09734.
|
| 271 |
+
Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. BLEU: a method for automatic evaluation of machine translation. In Proceedings of the Annual Meeting of the Association for Computational Linguistics.
|
| 272 |
+
Matt Post. 2018. A call for clarity in reporting BLEU scores. In Proceedings of the Third Conference on Machine Translation: Research Papers, pages 186-191, Brussels, Belgium. Association for Computational Linguistics.
|
| 273 |
+
Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. 2021. Learning transferable visual models from natural language supervision. In Proceedings of the International Conference on Machine Learning.
|
| 274 |
+
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9.
|
| 275 |
+
Rita Ramos, Bruno Martins, and Desmond Elliott. 2023a. LMCap: Few-shot multilingual image captioning by retrieval augmented language model prompting. Findings of the Association for Computational Linguistics.
|
| 276 |
+
Rita Ramos, Bruno Martins, Desmond Elliott, and Yova Kementchedjhieva. 2023b. SmallCap: Lightweight image captioning prompted with retrieval augmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.
|
| 277 |
+
Rita Parada Ramos, Patricia Pereira, Helena Moniz, Joao Paulo Carvalho, and Bruno Martins. 2021. Retrieval augmentation for deep neural networks. In Proceedings of the International Joint Conference on Neural Networks.
|
| 278 |
+
Sara Sarto, Marcella Cornia, Lorenzo Baraldi, and Rita Cucchiara. 2022. Retrieval-augmented transformer for image captioning. arXiv preprint arXiv:2207.13162.
|
| 279 |
+
|
| 280 |
+
Piyush Sharma, Nan Ding, Sebastian Goodman, and Radu Soricut. 2018. Conceptual captions: A cleaned, hypernymed, image alt-text dataset for automatic image captioning. In Proceedings of the Annual Meeting of the Association for Computational Linguistics.
|
| 281 |
+
Weijia Shi, Sewon Min, Michihiro Yasunaga, Minjoon Seo, Rich James, Mike Lewis, Luke Zettle-moyer, and Wen-tau Yih. 2023. Replug: Retrievalaugmented black-box language models. arXiv preprint arXiv:2301.12652.
|
| 282 |
+
Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. 2023. Stanford Alpaca: An instruction-following LLaMA model. https://github.com/tatsu-lab/stanford_alpaca.
|
| 283 |
+
Ashish V Thapliyal, Jordi Pont-Tuset, Xi Chen, and Radu Soricut. 2022. Crossmodal-3600: A massively multilingual multimodal evaluation dataset. arXiv preprint arXiv:2205.12522.
|
| 284 |
+
Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. 2023. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971.
|
| 285 |
+
Maria Tsimpoukelli, Jacob L Menick, Serkan Cabi, S. M. Ali Eslami, Oriol Vinyals, and Felix Hill. 2021. Multimodal few-shot learning with frozen language models. In Advances in Neural Information Processing Systems, volume 34, pages 200-212.
|
| 286 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Processing Systems.
|
| 287 |
+
Ramakrishna Vedantam, C Lawrence Zitnick, and Devi Parikh. 2015. CIDEr: consensus-based image description evaluation. In Proceedings of the IEEE/CVF conference on Computer Vision and Pattern Recognition.
|
| 288 |
+
Jianfeng Wang, Zhengyuan Yang, Xiaowei Hu, Linjie Li, Kevin Lin, Zhe Gan, Zicheng Liu, Ce Liu, and Lijuan Wang. 2022. Git: A generative image-to-text transformer for vision and language. arXiv preprint arXiv:2205.14100.
|
| 289 |
+
Zirui Wang, Jiahui Yu, Adams Wei Yu, Zihang Dai, Yulia Tsvetkov, and Yuan Cao. 2021. SimVLM: Simple visual language model pretraining with weak supervision. arXiv preprint arXiv:2108.10904.
|
| 290 |
+
Jason Wei, Maarten Bosma, Vincent Y Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M Dai, and Quoc V Le. 2021. Finetuned language models are zero-shot learners. arXiv preprint arXiv:2109.01652.
|
| 291 |
+
|
| 292 |
+
Thomas Wolf, Julien Chaumont, Lysandre Debut, Victor Sanh, Clement Delangue, Anthony Moi, Pierric Cistac, Morgan Funtowicz, Joe Davison, Sam Shleifer, et al. 2020. Transformers: State-of-the-art natural language processing. In Proceedings of the Conference on Empirical Methods in Natural Language Processing: System Demonstrations.
|
| 293 |
+
Chunpu Xu, Wei Zhao, Min Yang, Xiang Ao, Wangrong Cheng, and Jinwen Tian. 2019. A unified generation-retrieval framework for image captioning. Proceedings of the ACM International Conference on Information and Knowledge Management.
|
| 294 |
+
Zhuolin Yang, Wei Ping, Zihan Liu, Vijay Korthikanti, Weili Nie, De-An Huang, Linxi Fan, Zhiding Yu, Shiyi Lan, Bo Li, et al. 2023. Re-ViLM: Retrieval-augmented visual language model for zero and few-shot image captioning. arXiv preprint arXiv:2302.04858.
|
| 295 |
+
Ziyan Yang, Leticia Pinto-Alva, Franck Dernoncourt, and Vicente Ordonez. 2020. Using visual feature space as a pivot across languages. In *Findings of the Association for Computational Linguistics*.
|
| 296 |
+
Wenhao Yu, Hongming Zhang, Xiaoman Pan, Kaixin Ma, Hongwei Wang, and Dong Yu. 2023. Chain-of-note: Enhancing robustness in retrieval-augmented language models. arXiv preprint arXiv:2311.09210.
|
| 297 |
+
Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona Diab, Xian Li, Xi Victoria Lin, et al. 2022. Opt: Open pre-trained transformer language models. arXiv preprint arXiv:2205.01068.
|
| 298 |
+
Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Ordonez, and Kai-Wei Chang. 2017. Men also like shopping: Reducing gender bias amplification using corpus-level constraints. arXiv preprint arXiv:1707.09457.
|
| 299 |
+
Shanshan Zhao, Lixiang Li, Haipeng Peng, Zihang Yang, and Jiaxuan Zhang. 2020. Image caption generation via unified retrieval and generation-based method. Applied Sciences, 10(18).
|
| 300 |
+
|
| 301 |
+
# A Prompt
|
| 302 |
+
|
| 303 |
+
To generate captions across different languages, we customize our prompt and the retrieved captions to be in the selected language. In Figure 4, we give examples in Spanish, Hindi, and Chinese, respectively. The prompts for the other languages are included in our code.
|
| 304 |
+
|
| 305 |
+
# B Retrieval
|
| 306 |
+
|
| 307 |
+
Ramos et al. (2023b) has shown in the SmallCap retrieval-augmented captioning model that CLIP-ViT-B/32 is suitable as an encoder for text generation, but when used as a retrieval encoder it performs poorly. We thus pick the state-of-the-art version of CLIP, CLIP-ViT-bigG-14, for retrieval. We refrain from using that larger version in the model's encoder too, since that would significantly slow down training time.
|
| 308 |
+
|
| 309 |
+
# C Standard Evaluation Metrics
|
| 310 |
+
|
| 311 |
+
For a more comprehensive evaluation, we report the performance of our model with additional automatic metrics, including BLEU-1 (B-1), BLEU-4 (B-4) (Papineni et al., 2002), ROGUE-L (Lin, 2004), and METEOR (Denkowski and Lavie, 2014). We report these metrics both for the XM3600 dataset and the COCO-35L validation split, as seen in Table 4 and Table 5, respectively.
|
| 312 |
+
|
| 313 |
+
<table><tr><td></td><td>B-1</td><td>B-4</td><td>ROGUE-L</td><td>METEOR</td></tr><tr><td>en</td><td>45.1</td><td>10.3</td><td>34.6</td><td>14.5</td></tr><tr><td>es</td><td>43.2</td><td>7.8</td><td>30.1</td><td>15.1</td></tr><tr><td>hi</td><td>29.3</td><td>2.7</td><td>21.1</td><td>21.9</td></tr><tr><td>zh</td><td>32.1</td><td>6.9</td><td>24.6</td><td>10.9</td></tr></table>
|
| 314 |
+
|
| 315 |
+
Table 4: PAELLA performance on the XM3600 dataset, across different evaluation metrics.
|
| 316 |
+
|
| 317 |
+
<table><tr><td></td><td>B-1</td><td>B-4</td><td>ROGUE-L</td><td>METEOR</td></tr><tr><td>en</td><td>76.2</td><td>33.6</td><td>55.9</td><td>26.7</td></tr><tr><td>es</td><td>76.3</td><td>35.9</td><td>54.5</td><td>27.5</td></tr><tr><td>hi</td><td>74.9</td><td>26.5</td><td>51.0</td><td>33.7</td></tr><tr><td>zh</td><td>77.2</td><td>40.0</td><td>56.4</td><td>28.8</td></tr></table>
|
| 318 |
+
|
| 319 |
+

|
| 320 |
+
|
| 321 |
+

|
| 322 |
+
|
| 323 |
+

|
| 324 |
+
Figure 4: Examples of prompts in Spanish, Hindi and Chinese, respectively, shown from the top.
|
| 325 |
+
|
| 326 |
+
# D Scalability
|
| 327 |
+
|
| 328 |
+
In Table 6, we see how PAELLA performs with different XGLM versions in the decoder. The larger-scale XGLM-2.9B has stronger performance, which aligns with previous findings regarding the scaling behaviour of LMs. Notwithstanding, the XGLM-1.7B and XGLM-564M versions are viable alternatives, considering that they can be trained in even less time and occupy less GPU memory. We also report performance on the validation split of COCO-35L in Table 7.
|
| 329 |
+
|
| 330 |
+
Table 5: PAELLA performance on the COCO-35L validation split, across different evaluation metrics.
|
| 331 |
+
|
| 332 |
+
<table><tr><td>XGLM</td><td>Time</td><td>RAM</td><td>en</td><td>es</td><td>hi</td><td>zh</td></tr><tr><td>2.9B</td><td>23h</td><td>46G</td><td>57.3</td><td>44.9</td><td>20.8</td><td>25.9</td></tr><tr><td>1.7B</td><td>14h</td><td>29G</td><td>55.8</td><td>41.0</td><td>20.1</td><td>24.6</td></tr><tr><td>564M</td><td>7h</td><td>19G</td><td>51.7</td><td>40.0</td><td>18.0</td><td>23.8</td></tr></table>
|
| 333 |
+
|
| 334 |
+
Table 6: CIDEr results on the XM3600 dataset. We report performance for different XGLMs used in the decoder component of PAELLA.
|
| 335 |
+
|
| 336 |
+
<table><tr><td>XGLM</td><td>Time</td><td>RAM</td><td>en</td><td>es</td><td>hi</td><td>zh</td></tr><tr><td>2.9B</td><td>23h</td><td>46G</td><td>113.6</td><td>113.9</td><td>86.2</td><td>123.3</td></tr><tr><td>1.7B</td><td>14h</td><td>29G</td><td>108.7</td><td>107.7</td><td>82.2</td><td>116.6</td></tr><tr><td>564M</td><td>7h</td><td>19G</td><td>103.2</td><td>103.1</td><td>76.6</td><td>111.2</td></tr></table>
|
| 337 |
+
|
| 338 |
+
Table 7: CIDEr results on the validation set of COCO-35L, across the different decoders used in PAELLA.
|
| 339 |
+
|
| 340 |
+

|
| 341 |
+
Figure 5: Ablation results on the COCO-35L dataset, reported with the CIDEr metric for the mono variant. We ablate the retrieval (NoRAG) and the visual encoder (image-blind), and compare with PAELLAmono.
|
| 342 |
+
|
| 343 |
+
# E Monolingual Retrieval
|
| 344 |
+
|
| 345 |
+
We study the behavior of our model when the retrieved captions are provided in English instead of the target language, as seen in Table 8. We can see that our model benefits from having the retrieved examples in the same language as the target output language. In this manner, the captions can guide the process of generating content in the target language, by providing a reference for what the predicted caption should resemble.
|
| 346 |
+
|
| 347 |
+
<table><tr><td>RAG</td><td>en</td><td>es</td><td>hi</td><td>zh</td></tr><tr><td>Multi</td><td>113.6</td><td>113.9</td><td>86.2</td><td>123.3</td></tr><tr><td>En</td><td>114.1</td><td>103.8</td><td>76.8</td><td>121.3</td></tr></table>
|
| 348 |
+
|
| 349 |
+
Table 8: Performance of using either retrieved captions in the target language (multi) or in English, measured through CIDEr on the COCO validation set.
|
| 350 |
+
|
| 351 |
+
# F Retrieval Impact on PAELLAmono
|
| 352 |
+
|
| 353 |
+
Similarly to the findings for PAELLA in Section 6.3, we observe in Fig 5 that retrieval augmentation plays a key role in $\mathrm{PAELLA}_{\mathrm{mono}}$ as well. Indeed, retrieval is especially important for the monolingual variant. This happens because the model relies even more on the retrieved examples to generate captions in languages that significantly differ from the English training data, as evidenced by the substantial drop in performance with NoRAG for Hindi and Chinese. We also see that the image-blind variant makes $\mathrm{PAELLA}_{\mathrm{mono}}$ 's performance decline, demonstrating that our model uses not just the information from the retrieved captions, but also the
|
| 354 |
+
|
| 355 |
+
image itself. The image-blind variant has to generate captions solely with retrieved information, which proves challenging for Hindi and Chinese. It can be difficult to figure how to combine and summarize the information from the four retrieved captions into a cohesive single output, particularly for these languages with very distinct characteristics from the English supervision. Conversely, the model effortlessly uses the retrieved information for Spanish at inference, achieving better performance through straightforward rephrasing. Moreover, the image-blind approach outperforms the NoRAG model across all four languages, further emphasizing the importance of conditioning generation with retrieved examples.
|
| 356 |
+
|
| 357 |
+
# G Cross-attention
|
| 358 |
+
|
| 359 |
+
Our model has 34M trainable parameters corresponding to the cross-attention layers. Here, we provide insight into the cross-attention setup, featuring an encoder hidden size of 768, and a decoder hidden size of 2048, with 16 attention heads and a stack of 48 layers. We reduce the size of the cross-attention projection matrices, denoted as $d$ , from the standard 128 (2048/16) to 8, in order to achieve parameter efficient training. Consequently, the total parameter count is calculated as follows:
|
| 360 |
+
|
| 361 |
+
- Key Weight Matrix size: [768, 8] (i.e., enc_d × d)
|
| 362 |
+
- Value Weight Matrix size: [768,8] (i.e., enc_d × d)
|
| 363 |
+
- Query Weight Matrix size: [2048, 8] (i.e., $dec_d \times d$ )
|
| 364 |
+
- Total parameters for one layer attention with 16 heads: $16 \times (2 \times 768 \times 8 + 2048 \times 8)$
|
| 365 |
+
- Dense weight for projection after concatenation of heads: $[16 \times 8, 2048] (h \times d \times dec_d)$
|
| 366 |
+
|
| 367 |
+
Total number of layers is 48.
|
| 368 |
+
|
| 369 |
+
$$
|
| 370 |
+
\text {T o t a l n u m b e r o f p a r a m e t e r s :} 4 8 \times (1 6 \times (2 \times 7 6 8 \times 8 + 2 0 4 8 \times 8) + 1 6 \times 8 \times 2 0 4 8) \approx 3 4 M
|
| 371 |
+
$$
|
| 372 |
+
|
| 373 |
+
# H Qualitative Results
|
| 374 |
+
|
| 375 |
+
In Fig 6, we provide examples of captions generated by PAELLA, conditioned on both the image and its retrieved captions, and captions generated by the variant without retrieval (NoRAG). In the
|
| 376 |
+
|
| 377 |
+

|
| 378 |
+
Figure 6: Qualitative examples for the captions generated by PAELLA, compared with the results generated with an ablated model that does not use retrieval augmentation.
|
| 379 |
+
|
| 380 |
+

|
| 381 |
+
|
| 382 |
+
first image, our model correctly captures the concept of owl across the different core languages, as present in the retrieved captions. PAELLA also demonstrates some robustness to potential misinformation that can occur in the retrieved captions (e.g., the second retrieved caption mentions an owl in a table). In contrast, the NoRAG variant generates incorrectly the captions for the 4 languages, struggling with identifying the bird, even misclassifying it as a giraffe for Chinese. On the second image, we present a negative example where the retrieved captions can mislead our model. PAELLA generates captions mentioning a red Swiss Army knife, likely influenced by the color present in the retrieved captions (and partially in the knife itself, although it is mainly white). Nonetheless, our model successfully generates the concept of a Swiss knife, while the NoRAG variant encounters difficulty by generating unrelated objects (e.g., either a cell phone, sunglasses, a toy or headphones for English, Span
|
| 383 |
+
|
| 384 |
+
ish, Hindi, and Chinese, respectively).
|
| 385 |
+
|
| 386 |
+
# I Performance Across the 36 Languages
|
| 387 |
+
|
| 388 |
+
In Table 9, we report XM3600 performance across all the 36 languages. We show results for our model and its variants, together with state-of-art multilingual models that have the performance for each language in the respective publications too.
|
| 389 |
+
|
| 390 |
+
<table><tr><td>Lang.</td><td>mBLIP mT0-XL</td><td>BB+CC</td><td>Lg</td><td>Mono</td><td>Core</td><td>PAELLA</td></tr><tr><td>en</td><td>80.2</td><td>58.4</td><td>34.3</td><td>58.2</td><td>58.2</td><td>57.3</td></tr><tr><td>ru</td><td>27.3</td><td>19.4</td><td>8.9</td><td>21.4</td><td>20.9</td><td>20.7</td></tr><tr><td>zh</td><td>13.5</td><td>20.2</td><td>9.9</td><td>23.5</td><td>25.4</td><td>25.9</td></tr><tr><td>de</td><td>32.5</td><td>22.4</td><td>13.0</td><td>21.7</td><td>22.1</td><td>21.5</td></tr><tr><td>es</td><td>62.6</td><td>42.5</td><td>22.0</td><td>42.2</td><td>45.0</td><td>44.9</td></tr><tr><td>fr</td><td>57.6</td><td>41.0</td><td>21.7</td><td>36.1</td><td>38.9</td><td>40.6</td></tr><tr><td>ja</td><td>33.2</td><td>25.4</td><td>14.1</td><td>13.0</td><td>18.6</td><td>21.4</td></tr><tr><td>it</td><td>45.2</td><td>32.1</td><td>16.8</td><td>29.3</td><td>32.5</td><td>33.2</td></tr><tr><td>pt</td><td>53.1</td><td>38.0</td><td>20.2</td><td>38.7</td><td>40.0</td><td>41.0</td></tr><tr><td>el</td><td>23.4</td><td>19.9</td><td>10.1</td><td>23.3</td><td>21.7</td><td>24.6</td></tr><tr><td>ko</td><td>10.4</td><td>28.8</td><td>15.2</td><td>21.7</td><td>21.2</td><td>27.2</td></tr><tr><td>fi</td><td>16.8</td><td>17.7</td><td>8.9</td><td>15.6</td><td>16.9</td><td>18.1</td></tr><tr><td>id</td><td>38.5</td><td>30.7</td><td>16.7</td><td>34.0</td><td>34.3</td><td>31.6</td></tr><tr><td>tr</td><td>22.6</td><td>23.2</td><td>12.2</td><td>19.0</td><td>19.3</td><td>21.5</td></tr><tr><td>ar</td><td>21.1</td><td>22.7</td><td>10.6</td><td>17.3</td><td>19.0</td><td>21.8</td></tr><tr><td>vi</td><td>39.2</td><td>33.6</td><td>18.2</td><td>39.3</td><td>38.7</td><td>38.0</td></tr><tr><td>th</td><td>41.9</td><td>41.8</td><td>22.6</td><td>20.8</td><td>22.1</td><td>40.4</td></tr><tr><td>hi</td><td>16.1</td><td>19.7</td><td>11.1</td><td>17.1</td><td>20.4</td><td>20.8</td></tr><tr><td>bn</td><td>11.3</td><td>20.0</td><td>13.3</td><td>18.8</td><td>16.5</td><td>21.7</td></tr><tr><td>sw</td><td>11.8</td><td>31.9</td><td>15.1</td><td>23.0</td><td>22.8</td><td>28.5</td></tr><tr><td>te</td><td>11.2</td><td>19.6</td><td>9.9</td><td>17.2</td><td>15.3</td><td>19.9</td></tr><tr><td>quiz</td><td>1.1</td><td>0.0</td><td>0.0</td><td>0.2</td><td>0.7</td><td>0.8</td></tr><tr><td colspan="7">Languages not in XGLM pre-training data</td></tr><tr><td>cs</td><td>31.8</td><td>31.3</td><td>13.9</td><td>0.5</td><td>0.2</td><td>21.6</td></tr><tr><td>da</td><td>44.2</td><td>32.9</td><td>19.2</td><td>1.0</td><td>1.0</td><td>27.3</td></tr><tr><td>fa</td><td>0.0</td><td>31.1</td><td>15.5</td><td>1.5</td><td>1.5</td><td>24.7</td></tr><tr><td>fil</td><td>17.7</td><td>35.3</td><td>18.5</td><td>1.7</td><td>2.2</td><td>26.6</td></tr><tr><td>he</td><td>18.7</td><td>23.0</td><td>9.8</td><td>0.0</td><td>0.0</td><td>15.5</td></tr><tr><td>hr</td><td>5.2</td><td>22.4</td><td>8.5</td><td>0.3</td><td>0.2</td><td>16.0</td></tr><tr><td>hu</td><td>21.5</td><td>17.5</td><td>9.6</td><td>0.4</td><td>0.1</td><td>11.5</td></tr><tr><td>mi</td><td>4.1</td><td>40.5</td><td>24.3</td><td>1.1</td><td>3.6</td><td>33.4</td></tr><tr><td>nl</td><td>55.7</td><td>44.1</td><td>23.2</td><td>1.9</td><td>2.5</td><td>36.5</td></tr><tr><td>no</td><td>46.2</td><td>38.5</td><td>23.0</td><td>1.0</td><td>1.8</td><td>31.0</td></tr><tr><td>pl</td><td>31.2</td><td>23.6</td><td>10.8</td><td>0.4</td><td>0.2</td><td>17.9</td></tr><tr><td>ro</td><td>21.7</td><td>18.8</td><td>10.0</td><td>0.8</td><td>1.2</td><td>15.3</td></tr><tr><td>sv</td><td>48.4</td><td>37.0</td><td>22.5</td><td>1.0</td><td>2.0</td><td>31.6</td></tr><tr><td>uk</td><td>0.0</td><td>18.9</td><td>8.1</td><td>2.8</td><td>2.5</td><td>13.3</td></tr><tr><td>AVG</td><td>28.3</td><td>28.5</td><td>15.0</td><td>15.5</td><td>16.8</td><td>26.2</td></tr><tr><td>AVG*</td><td>30.5</td><td>27.7</td><td>14.7</td><td>23.9</td><td>24.9</td><td>28.2</td></tr></table>
|
| 391 |
+
|
| 392 |
+
Table 9: CIDEr results on the XM3600 benchmark across the 36 languages, ordered by the pre-training language ratio of the XGLM decoder. AVG indicates the average performance across the 36 languages, whereas AVG* indicates performance across the languages on which XGLM was pre-trained.
|
2024/PAELLA_ Parameter-Efficient Lightweight Language-Agnostic Captioning Model/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:15ce7172420d25d78fc4d4b882d66462f0a3c349a4481ec50b839cdbc21a2737
|
| 3 |
+
size 700076
|
2024/PAELLA_ Parameter-Efficient Lightweight Language-Agnostic Captioning Model/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/PEEB_ Part-based Image Classifiers with an Explainable and Editable Language Bottleneck/1ba00692-86a7-4b58-869f-16e7bb8017fa_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/PEEB_ Part-based Image Classifiers with an Explainable and Editable Language Bottleneck/1ba00692-86a7-4b58-869f-16e7bb8017fa_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/PEEB_ Part-based Image Classifiers with an Explainable and Editable Language Bottleneck/1ba00692-86a7-4b58-869f-16e7bb8017fa_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:658dffa8628f14d6b881ea75b31dc67a70beca0f130862c624932e896e1258c2
|
| 3 |
+
size 2810501
|
2024/PEEB_ Part-based Image Classifiers with an Explainable and Editable Language Bottleneck/full.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/PEEB_ Part-based Image Classifiers with an Explainable and Editable Language Bottleneck/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:07dbc812d9434d1805572469bb6bf906a7aac2dd3974fddbaf0c799892b5ae1b
|
| 3 |
+
size 2359739
|
2024/PEEB_ Part-based Image Classifiers with an Explainable and Editable Language Bottleneck/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/PRODIGy_ a PROfile-based DIalogue Generation dataset/0fe4edbf-ba8c-45c4-acca-cf1da700fa41_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/PRODIGy_ a PROfile-based DIalogue Generation dataset/0fe4edbf-ba8c-45c4-acca-cf1da700fa41_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/PRODIGy_ a PROfile-based DIalogue Generation dataset/0fe4edbf-ba8c-45c4-acca-cf1da700fa41_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2075c4da5db3a068715e1ba7145336fd7e7e53a7fc68ddf8a9ed1afd36db6391
|
| 3 |
+
size 562960
|
2024/PRODIGy_ a PROfile-based DIalogue Generation dataset/full.md
ADDED
|
@@ -0,0 +1,451 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# PRODIGy: a PROfile-based DDialogue Generation dataset
|
| 2 |
+
|
| 3 |
+
Daniela Occhipinti $^{1,2}$ , Serra Sinem Tekiroglu $^{1}$ , Marco Guerini $^{1}$
|
| 4 |
+
|
| 5 |
+
$^{1}$ Fondazione Bruno Kessler, Via Sommarive 18, Povo, Trento, Italy docchipinti@fbk.eu, tekiroglu@fbk.eu, guerini@fbk.eu
|
| 6 |
+
|
| 7 |
+
$^{2}$ University of Trento, Italy
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
Providing dialogue agents with a profile representation can improve their consistency and coherence, leading to better conversations. However, current profile-based dialogue datasets for training such agents contain either explicit profile representations that are simple and dialogue-specific, or implicit representations that are difficult to collect. In this work, we introduce the PRODIGy (PROfile-based Dialogue Generation) dataset, which brings diverse representations together, providing a more comprehensive profile dimension set for each speaker. This resource comprises more than 20k dialogues, sourced from movie scripts, aligned with speaker representations such as communication style, biography, personality and gender. Initial experiments with diverse baselines show that providing generative language models with these aspects of a profile, both separately and jointly, enhances models' performance. This improvement holds true in both in-domain and cross-domain settings, for both fine-tuned and instruction-based LLMs.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
Dialogue agents capable of holding human-like interactions have drawn increasing interest in the fields of AI and NLP, becoming a key topic and challenge in both industry and academia. Unlike task-oriented systems focusing on solving specific tasks, open-domain dialogue systems aim to discuss various topics, possibly maintaining a consistent profile in their responses (Kann et al., 2022). In this work, we investigate the role of profile information in open-domain dialogue systems.
|
| 16 |
+
|
| 17 |
+
Despite recent advancements in conversational agents, due to the continuous development of neural models (Radford et al., 2019; Devlin et al., 2019; Scao et al., 2022; Zhang et al., 2022; Peng et al., 2022), these agents often struggle to maintain coherence, resulting in inconsistent or uninformative
|
| 18 |
+
|
| 19 |
+
responses. This issue adversely affects user engagement and trust (Li et al., 2016b, 2020). In this scenario, endowing dialogue systems with profile information is crucial for enhancing the models' ability to generate fluent, consistent, and informative responses (Li et al., 2016a; Zhang et al., 2018; Zemlyanskiy and Sha, 2018; Song et al., 2019; Majumder et al., 2021; Mazaré et al., 2018).
|
| 20 |
+
|
| 21 |
+
The concept of profile in a dialogue can refer to three aspects: personalisation, persona, and personality. Personalisation refers to employing users' information to drive engagement and help them satisfy their needs (Vesanen, 2007). Personality, on the other hand, is a psychological concept meant to capture how we behave and react to the world (Allport, 1937; Vinciarelli and Mohammadi, 2014). The notion of persona can have diverse meanings in literature. In this work, we will stick to the definition provided by Li et al. (2016a), according to which the persona is the character that an artificial agent plays during conversations and includes elements such as background facts, language, and interaction style.
|
| 22 |
+
|
| 23 |
+
Several approaches have been explored to integrate persona information into dialogue generation (Li et al., 2016a; Mazaré et al., 2018; Welch et al., 2022; Zhang et al., 2018; Song et al., 2021; Zheng et al., 2020; Cao et al., 2022; Majumder et al., 2020; Liu et al., 2020; Majumder et al., 2021; Zheng et al., 2019). However, these methods are typically sporadic and disjointed, addressing only one persona dimension at a time, either through an explicit representation (a few simple, dialogue-specific sentences about the user) or an implicit representation (a collection of the user's previous dialogues) that is challenging to obtain. Consequently, these approaches fail to model the complex nature of human communication, which is influenced by the interaction of multiple aspects.
|
| 24 |
+
|
| 25 |
+
In this paper, we investigate the impact of diverse profile representations in the development of
|
| 26 |
+
|
| 27 |
+
Biography: I am an actress, a star. / I live in an old mansion, built for glamorous stars of 1920s Hollywood, just off of Sunset Boulevard. / I am impatient, snobby, and selfish. / I talk like I'm the queen of the universe, my delusions of grandeur are not subtle. My home is filled with old portraits from my glory days, and I spend every afternoon watching my old films. / I am a narcissist and interested in myself. / ...
|
| 28 |
+
|
| 29 |
+

|
| 30 |
+
|
| 31 |
+
What's the matter, Norma?
|
| 32 |
+
|
| 33 |
+
Nothing. I just didn't realize what it would be like to come back to the old studio. I had no idea how I'd missed it.
|
| 34 |
+
|
| 35 |
+

|
| 36 |
+
|
| 37 |
+

|
| 38 |
+
|
| 39 |
+
We've missed you too, dear.
|
| 40 |
+
|
| 41 |
+
We'll be working again, won't we, Chief? We'll make our greatest picture.
|
| 42 |
+
|
| 43 |
+

|
| 44 |
+
|
| 45 |
+

|
| 46 |
+
|
| 47 |
+
That's what I want to talk to you about.
|
| 48 |
+
|
| 49 |
+
It's a good script, isn't it?
|
| 50 |
+
|
| 51 |
+

|
| 52 |
+
|
| 53 |
+

|
| 54 |
+
Figure 1: Example of a dialogue with diverse speaker's profile information provided.
|
| 55 |
+
|
| 56 |
+
It's got a lot of good things. Of course, it would be an expensive picture...
|
| 57 |
+
|
| 58 |
+
I don't care about the money. I just want to work again. You don't know what it means to know that you want me.
|
| 59 |
+
|
| 60 |
+

|
| 61 |
+
|
| 62 |
+
dialogue systems by comparing and benchmarking them. To this end, we introduce a new dataset, named PRODIGy (PROfile-based Dialogue Generation), that combines existing profile representations (i.e., language style, gender, personality) with novel and more complex representations of the persona, such as biographies. PRODIGy is created starting from the Cornell Movie Dialogs Corpus (Danescu-Niculescu-Mizil and Lee, 2011), which includes movie script dialogues, and adopting the character IDs and binary gender labels from the original corpus. This approach avoids privacy concerns related to employing real user data and simplifies the distribution. Moreover, the dataset has been aligned with external resources containing characters' profiles, and it can be further expanded by adding new scripts or scripts in other languages. Figure 1 illustrates an example from PRODIGy, in which the dialogue is aligned with the target speaker's profile representation.
|
| 63 |
+
|
| 64 |
+
We validated PRODIGy by benchmarking it with diverse baselines. In particular, we employed either
|
| 65 |
+
|
| 66 |
+
fine-tuning or instruction prompting, and tested a range of configurations varying the profile dimensions, both in-domain and cross-domain. Evaluation involved both automatic metrics and human assessment. As for automatic metrics, in-domain experiments show that fine-tuning LMs with diverse profile aspects significantly improves their predictive capabilities. Additionally, instructing non-fine-tuned LLMs with profile information also improves their performance. In cross-domain settings, PRODIGy-based models show better generalisation than those trained on other persona-based resources. In human evaluations, evaluators had a tendency of favouring generic responses for broader applicability. However, when responses were consistent with both profile and dialogue they were clearly preferred. Profile information proves beneficial especially in dialogues with limited context, and when disclosed to evaluators, profile-based responses are deemed more appropriate.
|
| 67 |
+
|
| 68 |
+
# 2 Related Work
|
| 69 |
+
|
| 70 |
+
We discuss three main topics relevant to our work: (i) theories on persona and personality (ii) available datasets for persona-based generation and (iii) persona and personality based models.
|
| 71 |
+
|
| 72 |
+
Persona and Personality Our communication style is closely related to social status, gender, and motivations, and offers insights into our psychological state (Pennebaker et al., 2003). These aspects are closely related to the concepts of persona and personality, which fall under the more general concept of profile (Schiaffino and Amandi, 2009). Persona can be defined as the character that an artificial agent acts during a conversation and it is a combination of identity factors, such as background facts, language use, and communication style (Li et al., 2016a). Personality is a psychological concept grasping different behaviours, feelings and way of thinking (Allport, 1937; Vinciarelli and Mohammadi, 2014). It can be formalised using theoretical frameworks called trait models, such as Big Five (John et al., 1991) and the Myers-Briggs Type Indicator (MBTI) (Myers, 1962).
|
| 73 |
+
|
| 74 |
+
Persona-Based Dialogue Datasets Several dialogical datasets contain a persona representation, many of which were collected starting from social media such as Twitter, Reddit,Weibo or Kialo. However, these datasets have various limitations. They may encounter challenges related to ephemer
|
| 75 |
+
|
| 76 |
+
ality (Klubicka and Fernandez, 2018); they can include short conversations, thus failing to fully represent real dialogues (Li et al., 2016a; Mazaré et al., 2018); they can rely only on users' dialogue history (Qian et al., 2021); they may include only generic persona representations such as gender or age (Zheng et al., 2019; Zhong et al., 2020); finally, they may not consider linguistic style, being based on controlled and redacted conversations (Scialom et al., 2020). Other resources were collected from television series transcripts (Li et al., 2016a), but are small and not sufficient to train open-domain dialogue models. One of the most widely used persona-based datasets is PersonaChat (Zhang et al., 2018), collected in a controlled crowd-sourcing environment. However, it provides a generic fact-based persona representation (e.g. "I just got my nails done") specific to single dialogues and leaving out complex aspects, such as linguistic style or biographical history.
|
| 77 |
+
|
| 78 |
+
Persona/Personality Based Dialogue Models Several approaches have been investigated to condition the dialogue generation through the persona information. On the one hand, diverse studies were based on resources using users' past dialogues to represent the persona (Li et al., 2016a; Mazaré et al., 2018; Zhong et al., 2020). On the other hand, a line of research has been built on Persona-Chat. Various approaches employed this dataset to train persona-based models in under-resourced scenarios (Song et al., 2021; Zheng et al., 2020; Cao et al., 2022). Other methodologies used Persona-Chat to test commonsense expansion (Majumder et al., 2020), mutual perception persona (Liu et al., 2020), or enriching persona information through background stories (Majumder et al., 2021). However, these studies present the same limitations of the resources they rely on. Regarding the personality-driven generation, few seminal studies have been conducted (Mairesse and Walker, 2007, 2008; Gill et al., 2012). However, they leave the interactions between personality and persona unexplored.
|
| 79 |
+
|
| 80 |
+
# 3 Construction of the PRODIGy dataset
|
| 81 |
+
|
| 82 |
+
To build the PRODIGy dataset, we started from the Cornell Movie Dialogs Corpus, a dataset of dialogues from movie scripts that includes metadata about movie genre, release year and characters' gender (Danescu-Niculescu-Mizil and Lee, 2011). The dialogues in the Cornell Movie Dialogs Corpus are between two actors and have an average length
|
| 83 |
+
|
| 84 |
+
of 4 turns. The reason for using this resource as a starting point is three-fold: (i) Data Persistence and Accessibility: it eliminates privacy issues or ephemerality problems (Klubicka and Fernandez, 2018) that would arise from collecting data from real users and, therefore, facilitates the distribution of PRODIGy to the research community; (ii) Data Enrichment: it is possible to enrich PRODIGy with the profile of movie characters through the alignment with external web resources containing information about characters and movie plots; (iii) Data Expansion: it leaves room for further development/extension; for example, it can be aligned with similar movie script resources in other languages or new movie scripts.
|
| 85 |
+
|
| 86 |
+
Below, we outline the profile representations and detail the methodology employed to annotate the characters within the dataset.
|
| 87 |
+
|
| 88 |
+
Dialogical Information. Following previous approaches (Li et al., 2016a; Qian et al., 2021), we provide an implicit representation of each character's persona through a collection of characters' dialogues. Thus, we can represent the characters' linguistic styles. To this end, we included in PRODIGy only the characters with at least 50 dialogues in the Cornell Movie Dialogs Corpus.
|
| 89 |
+
|
| 90 |
+
Personality Information. To associate each character with personality information, we cross-referenced the Cornell Movie Dialogs Corpus with the Personality Database (PDB)<sup>2</sup> website. PDB is a widely used social platform in which users can assign personality types from several trait models to fictional characters and real famous people. We use this platform as a provider of crowd-sourced characters' personality annotations.
|
| 91 |
+
|
| 92 |
+
To annotate the characters in the Cornell Movie Dialogs Corpus, we used the query movie_title+year to extract from PDB the metadata related to each movie, containing the list of the characters' names and IDs. If the character was present in the metadata, we used the query PDB_characterID to extract the MBTI type and related votes. If the MBTI type had at least 5 votes, the character was annotated. If the character was not in the metadata, a human annotator performed a manual check within PDB to verify if there was an actual match. In case the mismatch could be manually resolved, we replicated the above procedure to annotate the character. Details of the alignment
|
| 93 |
+
|
| 94 |
+
procedure are provided in Appendix A.1.
|
| 95 |
+
|
| 96 |
+
Among the several trait models provided by PDB on each character's web page, we focused on MBTI since it is widely studied and it was the most voted model by users, thus proving a more stable and reliable crowd-annotation. The MBTI trait model takes into account 16 personality types obtained from the combination of 4 dichotomies: introversion or extroversion, sensing or intuition, thinking or feeling, and judging or perceiving.
|
| 97 |
+
|
| 98 |
+
In line with the definition of personality traits, which posits their stability over time, we assigned a unique MBTI personality type to each character. This differs from the approach of Jiang et al. (2020), who assigned a different personality for each dialogue in which the character is present. Finally, for annotation reliability, we discarded the characters (and related dialogues) with less than 5 user votes and used the personality type derived from the majority of votes on each MBTI dichotomy.
|
| 99 |
+
|
| 100 |
+
Biographical Information. The third step was to provide the characters with explicit personal representations that serve as background information for all the dialogues in which the character is present. Inspired by the concept of background story by Majumder et al. (2021), we aim to provide a representation that goes beyond simple facts. To this end, we consider the biographical information. We scraped the biographies of the characters annotated with the personality information, from Charactour.com, Fandom.com and Wikipedia. Then, to automatically extract the most relevant sentences, we employed an extractive summarisation algorithm based on Kullback-Leibler distance (Haghighi and Vanderwende, 2009). Subsequently, a human-machine collaboration procedure followed, where a human annotator<sup>3</sup> modified the extracted sentences to ensure that our resource maintains an alignment with the PersonaChat dataset (Zhang et al., 2018) for comparability purposes. To achieve this, specific guidelines were formulated and provided to the annotator:
|
| 101 |
+
|
| 102 |
+
- Re-rank the top 10 sentences in order of importance, according to the speaker's profile.
|
| 103 |
+
- Convert the sentences from the third to the first person singular.
|
| 104 |
+
- Shorten excessively long sentences.
|
| 105 |
+
Enrich the sentences with missing relevant information;
|
| 106 |
+
|
| 107 |
+
- If a character biography was not found, create one by reading the movie plot.
|
| 108 |
+
|
| 109 |
+
In particular, the annotator re-ranked the sentences giving priority to crucial information that the summarisation algorithm might have originally positioned towards the end of the list, ensuring it now appears within the top five sentences. The importance criterion followed the structure of a small selection of biographies that were considered as gold. For instance, details about characters' job, lifestyle, or family background were expected to be on top of the list.
|
| 110 |
+
|
| 111 |
+
While PRODIGy biography sentences align stylistically with Persona-Chat (Zhang et al., 2018), they are not limited to generic facts and capture more complex aspects of the persona, making them qualitatively different from Persona-Chat.
|
| 112 |
+
|
| 113 |
+
To increase the number and the variability of biography sentences, ChatGPT (OpenAI, 2022) was given the original sentences and asked to produce two paraphrases. These new sentences were given to the annotator for post-editing to correct errors or further paraphrase those still too similar to the original biographies. More details about the biographical information procedure are provided in Appendix A.2. In Table 1, we present an example of the biography editing process.
|
| 114 |
+
|
| 115 |
+
As a result of the aforementioned procedures, we obtained a dataset with more than 20K dialogues for 80K turns with 300 annotated characters and more than 8k biography sentences. The dialogues are aligned with the following dimensions of one of the speakers: gender, personality type, character's biography, and linguistic style modelled by character's dialogues. Character biographies consist of an average of 8 sentences, ranging from 5 to 10 sentences, with an average of 13 tokens per sentence. Each biography sentence has been paraphrased twice. Detailed statistics of the PRODIGy dataset are provided in Table 2.
|
| 116 |
+
|
| 117 |
+
# 4Baselines and Experiments
|
| 118 |
+
|
| 119 |
+
In this section, we propose several configurations to condition the dialogue generation with profile information. In particular, we represent profiles by using either the persona, the personality information, or both. Our aim is to analyse the impact of each representation on the generation process.
|
| 120 |
+
|
| 121 |
+
For all the configurations, we employed the DialoGPT model as our baseline since it is a generative transformer-based model pre-trained on
|
| 122 |
+
|
| 123 |
+
<table><tr><td>Extracted bio</td><td>Post-edited bio</td><td>Paraphrased bio</td></tr><tr><td>1. He is too young to be so sick.
|
| 124 |
+
2. Living... in Vienna with his beautiful wife Constanze and their young son.
|
| 125 |
+
3. Relationship Status... on the rocks. He loves Constanze, but he is not making her happy.
|
| 126 |
+
4. They say he can’t be trusted with young girls.
|
| 127 |
+
5. Profession... composer.</td><td>1. I am a composer.
|
| 128 |
+
2. I live in Vienna with my beautiful wife Constanze and our young son.
|
| 129 |
+
3. My relationship is on the rocks: I love my wife Constanze, but I am not making her happy.
|
| 130 |
+
4. I am too young to be so sick.
|
| 131 |
+
5. They say I can’t be trusted with young girls.</td><td>1. I am a musician who specializes in composition.
|
| 132 |
+
2. I live in Vienna with my wife Constanze and our young son.
|
| 133 |
+
3. My relationship with Constanze is strained: I love her, but I am not making her happy.
|
| 134 |
+
4. I am too young to be suffering from illness.
|
| 135 |
+
5. People say that I cannot be trusted around young girls.</td></tr></table>
|
| 136 |
+
|
| 137 |
+
Table 1: Example of the modifications made to a biography during the editing process, along with one of the corresponding paraphrases. Colour highlights indicate sentences that were re-ranked (e.g., a sentence ranked 6th in Extracted Bio is moved to 1st position in Post-Edited Bio).
|
| 138 |
+
|
| 139 |
+
<table><tr><td>Category</td><td>Statistics</td></tr><tr><td>Dialogues</td><td>20850</td></tr><tr><td>Turns</td><td>80604</td></tr><tr><td>Annotated Characters</td><td>339</td></tr><tr><td>Biography Sentences</td><td>8498</td></tr><tr><td>Turns per Dialogue</td><td>4 (±3.28)</td></tr><tr><td>Dialogues per Character</td><td>78 (±31.21)</td></tr><tr><td>Sentences per Bio</td><td>8 (±1.57)</td></tr><tr><td>Token per Bio Sentence</td><td>13 (±5.66)</td></tr></table>
|
| 140 |
+
|
| 141 |
+
Table 2: PRODIGy main statistics. The upper part reports counts, while the lower reports averages.
|
| 142 |
+
|
| 143 |
+
conversation-like exchanges (Zhang et al., 2020), making it the most suitable baseline for the dialogue generation task. We investigated several fine-tuning configurations. As a baseline, we fine-tuned DialogGPT without any profile information, while in the remaining configurations we fine-tuned the model considering both single profile dimensions and their combinations. Specifically, we concatenated the characters' profile information to the corresponding turns of the dialogues. In Appendix B, we provide details on the fine-tuning setup and input syntax utilised for DialogGPT.
|
| 144 |
+
|
| 145 |
+
Besides DialogGPT, we also experimented with GODEL (Peng et al., 2022), an instruction-based LLM specific for dialogue generation. Our aim is to assess the effect of providing profile information as an instruction to a non-fine-tuned LLM. The input syntax for GODEL is shown in Appendix C.
|
| 146 |
+
|
| 147 |
+
Although more powerful models are available, such as ChatGPT (OpenAI, 2022) and LLaMa 2-chat (Touvron et al., 2023), we chose to use DialoGPT and GODEL as our baselines for the following reasons: (i) ChatGPT and LLaMa 2-chat
|
| 148 |
+
|
| 149 |
+
are explicitly intended for assistant-like chat (i.e. human-machine interactions), whereas our goal is to explore dialogue models simulating broader human-human interactions, playing the role of any of the two speakers; (ii) we chose two language models comparable in pre-training data (i.e., similar human-human dialogical interactions) and parameter size; (iii) these models were already used for the dialogue generation task and allow testing of two main approaches: DialogGPT for fine-tuning and GODEL for instruction prompting in a zero-shot setting.
|
| 150 |
+
|
| 151 |
+
Regarding the inspected configurations, we provide the description as follows:
|
| 152 |
+
|
| 153 |
+
Plain Dialogue Driven Generation In the first configuration, we fine-tuned DialogoGPT and instructed GODEL only with the plain dialogue, without considering any profile information. This configuration will be used as a baseline to assess the improvement obtained by adding the various profile information to both models.
|
| 154 |
+
|
| 155 |
+
Personality Driven Generation In this configuration, we employ PRODIGy and the characters' MBTI to fine-tune DialoGPT and prompt GODEL, as it is possible to generate language reflecting a certain personality type (Mairesse and Walker, 2007, 2008; Gill et al., 2012).
|
| 156 |
+
|
| 157 |
+
Persona Driven Generation In this configuration, we employ the implicit (i.e. linguistic and stylistic information) and explicit (i.e. gender and biography sentences) persona representations in PRODIGy, either individually or jointly. This enabled us to analyse the effect of each representa
|
| 158 |
+
|
| 159 |
+
tion and combination in the dialogue generation.
|
| 160 |
+
|
| 161 |
+
Firstly, we used the characters' dialogues as implicit persona representation (Li et al., 2016a; Qian et al., 2021). We fine-tuned DialogGPT on PRODIGy, aggregating characters' dialogue lists using their IDs to capture their linguistic styles. Secondly, inspired by Zheng et al. (2019) and Schwartz et al. (2013), we considered gender as another persona representation to fine-tune DialogGPT and instruct GODEL. Then, motivated by Zhang et al. (2018), we provided DialogGPT and GODEL with persona information in the form of biography sentences. Our aim is to generate non-generic and informative responses that are consistent with both the dialogues and the biography sentences.
|
| 162 |
+
|
| 163 |
+
# Inter-Character and Intra-Character Configu
|
| 164 |
+
|
| 165 |
+
rations Using PRODIGy, we set up two configurations to train DialogPT: inter-character and intra-character. In the first configuration, the test characters are not used at training time. In the second configuration, at training time the system learns about the specific characters to be predicted at test time. In both cases, we use only 5 biography sentences, following Zhang et al. (2018). These two configurations also address privacy concerns: in one case, the LM does not retain any personal information but uses it only at inference time, while in the second, the LM stores the information about the user in its internal representation.
|
| 166 |
+
|
| 167 |
+
# 5 Automatic Evaluation
|
| 168 |
+
|
| 169 |
+
In this section, we describe the metrics and experiments for the validation of our resource.
|
| 170 |
+
|
| 171 |
+
# 5.1 Metrics
|
| 172 |
+
|
| 173 |
+
We assess model performances using two metrics: Conditional turn Perplexity (Su et al., 2021) and Average Accuracy at $N$ (Welch et al., 2022).
|
| 174 |
+
|
| 175 |
+
Conditional Perplexity (CPPL) in our scenario is the perplexity of a gold turn given the context. CPPL is used to compute the model likelihood of a turn given a dialogue history and possible profile information (see Appendix D for the formulation). With Average Accuracy at $N$ (Acc@ $N$ ), the prediction of a word from a gold turn is considered correct if it occurs within the top $N$ most probable words given by the model.
|
| 176 |
+
|
| 177 |
+
We adopted these metrics to evaluate our models in both in-domain (i.e., on PRODIGy) and cross-domain (i.e., on Persona-Chat) scenarios.
|
| 178 |
+
|
| 179 |
+
# 5.2 Analysis and Results
|
| 180 |
+
|
| 181 |
+
In this section, we provide a detailed description of the following experiments: (i) Inter-Character Experiments, (ii) Intra-Character Experiments, (iii) Cross-Domain Experiments. In these settings, we consider the target speaker's profile, excluding the interlocutor' profile. Given just the dialogue context, or both context and profile information, we aim to predict the target speaker's final turn.
|
| 182 |
+
|
| 183 |
+
Inter-Character Experiments In this setting, we partitioned PRODIGy making sure that the characters in the test set are not present in the training set, consistently with the experiments by Welch et al. (2022). We opted for the $\mathrm{B i o}_{p a r}$ model as our biography-based model. This model is trained by randomly selecting five sentences<sup>4</sup> per dialogue from the original biography or its paraphrases. The decision to use this model is based on its demonstrated superior effectiveness, as shown in a preliminary experiment (outlined in Appendix E) focusing on biography-based models.
|
| 184 |
+
|
| 185 |
+
Table 3 presents model performances based on profile information. In terms of Acc@N, these models outperform Plain Dialogue that lacks profile information. Single-profile models show similar Acc@10 performances. Also, combining multiple profile dimensions, the Acc@N scores do not differ significantly. Regarding CPPL, Plain Dialogue performs the worst, while models with profile information excel. Notably, Gender attains the best CPPL (87.92), comparable to MBTI. $\mathrm{Bio}_{\text{par}}$ performs worse than Gender and MBTI but significantly outperforms the baseline with a score of 98.27, showcasing the efficacy of high-level character descriptions. Gender's strong performance in CPPL and Acc@N may stem from the gender-specific linguistic patterns in PRODIGy's dialogues sourced from the Cornell Movie Dialogs Corpus (Schofield and Mehr, 2016), enabling the model to effectively incorporate such characteristics. Overall, the results show that adding profile information, either alone or jointly, strongly improves the models performance in terms of generalisation<sup>5</sup>.
|
| 186 |
+
|
| 187 |
+
In Table 4 we report the results obtained by prompting GODEL with the profile information.
|
| 188 |
+
|
| 189 |
+
<table><tr><td>Config.</td><td>CPPL</td><td>Acc@10</td><td>Acc@1</td></tr><tr><td>MBTI</td><td>89.30</td><td>0.665</td><td>0.317</td></tr><tr><td>φ'</td><td>87.92</td><td>0.664</td><td>0.306</td></tr><tr><td>Biopar</td><td>98.27</td><td>0.661</td><td>0.307</td></tr><tr><td>PD</td><td>541.16</td><td>0.585</td><td>0.298</td></tr><tr><td>MBTI+φ'</td><td>91.50</td><td>0.660</td><td>0.311</td></tr><tr><td>φ' + Biopar</td><td>96.31</td><td>0.658</td><td>0.299</td></tr><tr><td>MBTI + Biopar</td><td>100.35</td><td>0.653</td><td>0.296</td></tr><tr><td>MBTI + φ' + Biopar</td><td>91.65</td><td>0.660</td><td>0.302</td></tr></table>
|
| 190 |
+
|
| 191 |
+
The $CPPL$ and Acc@N values reveal better performances even when profile information is merely provided as an instruction. In particular, Plain Dialogue exhibits a worst $CPPL$ compared to MBTI and MBTI + Gender (24.00 vs 12.46). Also in terms of Acc@10, MBTI + Gender turned out to be the best-performing model. In terms of Acc@1, the best performing models are Bio and Plain Dialogue, with a score of 0.027, although they do not yield much better performances than the other models. These results show that profile information is beneficial also when prompted to non-fine-tuned instruction-based LLMs. It is important to state that, while GODEL may seem to outperform DialogPPT in terms of $CPPL$ , a direct comparison between their metrics is not possible as these models are pre-trained on distinct datasets and have a different vocabulary size.
|
| 192 |
+
|
| 193 |
+
Table 3: DialogGPT results on PRODIGy test set (Inter-Character). PD and $\xi^{\prime}$ represent Plain Dialogue and Gender, respectively.
|
| 194 |
+
|
| 195 |
+
<table><tr><td>Config.</td><td>CPPL</td><td>Acc@10</td><td>Acc@1</td></tr><tr><td>MBTI</td><td>12.46</td><td>0.080</td><td>0.026</td></tr><tr><td>φ'</td><td>13.65</td><td>0.075</td><td>0.026</td></tr><tr><td>Bio</td><td>20.43</td><td>0.082</td><td>0.027</td></tr><tr><td>PD</td><td>24.00</td><td>0.074</td><td>0.027</td></tr><tr><td>MBTI + φ'</td><td>12.46</td><td>0.083</td><td>0.025</td></tr><tr><td>MBTI + Bio</td><td>26.48</td><td>0.083</td><td>0.026</td></tr><tr><td>φ' + Bio</td><td>22.50</td><td>0.081</td><td>0.026</td></tr><tr><td>MBTI + φ' + Bio</td><td>28.96</td><td>0.083</td><td>0.026</td></tr></table>
|
| 196 |
+
|
| 197 |
+
Intra-Character Experiments In the second set of experiments, we partitioned PRODIGy with the same character existing in both training and test sets. Our aim is to simulate a scenario in which we can access the information about a character
|
| 198 |
+
|
| 199 |
+
already at training time, both explicitly (i.e. MBTI, gender, and biography) and implicitly (i.e. the character's dialogues, captured by the character ID, grasping their language style).
|
| 200 |
+
|
| 201 |
+
As shown in Table 5, endowing the model with the dialogical information (ID) provides the best results in terms of $CPPL$ . This is attributed to the model learning the character's vocabulary and language style during training, enhancing predictions. In terms of Acc@N, the best performing model is Bio (0.712 of Acc@10, and 0.348 of Acc@1). The other profile-based models exhibit similar performances. The Plain Dialogue model emerges as the weakest, proving again that fine-tuning models through profile information is beneficial. Combining biographical information and ID further enhances model efficiency in terms of $CPPL$ , with better values when a high-level character description is included. The scores in Acc@N show that, when combined with the dialogical information (ID), the biographical information improves the predictive ability of the model more than Gender and MBTI. Although ID excels in $CPPL$ , models with explicit profile information show comparable efficiency. Regarding the models trained with profile information jointly, the best performances are achieved by those trained with the characters' biographical information. Generally, models perform better in the Intra-Character setup than in the Inter-Character since they are trained with the speaker's profile information and leverage it at test time.
|
| 202 |
+
|
| 203 |
+
Table 4: GODEL results on PRODIGy test set (Inter-Character). PD and $\phi^{\prime}$ represent Plain Dialogue and Gender, respectively.
|
| 204 |
+
|
| 205 |
+
<table><tr><td>Config.</td><td>CPPL</td><td>Acc@10</td><td>Acc@1</td></tr><tr><td>Bio</td><td>58.95</td><td>0.712</td><td>0.348</td></tr><tr><td>ID</td><td>55.25</td><td>0.709</td><td>0.345</td></tr><tr><td>φ'</td><td>58.32</td><td>0.706</td><td>0.335</td></tr><tr><td>MBTI</td><td>58.32</td><td>0.706</td><td>0.346</td></tr><tr><td>PD</td><td>595.14</td><td>0.368</td><td>0.337</td></tr><tr><td>ID+Bio</td><td>54.89</td><td>0.714</td><td>0.347</td></tr><tr><td>ID+φ'</td><td>58.88</td><td>0.706</td><td>0.337</td></tr><tr><td>ID+MBTI</td><td>57.82</td><td>0.704</td><td>0.343</td></tr><tr><td>φ' + Bio</td><td>55.73</td><td>0.708</td><td>0.343</td></tr><tr><td>MBTI+Bio</td><td>55.95</td><td>0.708</td><td>0.344</td></tr><tr><td>MBTI+φ'</td><td>58.32</td><td>0.704</td><td>0.347</td></tr><tr><td>MBTI+φ' + Bio</td><td>57.08</td><td>0.710</td><td>0.339</td></tr><tr><td>ID+MBTI+Bio</td><td>53.23</td><td>0.710</td><td>0.340</td></tr><tr><td>ID+MBTI+φ'</td><td>55.48</td><td>0.705</td><td>0.344</td></tr><tr><td>ID+MBTI+φ' + Bio</td><td>54.99</td><td>0.710</td><td>0.341</td></tr></table>
|
| 206 |
+
|
| 207 |
+
Table 5: DialogGPT results on PRODIGy test set (Intra-Character). PD and $\mathfrak{F}$ represent Plain Dialogue and Gender, respectively.
|
| 208 |
+
|
| 209 |
+
Cross-Domain Experiments To evaluate the generalisation capabilities of the models trained on the PRODIGy dataset in a cross-domain scenario, we also analysed the model performances, trained both with no profile information and with biographical information, on the Persona-Chat test set (Zhang et al., 2018). These results are also compared with the models trained with the same methodology on Persona-Chat and tested on the PRODIGy test set. The results, presented in Table 6, show a significant improvement in CPPL scores when incorporating biography sentences, even in zero-shot settings (both trained on PRODIGy and tested on Persona-Chat, and vice-versa). Interestingly, using a general biography, as the one we propose, yields better generalisation capabilities than a dialogue-specific persona as in Zhang et al. (2018). When models trained on PRODIGy are tested on Persona-Chat, the results are in line with the in-domain experiments: $\mathrm{B i o}_{\text {par }}$ consistently outperforms Plain Dialogue in both CPPL and Acc@ $N$ . On the contrary, in the scenario in which we trained the models on Persona-Chat and tested on PRODIGy, the Bio model's Acc@ $N$ scores are lower than Plain Dialogue's scores. This might suggest that persona sentences do not capture personas' complex characteristics, therefore they might be less effective to generalise in a cross-domain scenario.
|
| 210 |
+
|
| 211 |
+
<table><tr><td>Train → Test</td><td>Config.</td><td>CPPL</td><td>Acc@10</td><td>Acc@1</td></tr><tr><td rowspan="2">PROD. → PC</td><td>PD</td><td>891.80</td><td>0.444</td><td>0.184</td></tr><tr><td>Biopar</td><td>219.07</td><td>0.533</td><td>0.200</td></tr><tr><td rowspan="2">PC → PROD.</td><td>PD</td><td>1.32e+05</td><td>0.333</td><td>0.139</td></tr><tr><td>Bio</td><td>3.27e+04</td><td>0.309</td><td>0.119</td></tr></table>
|
| 212 |
+
|
| 213 |
+
Table 6: DialogGPT results on cross-domain experiments: fine-tuning on PRODIGy and test on PersonaChat (PROD. $\rightarrow$ PC) and vice-versa (PC $\rightarrow$ PROD.). PD represents Plain Dialogue.
|
| 214 |
+
|
| 215 |
+
# 6 Human Evaluation
|
| 216 |
+
|
| 217 |
+
Besides the automatic evaluation, we also run an human evaluation study to validate PRODIGy.
|
| 218 |
+
|
| 219 |
+
This evaluation involved six subjects, comprising four PhD students in Computer Science and two MSc students in Data Science. Evaluators received 100 dialogues each, 50 with profile information disclosed and 50 without profile disclosure, so to enable an assessment of profile information's impact on judgements. We focused on output generated
|
| 220 |
+
|
| 221 |
+
using top-p decoding by four models trained during inter-character experiments: the model trained on dialogues only and the models trained with one profile dimension. Evaluators ranked five possible responses for each dialogue, including the gold response used as a control condition, on a scale from 1 (most likely) to 5 (least likely) based on perceived likelihood of being the target speaker's response. In total, we collected 3000 evaluations. Subsequently, we conducted post-hoc qualitative interviews with the evaluators.
|
| 222 |
+
|
| 223 |
+
# 6.1 Results
|
| 224 |
+
|
| 225 |
+
The human evaluation reveals that the gold responses are preferred by far over the generated responses, indicating clear room for future improvement over the baselines we employed. Notably, Plain Dialogue was the favoured model, with only marginal rating differences compared to other models. From the post-hoc interviews, it emerged that Plain Dialogue's ability to produce generic responses that easily fit into various dialogues was often the reason for this preference. However, an interesting shift occurs when evaluators are made aware of the speaker's profile. In such cases, there is a noticeable increase in the preference for profile-based model responses over Plain Dialogue responses. This shift is shown in Table 7, which outlines the percentages of times evaluators favored profile-based models over Plain Dialogue. This trend can be attributed to a clear preference towards generations that exhibit coherence with both profile information and dialogue context, emphasising the significance of the profile in the generation process. Finally, profile-based models receive more favourable evaluations in shorter contexts, suggesting that the inclusion of profile information is advantageous when the dialogue context provides limited information about the speaker.
|
| 226 |
+
|
| 227 |
+
<table><tr><td rowspan="2">Response</td><td colspan="2">All turns</td><td colspan="2">≤ 6 turns</td><td colspan="2">> 6 turns</td></tr><tr><td>No</td><td>With</td><td>No</td><td>With</td><td>No</td><td>With</td></tr><tr><td>Biopar</td><td>43.14</td><td>47.60</td><td>44.30</td><td>47.85</td><td>40.95</td><td>47.14</td></tr><tr><td>MBTI</td><td>44.96</td><td>49.59</td><td>46.33</td><td>50.38</td><td>42.38</td><td>48.10</td></tr><tr><td>φ'</td><td>45.36</td><td>44.04</td><td>46.19</td><td>43.91</td><td>44.29</td><td>49.52</td></tr></table>
|
| 228 |
+
|
| 229 |
+
Table 7: Preference Percentages across different dialogue lengths: responses of profile-based Models vs. Plain Dialogue Responses. $\varphi$ represents Gender. No/With indicates profile information disclosure to evaluators.
|
| 230 |
+
|
| 231 |
+
<table><tr><td>Input</td><td>Responses</td></tr><tr><td>Biography: (1) I am a janitor at the Massachusetts Institute of Technology. (2) I live in a rough, working-class Irish neighborhood in south Boston. (3) I am seeing a Harvard girl named Skylar. (4) I am cocky, brash, and combative: while I am often crude, my quick wits mark me as unmistakably intelligent. (5) I have to put my mathematical genius to work by helping Professor Gerald Lambeau and start seeing a psychiatrist. MBTI: Introvert, Intuitive, Thinker, Perceiver Gender: Male</td><td rowspan="2">• [Gold] B: It's like a small figure, hoverin' over me. Gettin' closer.
|
| 232 |
+
• [Plain Dialogue] B: I don't know. It just looks like a black couch. It's too bright.
|
| 233 |
+
• [Bio par] B: I see a skeleton.
|
| 234 |
+
• [MBTI] B: I'm sure you can tell me.
|
| 235 |
+
• [Gender] B: It's a door, I don't know which one but I want to find out for sure and put an end to this shit before it gets any worse.</td></tr><tr><td>Dialogue:
|
| 236 |
+
A: Okay, you're in your bed. Now how old are you?
|
| 237 |
+
B: Seven.
|
| 238 |
+
A: And what do you see?
|
| 239 |
+
B: Somethin's in my room.
|
| 240 |
+
A: What is it?</td></tr></table>
|
| 241 |
+
|
| 242 |
+
Table 8: Example of Inter-Character models' generations.
|
| 243 |
+
|
| 244 |
+
While Plain Dialogue might be favoured for its generic responses adaptable to various dialogues, it is worth noting that each profile-based model learns unique patterns from the profile information during training, resulting in responses tailored to individual speakers. The example in Table 8 illustrates this phenomenon. Plain Dialogue's response is a fairly generic answer that fits the context of the dialogue well. However, each profile-based model's generation reflects the speaker's profile information. $\mathrm{B i o}_{\text {par }}$ 's output closely aligns with the Gold response concept. Given the character's biography indicating a need for psychiatric help, the model inferred a potential mental distress, responding with "I see a skeleton." The MBTI response aligns with the introverted trait of the character, who is reluctant to answer the interlocutor: "I'm sure you can tell me." The Gender model's response incorporates stereotypical male patterns (e.g. the use of the swear word "shit"), common in the Cornell Movie Dialogs corpus (Schofield and Mehr, 2016).
|
| 245 |
+
|
| 246 |
+
These findings are consistent with the feedbacks from evaluators that we gathered in a post-hoc interview. Evaluators expressed a preference for generic answers, typically generated by Plain Dialogue, due to their broader applicability. This was particularly evident in those cases where responses generated by profile-based models matched the profile information of the speaker but not the dialogue context, thus negatively impacting perceived answer quality. However, when profile information was provided to evaluators, the preference for responses consistent with both profile and dialogue clearly emerged. At a closer inspection of such cases, we found that these sentences, consistent with both
|
| 247 |
+
|
| 248 |
+
profile and dialogue, were often preferred even to gold responses. Conversely, the overarching inclination for gold responses was not given because they were familiar to evaluators: they reported not recognising them, and more broadly to having seen only few of the movies whose dialogues were evaluated. See Appendix G for additional details.
|
| 249 |
+
|
| 250 |
+
# 7 Conclusion
|
| 251 |
+
|
| 252 |
+
In this paper we introduced PRODIGy, a new dataset of movie dialogues aligned with characters' profile information, i.e. personality type, gender, biography, and a collection of speakers' dialogues, useful for inferring their vocabulary and language style. Derived from movie scripts, PRODIGy also mitigates privacy concerns associated with real user data. To validate this resource, we conducted several experiments using diverse baselines, both via fine-tuning and instruction prompting. Results indicate that including profile information in both approaches improved models' performance. Moreover, the cross-domain experiments showed that PRODIGy-based models exhibit better generalisation than those trained on similar resources. Results from the human evaluation showed that, despite a preference for generic responses due to their broader applicability, responses consistent with both profile and dialogue are clearly favoured. Moreover, the results highlight the value of incorporating profile information, especially when speaker's information provided within the dialogue context is limited.
|
| 253 |
+
|
| 254 |
+
# Limitations
|
| 255 |
+
|
| 256 |
+
The fact that PRODIGy includes fictional characters could imply that the roles may be stereotyped. The high predictivity of the model trained on characters' gender is a potential indicator of this hypothesis. Thus, while PRODIGy allows avoiding a number of privacy issues, it may be less realistic. However, this problem may be present in other datasets, such as Persona-Chat, where users were simulated. Moreover, as regards to Gender, PRODIGy is limited to a binary classification since it is the one originally provided by the Cornell Movie Dialogs Corpus. Finally, the human evaluation shows a strong preference for gold responses, suggesting significant room for improvement, which we plan to address in future work.
|
| 257 |
+
|
| 258 |
+
# Ethics Statement
|
| 259 |
+
|
| 260 |
+
One of the potential risks of profile-based dialogue systems is that they need to collect users' information, thus creating the risk of such private data being misused or leaked (Krishnamurthy et al.; Corrigan et al., 2014). The two configurations (i.e. inter-character and intra-character) we propose in this paper have been implemented in light of this. Being able to understand the impact of each of the profile dimensions within a dialogue system can be useful to determine which are the sensitive data necessary to develop a dialogue system and which could be left out in order to preserve the users' privacy (Dudy et al., 2021). Another problem is the possible fully automated use of profile-based models. Such systems, if left to act completely autonomously, may make erroneous assumptions, even in imitating a given user, thus returning possibly misleading answers.
|
| 261 |
+
|
| 262 |
+
# References
|
| 263 |
+
|
| 264 |
+
Gordon Willard Allport. 1937. Personality: A psychological interpretation.
|
| 265 |
+
Yu Cao, Wei Bi, Meng Fang, Shuming Shi, and Dacheng Tao. 2022. A model-agnostic data manipulation method for persona-based dialogue generation. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 7984–8002, Dublin, Ireland. Association for Computational Linguistics.
|
| 266 |
+
Hope B Corrigan, Georgiana Craciun, and Allison M Powell. 2014. How does target know so much about its customers? utilizing customer analytics to make
|
| 267 |
+
|
| 268 |
+
marketing decisions. Marketing Education Review, 24(2):159-166.
|
| 269 |
+
Cristian Danescu-Niculescu-Mizil and Lillian Lee. 2011. Chameleons in imagined conversations: A new approach to understanding coordination of linguistic style in dialogs. In Proceedings of the 2nd Workshop on Cognitive Modeling and Computational Linguistics, pages 76-87, Portland, Oregon, USA. Association for Computational Linguistics.
|
| 270 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171-4186, Minneapolis, Minnesota. Association for Computational Linguistics.
|
| 271 |
+
Shiran Dudy, Steven Bedrick, and Bonnie Webber. 2021. Refocusing on relevance: Personalization in NLG. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 5190-5202, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
|
| 272 |
+
Alastair Gill, Carsten Brockmann, and Jon Oberlander. 2012. Perceptions of alignment and personality in generated dialogue. In INLG 2012 Proceedings of the Seventh International Natural Language Generation Conference, pages 40-48, Utica, IL. Association for Computational Linguistics.
|
| 273 |
+
Aria Haghighi and Lucy Vanderwende. 2009. Exploring content models for multi-document summarization. In Proceedings of Human Language Technologies: The 2009 Annual Conference of the North American Chapter of the Association for Computational Linguistics, pages 362-370, Boulder, Colorado. Association for Computational Linguistics.
|
| 274 |
+
Hang Jiang, Xianzhe Zhang, and Jinho D Choi. 2020. Automatic text-based personality recognition on monologues and multiparty dialogues using attentive networks and contextual embeddings (student abstract). In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 13821-13822.
|
| 275 |
+
Oliver P John, Eileen M Donahue, and Robert L Kentle. 1991. Big five inventory. Journal of Personality and Social Psychology.
|
| 276 |
+
Katharina Kann, Abteen Ebrahimi, Joewie Koh, Shiran Dudy, and Alessandro Roncone. 2022. Open-domain dialogue generation: What we can do, cannot do, and should do next. In Proceedings of the 4th Workshop on NLP for Conversational AI, pages 148-165, Dublin, Ireland. Association for Computational Linguistics.
|
| 277 |
+
Filip Klubicka and Raquel Fernandez. 2018. Examining a hate speech corpus for hate speech detection and popularity prediction. In 4REAL 2018 Workshop on
|
| 278 |
+
|
| 279 |
+
Replicability and Reproducibility of Research Results in Science and Technology of Language, page 16.
|
| 280 |
+
Balachander Krishnamurthy, Konstantin Naryshkin, and Craig Wills. Privacy leakage vs. protection measures: the growing disconnect.
|
| 281 |
+
Jiwei Li, Michel Galley, Chris Brockett, Georgios Spithourakis, Jianfeng Gao, and Bill Dolan. 2016a. A persona-based neural conversation model. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 994-1003, Berlin, Germany. Association for Computational Linguistics.
|
| 282 |
+
Jiwei Li, Will Monroe, Alan Ritter, Dan Jurafsky, Michel Galley, and Jianfeng Gao. 2016b. Deep reinforcement learning for dialogue generation. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 1192-1202, Austin, Texas. Association for Computational Linguistics.
|
| 283 |
+
Margaret Li, Stephen Roller, Ilia Kulikov, Sean Welleck, Y-Lan Boureau, Kyunghyun Cho, and Jason Weston. 2020. Don't say that! making inconsistent dialogue unlikely with unlikelihood training. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4715-4728, Online. Association for Computational Linguistics.
|
| 284 |
+
Qian Liu, Yihong Chen, Bei Chen, Jian-Guang Lou, Zixuan Chen, Bin Zhou, and Dongmei Zhang. 2020. You impress me: Dialogue generation via mutual persona perception. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1417-1427, Online. Association for Computational Linguistics.
|
| 285 |
+
François Mairesse and Marilyn Walker. 2007. PERSONAGE: Personality generation for dialogue. In Proceedings of the 45th Annual Meeting of the Association of Computational Linguistics, pages 496-503, Prague, Czech Republic. Association for Computational Linguistics.
|
| 286 |
+
François Mairesse and Marilyn A Walker. 2008. A personality-based framework for utterance generation in dialogue applications.
|
| 287 |
+
Bodhisattwa Prasad Majumder, Taylor Berg-Kirkpatrick, Julian McAuley, and Harsh Jhamtani. 2021. Unsupervised enrichment of person-grounded dialog with background stories. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 2: Short Papers), pages 585-592, Online. Association for Computational Linguistics.
|
| 288 |
+
Bodhisattwa Prasad Majumder, Harsh Jhamtani, Taylor Berg-Kirkpatrick, and Julian McAuley. 2020. Like hiking? you probably enjoy nature: Personagrounded dialog with commonsense expansions. In Proceedings of the 2020 Conference on Empirical
|
| 289 |
+
|
| 290 |
+
Methods in Natural Language Processing (EMNLP), pages 9194-9206, Online. Association for Computational Linguistics.
|
| 291 |
+
Pierre-Emmanuel Mazare, Samuel Humeau, Martin Raison, and Antoine Bordes. 2018. Training millions of personalized dialogue agents. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 2775-2779, Brussels, Belgium. Association for Computational Linguistics.
|
| 292 |
+
Isabel Briggs Myers. 1962. The myers-briggs type indicator: Manual (1962).
|
| 293 |
+
OpenAI. 2022. Chatgpt: Optimizing language models for dialogue. OpenAI blog.
|
| 294 |
+
Baolin Peng, Michel Galley, Pengcheng He, Chris Brockett, Lars Liden, Elnaz Nouri, Zhou Yu, Bill Dolan, and Jianfeng Gao. 2022. Godel: Large-scale pre-training for goal-directed dialog. arXiv preprint arXiv:2206.11309.
|
| 295 |
+
James W Pennebaker, Matthias R Mehl, and Kate G Niederhoffer. 2003. Psychological aspects of natural language use: Our words, our selves. Annual review of psychology, 54(1):547-577.
|
| 296 |
+
Hongjin Qian, Xiaohe Li, Hanxun Zhong, Yu Guo, Yueyuan Ma, Yutao Zhu, Zhanliang Liu, Zhicheng Dou, and Ji-Rong Wen. 2021. Pchatbot: A large-scale dataset for personalized chatbot. In Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 2470-2477.
|
| 297 |
+
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9.
|
| 298 |
+
Teven Le Scao, Angela Fan, Christopher Akiki, Ellie Pavlick, Suzana Ilic, Daniel Hesslow, Roman Castagné, Alexandra Sasha Luccioni, François Yvon, Matthias Galle, et al. 2022. Bloom: A 176b-parameter open-access multilingual language model. arXiv preprint arXiv:2211.05100.
|
| 299 |
+
Silvia Schiaffino and Analía Amandi. 2009. Intelligent user profiling. In Artificial intelligence an international perspective, pages 193-216. Springer.
|
| 300 |
+
Alexandra Schofield and Leo Mehr. 2016. Gender-distinguishing features in film dialogue. In Proceedings of the Fifth Workshop on Computational Linguistics for Literature, pages 32-39, San Diego, California, USA. Association for Computational Linguistics.
|
| 301 |
+
H Andrew Schwartz, Johannes C Eichstaedt, Margaret L Kern, Lukasz Dziurzynski, Stephanie M Ramones, Megha Agrawal, Achal Shah, Michal Kosinski, David Stillwell, Martin EP Seligman, et al. 2013. Personality, gender, and age in the language of social media: The open-vocabulary approach. PloS one, 8(9):e73791.
|
| 302 |
+
|
| 303 |
+
Thomas Scialom, Serra Sinem Tekiroğlu, Jacopo Staiano, and Marco Guerini. 2020. Toward stance-based personas for opinionated dialogues. In *Findings of the Association for Computational Linguistics: EMNLP* 2020, pages 2625–2635, Online. Association for Computational Linguistics.
|
| 304 |
+
Haoyu Song, Yan Wang, Kaiyan Zhang, Wei-Nan Zhang, and Ting Liu. 2021. BoB: BERT over BERT for training persona-based dialogue models from limited personalized data. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 167-177, Online. Association for Computational Linguistics.
|
| 305 |
+
Haoyu Song, Wei-Nan Zhang, Yiming Cui, Dong Wang, and Ting Liu. 2019. Exploiting persona information for diverse generation of conversational responses. arXiv preprint arXiv:1905.12188.
|
| 306 |
+
Hsuan Su, Jiun-Hao Jhan, Fan-yun Sun, Saurav Sahay, and Hung-yi Lee. 2021. Put chatbot into its interlocutor's shoes: New framework to learn chatbot responding with intention. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1559-1569, Online. Association for Computational Linguistics.
|
| 307 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288.
|
| 308 |
+
Jari Vesanen. 2007. What is personalization? a conceptual framework. European Journal of Marketing.
|
| 309 |
+
Alessandro Vinciarelli and Gelareh Mohammadi. 2014. A survey of personality computing. IEEE Transactions on Affective Computing, 5(3):273-291.
|
| 310 |
+
Charles Welch, Chenxi Gu, Jonathan K. Kummerfeld, Veronica Perez-Rosas, and Rada Mihalcea. 2022. Leveraging similar users for personalized language modeling with limited data. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1742-1752, Dublin, Ireland. Association for Computational Linguistics.
|
| 311 |
+
Yury Zemlyanskiy and Fei Sha. 2018. Aiming to know you better perhaps makes me a more engaging dialogue partner. In Proceedings of the 22nd Conference on Computational Natural Language Learning, pages 551-561, Brussels, Belgium. Association for Computational Linguistics.
|
| 312 |
+
Saizheng Zhang, Emily Dinan, Jack Urbanek, Arthur Szlam, Douwe Kiela, and Jason Weston. 2018. Personalizing dialogue agents: I have a dog, do you have pets too? In Proceedings of the 56th Annual
|
| 313 |
+
|
| 314 |
+
Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2204-2213, Melbourne, Australia. Association for Computational Linguistics.
|
| 315 |
+
Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona Diab, Xian Li, Xi Victoria Lin, et al. 2022. Opt: Open pre-trained transformer language models. arXiv preprint arXiv:2205.01068.
|
| 316 |
+
Yizhe Zhang, Siqi Sun, Michel Galley, Yen-Chun Chen, Chris Brockett, Xiang Gao, Jianfeng Gao, Jingjing Liu, and Bill Dolan. 2020. DIALOGPT: Large-scale generative pre-training for conversational response generation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: System Demonstrations, pages 270-278, Online. Association for Computational Linguistics.
|
| 317 |
+
Yinhe Zheng, Guanyi Chen, Minlie Huang, Song Liu, and Xuan Zhu. 2019. Personalized dialogue generation with diversified traits. arXiv preprint arXiv:1901.09672.
|
| 318 |
+
Yinhe Zheng, Rongsheng Zhang, Minlie Huang, and Xiaoxi Mao. 2020. A pre-training based personalized dialogue generation model with persona-sparse data. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 9693-9700.
|
| 319 |
+
Ming Zhong, Yang Liu, Da Yin, Yuning Mao, Yizhu Jiao, Pengfei Liu, Chenguang Zhu, Heng Ji, and Jiawei Han. 2022. Towards a unified multidimensional evaluator for text generation. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 2023-2038, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
|
| 320 |
+
Peixiang Zhong, Chen Zhang, Hao Wang, Yong Liu, and Chunyan Miao. 2020. Towards persona-based empathetic conversational models. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 6556-6566, Online. Association for Computational Linguistics.
|
| 321 |
+
|
| 322 |
+
# A Annotation of PRODIGy Characters Algorithms
|
| 323 |
+
|
| 324 |
+
# A.1 Annotation with Personality Information
|
| 325 |
+
|
| 326 |
+
Algorithm 1 outlines the annotation process to assign MBTI personality types to the Cornell Movie Dialogue Corpus (CMD). We selected only CMD characters appearing in at least 50 dialogues. For each character we used the query movie_title+year to extract from the Personality Database (PDB) the related movie metadata, containing the list of the movie characters' names and IDs. If the character was present in the movie metadata, we used a query PDB_characterID to extract the MBTI type and votes. If the MBTI type has at least 5 votes, the character was annotated. If the character was not found in the movie metadata, a manual check within PDB for character metadata is performed. In case the mismatch could be manually resolved, we replicated the above procedure to annotate the character.
|
| 327 |
+
|
| 328 |
+
Algorithm 1: MBTI Annotation
|
| 329 |
+
for character in CMD characters do
|
| 330 |
+
if nr_DIALOGues $\geq 50$ then
|
| 331 |
+
PDB_query movie_title $^+$ year) $\rightarrow$ movie_metadata
|
| 332 |
+
if movie_metadata found then
|
| 333 |
+
if character in movie_metadata then
|
| 334 |
+
PDB_query (PDB_character_id) $\rightarrow$ character_metadata
|
| 335 |
+
if character_metadata found then
|
| 336 |
+
extract MBTI type and n Votes
|
| 337 |
+
if n Votes $\geq 5$ then
|
| 338 |
+
Lannotate character
|
| 339 |
+
else
|
| 340 |
+
manual_check in PDB $\rightarrow$
|
| 341 |
+
character_metadata
|
| 342 |
+
if character_metadata found then
|
| 343 |
+
extract MBTI type and n Votes
|
| 344 |
+
if n Votes $\geq 5$ then
|
| 345 |
+
Lannotate character
|
| 346 |
+
|
| 347 |
+
# A.2 Annotation with Biographical Information
|
| 348 |
+
|
| 349 |
+
Algorithm 2 describes the process for scraping, revising, and enriching biographies of annotated characters. For each character annotated with MBTI, a biography was scraped from external sources. If a biography was successfully retrieved, an extractive summarisation algorithm based on Kullback-Leibler divergence (Haghighi and Vanderwende, 2009) ( $KL_{\text{based}}$ ) was applied to extract the most
|
| 350 |
+
|
| 351 |
+
relevant biography sentences and human revision was applied to the sentences. If no biography was found during the scraping process, the human annotator created a new biography from scratch. Next, an LLM (i.e. ChatGPT) was given the post-edited biography sentences and asked to generate two sets of paraphrased sentences (sentspar 1 and sentspar 2). Finally, human revision was again applied to the generated sentence sets (sentspar 1 and sentspar 2), producing the final enriched and revised version of the character's biography.
|
| 352 |
+
|
| 353 |
+
Algorithm 2: Biographies Scraping, Revision and Enrichment
|
| 354 |
+
for character in annotated Characters do
|
| 355 |
+
scrape bio from sources
|
| 356 |
+
if bio exists then
|
| 357 |
+
$KL_{\text{based}}(\text{bio}) \rightarrow \text{bio\_sents}$
|
| 358 |
+
human Revision(bio_sents) $\rightarrow$ bio_sentsrevised
|
| 359 |
+
else
|
| 360 |
+
bio_sents written from scratch
|
| 361 |
+
LLM(bio_sentsrevised) $\rightarrow$ (sentspar 1, sentspar 2)
|
| 362 |
+
human Revision(sentspar 1, sentspar 2) $\rightarrow$ (sentspar 1, sentspar 2)revised
|
| 363 |
+
|
| 364 |
+
# B DialogGPT Fine-tuning Details
|
| 365 |
+
|
| 366 |
+
In this section we report the details of the fine-tuning of each model employed during both intercharacter and intra-character experiments and the input syntax.
|
| 367 |
+
|
| 368 |
+
# B.1 Fine-tuning Setup
|
| 369 |
+
|
| 370 |
+
To investigate the impact of individual profile dimensions, we opted to employ DialogoGPT medium for all fine-tuning experiments. To maintain consistency across our trials, we kept the hyperparameters constant throughout the fine-tuning process, and we considered the type of profile information as the only variable. In particular, we fine-tuned all our models for 5 epochs with a learning rate of $1e - 6$ and a batch size of 2. The fine-tuning was performed on a single Tesla V100 GPU.
|
| 371 |
+
|
| 372 |
+
# B.2 Input Syntax
|
| 373 |
+
|
| 374 |
+
When fine-tuning DialogoGPT, we concatenated the characters' profile information to the corresponding turns of the dialogues. The input syntax employed in the experiments conducted with DialogoGPT is delineated as follows (we use the example given in Figure 1 as a reference):
|
| 375 |
+
|
| 376 |
+
<|id|> u9999 <|mbti|> extrovert, sensor, feeler, perceiver <|gender|> female <|bio|>I am an actress, a star. I live in an old man-sion, built for glamorous stars of 1920s Hollywood, just off of Sunset Boulevard. (...) <|start Dialogue|> What's the matter, Norma?<|endoftext|> u9999: Nothing. I just didn't realize what it would be like to come back to the old studio. I had no idea how I'd missed it.<|endoftext|> We've missed you too, dear.<|endoftext|> (...) u9999: turn_to_be_predicted
|
| 377 |
+
|
| 378 |
+
$< |id|>$ , $< |mbti|>$ , $< |gender|>$ , $< |bio|>$ and $< |start\_dialogue|>$ are special tokens added to the model vocabulary, and they are used to segment the input sequence. During fine-tuning, each part of the profile input and its corresponding token are added or removed depending on the configuration under inspection.
|
| 379 |
+
|
| 380 |
+
# C GODEL Prompt Syntax
|
| 381 |
+
|
| 382 |
+
During the experiments with GODEL, we prompted the model with an instruction and a context including the profile information and the dialogue context, respectively. We tasked GODEL to predict the last turn in the dialogue. Following, we provide an example of the input syntax.
|
| 383 |
+
|
| 384 |
+
Instruction: given a dialog context, you need to respond as a person having the following mbti, gender and bio: "extrovert, sensor, feeler, perceiver", "female", "I am an actress, a star. I live in an old mansion, built for glamorous stars of 1920s Hollywood, just off of Sunset Boulevard. (...)"[CONTEXT] What's the matter, Norma? EOS Nothing. I just didn't realize what it would be like to come back to the old studio. I had no idea how I'd missed it. EOS We've missed you too, dear. EOS (...EOS turn_to_be_predicted
|
| 385 |
+
|
| 386 |
+
# D Conditional Perplexity Formulation
|
| 387 |
+
|
| 388 |
+
Given $T_{n} = \{t_{n_{1}}, t_{n_{2}}, \dots, t_{n_{k}}\}$ the $n$ th turn with $k$ tokens of a dialogue with history $H = \{T_{1}, T_{2}, \dots, T_{n-1}\}$ ( $T_{n}$ is the response to $T_{n-1}$ ), the CPPL of $T_{n}$ is defined as follows:
|
| 389 |
+
|
| 390 |
+
$$
|
| 391 |
+
C P P L = \frac {1}{P \left(T _ {n} \mid H\right) ^ {\frac {1}{k}}} \tag {1}
|
| 392 |
+
$$
|
| 393 |
+
|
| 394 |
+
where $P(T_{n}|H)$ is the conditional probability of $T_{n}$ given the history $H$ and $k = |T_{n}|$ .
|
| 395 |
+
|
| 396 |
+
# E Biography-based Models experiment
|
| 397 |
+
|
| 398 |
+
In order to understand what is the best strategy to input biographies to inter-character models, we conducted a preliminary experiment. In particular, we tested three strategies to add variability to the biographies during fine-tuning: (i) $Bio$ , trained using the original top-5 biography sentences, (ii) $Bio_{rand}$ , by randomly selecting, for each dialogue, 5 biography sentences from the corresponding full set of biography sentences of the character, (iii) $Bio_{par}$ , by randomly selecting 5 sentences for each dialogue from the original biography or from the paraphrases.
|
| 399 |
+
|
| 400 |
+
Table 9 shows the effect of randomly choosing 5 sentences out of the full set of biography sentences for each training example (Bio vs. $\mathrm{Bior}_{rand}$ ): randomisation leads to an improvement in terms of $CPPL$ . Fine-tuning the models by mixing original and paraphrased biographies, thus increasing lexical variability, improves the performance even further in terms of both $CPPL$ (98.27 for $\mathrm{Biopar}$ vs. 117.26 for Bio) and Acc@N (e.g. for Acc@10, 0.661 for $\mathrm{Biopar}$ vs. 0.647 for Bio). Thus, in the inter-character experiments with DialogGPT, we will always use $\mathrm{Biopar}$ as the reference configuration.
|
| 401 |
+
|
| 402 |
+
<table><tr><td>Config.</td><td>CPPL</td><td>Acc@10</td><td>Acc@1</td></tr><tr><td>Bio</td><td>117.26</td><td>0.647</td><td>0.294</td></tr><tr><td>Biorend</td><td>106.24</td><td>0.653</td><td>0.302</td></tr><tr><td>Biopar</td><td>98.27</td><td>0.661</td><td>0.307</td></tr></table>
|
| 403 |
+
|
| 404 |
+
Table 9: DialogGPT results of the addition of variability to biography sentences on PRODIGy test set (Inter-Character)
|
| 405 |
+
|
| 406 |
+
# F Inter-Character Coherence and Groundedness Analysis
|
| 407 |
+
|
| 408 |
+
In addition to investigating how different profile dimensions affect CPPL and Acc@N, we explored their influence on response coherence (i.e. how well the response fits into the conversation) and groundedness (i.e. how relevant the response is based on profile and dialogue information). Results are consistent with Using UNIEVAL by Zhong et al. (2022), we assessed coherence and groundedness of responses from models trained on individual profile dimensions, alongside gold responses. Our analysis (Table 10) shows that: (i) all profile-based models have better metrics than plain dialogue; (ii) gold responses are the most coherent and rel
|
| 409 |
+
|
| 410 |
+
evant, highlighting room for improvement for our models. Among our models, the Gender model yields the most coherent responses (0.526), while the $\mathrm{B}\mathrm{i}\mathrm{o}_{\mathrm{par}}$ model generates the most grounded responses (0.057).
|
| 411 |
+
|
| 412 |
+
<table><tr><td></td><td>Coherence</td><td>Groundedness</td></tr><tr><td>Gold</td><td>0.581</td><td>0.066</td></tr><tr><td>g'</td><td>0.526</td><td>0.037</td></tr><tr><td>MBTI</td><td>0.520</td><td>0.033</td></tr><tr><td>Bio par</td><td>0.507</td><td>0.057</td></tr><tr><td>PD</td><td>0.462</td><td>0.026</td></tr></table>
|
| 413 |
+
|
| 414 |
+
# G Analysis of Human Evaluation Rankings
|
| 415 |
+
|
| 416 |
+
Table 11 presents the evaluators' average rankings. The scores are inverted for readability purposes: higher scores indicate better performances. The significant gap between the scores of gold and the generated responses indicates that there is wide room for improvement for our models. Among the models, Plain Dialogue receives the highest ratings, closely followed by the other models. In shorter contexts, profile-based models, i.e., $\mathrm{Bi}_{\text{par}}$ , MBTI, Gender, yield higher scores than in longer context: this suggests that profile information is beneficial when dialogue context does not provide sufficient information about the speaker. Furthermore, when the profile information is explicitly provided to evaluators, the gap between scores in shorter and longer dialogues diminishes. This suggests a positive impact of profile information on evaluators' judgements, who perceive responses generated by profile-based models as more appropriate.
|
| 417 |
+
|
| 418 |
+
Table 10: Evaluation of coherence and groundedness scores for model-generated responses compared to gold standard responses. The scoring range is [0, 1].
|
| 419 |
+
|
| 420 |
+
<table><tr><td rowspan="2">Response</td><td colspan="2">All turns</td><td colspan="2">≤6 turns</td><td colspan="2">>6 turns</td></tr><tr><td>No</td><td>With</td><td>No</td><td>With</td><td>No</td><td>With</td></tr><tr><td>Gold</td><td>4.04</td><td>3.97</td><td>3.90</td><td>3.85</td><td>4.32</td><td>4.18</td></tr><tr><td>PD</td><td>2.90</td><td>2.86</td><td>2.89</td><td>2.89</td><td>2.92</td><td>2.80</td></tr><tr><td>Biopar</td><td>2.66</td><td>2.71</td><td>2.70</td><td>2.77</td><td>2.58</td><td>2.60</td></tr><tr><td>MBTI</td><td>2.67</td><td>2.75</td><td>2.77</td><td>2.77</td><td>2.49</td><td>2.70</td></tr><tr><td>♀</td><td>2.73</td><td>2.71</td><td>2.75</td><td>2.71</td><td>2.69</td><td>2.72</td></tr></table>
|
| 421 |
+
|
| 422 |
+
Table 11: Human Evaluation Average Rankings across different dialogue lengths: higher scores indicate better performance. PD and $\phi$ represent Plain Dialogue and Gender, respectively. No/With indicates profile information disclosure to evaluators.
|
| 423 |
+
|
| 424 |
+
# H Intra-Character Generations examples
|
| 425 |
+
|
| 426 |
+
In Table 12, we provide a few examples of model generations derived from the Intra-Character configuration. Similar to the Inter-Character setup, the Plain Dialogue model produces a generic response that seamlessly fits the dialogue context. However, it is noteworthy that the output from the Bio model is particularly aligned with the Gold response concept.
|
| 427 |
+
|
| 428 |
+
# Input
|
| 429 |
+
|
| 430 |
+
Biography: (1) I live in what is left of Philadelphia the year of 2035. (2) I am single, but I am developing feelings for my psychiatrist, Dr. Railly. (3) I am a total nutcase, completely deranged, delusional, paranoid. (4) I am visiting 1990, after being tossed in jail, I have been sent back in time to learn about a virus before it started mutating. (5) When I told others I am from the future, they thought I was out of my mind and threw me in an insane asylum. MBTI: Extrovert, Intuitive, Feeler, Perceiver
|
| 431 |
+
|
| 432 |
+
# Gender: Male
|
| 433 |
+
|
| 434 |
+
# Dialogue:
|
| 435 |
+
|
| 436 |
+
A: What have you done? Did you...kill someone?
|
| 437 |
+
|
| 438 |
+
B: No! I...don't think so. I stole a car and they chased me. I hit a tree.
|
| 439 |
+
|
| 440 |
+
A: See - you can drive after all!
|
| 441 |
+
|
| 442 |
+
# Responses
|
| 443 |
+
|
| 444 |
+
- [Gold] B: Yeah, sort of, I guess. I...I'm sorry I locked you up. I thought...I thought... I think maybe I am crazy!
|
| 445 |
+
- [Plain Dialogue] B: I don't want to!
|
| 446 |
+
- [Char ID] B: Yeah! Yeah!! So what if we killed the cops! Now, I need to meet you in there tomorrow morning!
|
| 447 |
+
[Bio] B: Oh, God. I must be totally crazy.
|
| 448 |
+
- [MBTI] B: Yeah, but, what are you gonna do?
|
| 449 |
+
- [Gender] B: ...and I thought the cops were gonna catch me. They're not gonna catch me.
|
| 450 |
+
|
| 451 |
+
Table 12: Example of Intra-Character models' generations.
|
2024/PRODIGy_ a PROfile-based DIalogue Generation dataset/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:97c3059b8ce2867812391d5ef8ffeac504a6376f142923df8228b3a1af022308
|
| 3 |
+
size 420285
|
2024/PRODIGy_ a PROfile-based DIalogue Generation dataset/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/PersonaLLM_ Investigating the Ability of Large Language Models to Express Personality Traits/ee7e5113-42ec-413b-a673-b3a3d1db5d50_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/PersonaLLM_ Investigating the Ability of Large Language Models to Express Personality Traits/ee7e5113-42ec-413b-a673-b3a3d1db5d50_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/PersonaLLM_ Investigating the Ability of Large Language Models to Express Personality Traits/ee7e5113-42ec-413b-a673-b3a3d1db5d50_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:480e2b9a113e29b0575488d41bbd678a77f38d4b877b19ba1d8cf473af995443
|
| 3 |
+
size 1826173
|
2024/PersonaLLM_ Investigating the Ability of Large Language Models to Express Personality Traits/full.md
ADDED
|
@@ -0,0 +1,593 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# PersonaLLM: Investigating the Ability of Large Language Models to Express Personality Traits
|
| 2 |
+
|
| 3 |
+
Hang Jiang†‡, Xiajie Zhang†, Xubo Cao†, Cynthia Breazeal†, Deb Roy†‡, Jad Kabbara†‡
|
| 4 |
+
|
| 5 |
+
†Massachusetts Institute of Technology, ‡Stanford University
|
| 6 |
+
|
| 7 |
+
$\ddagger$ MIT Center for Constructive Communication
|
| 8 |
+
|
| 9 |
+
{hjian42, xiajie, cynthiaiab, dkroy, jkabbara}@mit.edu, xcao@stanford.edu
|
| 10 |
+
|
| 11 |
+
# Abstract
|
| 12 |
+
|
| 13 |
+
Despite the many use cases for large language models (LLMs) in creating personalized chatbots, there has been limited research on evaluating the extent to which the behaviors of personalized LLMs accurately and consistently reflect specific personality traits. We consider studying the behavior of LLM-based agents which we refer to as LLM personas and present a case study with GPT-3.5 and GPT-4 to investigate whether LLMs can generate content that aligns with their assigned personality profiles. To this end, we simulate distinct LLM personas based on the Big Five personality model, have them complete the 44-item Big Five Inventory (BFI) personality test and a story writing task, and then assess their essays with automatic and human evaluations. Results show that LLM personas' self-reported BFI scores are consistent with their designated personality types, with large effect sizes observed across five traits. Additionally, LLM personas' writings have emerging representative linguistic patterns for personality traits when compared with a human writing corpus. Furthermore, human evaluation shows that humans can perceive some personality traits with an accuracy of up to $80\%$ . Interestingly, the accuracy drops significantly when the annotators were informed of AI authorship.
|
| 14 |
+
|
| 15 |
+
# 1 Introduction
|
| 16 |
+
|
| 17 |
+
With LLMs' impressive ability to engage in human-like conversations, there has been a surge of interest in building personalized AI agents that interact with and support humans in various contexts. Startups such as Character AI<sup>1</sup> and Replika<sup>2</sup> have engaged many users through virtual characters on their fast-growing platforms. Meanwhile, in the academic sphere, research (Park et al., 2023; Wang et al., 2023b) has also suggested that generative
|
| 18 |
+
|
| 19 |
+
agents can exhibit believable human behavior and could potentially be used to simulate human agents in social science studies. However, while these generative characters are becoming ubiquitous, it is a common yet unsubstantiated assumption that these agents consistently behave in a human-like manner. Recent studies in the field of LLMs and personality have started to provide some empirical support. For example, recent research has studied personality expression in LLM-generated content (Li et al., 2022; Pan and Zeng, 2023; Safdari et al., 2023), created new benchmarks to measure personality expressed by LLMs (Jiang et al., 2022a; Wang et al., 2023a; Mao et al., 2023), and proposed better prompting techniques to induce (Karra et al., 2022; Jiang et al., 2022a,b; Caron and Srivastava, 2022; Li et al., 2023), and edit (Mao et al., 2023) personality expressed by LLMs. Despite these advancements, there has been little research in NLP that leverages insights from personality psychology and psychometric tools to study if LLMs can dutifully express personality traits. Furthermore, there is little work that explores how these agents assigned with certain personality traits are perceived by humans.
|
| 20 |
+
|
| 21 |
+
Drawing on the extensive research of the Big Five Personality model (Goldberg, 2013), we aim to investigate the capability of LLMs in expressing the Big Five personality traits – namely Extraversion, Agreeableness, Conscientiousness, Neuroticism, Openness to Experience. In this paper, we define an LLM persona to be an LLM-based agent prompted to generate content that reflects certain personality traits as defined in its initial prompt configuration. In our study, we first seek to determine whether these LLM personas can accurately reflect their assigned personalities when taking a personality test. Given that they show promising results on that initial exploration, we pursue the question of whether they can create narratives that are indicative of their assigned personality traits.
|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
Figure 1: Illustration of the core workflow of the paper. The left section presents the prompts designed to create LLM personas. The center section shows the prompt used to instruct models to write stories. The right section outlines the three-pronged analytical approach: LIWC analysis, story evaluation, and text-based personality prediction.
|
| 25 |
+
|
| 26 |
+
To assess their generated stories, we extract psycholinguistic features using dictionaries that have been designed to analyze human behavior and propose to use these features to study the behavior of LLM personas. We also investigate whether LLM personas are proficient in using lexicons related to their assigned personality profiles and whether they can convincingly portray these personalities to human observers. In other words, can human evaluators discern the assigned personality traits of the LLM personas based on their narratives? Lastly, we suggest potential avenues for extending this evaluation to more real-life scenarios, such as multi-round dialogues and action planning. Motivated by these inquiries, we aim to provide a comprehensive evaluation of LLM personas, focusing on the following research questions (RQs):
|
| 27 |
+
|
| 28 |
+
- RQ1: Can LLMs reflect the behavior of their assigned personality profiles when completing the Big Five Personality Inventory (BFI) assessment?
|
| 29 |
+
- RQ2: What linguistic patterns are evident in the stories generated by LLM personas?
|
| 30 |
+
- RQ3: How do humans and LLM raters evaluate the stories generated by LLM personas?
|
| 31 |
+
- RQ4: Can humans and LLMs accurately perceive the Big Five personality traits from stories generated by LLM personas?
|
| 32 |
+
|
| 33 |
+
# 2 Experiment Design
|
| 34 |
+
|
| 35 |
+
As shown in Figure 1, this paper investigates the behavior of LLM personas through a multi-faceted approach. We start by creating LLM personas with distinct personality traits and administer a personality assessment to them. Subsequently, we prompt these LLM personas to write stories, which we then analyze using the widely adopted Linguistic Inquiry and Word Count (LIWC) framework. Following this analysis, we recruit human evaluators to manually evaluate the stories and concurrently carry out an LLM-based automatic evaluation. Both human and LLM evaluators are required to (1) assess these stories across six dimensions, namely readability, personalness, redundancy, cohesiveness, likeability, and believability, and (2) infer the personality traits assigned to the LLM personas from the stories. The code, data, and annotations for our experiments are open sourced<sup>3</sup>.
|
| 36 |
+
|
| 37 |
+
# 2.1 Experiment Setup
|
| 38 |
+
|
| 39 |
+
# 2.1.1 Model Settings
|
| 40 |
+
|
| 41 |
+
We conduct the BFI assessment and LIWC analysis on state-of-the-art LLMs including open-source and closed-source models. We include in the main paper the results for GPT-3.5 (GPT-3.5-turbo-0613) and GPT-4 (GPT-4-0613) $^{4}$ because our results show that they
|
| 42 |
+
|
| 43 |
+
are more effective at aligning with the designated personas. Results for LLaMA-2 are presented in Appendix F and Appendix G. Temperature is set as 0.7 to introduce variability in personas' behavior. All other parameters are kept at their default settings.
|
| 44 |
+
|
| 45 |
+
# 2.1.2 LLM Persona Simulation
|
| 46 |
+
|
| 47 |
+
For GPT-3.5 and GPT-4, we simulate 10 LLM personas for each combination of the binary Big Five personality types, resulting in 320 distinct personas. They are referred to as GPT-3.5 personas and GPT-4 personas respectively. Figure 1 illustrates how we prompt an LLM to generate personas and complete specific tasks. Initially, we create an LLM Persona with a system prompt: "You are a character who is [TRAIT 1, ..., TRAIT 5]," where [TRAIT 1, ..., TRAIT 5] represents the assigned Big Five personality. For each personality dimension, we choose one descriptor among the following pairs: (1) extroverted / introverted, (2) agreeable / antagonistic, (3) conscientious / unconscientious, (4) neurotic / emotionally stable, (5) open / closed to experience.
|
| 48 |
+
|
| 49 |
+
# 2.1.3 BFI Personality Test
|
| 50 |
+
|
| 51 |
+
After specifying a personality type, we ask the LLM persona to complete the 44-item Big Five Inventory (BFI), a widely-used self-report scale designed to measure the Big Five personality traits. Only the responses that strictly adhere to the instruction format “(x) y” are accepted, where (x) indicates the question number and y indicates the level of agreement on a scale from 1-5. As the green section demonstrates in Figure 1, “(a) 5” would indicate that the persona strongly agrees that it talks a lot. Each LLM persona’s responses are aggregated into five personality scores, which are used in later analysis. We use the BFI to assess the personality profiles expressed by LLMs because it is widely utilized in personality-related studies, including many studies involving LIWC.
|
| 52 |
+
|
| 53 |
+
# 2.1.4 Storywriting
|
| 54 |
+
|
| 55 |
+
Subsequently, we prompt these 320 LLM personas to write personal stories with the following simple prompt: "Please share a personal story in 800 words. Do not explicitly mention your personality traits in the story." We impose this restriction to prevent the persona from revealing its hidden attributes, ensuring an unbiased text-based personality assessment by other LLMs and human raters.
|
| 56 |
+
|
| 57 |
+
We tried multiple prompt variants in our initial experiment and decided to purposefully simplify the prompt to reduce demand characteristics for the generalizability of the result. Examples of LLM-generated stories are included in Appendix A.
|
| 58 |
+
|
| 59 |
+
# 2.2 Evaluation Methods
|
| 60 |
+
|
| 61 |
+
We evaluate LLM personas' storytelling with a three-pronged analytical approach. First, we conduct a Linguistic Inquiry and Word Count (LIWC) analysis on stories generated by GPT-3.5 and GPT-4 personas. Subsequently, we recruit human evaluators and use LLM evaluations to rate these stories from various perspectives. Lastly, we request human evaluators to infer the personality traits of the story author. In human evaluation, the evaluators are randomly assigned to one of two conditions: they are either made aware or kept unaware that the stories were written by an LLM. This study design is to investigate how awareness of AI authorship impacts the evaluation of the narratives and the accuracy of their personality predictions.
|
| 62 |
+
|
| 63 |
+
Despite explicit instructions to not include any mention of the personality traits, LLMs sometimes failed to follow this instruction. Accordingly, for human evaluation, we sample from stories that do not explicitly mention personality traits to avoid compromised performance in personality prediction. Details of the sampling step are included in Appendix D.1. With a lexicon-based classifier, we find that most stories produced by GPT-3.5 personas contained explicit references to personality traits (96.56% compared to GPT-4's 31.87%). Therefore, we focus on the stories generated by GPT-4 personas in the final human evaluation.
|
| 64 |
+
|
| 65 |
+
# 2.2.1 LIWC Analysis
|
| 66 |
+
|
| 67 |
+
We use LIWC-22<sup>5</sup> to extract psycholinguistic features from stories generated by LLM personas. By examining the correlation between these features and the personas' assigned personality traits, we aim to identify patterns of linguistic characteristics corresponding to certain personality traits. To compare with human language use, we perform the same analysis on human-generated writing samples from the Essays dataset (Pennebaker and King, 1999)<sup>6</sup> consisting of short essays written by human
|
| 68 |
+
|
| 69 |
+
participants and their self-reported Big-Five personality traits. We then examine whether the linguistic markers associated with certain personality traits are consistent between human and LLM writers.
|
| 70 |
+
|
| 71 |
+
# 2.2.2 Story Evaluation
|
| 72 |
+
|
| 73 |
+
We recruit both human and LLM raters to evaluate a subset of the stories generated by GPT-4 personas. Due to budget constraints, we sample 1 out of 10 stories from each personality type, which do not explicitly mention any personality trait (Appendix D.1). This results in 32 LLM-generated stories for evaluation. For the human evaluation, we recruit five raters to judge each story across six dimensions on a scale of 1 to 5: (1) Readability: whether the story is easy to read, well-structured, and flows naturally, (2) Personalness: whether the story is personal, revealing the writer's thoughts, feelings, and personal experiences, (3) Redundancy: whether the story is concise and free from unneeded content, (4) Cohesiveness: whether sentences in the story fit together well and are logically organized and coherent, (5) Likeability: whether the story is enjoyable or entertaining to read, (6) Believability: whether the story is convincing and realistic, grounded in real-life situations. For the LLM evaluation, we follow (Chiang and Lee, 2023a) to use GPT-3.5 and GPT-4 evaluators (temperature = 0) with identical criteria as human raters. The exact prompts given to human and LLM raters are in Appendix D.2.
|
| 74 |
+
|
| 75 |
+
# 2.3 Personality Prediction
|
| 76 |
+
|
| 77 |
+
On the same collection of 32 stories, each human annotator and LLM evaluator is asked to predict Big Five personality traits of the writer from the story on a scale of 1 to 5. The objective is to evaluate whether the writing samples from LLM personas can effectively exhibit personality traits to the extent that they are discernible by both human and LLM raters. For each of the personality trait, we provide the descriptions from the work by John et al. (1999) to the human evaluators as references (see Appendix D.2).
|
| 78 |
+
|
| 79 |
+
# 3 Results
|
| 80 |
+
|
| 81 |
+
# 3.1 RQ1: Behavior in BFI Assessment
|
| 82 |
+
|
| 83 |
+
Based on their responses to the BFI scale, we calculate the personality scores for the 320 GPT-3.5
|
| 84 |
+
|
| 85 |
+
in Essays. However, our comparison aims to approximate the linguistic behavior differences between LLM personas and human writers.
|
| 86 |
+
|
| 87 |
+

|
| 88 |
+
|
| 89 |
+

|
| 90 |
+
|
| 91 |
+

|
| 92 |
+
|
| 93 |
+

|
| 94 |
+
Figure 2: BFI assessment in five personality dimensions by GPT-3.5 and GPT-4 personas. Significant statistical differences are found across all dimensions.
|
| 95 |
+
|
| 96 |
+

|
| 97 |
+
|
| 98 |
+
personas and the 320 GPT-4 personas. We then analyze the distribution of these scores as a function of the assigned personality traits. Specifically, paired t-tests are applied to evaluate the differences between the means of the personality score. The results reveal statistically significant differences across all five personality traits. Large effect sizes are observed for both GPT-3.5 personas (EXT: $d = 7.81$ , $p < .001$ ; AGR: $d = 5.93$ , $p < .001$ ; CON: $d = 1.56$ , $p < .001$ ; NEU: $d = 1.83$ , $p < .001$ ; OPN: $d = 2.90$ , $p < .001$ ) and GPT-4 personas (EXT: $d = 5.47$ , $p < .001$ ; AGR: $d = 4.22$ , $p < .001$ ; CON: $d = 4.39$ , $p < .001$ ; NEU: $d = 5.17$ , $p < .001$ ; OPN: $d = 6.30$ , $p < .001$ ). As shown in Figure 2, BFI scores are lower for LLM personas when they are assigned negative traits (representing the lower end of the trait spectrum) compared to positive traits across all personality dimensions. In summary, the findings effectively address RQ1, substantiating that LLM personas are indeed reflecting their assigned personas in BFI assessment.
|
| 99 |
+
|
| 100 |
+
# 3.2 RQ2: Linguistic Patterns in Writing
|
| 101 |
+
|
| 102 |
+
We extract psycho-linguistic features from personal stories generated by LLM personas using LIWC and then calculate point biserial correlations be
|
| 103 |
+
|
| 104 |
+
<table><tr><td>Trait</td><td>Selected LIWC Features</td><td>Lexicons</td><td>GPT-3.5</td><td>GPT-4</td><td>Humans</td><td>GPT-3.5#</td><td>GPT-4#</td></tr><tr><td rowspan="5">EXT</td><td>Positive Tone</td><td>good, well, new, love</td><td>+</td><td>+</td><td>+</td><td></td><td></td></tr><tr><td>Affiliation</td><td>we, our, us, help</td><td>+</td><td>+</td><td>+</td><td rowspan="3">16/18</td><td rowspan="3">10/18</td></tr><tr><td>Certitude</td><td>really, actually, real</td><td>-</td><td>-</td><td></td></tr><tr><td>Social Behavior</td><td>said, love, care</td><td>+</td><td>+</td><td></td></tr><tr><td>Friends</td><td>friend</td><td>+</td><td></td><td>+</td><td></td><td></td></tr><tr><td rowspan="5">AGR</td><td>Moralization</td><td>wrong, honor, judge</td><td>-</td><td>-</td><td>-</td><td rowspan="5">16/23</td><td rowspan="5">13/23</td></tr><tr><td>Interpersonal Conflict</td><td>fight, attack</td><td>-</td><td>-</td><td>-</td></tr><tr><td>Affiliation</td><td>we, our, us, help</td><td>+</td><td>+</td><td>+</td></tr><tr><td>Negative Tone</td><td>bad, wrong, hate</td><td>-</td><td>-</td><td>-</td></tr><tr><td>Prosocial Behavior</td><td>care, help, thank</td><td>+</td><td>+</td><td></td></tr><tr><td rowspan="6">CON</td><td>Drives</td><td>we, our, work, us</td><td></td><td>+</td><td>+</td><td rowspan="6">1/31</td><td rowspan="6">11/31</td></tr><tr><td>Achievement</td><td>work, better, best</td><td>+</td><td>+</td><td></td></tr><tr><td>Lifestyle (Work, Money)</td><td>work, price, market</td><td></td><td>+</td><td>+</td></tr><tr><td>Moralization</td><td>wrong, honor, judge</td><td>-</td><td></td><td>-</td></tr><tr><td>Interpersonal Conflict</td><td>fight, attack</td><td></td><td></td><td>-</td></tr><tr><td>Time</td><td>when, now, then</td><td></td><td></td><td>+</td></tr><tr><td rowspan="6">NEU</td><td>Anxiety</td><td>worry, fear, afraid</td><td>+</td><td>+</td><td>+</td><td rowspan="6">7/27</td><td rowspan="6">15/27</td></tr><tr><td>Negative Tone</td><td>bad, wrong, hate</td><td>+</td><td>+</td><td>+</td></tr><tr><td>Mental Health</td><td>trauma, depressed</td><td>+</td><td>+</td><td>+</td></tr><tr><td>Sadness</td><td>sad, disappoint, cry</td><td>-</td><td>+</td><td>+</td></tr><tr><td>Anger</td><td>hate, mad, angry</td><td></td><td>+</td><td>+</td></tr><tr><td>Perception (Feeling)</td><td>feel, hard, cool</td><td></td><td>+</td><td>+</td></tr><tr><td rowspan="5">OPN</td><td>Curiosity</td><td>research, wonder</td><td>+</td><td>+</td><td>+</td><td rowspan="5">2/36</td><td rowspan="5">17/36</td></tr><tr><td>Insight</td><td>know, how, think</td><td></td><td>+</td><td>+</td></tr><tr><td>Affiliation</td><td>we, our, us, help</td><td></td><td>-</td><td>-</td></tr><tr><td>Perception (Visual)</td><td>see, look, eye</td><td></td><td>+</td><td>+</td></tr><tr><td>Future Focus</td><td>will, going to</td><td></td><td>-</td><td>-</td></tr></table>
|
| 105 |
+
|
| 106 |
+
Table 1: Correlated metrics between LIWC features and binary personality traits using point-biserial correlation. The analysis is done on personal stories generated by GPT-3.5 and GPT-4 and the human Essays corpus (Pennebaker and King, 1999). This analysis focuses on the psychological and extended vocabulary metrics (81 in total). We report the representative personality LIWC features (+ means positive correlation, - means negative correlation) and the # of overlapped significant LIWC features for GPT-3.5 and GPT-4 with human writings.
|
| 107 |
+
|
| 108 |
+
tween these features and assigned personality types. The correlation measure is suitable for analyzing the relationship between binary (assigned personality type) and continuous variables (LIWC features). Subsequently, we compare these correlations with those found in human data (i.e., the Essays dataset).
|
| 109 |
+
|
| 110 |
+
Table 1 summarizes the LIWC features that have a statistically significant correlation with certain personality traits. We find that assigning different personality types considerably influences the linguistic style of LLM personas. For instance, for both GPT-3.5 and GPT-4, we find that assigning an LLM persona to be open to experience positively correlates with its use of curiosity lexicons. Similarly, GPT-3.5/GPT-4 personas assigned to be neurotic are more likely to use lexicons related to anxiety, negative tones, and mental health. Also, assigned extraversion correlates positively with lexicons related to positive tone and affiliation. In Appendix G, we include a similar analysis between BFI scores (instead of assigned personality types) and LIWC.
|
| 111 |
+
|
| 112 |
+
Importantly, these correlations mirror patterns observed in human data (the Essays dataset), indi
|
| 113 |
+
|
| 114 |
+
cating a notable alignment in word usage between the human dataset and LLM personas writings. We report the number of shared significant correlations between human and LLM data (denoted as GPT-3.5# and GPT-4#) in Table 1. GPT-4 exhibits greater alignment with humans than GPT-3.5, with more overlapping lexicons across various traits. This difference is particularly pronounced for Conscientiousness and Openness, where GPT-3.5 personas have 1/31 and 2/36 overlapping correlations with humans on Conscientiousness and Openness respectively, whereas GPT-4 personas have 11/31 and 17/36.
|
| 115 |
+
|
| 116 |
+
We further observe in Table 1 that the stereotypical characteristics of certain personalities might be reflected in LLM linguistic usage while having a different result from the human dataset. For example, one of the traits associated with high Conscientiousness is achievement striving. This trait is positively correlated with the LLM personas, but does not hold significant correlation in human writings. Furthermore, the emotion of sadness, linked to Neuroticism, shows a negative correlation in writings produced by GPT-3.5 personas. However, it is
|
| 117 |
+
|
| 118 |
+
<table><tr><td>Evaluator</td><td>Readability</td><td>Redundancy</td><td>Cohesiveness</td><td>Likability</td><td>Believability</td><td>Personalness</td></tr><tr><td colspan="7">Uninformed Condition – Evaluation Scores (MeanSTD)</td></tr><tr><td>Human</td><td>4.280.85</td><td>3.701.17</td><td>4.230.88</td><td>3.741.00</td><td>3.961.02</td><td>4.320.85</td></tr><tr><td>GPT-3.5</td><td>4.750.43</td><td>3.040.40</td><td>4.970.17</td><td>4.220.48</td><td>3.930.25</td><td>3.550.61</td></tr><tr><td>GPT-4</td><td>4.940.24</td><td>4.960.22</td><td>5.000.00</td><td>4.840.36</td><td>4.930.25</td><td>5.000.00</td></tr><tr><td colspan="7">Informed Condition – Evaluation Scores (MeanSTD)</td></tr><tr><td>Human</td><td>4.380.70</td><td>3.621.16</td><td>4.120.82</td><td>3.800.98</td><td>3.970.80</td><td>3.990.90</td></tr><tr><td>GPT-3.5</td><td>4.970.17</td><td>2.990.35</td><td>5.000.00</td><td>4.220.41</td><td>3.970.17</td><td>3.310.77</td></tr><tr><td>GPT-4</td><td>5.000.00</td><td>4.920.33</td><td>5.000.00</td><td>4.840.36</td><td>4.910.28</td><td>5.000.00</td></tr></table>
|
| 119 |
+
|
| 120 |
+
Table 2: LLM and human evaluation results of GPT-4 generated stories across six dimensions. Uninformed and informed conditions indicate whether evaluators are informed that the stories are generated by AI. For each attribute, we report its mean Likert scale and the standard deviation. Temperature is set to 0 for both GPT-3.5 and GPT-4.
|
| 121 |
+
|
| 122 |
+
positively correlated in both GPT-4 persona and human writings, aligning with the typical characteristics of this personality group. Our hypothesis is that LLMs are prone to exhibit strong characteristics of assigned personas while human participants' personalities have much granularity and individual differences. However, it is important to clarify that the human writings from the Essays dataset serve as a comparative reference to gauge the expressivity of LLMs. They should not be considered as an absolute standard, given that human-authored and LLM-generated narratives are not created under identical prompts.
|
| 123 |
+
|
| 124 |
+
# 3.3 RQ3: Story Evaluation
|
| 125 |
+
|
| 126 |
+
Next, we extend our analysis to other aspects of the stories generated by GPT-4 personas, evaluated by both human and LLM raters. Given the subjective nature of the evaluation, we observe a low inter-annotator agreement (IAA) among three annotators, mirroring the findings of Chiang and Lee (2023b). The detailed scores can be found in in Appendix D. Consequently, five human or LLM evaluators are recruited for a collective evaluation. In Table 2, we have the following interesting observations. These stories generated by GPT-4 personas receive high ratings, close to or higher than 4.0, regarding readability, cohesiveness, and believability from both human and LLM evaluators. This suggests that the stories are not only linguistically fluent and structurally cohesive, but also convincingly believable. Furthermore, human evaluators assign high scores for personalness, indicating that these stories genuinely describe personal experiences. Interestingly, these stories receive lower scores for likeability from human evaluators, suggesting that while the stories may be believable and personal, they might not necessarily be as engaging or enjoyable to read. We also discover some interesting comments on these stories from human evaluators
|
| 127 |
+
|
| 128 |
+
(see Appendix B).
|
| 129 |
+
|
| 130 |
+
Unsurprisingly, the GPT-4 rater assigns the highest ratings across all dimensions, indicating that the GPT-4 rater has a strong preference towards stories generated by GPT-4. This confirms previous findings that LLMs prefer LLM-generated content (Liu et al., 2023). Notably, the GPT-3.5 evaluator assigns lower ratings in redundancy and personalness than both human and GPT-4 evaluators. We also try multiple temperatures, finding that such trends are consistent in Appendix E.
|
| 131 |
+
|
| 132 |
+
Furthermore, interesting observations are found when the evaluators are informed about the story source, as shown in Table 2. First, human evaluators' perception of stories remains consistent in readability, redundancy, cohesiveness, likeability, and believability regardless of whether they are aware that the content is generated by an LLM. Second, there is a significant drop in the perceived personalness of the content when human evaluators are informed that the writer is an LLM, suggesting that knowledge of the content's origin may influence their sense of connection to the material. Third, the GPT-3.5 evaluator assigns notably higher ratings for readability and markedly lower ratings for personalness when aware that the content is AI-generated. Finally, the ratings from the GPT-4 evaluator are consistently high with minimal variation between the informed and uninformed conditions, indicating a strong and consistent bias in favor of GPT-4 content.
|
| 133 |
+
|
| 134 |
+
# 3.4 RQ4: Personality Perception
|
| 135 |
+
|
| 136 |
+
To assess whether personality traits are predictable from these stories, we undertake two distinct analyses. First, we treat each persona's personality traits as a binary classification problem and compute the accuracy of both humans and LLMs in inferring personality traits. Second, we extract the persona's personality scores and examine the linear relation
|
| 137 |
+
|
| 138 |
+
ship between human judgment and the persona's BFI score. A comprehensive overview of the average ratings from humans and LLMs across the five personality dimensions is in Appendix C.
|
| 139 |
+
|
| 140 |
+
# 3.4.1 Personality Prediction
|
| 141 |
+
|
| 142 |
+
The human evaluators' perceptions of personality were gathered using a Likert scale that ranged from 1 to 5. These numerical values were then transformed into nominal categories. Specifically, scores of 4 and 5 were labeled as "positive", 1 and 2 were deemed "negative", and a score of 3 was considered "neutral". The accuracy of individual and collective evaluations for each story is shown in Figure 3 and Figure 4, respectively.
|
| 143 |
+
|
| 144 |
+
The two figures reveal that the accuracy of humans to predict personality traits from stories written by GPT-4 personas varies across the six dimensions. When human evaluators are unaware of AI authorship, they achieve an accuracy of 0.68 on Extraversion and 0.51 on Agreeableness but perform close to random (0.50) on the other BFI dimensions. This shows the difficulty of text-based personality prediction task to human raters. When we aggregate the votes of human annotators based on the majority vote for each story, the accuracy for Extraversion and Agreeableness increases to 0.84 and 0.69, respectively. The accuracy of the other three personality traits also improves with majority voting, indicating the personality traits are perceivable (better than random 0.5) from the stories to human raters on a group level. Interestingly, we find that the accuracy decreases with varying degrees when the human evaluators are aware of AI authorship. Finally, GPT-4 shows impressive performance in recognizing Extraversion, achieving an accuracy of 0.97. GPT-4 also exhibits decent performance in predicting Agreeableness and Conscientiousness, with an accuracy of 0.68 and 0.69, respectively.
|
| 145 |
+
|
| 146 |
+
# 3.4.2 Correlation with BFI Scores
|
| 147 |
+
|
| 148 |
+
Furthermore, Spearman's $r$ is calculated between the human's scores for perceived personality trait and the Personas BFI scores on each trait. Our findings reveal that LLM 'personals' BFI scores correlate to varying extents with human perceptions, with Extraversion exhibiting the strongest link. Specifically, when humans are unaware of AI authorship, significant correlations are found across all five traits (EXT: $r = .64$ , $p < .001$ ; AGR: $r = .33$ , $p < .001$ ; CON: $r = .26$ , $p < .001$ ; NEU:
|
| 149 |
+
|
| 150 |
+
$r = .23, p < .005$ ; $OPN: r = .22, p < .005$ . Conversely, when participants knew about AI authorship, correlations persisted in four traits (EXT: $r = .42, p < .001$ ; $AGR: r = .32, p < .001$ ; $CON: r = .20, p < .05$ ; $NEU: r = .17, p < .05$ ), with non-significance for Openness. The diminished strength of the BFI correlations in the condition where evaluators are informed of AI authorship corroborates our earlier observation: the awareness of AI authorship influences the perception of personality.
|
| 151 |
+
|
| 152 |
+
# 4 Related Work
|
| 153 |
+
|
| 154 |
+
# 4.1 Personality and Language Use
|
| 155 |
+
|
| 156 |
+
Psychologists have developed various personality theories to understand common human traits, including the Big Five (Briggs, 1992; De Raad, 2000; Goldberg, 2013), Sixteen Personality Factors (16PF) (Cattell, 1957; Cattell and Mead, 2008), and the Myers-Briggs Type Indicator (MBTI) (Myers, 1962, 1985). These theories offer consistent and reliable descriptions of individual differences and have been widely applied in practical contexts such as career planning (Schuerger, 1995; Kennedy and Kennedy, 2004; Lounsbury et al., 2005), academic achievement (Ayers et al., 1969; O'Connor and Paunonen, 2007; DiRienzo et al., 2010; Kajzer, 2023), and relationship compatibility (Curran Jr, 1970; Hines and Saudino, 2008). Psychometric instruments, such as the BFI (John et al., 1999), NEO-PI-R (Costa and McCrae, 2008), and MBTI $^{7}$ , have been developed based on these theories to represent (quantitatively) personality traits in individuals. Furthermore, research has consistently shown a strong correlation between personality and language use (Pennebaker and King, 1999; Pennebaker and Graybeal, 2001; Lee et al., 2007; Hirsh and Peterson, 2009). Pennebaker et al. (2001) introduced a dictionary LIWC (Linguistic Inquiry and Word Count) to summarize features from human writings and demonstrated their correlation with the Big Five personality traits. While most previous research has focused on language use in humans, our study extends this inquiry to LLMs.
|
| 157 |
+
|
| 158 |
+
# 4.2 LLMs as Simulated Agents
|
| 159 |
+
|
| 160 |
+
Recent research has shown that, as the size of LLMs increases, LLMs demonstrate emerging abilities as agents (Andreas, 2022) and exhibit human-like behavior in reasoning (Dasgupta et al., 2022;
|
| 161 |
+
|
| 162 |
+

|
| 163 |
+
Figure 3: Individual accuracy of human and LLM evaluators in predicting personality.
|
| 164 |
+
|
| 165 |
+
Webb et al., 2023; Binz and Schulz, 2023; Aher et al., 2023; Wong et al., 2023), role-playing (Wang et al., 2023b; Shao et al., 2023; Wang et al., 2023a), and social science experiments (Horton, 2023; Park et al., 2023; Ziems et al., 2023). These studies primarily leverage advanced prompting techniques to generate human-like behavior within specific contexts. However, there remains a gap in the literature regarding understanding the abilities of LLM-based agents to exhibit certain personality traits and the effect of said abilities on the linguistic behavior of these agents and human perception towards them.
|
| 166 |
+
|
| 167 |
+
# 4.3 Personality in NLP
|
| 168 |
+
|
| 169 |
+
The NLP community has historically been interested in personality research, including automatic text-based personality prediction (Mairesse et al., 2007; Feizi-Derakhshi et al., 2021; Bruno and Singh, 2022), personality prediction from digital footprints (Farnadi et al., 2013; Oberlander and Nowson, 2006; Skowron et al., 2016; Tadesse et al., 2018), and personalized dialogue generation (Mairesse and Walker, 2007, 2011; Zhang et al., 2018; Qian et al., 2018) including stylistic transfer of personality traits such as formality and politeness (Kabbara and Cheung, 2016; Jin et al., 2019; Madaan et al., 2020). With the recent wave of LLM models, research has investigated the use of LLMs for automatic personality prediction (Ganesan et al., 2023; Rao et al., 2023; Cao and Kosinski, 2023; Yang et al., 2023), assessing the ability of LLMs to express certain personality traits (Li et al., 2022; Pan and Zeng, 2023; Safdari et al., 2023) and on creating benchmarks for assessing this ability (Jiang et al., 2022a; Wang et al., 2023a), in addition to manipulating personality in LLM content via prompting engineering (Karra et al., 2022; Jiang et al., 2022a,b; Caron and Srivastava, 2022;
|
| 170 |
+
|
| 171 |
+

|
| 172 |
+
Figure 4: Collective accuracy of human and LLM evaluators in predicting personality with majority votes.
|
| 173 |
+
|
| 174 |
+
Li et al., 2023). However, none of the previous work has delved into the linguistic behavior of LLM personas nor the human perception of personality-conditioned LLM content. This study aims to fill that gap by not only examining the linguistic behavior of these personas but also by evaluating their generated content through both human and LLM evaluation. We use story evaluation and personality prediction to offer valuable insights into the capacity of LLM personas to utilize personality-related words and their perception by human evaluators.
|
| 175 |
+
|
| 176 |
+
# 5 Conclusion
|
| 177 |
+
|
| 178 |
+
In this work, we explore the capability of LLMs (with a focus on GPT-3.5 and GPT-4) to consistently express a personality profile using a well-validated personality scale. Specifically, we investigate the behavior of LLM personas in completing the BFI test and story writing and run analyses with psycholinguistic features, human evaluation, and personality prediction.
|
| 179 |
+
|
| 180 |
+
Through psycholinguistic analysis, we find that LLM personas from GPT-3.5 and GPT-4 can consistently tailor their BFI answers to match their assigned personalities and write with linguistic features characteristic of those personality traits. Regarding our investigation on linguistic patterns in writing, we found that each personality trait is associated with different representative linguistic behavior of LLM personas in writing. We also find a notable alignment in word usage between humans and LLM personas. On LLMs' ability to generate stories conditioned on certain personality profiles, we find that the stories are not only linguistically fluent and structurally cohesive, but also convincingly believable. Moreover, our investigation shows that human evaluators' perception of readability, redundancy, cohesiveness, likeability,
|
| 181 |
+
|
| 182 |
+
and believability remains consistent regardless of whether they are aware that the content is generated by an LLM. We also show that human judges are able to predict personality traits (expressed in the LLM-generated content) with varying degrees across various personality traits. Perhaps, the most interesting finding is that awareness of AI authorship influences the human judges' perception of personality as we notice that the accuracy (of predicting prompted personality traits) decreases (with varying degrees) when human judges are aware of AI authorship.
|
| 183 |
+
|
| 184 |
+
# Limitations
|
| 185 |
+
|
| 186 |
+
Focus on Closed Models Our study mostly focuses on closed GPT models. We did some preliminary exploration with LLaMA 2 but found its output not suitable for human evaluation. LLaMA 2 repeated highly similar content in generated stories, did not follow instructions closely and explicitly mentioned personality lexicons in generated stories, which undermines our work's goal. Because LLaMA 2 output was not good and given budget constraints, we decided to pick the best model (GPT-4) for human evaluation.
|
| 187 |
+
|
| 188 |
+
Data Size Our dataset is not very large in size, but we believe it provides enough variety and depth for meaningful analysis. Indeed, we generated 10 stories per personality type, resulting in 160 stories per personality trait. While we would have liked to generate a larger number of stories, it would have been costly to recruit human evaluators for such a larger number. Despite the constraints, we made analytical decisions that increase the robustness of our studies. For example, we set the temperature to .7 to introduce more variance to our data. Also, analyses were conducted on the personality-trait level (160 instances per trait) instead of personality-type level (10 instances per type) which provides sufficient sample sizes for the analysis.
|
| 189 |
+
|
| 190 |
+
Task & Language Variety Our work evaluates LLMs in personality assessment and writing settings but does not include more naturalistic settings like human interaction and collaboration of LLM personas. Our study solely focuses on English and does not investigate other languages.
|
| 191 |
+
|
| 192 |
+
Evaluation & Interaction Since the personality perception task is somehow subjective, future studies should collect data about the human annotator's
|
| 193 |
+
|
| 194 |
+
background with a deeper investigation of the effect of the annotator's personality and background on their personality prediction accuracy. Whether there exists a causal relationship between an annotator's personality and their personality perception towards AI agents could be insightful for artificial agent research. A future step could investigate what fundamental factors contribute to the decrease in personality assignment when humans are aware of AI authorship. It could also be linked with embodied agents to investigate how additional modalities impact the person's perception. A promising future direction would explore how personality influences the action planning of LLM personas.
|
| 195 |
+
|
| 196 |
+
# Ethical Considerations
|
| 197 |
+
|
| 198 |
+
This study strictly adheres to the ACL Code of Ethics for human experiments and has been granted Exempt status by the Institutional Review Board (IRB). We have conducted our research on the Prolific platform, ensuring compliance with Massachusetts laws by compensating our online annotators at a rate of $15 per hour. In the interest of transparency and reproducibility, we have included the exact instructions and prompts used in this study in either the paper appendix or the GitHub repository. In the human evaluation, we make sure the stories selected do not contain harmful or offensive text. The evaluators are made aware that their responses will be used exclusively for the study, and no personal identifiers will be collected. We follow the license or terms for use for any research artifact we use in the paper. We follow the terms of use release from OpenAI and Licenses from LIWC. We use the Essays dataset (Pennebaker and King, 1999) solely for our research use. We have checked the content of the generated stories in our paper and ensure that there is no sensitive content in the data.
|
| 199 |
+
|
| 200 |
+
Personalized LLMs have demonstrated remarkable abilities in generating human-like content. As these generative agents become increasingly prevalent, it is crucial to consider their potential misuse for harmful purposes, targeting individuals, communities, or entire societies. Personified agents have the potential to provide more enticing interactions for people in their daily lives. Although we do not take a general stance on AI agent applications, we strongly advocate for all stakeholders to disclose their transparency in AI usage to increase
|
| 201 |
+
|
| 202 |
+
trust among individuals. One of our results suggests the necessity of ethical disclosure of AI usage to human users: human's reported personalness and perception of psychological personality traits is greatly impacted by their awareness of AI usage.
|
| 203 |
+
|
| 204 |
+
Lastly, it is important to emphasize that the primary objective of this work is a scientific inquiry into LLM's expressivity and human personality perception of written records. The evaluation used story writing as a vehicle because it is effective for the purpose of the study and does not have a strong implication for a specific application. We urge all parties to remain vigilant and proactive in mitigating the risks associated with AI to prevent its misuse.
|
| 205 |
+
|
| 206 |
+
# Acknowledgements
|
| 207 |
+
|
| 208 |
+
We would like to thank Matt Groh and Jiangjie Chen for their helpful discussions. Moreover, we thank the reviewers from the International Conference on Computational Social Science (IC2S2) where a preliminary version of this work appeared as a (non-archival) extended abstract. We also thank the reviewers from ACL Rolling Review (ARR) for their constructive feedback.
|
| 209 |
+
|
| 210 |
+
# References
|
| 211 |
+
|
| 212 |
+
Gati V Aher, Rosa I Arriaga, and Adam Tauman Kalai. 2023. Using large language models to simulate multiple humans and replicate human subject studies. In International Conference on Machine Learning, pages 337-371. PMLR.
|
| 213 |
+
Jacob Andreas. 2022. Language models as agent models. arXiv preprint arXiv:2212.01681.
|
| 214 |
+
Jerry B Ayers, W Louis Bashaw, and James A Wash. 1969. A study of the validity of the sixteen personality factor questionnaire in predicting high school academic achievement. Educational and Psychological Measurement, 29(2):479-484.
|
| 215 |
+
Marcel Binz and Eric Schulz. 2023. Using cognitive psychology to understand gpt-3. Proceedings of the National Academy of Sciences, 120(6):e2218523120.
|
| 216 |
+
Stephen R Briggs. 1992. Assessing the five-factor model of personality description. Journal of personality, 60(2):253-293.
|
| 217 |
+
Alessandro Bruno and Gurmeet Singh. 2022. Personality traits prediction from text via machine learning. In 2022 IEEE World Conference on Applied Intelligence and Computing (AIC), pages 588-594. IEEE.
|
| 218 |
+
Xubo Cao and Michal Kosinski. 2023. Chatgpt can accurately predict public figures' perceived personalities without any training.
|
| 219 |
+
|
| 220 |
+
Graham Caron and Shashank Srivastava. 2022. Identifying and manipulating the personality traits of language models. arXiv preprint arXiv:2212.10276.
|
| 221 |
+
Heather EP Cattell and Alan D Mead. 2008. The sixteen personality factor questionnaire (16pf). The SAGE handbook of personality theory and assessment, 2:135-159.
|
| 222 |
+
Raymond B Cattell. 1957. Personality and motivation structure and measurement.
|
| 223 |
+
Cheng-Han Chiang and Hung-yi Lee. 2023a. Can large language models be an alternative to human evaluations? In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 15607-15631, Toronto, Canada. Association for Computational Linguistics.
|
| 224 |
+
Cheng-Han Chiang and Hung-yi Lee. 2023b. Can large language models be an alternative to human evaluations? arXiv preprint arXiv:2305.01937.
|
| 225 |
+
Paul T Costa and Robert R McCrae. 2008. The revised neo personality inventory (neo-pi-r). The SAGE handbook of personality theory and assessment, 2(2):179-198.
|
| 226 |
+
James Patrick Curran Jr. 1970. Analysis of factors effecting interpersonal attraction in the dating situation. University of Illinois at Urbana-Champaign.
|
| 227 |
+
Ishita Dasgupta, Andrew K Lampinen, Stephanie CY Chan, Antonia Creswell, Dharshan Kumaran, James L McClelland, and Felix Hill. 2022. Language models show human-like content effects on reasoning. arXiv preprint arXiv:2207.07051.
|
| 228 |
+
Boele De Raad. 2000. The big five personality factors: the psychosexual approach to personality. Hogrefe & Huber Publishers.
|
| 229 |
+
Cassandra DiRienzo, Jayoti Das, Wonhi Synn, Jeremy Kitts, and Kyle McGrath. 2010. The relationship between mbti® and academic performance: A study across academic disciplines. Journal of Psychological Type.
|
| 230 |
+
Golnoosh Farnadi, Susana Zoghbi, Marie-Francine Moens, and Martine De Cock. 2013. Recognising personality traits using facebook status updates. In Proceedings of the international AAAI conference on web and social media, volume 7, pages 14-18.
|
| 231 |
+
Ali-Reza Feizi-Derakhshi, Mohammad-Reza Feizi-Derakhshi, Majid Ramezani, Narjes Nikzad-Khasmakhi, Meysam Asgari-Chenaghlu, Taymaz Akan, Mehrdad Ranjbar-Khadivi, Elnaz Zafarni-Moattar, and Z Jahanbakhsh-Naghadeh. 2021. The state-of-the-art in text-based automatic personality prediction. arXiv preprint arXiv:2110.01186.
|
| 232 |
+
Adithya V Ganesan, Yash Kumar Lal, August Håkan Nilsson, and H Andrew Schwartz. 2023. Systematic evaluation of gpt-3 for zero-shot personality estimation. arXiv preprint arXiv:2306.01183.
|
| 233 |
+
|
| 234 |
+
Lewis R Goldberg. 2013. An alternative "description of personality": The big-five factor structure. In *Personality and Personality Disorders*, pages 34-47. Routledge.
|
| 235 |
+
Mitchell L Gordon, Kaitlyn Zhou, Kayur Patel, Tatsunori Hashimoto, and Michael S Bernstein. 2021. The disagreement deconvolution: Bringing machine learning performance metrics in line with reality. In Proceedings of the 2021 CHI Conference on Human Factors in Computing Systems, pages 1-14.
|
| 236 |
+
Denise A Hines and Kimberly J Saudino. 2008. Personality and intimate partner aggression in dating relationships: the role of the "big five". Aggressive Behavior: Official Journal of the International Society for Research on Aggression, 34(6):593-604.
|
| 237 |
+
Jacob B Hirsh and Jordan B Peterson. 2009. Personality and language use in self-narratives. Journal of research in personality, 43(3):524-527.
|
| 238 |
+
John J Horton. 2023. Large language models as simulated economic agents: What can we learn from homo silicus? Technical report, National Bureau of Economic Research.
|
| 239 |
+
Guangyuan Jiang, Manjie Xu, Song-Chun Zhu, Wenjuan Han, Chi Zhang, and Yixin Zhu. 2022a. Evaluating and inducing personality in pre-trained language models.
|
| 240 |
+
Guangyuan Jiang, Manjie Xu, Song-Chun Zhu, Wenjuan Han, Chi Zhang, and Yixin Zhu. 2022b. Mpi: Evaluating and inducing personality in pre-trained language models. arXiv preprint arXiv:2206.07550.
|
| 241 |
+
Zhijing Jin, Di Jin, Jonas Mueller, Nicholas Matthews, and Enrico Santus. 2019. IMaT: Unsupervised text attribute transfer via iterative matching and translation. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 3097-3109, Hong Kong, China. Association for Computational Linguistics.
|
| 242 |
+
Oliver P John, Sanjay Srivastava, et al. 1999. The big-five trait taxonomy: History, measurement, and theoretical perspectives.
|
| 243 |
+
Jad Kabbara and Jackie Chi Kit Cheung. 2016. Stylistic transfer in natural language generation systems using recurrent neural networks. In Proceedings of the Workshop on Uphill Battles in Language Processing: Scaling Early Achievements to Robust Methods, pages 43-47, Austin, TX. Association for Computational Linguistics.
|
| 244 |
+
Trina Ana Kajzer. 2023. Exploring the role of personality traits and attachment styles in shaping dating app user experience.
|
| 245 |
+
Saketh Reddy Karra, Son The Nguyen, and Theja Tulabandhula. 2022. Estimating the personality of white-box language models. arXiv preprint arXiv:2204.12000.
|
| 246 |
+
|
| 247 |
+
R Bryan Kennedy and D Ashley Kennedy. 2004. Using the myers-briggs type indicator® in career counseling. Journal of employment counseling, 41(1):38-43.
|
| 248 |
+
Chang H Lee, Kyungil Kim, Young Seok Seo, and Cindy K Chung. 2007. The relations between personality and language use. The Journal of general psychology, 134(4):405-413.
|
| 249 |
+
Tianlong Li, Xiaoqing Zheng, and Xuanjing Huang. 2023. Tailoring personality traits in large language models via unsupervisedly-built personalized lexicons. arXiv preprint arXiv:2310.16582.
|
| 250 |
+
Xingxuan Li, Yutong Li, Linlin Liu, Lidong Bing, and Shafiq Joty. 2022. Is gpt-3 a psychopath? evaluating large language models from a psychological perspective. arXiv preprint arXiv:2212.10529.
|
| 251 |
+
Yang Liu, Dan Iter, Yichong Xu, Shuo Wang, Ruochen Xu, et al. 2023. G-eval: Nlg evaluation using gpt-4 with better human alignment. arxiv abs/2303.16634 (2023).
|
| 252 |
+
John W Lounsbury, Teresa Hutchens, and James M Loveland. 2005. An investigation of big five personality traits and career decidedness among early and middle adolescents. Journal of career assessment, 13(1):25-39.
|
| 253 |
+
Aman Madaan, Amrith Setlur, Tanmay Parekh, Barnabas Poczos, Graham Neubig, Yiming Yang, Ruslan Salakhutdinov, Alan W Black, and Shrimai Prabhumoye. 2020. Politeness transfer: A tag and generate approach. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1869-1881, Online. Association for Computational Linguistics.
|
| 254 |
+
François Mairesse and Marilyn Walker. 2007. Personage: Personality generation for dialogue. In Proceedings of the 45th annual meeting of the association of computational linguistics, pages 496-503.
|
| 255 |
+
François Mairesse and Marilyn A Walker. 2011. Controlling user perceptions of linguistic style: Trainable generation of personality traits. Computational Linguistics, 37(3):455-488.
|
| 256 |
+
François Mairesse, Marilyn A Walker, Matthias R Mehl, and Roger K Moore. 2007. Using linguistic cues for the automatic recognition of personality in conversation and text. Journal of artificial intelligence research, 30:457-500.
|
| 257 |
+
Shengyu Mao, Ningyu Zhang, Xiaohan Wang, Mengru Wang, Yunzhi Yao, Yong Jiang, Pengjun Xie, Fei Huang, and Huajun Chen. 2023. Editing personality for llms. arXiv preprint arXiv:2310.02168.
|
| 258 |
+
Isabel Briggs Myers. 1962. The myers-briggs type indicator: Manual (1962).
|
| 259 |
+
Isabel Briggs Myers. 1985. A Guide to the Development and Use of the Myers-Briggs Type Indicator: Manual. Consulting Psychologists Press.
|
| 260 |
+
|
| 261 |
+
Jon Oberlander and Scott Nowson. 2006. Whose thumb is it anyway? classifying author personality from weblog text. In Proceedings of the COLING/ACL 2006 Main Conference Poster Sessions, pages 627-634.
|
| 262 |
+
Melissa C O'Connor and Sampo V Paunonen. 2007. Big five personality predictors of post-secondary academic performance. *Personality and Individual differences*, 43(5):971-990.
|
| 263 |
+
Keyu Pan and Yawen Zeng. 2023. Do llms possess a personality? making the mbti test an amazing evaluation for large language models. arXiv preprint arXiv:2307.16180.
|
| 264 |
+
Joon Sung Park, Joseph C O'Brien, Carrie J Cai, Meredith Ringel Morris, Percy Liang, and Michael S Bernstein. 2023. Generative agents: Interactive simulacra of human behavior. arXiv preprint arXiv:2304.03442.
|
| 265 |
+
James W Pennebaker, Martha E Francis, and Roger J Booth. 2001. Linguistic inquiry and word count: Liwc 2001. *Lawrence Erlbaum Associates*, 71(2001):2001.
|
| 266 |
+
James W Pennebaker and Anna Graybeal. 2001. Patterns of natural language use: Disclosure, personality, and social integration. Current Directions in Psychological Science, 10(3):90-93.
|
| 267 |
+
James W Pennebaker and Laura A King. 1999. Linguistic styles: language use as an individual difference. Journal of personality and social psychology, 77(6):1296.
|
| 268 |
+
Qiao Qian, Minlie Huang, Haizhou Zhao, Jingfang Xu, and Xiaoyan Zhu. 2018. Assigning personality/profile to a chatting machine for coherent conversation generation. In *Ijcai*, pages 4279–4285.
|
| 269 |
+
Haocong Rao, Cyril Leung, and Chunyan Miao. 2023. Can chatgpt assess human personalities? a general evaluation framework. arXiv preprint arXiv:2303.01248.
|
| 270 |
+
Mustafa Safdari, Greg Serapio-García, Clément Crepy, Stephen Fitz, Peter Romero, Luning Sun, Marwa Abdulhai, Aleksandra Faust, and Maja Matarić. 2023. Personality traits in large language models. arXiv preprint arXiv:2307.00184.
|
| 271 |
+
JM Schuerver. 1995. Career assessment and the sixteen personality factor questionnaire. Journal of Career Assessment, 3(2):157-175.
|
| 272 |
+
Yunfan Shao, Linyang Li, Junqi Dai, and Xipeng Qiu. 2023. Character-llm: A trainable agent for roleplaying. arXiv preprint arXiv:2310.10158.
|
| 273 |
+
Marcin Skowron, Marko Tkalcic, Bruce Ferwerda, and Markus Schedl. 2016. Fusing social media cues: personality prediction from twitter and instagram. In Proceedings of the 25th international conference companion on world wide web, pages 107-108.
|
| 274 |
+
|
| 275 |
+
Michael M Tadesse, Hongfei Lin, Bo Xu, and Liang Yang. 2018. Personality predictions based on user behavior on the facebook social media platform. IEEE Access, 6:61959-61969.
|
| 276 |
+
Xintao Wang, Yaying Fei, Ziang Leng, and Cheng Li. 2023a. Does role-playing chatbots capture the character personalities? assessing personality traits for role-playing chatbots. arXiv preprint arXiv:2310.17976.
|
| 277 |
+
Zekun Moore Wang, Zhongyuan Peng, Haoran Que, Jiaheng Liu, Wangchunshu Zhou, Yuhan Wu, Hongcheng Guo, Ruitong Gan, Zehao Ni, Man Zhang, et al. 2023b. Rolellm: Benchmarking, eliciting, and enhancing role-playing abilities of large language models. arXiv preprint arXiv:2310.00746.
|
| 278 |
+
Taylor Webb, Keith J Holyoak, and Hongjing Lu. 2023. Emergent analogical reasoning in large language models. Nature Human Behaviour, 7(9):1526-1541.
|
| 279 |
+
Lionel Wong, Gabriel Grand, Alexander K Lew, Noah D Goodman, Vikash K Mansinghka, Jacob Andreas, and Joshua B Tenenbaum. 2023. From word models to world models: Translating from natural language to the probabilistic language of thought. arXiv preprint arXiv:2306.12672.
|
| 280 |
+
Tao Yang, Tianyuan Shi, Fanqi Wan, Xiaojun Quan, Qifan Wang, Bingzhe Wu, and Jiaxiang Wu. 2023. Psycot: Psychological questionnaire as powerful chain-of-thought for personality detection. arXiv preprint arXiv:2310.20256.
|
| 281 |
+
Saizheng Zhang, Emily Dinan, Jack Urbanek, Arthur Szlam, Douwe Kiela, and Jason Weston. 2018. Personalizing dialogue agents: I have a dog, do you have pets too? arXiv preprint arXiv:1801.07243.
|
| 282 |
+
Caleb Ziems, William Held, Omar Shaikh, Jiaao Chen, Zhehao Zhang, and Diyi Yang. 2023. Can large language models transform computational social science? arXiv preprint arXiv:2305.03514.
|
| 283 |
+
|
| 284 |
+
# A Story Examples Generated by LLM
|
| 285 |
+
|
| 286 |
+
Here, we select a few stories as examples for the audience based on the human-evaluation results in Table 3. Specifically, we sample one story from each personality trait that achieved relatively high accuracy in human personality inference results. Notably, due to the unbalanced prediction results on each trait, some selected stories have lower accuracy among 5 annotators.
|
| 287 |
+
|
| 288 |
+
<table><tr><td>Personality</td><td>Story</td></tr><tr><td>Extroverted (5/5)</td><td>One sunny afternoon, I found myself at the local park, my eyes scanning the horizon, watchful of any interesting activity that might crop up. As an individual who thrives in the company of others, I naturally gravitate towards gatherings and events. So, when I spotted a group of people setting up for a concert, I couldn't help but be intrigued. I approached the group, a mixture of musicians and technical crew, offering a hand. Their initial surprise quickly transformed into appreciation as my enthusiasm and energy seemed to infect them. I've always been someone who can't resist lending a helping hand, especially if it involves an exciting experience. As the hours wore on, I found myself assisting with multiple tasks, each more exciting than the last. From helping set up the stage to engaging in a friendly banter with the band members, I was in my element. Although the setting sun indicated that I should be tired, my energy seemed boundless. However, amidst the excitement, I couldn't shake off a nagging feeling. The concert was to start soon, and the lead guitarist seemed to be nowhere in sight. My worry grew when I overheard the band members...</td></tr><tr><td>Introverted (5/5)</td><td>In the quiet solitude of my apartment, I often lose myself in the twisting corridors of my thoughts. The world outside buzzes with life, yet I find comfort in the soft hum of the refrigerator and the rhythmic ticking of the clock. My sanctum is a world of books, music, and art, each holding a mirror to the depth of human experiences. One particular rainy afternoon, I found myself engrossed in a novel that explored the paradox of human existence. It was then that I received a call from my neighbor, Mrs. Jenkins. Her son had broken his arm and she needed someone to watch over her six-year-old daughter, Lily. I hesitated, aware that I was about to step outside my comfort zone. But the desperation in Mrs. Jenkins' voice nudged me into agreeing. Lily was a whirlwind of energy, her infectious laughter and inquisitive nature a stark contrast to my usual tranquility. As soon as Lily stepped into my apartment, her eyes widened at the sight of my overflowing bookshelves, my sketches littered on the coffee table, and the classical music playing softly in the background. I could see her mind buzzing with...</td></tr><tr><td>Agreeable (5/5)</td><td>Once upon a time, I was working as an event coordinator for a large corporation. While I was always busy, I relished the opportunity to be surrounded by a bustling environment and a sea of people. My days were filled with planning meetings, coordinating logistics, and ensuring that everything ran like clockwork. One day, I was tasked with planning our most significant event of the year, the annual gala. The event was a considerable undertaking, with hundreds of guests, including our CEO, high-profile clients, and notable industry personalities. The pressure was on, but I was ready to rise to the occasion. I meticulously planned every single detail, from the venue layout to the minute-by-minute schedule. I triple-checked everything, ensuring that the caterers understood the menu, the decorators knew the theme, and the audiovisual team was prepared. My team and I worked tirelessly around the clock to make sure that the event would be perfect. A week before the gala, I started feeling a knot of unease in my stomach. I was constantly replaying every detail in my head, worrying about what could go wrong. I couldn't shake off the feeling that I was forgetting something crucial...</td></tr><tr><td>Antagonistic (4/5)</td><td>There I was, in the back corner of the local coffee shop, my sanctuary from the world. My gaze was transfixed on the dark, bitter coffee in my hand, the steam rising in wisps like my thoughts. The world outside seemed to buzz and hum, but I was insulated from it all, safe in my solitude. The bell on the front door jingled, signaling a new customer's arrival. I didn't bother to look up. Why would I? I was there for the coffee, not the people. But, the universe seemed to have other plans. A voice, chipper and bright, echoed through the shop, cutting through the usual din of murmuring voices and clinking cups. "Hey, can I sit here? All the other seats are taken." I looked up to see a girl, probably in her early twenties, standing at my table. She had a wide smile that seemed to shine brighter than the sun outside. I gave her a curt nod, gesturing to the empty seat across from me. She sat down, her eyes sparkling with an eagerness that I found unsettling. She launched into a conversation, talking about the weather, the coffee, the book she...</td></tr><tr><td>Conscientious (5/5)</td><td>It was a typical Tuesday afternoon and I was comfortably settled in my favorite corner of the local library. Surrounded by the faint smell of old books and the hushed whispers of other patrons, I felt a sense of calm wash over me. The library was my sanctuary, a place where I could retreat from the world and lose myself in the quiet contemplation of the written word. One particular book had caught my interest that day, 'The Art of Solitude.' It was a thought-provoking exploration of the joys and challenges of being alone, a theme that resonated deeply with me. As I turned each page, I found myself nodding in agreement with the author's reflections on the importance of solitude in fostering self-awareness and introspection. A sudden burst of laughter interrupted my reading. Looking up, I saw a group of teenagers huddled around a table, their faces lit up by the glow of their smartphones. I felt a pang of annoyance. This was a library, after all, a place of quiet and respect. But I quickly reminded myself that everyone has a different way of engaging with the world. I took a deep breath, refocused, and immersed...</td></tr><tr><td>Unconscientious (2/5)</td><td>I remember the time when I was given the responsibility of organizing our company's annual retreat. I was thrilled at the opportunity, not because I enjoy coordinating such events, but because I knew it was going to be a great chance to stir things up a bit. We were a group of 20 people who would be spending an entire weekend at a remote resort. The retreat was meant to foster team bonding and camaraderie, but honestly, these events were always predictable and monotonous. I decided this one would be different. I strode into the planning meeting with an air of confidence that was hard to ignore. Most of my colleagues were looking forward to a well-organized and systematic event. They knew I wasn't exactly diligent when it came to planning, but they probably hoped I would make an exception this time. I had a different plan. I decided to make the retreat as spontaneous and unpredictable as possible. No schedules, no pre-planned activities, just a free-for-all. I stated my plan to the team, and as expected, it was met with raised eyebrows and skeptical looks. I shrugged off their doubt. After all, I wasn't one...</td></tr><tr><td>Neurotic (3/5)</td><td>My life has always been a tapestry of solace and solitude, a universe of its own. On a chilly winter night, I sat alone in my dimly lit room, the faint glow from my computer screen illuminating the scattered books and papers. I had a deadline to meet, a story to submit, but my mind was adrift, entangled in a web of thoughts, each more intricate than the last. A cup of cold coffee lay discarded on the desk, its purpose long forgotten. My gaze fell on the worn, leather-bound book peeking from the pile, "Art: The Definitive Visual Guide." A surge of curiosity urged me to pick it up. I consider myself an eclectic reader, my interests spanning from the realms of science to the oasis of arts, and everything in between. I found solace in the unknown, in the novelty of new ideas, and the thrill of uncharted territories. I opened the book, and the artistic world unfolded before me. The vivid colors, the passionate strokes, and the silent stories captivated me. Each painting was a universe of its own, a tale of the artist's soul, and a mirror reflecting the observer's psyche. The world around...</td></tr><tr><td>Emotionally Stable (5/5)</td><td>In the heart of the bustling city, I lived in a small apartment, my sanctuary from the world. One day, as I was returning from my weekly trip to the local bookstore, I found a stray kitten huddled by the staircase of my building. It was a tiny, shivering furball, looking up at me with wide eyes. I couldn't ignore it. I brought the kitten home, creating a warm makeshift bed from an old sweater. I named her Luna. Luna was timid and wary of her new surroundings. But with time, she grew comfortable around me, her purns filling my once quiet apartment with life. Being an editor for a publishing house, I worked from home, which meant I spent a great deal of time with Luna. I would read her passages from the manuscripts I was working on, and she would purr in response, as if she understood. One day, I received a manuscript from a new author. It was a fantasy novel, filled with magical creatures, enchanted forests, and heroic quests. As I read the manuscript, I noticed it was riddled with plot holes and inconsistencies. But beneath the imperfections, there was...</td></tr><tr><td>Open (5/5)</td><td>There I was, standing at the entrance of the art museum, my heart pounding with anticipation. I was about to experience the grand opening of the museum's new modern art exhibit, a highly anticipated event in our city. I was lucky to have scored an invite to the opening night, and I was buzzing with excitement. I had no idea that this evening would lead me to a new friend and an unforgettable experience. As I walked into the grand hall, I was greeted by a sea of vibrant colors, unusual shapes, and thought-provoking installations. Each piece of art seemed to tell a unique story, inspiring a sense of curiosity within me. I was eager to explore more, to dive into the unknown, and to allow the art to speak to me. As I was studying a beautiful abstract painting, a lady standing next to me started a conversation. "Quite a mesmerizing piece, isn't it?" she asked, her eyes sparkling with enthusiasm. She introduced herself as Grace, a local art enthusiast. We instantly clicked and found ourselves engrossed in deep conversations about the various art pieces. We both loved the same paintings, shared the same perspectives, and could...</td></tr><tr><td>Closed (4/5)</td><td>I remember it was a chilly Saturday in December. The sky was overcast, a canvas of grey, and the streets were bustling with last-minute holiday shoppers. I, however, was tucked away in my quiet corner of the world, my small yet cozy apartment. My place could be described as a bit messy. Books were strewn haphazardly on my coffee table, and my laundry hamper was positively overflowing. But I liked it that way, Àït felt lived in, familiar. That day, I had chosen to retreat from the world and indulge in my favorite pastime: reading. As I sank into my worn-out couch, a worn-out paperback in my hands, I felt a wave of contentment wash over me. There was something comforting about the world of literature. The characters never asked too much of me, and I was free to explore their lives without the pressure of social interaction. There was a knock at the door, breaking the peaceful silence of my sanctuary. It was my neighbor, Mrs. Jenkins, her arms full of freshly baked cookies. She was an extrovert, always popping by to chat or share her latest culinary creations. Despite our stark personality differences, we had formed...</td></tr></table>
|
| 289 |
+
|
| 290 |
+
Table 3: Selected stories from human-evaluation experiment. The personality columns show its corresponding predicted personality accuracy rate. $x/5$ means $x$ out of 5 annotators predicted correctly.
|
| 291 |
+
|
| 292 |
+
# B Story Comments
|
| 293 |
+
|
| 294 |
+
During human annotation, we provide an optional comment section for each story, allowing human annotators to share their thoughts after reading the story. We receive some interesting comments from human annotators when they are informed or uninformed that the writer of the story is an LLM. After
|
| 295 |
+
|
| 296 |
+
filtering out comments such as “N/A”, “No”, “None” and “No Comments”, there are 104 valid comments whose average length is 12.7 words in the informed condition and 122 valid comments whose average length is 13.4 words in the uninformed condition. We compute the sentiment scores of the comments with cardiffnlp/twitter-roberta-base-sentiment-latest by mapping negative, neutral, and positive to -1, 0, and 1. We find out that the average sentiment is 0.45 in the informed condition and 0.16 in the uninformed condition, indicating that evaluators have a slightly better attitude towards the stories when informed of AI authorship. We also sample a few representative comments for each condition in Table 4. We notice that there are constant mixed comments towards these stories, where some stories are quite believable and enjoyable and other stories are banal and exaggerating. However, we observed that when informed of AI authorship people tend to be more lenient about the stories and give more complements about the stories (see comments in the “surprised” section), which is consistent with the higher average sentiment score we show earlier. When people are unaware that the author is an LLM, they constantly guess the author's personality and question the motivation of the author to write some stories (see comments in the “confused” section). This is particularly interesting and highlights the potential social implications in terms of confusion if AI-generated content is consumed or AI characters interact with humans without notifying people. All the comments will be published along with the stories and code on Github.
|
| 297 |
+
|
| 298 |
+
Attitude Comments
|
| 299 |
+
|
| 300 |
+
<table><tr><td colspan="2">Informed Condition</td></tr><tr><td>Critical</td><td>(1) I thought the story was a little basic and lacked deeper meaning.
|
| 301 |
+
(2) The build up is pretty good but falls flat towards the end.
|
| 302 |
+
(3) A believable story, if it seems somewhat exaggerated with the author's impulsive-ness.</td></tr><tr><td>Sympathetic</td><td>(1) It's a relatable situation that someone could get behind and feel for.
|
| 303 |
+
(2) Relatable work & anxiety story. I relate in some ways.
|
| 304 |
+
(3) live your dreams even when there no planned.</td></tr><tr><td>Positive</td><td>(1) I found myself really being put into the characters shoes.
|
| 305 |
+
(2) I found this story to be hilarious. I was laughing while I was reading it. The main character's interactions were absolute greatness.
|
| 306 |
+
(3) Vivid descriptions, almost cinematic like a movie script.</td></tr><tr><td>Surprised</td><td>(1) The story actually sounded genuine and I wouldn't have believed it was written by AI unless someone told me.
|
| 307 |
+
(2) I would have never guessed this was an AI writer. I'm quite impressed and I thoroughly enjoyed this road trip story.
|
| 308 |
+
(3) I like this story here the cat was a separate side story but the AI was able to integrate it in throughout, in other stories it had what I would call side quests that added nothing to the final flow.</td></tr><tr><td colspan="2">Uninformed Condition</td></tr><tr><td>Critical</td><td>(1) It was harder to read and follow the story.
|
| 309 |
+
(2) Some of the punctuation seemed a little odd or over used.
|
| 310 |
+
(3) It started off strong, but there was no sense of why this person became uneasy, and they seemed to become a different person as the essay went on, all of a sudden wanting predictability and alone time instead of the chaos and "social butterfly" status. I found it inconsistent.</td></tr><tr><td>Sympathetic</td><td>(1) Also feels quite personal.
|
| 311 |
+
(2) When you constantly look down, you don't see what is right in front of you.
|
| 312 |
+
(3) As someone who used to code a lot, I felt the ending was very moving and believable.</td></tr><tr><td>Positive</td><td>(1) Very enjoyable story about how sometimes unavoidable changes in our lives can lead to happier lives.</td></tr></table>
|
| 313 |
+
|
| 314 |
+
(2) It was enjoyable. I appreciated the self-awareness by someone who knows they are not always well-liked or well-received.
|
| 315 |
+
(3) I enjoyed the description of the old lady particularly the etchings on her face. This was quite a memorable explanation.
|
| 316 |
+
|
| 317 |
+
<table><tr><td>Confused</td><td>(1) Here's something about the story that doesn't seem believable, but it's probably just the writer's extraggretions.
|
| 318 |
+
(2) This person must have taken drugs lol.
|
| 319 |
+
(3) The writer seems like he is not really fun to be around.</td></tr></table>
|
| 320 |
+
|
| 321 |
+
# C Personality Ratings
|
| 322 |
+
|
| 323 |
+
We sampled 32 LLM personas from 32 personality types. Therefore, we have 16 personas with positive labels and 16 personas with negative labels for each personality, which would ideally lead to the average ratings close to 3. As shown in Table 5, we find that the average ratings of GPT-3.5 and GPT-4 are closer to 3 than humans in Extraversion. Except for Extraversion, the average ratings from GPT-4 seems consistently further away from 3 compared to human and GPT-3.5 evaluators.
|
| 324 |
+
|
| 325 |
+
Table 4: We sample story comments for both informed and uninformed conditions.
|
| 326 |
+
|
| 327 |
+
<table><tr><td>Evaluator</td><td>Extraversion</td><td>Agreeableness</td><td>Conscientiousness</td><td>Neuroticism</td><td>Openness to Experience</td></tr><tr><td colspan="6">Uninformed Condition – Evaluation Scores (MeanSTD)</td></tr><tr><td>Human</td><td>3.221.36</td><td>3.421.15</td><td>3.861.05</td><td>2.761.22</td><td>3.541.19</td></tr><tr><td>GPT-3.5</td><td>3.190.85</td><td>4.080.82</td><td>3.390.74</td><td>2.130.49</td><td>3.620.60</td></tr><tr><td>GPT-4</td><td>3.001.42</td><td>4.011.08</td><td>4.041.18</td><td>2.021.01</td><td>4.031.07</td></tr><tr><td colspan="6">Informed Condition – Evaluation Scores (MeanSTD)</td></tr><tr><td>Human</td><td>3.291.17</td><td>3.670.84</td><td>3.760.92</td><td>2.691.23</td><td>3.701.00</td></tr><tr><td>GPT-3.5</td><td>3.140.86</td><td>4.160.91</td><td>3.560.71</td><td>2.030.47</td><td>3.660.59</td></tr><tr><td>GPT-4</td><td>3.001.42</td><td>4.221.09</td><td>4.221.14</td><td>2.021.02</td><td>4.091.08</td></tr></table>
|
| 328 |
+
|
| 329 |
+
Table 5: LLM and human evaluation results of GPT-4 generated personal stories in 5 personality traits. Uninformed and informed conditions indicate whether human or LLM evaluators are informed that the stories are generated by an LLM. We report each evaluated attribute's mean Likert scale and standard deviation. Temperature is set to 0 for both GPT-3.5 and GPT-4.
|
| 330 |
+
|
| 331 |
+
<table><tr><td>Evaluator</td><td>Readability</td><td>Redundancy</td><td>Cohesiveness</td><td>Likability</td><td>Believability</td><td>Personalness</td></tr><tr><td colspan="7">Inter-Annotator Agreement (IAA%)</td></tr><tr><td>Uninformed Human</td><td>0.0562</td><td>-0.0348</td><td>0.0361</td><td>0.0254</td><td>-0.0351</td><td>-0.0260</td></tr><tr><td>Informed Human</td><td>0.0164</td><td>0.0253</td><td>0.0358</td><td>0.0655</td><td>-0.0257</td><td>0.1061</td></tr></table>
|
| 332 |
+
|
| 333 |
+
Table 6: We report the inter-annotator agreement (IAA) among five annotators across six different metrics using Krippendorff's $\alpha$ . The subscript in the IAA column (\%) is used to denote the average percentage of annotators who agree on the most voted rating.
|
| 334 |
+
|
| 335 |
+
<table><tr><td>Evaluator</td><td>Extraversion</td><td>Agreeableness</td><td>Conscientiousness</td><td>Neuroticism</td><td>Openness to Experience</td></tr><tr><td colspan="6">Inter-Annotator Agreement (IAA%)</td></tr><tr><td>Uninformed Human</td><td>0.1151</td><td>0.0349</td><td>0.0051</td><td>-0.0343</td><td>0.0452</td></tr><tr><td>Informed Human</td><td>0.1054</td><td>0.1165</td><td>0.0759</td><td>0.0349</td><td>0.0857</td></tr></table>
|
| 336 |
+
|
| 337 |
+
Table 7: We report the inter-annotator agreement (IAA) among five annotators across five personality traits using Krippendorff's $\alpha$ . The subscript in the IAA column (\%) is used to denote the average percentage of annotators who agree on the most voted rating.
|
| 338 |
+
|
| 339 |
+
# D Story Evaluation Details
|
| 340 |
+
|
| 341 |
+
# D.1 Filtering Stories for Evaluation
|
| 342 |
+
|
| 343 |
+
We design a simple lexicon-based classifier to detect if a story contains explicit use of personality trait lexicons. These lexicons include "extrover*", "introver*", "agreeabl*", "antagonism*", "*conscientious*",
|
| 344 |
+
|
| 345 |
+
"neuroti*", "emotionally stabl*", "open to experience", "closed to experience". We filter out stories which contain these lexicons and sample from the remaining stories for human evaluation.
|
| 346 |
+
|
| 347 |
+
# D.2 Prolific Setup
|
| 348 |
+
|
| 349 |
+
We recruit Prolific workers from the United States, whose first language is English with an approval rate between $99\%$ and $100\%$ . We have divided 32 stories into four equal batches, each containing eight stories. To begin each batch, a consent form is provided. Following this, each annotator reads the story and answers six evaluation questions that assess readability, personalness, redundancy, cohesiveness, likeability, and believability. An optional comment section is also provided for additional feedback on the story. Subsequently, we ask the annotators five questions related to personality traits: Extraversion, Agreeableness, Conscientiousness, Neuroticism, and Openness to Experience. Screenshots of these questions are included below.
|
| 350 |
+
|
| 351 |
+
# Consent Form
|
| 352 |
+
|
| 353 |
+
What follows is a brief overview of the research we are completing with your assistance.
|
| 354 |
+
|
| 355 |
+
In this survey, we will ask you to read some personal stories and ask for demographic information.
|
| 356 |
+
|
| 357 |
+
This survey takes approximately 30 minutes to complete.
|
| 358 |
+
|
| 359 |
+
This survey is part of a scientific research project. Your decision to complete this survey is voluntary. If you give us permission by completing the survey, we plan to discuss/publish the results in an academic forum. In any publication, information will be provided in such a way that you cannot be identified. Only members of the research team will have access to the original data set. Before the data is shared outside the research team, any potentially identifying information will be removed. Once identifying data has been removed, the data may be used by the research team, or shared with other researchers, for both related and unrelated research purposes in the future. Your anonymized data may also be made available in online data repositories such as the Open Science Framework, which allow other researchers and interested parties to use the data for further analysis.
|
| 360 |
+
|
| 361 |
+
Clicking on the arrow at the bottom of this page indicates that you are at least 18 years of age and agree to complete this survey voluntarily.
|
| 362 |
+
|
| 363 |
+
Please rate the readability of the story:
|
| 364 |
+
|
| 365 |
+
# Readability
|
| 366 |
+
|
| 367 |
+
1 (bad): The story is highly difficult to read with rare words and complex structures.
|
| 368 |
+
5 (good): The story is easy to read, well-structured, and flows naturally.
|
| 369 |
+
|
| 370 |
+

|
| 371 |
+
Figure 5: Consent form on Prolific.
|
| 372 |
+
Figure 6: Readability question on Prolific.
|
| 373 |
+
|
| 374 |
+
# D.3 Inter-annotator Agreement
|
| 375 |
+
|
| 376 |
+
The task of evaluation presents a subjective and complex challenge, which has resulted in a low inter-annotator agreement (IAA) in Krippendorff's $\alpha$ among the five annotators. We have included the IAA scores for six distinct metrics in Table 6. Additionally, the IAA scores for five personality traits are
|
| 377 |
+
|
| 378 |
+
Please rate the personalness of the story:
|
| 379 |
+
|
| 380 |
+
# personalness
|
| 381 |
+
|
| 382 |
+
1 (bad): The story is not personal at all. For instance, it sounds too professional and does not reveal the writer's thoughts and feelings.
|
| 383 |
+
5 (good): The story is very personal, revealing the writer's thoughts, feelings, and lives
|
| 384 |
+
|
| 385 |
+
1 2 3 4 5
|
| 386 |
+
|
| 387 |
+
Figure 7: Personalness question on Prolific.
|
| 388 |
+
|
| 389 |
+
Please rate the redundancy of the story:
|
| 390 |
+
|
| 391 |
+
# Redundancy
|
| 392 |
+
|
| 393 |
+
1 (bad): The story is excessively repetitive, containing unnecessary repetitions of the same information. If the story is too long (more than 800 tokens), we should give a low rating.
|
| 394 |
+
5 (good): The story is concise and free from redundancy.
|
| 395 |
+
|
| 396 |
+
1 2 3 4 5
|
| 397 |
+
|
| 398 |
+
Figure 8: Redundancy question on Prolific.
|
| 399 |
+
|
| 400 |
+
Please rate the cohesiveness of the story:
|
| 401 |
+
|
| 402 |
+
# Cohesiveness
|
| 403 |
+
|
| 404 |
+
1 (bad): Sentences in the story are highly incoherent as a whole. For instance, they are illogical, lack self-consistency, or contradict each other.
|
| 405 |
+
5 (good): Sentences in the story fit together well. They are logically organized and coherent.
|
| 406 |
+
|
| 407 |
+
1 2 3 4 5
|
| 408 |
+
|
| 409 |
+
Figure 9: Cohesiveness question on Prolific.
|
| 410 |
+
|
| 411 |
+
Please rate the likeability of the story:
|
| 412 |
+
|
| 413 |
+
# Likeability
|
| 414 |
+
|
| 415 |
+
1 (bad): The story is not enjoyable at all and even contains inappropriate words or examples.
|
| 416 |
+
5 (good): The story is highly enjoyable or entertaining to read.
|
| 417 |
+
|
| 418 |
+
1 2 3 4 5
|
| 419 |
+
|
| 420 |
+
Figure 10: Likeability question on Prolific.
|
| 421 |
+
|
| 422 |
+
Please rate the believability of the story:
|
| 423 |
+
|
| 424 |
+
# Believability
|
| 425 |
+
|
| 426 |
+
1 (bad): The story is not convincing at all, usually too hypothetical or unreal.
|
| 427 |
+
5 (good): The story is highly convincing and realistic, grounded in real-life situations.
|
| 428 |
+
|
| 429 |
+
1 2 3 4 5
|
| 430 |
+
|
| 431 |
+
Figure 11: Believability question on Prolific.
|
| 432 |
+
|
| 433 |
+
Figure 12: Comment question on Prolific.
|
| 434 |
+
|
| 435 |
+
Based on the story, please rate the extraversion level of the writer?
|
| 436 |
+
|
| 437 |
+
(1 means "very introverted", 5 means "very extroverted")
|
| 438 |
+
|
| 439 |
+
Here are the facets you could consider:
|
| 440 |
+
|
| 441 |
+
- Gregariousness (sociable)
|
| 442 |
+
Assertiveness (forceful)
|
| 443 |
+
Activity (energetic)
|
| 444 |
+
- Excitement-seeking (adventurous)
|
| 445 |
+
Positive emotions (enthusiastic)
|
| 446 |
+
- Warmth (outgoing)
|
| 447 |
+
|
| 448 |
+
<table><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td></tr><tr><td>○</td><td>○</td><td>○</td><td>○</td><td>○</td></tr></table>
|
| 449 |
+
|
| 450 |
+
Figure 13: Extraversion question on Prolific.
|
| 451 |
+
|
| 452 |
+
Based on the story, please rate the agreeableness level of the writer?
|
| 453 |
+
|
| 454 |
+
(1 means "very antagonistic", 5 means "very agreeable")
|
| 455 |
+
|
| 456 |
+
Here are the facets you could consider:
|
| 457 |
+
|
| 458 |
+
- Trust (forgiving)
|
| 459 |
+
- Straightforwardness (not demanding)
|
| 460 |
+
- Altruism (warm)
|
| 461 |
+
- Compliance (not stubborn)
|
| 462 |
+
- Modesty (not show-off)
|
| 463 |
+
- Tender-mindedness (sympathetic)
|
| 464 |
+
|
| 465 |
+
<table><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td></tr><tr><td>○</td><td>○</td><td>○</td><td>○</td><td>○</td></tr></table>
|
| 466 |
+
|
| 467 |
+
Figure 14: Agreeableness question on Prolific.
|
| 468 |
+
|
| 469 |
+
presented in Table 7. The phenomenon of low inter-rater agreeability is consistent with previous findings in labeling tasks for social computing, calling for more attention to creating techniques to navigate the annotation disagreements in order to ensure more accurate label representation (Gordon et al., 2021).
|
| 470 |
+
|
| 471 |
+
# D.4 Annotator Demographics
|
| 472 |
+
|
| 473 |
+
We also include the demographics of 39 unique participants who contribute to evaluate the stories. All of these participants are living in the United States and 37 out of 39 were born in the USA and 2 out of 39 born in Nigeria. We include the distribution of age, sex, and ethnicity in Figure 18.
|
| 474 |
+
|
| 475 |
+
# E LLM as Evaluators
|
| 476 |
+
|
| 477 |
+
# E.1 Temperature
|
| 478 |
+
|
| 479 |
+
We experiment with different temperatures with the GPT-3.5 and GPT-4 evaluators and observe similar trends reported by Chiang and Lee (2023b). As shown in Table 8, we notice that the ratings given by LLM
|
| 480 |
+
|
| 481 |
+
Based on the story, please rate the conscientiousness level of the writer? (1 means "very unconscious or lack of direction", 5 means "very conscientious")
|
| 482 |
+
|
| 483 |
+
Here are the facets you could consider:
|
| 484 |
+
|
| 485 |
+
Competence (efficient)
|
| 486 |
+
- Order (organized)
|
| 487 |
+
- Dutifulness (not careless)
|
| 488 |
+
- Achievement striving (thorough)
|
| 489 |
+
- Self-discipline (not lazy)
|
| 490 |
+
- Deliberation (not impulsive)
|
| 491 |
+
|
| 492 |
+
<table><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td></tr><tr><td>○</td><td>○</td><td>○</td><td>○</td><td>○</td></tr></table>
|
| 493 |
+
|
| 494 |
+
Figure 15: Agreeableness question on Prolific.
|
| 495 |
+
|
| 496 |
+
Based on the story, please rate the neuroticism level of the writer?
|
| 497 |
+
|
| 498 |
+
(1 means "very emotionally stable", 5 means "very neurotic/emotionally unstable")
|
| 499 |
+
|
| 500 |
+
Here are the facets you could consider:
|
| 501 |
+
|
| 502 |
+
- Anxiety (tense)
|
| 503 |
+
Angry hostility (irritable)
|
| 504 |
+
Depression (not contented)
|
| 505 |
+
- Self-consciousness (shy)
|
| 506 |
+
- Impulsiveness (moody)
|
| 507 |
+
Vulnerability (not self-confident)
|
| 508 |
+
|
| 509 |
+
<table><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td></tr><tr><td>○</td><td>○</td><td>○</td><td>○</td><td>○</td></tr></table>
|
| 510 |
+
|
| 511 |
+
Figure 16: Neuroticism question on Prolific.
|
| 512 |
+
|
| 513 |
+
Based on the story, please rate the openness to experience level of the writer? (1 means "very closed to experience", 5 means "very open to experience")
|
| 514 |
+
|
| 515 |
+
Here are the facets you could consider:
|
| 516 |
+
|
| 517 |
+
- Ideas (curious)
|
| 518 |
+
- Fantasy (imaginative)
|
| 519 |
+
Aesthetics (artistic)
|
| 520 |
+
- Actions (wide interests)
|
| 521 |
+
Feelings (excitable)
|
| 522 |
+
- Values (unconventional)
|
| 523 |
+
|
| 524 |
+
<table><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td></tr><tr><td>○</td><td>○</td><td>○</td><td>○</td><td>○</td></tr></table>
|
| 525 |
+
|
| 526 |
+
Figure 17: Openness question on Prolific.
|
| 527 |
+
|
| 528 |
+
evaluators are negatively correlated to the temperature. Larger temperature also leads to large variance in the ratings among three LLM evaluators. We set the temperature to 0 in our experiment to ensure the
|
| 529 |
+
|
| 530 |
+

|
| 531 |
+
Figure 18: Distribution of age, sex, and ethnicity among the 39 Prolific annotators who evaluate the stories.
|
| 532 |
+
|
| 533 |
+

|
| 534 |
+
|
| 535 |
+

|
| 536 |
+
|
| 537 |
+
<table><tr><td>Evaluator</td><td>Readability</td><td>Redundancy</td><td>Cohesiveness</td><td>Likability</td><td>Believability</td><td>Personalness</td></tr><tr><td colspan="7">Evaluation Scores (MeanSTD)</td></tr><tr><td>GPT-3.5 (T=0.0)</td><td>4.750.43</td><td>3.040.40</td><td>4.970.17</td><td>4.220.48</td><td>3.930.25</td><td>3.550.61</td></tr><tr><td>GPT-3.5 (T=0.3)</td><td>4.700.46</td><td>3.070.54</td><td>4.960.19</td><td>4.260.50</td><td>3.930.30</td><td>3.510.65</td></tr><tr><td>GPT-3.5 (T=0.7)</td><td>4.650.49</td><td>3.040.63</td><td>4.910.28</td><td>4.290.51</td><td>3.900.41</td><td>3.380.73</td></tr><tr><td>GPT-3.5 (T=1.0)</td><td>4.540.52</td><td>3.020.85</td><td>4.860.35</td><td>4.270.56</td><td>4.010.43</td><td>3.470.75</td></tr><tr><td>GPT-4 (T=0.0)</td><td>4.940.24</td><td>4.960.22</td><td>5.000.00</td><td>4.840.36</td><td>4.930.25</td><td>5.000.00</td></tr><tr><td>GPT-4 (T=0.3)</td><td>4.930.25</td><td>4.950.25</td><td>5.000.00</td><td>4.820.41</td><td>4.940.24</td><td>4.990.08</td></tr><tr><td>GPT-4 (T=0.7)</td><td>4.870.34</td><td>4.910.33</td><td>5.000.00</td><td>4.780.46</td><td>4.930.25</td><td>4.980.14</td></tr><tr><td>GPT-4 (T=1.0)</td><td>4.820.38</td><td>4.860.45</td><td>5.000.00</td><td>4.780.43</td><td>4.860.35</td><td>4.980.14</td></tr></table>
|
| 538 |
+
|
| 539 |
+
results are more deterministic and reproducible for future research.
|
| 540 |
+
|
| 541 |
+
# F LLaMA 2 Results in BFI Scores
|
| 542 |
+
|
| 543 |
+
In this section, we provide additional results of LLaMA 2's performance in BFI assessment in Table 9. Overall, LLaMA 2 Persona's BFI assessment shows less score divergence for each trait pair. Even though statistical significance is found for all personality dimensions, their effect size is much smaller when compared with GPT results.
|
| 544 |
+
|
| 545 |
+
Table 8: LLM evaluation results of GPT-4 generated personal stories with different temperatures. For each evaluated attribute, we report its mean Likert scale and the standard deviation.
|
| 546 |
+
|
| 547 |
+
<table><tr><td>Personality Trait</td><td>Extraversion</td><td>Agreeableness</td><td>Conscientiousness</td><td>Neuroticism</td><td>Openness to Experience</td></tr><tr><td>High</td><td>4.550.36</td><td>4.140.21</td><td>4.050.22</td><td>2.700.46</td><td>4.470.24</td></tr><tr><td>Low</td><td>2.840.76</td><td>3.690.43</td><td>3.730.33</td><td>2.060.32</td><td>3.580.42</td></tr><tr><td>Cohen's d</td><td>2.86</td><td>1.34</td><td>1.16</td><td>1.63</td><td>2.61</td></tr></table>
|
| 548 |
+
|
| 549 |
+
Table 9: We report the statistics of LLaMA 2 Personas' BFI assessment in this Table. The high and low represent the binary traits for each personality dimension. For instance, "High" and "Low" in Extraversion mean extroverted and introverted, respectively. The effect size of the differences between the two traits is also reported.
|
| 550 |
+
|
| 551 |
+
# G Additional Results in Personality Traits
|
| 552 |
+
|
| 553 |
+
In addition to reporting the significant LIWC features correlated with the binary label in the main paper, we conduct a similar analysis between the LIWC features and the LLM personas 5-point BFI results with Spearsman's $\rho$ and report the findings here.
|
| 554 |
+
|
| 555 |
+
# G.1 GPT-3.5 Personas
|
| 556 |
+
|
| 557 |
+
Extroversion Extroverted LLM personas tend to exhibit more social and prosocial behavior in their writings (social: $\rho = 0.27, p < .001$ ; prosocial: $\rho = 0.18, p < .005$ ). Introverted personas tend to use features that show authenticity, such as words that are genuine (authentic: $\rho = -0.40, p < .001$ ). Further,
|
| 558 |
+
|
| 559 |
+
extroverted personas use positive tone and affect more in their writings (affect: $\rho = 0.46, p < .001$ ; tone_pos: $\rho = 0.33, p < .001$ ).
|
| 560 |
+
|
| 561 |
+
Agreeableness Agreeable personas show a strong positive affect and tone in writings (emo_neg: $\rho = -0.66, p < .001$ ; tone_pos: $\rho = 0.50, p < .001$ ). More, they tend to have less conflict-related words (conflict: $\rho = -0.66, p < .001$ ), such as fight, and have less differentiation in sentences (differ: $\rho = -0.39, p < .001$ ), such as "but" or "no". They also have more prosocial word uses (prosocial: $\rho = 0.34, p < .001$ ), however, less authenticity (authentic: $\rho = -0.24, p < .001$ ).
|
| 562 |
+
|
| 563 |
+
Conscientiousness Unconscientious personas have more negative tone and emotion in their writings, such as anger (tone_neg: $\rho = -0.40$ , $p < .001$ ; emo_neg: $\rho = -0.39$ , $p < .001$ ; emo_anger: $\rho = -0.43$ , $p < .001$ ). Their writings tend to use more words that reflect conflicts (conflict: $\rho = -0.41$ , $p < .001$ ). Conscientious personas use less negation words (negate: $\rho = -0.26$ , $p < .001$ ), such as "no", and have less power related words (power: $\rho = -0.24$ , $p < .001$ ), such as "own" and "order". Moreover, conscientious personas exhibit more analytical thinking in the writings (analytic: $\rho = 0.22$ , $p < .001$ ).
|
| 564 |
+
|
| 565 |
+
Neuroticism The strongest correlated linguistic features for neurotic personas is mental health related words, such as trauma or depression (mental: $\rho = 0.46, p < .001$ ). Overall, neurotic personas tend to have a negative emotion and tone in their writings (emo_neg: $\rho = 0.26, p < .001$ ; tone_neg: $\rho = 0.22, p < .001$ ). They also tend to use more words to suggest tentative actions, such as "if" or "any" (tenta: $\rho = 0.18, p < .005$ ). Emotionally stable personas are more likely to use words that are related to memory functions, such as "remember" (memory: $\rho = -0.15, p < .01$ ).
|
| 566 |
+
|
| 567 |
+
Openness Open-minded personas tend to have more curiosity driven actions in their writing (curiosity: $\rho = 0.28, p < .001$ ), such as "seek", and more positive tones. Their writings have less conflict-driven words and more affiliation drives (conflict: $\rho = -0.17, p < .005$ ; affiliation: $\rho = 0.16, p < .005$ ). Further, open-minded personas tend to write about leisure activities (leisure: $\rho = 0.21, p < .001$ ), such as "game" and "play".
|
| 568 |
+
|
| 569 |
+
# G.2 GPT-4 Personas
|
| 570 |
+
|
| 571 |
+
Extroversion Introverted personas have more descriptions of their perception in the writings, for instance, their auditory experience (space: $\rho = -0.38, p < .001$ ; perception: $\rho = -0.38, p < .001$ ; auditory: $\rho = -0.39, p < .001$ ). Extroverted personas wrote more future focused event, such as the usage of "going to" (focusfuture: $\rho = 0.36, p < .001$ ). On the usage of pronouns, extroverted personas use more "we" while introverted personas tend to use "I". Extroverted personas also have more positive tones (tone_pos: $\rho = 0.21, p < .001$ ), and use words that are related to rewards or achievement more frequently (reward: $\rho = 0.26, p < .001$ ; achieve: $\rho = 0.25, p < .001$ ).
|
| 572 |
+
|
| 573 |
+
Agreeableness Agreeable personas display more positive tone and emotion in the writings (tone_pos: $\rho = 0.46, p < .001$ ; emo_pos: $\rho = 0.42, p < .001$ ). They are more prosocial (prosocial: $\rho = 0.29, p < .001$ ), and use less words that suggest conflict and more words that show affiliation (conflict: $\rho = -0.51, p < .001$ ; affiliation: $\rho = 0.22, p < .001$ ; differ: $\rho = -0.26, p < .001$ ). Antagonistic personas uses more words that suggest power and ownership, such as "own" and "order".
|
| 574 |
+
|
| 575 |
+
Conscientiousness Conscientious personas have more prosocial and less negative linguistic features in their writings (prosocial: $\rho = 0.28, p < .001$ ; tone_neg: $\rho = -0.34, p < .001$ ). The writings have less perceived genuineness (authentic: $\rho = -0.24, p < .001$ ). Further, the writings involve achievement and work related words more frequently (achieve: $\rho = 0.36, p < .001$ ; work: $\rho = 0.32, p < .001$ ; reward: $\rho = 0.25, p < .001$ ).
|
| 576 |
+
|
| 577 |
+
Neuroticism Neurotic personas writings reflect more negative emotions and tones, such as anxiety (emo_neg: $\rho = -0.59$ , $p < .001$ ; tone_neg: $\rho = -0.57$ , $p < .001$ ; emo/anx: $\rho = -0.53$ , $p < .001$ ). The writings have more frequent usage of "T" and less usage of "we" (i: $\rho = 0.36$ , $p < .001$ ; we: $\rho = -0.28$ , $p < .001$ ). Emotionally stable personas write with more prosocial and social behaviors (prosocial: $\rho = -0.27$ , $p < .001$ ; social: $\rho = -0.28$ , $p < .001$ ), and the writings have a higher score for perceived genuineness (authentic: $\rho = 0.28$ , $p < .001$ ).
|
| 578 |
+
|
| 579 |
+
Openness Open-minded persona's writings have more curiosity and allure-driven linguistics, such as "research" and "wonder"(curiosity: $\rho = 0.55, p < .001$ ; allure: $\rho = -0.30, p < .001$ ). Further, the writings contain more analytical thinking and sharing thoughts (analytical: $\rho = 0.27, p < .001$ ; insight:
|
| 580 |
+
|
| 581 |
+
$\rho = 0.25, p < .001)$ . Open-minded personas write with more big words with seven letters or longer and more words per sentence (BigWord: $\rho = 0.29, p < .001$ ; WPS: $\rho = 0.26, p < .001$ ).
|
| 582 |
+
|
| 583 |
+
# G.3 LLaMA 2 Personas
|
| 584 |
+
|
| 585 |
+
Extroversion Extroverted personas' writings have more positive tones (emo_pos: $\rho = 0.46, p < .001$ ; tone: $\rho = 0.47, p < .001$ ). Further, the writings tend to have more social references and affiliations (scores: $\rho = 0.48, p < .001$ ; affiliation: $\rho = 0.48, p < .001$ ; emo_pos: $\rho = 0.50, p < .001$ ; differ: $\rho = -0.36, p < .001$ ). There is a weak association with more acclimatisms, and extroverted personas' writings show more drive-related words (exclaim: $\rho = 0.23, p < .001$ ; Drive: $\rho = 0.34, p < .001$ ).
|
| 586 |
+
|
| 587 |
+
Agreeableness Agreeable personas have more positive emotion and tone in writings (emo_pos: $\rho = 0.50, p < .001$ ; tone: $\rho = 0.41, p < .001$ ). There is more word usage around friends and less about work (friend: $\rho = 0.47, p < .001$ ; work: $\rho = -0.48, p < .001$ ). Similar to the previous LMs, it shows more affiliation and fewer conflicts from the writings (conflict: $\rho = -0.31, p < .001$ ; affiliation: $\rho = 0.25, p < .001$ ). There is more usage of pronouns like "we" than "they" (they: $\rho = -0.27, p < .001$ ; we: $\rho = 0.20, p < .001$ ). Interestingly, the writings reflect a slight negative correlation with prosociality (prosocial: $\rho = 0.22, p < .001$ ).
|
| 588 |
+
|
| 589 |
+
Conscientiousness Similar to the trend in GPT-3.5 and GPT-4, LLaMA 2's personified writings have little significant linguistic features with Conscientiousness. It has a weak correlation in word usage around home and fulfillment (home: $\rho = 0.17$ , $p = .002$ ; fulfill: $\rho = 0.15$ , $p = .006$ ). Further, a weak link is found for familiar and friendly words (friend: $\rho = 0.15$ , $p = .007$ ; family: $\rho = 0.13$ , $p = .02$ ).
|
| 590 |
+
|
| 591 |
+
Neuroticism The neurotic personas's writings show a strong negative correlation with positive emotions (emo_pos: $\rho = -0.47, p < .001$ ; tone_neg: $\rho = 0.43, p < .001$ ). Further, word usage around friend, leisure, and social references is negatively correlated with the Persona's neurotic scores, while work and insight-related words are positively related (friend: $\rho = -0.47, p < .001$ ; leisure: $\rho = -0.47, p < .001$ ; socrefs: $\rho = -0.43, p < .001$ ; work: $\rho = -0.42, p < .001$ ; insight: $\rho = -0.43, p < .001$ ).
|
| 592 |
+
|
| 593 |
+
Openness Open-minded LLaMA 2 Personas' writings show a positive trend with positive emotions and affiliations (emo_pos: $\rho = 0.43, p < .001$ ; affiliation: $\rho = 0.34, p < .001$ ). Interestingly, it shows a negative trend of using words related to work or achievement (work: $\rho = -0.54, p < .001$ ; achieve: $\rho = -0.42, p < .001$ ). Further, the writings are more likely to reflect curiosity and have more social references (curiosity: $\rho = 0.29, p < .001$ ; socrefs: $\rho = 0.29, p < .001$ ).
|
2024/PersonaLLM_ Investigating the Ability of Large Language Models to Express Personality Traits/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d3602c3bff7642395405900916200f9b2b37f0e6f739f807ff56681a16ee7a88
|
| 3 |
+
size 1905371
|
2024/PersonaLLM_ Investigating the Ability of Large Language Models to Express Personality Traits/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/Personalized Federated Learning for Text Classification with Gradient-Free Prompt Tuning/7c1a9b02-0857-4f3e-8e73-74fd15e4dff4_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/Personalized Federated Learning for Text Classification with Gradient-Free Prompt Tuning/7c1a9b02-0857-4f3e-8e73-74fd15e4dff4_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/Personalized Federated Learning for Text Classification with Gradient-Free Prompt Tuning/7c1a9b02-0857-4f3e-8e73-74fd15e4dff4_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c4e4e2c4569a1d01acde0954e3c3c7d501c93b14d3afd06e99a62257d45dca0b
|
| 3 |
+
size 470346
|
2024/Personalized Federated Learning for Text Classification with Gradient-Free Prompt Tuning/full.md
ADDED
|
@@ -0,0 +1,520 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Personalized Federated Learning for Text Classification with Gradient-Free Prompt Tuning
|
| 2 |
+
|
| 3 |
+
Rui Wang $^{1}$ Tong Yu $^{2\dagger}$ Ruiyi Zhang $^{2}$ Sungchul Kim $^{2}$ Ryan Rossi $^{2}$
|
| 4 |
+
Handong Zhao $^{2}$ Junda Wu $^{3}$ Subrata Mitra $^{2}$ Lina Yao $^{4,5}$ Ricardo Henao $^{1,6}$ $^{1}$ Duke University $^{2}$ Adobe Research $^{3}$ University of California San Diego $^{4}$ University of New South Wales $^{5}$ CSIRO's Data61 $^{6}$ KAUST raywangwr@outlook.com juw069@ucsd.edu lina.yao@data61.csiro.au ricardo.henao@duke.edu {tyu,ruizhang,sukim,ryrossi,hazhao,sumitra}@adobe.com
|
| 5 |
+
|
| 6 |
+
# Abstract
|
| 7 |
+
|
| 8 |
+
In this paper, we study personalized federated learning for text classification with Pretrained Language Models (PLMs). We identify two challenges in efficiently leveraging PLMs for personalized federated learning: 1) Communication. PLMs are usually large in size, inducing huge communication cost in a federated setting. 2) Local Training. Training with PLMs generally requires back-propagation, during which memory consumption can be several times that of the forward-propagation. This may not be affordable when the PLMs are trained locally on the clients that are resource constrained, e.g., mobile devices with limited access to memory resources. In solving these, we propose a training framework that includes an approach of discrete local search for gradient-free local training, along with a compression mechanism inspired from the linear word analogy that allows communicating with discretely indexed tokens, thus significantly reducing the communication cost. Experiments show that our gradient-free framework achieves superior performance compared with baselines.
|
| 9 |
+
|
| 10 |
+
# 1 Introduction
|
| 11 |
+
|
| 12 |
+
Personalized federated learning (Fallah et al., 2020; Chen et al., 2018; Shamsian et al., 2021) involves collaborative training with non-shareable private data from multiple clients. For each client, we aim to train a personalized model that fits to its local data, leveraging knowledge from other clients. Personalized federated learning has been increasingly attended in the federated learning community due to its ability to account for data heterogeneity across clients (Li et al., 2021). On the other hand, the advent of Pretrained Language Models (PLMs) (Liu et al., 2019; Kenton and Toutanova, 2019) has yielded remarkable performance for natural language processing, e.g., text classification.
|
| 13 |
+
|
| 14 |
+
However, such PLMs are usually large in size, e.g., with hundreds of millions or billions of parameters. There has been limited works investigating how to efficiently train with such large PLMs in federated learning scenarios (Guo et al., 2022; Zhao et al., 2022). In this paper, we investigate on efficient training with PLMs in personalized federated learning for the task of text classification.
|
| 15 |
+
|
| 16 |
+
One challenge of training PLMs in a federated learning scenario is how to reduce communication cost. Federated learning generally requires communicating updated trainable model parameters between a central server and local clients (McMahan et al., 2017; Li et al., 2020). When training with PLMs, their sheer size may introduce huge communication cost between the server and clients, thus reducing the training efficiency. To solve this problem, recent works propose to leverage prompt tuning (Guo et al., 2022; Zhao et al., 2023). By only training and communicating the prompt embeddings and freeze the pretrained parameters of the PLMs, the communication cost is largely reduced compared with training all the parameters of the PLMs. However, these works can still be impractical in real-life federated learning. The main reason is that their training on local clients requires back-propagating through the PLMs, in order to calculate the gradient of the prompt embeddings. The memory consumption of back-propagation is several times higher (depending on implementation) than that of forward-propagation $^{1}$ (Baydin et al., 2022; Belouze, 2022). Additionally, the memory footprint taken by gradient computation is proportional to the size of the PLMs, which is becoming increasingly large due to the observation of emergent abilities with the recent pretrained large language models (Wei et al., 2022; Schaeffer et al., 2024). Therefore, back-propagating with the PLMs
|
| 17 |
+
|
| 18 |
+
can be extremely memory consuming. Unfortunately, the clients in federated learning (e.g., edge devices) usually have limited access to the memory resources (Rabbani et al., 2021; Deng, 2019). Consequently, the memory footprint required by gradient computation can exceed the capacity of client devices, resulting the local training being infeasible.
|
| 19 |
+
|
| 20 |
+
To address these issues, we propose a gradient-free training framework that saves both the memory and communication cost in federated learning with PLMs. Specifically, during local training with client data, the PLM is trained via a gradient-free approach of discrete local search with the set of natural language tokens, which saves the memory consumption of back-propagation by avoiding forward-propagation during local training. Additionally, it significantly reduces the communication cost by allowing to upload with only discrete token indices. Further, with the prompts from local training being only natural language tokens, we propose a compression mechanism that compresses the aggregated prompt embeddings according to linear word analogies (Ethayarajh et al., 2018; Nissim et al., 2020; Drozd et al., 2016), further reducing the communication cost of downloading from the server. Our contributions are as follows:
|
| 21 |
+
|
| 22 |
+
- We propose a noval gradient-free personalized federated learning framework for text classification with PLMs. To the best of our knowledge, we are one of the first to consider gradient-free training in federated learning with PLMs.
|
| 23 |
+
- Our gradient-free framework includes training with discrete local search while compressing the prompt embeddings with discrete tokens, substantially reducing the communication and memory cost during federated learning.
|
| 24 |
+
- Experiments on various datasets show that our gradient-free framework can achieve superior performance compared to baselines.
|
| 25 |
+
|
| 26 |
+
# 2 Related Work
|
| 27 |
+
|
| 28 |
+
Federated Learning with PLMs: The sheer size of the PLMs (Liu et al., 2019; Kenton and Toutanova, 2019) poses challenges to federated learning due to both high communication cost and large memory footprint during local training. Previous works (Wang et al., 2022, 2023; Zhang et al.,
|
| 29 |
+
|
| 30 |
+
2023) of federated learning with PLMs mostly targets the training efficiency in terms of the communication cost. For instance, Lit et al. (2022) propose to reduce the communication cost by only communicating the lower layers of the PLMs between server and clients, while the upper layers are trained only with local data. Inspired by the superior performance and efficiency of prompt tuning (Lester et al., 2021; Liu et al., 2022), (Guo et al., 2022; Zhao et al., 2023; Guo et al., 2023) propose to further reduce the communication cost via only training and communicating the continuous prompt embeddings. The drawback of these works is that they all require training with gradients, neglecting the huge memory consumption caused by back-propagating through the PLMs. This can be problematic in federated learning for clients with constrained computation resources, e.g., edge devices that have limited memory capacity.
|
| 31 |
+
|
| 32 |
+
Gradient-Free Training with PLMs: Sun et al. (2022b); Cao et al. (2023) propose Language-Model-as-a-Service (LMaaS) that fine tunes the pretrained prompt embeddings of the PLMs with CMA-ES (Hansen and Ostermeier, 2001), a gradient-free method that only requires forwardpropagation. This setting requires the client data being transferred to an external server with the API of PLMs, thus violating the privacy-preserving principle of federated learning. Deng et al. (2022); Diao et al. (2022) model the prompts for the PLM inputs with a prompt generator that is trained with gradients from reinforcement learning. In this way, the back-propagation is not on parameters of the PLM but the prompt generator. This may not be suitable for federated learning, since the prompt generators (e.g., implemented with another PLM) can introduce additional large computation cost for clients during local training. Hou et al. (2022); Prasad et al. (2022) also study gradient-free training of PLMs, but it is unclear how to apply their approach for federated learning. To illustrate, Hou et al. (2022) adopts boosting with prompts, requiring ten times the computation for model inference compared to without boosting, thus is not compatible with clients equipped with constrained computation resources. Importantly, none of the works above study federated learning.
|
| 33 |
+
|
| 34 |
+
# 3 General Setup
|
| 35 |
+
|
| 36 |
+
Let $M$ be the number of clients in federate learning, and $\{D_i\}_{i=1}^M$ be their local datasets. In per
|
| 37 |
+
|
| 38 |
+
sonalized federated learning, these datasets are from different domains or tasks. We have $\mathcal{D}_i = \{\pmb{x}_n,\pmb{y}_n\}_{n = 1}^N$ for $i = 1,\dots ,M$ with totally $N$ training samples, where $\pmb{x}_n$ is the $n^{th}$ text sequence and $\pmb{y}_n$ is its label for text classification. Let $\pmb {f}(\cdot)$ be the pretrained PLM encoder, and $\pmb {p}_i\in \mathbb{R}^{T\times D}$ be a sequence of $T$ prompt token embeddings for client $i$ . In experiments, we follow (Sun et al., 2022b) with $T = 50$ . $D$ is the dimension of the pretrained token embeddings. By prompt tuning, we predict on $\pmb{x}_n$ via concatenating it with prompt $\pmb{p}_i$ using a template $\mathcal{M}$ ,
|
| 39 |
+
|
| 40 |
+
$$
|
| 41 |
+
\mathcal {M} \left(\boldsymbol {x} _ {n}\right) = \left[ \boldsymbol {p} _ {i}; \boldsymbol {e} \left(\boldsymbol {x} _ {n}\right); \boldsymbol {e} (I t i s [ M a s k ]) \right] \tag {1}
|
| 42 |
+
$$
|
| 43 |
+
|
| 44 |
+
$$
|
| 45 |
+
\boldsymbol {p} \left(\boldsymbol {y} _ {n} \mid \boldsymbol {x} _ {n}\right) = \left[ \operatorname {s o f t m a x} \left(\boldsymbol {f} \left(\mathcal {M} \left(x _ {n}\right)\right) \cdot \boldsymbol {v} _ {l} ^ {T}\right) \right] _ {\mathcal {Y} _ {n}}, \tag {2}
|
| 46 |
+
$$
|
| 47 |
+
|
| 48 |
+
where $[\cdot ]$ denotes row concatenation and $e(\cdot)$ is the embedding layer of the PLM that converts each token into its pretrained embedding. $f$ and $e$ are frozen during federated learning. The output from $f$ on the position of [MASK] is compared via inner product with the verbalizer $\pmb{v}_l$ , which contains embeddings of words that are representative of each label (Gao et al., 2020). For instance, we can have $\pmb{v}_l = e([good,bad])$ for sentiment classification.
|
| 49 |
+
|
| 50 |
+
In this way, the only trainable parameter for client $i$ is the prompt $\pmb{p}_i$ . The training loss for client $i$ is,
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
\mathcal {L} \left(\boldsymbol {p} _ {i}; \mathcal {D} _ {i}\right) = \frac {1}{N} \sum_ {n = 1} ^ {N} - \log \boldsymbol {p} \left(\boldsymbol {y} _ {n} \mid \boldsymbol {x} _ {n}\right), \tag {3}
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
When training with personalized federated learning for text classification, the general objective is to find $\{\pmb{p}_i\}_{i=1}^M$ that minimizes,
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\frac {1}{M} \sum_ {i = 1} ^ {M} \mathcal {L} \left(\boldsymbol {p} _ {i}; \mathcal {D} _ {i}\right), \tag {4}
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
while keeping $\{\mathcal{D}_i\}_{i=1}^M$ locally for each client. This is achieved via coordinating the training with a server that iteratively receives $\{\pmb{p}_i\}_{i=1}^M$ from local training and distribute their aggregated version, denoted as $\pmb{p}$ in Section 4.1. Unlike the PLMs with online APIs (e.g. GPT-3.5/4 (OpenAI, 2023)) that requires uploading user data to an external server, it is reasonable that the PLMs is deployed locally (i.e., without data uploading), for better data privacy with federated learning.
|
| 63 |
+
|
| 64 |
+
# 4 Our Framework
|
| 65 |
+
|
| 66 |
+
# 4.1 General Procedures
|
| 67 |
+
|
| 68 |
+
Our proposed framework of federated learning is composed of the following four steps (also shown in Alg 1), which are executed iteratively multiple rounds of federated learning:
|
| 69 |
+
|
| 70 |
+
- Local Training: Each client trains its own $\pmb{p}_i$ with its local data. Section 4.2 introduces our proposed gradient-free approach of discrete local search for $\pmb{p}_i$ .
|
| 71 |
+
- Upload: The learnt $\{\pmb{p}_i\}_{i=1}^M$ is uploaded to the server via converting each $\pmb{p}_i$ to its corresponding index (Section 4.3).
|
| 72 |
+
- Aggregate: The server aggregates information from different clients by generating a global prompt $\mathbf{p}$ from $\left\{\mathbf{p}_i\right\}_{i=1}^M$ to generate, i.e.,
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
\boldsymbol {p} = \frac {1}{M} \sum_ {i = 1} ^ {M} \boldsymbol {p} _ {i}, \tag {5}
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
where we adopt FedAvg (McMahan et al., 2017) and assume uniform weighting.
|
| 79 |
+
|
| 80 |
+
- Download: $\pmb{p}$ is downloaded to each client as the initialization of local training (with $\pmb{p}_i$ ) for the next round. Section 4.4 proposes a compression method that approximates $\pmb{p}$ with reduced communication cost (denoted as $\pmb{p}'$ ).
|
| 81 |
+
|
| 82 |
+
Note that we assume the pretrained parameters of PLMs have been downloaded to each client before the start of federated learning, so that we only need to communicate the prompt parameters during federated learning. We claim that downloading the PLM parameters to local clients is a practical assumption for federated learning. Specifically, it avoids the client data being uploaded to the server for model inference, as opposed to the recently proposed Language-Model-as-a-Service (LMaas) (Sun et al., 2022b; Deng et al., 2022; Cao et al., 2023) where the PLM API is only stored on an online server that requires data uploading. This is especially important for federated learning where the data privacy is of prime concern.
|
| 83 |
+
|
| 84 |
+
# 4.2 Gradient-Free Local Training
|
| 85 |
+
|
| 86 |
+
In updating each client $i$ , its prompt $\pmb{p}_i$ is firstly initialized with the global prompt $\pmb{p}$ (or $\pmb{p}'$ in Section 4.4) from the previous round of federated learning, then fine tuned on the local dataset $\mathcal{D}_i$ . As
|
| 87 |
+
|
| 88 |
+
# Algorithm 1 Overall Algorithm.
|
| 89 |
+
|
| 90 |
+
Input: Datasets $\{\mathcal{D}_i\}_{i=1}^M$ , the PLM (API and its pretrained embedding matrix $e(\mathcal{V})$ ).
|
| 91 |
+
|
| 92 |
+
Output: The resulting prompt $p'$ .
|
| 93 |
+
|
| 94 |
+
Initialize $\pmb{p}$ with natural token embeddings.
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
\boldsymbol {p} = \boldsymbol {p} ^ {\prime} = \boldsymbol {p} _ {- 1} ^ {\prime}
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
Download the PLM and $p_{-1}^{\prime}$ to each client.
|
| 101 |
+
|
| 102 |
+
% General procedures for federated learning.
|
| 103 |
+
|
| 104 |
+
for $r = 1,\dots ,n$ round do
|
| 105 |
+
|
| 106 |
+
$\%$ Iterate with the $M$ clients.
|
| 107 |
+
|
| 108 |
+
for $i = 1,\dots ,M$ do
|
| 109 |
+
|
| 110 |
+
% Local Training: Section 4.2, Alg. 3.
|
| 111 |
+
$\pmb{p}_i = \mathrm{Local\_Training}(\pmb{p}', \mathcal{D}_i)$
|
| 112 |
+
% Upload: Section 4.3.
|
| 113 |
+
|
| 114 |
+
Upload the indices of $\pmb{p}_i$ to the server.
|
| 115 |
+
|
| 116 |
+
# end for
|
| 117 |
+
|
| 118 |
+
% Aggregation: Section 4.1
|
| 119 |
+
|
| 120 |
+
Aggregate $\{p_i\}_{i = 1}^M$ with (5), generating $\pmb{p}$
|
| 121 |
+
|
| 122 |
+
% Download: Section 4.4, Alg. 2
|
| 123 |
+
|
| 124 |
+
$\pmb{p}^{\prime} =$ Compress_Download $(p^{\prime},p_{-1}^{\prime},e(\mathcal{V}))$
|
| 125 |
+
|
| 126 |
+
$$
|
| 127 |
+
\boldsymbol {p} _ {- 1} ^ {\prime} = \boldsymbol {p} ^ {\prime}
|
| 128 |
+
$$
|
| 129 |
+
|
| 130 |
+
# end for
|
| 131 |
+
|
| 132 |
+
mentioned before, gradient-based fine tuning of $\pmb{p}$ with back-propagation can be extremely memory consuming with PLMs. Therefore, we study gradient-free client update of the prompt embeddings, which does not require gradient computing with back-propagation. Specifically, we propose an update mechanism of the prompts based on discrete local search with the set of natural language tokens. Let $\mathcal{V}$ be the vocabulary of the PLM and superscript $t$ denote the $t^{th}$ row of a matrix. For each update iteration, we want to update with only natural language tokens for $\pmb{p}_i$ to reduce the communication cost (Section 1). Specifically, given a randomly sampled index $t$ of the prompt token embeddings, $t\in [1,T]$ , and a set of candidate natural language tokens $\pmb{C}(\pmb{p}_i^t)\subset \mathcal{V}$ for replacement, we update $\pmb{p}_i^t$ via,
|
| 133 |
+
|
| 134 |
+
$$
|
| 135 |
+
\boldsymbol {p} _ {i} ^ {t} = \underset {\boldsymbol {w} \left\{e (c) \mid c \in \boldsymbol {C} \left(\boldsymbol {p} _ {i} ^ {t}\right) \right\}} {\operatorname {a r g m i n}} \mathcal {L} (\operatorname {r e p l} \left(\boldsymbol {p} _ {i}, \boldsymbol {w}, t\right), \mathcal {D} _ {i}), \tag {6}
|
| 136 |
+
$$
|
| 137 |
+
|
| 138 |
+
Note that $\pmb{p}_i^t$ on the left side is the updated prompt of the next iteration of local training, while the one on the right is from the previous iteration. $\mathrm{repl}(\pmb{p}_i, \pmb{w}, t)$ denotes replacing the $t^{th}$ row of $\pmb{p}_i$ with $\pmb{w}$ . We randomly choose one position $t$ for each iteration of local training. The candidate set
|
| 139 |
+
|
| 140 |
+
$C(\pmb{p}_i^t)$ is selected with,
|
| 141 |
+
|
| 142 |
+
$$
|
| 143 |
+
\boldsymbol {C} \left(\boldsymbol {p} _ {i} ^ {t}\right) = \underset {\boldsymbol {C} \subset \mathcal {V}, | \boldsymbol {C} | = K} {\operatorname {a r g m a x}} \sum_ {c \in \boldsymbol {C}} \cos (\boldsymbol {e} (c), \boldsymbol {p} _ {i} ^ {t}), \tag {7}
|
| 144 |
+
$$
|
| 145 |
+
|
| 146 |
+
where $\cos (\cdot ,\cdot)$ is the cosine similarity. We only select $K$ candidate tokens in $C$ with the most similar semantics as $\pmb{p}_i^t$ (large cosine similarity), in order to avoid large perturbation of $\pmb{p}_i^t$ in a single update step. $K$ is the number of local search in each step that controls the training efficiency and is discussed in Section 5. The general procedure is additionally elaborated in Algorithm 3. Note that such a simple update mechanism allows us to represent the learn prompt $\pmb{p}_i$ with token indices, significantly reducing the upload communication cost 4.3.
|
| 147 |
+
|
| 148 |
+
We notice there are previous works (Li and Liang, 2021; Liu et al., 2021) claiming that discrete tokens are less expressive than continuous tokens, thus the learning capacity may be limited when trained with discrete tokens. However, as described in Section 3, datasets of different clients in personalized federated learning may represent different domains/tasks. For such cases, training with continuous prompts may result in the updated $\pmb{p}_i$ being overfit to the domain/task of client $i$ , causing negative knowledge transfer to other clients when $\pmb{p}_i$ is aggregated with (5). In experiments, we will show that our approach can produce better accuracy compared to training with continuous prompt embeddings.
|
| 149 |
+
|
| 150 |
+
# 4.3 Uploading with Discrete Indices
|
| 151 |
+
|
| 152 |
+
By constraining the candidate embeddings to be within the set of natural language tokens, i.e., $C(\pmb{p}_i^t) \subset \mathcal{V}$ , the updated rows of $\pmb{p}_i$ can be saved by only keeping its token index. This significantly reduces the communication cost when uploading prompts to the server, compared with previous works of continuous prompt tuning Guo et al. (2022); Zhao et al. (2022) that upload all the prompt parameters. For instance, the vocabulary size of the Roberta-Large (Liu et al., 2019) model is 50,264 with $D = 1024$ , which implies that each token index can be encoded with 16 bits. For rows of $\pmb{p}_i$ that are not modified during client update, we can signify it with a special index using a 16-bit integer, e.g., 50,265 (not natural token indices). Thus, we only need to upload 16 Bits for each position of $p_i$ . Comparatively, uploading the whole prompt vector to the server requires communicating $16 * 1024 \approx 16\mathrm{KB}$ for each position, provided that the continuous parameters are encoded into
|
| 153 |
+
|
| 154 |
+
float16 during communication. As the result, we reduce the communication cost by 1000 times (16 Bits vs 16 KB).
|
| 155 |
+
|
| 156 |
+
# 4.4 Downloading with Embedding Compression
|
| 157 |
+
|
| 158 |
+
After the client update, the uploaded $\pmb{p}_i$ , for $i = 1, \dots, M$ , are aggregated with (5). We can observe that each row of the resulting $\pmb{p}$ after aggregation can no longer be represented with a single discrete token index, thus cannot be compressed as in Section 4.3 when being downloaded to clients. Below we propose to compress $\pmb{p}$ after aggregation with the pretrained token embeddings of the PLM, i.e., approximating $\pmb{p}$ with the matrix of pretrained token embeddings $e(\mathcal{V}) \in \mathbb{R}^{|\mathcal{V}| \times D}$ .
|
| 159 |
+
|
| 160 |
+
This draws from the intuition in previous works on linear word analogies (Ethayarajh et al., 2018; Nissim et al., 2020; Drozd et al., 2016), which show interesting examples with linear operations among the pretrained word/token embeddings, e.g., $\pmb{e}(\text{king}) - \pmb{e}(\text{man}) + \pmb{e}(\text{woman}) \approx \pmb{e}(\text{queen})$ or $\pmb{e}(\text{doctor}) - \pmb{e}(\text{man}) + \pmb{e}(\text{woman}) \approx \pmb{e}(\text{nurse})$ . These indicate that a pretrained token embedding can be estimated by a few embeddings of tokens with similar or relevant semantics. As for our $\pmb{p}$ , we can observe from (5) that its prompt embeddings is assumed to be within the convex hull of the natural token embeddings. Therefore, it should be viable to estimate each row of $\pmb{p}$ with a few or fixed number of natural token embeddings. For each round of federated learning with aggregated prompt $\pmb{p}$ , let $\pmb{p}'$ be the compressed prompt downloaded to clients from the server after compressing $\pmb{p}$ in the current round. We denote $\pmb{p}_{-1}'$ as the compressed prompt downloaded to clients in the previous round. Below, we elaborate on how to compress $\pmb{p}$ into $\pmb{p}'$ , given $\pmb{p}_{-1}'$ from the previous round of federated learning.
|
| 161 |
+
|
| 162 |
+
We should note that $\pmb{p}_{-1}^{\prime}$ from the previous round is accessible by both the server and clients, since it was generated by the server and received by the clients. Thus, for the training stability of $\pmb{p}$ at index $t$ , we only compress its increment (residual) between the previous and current rounds, i.e., $\pmb{R}^{t} = \pmb{p}^{t} - \pmb{p}_{-1}^{t^{\prime}}$ , instead of directly compressing $\pmb{p}^{t}$ . Specifically, we want to find a sparse projection from $e(\mathcal{V})$ to $\pmb{R}^{t}$ , so it can be approximated with a limited number of pretrained embeddings. Let $\pmb{I}$ be a sequence of token indices, initialized as $I = [1\cdots,|\mathcal{V}|]$ . We define $e(\mathcal{V})_{I}$ be the rows in $e(\mathcal{V})$ indexed by $I$ . Formally, we optimize the
|
| 163 |
+
|
| 164 |
+
following,
|
| 165 |
+
|
| 166 |
+
$$
|
| 167 |
+
\boldsymbol {x} ^ {*} = \operatorname {a r g m i n} _ {\boldsymbol {x}} | | \boldsymbol {e} (\mathcal {V}) _ {I} ^ {T} \cdot \boldsymbol {x} - \boldsymbol {R} ^ {t} | | _ {2} ^ {2} + \alpha | | \boldsymbol {x} | | _ {1}, (8)
|
| 168 |
+
$$
|
| 169 |
+
|
| 170 |
+
$$
|
| 171 |
+
\boldsymbol {I} _ {x} = \operatorname {a r g m a x} _ {| \boldsymbol {I} _ {x} | = L} \sum_ {j \in \boldsymbol {I} _ {x}} | \boldsymbol {x} ^ {*} [ j ] |, \boldsymbol {I} = \boldsymbol {I} [ \boldsymbol {I} _ {x} ], \tag {9}
|
| 172 |
+
$$
|
| 173 |
+
|
| 174 |
+
where $I_{x}$ takes the top $L$ token indices with the largest absolute projection values in $\pmb{x}^{*}$ . $I[I_x]$ is the value of $\pmb{I}$ indexed by $I_{x}$ . $x\in \mathbb{R}^{|I|\times 1}$ is the learnt projection, $||\cdot ||_1$ and $||\cdot ||_2$ are the one and two norms, respectively, and $|\cdot |$ denotes the absolute value. We solve a sparse $\pmb{x}^{*}$ using LASSO regularization as in (8), with $\alpha$ being the regularization weight. We empirically set $\alpha = 0.2$ for all datasets and clients. $\pmb{x}^{*}[j]$ is the $j^{th}$ element of $\pmb{x}^{*}$ . To further minimize the error in estimating $\pmb{R}^t$ , the final projection $\pmb{x}_f^*\in \mathbb{R}^{I\times 1}$ is,
|
| 175 |
+
|
| 176 |
+
$$
|
| 177 |
+
\boldsymbol {x} _ {f} ^ {*} = \operatorname {a r g m i n} _ {\boldsymbol {x} _ {f}} \left\| \boldsymbol {e} (\mathcal {V}) _ {\boldsymbol {I}} ^ {T} \cdot \boldsymbol {x} _ {f} - \boldsymbol {R} ^ {t} \right\| _ {2} ^ {2}. \tag {10}
|
| 178 |
+
$$
|
| 179 |
+
|
| 180 |
+
We denote the cardinal of resulting $I$ in (10) as $\Phi$ , the number of token embeddings used to approximate $\pmb{R}^{t}$ . Instead of downloading with the aggregated $\pmb{p}$ , we download $\{I, x_{f}^{*}\}$ to each client. As the result, we only need to download $16 \times 2\Phi$ Bits for each prompt token, consider that both the token index in $I$ and continuous variable in $x_{f}^{*}$ are encoded with 16 Bits, as in Section 4.2.
|
| 181 |
+
|
| 182 |
+
The client will reconstruct the residual $\pmb{R}$ via $\hat{\pmb{R}} = e(\mathcal{V})_I^T\cdot \pmb{x}_f$ . Finally, the compressed prompt received by the clients for the current round is,
|
| 183 |
+
|
| 184 |
+
$$
|
| 185 |
+
\boldsymbol {p} ^ {t ^ {\prime}} = \boldsymbol {p} _ {- 1} ^ {t ^ {\prime}} + \hat {\boldsymbol {R}} ^ {t}, \tag {11}
|
| 186 |
+
$$
|
| 187 |
+
|
| 188 |
+
$\pmb{p}^{\prime} = [\pmb{p}^{1^{\prime}}, \dots, \pmb{p}^{T^{\prime}}]$ will be further saved as $\pmb{p}_{-1}^{\prime}$ for the next round of federated learning. In the experiments, $\pmb{I}$ is selected with two iterations of (8) and (9), as in Algorithm 2.
|
| 189 |
+
|
| 190 |
+
After the last round of federated learning, we follow (Fallah et al., 2020; Chen et al., 2018) that further fine-tunes $\pmb{p}^{\prime}$ with a post tuning process for the final $\pmb{p}_i$ (no communication cost). The post tuning is to adapt the resulting $\pmb{p}_i$ to the task/domain of test client $i$ for more personalization. To avoid forgetting of the global knowledge encoded by $\pmb{p}^{\prime}$ , we adopt the gradient-free method of BBT (Sun et al., 2022b) that allows $\pmb{p}^{\prime}$ being trained in a constrained continuous subspace with a small learning rate. Please refer to Appendix B for more details. In experiments, we also compare our discrete local search with BBT in local training, showing that our approach discrete local search is more effective in the federated learning setting.
|
| 191 |
+
|
| 192 |
+
<table><tr><td>Method</td><td>Upload</td><td>Download</td><td>BP?</td></tr><tr><td>A. Prompt Tuning</td><td>0</td><td>0</td><td>Yes</td></tr><tr><td>B. Prompt Tuning (Fed)</td><td>819 KB</td><td>819 KB</td><td>Yes</td></tr><tr><td>C. Meta Prompt Tuning (Fed)</td><td>819 KB</td><td>819 KB</td><td>Yes</td></tr><tr><td>D. pFedMe</td><td>819 KB</td><td>819 KB</td><td>Yes</td></tr><tr><td>E. FedKD</td><td>1.3 GB</td><td>1.3 GB</td><td>Yes</td></tr><tr><td>F. Fine Tuning (Fed)</td><td>5.3 GB</td><td>5.3 GB</td><td>Yes</td></tr><tr><td>G. BBT</td><td>0</td><td>0</td><td>No</td></tr><tr><td>H. BBT (Fed)</td><td>8 KB</td><td>8 KB</td><td>No</td></tr><tr><td>I. Ours (Φ = 3)</td><td>0.8 KB</td><td>4.8 KB</td><td>No</td></tr><tr><td>J. Ours (Φ = 5)</td><td>0.8 KB</td><td>8 KB</td><td>No</td></tr><tr><td>K. Ours (FullDownload)</td><td>0.8 KB</td><td>819 KB</td><td>No</td></tr></table>
|
| 193 |
+
|
| 194 |
+
Table 1: Illustration of our approaches and baselines (cited/explained in Appendix C). Upload and Download shows the Bits that is uploaded and downloaded per round of federated learning. $BP?$ indicates whether the method requires back-propagation. Our approaches can save the memory consumption of back-propagation, while significantly reduce the communication cost. We index the mappings with A-K for the convenience of Figure 2.
|
| 195 |
+
|
| 196 |
+
# 5 Experiments
|
| 197 |
+
|
| 198 |
+
# 5.1 Experiment Setting
|
| 199 |
+
|
| 200 |
+
Training: Following pLF-Bench (Chen et al., 2022), we adopt the datasets of Sentiment140 (Twitter) (Go et al., 2009), CoLA (Warstadt et al., 2018) and SST2 (Socher et al., 2013) for experiments of text classification with federated learning. We additionally adopt FDU-MTL (Liu et al., 2017) that contains 16 text domain. We train and evaluate on all the 16 domains of FDU-MTL (each client with a unique text domain). Please refer to Appendix A for more training details and data splits. Table 1 lists our approaches and considered baselines, which are also detailed in Appendix C. We follow (Sun et al., 2022b) that uses Roberta-Large in our experiments. We do not adopt larger models, e.g. LLaMA (Touvron et al., 2023), due to our practical assumption that the federated learning clients are given limited access to computation resources (Section 1).
|
| 201 |
+
|
| 202 |
+
Evaluation: The performance of the PLM from federated learning is evaluated via the average classification accuracy over clients that it is tested on. We conduct two kinds of testing: i) $P$ : Testing on the Participant clients of federated learning. This evaluated how much a PLM can capture the knowledge from clients during training. i) $NP$ : Testing on the Non-Participant clients of federated learning. This evaluated the PLM can generalize to unseen
|
| 203 |
+
|
| 204 |
+

|
| 205 |
+
Figure 1: Averaged training loss during joint training of Ours $(\Phi = 5)$ with different values of $K$
|
| 206 |
+
|
| 207 |
+
clients. For Sentiment140, CoLA and SST2, our partition of participant and non-participant clients follows (Chen et al., 2022). For FDUMTL, we first set all its 16 domain/clients as participant for the evaluation of $P$ . In evaluating $NP$ , we conduct a 4-split cross-validation that split the 16 clients into 4 groups. We iteratively treat the clients of each group as non-participant while those from others groups as participant (Table 3). In this way, each client is treated as non-participant once and we average the results for $NP$ .
|
| 208 |
+
|
| 209 |
+
In Table 1, we also report on: 1) Whether the method requires back-propagation, i.e., does the model consume a large memory footprint for local training? 2) The communication cost, i.e., the number of communicated Bits between server and clients for each round of federated learning. In calculating the Bits, we assume the token indices are encoded with 16-bit and continuous parameters are converted into float16 during communication, as in Sections 4.2 and 4.4. Importantly, we calculate the upload and download cost separately, due to the fact that the upload bandwidth is usually smaller than the download bandwidth (Hegedus et al., 2021), i.e., upload is more expensive than download with the same number of Bits. For instance, with prompt length $T = 50$ (Appendix A), the upload communication cost for Ours $(\Phi = 5)$ is $50 \times 16 = 0.8K$ (Section 4.2) and its download cost is $50 \times 2 \times 5 \times 16 = 8K$ (Section 4.4)
|
| 210 |
+
|
| 211 |
+
# 5.2 Local Search with Different $K$ Values.
|
| 212 |
+
|
| 213 |
+
As discussed in Section 4.2, discrete prompt tokens might be less expressive than continuous prompt embeddings trained with gradients (Li and Liang, 2021; Liu et al., 2021). Thus, one may be concerned about the capability of discrete local search
|
| 214 |
+
|
| 215 |
+
<table><tr><td rowspan="2"></td><td colspan="2">Sentiment140</td><td colspan="2">FDUMTL</td><td colspan="2">CoLA</td><td colspan="2">SST2</td><td colspan="2">Avg</td></tr><tr><td>P</td><td>NP</td><td>P</td><td>NP</td><td>P</td><td>NP</td><td>P</td><td>NP</td><td>P</td><td>NP</td></tr><tr><td>Prompt Tuning</td><td>73.22</td><td>N/A</td><td>83.41</td><td>N/A</td><td>71.89</td><td>N/A</td><td>79.87</td><td>N/A</td><td>77.10</td><td>N/A</td></tr><tr><td>Prompt Tuning (Fed)</td><td>73.44</td><td>74.67</td><td>84.28</td><td>83.76</td><td>74.22</td><td>73.03</td><td>81.22</td><td>81.49</td><td>78.29</td><td>78.24</td></tr><tr><td>Meta Prompt Tuning (Fed)</td><td>73.95</td><td>74.89</td><td>84.20</td><td>83.89</td><td>73.17</td><td>73.46</td><td>81.96</td><td>82.44</td><td>78.32</td><td>78.67</td></tr><tr><td>pFedKD</td><td>72.75</td><td>73.11</td><td>84.03</td><td>83.86</td><td>72.56</td><td>71.34</td><td>78.65</td><td>79.57</td><td>77.00</td><td>76.97</td></tr><tr><td>pFedMe</td><td>75.66</td><td>74.95</td><td>84.60</td><td>84.79</td><td>74.95</td><td>72.27</td><td>81.78</td><td>81.65</td><td>79.25</td><td>77.66</td></tr><tr><td>Fine Tuning (Fed)</td><td>74.17</td><td>75.52</td><td>85.98</td><td>85.09</td><td>74.01</td><td>74.35</td><td>80.96</td><td>79.42</td><td>78.78</td><td>78.60</td></tr><tr><td>BBT</td><td>73.17</td><td>N/A</td><td>84.34</td><td>N/A</td><td>74.26</td><td>N/A</td><td>80.34</td><td>N/A</td><td>78.03</td><td>N/A</td></tr><tr><td>BBT (Fed)</td><td>73.87</td><td>73.58</td><td>86.12</td><td>86.44</td><td>75.88</td><td>73.07</td><td>81.46</td><td>80.67</td><td>79.33</td><td>78.69</td></tr><tr><td>Ours (Φ = 3)</td><td>74.08</td><td>74.94</td><td>86.64</td><td>86.66</td><td>75.22</td><td>72.97</td><td>81.78</td><td>82.14</td><td>79.43</td><td>79.18</td></tr><tr><td>Ours (Φ = 5)</td><td>76.17</td><td>75.34</td><td>87.14</td><td>87.00</td><td>74.86</td><td>73.31</td><td>82.36</td><td>82.88</td><td>80.13</td><td>79.63</td></tr><tr><td>Ours (FullDownload)</td><td>75.16</td><td>76.00</td><td>87.71</td><td>87.31</td><td>75.75</td><td>73.78</td><td>82.95</td><td>82.73</td><td>80.39</td><td>80.00</td></tr></table>
|
| 216 |
+
|
| 217 |
+
Table 2: Results with our considered datasets for federated learning. "P" and "NP" denotes the mean accuracy on Participant and Non Participant clients of federated learning, respectively. Prompt Tuning and BBT are not federated learning methods, thus all clients are treated as Participants Please note that, in addition to performance, our approaches are also superior in terms of memory consumption and computation cost. Please refer to Table 1 for more details.
|
| 218 |
+
|
| 219 |
+
in minimizing the loss functions of different tasks of different clients. From (6), we can observe that such capability is large and determined by the search number $K$ for each step of local search. Ideally, in maximizing the optimization ability of our local search, we can set $K = |\mathcal{V}|$ , i.e., and try with the whole vocabulary instead of searching locally. However, such a combinatorial optimization is computationally expensive, thus not compatible with resource constrained clients. There should be a trade-off between the optimization ability and training efficiency for discrete local search.
|
| 220 |
+
|
| 221 |
+
In this section, we investigate how the optimization ability of our proposed local search is affected by the search number $K$ . In Figure 1, we plot the averaged training loss (4) over all the clients in FDU-MTL when training Ours $(\Phi = 5)$ with different $K$ values. We can observe that our local search can effectively minimize the loss function during training. Additionally, we find that the performance gain, i.e., the difference in the optimized loss value, is diminishing when switching from $K = 2$ to $K = 5$ and from $K = 5$ to $K = 8$ . However, the introduced computation cost from $K = 2$ to $K = 5$ is the same as that from $K = 5$ to $K = 8$ . With such observation, we take $K = 5$ as a trade-off between the computation efficiency and optimization ability, since 1) local search with $K = 5$ is not very expensive, e.g., comparing the implementation of BBT (Sun et al., 2022b) that
|
| 222 |
+
|
| 223 |
+

|
| 224 |
+
Figure 2: Results on each group of non-participant clients in FDUMTL. For convenience, we denote each method with the index defined in Table 1. Our approaches are the right of the vertical line.
|
| 225 |
+
|
| 226 |
+
requires 20 searches each step. 2) The performance gain from $K = 5$ to $K = 8$ is much smaller than that $K = 2$ to $K = 5$ , thus increasing the value of $K$ from 5 may not be cost-effective. Therefore, we keep $K = 5$ for all our experiments. Note that such a parameter selection of $K$ only leverages the training data of clients, with no development or testing data involved.
|
| 227 |
+
|
| 228 |
+
# 5.3 Result Analysis
|
| 229 |
+
|
| 230 |
+
Table 2 shows our results with considered datasets. Our approaches can achieve the highest accuracy, with comparable or much lower communication cost than the baselines (Table 1). This is espe
|
| 231 |
+
|
| 232 |
+
cially obvious with the upload communication, i.e., the upload cost of our approaches is 10 times smaller than the closest baselines (BBT (Fed)), which thanks to our proposed discrete local search mechanism (Section 4.2) that only requires uploading the pretrained token indices to the server. As mentioned in Appendix B, BBT (Sun et al., 2022b) works by randomly projecting the prompt parameters (with a fixed random matrix $\mathbf{A}$ ) into a small subspace, within which a low-dimensional vector $z$ is trained. However, there is no guarantee that such a random projected subspace can cover directions that capture knowledge that is generalizable across clients. On the contrary, though our local search algorithm is constrained with discrete natural language tokens, such tokens should capture rich semantics of natural language that are expressive enough to describe a pattern that is generalizable across clients. This might explain why our approach of discrete local search with natural language tokens yields higher accuracy in training with data of different clients. Moreover, we can observe that Ours with $\Phi = 3$ and $\Phi = 5$ can maintain comparable performance for text classification as with Ours (FullDownload), while substantially decreasing download communication cost.
|
| 233 |
+
|
| 234 |
+
Among the gradient-based approaches (i.e., BP?=Yes), FedKD (Wu et al., 2022) generally has lower classification accuracy, which might because its student model (DistilRoberta-base) is less capable than Roberta-Large as used in other approaches. We follow (Wu et al., 2022) that uses a small student model for FedKD to save the communication cost. We can observe that these gradient-based baselines may produce results that are inferior to gradient-free approaches. This may be counterintuitive since these gradient-based prompt tuning approaches allow training in the whole (more expressive) parameter space of prompt parameters, compared to gradient-free approaches with which the search space for the prompt parameters is usually constrained (Sun et al., 2022b). However, previous works of gradient-free training with PLMs (Sun et al., 2022b,a) also show results that are better than gradient-based approaches, especially with the scenario of few-shot training. Such a phenomenon may be explained by the over-expressiveness of prompts trained with gradients, i.e., subject to overfitting with limited training data. Also, as discussed in Section 4.2, the prompts trained with gradients may overfit to the task/domain of the clients during local client update, inducing negative knowledge
|
| 235 |
+
|
| 236 |
+
X, ros, Target, himself, turn, Europe, WORK, Energy, scored, *, shortly, balls, TV, yearly, 2012, Race, International, 'Marketplace, conference, io, os, modifications, IG, troopers, inside, Forms, publishes, cellphone, CO, legal, executive, fight, ings, hope, Summer, Officers, football, Property, #, book, parents, expenses, ac, manager, create, age, email, market, mainline
|
| 237 |
+
|
| 238 |
+
Figure 3: The learnt prompt from the apparel domain of FDU-MTL, using our proposed discrete local search.
|
| 239 |
+
|
| 240 |
+
transfer from other clients.
|
| 241 |
+
|
| 242 |
+
In Figure 2, we detailed results of $NP$ for FDUMTL with each of its groups. We can find that our approach consistently outperforms the baselines with in terms of group-wise $NP$ accuracy. We also provide detailed participant accuracy for each client in Table 4 and 5.
|
| 243 |
+
|
| 244 |
+
Privacy with the learnt prompts. Figure 3 shows the prompts learnt with data from the apparel domain of FDU-MTL, using the proposed discrete local search in client update (Section 4.2). We can find it is hard to interpret, and we cannot infer that the client data is about "apparel" given the prompt tokens. Such a lack of interpretability reduces the chance of client privacy leakage, when uploading the learnt prompts to the server after client update. Inspired by recent approaches of evaluating with Large Language Models (LLMs) (Peng et al., 2023), we further conduct a privacy leakage analysis in Appendix H. Specifically, given a prompt trained from a certain client/domain of FDU-MTL, we investigate how GPT-4 (OpenAI, 2023) can link the prompt to its training domain. We find that none of the 16 clients/domains can be inferred from their prompts using GPT-4 predictions, indicating less chance of privacy leakage.
|
| 245 |
+
|
| 246 |
+
# 6 Conclusions
|
| 247 |
+
|
| 248 |
+
In this paper, we propose a gradient-free framework that trains with discrete local search on natural language token during personalized federated learning. Compared with gradient-based approaches, the discrete local search circumvents gradient computation and saves the huge memory consumption caused by back-propagation. We additionally propose a compression mechanism inspired by linear word analogy that allows the server-client communication with discretely indexed tokens. Experiments show that our framework can achieve superior performance compared to baselines.
|
| 249 |
+
|
| 250 |
+
# 7 Limitations
|
| 251 |
+
|
| 252 |
+
Our proposed approach considers communicating and compressing the pretrained embeddings of the natural language tokens, which is only applicable to the domain of natural language processing. It would be more comprehensive for our study to further explore applying our approach for visual tokens (Wu et al., 2020; Yin et al., 2022) during federated learning.
|
| 253 |
+
|
| 254 |
+
# 8 Ethics Statement
|
| 255 |
+
|
| 256 |
+
Ours study of personalized federated learning is intended to protect client privacy during training, avoiding malicious use of client private information. Additionally, the datasets in our experiments are all publicly available.
|
| 257 |
+
|
| 258 |
+
# References
|
| 259 |
+
|
| 260 |
+
Attilim Güneş Baydin, Barak A Pearlmutter, Don Syme, Frank Wood, and Philip Torr. 2022. Gradients without backpropagation. arXiv preprint arXiv:2202.08587.
|
| 261 |
+
Gabriel Belouze. 2022. Optimization without backpropagation. arXiv preprint arXiv:2209.06302.
|
| 262 |
+
Xingyu Cai, Jiaji Huang, Yuchen Bian, and Kenneth Church. 2021. Isotropy in the contextual embedding space: Clusters and manifolds. In International Conference on Learning Representations.
|
| 263 |
+
Tingfeng Cao, Liang Chen, Dixiang Zhang, Tianxiang Sun, Zhengfu He, Xipeng Qiu, Xing Xu, and Hai Zhang. 2023. Competition for gradient-free tuning of large language models: approaches, results, current challenges and future directions. *National Science Review*, 10(6):nwad124.
|
| 264 |
+
Daoyuan Chen, Dawei Gao, Weirui Kuang, Yaliang Li, and Bolin Ding. 2022. pfl-bench: A comprehensive benchmark for personalized federated learning. Advances in Neural Information Processing Systems, 35:9344-9360.
|
| 265 |
+
Fei Chen, Mi Luo, Zhenhua Dong, Zhenguo Li, and Xiuqiang He. 2018. Federated meta-learning with fast convergence and efficient communication. arXiv preprint arXiv:1802.07876.
|
| 266 |
+
Matthieu Courbariaux, Yoshua Bengio, and Jean-Pierre David. 2015. Binaryconnect: Training deep neural networks with binary weights during propagations. Advances in neural information processing systems, 28.
|
| 267 |
+
Mingkai Deng, Jianyu Wang, Cheng-Ping Hsieh, Yihan Wang, Han Guo, Tianmin Shu, Meng Song, Eric P Xing, and Zhiting Hu. 2022. Rlprompt: Optimizing discrete text prompts with reinforcement learning. arXiv preprint arXiv:2205.12548.
|
| 268 |
+
|
| 269 |
+
Yunbin Deng. 2019. Deep learning on mobile devices: a review. In Mobile Multimedia/Image Processing, Security, and Applications 2019, volume 10993, pages 52-66. SPIE.
|
| 270 |
+
Shizhe Diao, Xuechun Li, Yong Lin, Zhichao Huang, and Tong Zhang. 2022. Black-box prompt learning for pre-trained language models. arXiv preprint arXiv:2201.08531.
|
| 271 |
+
Aleksandr Drozd, Anna Gladkova, and Satoshi Matsuoka. 2016. Word embeddings, analogies, and machine learning: Beyond king-man+ woman= queen. In Proceedings of coling 2016, the 26th international conference on computational linguistics: Technical papers, pages 3519-3530.
|
| 272 |
+
Kawin Ethayarajh, David Duvenaud, and Graeme Hirst. 2018. Towards understanding linear word analogies. arXiv preprint arXiv:1810.04882.
|
| 273 |
+
Alireza Fallah, Aryan Mokhtari, and Asuman Ozdaglar. 2020. Personalized federated learning: A meta-learning approach. arXiv preprint arXiv:2002.07948.
|
| 274 |
+
Chelsea Finn, Pieter Abbeel, and Sergey Levine. 2017. Model-agnostic meta-learning for fast adaptation of deep networks. In International conference on machine learning, pages 1126-1135. PMLR.
|
| 275 |
+
Karl Pearson F.R.S. 1901. Liii. on lines and planes of closest fit to systems of points in space. The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science, 2(11):559-572.
|
| 276 |
+
Jun Gao, Di He, Xu Tan, Tao Qin, Liwei Wang, and Tieyan Liu. Representation degeneration problem in training natural language generation models. In International Conference on Learning Representations.
|
| 277 |
+
Tianyu Gao, Adam Fisch, and Danqi Chen. 2020. Making pre-trained language models better few-shot learners. arXiv preprint arXiv:2012.15723.
|
| 278 |
+
Alec Go, Richa Bhayani, and Lei Huang. 2009. Twitter sentiment classification using distant supervision. CS224N project report, Stanford, 1(12):2009.
|
| 279 |
+
Tao Guo, Song Guo, and Junxiao Wang. 2023. pfed-prompt: Learning personalized prompt for vision-language models in federated learning. In Proceedings of the ACM Web Conference 2023, pages 1364-1374.
|
| 280 |
+
Tao Guo, Song Guo, Junxiao Wang, and Wenchao Xu. 2022. Promptfl: Let federated participants cooperatively learn prompts instead of models-federated learning in age of foundation model. arXiv preprint arXiv:2208.11625.
|
| 281 |
+
Nikolaus Hansen and Andreas Ostermeier. 2001. Completely derandomized self-adaptation in evolution strategies. Evolutionary computation, 9(2):159-195.
|
| 282 |
+
|
| 283 |
+
István Hegedús, Gábor Danner, and Márk Jelasy. 2021. Decentralized learning works: An empirical comparison of gossip learning and federated learning. Journal of Parallel and Distributed Computing, 148:109-124.
|
| 284 |
+
Bairu Hou, Joe O'Connor, Jacob Andreas, Shiyu Chang, and Yang Zhang. 2022. Promptboosting: Black-box text classification with ten forward passes. arXiv preprint arXiv:2212.09257.
|
| 285 |
+
Jacob Devlin Ming-Wei Chang Kenton and Lee Kristina Toutanova. 2019. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of naacL-HLT, pages 4171-4186.
|
| 286 |
+
Brian Lester, Rami Al-Rfou, and Noah Constant. 2021. The power of scale for parameter-efficient prompt tuning. arXiv preprint arXiv:2104.08691.
|
| 287 |
+
Qinbin Li, Zeyi Wen, Zhaomin Wu, Sixu Hu, Naibo Wang, Yuan Li, Xu Liu, and Bingsheng He. 2021. A survey on federated learning systems: vision, hype and reality for data privacy and protection. IEEE Transactions on Knowledge and Data Engineering.
|
| 288 |
+
Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith. 2020. Federated optimization in heterogeneous networks. Proceedings of Machine learning and systems, 2:429-450.
|
| 289 |
+
Xiang Lisa Li and Percy Liang. 2021. Prefix-tuning: Optimizing continuous prompts for generation. arXiv preprint arXiv:2101.00190.
|
| 290 |
+
Zhengyang Lit, Shijing Sit, Jianzong Wang, and Jing Xiao. 2022. Federated split bert for heterogeneous text classification. In 2022 International Joint Conference on Neural Networks (IJCNN), pages 1-8. IEEE.
|
| 291 |
+
Pengfei Liu, Xipeng Qiu, and Xuanjing Huang. 2017. Adversarial multi-task learning for text classification. arXiv preprint arXiv:1704.05742.
|
| 292 |
+
Xiao Liu, Kaixuan Ji, Yicheng Fu, Zhengxiao Du, Zhilin Yang, and Jie Tang. 2021. P-tuning v2: Prompt tuning can be comparable to fine-tuning universally across scales and tasks. arXiv preprint arXiv:2110.07602.
|
| 293 |
+
Xiao Liu, Kaixuan Ji, Yicheng Fu, Weng Tam, Zhengxiao Du, Zhilin Yang, and Jie Tang. 2022. P-tuning: Prompt tuning can be comparable to fine-tuning across scales and tasks. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 61-68.
|
| 294 |
+
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692.
|
| 295 |
+
|
| 296 |
+
Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. 2017. Communication-efficient learning of deep networks from decentralized data. In Artificial intelligence and statistics, pages 1273-1282. PMLR.
|
| 297 |
+
Deepak Narayanan, Aaron Harlap, Amar Phanishayee, Vivek Seshadri, Nikhil R Devanur, Gregory R Ganger, Phillip B Gibbons, and Matei Zaharia. 2019. Pipedream: Generalized pipeline parallelism for dnn training. In Proceedings of the 27th ACM Symposium on Operating Systems Principles, pages 1-15.
|
| 298 |
+
Malvina Nissim, Rik van Noord, and Rob van der Goot. 2020. Fair is better than sensational: Man is to doctor as woman is to doctor. Computational Linguistics, 46(2):487-497.
|
| 299 |
+
OpenAI. 2023. Gpt-4 technical report.
|
| 300 |
+
Baolin Peng, Chunyuan Li, Pengcheng He, Michel Galley, and Jianfeng Gao. 2023. Instruction tuning with gpt-4. arXiv preprint arXiv:2304.03277.
|
| 301 |
+
Yanghua Peng, Yibo Zhu, Yangrui Chen, Yixin Bao, Bairen Yi, Chang Lan, Chuan Wu, and Chuanxiong Guo. 2019. A generic communication scheduler for distributed dnn training acceleration. In Proceedings of the 27th ACM Symposium on Operating Systems Principles, pages 16-29.
|
| 302 |
+
Archiki Prasad, Peter Hase, Xiang Zhou, and Mohit Bansal. 2022. Grips: Gradient-free, edit-based instruction search for prompting large language models. arXiv preprint arXiv:2203.07281.
|
| 303 |
+
Tahseen Rabbani, Brandon Feng, Yifan Yang, Arjun Rajkumar, Amitabh Varshney, and Furong Huang. 2021. Comfetch: Federated learning of large networks on memory-constrained clients via sketching. arXiv preprint arXiv:2109.08346.
|
| 304 |
+
Rylan Schaeffer, Brando Miranda, and Sanmi Koyejo. 2024. Are emergent abilities of large language models a mirage? Advances in Neural Information Processing Systems, 36.
|
| 305 |
+
Aviv Shamsian, Aviv Navon, Ethan Fetaya, and Gal Chechik. 2021. Personalized federated learning using hypernetworks. In International Conference on Machine Learning, pages 9489-9502. PMLR.
|
| 306 |
+
Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1631-1642, Seattle, Washington, USA. Association for Computational Linguistics.
|
| 307 |
+
Tianxiang Sun, Zhengfu He, Hong Qian, Yunhua Zhou, Xuan-Jing Huang, and Xipeng Qiu. 2022a. Bbtv2: Towards a gradient-free future with large language models. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 3916-3930.
|
| 308 |
+
|
| 309 |
+
Tianxiang Sun, Yunfan Shao, Hong Qian, Xuanjing Huang, and Xipeng Qiu. 2022b. Black-box tuning for language-model-as-a-service. In International Conference on Machine Learning, pages 20841-20855. PMLR.
|
| 310 |
+
Canh T Dinh, Nguyen Tran, and Josh Nguyen. 2020. Personalized federated learning with moreau envelopes. Advances in Neural Information Processing Systems, 33:21394-21405.
|
| 311 |
+
Chaofan Tao, Lu Hou, Wei Zhang, Lifeng Shang, Xin Jiang, Qun Liu, Ping Luo, and Ngai Wong. 2022. Compression of generative pre-trained language models via quantization. arXiv preprint arXiv:2203.10705.
|
| 312 |
+
Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, et al. 2023. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971.
|
| 313 |
+
Haoyu Wang, Handong Zhao, Yaqing Wang, Tong Yu, Jiuxiang Gu, and Jing Gao. 2022. Fedkc: Federated knowledge composition for multilingual natural language understanding. In Proceedings of the ACM Web Conference 2022, pages 1839-1850.
|
| 314 |
+
Rui Wang, Tong Yu, Junda Wu, Handong Zhao, Sungchul Kim, Ruiyi Zhang, Subrata Mitra, and Ricardo Henao. 2023. Federated domain adaptation for named entity recognition via distilling with heterogeneous tag sets. In *Findings of the Association for Computational Linguistics: ACL* 2023, pages 7449-7463.
|
| 315 |
+
Alex Warstadt, Amanpreet Singh, and Samuel R Bowman. 2018. Neural network acceptability judgments. arXiv preprint arXiv:1805.12471.
|
| 316 |
+
Jason Wei, Yi Tay, Rishi Bommasani, Colin Raffel, Barret Zoph, Sebastian Borgeaud, Dani Yogatama, Maarten Bosma, Denny Zhou, Donald Metzler, et al. 2022. Emergent abilities of large language models. arXiv preprint arXiv:2206.07682.
|
| 317 |
+
Orion Weller, Marc Marone, Vladimir Braverman, Dawn Lawrie, and Benjamin Van Durme. 2022. Pretrained models for multilingual federated learning. arXiv preprint arXiv:2206.02291.
|
| 318 |
+
Bichen Wu, Chenfeng Xu, Xiaoliang Dai, Alvin Wan, Peizhao Zhang, Zhicheng Yan, Masayoshi Tomizuka, Joseph Gonzalez, Kurt Keutzer, and Peter Vajda. 2020. Visual transformers: Token-based image representation and processing for computer vision. arXiv preprint arXiv:2006.03677.
|
| 319 |
+
Chuhan Wu, Fangzhao Wu, Lingjuan Lyu, Yongfeng Huang, and Xing Xie. 2022. Communication-efficient federated learning via knowledge distillation. Nature communications, 13(1):2032.
|
| 320 |
+
|
| 321 |
+
Hongxu Yin, Arash Vahdat, Jose M Alvarez, Arun Mallya, Jan Kautz, and Pavlo Molchanov. 2022. Avit: Adaptive tokens for efficient vision transformer. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10809-10818.
|
| 322 |
+
Jianyi Zhang, Saeed Vahidian, Martin Kuo, Chunyuan Li, Ruiyi Zhang, Tong Yu, Guoyin Wang, and Yiran Chen. 2023. Towards building the federatedgpt: Federated instruction tuning. In International Workshop on Federated Learning in the Age of Foundation Models in Conjunction with NeurIPS 2023.
|
| 323 |
+
Haodong Zhao, Wei Du, Fangqi Li, Peixuan Li, and Gongshen Liu. 2022. Reduce communication costs and preserve privacy: Prompt tuning method in federated learning. arXiv preprint arXiv:2208.12268.
|
| 324 |
+
Haodong Zhao, Wei Du, Fangqi Li, Peixuan Li, and Gongshen Liu. 2023. Fedprompt: Communication-efficient and privacy-preserving prompt tuning in federated learning. In ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 1-5. IEEE.
|
| 325 |
+
|
| 326 |
+
# A Additional Explanation
|
| 327 |
+
|
| 328 |
+
Our model architecture for prompt tuning is the same as in (Sun et al., 2022b). Specifically, the backbone of the PLM is the Roberta-Large model (embedding dimension $D = 1024$ ), with $T = 50$ prompt tokens inserted into the input layer. The model is trained with 50 rounds of federated learning for FDU-MTL, SST2 and CoLA, with each client updated 40 steps for each round. For Sentiment140, we train for 100 rounds and we only sample 50 clients for training during each round (due to the large number of clients in Sentiment140).
|
| 329 |
+
|
| 330 |
+
Following previous works of gradient-free learning (Sun et al., 2022b; Hou et al., 2022), we consider the few-shot scenario for each testing client. Specifically, we assume there are 16 samples for each class in each testing client during post-tuning. For FDU-MTL, these datasets are sampled from the development split in each domain. For sentiment140, these are sampled from the datasets of each testing client, with the rest data of each client used for testing after post tuning. We additionally sample a development dataset (not overlapped with data for training) from the development split for each client for FDUMLT with the same size as the training set, since development datasets are also used in previous works of gradient-free training (Sun et al., 2022b; Hou et al., 2022). We evaluate the classification accuracy of the resulting models on the test set of each client, averaged over four random seeds. We do not sample development
|
| 331 |
+
|
| 332 |
+
<table><tr><td></td><td>Domains</td></tr><tr><td>Group 1</td><td>apparel, mr, baby, books</td></tr><tr><td>Group 2</td><td>camera,DVD, electronics, health</td></tr><tr><td>Group 3</td><td>imdb, kitchen, magazines, music</td></tr><tr><td>Group 4</td><td>software, sports, toys, video</td></tr></table>
|
| 333 |
+
|
| 334 |
+
Table 3: Group of domains in FDUMTL. In testing the performance on non-participant clients, we do 4-split cross-validation with FDUMTL. Specifically, we iteratively treat the domains from a group as non-patient clients that are held-out from federated learning, i.e., we train with domains/clients of the other three groups during federated learning and test on domains of the held-out group.
|
| 335 |
+
|
| 336 |
+
datasets for Sentiment140 since no development datasets are provided. Note that our experiments are based only on English datasets and it would also be interesting for future works studying multilingual federated learning (Weller et al., 2022). We provide the algorithm for Local_Training and Compress_Download in Algorithm2 and 3, respectively.
|
| 337 |
+
|
| 338 |
+
# B Black Box Tuning (BBT)
|
| 339 |
+
|
| 340 |
+
We briefly introduce a prior radiant-free method of BBT (Sun et al., 2022b). For prompt $\pmb{p}_i$ , suppose we want to train its $t$ th prompt token of $\pmb{p}_i^t$ , the BBT approach first reparameterizes $\pmb{p}_i^t$ as,
|
| 341 |
+
|
| 342 |
+
$$
|
| 343 |
+
\boldsymbol {p} _ {i} ^ {t} = \boldsymbol {A} \boldsymbol {z} + \boldsymbol {p} ^ {t}, \tag {12}
|
| 344 |
+
$$
|
| 345 |
+
|
| 346 |
+
where $\mathbf{z} \in \mathbb{R}^d$ , $d << D$ , and $\mathbf{A} \in \mathcal{R}^{D \times d}$ is a randomly valued fixed matrix that project $\mathbf{z}$ into the space of $\mathbf{p}^t$ . $\mathbf{z}$ is the only learnable parameter and is trained with CMA-ES (Hansen and Ostermeier, 2001), a gradient-free method without backpropagation. The value of $\sigma$ in our implementation follows (Sun et al., 2022b).
|
| 347 |
+
|
| 348 |
+
# C Baselines
|
| 349 |
+
|
| 350 |
+
All of our baselines are trained with the same model as used in (Sun et al., 2022b). We list the considered baselines are listed as follows:
|
| 351 |
+
|
| 352 |
+
- BBT (Sun et al., 2022b): Train separated prompts locally on each testing client with the gradient-free method of CMA-ES (Hansen and Ostermeier, 2001), as in Section B. This is like the post tuning stage of our approach.
|
| 353 |
+
|
| 354 |
+
- BBT (Fed): Federated training of $z$ in (12) with BBT on training clients and FedAvg on the server. The resulting $z$ is further fine tuned with BBT on the local dataset of each client, i.e., the same as Section B.
|
| 355 |
+
- FedKD (Wu et al., 2022): Compressing the Roberta-Large into a smaller student model (DistilRoberta-base) via knowledge distillation, and only communicate the student model to save communication cost. For joint training with FedKD, we follow its original paper (Wu et al., 2022) that fine-tunes all the parameters of both the Roberta-Large and DistilRoberta-base.
|
| 356 |
+
- Prompt Tuning (Fed). The prompts are initially trained with FedAvg (McMahan et al., 2017) on all the clients, then fine tuned on each testing client, as with our framework.
|
| 357 |
+
Meta Prompt Tuning (Fed): Same as Prompt Tuning (Fed), except that we follow (Fallah et al., 2020) that the prompts are trained using federated meta learning with MAML (Finn et al., 2017).
|
| 358 |
+
- Prompt Tuning (Li and Liang, 2021): Train separated prompt parameters locally on each testing client with back-propagation. We did not implement the SVD compression in communicating the parameters, in order to show an upper bound of its classification performance. We follow a learning rate of 1e-5.
|
| 359 |
+
- $pFedMe$ (T Dinh et al., 2020): We train ans communicate the prompt parameters with $pFedMe$ , where there is an L2 regularization between the global prompt and personalized prompts for each client.
|
| 360 |
+
|
| 361 |
+
In addition, we also implement different variations of our approach: 1) Ours ( $\Phi = 3$ or 5). We experiment with different values of $\Phi$ , controlling the degree of the embedding compression in Section 4.4. 2) Ours (FullDownload). We directly download the aggregated $p$ from (5), without embedding compression.
|
| 362 |
+
|
| 363 |
+
# D Ablation study with $\alpha$
|
| 364 |
+
|
| 365 |
+
In this section, we conduct an ablation study for the regularization parameter $\alpha$ (default to $\alpha = 0.2$ ) for the lasso loss in (8). In Table 6, we take Ours $(\Phi = 5)$ as an example and report results with $\alpha =$
|
| 366 |
+
|
| 367 |
+
0.2 (same as in the main paper) and $\alpha = 0$ . We can find that the results with $\alpha = 0$ is generally lower than that with $\alpha = 0.2$ , indicating the importance of encouraging sparsity with the lassso loss in (8).
|
| 368 |
+
|
| 369 |
+
# E Comparing with PCA compression and quantization
|
| 370 |
+
|
| 371 |
+
In Section 4.4, we present our proposed embedding compression method to reduce the download communication cost. To further validate the effectiveness of the proposed embedding compression, we compare it with the two additionally baselines: PCA compression and quantization.
|
| 372 |
+
|
| 373 |
+
PCA Compression: Principled Component Analysis (PCA) (F.R.S., 1901) is a common way of dimensional reduction, i.e., compress the embeddings via representing then with fewer dimensions. Previous works (Cai et al., 2021; Rabbani et al., 2021; Gao et al.) have shown that the learnt token embeddings (contextualized or not) of pretrained models are distributed in a narrow cone of the embedding space. In other words, the embeddings vectors are generally biased toward the top principled components of learnt embedding matrix. Specially, following the notation of Section 4.4, let $e(\mathcal{V}) \in \mathbb{R}^{|\mathcal{V}| \times D}$ be the matrix of pretrained token embeddings. We can compute the principled components of $e(\mathcal{V})$ , denoted as,
|
| 374 |
+
|
| 375 |
+
$$
|
| 376 |
+
\boldsymbol {E} _ {c} = P C A (\boldsymbol {e} (\mathcal {V})) \tag {13}
|
| 377 |
+
$$
|
| 378 |
+
|
| 379 |
+
where each column of $\pmb{E}_c\in \mathbb{R}^{D\times D}$ is a principled component of $e(\mathcal{V})$ . We have $\pmb {E}_c^T\cdot \pmb {E}_c = \pmb{I},$ with $\pmb {I}\in \mathbb{R}^{D\times D}$ is the identity matrix. The informativeness of different principled component can be measured by the variance after projecting $e(\mathcal{V})$ onto each of the components,
|
| 380 |
+
|
| 381 |
+
$$
|
| 382 |
+
\boldsymbol {v} = \operatorname {V a r} (\boldsymbol {e} (\mathcal {V}) \cdot \boldsymbol {E} _ {c}) \tag {14}
|
| 383 |
+
$$
|
| 384 |
+
|
| 385 |
+
where $\operatorname{Var}$ computes the variance for each row. Assume the index of each component, i.e., the row index of $E_{c}$ , has been ranked by $\pmb{v} = [\pmb{v}_i]_{i=1}^D$ (from high to low). We plot the ratio of variance $(\pmb{v} / \sum \pmb{v}_i)$ verse the index of each component for Roberta-Large in Figure 4a. We can find that the distribution of $e(\mathcal{V})$ id highly an-isotropic, with much larger variation being captured by the top principled components. Thus, we can represent/compress the aggregated prompt $\pmb{p} \in \mathbb{R}^{T \times D}$ from (5) with the top principled components<sup>2</sup> be
|
| 386 |
+
|
| 387 |
+
# Algorithm 2 CompressDownload.
|
| 388 |
+
|
| 389 |
+
Input: The prompt $\pmb{p}$ without compression, the pretrained embedding matrix $e(\mathcal{V})$ .
|
| 390 |
+
|
| 391 |
+
Output: The reconstructed $p'$ .
|
| 392 |
+
|
| 393 |
+
$$
|
| 394 |
+
\boldsymbol {I} = [ 1, \dots , | \mathcal {V} | ]
|
| 395 |
+
$$
|
| 396 |
+
|
| 397 |
+
for $t = 1\cdot \cdot \cdot ,T$ do
|
| 398 |
+
|
| 399 |
+
% Embedding compression.
|
| 400 |
+
|
| 401 |
+
for $L = [100,5]$ do
|
| 402 |
+
|
| 403 |
+
Compute $I$ with (8) and (9).
|
| 404 |
+
|
| 405 |
+
end for
|
| 406 |
+
|
| 407 |
+
Solve $\boldsymbol{x}_f^*$ with (10).
|
| 408 |
+
|
| 409 |
+
% Download.
|
| 410 |
+
|
| 411 |
+
Download $\{\pmb {I},\pmb{x}_f^*\}$ to the clients.
|
| 412 |
+
|
| 413 |
+
Compute $\pmb{p}^{t'}$ on both server and clients
|
| 414 |
+
|
| 415 |
+
end for
|
| 416 |
+
|
| 417 |
+
return $\pmb{p}^{\prime} = [\pmb{p}^{1^{\prime}},\dots ,\pmb{p}^{T^{\prime}}]$
|
| 418 |
+
|
| 419 |
+
fore downloading it to clients. Specifically, we compress $\pmb{p}$ via,
|
| 420 |
+
|
| 421 |
+
$$
|
| 422 |
+
\hat {\boldsymbol {p}} = \boldsymbol {p} \cdot \boldsymbol {E} _ {c} [: n,: ] ^ {T} \tag {15}
|
| 423 |
+
$$
|
| 424 |
+
|
| 425 |
+
where $\hat{\pmb{p}}\mathbb{R}^{T\times n}$ is the compressed prompt and $E_{c}[:n,:]$ denotes the top- $n$ principled components. After downloading, each client reconstructs $\pmb{p}$ via,
|
| 426 |
+
|
| 427 |
+
$$
|
| 428 |
+
\boldsymbol {p} = \hat {\boldsymbol {p}} \cdot \boldsymbol {E} _ {c} [: n,: ] \tag {16}
|
| 429 |
+
$$
|
| 430 |
+
|
| 431 |
+
In this way, we only need to download $n$ integers (16 bits each) for each prompt token in $p$ . The total download bits per communication round is $T \times n \times 16 = 800n$ bits. In comparison with our approach, we experiment with $n = 10$ (denoted as PCA10), so that it has the same download communication cost for each round (8KB) as Ours $\Phi = 5$ . We additionally experiment with $n = 300$ (denoted as PCA300), where the prompts are represented by more principled components but also with much larger download communication cost each round (0.24MB).
|
| 432 |
+
|
| 433 |
+
Quantization: We also compare our approach with quantizing each dimension of $\pmb{p}$ from (5) before downloading. Following previous works (Courbariaux et al., 2015; Tao et al., 2022) of compressing pretrained language models, we quantize each element $w$ of $\pmb{p}$ via,
|
| 434 |
+
|
| 435 |
+
$$
|
| 436 |
+
w _ {q} = \beta \cdot Q (c l i p (w, - \beta , \beta) / \beta) \tag {17}
|
| 437 |
+
$$
|
| 438 |
+
|
| 439 |
+
where $Q$ is a quantization function that maps $\operatorname{clip}(w, -\beta, \beta)$ to its closest value in $\{-1, -\frac{k-1}{k}, \dots, 0, \dots, \frac{k-1}{k}, 1\}$ , $k = 2^{b-1} - 1$ .
|
| 440 |
+
|
| 441 |
+

|
| 442 |
+
(a)
|
| 443 |
+
|
| 444 |
+

|
| 445 |
+
(b)
|
| 446 |
+
Figure 4: (a) The ratio of variance $(\boldsymbol{v} / \sum \boldsymbol{v}_i)$ captured by each principled component of the pretrained Roberta-Large Token embeddings. (b) The training loss on Sentiment140 averaged over different clients in each communication round of federated learning for different compression methods. We have the same random seeds and order of training batches for all the methods.
|
| 447 |
+
|
| 448 |
+
<table><tr><td>Method</td><td>Upload</td><td>Download</td><td>BP?</td><td>FM(apparel)</td><td>FM(mr)</td><td>FM(baby)</td><td>FM/books)</td><td>FM(camera)</td><td>FM(dvd)</td><td>FM(electronics)</td></tr><tr><td>Prompt Tuning</td><td>0</td><td>0</td><td>Yes</td><td>83.42</td><td>81.75</td><td>79.95</td><td>86.38</td><td>80.05</td><td>86.52</td><td>84.18</td></tr><tr><td>Prompt Tuning (Fed)</td><td>819 KB</td><td>819 KB</td><td>Yes</td><td>83.56</td><td>81.06</td><td>81.05</td><td>87.83</td><td>81.80</td><td>87.96</td><td>84.93</td></tr><tr><td>Meta Prompt Tuning (Fed)</td><td>819 KB</td><td>819 KB</td><td>Yes</td><td>82.78</td><td>83.35</td><td>80.23</td><td>88.12</td><td>80.34</td><td>87.31</td><td>84.45</td></tr><tr><td>pFedMe</td><td>819 KB</td><td>819 KB</td><td>Yes</td><td>84.67</td><td>81.26</td><td>81.47</td><td>86.92</td><td>80.56</td><td>87.92</td><td>81.26</td></tr><tr><td>FedKD</td><td>1.3 GB</td><td>1.3 GB</td><td>Yes</td><td>83.67</td><td>79.89</td><td>80.46</td><td>86.92</td><td>81.07</td><td>87.08</td><td>79.89</td></tr><tr><td>Fine Tuning (Fed)</td><td>5.3 GB</td><td>5.3 GB</td><td>Yes</td><td>86.93</td><td>79.82</td><td>80.46</td><td>86.92</td><td>81.07</td><td>88.48</td><td>87.50</td></tr><tr><td>BBT</td><td>0</td><td>0</td><td>No</td><td>85.93</td><td>83.75</td><td>81.22</td><td>86.10</td><td>80.56</td><td>85.96</td><td>87.76</td></tr><tr><td>BBT (Fed)</td><td>8 KB</td><td>8 KB</td><td>No</td><td>87.44</td><td>81.02</td><td>82.99</td><td>90.19</td><td>81.84</td><td>87.92</td><td>87.74</td></tr><tr><td>Ours (Φ = 3)</td><td>0.8 KB</td><td>4.8 KB</td><td>No</td><td>87.44</td><td>80.07</td><td>85.53</td><td>90.74</td><td>82.33</td><td>88.48</td><td>88.03</td></tr><tr><td>Ours (Φ = 5)</td><td>0.8 KB</td><td>8 KB</td><td>No</td><td>88.54</td><td>80.05</td><td>86.55</td><td>90.21</td><td>82.61</td><td>88.08</td><td>87.78</td></tr><tr><td>Ours (FullDownload)</td><td>0.8 KB</td><td>819 KB</td><td>No</td><td>89.04</td><td>81.03</td><td>86.78</td><td>90.97</td><td>83.73</td><td>87.18</td><td>88.88</td></tr></table>
|
| 449 |
+
|
| 450 |
+
Table 4: Detailed results with FDUMLT on participant clients. Please refer to Figure 2 for non-patient clients. We report the accuracies for each of the 16 domains/clients (denoted as FMdomain name)) and their average (denoted as $\mathrm{FM(Avg)}$
|
| 451 |
+
|
| 452 |
+
<table><tr><td>Method</td><td>FM(health)</td><td>FM(imdb)</td><td>FM(kitchen)</td><td>FM(magazines)</td><td>FM(music)</td><td>FM(software)</td><td>FM(sports)</td><td>FM(toys)</td><td>FM(video)</td><td>FM(Avg)</td></tr><tr><td>Prompt Tuning</td><td>81.98</td><td>92.42</td><td>82.14</td><td>80.68</td><td>82.52</td><td>83.77</td><td>82.41</td><td>84.01</td><td>82.32</td><td>83.41</td></tr><tr><td>Prompt Tuning (Fed)</td><td>82.74</td><td>92.71</td><td>83.61</td><td>82.97</td><td>83.75</td><td>84.29</td><td>82.89</td><td>84.76</td><td>82.60</td><td>84.28</td></tr><tr><td>Meta Prompt Tuning (Fed)</td><td>82.34</td><td>92.41</td><td>84.53</td><td>83.25</td><td>83.56</td><td>83.48</td><td>83.58</td><td>85.26</td><td>82.21</td><td>84.20</td></tr><tr><td>pFedMe</td><td>84.51</td><td>93.00</td><td>84.44</td><td>82.25</td><td>83.60</td><td>84.29</td><td>83.42</td><td>85.53</td><td>84.53</td><td>84.60</td></tr><tr><td>FedKD</td><td>84.26</td><td>92.71</td><td>82.91</td><td>80.94</td><td>81.48</td><td>84.82</td><td>82.40</td><td>85.28</td><td>85.36</td><td>84.03</td></tr><tr><td>Fine Tuning (Fed)</td><td>85.79</td><td>93.00</td><td>86.99</td><td>85.12</td><td>84.39</td><td>84.82</td><td>85.46</td><td>86.80</td><td>85.08</td><td>85.98</td></tr><tr><td>BBT</td><td>84.01</td><td>92.13</td><td>81.38</td><td>81.46</td><td>82.28</td><td>85.08</td><td>82.40</td><td>85.53</td><td>83.86</td><td>84.34</td></tr><tr><td>BBT (Fed)</td><td>87.06</td><td>93.00</td><td>85.13</td><td>85.90</td><td>84.92</td><td>84.03</td><td>85.46</td><td>87.92</td><td>85.36</td><td>86.12</td></tr><tr><td>Ours (Φ = 3)</td><td>87.06</td><td>92.42</td><td>86.73</td><td>86.95</td><td>85.98</td><td>84.55</td><td>86.73</td><td>87.31</td><td>85.91</td><td>86.64</td></tr><tr><td>Ours (Φ = 5)</td><td>87.82</td><td>92.71</td><td>88.78</td><td>87.73</td><td>85.19</td><td>85.60</td><td>86.48</td><td>87.31</td><td>87.29</td><td>87.14</td></tr><tr><td>Ours (FullDownload)</td><td>89.57</td><td>94.27</td><td>88.75</td><td>87.44</td><td>86.34</td><td>85.44</td><td>87.86</td><td>89.31</td><td>86.86</td><td>87.71</td></tr></table>
|
| 453 |
+
|
| 454 |
+
Table 5: Results with FDUMLT on participant clients (continue).
|
| 455 |
+
|
| 456 |
+
In this way, $Q(clip(w, -\beta, \beta) / \beta)$ can be encoded with $b$ bits. Following (Tao et al., 2022), the scaling factor for each element is shared within the same prompt token embedding. Let $p[i,:]$ be the embedding of the $i$ th prompt token, the scaling factor for each of its elements is the maximum absolute value in $p[i,:]$ ,
|
| 457 |
+
|
| 458 |
+
$$
|
| 459 |
+
\beta = \max (| \boldsymbol {p} [ i,: ] |) \tag {18}
|
| 460 |
+
$$
|
| 461 |
+
|
| 462 |
+
For each prompt token with dimension $D$ , we have to download the scaling factor $\beta$ (16 bits) and $b$ bits for each dimension, so that the clients can reconstruct $w_{q}$ . We experiment with $b = 3$ , denoted as Quat $(b = 3)$ . The total download communication cost for each round is $(D \times b + 16) \times T \approx 0.15\mathrm{MB}$ . Compared with Quat $(b = 3)$ that quantizes each dimension of each prompt, our proposed approaches
|
| 463 |
+
|
| 464 |
+
<table><tr><td>Method</td><td>Upload</td><td>Download</td><td>Sentiment140</td><td>FDUMTL</td><td>CoLA</td><td>SST2</td><td>Avg</td></tr><tr><td>PCA10</td><td>0.8KB</td><td>8KB</td><td>72.37/73.26</td><td>83.25/83.89</td><td>72.45/72.11</td><td>79.65/78.34</td><td>76.93/76.90</td></tr><tr><td>PCA300</td><td>0.8KB</td><td>0.24MB</td><td>75.22/75.05</td><td>86.71/85.79</td><td>74.09/73.66</td><td>81.23/81.67</td><td>79.31/79.04</td></tr><tr><td>Quant (b=3)</td><td>0.8KB</td><td>0.15MB</td><td>73.45/74.44</td><td>85.46/84.33</td><td>73.89/73.17</td><td>80.98/80.56</td><td>78.45/78.13</td></tr><tr><td>Ours (Φ=5,α=0)</td><td>0.8KB</td><td>8KB</td><td>74,77/74.35</td><td>85.80/86.41</td><td>74.94/73.11</td><td>81.45/82.12</td><td>79.24/79.00</td></tr><tr><td>Ours (Φ=5,α=0.2)</td><td>0.8KB</td><td>8KB</td><td>76.17/75.34</td><td>87.14/87.00</td><td>74.86/73.31</td><td>82.36/82.88</td><td>80.13/79.63</td></tr><tr><td>Ours (FullDownload)</td><td>0.8KB</td><td>819KB</td><td>75.16/76.00</td><td>87.71/87.31</td><td>75.75/73.78</td><td>82.95/82.73</td><td>80.39/80.00</td></tr></table>
|
| 465 |
+
|
| 466 |
+
Table 6: Results with different compression methods and $\alpha$ . We report the accuracy in the format of "P/NP", where P and NP follow Table 2.
|
| 467 |
+
|
| 468 |
+
of embedding compression can be regarded as quantizing on the token level, i.e., representing each prompt with pretrained embeddings of discrete tokens.
|
| 469 |
+
|
| 470 |
+
Results: We report the results with different compress methods in Table 6. We can find that PCA10 has much lower accuracies than Ours $(\Phi = 5)$ , though sharing the same communication cost. This is because the top 10 principled components cannot capture enough information about the token embeddings, although the distribution of token embeddings are biased toward the top principled components (Figure 4a). We need to increase the value of $n$ to hundreds in order to get comparable results with our approaches ((i.e., PCA300)), which is at the expense of much higher communication cost. Additionally, we can notice that Quant $(b = 3)$ also induces higher download communication cost than our approaches, but yeilding lower accuracies. These results validate the effectiveness of our proposed embedding compression. Additionally, Figure 4b shows the loss values averaged over training clients during federated learning. We can find that our approaches are effective in minimizing the loss function during training (also discussed in Section 5.2). We can also find that the final loss values are generally positively correlated with the accuracies in Table 6.
|
| 471 |
+
|
| 472 |
+
# F The number of floating-point operations during federated learning
|
| 473 |
+
|
| 474 |
+
From the previous work (Sun et al., 2022b) of gradient-free training for PLMs, the number of floating-point operations with gradient-free training can be evaluated via the number of model queries (i.e., how many times a model is forwarded). For all the methods in the paper, we have the same number of communication rounds and same number of update steps for each client per
|
| 475 |
+
|
| 476 |
+
# Algorithm 3 Local_Training.
|
| 477 |
+
|
| 478 |
+
Input: Dataset $\mathcal{D}_i$ for client i, $\pmb{p}^{\prime}$ from the previous round of communication.
|
| 479 |
+
|
| 480 |
+
Output: $p_i$ after the client update.
|
| 481 |
+
|
| 482 |
+
$$
|
| 483 |
+
\boldsymbol {p} _ {i} = \boldsymbol {p} ^ {\prime}
|
| 484 |
+
$$
|
| 485 |
+
|
| 486 |
+
$\%$ Training with discrete local search.
|
| 487 |
+
|
| 488 |
+
for $s = 1\cdot \cdot \cdot ,S$ do
|
| 489 |
+
|
| 490 |
+
Randomly sample index $t, t \in 1 \cdots T$ .
|
| 491 |
+
|
| 492 |
+
Update $\pmb{p}_i^t$ using (6) and (7) with $\mathcal{D}_i$ .
|
| 493 |
+
|
| 494 |
+
end for
|
| 495 |
+
|
| 496 |
+
return $p_i$
|
| 497 |
+
|
| 498 |
+
round. Thus, the number of floating-point operations is proportional to the number of model queries per step when training on each client. We keep all the discussed approaches with the proposed discrete local search method having 5 model queries per step (i.e., $K = 5$ as in Section 5.2), including the approaches denotes with "Ours" and those in Appendix E. Thus, all these approaches have the same number of model queries during federated learning. Comparably, our gradient-free federated learning baseline (i.e., BBT(Fed), there was no previous works on gradient-free federated learning with pretrained models) have 20 model queries per step, following the original implementation of (Sun et al., 2022b). This implies that our methods (5 queries per step) only use $1/4$ (5/20) times of floating-point operations during federated learning, while having better performance than BBT(Fed). Since we target the scenario that clients has limited memory access, where back-propagation might not be viable (Section 1), we mostly compare the number of floating-point operations of our methods with gradient-free federated learning baselines. Provided the number of floating-point operations during federated learning, the training efficiency can be further enhanced by system designs, e.g.,
|
| 499 |
+
|
| 500 |
+
the parallelism strategy (Narayanan et al., 2019) or communication scheduler (Peng et al., 2019), which are out of the scope of this paper.
|
| 501 |
+
|
| 502 |
+
# G Overhead
|
| 503 |
+
|
| 504 |
+
Our way of converting the prompt token index of each position to 16 bits (Section 5.1) induces no computational overhead, if we save the 16 bits index for each position during training (50 prompt positions in total, i.e., $T = 50$ ). The uploading of such bits is the same as uploading any model parameters in federated learning. There is not need of additionally designed software implementation. Actually, by only uploading 16 bits for each position, we save the upload time compared with uploading the prompty embedding (the gradient-based methods in Table 4 and 5).
|
| 505 |
+
|
| 506 |
+
# H Inferring the text domain with GPT-4
|
| 507 |
+
|
| 508 |
+
As mentioned in Section 5.3, we leverage GPT-4 (OpenAI, 2023) to infer the text domain (client) from the prompt trained on it, in order to investigate on the risk of privacy leakage by uploading prompt from clients to the server. This is inspired by recent approaches of evaluating with Large Language Models (LLMs) (Peng et al., 2023). Specifically, try to ask GPT4 with the following template,
|
| 509 |
+
|
| 510 |
+
Given the following prompt sequence learnt from Roberta-Large:
|
| 511 |
+
|
| 512 |
+
{prompt}
|
| 513 |
+
|
| 514 |
+
Can you infer that this is trained from a {domain} dataset?
|
| 515 |
+
|
| 516 |
+
where $\{prompt\}$ and $\{domain\}$ refer to a prompt and the text domain (client) from which the prompt is trained on, respectively. For example, with $\{prompt\}$ as in Figure 3 and the $\{domain\}$ being apparel in FDU-MTL, the GPT-4 answers as,
|
| 517 |
+
|
| 518 |
+
The given list of words and phrases doesn't provide sufficient evidence to conclude that it is trained from an apparel dataset. ....
|
| 519 |
+
|
| 520 |
+
We tried with 16 domains from FDUML and none of them result in a positive answer i.e., GPT-4 answers with positive semantics that it can infer the {domain} from {prompt}. In another word, the frequency that GPT-4 can infer the {domain} from the {prompt} is zero, indicating less chance of client privacy leakage.
|
2024/Personalized Federated Learning for Text Classification with Gradient-Free Prompt Tuning/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f664956d0c7ca2aaee3c4c2a8726197293d1d1d75e8b380197941bbe99052ed5
|
| 3 |
+
size 597134
|
2024/Personalized Federated Learning for Text Classification with Gradient-Free Prompt Tuning/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/Planning and Editing What You Retrieve for Enhanced Tool Learning/8d8d80e4-468a-48ab-946e-0712d25e3540_content_list.json
ADDED
|
@@ -0,0 +1,2281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "Planning and Editing What You Retrieve for Enhanced Tool Learning",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
137,
|
| 8 |
+
89,
|
| 9 |
+
862,
|
| 10 |
+
111
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Tenghao Huang $^{1}$ Dongwon Jung $^{1}$ Muhao Chen $^{2}$",
|
| 17 |
+
"bbox": [
|
| 18 |
+
275,
|
| 19 |
+
129,
|
| 20 |
+
729,
|
| 21 |
+
148
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "<sup>1</sup>University of Southern California",
|
| 28 |
+
"bbox": [
|
| 29 |
+
361,
|
| 30 |
+
148,
|
| 31 |
+
640,
|
| 32 |
+
164
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "$^{2}$ University of California, Davis",
|
| 39 |
+
"bbox": [
|
| 40 |
+
369,
|
| 41 |
+
165,
|
| 42 |
+
630,
|
| 43 |
+
181
|
| 44 |
+
],
|
| 45 |
+
"page_idx": 0
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"type": "text",
|
| 49 |
+
"text": "{tenghaoh, dongwonj}@usc.edu;",
|
| 50 |
+
"bbox": [
|
| 51 |
+
327,
|
| 52 |
+
181,
|
| 53 |
+
673,
|
| 54 |
+
198
|
| 55 |
+
],
|
| 56 |
+
"page_idx": 0
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"type": "text",
|
| 60 |
+
"text": "muhchen@ucdavis.edu;",
|
| 61 |
+
"bbox": [
|
| 62 |
+
378,
|
| 63 |
+
200,
|
| 64 |
+
618,
|
| 65 |
+
212
|
| 66 |
+
],
|
| 67 |
+
"page_idx": 0
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"type": "text",
|
| 71 |
+
"text": "Abstract",
|
| 72 |
+
"text_level": 1,
|
| 73 |
+
"bbox": [
|
| 74 |
+
260,
|
| 75 |
+
252,
|
| 76 |
+
339,
|
| 77 |
+
266
|
| 78 |
+
],
|
| 79 |
+
"page_idx": 0
|
| 80 |
+
},
|
| 81 |
+
{
|
| 82 |
+
"type": "text",
|
| 83 |
+
"text": "Recent advancements in integrating external tools with Large Language Models (LLMs) have opened new frontiers, with applications in mathematical reasoning, code generators, and smart assistants. However, existing methods, relying on simple one-time retrieval strategies, fall short on effectively and accurately shortlisting relevant tools. This paper introduces a novel PLUTO (Planning, Learning, and Understanding for Tools) approach, encompassing \"Plan-and-Retrieve (P&R)\" and \"Edit-and-Ground (E&G)\" paradigms. The P&R paradigm consists of a neural retrieval module for shortlisting relevant tools and an LLM-based query planner that decomposes complex queries into actionable tasks, enhancing the effectiveness of tool utilization. The E&G paradigm utilizes LLMs to enrich tool descriptions based on user scenarios, bridging the gap between user queries and tool functionalities. Experiment results demonstrate that these paradigms significantly improve the recall and NDCG in tool retrieval tasks, significantly surpassing current state-of-the-art models.",
|
| 84 |
+
"bbox": [
|
| 85 |
+
141,
|
| 86 |
+
282,
|
| 87 |
+
460,
|
| 88 |
+
623
|
| 89 |
+
],
|
| 90 |
+
"page_idx": 0
|
| 91 |
+
},
|
| 92 |
+
{
|
| 93 |
+
"type": "text",
|
| 94 |
+
"text": "1 Introduction",
|
| 95 |
+
"text_level": 1,
|
| 96 |
+
"bbox": [
|
| 97 |
+
114,
|
| 98 |
+
651,
|
| 99 |
+
258,
|
| 100 |
+
665
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "The community has shown increasing interest in integrating external tools and interfaces with LLMs since tools often provide complementary functionalities in complex tasks such as dialogues (Bubeck et al., 2023), mathematical reasoning (Lu et al., 2022), and code generation (Yadav et al., 2023). To realize tool augmentation, LLM systems typically employ a retriever mechanism to select relevant tools from a candidate pool and write function API calls based on the retrieved tools. The introduction of external tools also allows LLMs to address complicated user queries. Schick et al. 2023 show that LLMs, incorporating simple tools, achieve better performance on downstream tasks. Gupta and Kembhavi 2023 attempt to solve compositional visual",
|
| 107 |
+
"bbox": [
|
| 108 |
+
112,
|
| 109 |
+
677,
|
| 110 |
+
489,
|
| 111 |
+
919
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 0
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "image",
|
| 117 |
+
"img_path": "images/35dcb3a886dcaeebc1bcc110f8f1afbccfb9405a58a2aa7c4d717eab22752c08.jpg",
|
| 118 |
+
"image_caption": [
|
| 119 |
+
"Figure 1: Comparison between conventional Retrieve-and-Read and PLUTO paradigm. Unlike the conventional one-time Retrieve-and-Read paradigm that may lead to retrieving an ineffective set of tools, PLUTO efficiently parses a complex query and distills it into actionable sub-queries that facilitate accurate retrieval of appropriate tools."
|
| 120 |
+
],
|
| 121 |
+
"image_footnote": [],
|
| 122 |
+
"bbox": [
|
| 123 |
+
547,
|
| 124 |
+
249,
|
| 125 |
+
890,
|
| 126 |
+
605
|
| 127 |
+
],
|
| 128 |
+
"page_idx": 0
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"type": "text",
|
| 132 |
+
"text": "tasks via image processing modules and language-instructed computer vision models. More recently, the integration of LLMs and tools empower LLMs, opening up new possibilities in areas like scientific discovery (Yang et al., 2023), automated efficiency, and smart assistant applications (Shu et al., 2022).",
|
| 133 |
+
"bbox": [
|
| 134 |
+
507,
|
| 135 |
+
737,
|
| 136 |
+
884,
|
| 137 |
+
834
|
| 138 |
+
],
|
| 139 |
+
"page_idx": 0
|
| 140 |
+
},
|
| 141 |
+
{
|
| 142 |
+
"type": "text",
|
| 143 |
+
"text": "Nonetheless, emergent approaches for LLMs with tool integration present several distinct challenges. One primary concern is that current LLM agents still adopt simple retrieval-and-read strategies (Patil et al., 2023; Qin et al., 2023), lacking",
|
| 144 |
+
"bbox": [
|
| 145 |
+
507,
|
| 146 |
+
839,
|
| 147 |
+
884,
|
| 148 |
+
919
|
| 149 |
+
],
|
| 150 |
+
"page_idx": 0
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"type": "page_number",
|
| 154 |
+
"text": "975",
|
| 155 |
+
"bbox": [
|
| 156 |
+
484,
|
| 157 |
+
927,
|
| 158 |
+
515,
|
| 159 |
+
940
|
| 160 |
+
],
|
| 161 |
+
"page_idx": 0
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"type": "footer",
|
| 165 |
+
"text": "Findings of the Association for Computational Linguistics: NAACL 2024, pages 975-988",
|
| 166 |
+
"bbox": [
|
| 167 |
+
226,
|
| 168 |
+
945,
|
| 169 |
+
769,
|
| 170 |
+
958
|
| 171 |
+
],
|
| 172 |
+
"page_idx": 0
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"type": "footer",
|
| 176 |
+
"text": "June 16-21, 2024 ©2024 Association for Computational Linguistics",
|
| 177 |
+
"bbox": [
|
| 178 |
+
292,
|
| 179 |
+
959,
|
| 180 |
+
705,
|
| 181 |
+
972
|
| 182 |
+
],
|
| 183 |
+
"page_idx": 0
|
| 184 |
+
},
|
| 185 |
+
{
|
| 186 |
+
"type": "text",
|
| 187 |
+
"text": "the dynamic adaptability required for addressing complex queries. As shown in Fig. 1, the conventional Retrieve-and-Read paradigm, solely relying heavily on similarity matching, falls short of retrieving diverse types of tools to address a complex user query. This limitation is further exacerbated by the semantic gap between user queries and tool descriptions. Particularly, user queries can be ambiguous and complex, often requiring a deep understanding of the user's intent and the context of the query (Kulkarni et al., 2023). On the other hand, human-written tool descriptions can be abstract and lack essential details for deciding their utilities, leading to a mismatch between what the user needs and what the tool is perceived to offer. Additionally, current models tend to finetune on static tools, posing challenges to their robustness in the ever-evolving tool environment where new tools emerge and existing ones become obsolete (Lübke et al., 2019). There is limited research on retrieval enhancement strategies in non-finetuned settings. These gaps highlight crucial areas for future research and development in LLM and tool integration.",
|
| 188 |
+
"bbox": [
|
| 189 |
+
115,
|
| 190 |
+
84,
|
| 191 |
+
485,
|
| 192 |
+
468
|
| 193 |
+
],
|
| 194 |
+
"page_idx": 1
|
| 195 |
+
},
|
| 196 |
+
{
|
| 197 |
+
"type": "text",
|
| 198 |
+
"text": "In this paper, we leverage LLM's world knowledge and reasoning ability to augment the retrieval and utility of tools in response to complex user queries, by designing a novel framework PLUTO (Planning, Learning, and Understanding for Tools) $^{1}$ . Our first contribution is the introduction of a novel Plan-and-Retrieve for tool integration. While prior Retrieve-and-Read approaches only retrieve once at the beginning, our Plan-and-Retrieve paradigm is designed to adaptively adjust its strategies based on the outcomes of its self-evaluations, ensuring a continuous refinement of the tool selection process. This paradigm is structured into two core modules. The first module, the retriever, leverages neural (dense) retrieval techniques (Karpukhin et al., 2020) and LM-likelihood scoring mechanisms (Song et al., 2023a) to efficiently shortlist relevant tools from a vast pool of candidates in response to a user query. This process ensures that the most pertinent tools are identified quickly, laying a foundation for more effective tool utilization. Inspired by recent advancements of adaptive retrieval-augmented generation (RAG; Jiang et al. 2023; Yoran et al. 2023), we design an LLM-based query planner that autoregressively",
|
| 199 |
+
"bbox": [
|
| 200 |
+
115,
|
| 201 |
+
473,
|
| 202 |
+
485,
|
| 203 |
+
873
|
| 204 |
+
],
|
| 205 |
+
"page_idx": 1
|
| 206 |
+
},
|
| 207 |
+
{
|
| 208 |
+
"type": "text",
|
| 209 |
+
"text": "decomposes complex user queries into manageable, task-oriented actions as the second module. Following the decompositions, the query planner selects the most suitable ones from the retrieved tools. It goes further by evaluating the effectiveness of selected tools and proposing the next action toward addressing the user query. This Plan-and-Retrieve paradigm operates dynamically, embodying a sophisticated feedback loop that interlinks the retrieval of tools with subsequent refinement, evaluation, and planning stages.",
|
| 210 |
+
"bbox": [
|
| 211 |
+
512,
|
| 212 |
+
84,
|
| 213 |
+
882,
|
| 214 |
+
260
|
| 215 |
+
],
|
| 216 |
+
"page_idx": 1
|
| 217 |
+
},
|
| 218 |
+
{
|
| 219 |
+
"type": "text",
|
| 220 |
+
"text": "Our second contribution is the proposal of Edit-and-Ground paradigm that utilizes user queries' rich contextual information and LLM's extensive world knowledge for enriching descriptions of tool functionalities. Research has shown that informed tool documentations can enhance the interaction between LLMs and tools (Hsieh et al., 2023). However, documenting tool functionalities at scale can be tedious for humans. Yang et al. 2023 show LLMs can follow instructions and optimize real-world applications. Leveraging the optimization ability of the LLM, our tool-grounding agent optimizes under-informative tool descriptions by learning and abstracting information from tools' user scenarios. By editing tool descriptions to make them more aligned with tools' user scenarios, the agent bridges the gap between user queries and tool functionalities, enhancing the overall effectiveness of tool retrieval and usage.",
|
| 221 |
+
"bbox": [
|
| 222 |
+
512,
|
| 223 |
+
261,
|
| 224 |
+
882,
|
| 225 |
+
565
|
| 226 |
+
],
|
| 227 |
+
"page_idx": 1
|
| 228 |
+
},
|
| 229 |
+
{
|
| 230 |
+
"type": "text",
|
| 231 |
+
"text": "In conclusion, this paper advances the field of tool integration with LLMs by introducing the novel Plan-and-Retrieve and Edit-and-Ground paradigms. Experiments show that our paradigms improve the recall and NDCG of tool retrieval tasks, significantly outperforming current state-of-the-art (SOTA). Our downstream evaluation suggests that the improvement gained during the retrieval phase, such as higher accuracy and relevance in responses, significantly contribute to successfully addressing the user queries.",
|
| 232 |
+
"bbox": [
|
| 233 |
+
512,
|
| 234 |
+
568,
|
| 235 |
+
882,
|
| 236 |
+
743
|
| 237 |
+
],
|
| 238 |
+
"page_idx": 1
|
| 239 |
+
},
|
| 240 |
+
{
|
| 241 |
+
"type": "text",
|
| 242 |
+
"text": "2 Related Works",
|
| 243 |
+
"text_level": 1,
|
| 244 |
+
"bbox": [
|
| 245 |
+
512,
|
| 246 |
+
758,
|
| 247 |
+
670,
|
| 248 |
+
772
|
| 249 |
+
],
|
| 250 |
+
"page_idx": 1
|
| 251 |
+
},
|
| 252 |
+
{
|
| 253 |
+
"type": "text",
|
| 254 |
+
"text": "Retrieval-Augmented LLM. Early studies on Retrieval-Augmented LLMs typically incorporate embeddings of retrieved passages as a part of the latent representation of the LM (Chen et al., 2017; Lee et al., 2019). More recent works like REALM (Guu et al., 2020) and RAG (Lewis et al., 2021) have demonstrated the effectiveness of in-context augmentation and its improvement on knowledge-",
|
| 255 |
+
"bbox": [
|
| 256 |
+
512,
|
| 257 |
+
790,
|
| 258 |
+
882,
|
| 259 |
+
917
|
| 260 |
+
],
|
| 261 |
+
"page_idx": 1
|
| 262 |
+
},
|
| 263 |
+
{
|
| 264 |
+
"type": "page_footnote",
|
| 265 |
+
"text": "$^{1}$ Code is available at https://github.com/tenghaohuang/PLUTo",
|
| 266 |
+
"bbox": [
|
| 267 |
+
115,
|
| 268 |
+
892,
|
| 269 |
+
485,
|
| 270 |
+
917
|
| 271 |
+
],
|
| 272 |
+
"page_idx": 1
|
| 273 |
+
},
|
| 274 |
+
{
|
| 275 |
+
"type": "page_number",
|
| 276 |
+
"text": "976",
|
| 277 |
+
"bbox": [
|
| 278 |
+
485,
|
| 279 |
+
928,
|
| 280 |
+
515,
|
| 281 |
+
939
|
| 282 |
+
],
|
| 283 |
+
"page_idx": 1
|
| 284 |
+
},
|
| 285 |
+
{
|
| 286 |
+
"type": "image",
|
| 287 |
+
"img_path": "images/a7eccc47a58e4e7ff6963e4bd977914a2f35efc6663a5ec3a923b689b08f287d.jpg",
|
| 288 |
+
"image_caption": [
|
| 289 |
+
"Figure 2: An overview of the PLUTO approach."
|
| 290 |
+
],
|
| 291 |
+
"image_footnote": [],
|
| 292 |
+
"bbox": [
|
| 293 |
+
132,
|
| 294 |
+
80,
|
| 295 |
+
867,
|
| 296 |
+
313
|
| 297 |
+
],
|
| 298 |
+
"page_idx": 2
|
| 299 |
+
},
|
| 300 |
+
{
|
| 301 |
+
"type": "text",
|
| 302 |
+
"text": "intensive tasks. There is also work (Mallen et al., 2023) that explores how Chain-of-Thought (CoT) could guide a multi-turn Retrieve-and-Read process to solve open-domain questions and perform fact verification.",
|
| 303 |
+
"bbox": [
|
| 304 |
+
112,
|
| 305 |
+
357,
|
| 306 |
+
487,
|
| 307 |
+
437
|
| 308 |
+
],
|
| 309 |
+
"page_idx": 2
|
| 310 |
+
},
|
| 311 |
+
{
|
| 312 |
+
"type": "text",
|
| 313 |
+
"text": "However, the massive action space and tool functionality variance in tool-oriented tasks pose challenges to LLMs during planning. An erroneous step in planning can lead to a faulty loop, such as continually calling a tool in the wrong way or hallucinating non-existing tools. Our Plan-and-Retrieve paradigm, employing furtherest planning assessment (Zhu et al., 2023), enforces reasonable and goal-oriented decompositions of user queries. The recently proposed ReAct framework (Yao et al., 2022) asks LLM to plan future actions based on its observation of environments. In the context of tool-oriented tasks, the plan builds upon the execution results of retrieved tools. Such practice running and verifying each tool at retrieval time can be expensive and time-consuming at scale. In contrast, our Plan-and-Retrieve paradigm fully leverages LLM's internal representation of world knowledge to propose plans in response to user queries, therefore guaranteeing both time and cost efficiency as an execution-free paradigm.",
|
| 314 |
+
"bbox": [
|
| 315 |
+
112,
|
| 316 |
+
442,
|
| 317 |
+
489,
|
| 318 |
+
781
|
| 319 |
+
],
|
| 320 |
+
"page_idx": 2
|
| 321 |
+
},
|
| 322 |
+
{
|
| 323 |
+
"type": "text",
|
| 324 |
+
"text": "Tool Learning. Tool learning refers to the process where LLMs not only process and generate language-based responses but also learn to interact with and utilize external tools to enhance their capabilities (Nakano et al., 2022; Schick et al., 2023; Shen et al., 2023; Qian et al., 2023; Song et al., 2023b; Xu et al., 2023; Li et al., 2023; Hao et al., 2023; Zhang et al., 2023). By incorporating tools,",
|
| 325 |
+
"bbox": [
|
| 326 |
+
112,
|
| 327 |
+
790,
|
| 328 |
+
489,
|
| 329 |
+
919
|
| 330 |
+
],
|
| 331 |
+
"page_idx": 2
|
| 332 |
+
},
|
| 333 |
+
{
|
| 334 |
+
"type": "text",
|
| 335 |
+
"text": "LLMs can offer solutions in various areas, including visual-language processing (Gupta and Kembhavi, 2023; Wu et al., 2023), mathematical reasoning (Lu et al., 2023), and tasks in specialized domains (Jin et al., 2023; Tang et al., 2023b).",
|
| 336 |
+
"bbox": [
|
| 337 |
+
507,
|
| 338 |
+
357,
|
| 339 |
+
884,
|
| 340 |
+
438
|
| 341 |
+
],
|
| 342 |
+
"page_idx": 2
|
| 343 |
+
},
|
| 344 |
+
{
|
| 345 |
+
"type": "text",
|
| 346 |
+
"text": "However, previous research on tool learning mainly focused on teaching LLMs to use tools, but ignores the importance of shortlisting relevant tools. In this paper, we focus on using LLMs to improve the tool retrieval process. In contrast to previous researches that heavily rely on finetuning retrievers (Schick et al., 2023; Patil et al., 2023) to shortlist tools, we propose a novel Edit-and-Ground paradigm, leveraging LLMs' parametric knowledge to learn and create more informative descriptions for tools. This approach seeks to provide richer information for the retriever, leading to more accurate retrieval.",
|
| 347 |
+
"bbox": [
|
| 348 |
+
507,
|
| 349 |
+
439,
|
| 350 |
+
884,
|
| 351 |
+
646
|
| 352 |
+
],
|
| 353 |
+
"page_idx": 2
|
| 354 |
+
},
|
| 355 |
+
{
|
| 356 |
+
"type": "text",
|
| 357 |
+
"text": "3 Task and Data",
|
| 358 |
+
"text_level": 1,
|
| 359 |
+
"bbox": [
|
| 360 |
+
509,
|
| 361 |
+
663,
|
| 362 |
+
670,
|
| 363 |
+
678
|
| 364 |
+
],
|
| 365 |
+
"page_idx": 2
|
| 366 |
+
},
|
| 367 |
+
{
|
| 368 |
+
"type": "text",
|
| 369 |
+
"text": "We hereby formulate the task of tool retrieval and describe the dataset for this task.",
|
| 370 |
+
"bbox": [
|
| 371 |
+
507,
|
| 372 |
+
690,
|
| 373 |
+
882,
|
| 374 |
+
722
|
| 375 |
+
],
|
| 376 |
+
"page_idx": 2
|
| 377 |
+
},
|
| 378 |
+
{
|
| 379 |
+
"type": "text",
|
| 380 |
+
"text": "3.1 Task Definition",
|
| 381 |
+
"text_level": 1,
|
| 382 |
+
"bbox": [
|
| 383 |
+
507,
|
| 384 |
+
734,
|
| 385 |
+
675,
|
| 386 |
+
750
|
| 387 |
+
],
|
| 388 |
+
"page_idx": 2
|
| 389 |
+
},
|
| 390 |
+
{
|
| 391 |
+
"type": "text",
|
| 392 |
+
"text": "The tool retrieval process involves taking a user query $Q$ and an index base of tool descriptions $D = \\{d(t_{1}), d(t_{2}), \\ldots, d(t_{n})\\}$ as input, where each $d(t)$ represents the description of each tool $t$ . The retriever then sifts through the tool descriptions in $D$ and shortlists a relevant tool set $T = \\{t_{1}, t_{2}, \\ldots, t_{k}\\}$ that are potentially suited to address aspects of the user query $Q$ . It is essential to underline that unlike conventional retrieval tasks, the task of tool retrieval is goal-oriented in nature,",
|
| 393 |
+
"bbox": [
|
| 394 |
+
507,
|
| 395 |
+
758,
|
| 396 |
+
884,
|
| 397 |
+
917
|
| 398 |
+
],
|
| 399 |
+
"page_idx": 2
|
| 400 |
+
},
|
| 401 |
+
{
|
| 402 |
+
"type": "page_number",
|
| 403 |
+
"text": "977",
|
| 404 |
+
"bbox": [
|
| 405 |
+
485,
|
| 406 |
+
928,
|
| 407 |
+
515,
|
| 408 |
+
940
|
| 409 |
+
],
|
| 410 |
+
"page_idx": 2
|
| 411 |
+
},
|
| 412 |
+
{
|
| 413 |
+
"type": "text",
|
| 414 |
+
"text": "which means the set of retrieved tools $T$ should be able to address the user query $Q$ .",
|
| 415 |
+
"bbox": [
|
| 416 |
+
112,
|
| 417 |
+
84,
|
| 418 |
+
485,
|
| 419 |
+
116
|
| 420 |
+
],
|
| 421 |
+
"page_idx": 3
|
| 422 |
+
},
|
| 423 |
+
{
|
| 424 |
+
"type": "text",
|
| 425 |
+
"text": "The systems are expected to accurately retrieve relevant tools and understand the user intents and complex synergy between tools, thus truly assisting users in problem-solving processes.",
|
| 426 |
+
"bbox": [
|
| 427 |
+
112,
|
| 428 |
+
117,
|
| 429 |
+
485,
|
| 430 |
+
181
|
| 431 |
+
],
|
| 432 |
+
"page_idx": 3
|
| 433 |
+
},
|
| 434 |
+
{
|
| 435 |
+
"type": "text",
|
| 436 |
+
"text": "3.2 Dataset",
|
| 437 |
+
"text_level": 1,
|
| 438 |
+
"bbox": [
|
| 439 |
+
114,
|
| 440 |
+
193,
|
| 441 |
+
220,
|
| 442 |
+
209
|
| 443 |
+
],
|
| 444 |
+
"page_idx": 3
|
| 445 |
+
},
|
| 446 |
+
{
|
| 447 |
+
"type": "text",
|
| 448 |
+
"text": "Existing datasets for tool learning, such as those delineated in (Li et al., 2023; Patil et al., 2023; Tang et al., 2023a; Xu et al., 2023), provide insights into the field. Nonetheless, these datasets exhibit limitations, where they only cover a limited number of tools or solely support simple single-tool usage scenarios, where user queries are simple and could be addressed by a single tool.",
|
| 449 |
+
"bbox": [
|
| 450 |
+
112,
|
| 451 |
+
217,
|
| 452 |
+
487,
|
| 453 |
+
344
|
| 454 |
+
],
|
| 455 |
+
"page_idx": 3
|
| 456 |
+
},
|
| 457 |
+
{
|
| 458 |
+
"type": "text",
|
| 459 |
+
"text": "Contrastingly, Qin et al. (2023) proposed ToolBench, a dataset covering more than 3,000 tools from 49 categories (such as advertising, data analysis, and transportation) and support complex, multi-tool user scenarios. In these scenarios, a single user query necessitates the sequential application of multiple tools, each contributing uniquely to the resolution of the query. The ToolBench dataset synergizes with the RapidAPI Hub, a prominent API marketplace that consolidates a vast array of real-world APIs. The multi-tool query creation process involves selecting representative tools within each category or collection, crafting queries to mimic real-world problem-solving scenarios.",
|
| 460 |
+
"bbox": [
|
| 461 |
+
115,
|
| 462 |
+
347,
|
| 463 |
+
489,
|
| 464 |
+
570
|
| 465 |
+
],
|
| 466 |
+
"page_idx": 3
|
| 467 |
+
},
|
| 468 |
+
{
|
| 469 |
+
"type": "text",
|
| 470 |
+
"text": "Given our research focus and the nature of our study, we have chosen to concentrate on the Intra-Category setting of the ToolBench dataset. The intra-category setting provides high-quality user queries, where the hierarchies of tools are clearly defined based on their main functionalities. It motivates understanding complex interactions and synergies between tools that share a common functional domain. The setting mirrors real-world situations where problem-solving often demands a multifaceted and integrative use of diverse tools. The ToolBench dataset annotates paths of executed tools that successfully address the user queries as solution paths. The average length of the solution paths is 4. We take the annotated solution paths as the ground truth for our task.",
|
| 471 |
+
"bbox": [
|
| 472 |
+
112,
|
| 473 |
+
571,
|
| 474 |
+
489,
|
| 475 |
+
829
|
| 476 |
+
],
|
| 477 |
+
"page_idx": 3
|
| 478 |
+
},
|
| 479 |
+
{
|
| 480 |
+
"type": "text",
|
| 481 |
+
"text": "4 Method",
|
| 482 |
+
"text_level": 1,
|
| 483 |
+
"bbox": [
|
| 484 |
+
112,
|
| 485 |
+
844,
|
| 486 |
+
216,
|
| 487 |
+
858
|
| 488 |
+
],
|
| 489 |
+
"page_idx": 3
|
| 490 |
+
},
|
| 491 |
+
{
|
| 492 |
+
"type": "text",
|
| 493 |
+
"text": "In this section, we describe the proposed framework to integrate tools with LLMs for addressing complex user queries. Our methodology is",
|
| 494 |
+
"bbox": [
|
| 495 |
+
112,
|
| 496 |
+
871,
|
| 497 |
+
489,
|
| 498 |
+
917
|
| 499 |
+
],
|
| 500 |
+
"page_idx": 3
|
| 501 |
+
},
|
| 502 |
+
{
|
| 503 |
+
"type": "text",
|
| 504 |
+
"text": "grounded in two innovative paradigms: the Plan-and-Retrieve (P&R; §4.2) and Edit-and-Ground (E&G; §4.3). We discuss the coordination between two paradigms in §4.4.",
|
| 505 |
+
"bbox": [
|
| 506 |
+
507,
|
| 507 |
+
84,
|
| 508 |
+
882,
|
| 509 |
+
149
|
| 510 |
+
],
|
| 511 |
+
"page_idx": 3
|
| 512 |
+
},
|
| 513 |
+
{
|
| 514 |
+
"type": "text",
|
| 515 |
+
"text": "4.1 Method Overview",
|
| 516 |
+
"text_level": 1,
|
| 517 |
+
"bbox": [
|
| 518 |
+
507,
|
| 519 |
+
160,
|
| 520 |
+
695,
|
| 521 |
+
174
|
| 522 |
+
],
|
| 523 |
+
"page_idx": 3
|
| 524 |
+
},
|
| 525 |
+
{
|
| 526 |
+
"type": "text",
|
| 527 |
+
"text": "PLUTO integrates two key paradigms, Plan-and-Retrieve (P&R) and Edit-and-Ground (E&G), to effectively address complex user queries with LLMs.",
|
| 528 |
+
"bbox": [
|
| 529 |
+
507,
|
| 530 |
+
181,
|
| 531 |
+
882,
|
| 532 |
+
228
|
| 533 |
+
],
|
| 534 |
+
"page_idx": 3
|
| 535 |
+
},
|
| 536 |
+
{
|
| 537 |
+
"type": "text",
|
| 538 |
+
"text": "The Plan-and-Retrieve paradigm is a two-stage process. The Plan stage decomposes user queries into focused sub-queries, while the Retrieve stage matches these sub-queries with relevant tools.",
|
| 539 |
+
"bbox": [
|
| 540 |
+
507,
|
| 541 |
+
229,
|
| 542 |
+
880,
|
| 543 |
+
292
|
| 544 |
+
],
|
| 545 |
+
"page_idx": 3
|
| 546 |
+
},
|
| 547 |
+
{
|
| 548 |
+
"type": "text",
|
| 549 |
+
"text": "The Edit-and-Ground paradigm, consisting of the Evaluator and Optimizer, focuses on enhancing tool descriptions.",
|
| 550 |
+
"bbox": [
|
| 551 |
+
507,
|
| 552 |
+
294,
|
| 553 |
+
880,
|
| 554 |
+
341
|
| 555 |
+
],
|
| 556 |
+
"page_idx": 3
|
| 557 |
+
},
|
| 558 |
+
{
|
| 559 |
+
"type": "text",
|
| 560 |
+
"text": "These paradigms are designed to work in tandem. P&R paradigm addresses immediate user queries, while E&G actively identifies and collects underinformative tool descriptions for optimization.",
|
| 561 |
+
"bbox": [
|
| 562 |
+
507,
|
| 563 |
+
342,
|
| 564 |
+
882,
|
| 565 |
+
406
|
| 566 |
+
],
|
| 567 |
+
"page_idx": 3
|
| 568 |
+
},
|
| 569 |
+
{
|
| 570 |
+
"type": "text",
|
| 571 |
+
"text": "4.2 Plan-and-Retrieve",
|
| 572 |
+
"text_level": 1,
|
| 573 |
+
"bbox": [
|
| 574 |
+
507,
|
| 575 |
+
418,
|
| 576 |
+
699,
|
| 577 |
+
432
|
| 578 |
+
],
|
| 579 |
+
"page_idx": 3
|
| 580 |
+
},
|
| 581 |
+
{
|
| 582 |
+
"type": "text",
|
| 583 |
+
"text": "The Plan-and-Retrieve (P&R) paradigm is designed as a two-stage process to effectively address complex user queries.",
|
| 584 |
+
"bbox": [
|
| 585 |
+
507,
|
| 586 |
+
438,
|
| 587 |
+
882,
|
| 588 |
+
487
|
| 589 |
+
],
|
| 590 |
+
"page_idx": 3
|
| 591 |
+
},
|
| 592 |
+
{
|
| 593 |
+
"type": "text",
|
| 594 |
+
"text": "Plan. In the Plan stage, a LLM-based planner autoregressively decomposes the user query $Q$ into sub-queries $q_{1}, q_{2}, \\ldots, q_{n}$ . To ensure the robustness and quality of the decomposed sub-queries, we follow Zhu et al. (2023). Specifically, for each step of sub-query generation, the planner first generates a batch of hypotheses. Then, we cluster the generated hypotheses along with previously created sub-queries via K-means clustering algorithm. Finally, we select a sub-query from the hypotheses that distinguishes the most from the previous sub-queries to proceed<sup>2</sup>.",
|
| 595 |
+
"bbox": [
|
| 596 |
+
507,
|
| 597 |
+
493,
|
| 598 |
+
882,
|
| 599 |
+
684
|
| 600 |
+
],
|
| 601 |
+
"page_idx": 3
|
| 602 |
+
},
|
| 603 |
+
{
|
| 604 |
+
"type": "text",
|
| 605 |
+
"text": "As shown in Fig. 2, the planner autoregressively decomposes the user query $Q$ into more fine-grained sub-queries based on assessments at inference time. After the generation of a sub-query $q_{t}$ , the planner evaluates whether the original query $Q$ has been satisfactorily achieved based on the current planning history. If the evaluation determines that the goal has been met, the iterative process concludes. Otherwise, the planner proceeds to generate the subsequent sub-query $q_{t + 1}$ . This active and autoregressive planning at inference time facilitates a more focused understanding of the tools. We use the following prompt template for the planner.",
|
| 606 |
+
"bbox": [
|
| 607 |
+
507,
|
| 608 |
+
687,
|
| 609 |
+
882,
|
| 610 |
+
895
|
| 611 |
+
],
|
| 612 |
+
"page_idx": 3
|
| 613 |
+
},
|
| 614 |
+
{
|
| 615 |
+
"type": "page_footnote",
|
| 616 |
+
"text": "2Please refer to Appx. $\\S A$ for algorithm implementation.",
|
| 617 |
+
"bbox": [
|
| 618 |
+
529,
|
| 619 |
+
904,
|
| 620 |
+
877,
|
| 621 |
+
917
|
| 622 |
+
],
|
| 623 |
+
"page_idx": 3
|
| 624 |
+
},
|
| 625 |
+
{
|
| 626 |
+
"type": "page_number",
|
| 627 |
+
"text": "978",
|
| 628 |
+
"bbox": [
|
| 629 |
+
485,
|
| 630 |
+
927,
|
| 631 |
+
515,
|
| 632 |
+
940
|
| 633 |
+
],
|
| 634 |
+
"page_idx": 3
|
| 635 |
+
},
|
| 636 |
+
{
|
| 637 |
+
"type": "text",
|
| 638 |
+
"text": "Planner Prompt",
|
| 639 |
+
"text_level": 1,
|
| 640 |
+
"bbox": [
|
| 641 |
+
127,
|
| 642 |
+
86,
|
| 643 |
+
233,
|
| 644 |
+
101
|
| 645 |
+
],
|
| 646 |
+
"page_idx": 4
|
| 647 |
+
},
|
| 648 |
+
{
|
| 649 |
+
"type": "text",
|
| 650 |
+
"text": "You are given a user query requiring multi-step actions and reasoning. Output an immediate next action to achieve the user query.",
|
| 651 |
+
"bbox": [
|
| 652 |
+
124,
|
| 653 |
+
105,
|
| 654 |
+
453,
|
| 655 |
+
143
|
| 656 |
+
],
|
| 657 |
+
"page_idx": 4
|
| 658 |
+
},
|
| 659 |
+
{
|
| 660 |
+
"type": "text",
|
| 661 |
+
"text": "Previous Actions: {Planning History}",
|
| 662 |
+
"bbox": [
|
| 663 |
+
126,
|
| 664 |
+
143,
|
| 665 |
+
351,
|
| 666 |
+
156
|
| 667 |
+
],
|
| 668 |
+
"page_idx": 4
|
| 669 |
+
},
|
| 670 |
+
{
|
| 671 |
+
"type": "text",
|
| 672 |
+
"text": "User Query: $\\{Q\\}$",
|
| 673 |
+
"bbox": [
|
| 674 |
+
127,
|
| 675 |
+
156,
|
| 676 |
+
228,
|
| 677 |
+
168
|
| 678 |
+
],
|
| 679 |
+
"page_idx": 4
|
| 680 |
+
},
|
| 681 |
+
{
|
| 682 |
+
"type": "text",
|
| 683 |
+
"text": "Output:",
|
| 684 |
+
"bbox": [
|
| 685 |
+
127,
|
| 686 |
+
168,
|
| 687 |
+
174,
|
| 688 |
+
181
|
| 689 |
+
],
|
| 690 |
+
"page_idx": 4
|
| 691 |
+
},
|
| 692 |
+
{
|
| 693 |
+
"type": "text",
|
| 694 |
+
"text": "Retrieve. In the Retrieve stage, for each sub-query $q_i$ , the retriever shortlists the most suitable tools $T_i \\in D$ . We first retrieve a pool of candidate tools that matches $q_i$ , represented as",
|
| 695 |
+
"bbox": [
|
| 696 |
+
112,
|
| 697 |
+
198,
|
| 698 |
+
485,
|
| 699 |
+
262
|
| 700 |
+
],
|
| 701 |
+
"page_idx": 4
|
| 702 |
+
},
|
| 703 |
+
{
|
| 704 |
+
"type": "equation",
|
| 705 |
+
"text": "\n$$\nT _ {i} ^ {\\prime} = \\operatorname {R e t} \\left(q _ {i}\\right), \\tag {1}\n$$\n",
|
| 706 |
+
"text_format": "latex",
|
| 707 |
+
"bbox": [
|
| 708 |
+
243,
|
| 709 |
+
272,
|
| 710 |
+
487,
|
| 711 |
+
290
|
| 712 |
+
],
|
| 713 |
+
"page_idx": 4
|
| 714 |
+
},
|
| 715 |
+
{
|
| 716 |
+
"type": "text",
|
| 717 |
+
"text": "where Ret represents the retriever.",
|
| 718 |
+
"bbox": [
|
| 719 |
+
112,
|
| 720 |
+
300,
|
| 721 |
+
371,
|
| 722 |
+
316
|
| 723 |
+
],
|
| 724 |
+
"page_idx": 4
|
| 725 |
+
},
|
| 726 |
+
{
|
| 727 |
+
"type": "text",
|
| 728 |
+
"text": "To enhance the robustness of retrieval, we rerank the candidate tool set $T_{i}^{\\prime}$ by LM-likelihood score between the sub-query $q_{i}$ and each tool $t_j \\in T_i$ , which is calculated as follows:",
|
| 729 |
+
"bbox": [
|
| 730 |
+
112,
|
| 731 |
+
317,
|
| 732 |
+
487,
|
| 733 |
+
380
|
| 734 |
+
],
|
| 735 |
+
"page_idx": 4
|
| 736 |
+
},
|
| 737 |
+
{
|
| 738 |
+
"type": "equation",
|
| 739 |
+
"text": "\n$$\n\\operatorname {L M} \\text {l i k e l i h o o d} \\left(q _ {i}, t _ {j}\\right) = - \\log P \\left(q _ {i}, d \\left(t _ {j}\\right)\\right). \\tag {2}\n$$\n",
|
| 740 |
+
"text_format": "latex",
|
| 741 |
+
"bbox": [
|
| 742 |
+
127,
|
| 743 |
+
392,
|
| 744 |
+
487,
|
| 745 |
+
409
|
| 746 |
+
],
|
| 747 |
+
"page_idx": 4
|
| 748 |
+
},
|
| 749 |
+
{
|
| 750 |
+
"type": "text",
|
| 751 |
+
"text": "Based on the re-ranked tools, we choose the top-5 tools $T_{i,top - 5}^{\\prime}$ and feed them into a LLM-based predictor, which outputs a shortlisted tool set $T_{i}$ from the candidate tool set $T_{i,top - 5}^{\\prime}$ that are relevant to $q_{i}$ . We use this prompt for the predictor.",
|
| 752 |
+
"bbox": [
|
| 753 |
+
112,
|
| 754 |
+
420,
|
| 755 |
+
487,
|
| 756 |
+
500
|
| 757 |
+
],
|
| 758 |
+
"page_idx": 4
|
| 759 |
+
},
|
| 760 |
+
{
|
| 761 |
+
"type": "text",
|
| 762 |
+
"text": "Predictor Prompt",
|
| 763 |
+
"text_level": 1,
|
| 764 |
+
"bbox": [
|
| 765 |
+
127,
|
| 766 |
+
516,
|
| 767 |
+
243,
|
| 768 |
+
531
|
| 769 |
+
],
|
| 770 |
+
"page_idx": 4
|
| 771 |
+
},
|
| 772 |
+
{
|
| 773 |
+
"type": "text",
|
| 774 |
+
"text": "You are given candidate tools that can be potentially used to solve current goal. Among candidate tools, select a list of relevant tools which would help achieve the current goal.",
|
| 775 |
+
"bbox": [
|
| 776 |
+
124,
|
| 777 |
+
535,
|
| 778 |
+
468,
|
| 779 |
+
571
|
| 780 |
+
],
|
| 781 |
+
"page_idx": 4
|
| 782 |
+
},
|
| 783 |
+
{
|
| 784 |
+
"type": "text",
|
| 785 |
+
"text": "Current Goal: $\\{q\\}$",
|
| 786 |
+
"bbox": [
|
| 787 |
+
127,
|
| 788 |
+
571,
|
| 789 |
+
231,
|
| 790 |
+
583
|
| 791 |
+
],
|
| 792 |
+
"page_idx": 4
|
| 793 |
+
},
|
| 794 |
+
{
|
| 795 |
+
"type": "text",
|
| 796 |
+
"text": "Candidate Tools: $\\{T^{\\prime}\\}$",
|
| 797 |
+
"bbox": [
|
| 798 |
+
127,
|
| 799 |
+
583,
|
| 800 |
+
253,
|
| 801 |
+
595
|
| 802 |
+
],
|
| 803 |
+
"page_idx": 4
|
| 804 |
+
},
|
| 805 |
+
{
|
| 806 |
+
"type": "text",
|
| 807 |
+
"text": "Output:",
|
| 808 |
+
"bbox": [
|
| 809 |
+
127,
|
| 810 |
+
596,
|
| 811 |
+
173,
|
| 812 |
+
607
|
| 813 |
+
],
|
| 814 |
+
"page_idx": 4
|
| 815 |
+
},
|
| 816 |
+
{
|
| 817 |
+
"type": "text",
|
| 818 |
+
"text": "As a result, the final shortlisted tool set $T$ is formed by",
|
| 819 |
+
"bbox": [
|
| 820 |
+
112,
|
| 821 |
+
619,
|
| 822 |
+
485,
|
| 823 |
+
651
|
| 824 |
+
],
|
| 825 |
+
"page_idx": 4
|
| 826 |
+
},
|
| 827 |
+
{
|
| 828 |
+
"type": "equation",
|
| 829 |
+
"text": "\n$$\nT = \\bigcup_ {i = 1} ^ {n} T _ {i}, \\forall i \\in [ 1, n ] \\cap \\mathbb {Z}. \\tag {3}\n$$\n",
|
| 830 |
+
"text_format": "latex",
|
| 831 |
+
"bbox": [
|
| 832 |
+
194,
|
| 833 |
+
659,
|
| 834 |
+
487,
|
| 835 |
+
700
|
| 836 |
+
],
|
| 837 |
+
"page_idx": 4
|
| 838 |
+
},
|
| 839 |
+
{
|
| 840 |
+
"type": "text",
|
| 841 |
+
"text": "For the choice of Ret, we adopt a neural (dense) retriever method. For each sub-query $q_{i}$ , the dense vector representation $\\mathbf{q}_i$ is obtained by passing $q_{i}$ through a dense encoder. Similarly, we obtain dense representation $\\mathbf{d}$ through a dense encoder for each tool description $d$ . The tool index corpus $D$ is formed as a collection of $\\mathbf{d}$ .",
|
| 842 |
+
"bbox": [
|
| 843 |
+
112,
|
| 844 |
+
709,
|
| 845 |
+
485,
|
| 846 |
+
820
|
| 847 |
+
],
|
| 848 |
+
"page_idx": 4
|
| 849 |
+
},
|
| 850 |
+
{
|
| 851 |
+
"type": "text",
|
| 852 |
+
"text": "The P&R module interleaves Plan and Retrieve until the planner evaluates that the user query has been sufficiently decomposed and addressed through the retrieved tools. The module then returns $T$ as the relevant tools to address the user query.",
|
| 853 |
+
"bbox": [
|
| 854 |
+
112,
|
| 855 |
+
822,
|
| 856 |
+
487,
|
| 857 |
+
919
|
| 858 |
+
],
|
| 859 |
+
"page_idx": 4
|
| 860 |
+
},
|
| 861 |
+
{
|
| 862 |
+
"type": "code",
|
| 863 |
+
"sub_type": "algorithm",
|
| 864 |
+
"code_caption": [
|
| 865 |
+
"Algorithm 1 Edit-and-Ground Algorithm"
|
| 866 |
+
],
|
| 867 |
+
"code_body": "Input: Trainset, Devset, Toolset, Failure Threshold, Max_Rounds\nOutput: Optimized Tool Descriptions\nInitialize cache for tools in Toolset\ncur_round = 0\nwhile cur_round < Max_Rounds do\n ## Phase 1: Evaluate Retrieval Performance\n for each (query, gt.tools) in Trainset do\n predicted.tools ← P&R(query)\n for each tool in gt.tools do\n tool.trials += 1\n if tool not in predicted.tools then\n tool失败 += 1\n tool.queries.add(query) > Failure queries\n end if\n end for\n end for\n ## Phase 2: Failed Tool Description Optimization\n for each tool in Toolset do\n if tool失败 > Failure Threshold then\n U ← Remove specific entities from tool.queries\n R ← Predict reasons for failure of U\n d(tool) ← tool.description\n d'(tool) ← E&G(tool, d/tool), U, R)\n # Phase 3: Evaluate Performance of d'(tool)\n cur_recall ← Eval(Devset, d/tool))\n if tool/recall < cur_recall then\n tool.description ← d'(tool)\n tool/recall ← cur_recall\n end if\n end if\nend for\ncur_round += 1\nend while",
|
| 868 |
+
"bbox": [
|
| 869 |
+
527,
|
| 870 |
+
102,
|
| 871 |
+
882,
|
| 872 |
+
543
|
| 873 |
+
],
|
| 874 |
+
"page_idx": 4
|
| 875 |
+
},
|
| 876 |
+
{
|
| 877 |
+
"type": "text",
|
| 878 |
+
"text": "4.3 Edit-and-Ground",
|
| 879 |
+
"text_level": 1,
|
| 880 |
+
"bbox": [
|
| 881 |
+
507,
|
| 882 |
+
570,
|
| 883 |
+
692,
|
| 884 |
+
583
|
| 885 |
+
],
|
| 886 |
+
"page_idx": 4
|
| 887 |
+
},
|
| 888 |
+
{
|
| 889 |
+
"type": "text",
|
| 890 |
+
"text": "The Edit-and-Ground (E&G) paradigm focuses on refining under-informative tool descriptions to align them with user queries. As shown in Alg. 1, the evaluator examines the quality of tool descriptions by retrieval results. A tool description is viewed as under-informative if the number of failure cases of retrieval exceeds a pre-defined threshold. We collect such tools for later optimization.",
|
| 891 |
+
"bbox": [
|
| 892 |
+
507,
|
| 893 |
+
590,
|
| 894 |
+
882,
|
| 895 |
+
719
|
| 896 |
+
],
|
| 897 |
+
"page_idx": 4
|
| 898 |
+
},
|
| 899 |
+
{
|
| 900 |
+
"type": "text",
|
| 901 |
+
"text": "Entity Filtering Prompt",
|
| 902 |
+
"text_level": 1,
|
| 903 |
+
"bbox": [
|
| 904 |
+
524,
|
| 905 |
+
734,
|
| 906 |
+
678,
|
| 907 |
+
750
|
| 908 |
+
],
|
| 909 |
+
"page_idx": 4
|
| 910 |
+
},
|
| 911 |
+
{
|
| 912 |
+
"type": "text",
|
| 913 |
+
"text": "Given an input query, remove specific entity information and return only the general query template. Make sure your method is generalizable to handle other queries.",
|
| 914 |
+
"bbox": [
|
| 915 |
+
519,
|
| 916 |
+
755,
|
| 917 |
+
857,
|
| 918 |
+
793
|
| 919 |
+
],
|
| 920 |
+
"page_idx": 4
|
| 921 |
+
},
|
| 922 |
+
{
|
| 923 |
+
"type": "text",
|
| 924 |
+
"text": "{Demonstrations}",
|
| 925 |
+
"bbox": [
|
| 926 |
+
522,
|
| 927 |
+
794,
|
| 928 |
+
631,
|
| 929 |
+
804
|
| 930 |
+
],
|
| 931 |
+
"page_idx": 4
|
| 932 |
+
},
|
| 933 |
+
{
|
| 934 |
+
"type": "text",
|
| 935 |
+
"text": "User Queries: $\\{Q\\}$",
|
| 936 |
+
"bbox": [
|
| 937 |
+
522,
|
| 938 |
+
806,
|
| 939 |
+
633,
|
| 940 |
+
816
|
| 941 |
+
],
|
| 942 |
+
"page_idx": 4
|
| 943 |
+
},
|
| 944 |
+
{
|
| 945 |
+
"type": "text",
|
| 946 |
+
"text": "Output:",
|
| 947 |
+
"bbox": [
|
| 948 |
+
522,
|
| 949 |
+
816,
|
| 950 |
+
569,
|
| 951 |
+
829
|
| 952 |
+
],
|
| 953 |
+
"page_idx": 4
|
| 954 |
+
},
|
| 955 |
+
{
|
| 956 |
+
"type": "text",
|
| 957 |
+
"text": "Subsequently, the optimizer takes a tool $t$ with its base description $d(t)$ and $U$ , a batch of relevant user queries, as input. To avoid the optimizer overfitting to a local batch, we use an LLM to filter out specific entities for each query in $U$ . The entity",
|
| 958 |
+
"bbox": [
|
| 959 |
+
507,
|
| 960 |
+
839,
|
| 961 |
+
882,
|
| 962 |
+
919
|
| 963 |
+
],
|
| 964 |
+
"page_idx": 4
|
| 965 |
+
},
|
| 966 |
+
{
|
| 967 |
+
"type": "page_number",
|
| 968 |
+
"text": "979",
|
| 969 |
+
"bbox": [
|
| 970 |
+
484,
|
| 971 |
+
927,
|
| 972 |
+
515,
|
| 973 |
+
940
|
| 974 |
+
],
|
| 975 |
+
"page_idx": 4
|
| 976 |
+
},
|
| 977 |
+
{
|
| 978 |
+
"type": "text",
|
| 979 |
+
"text": "filtering prompt template is shown as above.",
|
| 980 |
+
"bbox": [
|
| 981 |
+
112,
|
| 982 |
+
84,
|
| 983 |
+
442,
|
| 984 |
+
99
|
| 985 |
+
],
|
| 986 |
+
"page_idx": 5
|
| 987 |
+
},
|
| 988 |
+
{
|
| 989 |
+
"type": "text",
|
| 990 |
+
"text": "To assist the optimizer in improving underperformed tool descriptions, we prompt LLM to generate reasons $R$ explaining why the tool could be related and helpful in addressing user queries. The functionality assessment prompt template is shown below:",
|
| 991 |
+
"bbox": [
|
| 992 |
+
112,
|
| 993 |
+
101,
|
| 994 |
+
487,
|
| 995 |
+
195
|
| 996 |
+
],
|
| 997 |
+
"page_idx": 5
|
| 998 |
+
},
|
| 999 |
+
{
|
| 1000 |
+
"type": "text",
|
| 1001 |
+
"text": "Functionality Assessment Prompt",
|
| 1002 |
+
"text_level": 1,
|
| 1003 |
+
"bbox": [
|
| 1004 |
+
127,
|
| 1005 |
+
212,
|
| 1006 |
+
352,
|
| 1007 |
+
225
|
| 1008 |
+
],
|
| 1009 |
+
"page_idx": 5
|
| 1010 |
+
},
|
| 1011 |
+
{
|
| 1012 |
+
"type": "text",
|
| 1013 |
+
"text": "Given a batch of user queries and a tool, predict a reason why the tool would be helpful to address the user queries.",
|
| 1014 |
+
"bbox": [
|
| 1015 |
+
126,
|
| 1016 |
+
231,
|
| 1017 |
+
465,
|
| 1018 |
+
256
|
| 1019 |
+
],
|
| 1020 |
+
"page_idx": 5
|
| 1021 |
+
},
|
| 1022 |
+
{
|
| 1023 |
+
"type": "text",
|
| 1024 |
+
"text": "{Demonstrations}",
|
| 1025 |
+
"bbox": [
|
| 1026 |
+
127,
|
| 1027 |
+
256,
|
| 1028 |
+
235,
|
| 1029 |
+
268
|
| 1030 |
+
],
|
| 1031 |
+
"page_idx": 5
|
| 1032 |
+
},
|
| 1033 |
+
{
|
| 1034 |
+
"type": "text",
|
| 1035 |
+
"text": "User Queries: $\\{U\\}$",
|
| 1036 |
+
"bbox": [
|
| 1037 |
+
127,
|
| 1038 |
+
269,
|
| 1039 |
+
236,
|
| 1040 |
+
281
|
| 1041 |
+
],
|
| 1042 |
+
"page_idx": 5
|
| 1043 |
+
},
|
| 1044 |
+
{
|
| 1045 |
+
"type": "text",
|
| 1046 |
+
"text": "Tool: $\\{t:d(t)\\}$",
|
| 1047 |
+
"bbox": [
|
| 1048 |
+
127,
|
| 1049 |
+
281,
|
| 1050 |
+
210,
|
| 1051 |
+
293
|
| 1052 |
+
],
|
| 1053 |
+
"page_idx": 5
|
| 1054 |
+
},
|
| 1055 |
+
{
|
| 1056 |
+
"type": "text",
|
| 1057 |
+
"text": "Output:",
|
| 1058 |
+
"bbox": [
|
| 1059 |
+
127,
|
| 1060 |
+
294,
|
| 1061 |
+
174,
|
| 1062 |
+
306
|
| 1063 |
+
],
|
| 1064 |
+
"page_idx": 5
|
| 1065 |
+
},
|
| 1066 |
+
{
|
| 1067 |
+
"type": "text",
|
| 1068 |
+
"text": "Finally, by prompting LLM with 1) base tool description $d(t)$ , 2) entity-filtered user queries $U$ , and 3) the reasons $R$ , we obtain an enriched tool description $d'(t)$ . Please refer to Fig. 4 in Appendix C for the prompt template. We formally represent this process as",
|
| 1069 |
+
"bbox": [
|
| 1070 |
+
112,
|
| 1071 |
+
319,
|
| 1072 |
+
487,
|
| 1073 |
+
414
|
| 1074 |
+
],
|
| 1075 |
+
"page_idx": 5
|
| 1076 |
+
},
|
| 1077 |
+
{
|
| 1078 |
+
"type": "equation",
|
| 1079 |
+
"text": "\n$$\nd ^ {\\prime} (t) = E \\& G (t, d (t), U, R). \\tag {4}\n$$\n",
|
| 1080 |
+
"text_format": "latex",
|
| 1081 |
+
"bbox": [
|
| 1082 |
+
191,
|
| 1083 |
+
429,
|
| 1084 |
+
487,
|
| 1085 |
+
445
|
| 1086 |
+
],
|
| 1087 |
+
"page_idx": 5
|
| 1088 |
+
},
|
| 1089 |
+
{
|
| 1090 |
+
"type": "text",
|
| 1091 |
+
"text": "The optimization process is executed in multiple rounds as described in Alg. 1. In each round, we evaluate the retrieval recall on the development set for each tool and compare it with the previous round. If the current round's recall is better than the previous one, we update the tool's description; otherwise, we keep the original description.",
|
| 1092 |
+
"bbox": [
|
| 1093 |
+
112,
|
| 1094 |
+
460,
|
| 1095 |
+
485,
|
| 1096 |
+
571
|
| 1097 |
+
],
|
| 1098 |
+
"page_idx": 5
|
| 1099 |
+
},
|
| 1100 |
+
{
|
| 1101 |
+
"type": "text",
|
| 1102 |
+
"text": "The Edit-and-Ground involves using the LLM's extensive world knowledge, combined with the contextual details provided by $U$ , to edit and enhance $d(t)$ . The result of this task is an enriched tool description $d'(t)$ , expected to resonate more closely with real-world user scenarios and increase the utility of the tool in practical applications.",
|
| 1103 |
+
"bbox": [
|
| 1104 |
+
112,
|
| 1105 |
+
573,
|
| 1106 |
+
487,
|
| 1107 |
+
686
|
| 1108 |
+
],
|
| 1109 |
+
"page_idx": 5
|
| 1110 |
+
},
|
| 1111 |
+
{
|
| 1112 |
+
"type": "text",
|
| 1113 |
+
"text": "4.4 Paradigm Coordination and Inference",
|
| 1114 |
+
"text_level": 1,
|
| 1115 |
+
"bbox": [
|
| 1116 |
+
112,
|
| 1117 |
+
697,
|
| 1118 |
+
460,
|
| 1119 |
+
714
|
| 1120 |
+
],
|
| 1121 |
+
"page_idx": 5
|
| 1122 |
+
},
|
| 1123 |
+
{
|
| 1124 |
+
"type": "text",
|
| 1125 |
+
"text": "Our PLUTO framework employs strategic coordination of the Plan-and-Retrieve (P&R) and Edit-and-Ground (E&G) paradigms, phased to optimize the process of tool retrieval. This section elucidates the interaction between these paradigms during the optimization phase and the subsequent inference phase.",
|
| 1126 |
+
"bbox": [
|
| 1127 |
+
112,
|
| 1128 |
+
719,
|
| 1129 |
+
487,
|
| 1130 |
+
831
|
| 1131 |
+
],
|
| 1132 |
+
"page_idx": 5
|
| 1133 |
+
},
|
| 1134 |
+
{
|
| 1135 |
+
"type": "text",
|
| 1136 |
+
"text": "Optimization Phase. During the optimization phase, P&R and E&G operate alternatively. P&R is tasked with decomposing a user query $Q$ into manageable sub-queries $q_{1}, q_{2}, \\ldots, q_{n}$ . These sub-queries facilitate a more focused retrieval of tools",
|
| 1137 |
+
"bbox": [
|
| 1138 |
+
112,
|
| 1139 |
+
839,
|
| 1140 |
+
487,
|
| 1141 |
+
917
|
| 1142 |
+
],
|
| 1143 |
+
"page_idx": 5
|
| 1144 |
+
},
|
| 1145 |
+
{
|
| 1146 |
+
"type": "text",
|
| 1147 |
+
"text": "from the tool set $D$ , ensuring that the process is aligned with specific aspects of the query.",
|
| 1148 |
+
"bbox": [
|
| 1149 |
+
507,
|
| 1150 |
+
84,
|
| 1151 |
+
880,
|
| 1152 |
+
116
|
| 1153 |
+
],
|
| 1154 |
+
"page_idx": 5
|
| 1155 |
+
},
|
| 1156 |
+
{
|
| 1157 |
+
"type": "text",
|
| 1158 |
+
"text": "During planning, the E&G paradigm is actively engaged in optimizing the descriptions of the tools within $D$ . This optimization, leveraging the LLM's extensive knowledge base, is particularly targeted at tools that exhibit underperformance in retrieval effectiveness. By enriching these tool descriptions, E&G significantly enhances the overall retrieval process, making the toolset more responsive and aligned with the practical demands of diverse queries.",
|
| 1159 |
+
"bbox": [
|
| 1160 |
+
507,
|
| 1161 |
+
117,
|
| 1162 |
+
882,
|
| 1163 |
+
277
|
| 1164 |
+
],
|
| 1165 |
+
"page_idx": 5
|
| 1166 |
+
},
|
| 1167 |
+
{
|
| 1168 |
+
"type": "text",
|
| 1169 |
+
"text": "Inference Phase. At the time of inference, the P&R paradigm remains active, utilizing the previously enriched and optimized tool descriptions. In this phase, the E&G paradigm ceases its operation and does not engage in any further optimization of tool descriptions. The refined tool descriptions, already enhanced by E&G, now serve as a comprehensive resource for the retriever to draw upon in response to the decomposed sub-queries.",
|
| 1170 |
+
"bbox": [
|
| 1171 |
+
507,
|
| 1172 |
+
285,
|
| 1173 |
+
882,
|
| 1174 |
+
430
|
| 1175 |
+
],
|
| 1176 |
+
"page_idx": 5
|
| 1177 |
+
},
|
| 1178 |
+
{
|
| 1179 |
+
"type": "text",
|
| 1180 |
+
"text": "5 Experiments",
|
| 1181 |
+
"text_level": 1,
|
| 1182 |
+
"bbox": [
|
| 1183 |
+
507,
|
| 1184 |
+
445,
|
| 1185 |
+
653,
|
| 1186 |
+
462
|
| 1187 |
+
],
|
| 1188 |
+
"page_idx": 5
|
| 1189 |
+
},
|
| 1190 |
+
{
|
| 1191 |
+
"type": "text",
|
| 1192 |
+
"text": "In this section, we evaluate the proposed PLUTo framework for tool retrieval and compare it with baseline methods. We will delve into the details of our experimental setup (§5.1), discuss the results (§5.2) obtained, and perform an ablation study to understand strengths of different components (§5.3). By executing the retrieved tools, we evaluate their correctness in addressing user queries to further validate our findings (§5.4). We present case studies to qualitatively evaluate the strength of PLUTo framework (§5.5).",
|
| 1193 |
+
"bbox": [
|
| 1194 |
+
507,
|
| 1195 |
+
473,
|
| 1196 |
+
882,
|
| 1197 |
+
650
|
| 1198 |
+
],
|
| 1199 |
+
"page_idx": 5
|
| 1200 |
+
},
|
| 1201 |
+
{
|
| 1202 |
+
"type": "text",
|
| 1203 |
+
"text": "5.1 Experiment Setup",
|
| 1204 |
+
"text_level": 1,
|
| 1205 |
+
"bbox": [
|
| 1206 |
+
507,
|
| 1207 |
+
665,
|
| 1208 |
+
697,
|
| 1209 |
+
681
|
| 1210 |
+
],
|
| 1211 |
+
"page_idx": 5
|
| 1212 |
+
},
|
| 1213 |
+
{
|
| 1214 |
+
"type": "text",
|
| 1215 |
+
"text": "Evaluation Protocol. We evaluate using three metrics to assess the effectiveness of our tool retrieval system. Recall (Rec) measures the proportion of relevant tools that are successfully retrieved by our system. High indicates that the system is effective in identifying a comprehensive set of relevant tools for a given query and is more likely to yield a solution to address the user query. We also report the Normalized Discounted Cumulative Gain (NDCG) that evaluates the relevance and quality of ranked search results. In addition, we report pass rate, an automatic evaluation metric of ToolBench (Qin et al., 2023). The pass rate measures a system's ability to successfully address the user query with",
|
| 1216 |
+
"bbox": [
|
| 1217 |
+
507,
|
| 1218 |
+
694,
|
| 1219 |
+
882,
|
| 1220 |
+
917
|
| 1221 |
+
],
|
| 1222 |
+
"page_idx": 5
|
| 1223 |
+
},
|
| 1224 |
+
{
|
| 1225 |
+
"type": "page_number",
|
| 1226 |
+
"text": "980",
|
| 1227 |
+
"bbox": [
|
| 1228 |
+
485,
|
| 1229 |
+
928,
|
| 1230 |
+
515,
|
| 1231 |
+
940
|
| 1232 |
+
],
|
| 1233 |
+
"page_idx": 5
|
| 1234 |
+
},
|
| 1235 |
+
{
|
| 1236 |
+
"type": "table",
|
| 1237 |
+
"img_path": "images/8bcb9d2f12227e1abaf9d0bc89e32b03c53a4a3b8b2971d07df5afbe060b28c6.jpg",
|
| 1238 |
+
"table_caption": [],
|
| 1239 |
+
"table_footnote": [],
|
| 1240 |
+
"table_body": "<table><tr><td rowspan=\"2\">Model</td><td rowspan=\"2\">Retriever</td><td colspan=\"2\">Non-Finetuned</td><td colspan=\"2\">Finetuned</td></tr><tr><td>Rec</td><td>NDCG</td><td>Rec</td><td>NDCG</td></tr><tr><td>BM25</td><td>-</td><td>18.82</td><td>37.44</td><td>-</td><td>-</td></tr><tr><td rowspan=\"2\">ToolRetriever</td><td>DPR†</td><td>19.58</td><td>50.98</td><td>27.80</td><td>71.21</td></tr><tr><td>Contriever</td><td>31.78</td><td>74.70</td><td>42.77</td><td>79.16</td></tr><tr><td rowspan=\"2\">PLUTO</td><td>DPR</td><td>36.65</td><td>75.10</td><td>43.27</td><td>79.93</td></tr><tr><td>Contriever</td><td>46.57</td><td>82.93</td><td>48.47</td><td>84.73</td></tr></table>",
|
| 1241 |
+
"bbox": [
|
| 1242 |
+
221,
|
| 1243 |
+
80,
|
| 1244 |
+
776,
|
| 1245 |
+
218
|
| 1246 |
+
],
|
| 1247 |
+
"page_idx": 6
|
| 1248 |
+
},
|
| 1249 |
+
{
|
| 1250 |
+
"type": "text",
|
| 1251 |
+
"text": "Table 1: This table compares various tool retrieval models using Recall and NDCG metrics in both Non-Finetuned and Finetuned settings. It includes an ablation study on the impact of using different retrievers, demonstrating the generalizability of PLUTO. $\\dagger$ indicates the previous SOTA implementation, as specified in (Qin et al., 2023).",
|
| 1252 |
+
"bbox": [
|
| 1253 |
+
112,
|
| 1254 |
+
228,
|
| 1255 |
+
882,
|
| 1256 |
+
272
|
| 1257 |
+
],
|
| 1258 |
+
"page_idx": 6
|
| 1259 |
+
},
|
| 1260 |
+
{
|
| 1261 |
+
"type": "text",
|
| 1262 |
+
"text": "a retrieved subset of tools in limited budgets by interacting with real-world RESTful APIs (§5.4).",
|
| 1263 |
+
"bbox": [
|
| 1264 |
+
112,
|
| 1265 |
+
297,
|
| 1266 |
+
485,
|
| 1267 |
+
328
|
| 1268 |
+
],
|
| 1269 |
+
"page_idx": 6
|
| 1270 |
+
},
|
| 1271 |
+
{
|
| 1272 |
+
"type": "text",
|
| 1273 |
+
"text": "To test the generalizability of our approach, we benchmark the tool retrieval performance under a Non-Finetuned setting, where we directly apply an off-the-shelf retriever model to comprehensively showcase PLUTO's adaptivity. To test the model's practical applicability, we also benchmark retrieval performance under Finetuned setting, where we finetune the retriever model on domain-specific knowledge. We evaluate 500 user queries for each setting.",
|
| 1274 |
+
"bbox": [
|
| 1275 |
+
112,
|
| 1276 |
+
330,
|
| 1277 |
+
485,
|
| 1278 |
+
489
|
| 1279 |
+
],
|
| 1280 |
+
"page_idx": 6
|
| 1281 |
+
},
|
| 1282 |
+
{
|
| 1283 |
+
"type": "text",
|
| 1284 |
+
"text": "Baselines. We compare our system against several representative retrieval methods. These include: (1) BM25: a widely-used probabilistic retrieval framework, calculating the relevance of documents to a query based on the frequency of query terms in each document; (2) ToolRetriever: a neural retrieval approach that achieves the current state-of-the-art (SOTA) performance on Tool-Bench retrieval task (Qin et al., 2023). To understand the flexibility of our framework, we benchmark PLUTO's performance when incorporated with different retrievers. Specifically, we use DPR (Karpukhin et al., 2020) and Contriever (Izacard et al., 2022).",
|
| 1285 |
+
"bbox": [
|
| 1286 |
+
112,
|
| 1287 |
+
498,
|
| 1288 |
+
489,
|
| 1289 |
+
722
|
| 1290 |
+
],
|
| 1291 |
+
"page_idx": 6
|
| 1292 |
+
},
|
| 1293 |
+
{
|
| 1294 |
+
"type": "text",
|
| 1295 |
+
"text": "Implementation Details. For the implementation of PLUTo, we use DSPy framework (Khattab et al., 2023) to facilitate efficient interaction between retriever and LLM. We choose $\\mathrm{ChatGPT}^3$ as our main LLM for both P&R and E&G. The maximum round for the E&G module is set to 5. For ToolRetriever, we retrieve top-5 tools using the respective retrievers. The data is divided into 70-15-15 splits for training, development, and testing, respectively. For our experiment, we randomly select 500 data",
|
| 1296 |
+
"bbox": [
|
| 1297 |
+
112,
|
| 1298 |
+
730,
|
| 1299 |
+
489,
|
| 1300 |
+
890
|
| 1301 |
+
],
|
| 1302 |
+
"page_idx": 6
|
| 1303 |
+
},
|
| 1304 |
+
{
|
| 1305 |
+
"type": "text",
|
| 1306 |
+
"text": "samples from the test split for each setting mentioned in Evaluation Protocol section.",
|
| 1307 |
+
"bbox": [
|
| 1308 |
+
507,
|
| 1309 |
+
297,
|
| 1310 |
+
882,
|
| 1311 |
+
326
|
| 1312 |
+
],
|
| 1313 |
+
"page_idx": 6
|
| 1314 |
+
},
|
| 1315 |
+
{
|
| 1316 |
+
"type": "text",
|
| 1317 |
+
"text": "For the Finetuned settings, we finetune the neural dense retriever model by including negative samples during in-batch training (Karpukhin et al., 2020). For each positive pair of query $q_{j}$ and its relevant tool $d_{j}^{+}$ , we include $n$ negative tools as negative samples. We use a cross-entropy loss with softmax function over the batch $B$ :",
|
| 1318 |
+
"bbox": [
|
| 1319 |
+
507,
|
| 1320 |
+
330,
|
| 1321 |
+
882,
|
| 1322 |
+
441
|
| 1323 |
+
],
|
| 1324 |
+
"page_idx": 6
|
| 1325 |
+
},
|
| 1326 |
+
{
|
| 1327 |
+
"type": "equation",
|
| 1328 |
+
"text": "\n$$\nL = - \\frac {1}{B} \\sum_ {j = 1} ^ {B} \\log \\left(\\frac {e ^ {\\mathbf {q} _ {j} \\cdot \\mathbf {d} _ {j} ^ {+}}}{e ^ {\\mathbf {q} _ {j} \\cdot \\mathbf {d} _ {j} ^ {+}} + \\sum_ {i = 1} ^ {n} e ^ {\\mathbf {q} _ {j} \\cdot \\mathbf {d} _ {i j} ^ {-}}}\\right) (5)\n$$\n",
|
| 1329 |
+
"text_format": "latex",
|
| 1330 |
+
"bbox": [
|
| 1331 |
+
519,
|
| 1332 |
+
451,
|
| 1333 |
+
882,
|
| 1334 |
+
498
|
| 1335 |
+
],
|
| 1336 |
+
"page_idx": 6
|
| 1337 |
+
},
|
| 1338 |
+
{
|
| 1339 |
+
"type": "text",
|
| 1340 |
+
"text": "5.2 Results",
|
| 1341 |
+
"text_level": 1,
|
| 1342 |
+
"bbox": [
|
| 1343 |
+
507,
|
| 1344 |
+
510,
|
| 1345 |
+
613,
|
| 1346 |
+
524
|
| 1347 |
+
],
|
| 1348 |
+
"page_idx": 6
|
| 1349 |
+
},
|
| 1350 |
+
{
|
| 1351 |
+
"type": "text",
|
| 1352 |
+
"text": "The experimental results, detailed in Tab. 1, underscore the significant advantages of our proposed PLUTO models. In the Non-Finetuned setting, PLUTO with Contriever showcases remarkable scores, achieving $46.57\\%$ in Recall, outperforming the best baseline by 9.92 points. This result shows the model's robust ability to identify relevant tools without the necessity for specific finetuning, a critical advantage in dynamic tool retrieval environments. We observe a consistent trend in the Finetuned setting, with the model scoring $48.47\\%$ in Recall, demonstrating a 5.7 points lead when compared with the Contriever baseline. This indicates that our model is highly effective on retrieving relevant tools.",
|
| 1353 |
+
"bbox": [
|
| 1354 |
+
505,
|
| 1355 |
+
532,
|
| 1356 |
+
884,
|
| 1357 |
+
772
|
| 1358 |
+
],
|
| 1359 |
+
"page_idx": 6
|
| 1360 |
+
},
|
| 1361 |
+
{
|
| 1362 |
+
"type": "text",
|
| 1363 |
+
"text": "Furthermore, our model outperforms baselines across all settings on NDCG scores. In the Non-Finetuned setting, our model leads by 8.23 points. In the Finetuned setting, our model beats the baseline by 4.57 points. These results reflect PLUTO not only the relevance of the tools retrieved but also their ranking in order of utility and applicability to the user's query, which is a indication to the model's nuanced understanding of tool utility.",
|
| 1364 |
+
"bbox": [
|
| 1365 |
+
507,
|
| 1366 |
+
774,
|
| 1367 |
+
882,
|
| 1368 |
+
917
|
| 1369 |
+
],
|
| 1370 |
+
"page_idx": 6
|
| 1371 |
+
},
|
| 1372 |
+
{
|
| 1373 |
+
"type": "page_footnote",
|
| 1374 |
+
"text": "3OpenAI. (2023). ChatGPT (November 21st version).",
|
| 1375 |
+
"bbox": [
|
| 1376 |
+
134,
|
| 1377 |
+
903,
|
| 1378 |
+
465,
|
| 1379 |
+
917
|
| 1380 |
+
],
|
| 1381 |
+
"page_idx": 6
|
| 1382 |
+
},
|
| 1383 |
+
{
|
| 1384 |
+
"type": "page_number",
|
| 1385 |
+
"text": "981",
|
| 1386 |
+
"bbox": [
|
| 1387 |
+
485,
|
| 1388 |
+
928,
|
| 1389 |
+
512,
|
| 1390 |
+
940
|
| 1391 |
+
],
|
| 1392 |
+
"page_idx": 6
|
| 1393 |
+
},
|
| 1394 |
+
{
|
| 1395 |
+
"type": "image",
|
| 1396 |
+
"img_path": "images/3f0c0e3c9f120ff4f5883061fe889e4ca2f46259b784fbb5ab7face50d071d14.jpg",
|
| 1397 |
+
"image_caption": [
|
| 1398 |
+
"Figure 3: Performance comparison among different LLMs for Plan-and-Retrieve paradigm using Recall score. The backbone retriever is DPR."
|
| 1399 |
+
],
|
| 1400 |
+
"image_footnote": [],
|
| 1401 |
+
"bbox": [
|
| 1402 |
+
126,
|
| 1403 |
+
83,
|
| 1404 |
+
492,
|
| 1405 |
+
291
|
| 1406 |
+
],
|
| 1407 |
+
"page_idx": 7
|
| 1408 |
+
},
|
| 1409 |
+
{
|
| 1410 |
+
"type": "text",
|
| 1411 |
+
"text": "To show the generalizability of PLUTO, we select different retrievers for the Plan-and-Retrieve (P&R) paradigm. We observe that PLUTO has synergy with both DPR and Contriever models, regardless of their different architecture, that achieves higher Recall and NDCG scores than the baselines. This indicates that PLUTO is a plug-n-play and retriever-agnostic framework that features effectiveness and flexibility under different circumstances.",
|
| 1412 |
+
"bbox": [
|
| 1413 |
+
110,
|
| 1414 |
+
365,
|
| 1415 |
+
489,
|
| 1416 |
+
511
|
| 1417 |
+
],
|
| 1418 |
+
"page_idx": 7
|
| 1419 |
+
},
|
| 1420 |
+
{
|
| 1421 |
+
"type": "text",
|
| 1422 |
+
"text": "The experimental results highlight the superior performance of PLUTO framework. Together, the P&R and E&G paradigms establish a dynamic and effective framework, which not only accurately interprets and responds to user queries but also maintains an evolving understanding of tool functionality. This duality ensures that PLUTO remains highly effective and adaptable in various setups, consistently aligning user needs with the most suitable tools and their capabilities.",
|
| 1423 |
+
"bbox": [
|
| 1424 |
+
112,
|
| 1425 |
+
512,
|
| 1426 |
+
489,
|
| 1427 |
+
671
|
| 1428 |
+
],
|
| 1429 |
+
"page_idx": 7
|
| 1430 |
+
},
|
| 1431 |
+
{
|
| 1432 |
+
"type": "text",
|
| 1433 |
+
"text": "5.3 Ablation Study",
|
| 1434 |
+
"text_level": 1,
|
| 1435 |
+
"bbox": [
|
| 1436 |
+
112,
|
| 1437 |
+
686,
|
| 1438 |
+
280,
|
| 1439 |
+
702
|
| 1440 |
+
],
|
| 1441 |
+
"page_idx": 7
|
| 1442 |
+
},
|
| 1443 |
+
{
|
| 1444 |
+
"type": "text",
|
| 1445 |
+
"text": "As shown in Fig. 3, we observe that both the Llama2 (Touvron et al., 2023) and ChatGPT variants show considerable improvements in tool retrieval capabilities, with notable increases in Recall and NDCG scores compared to baseline models. This consistent improvement across different LLM integrations conclusively demonstrates the robustness and effectiveness of our method. This finding is particularly important as it suggests that our approach is not overly reliant on any single LLM, thereby showcasing the broad applicability and potential of our methods in diverse settings.",
|
| 1446 |
+
"bbox": [
|
| 1447 |
+
112,
|
| 1448 |
+
709,
|
| 1449 |
+
489,
|
| 1450 |
+
901
|
| 1451 |
+
],
|
| 1452 |
+
"page_idx": 7
|
| 1453 |
+
},
|
| 1454 |
+
{
|
| 1455 |
+
"type": "text",
|
| 1456 |
+
"text": "As shown in Tab. 2, the ablation experiment on",
|
| 1457 |
+
"bbox": [
|
| 1458 |
+
132,
|
| 1459 |
+
903,
|
| 1460 |
+
487,
|
| 1461 |
+
917
|
| 1462 |
+
],
|
| 1463 |
+
"page_idx": 7
|
| 1464 |
+
},
|
| 1465 |
+
{
|
| 1466 |
+
"type": "table",
|
| 1467 |
+
"img_path": "images/53659baa8beb7a577e8b80263628c239e6c0f6f78e6d293e77c05b0c69b2de01.jpg",
|
| 1468 |
+
"table_caption": [],
|
| 1469 |
+
"table_footnote": [],
|
| 1470 |
+
"table_body": "<table><tr><td rowspan=\"2\">Model</td><td colspan=\"2\">Non-Finetuned</td><td colspan=\"2\">Finetuned</td></tr><tr><td>Rec</td><td>NDCG</td><td>Rec</td><td>NDCG</td></tr><tr><td>PLUTO-full</td><td>46.57</td><td>82.93</td><td>48.47</td><td>84.73</td></tr><tr><td>- w/o E&G</td><td>42.55</td><td>80.70</td><td>44.90</td><td>81.10</td></tr><tr><td>- w/o P&R</td><td>38.12</td><td>77.60</td><td>47.07</td><td>81.90</td></tr></table>",
|
| 1471 |
+
"bbox": [
|
| 1472 |
+
510,
|
| 1473 |
+
82,
|
| 1474 |
+
887,
|
| 1475 |
+
186
|
| 1476 |
+
],
|
| 1477 |
+
"page_idx": 7
|
| 1478 |
+
},
|
| 1479 |
+
{
|
| 1480 |
+
"type": "text",
|
| 1481 |
+
"text": "Table 2: Ablation Study.",
|
| 1482 |
+
"bbox": [
|
| 1483 |
+
610,
|
| 1484 |
+
196,
|
| 1485 |
+
779,
|
| 1486 |
+
211
|
| 1487 |
+
],
|
| 1488 |
+
"page_idx": 7
|
| 1489 |
+
},
|
| 1490 |
+
{
|
| 1491 |
+
"type": "text",
|
| 1492 |
+
"text": "the PLUTO- full, focusing on the removal of Edit- and-Ground (E&G) and Plan-and-Retrieve (P&R) components, provides intriguing insights into their roles in tool retrieval tasks. Generally, removing E&G leads to decreased Recall and NDCG scores across settings, underscoring its critical role in enhancing what the model seeks to retrieve. On the other hand, excluding P&R tends to diminish more of the model's performance in Non-Finetuned settings, particularly impacting Recall. This highlights P&R's importance in effectively retrieving relevant information. A comparative analysis reveals that the full implementation of PLUTOChatGPT, incorporating both E&G and P&R, consistently delivers strong performance across all metrics and settings, emphasizing the synergistic strength of these components. The variants of the model, lacking either E&G or P&R, provide valuable insights into the unique contributions of each component to the model's overall efficacy.",
|
| 1493 |
+
"bbox": [
|
| 1494 |
+
507,
|
| 1495 |
+
237,
|
| 1496 |
+
884,
|
| 1497 |
+
558
|
| 1498 |
+
],
|
| 1499 |
+
"page_idx": 7
|
| 1500 |
+
},
|
| 1501 |
+
{
|
| 1502 |
+
"type": "text",
|
| 1503 |
+
"text": "5.4 Execution Pass Rate",
|
| 1504 |
+
"text_level": 1,
|
| 1505 |
+
"bbox": [
|
| 1506 |
+
507,
|
| 1507 |
+
571,
|
| 1508 |
+
717,
|
| 1509 |
+
586
|
| 1510 |
+
],
|
| 1511 |
+
"page_idx": 7
|
| 1512 |
+
},
|
| 1513 |
+
{
|
| 1514 |
+
"type": "text",
|
| 1515 |
+
"text": "We evaluate the pass rate of the execution schema generated by ChatGPT using the DFSDT approach (Qin et al., 2023). Using the ToolEval package, we assessed two distinct retrieval tools, ToolRetriever and PLUTO, for their correctness and efficiency in responding to user queries. The PLUTO achieves $72.3\\%$ for pass rate, while the previous SOTA system ToolRetriever scored $69.3\\%$ .",
|
| 1516 |
+
"bbox": [
|
| 1517 |
+
507,
|
| 1518 |
+
594,
|
| 1519 |
+
882,
|
| 1520 |
+
721
|
| 1521 |
+
],
|
| 1522 |
+
"page_idx": 7
|
| 1523 |
+
},
|
| 1524 |
+
{
|
| 1525 |
+
"type": "text",
|
| 1526 |
+
"text": "This experiment's findings emphasize the pivotal role of advanced retrieval strategies in enhancing user query response quality. The improvement gained during the retrieval phase, such as higher accuracy and relevance in responses, significantly contribute to the downstream tasks.",
|
| 1527 |
+
"bbox": [
|
| 1528 |
+
507,
|
| 1529 |
+
722,
|
| 1530 |
+
882,
|
| 1531 |
+
818
|
| 1532 |
+
],
|
| 1533 |
+
"page_idx": 7
|
| 1534 |
+
},
|
| 1535 |
+
{
|
| 1536 |
+
"type": "text",
|
| 1537 |
+
"text": "5.5 Case Study",
|
| 1538 |
+
"text_level": 1,
|
| 1539 |
+
"bbox": [
|
| 1540 |
+
507,
|
| 1541 |
+
833,
|
| 1542 |
+
645,
|
| 1543 |
+
848
|
| 1544 |
+
],
|
| 1545 |
+
"page_idx": 7
|
| 1546 |
+
},
|
| 1547 |
+
{
|
| 1548 |
+
"type": "text",
|
| 1549 |
+
"text": "As shown in Tab. 3, we compare our PLUTO against the ToolRetriever baseline to underscore PLUTO's proficiency in retrieving relevant tools for diverse user queries. Through selected exam",
|
| 1550 |
+
"bbox": [
|
| 1551 |
+
507,
|
| 1552 |
+
854,
|
| 1553 |
+
882,
|
| 1554 |
+
917
|
| 1555 |
+
],
|
| 1556 |
+
"page_idx": 7
|
| 1557 |
+
},
|
| 1558 |
+
{
|
| 1559 |
+
"type": "page_number",
|
| 1560 |
+
"text": "982",
|
| 1561 |
+
"bbox": [
|
| 1562 |
+
485,
|
| 1563 |
+
928,
|
| 1564 |
+
515,
|
| 1565 |
+
940
|
| 1566 |
+
],
|
| 1567 |
+
"page_idx": 7
|
| 1568 |
+
},
|
| 1569 |
+
{
|
| 1570 |
+
"type": "table",
|
| 1571 |
+
"img_path": "images/42001145c2cf12cf9f62cacbfd14f5102b979926abba36983cea274e87ef4b9e.jpg",
|
| 1572 |
+
"table_caption": [],
|
| 1573 |
+
"table_footnote": [],
|
| 1574 |
+
"table_body": "<table><tr><td>Question</td><td>Gold Answer</td><td>PLUTo Answer</td><td>ToolRetriever Answer</td></tr><tr><td>I'm planning a weekend getaway with my partner and I want to surprise them with a romantic playlist. Could you fetch the reels and posts from romantic music artists on Instagram? Additionally, could you search for books about love and relationships on Open Library?</td><td>Instagram Reels and post Downloader, Open Library</td><td>Instagram Reels and post Downloader, Instagram, Open Library, Instagram Downloader</td><td>Love Quotes by LoveMelon, The Love Calculator, Book Finder, fb-video-reels, Reading Home APIs</td></tr><tr><td>I'm planning a family movie night and I need a movie recommendation. Can you fetch the trending images for movie posters and provide me with the details of the most popular movie from the past month? Also, check the status of the movie session and download the completed movie.</td><td>Magisto, Bing Image Search</td><td>Magisto, gogoanimate-data-api, Youtube video info, Advanced Movie Search, Image Service, Memes, Bing Image Search, Netflix Data</td><td>TikTok Info, Tiktok Video Feature Summary, TikTok Full Video Info, TikTok Downloader - Download Videos without watermark</td></tr><tr><td>I'm a music blogger and I'm searching for interesting radio stations to feature on my website. Can you help me find radio stations that play a mix of genres? Also, provide me with the details of the master for the track with the ID '987654' in the LANDR Mastering.</td><td>LANDR Mastering v1, 50K Radio Stations</td><td>GMC Radio, LANDR Mastering v1, 50K Radio Stations, 60K Radio Stations</td><td>LANDR Mastering v1, Spotify_v2, TuneIn, Spotify Scaper, Spotify_v3</td></tr></table>",
|
| 1575 |
+
"bbox": [
|
| 1576 |
+
115,
|
| 1577 |
+
80,
|
| 1578 |
+
890,
|
| 1579 |
+
370
|
| 1580 |
+
],
|
| 1581 |
+
"page_idx": 8
|
| 1582 |
+
},
|
| 1583 |
+
{
|
| 1584 |
+
"type": "text",
|
| 1585 |
+
"text": "Table 3: Performance comparison of PLUTo and ToolRetriever in retrieving relevant tools for user queries. This table demonstrates the effectiveness of PLUTo in closely aligning with the gold standard answers for diverse queries, showcasing its superior ability to understand and fulfill user needs compared to ToolRetriever. The highlighted tools are the correctly retrieved ones.",
|
| 1586 |
+
"bbox": [
|
| 1587 |
+
112,
|
| 1588 |
+
380,
|
| 1589 |
+
884,
|
| 1590 |
+
439
|
| 1591 |
+
],
|
| 1592 |
+
"page_idx": 8
|
| 1593 |
+
},
|
| 1594 |
+
{
|
| 1595 |
+
"type": "text",
|
| 1596 |
+
"text": "plies, PLUTO's superior understanding and comprehensive response capabilities are highlighted, especially in scenarios requiring nuanced tool selection.",
|
| 1597 |
+
"bbox": [
|
| 1598 |
+
112,
|
| 1599 |
+
463,
|
| 1600 |
+
489,
|
| 1601 |
+
525
|
| 1602 |
+
],
|
| 1603 |
+
"page_idx": 8
|
| 1604 |
+
},
|
| 1605 |
+
{
|
| 1606 |
+
"type": "text",
|
| 1607 |
+
"text": "For instance, for organizing a romantic weekend in the first example, PLUTO not only identifies all essential tools but also enhances the search with additional relevant resources, showcasing its broad and accurate grasp of user needs. This is contrasted with ToolRetriever, where the retrieved tools are only similar on a surface level (the majority of the tools contain the term \"Love\") and fail to understand the user's intent. This emphasizes PLUTO's improved relevance and precision in tool retrieval. We also showcase the descriptions of tools before and after optimization by the Edit-and-Ground paradigm in Tab. 4.",
|
| 1608 |
+
"bbox": [
|
| 1609 |
+
112,
|
| 1610 |
+
527,
|
| 1611 |
+
489,
|
| 1612 |
+
736
|
| 1613 |
+
],
|
| 1614 |
+
"page_idx": 8
|
| 1615 |
+
},
|
| 1616 |
+
{
|
| 1617 |
+
"type": "text",
|
| 1618 |
+
"text": "By leveraging the Plan-and-Retieve (P&R) and Edit-and-Ground (E&G) components, PLUTo marks a significant advancement over conventional retrieval systems, demonstrating its adaptability and utility in fulfilling diverse user requirements.",
|
| 1619 |
+
"bbox": [
|
| 1620 |
+
112,
|
| 1621 |
+
737,
|
| 1622 |
+
489,
|
| 1623 |
+
818
|
| 1624 |
+
],
|
| 1625 |
+
"page_idx": 8
|
| 1626 |
+
},
|
| 1627 |
+
{
|
| 1628 |
+
"type": "text",
|
| 1629 |
+
"text": "6 Conclusion",
|
| 1630 |
+
"text_level": 1,
|
| 1631 |
+
"bbox": [
|
| 1632 |
+
112,
|
| 1633 |
+
829,
|
| 1634 |
+
247,
|
| 1635 |
+
844
|
| 1636 |
+
],
|
| 1637 |
+
"page_idx": 8
|
| 1638 |
+
},
|
| 1639 |
+
{
|
| 1640 |
+
"type": "text",
|
| 1641 |
+
"text": "We introduced PLUTO, a framework composed of the Plan-and-Retieve and Edit-and-Ground paradigms, which marks a distinctive departure from traditional methodologies, setting a new stan",
|
| 1642 |
+
"bbox": [
|
| 1643 |
+
112,
|
| 1644 |
+
854,
|
| 1645 |
+
489,
|
| 1646 |
+
919
|
| 1647 |
+
],
|
| 1648 |
+
"page_idx": 8
|
| 1649 |
+
},
|
| 1650 |
+
{
|
| 1651 |
+
"type": "text",
|
| 1652 |
+
"text": "dard for tool retrieval. The empirical results illustrate the superiority of PLUTO across critical retrieval performance metrics as well as pass rate in real-world tool-use evaluation. These metrics collectively attest to the model's efficacy in identifying relevant tools and successfully addressing complex user queries. We hope the adaptability and efficiency of PLUTO can empower a multitude of domains where accurate and timely retrieval of tools is paramount. From autonomous scientific discovery to software development, the potential applications are as diverse as they are impactful.",
|
| 1653 |
+
"bbox": [
|
| 1654 |
+
507,
|
| 1655 |
+
463,
|
| 1656 |
+
884,
|
| 1657 |
+
656
|
| 1658 |
+
],
|
| 1659 |
+
"page_idx": 8
|
| 1660 |
+
},
|
| 1661 |
+
{
|
| 1662 |
+
"type": "text",
|
| 1663 |
+
"text": "Acknowledgement",
|
| 1664 |
+
"text_level": 1,
|
| 1665 |
+
"bbox": [
|
| 1666 |
+
509,
|
| 1667 |
+
671,
|
| 1668 |
+
672,
|
| 1669 |
+
687
|
| 1670 |
+
],
|
| 1671 |
+
"page_idx": 8
|
| 1672 |
+
},
|
| 1673 |
+
{
|
| 1674 |
+
"type": "text",
|
| 1675 |
+
"text": "We appreciate the reviewers for their insightful comments and suggestions. Tenghao Huang and Muhao Chen were supported by an Amazon Research Award, a Keston Exploratory Research Award, and the NSF Grant ITE 2333736.",
|
| 1676 |
+
"bbox": [
|
| 1677 |
+
507,
|
| 1678 |
+
699,
|
| 1679 |
+
884,
|
| 1680 |
+
778
|
| 1681 |
+
],
|
| 1682 |
+
"page_idx": 8
|
| 1683 |
+
},
|
| 1684 |
+
{
|
| 1685 |
+
"type": "text",
|
| 1686 |
+
"text": "Limitation",
|
| 1687 |
+
"text_level": 1,
|
| 1688 |
+
"bbox": [
|
| 1689 |
+
509,
|
| 1690 |
+
794,
|
| 1691 |
+
606,
|
| 1692 |
+
809
|
| 1693 |
+
],
|
| 1694 |
+
"page_idx": 8
|
| 1695 |
+
},
|
| 1696 |
+
{
|
| 1697 |
+
"type": "text",
|
| 1698 |
+
"text": "Our study, while enhancing tool learning by planning and editing strategies, is notably constrained by its reliance on English language datasets. This focus on English limits the model's applicability to other languages with distinct syntax and semantics and confines its evaluation to specific English data",
|
| 1699 |
+
"bbox": [
|
| 1700 |
+
507,
|
| 1701 |
+
822,
|
| 1702 |
+
882,
|
| 1703 |
+
919
|
| 1704 |
+
],
|
| 1705 |
+
"page_idx": 8
|
| 1706 |
+
},
|
| 1707 |
+
{
|
| 1708 |
+
"type": "page_number",
|
| 1709 |
+
"text": "983",
|
| 1710 |
+
"bbox": [
|
| 1711 |
+
485,
|
| 1712 |
+
928,
|
| 1713 |
+
515,
|
| 1714 |
+
940
|
| 1715 |
+
],
|
| 1716 |
+
"page_idx": 8
|
| 1717 |
+
},
|
| 1718 |
+
{
|
| 1719 |
+
"type": "text",
|
| 1720 |
+
"text": "sources, leaving its performance on diverse language setups unexplored. Future research should address this limitation by developing multilingual capabilities and conducting evaluations across varied data sources.",
|
| 1721 |
+
"bbox": [
|
| 1722 |
+
112,
|
| 1723 |
+
84,
|
| 1724 |
+
489,
|
| 1725 |
+
162
|
| 1726 |
+
],
|
| 1727 |
+
"page_idx": 9
|
| 1728 |
+
},
|
| 1729 |
+
{
|
| 1730 |
+
"type": "text",
|
| 1731 |
+
"text": "The Edit-and-Ground (E&G) may be executed to further optimize the descriptions. However, due to the cost, we currently set a relatively loose stop criterion that is enough to demonstrate the effectiveness of the presented method.",
|
| 1732 |
+
"bbox": [
|
| 1733 |
+
112,
|
| 1734 |
+
165,
|
| 1735 |
+
489,
|
| 1736 |
+
246
|
| 1737 |
+
],
|
| 1738 |
+
"page_idx": 9
|
| 1739 |
+
},
|
| 1740 |
+
{
|
| 1741 |
+
"type": "text",
|
| 1742 |
+
"text": "Ethical Consideration",
|
| 1743 |
+
"text_level": 1,
|
| 1744 |
+
"bbox": [
|
| 1745 |
+
114,
|
| 1746 |
+
259,
|
| 1747 |
+
309,
|
| 1748 |
+
274
|
| 1749 |
+
],
|
| 1750 |
+
"page_idx": 9
|
| 1751 |
+
},
|
| 1752 |
+
{
|
| 1753 |
+
"type": "text",
|
| 1754 |
+
"text": "In conducting this research, we have adhered to ethical guidelines and legal norms to ensure responsible data usage. The data used in this study was obtained from public datasets, specifically Tool-Bench. We ensured not to violate any terms of service of the data sources.",
|
| 1755 |
+
"bbox": [
|
| 1756 |
+
112,
|
| 1757 |
+
286,
|
| 1758 |
+
490,
|
| 1759 |
+
381
|
| 1760 |
+
],
|
| 1761 |
+
"page_idx": 9
|
| 1762 |
+
},
|
| 1763 |
+
{
|
| 1764 |
+
"type": "text",
|
| 1765 |
+
"text": "References",
|
| 1766 |
+
"text_level": 1,
|
| 1767 |
+
"bbox": [
|
| 1768 |
+
114,
|
| 1769 |
+
411,
|
| 1770 |
+
213,
|
| 1771 |
+
426
|
| 1772 |
+
],
|
| 1773 |
+
"page_idx": 9
|
| 1774 |
+
},
|
| 1775 |
+
{
|
| 1776 |
+
"type": "list",
|
| 1777 |
+
"sub_type": "ref_text",
|
| 1778 |
+
"list_items": [
|
| 1779 |
+
"Sebastien Bubeck, Varun Chandrasekaran, Ronen Eldan, Johannes Gehrke, Eric Horvitz, Ece Kamar, Peter Lee, Yin Tat Lee, Yuanzhi Li, Scott Lundberg, et al. 2023. Sparks of artificial general intelligence: Early experiments with gpt-4. arXiv preprint arXiv:2303.12712.",
|
| 1780 |
+
"Danqi Chen, Adam Fisch, Jason Weston, and Antoine Bordes. 2017. Reading wikipedia to answer open-domain questions. In 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, pages 1870-1879. Association for Computational Linguistics (ACL).",
|
| 1781 |
+
"Tanmay Gupta and Aniruddha Kembhavi. 2023. Visual programming: Compositional visual reasoning without training. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 14953-14962.",
|
| 1782 |
+
"Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Mingwei Chang. 2020. Retrieval augmented language model pre-training. In International conference on machine learning, pages 3929-3938. PMLR.",
|
| 1783 |
+
"Shibo Hao, Tianyang Liu, Zhen Wang, and Zhiting Hu. 2023. Toolkengpt: Augmenting frozen language models with massive tools via tool embeddings.",
|
| 1784 |
+
"Cheng-Yu Hsieh, Si-An Chen, Chun-Liang Li, Yasuhisa Fujii, Alexander Ratner, Chen-Yu Lee, Ranjay Krishna, and Tomas Pfister. 2023. Tool documentation enables zero-shot tool-usage with large language models. arXiv preprint arXiv:2308.00675.",
|
| 1785 |
+
"Gautier Izacard, Mathilde Caron, Lucas Hosseini, Sebastian Riedel, Piotr Bojanowski, Armand Joulin, and"
|
| 1786 |
+
],
|
| 1787 |
+
"bbox": [
|
| 1788 |
+
115,
|
| 1789 |
+
435,
|
| 1790 |
+
489,
|
| 1791 |
+
917
|
| 1792 |
+
],
|
| 1793 |
+
"page_idx": 9
|
| 1794 |
+
},
|
| 1795 |
+
{
|
| 1796 |
+
"type": "list",
|
| 1797 |
+
"sub_type": "ref_text",
|
| 1798 |
+
"list_items": [
|
| 1799 |
+
"Edouard Grave. 2022. Unsupervised dense information retrieval with contrastive learning. Transactions on Machine Learning Research.",
|
| 1800 |
+
"Zhengbao Jiang, Frank F Xu, Luyu Gao, Zhiqing Sun, Qian Liu, Jane Dwivedi-Yu, Yiming Yang, Jamie Callan, and Graham Neubig. 2023. Active retrieval augmented generation. arXiv preprint arXiv:2305.06983.",
|
| 1801 |
+
"Qiao Jin, Yifan Yang, Qingyu Chen, and Zhiyong Lu. 2023. Genegpt: Augmenting large language models with domain tools for improved access to biomedical information.",
|
| 1802 |
+
"Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih. 2020. Dense passage retrieval for open-domain question answering. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 6769-6781, Online. Association for Computational Linguistics.",
|
| 1803 |
+
"Omar Khattab, Arnav Singhvi, Paridhi Maheshwari, Zhiyuan Zhang, Keshav Santhanam, Sri Vardhamanan, Saiful Haq, Ashutosh Sharma, Thomas T. Joshi, Hanna Moazam, Heather Miller, Matei Zaharia, and Christopher Potts. 2023. Dspy: Compiling declarative language model calls into self-improving pipelines.",
|
| 1804 |
+
"Mandar Kulkarni, Kyung Kim, Nikesh Garera, and Anusua Trivedi. 2023. Label efficient semi-supervised conversational intent classification. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 5: Industry Track), pages 96-102, Toronto, Canada. Association for Computational Linguistics.",
|
| 1805 |
+
"Kenton Lee, Ming-Wei Chang, and Kristina Toutanova. 2019. Latent retrieval for weakly supervised open domain question answering. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 6086–6096, Florence, Italy. Association for Computational Linguistics.",
|
| 1806 |
+
"Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Kuttler, Mike Lewis, Wen tau Yih, Tim Rocktäschel, Sebastian Riedel, and Douwe Kiela. 2021. Retrieval-augmented generation for knowledge-intensive nlp tasks.",
|
| 1807 |
+
"Minghao Li, Yingxiu Zhao, Bowen Yu, Feifan Song, Hangyu Li, Haiyang Yu, Zhoujun Li, Fei Huang, and Yongbin Li. 2023. Api-bank: A comprehensive benchmark for tool-augmented llms.",
|
| 1808 |
+
"Pan Lu, Baolin Peng, Hao Cheng, Michel Galley, Kai-Wei Chang, Ying Nian Wu, Song-Chun Zhu, and Jianfeng Gao. 2023. Chameleon: Plug-and-play compositional reasoning with large language models.",
|
| 1809 |
+
"Pan Lu, Liang Qiu, Kai-Wei Chang, Ying Nian Wu, Song-Chun Zhu, Tanmay Rajpurohit, Peter Clark, and Ashwin Kalyan. 2022. Dynamic prompt learning"
|
| 1810 |
+
],
|
| 1811 |
+
"bbox": [
|
| 1812 |
+
510,
|
| 1813 |
+
85,
|
| 1814 |
+
884,
|
| 1815 |
+
917
|
| 1816 |
+
],
|
| 1817 |
+
"page_idx": 9
|
| 1818 |
+
},
|
| 1819 |
+
{
|
| 1820 |
+
"type": "page_number",
|
| 1821 |
+
"text": "984",
|
| 1822 |
+
"bbox": [
|
| 1823 |
+
485,
|
| 1824 |
+
928,
|
| 1825 |
+
515,
|
| 1826 |
+
940
|
| 1827 |
+
],
|
| 1828 |
+
"page_idx": 9
|
| 1829 |
+
},
|
| 1830 |
+
{
|
| 1831 |
+
"type": "list",
|
| 1832 |
+
"sub_type": "ref_text",
|
| 1833 |
+
"list_items": [
|
| 1834 |
+
"via policy gradient for semi-structured mathematical reasoning. In The Eleventh International Conference on Learning Representations.",
|
| 1835 |
+
"Daniel Lübke, Olaf Zimmermann, Cesare Pautasso, Uwe Zdun, and Mirko Stocker. 2019. Interface evolution patterns: balancing compatibility and extensibility across service life cycles. pages 1-24.",
|
| 1836 |
+
"Alex Mallen, Akari Asai, Victor Zhong, Rajarshi Das, Daniel Khashabi, and Hannaneh Hajishirzi. 2023. When not to trust language models: Investigating effectiveness of parametric and non-parametric memories. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 9802-9822, Toronto, Canada. Association for Computational Linguistics.",
|
| 1837 |
+
"Reiichiro Nakano, Jacob Hilton, Suchir Balaji, Jeff Wu, Long Ouyang, Christina Kim, Christopher Hesse, Shantanu Jain, Vineet Kosaraju, William Saunders, Xu Jiang, Karl Cobbe, Tyna Eloundou, Gretchen Krueger, Kevin Button, Matthew Knight, Benjamin Chess, and John Schulman. 2022. Webgpt: Browser-assisted question-answering with human feedback.",
|
| 1838 |
+
"Shishir G Patil, Tianjun Zhang, Xin Wang, and Joseph E Gonzalez. 2023. Gorilla: Large language model connected with massive apis. arXiv preprint arXiv:2305.15334.",
|
| 1839 |
+
"Cheng Qian, Chi Han, Yi R. Fung, Yujia Qin, Zhiyuan Liu, and Heng Ji. 2023. Creator: Tool creation for disentangling abstract and concrete reasoning of large language models.",
|
| 1840 |
+
"Yujia Qin, Shihao Liang, Yining Ye, Kunlun Zhu, Lan Yan, Yaxi Lu, Yankai Lin, Xin Cong, Xiangru Tang, Bill Qian, et al. 2023. Toollm: Facilitating large language models to master $16000+$ real-world apis. arXiv preprint arXiv:2307.16789.",
|
| 1841 |
+
"Timo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu, Maria Lomeli, Luke Zettlemoyer, Nicola Cancedda, and Thomas Scialom. 2023. Toolformer: Language models can teach themselves to use tools. arXiv preprint arXiv:2302.04761.",
|
| 1842 |
+
"Yongliang Shen, Kaitao Song, Xu Tan, Dongsheng Li, Weiming Lu, and Yueting Zhuang. 2023. Hugging-gpt: Solving ai tasks with chatgpt and its friends in hugging face.",
|
| 1843 |
+
"Raphael Shu, Elman Mansimov, Tamer Alkhouli, Nikolaos Pappas, Salvatore Romeo, Arshit Gupta, Saab Mansour, Yi Zhang, and Dan Roth. 2022. Dialog2api: Task-oriented dialogue with api description and example programs. arXiv preprint arXiv:2212.09946.",
|
| 1844 |
+
"Chan Hee Song, Jiaman Wu, Clayton Washington, Brian M Sadler, Wei-Lun Chao, and Yu Su. 2023a. Llm-planner: Few-shot grounded planning for embodied agents with large language models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 2998-3009."
|
| 1845 |
+
],
|
| 1846 |
+
"bbox": [
|
| 1847 |
+
115,
|
| 1848 |
+
85,
|
| 1849 |
+
489,
|
| 1850 |
+
917
|
| 1851 |
+
],
|
| 1852 |
+
"page_idx": 10
|
| 1853 |
+
},
|
| 1854 |
+
{
|
| 1855 |
+
"type": "list",
|
| 1856 |
+
"sub_type": "ref_text",
|
| 1857 |
+
"list_items": [
|
| 1858 |
+
"Yifan Song, Weimin Xiong, Dawei Zhu, Wenhao Wu, Han Qian, Mingbo Song, Hailiang Huang, Cheng Li, Ke Wang, Rong Yao, Ye Tian, and Sujian Li. 2023b. Restgpt: Connecting large language models with real-world restful apis.",
|
| 1859 |
+
"Qiaoyu Tang, Ziliang Deng, Hongyu Lin, Xianpei Han, Qiao Liang, Boxi Cao, and Le Sun. 2023a. Toolalpaca: Generalized tool learning for language models with 3000 simulated cases.",
|
| 1860 |
+
"Xiangru Tang, Anni Zou, Zhuosheng Zhang, Yilun Zhao, Xingyao Zhang, Arman Cohan, and Mark Gerstein. 2023b. Medagents: Large language models as collaborators for zero-shot medical reasoning. arXiv preprint arXiv:2311.10537.",
|
| 1861 |
+
"Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee Lacroix, Baptiste Roziere, Naman Goyal, Eric Hambro, Faisal Azhar, et al. 2023. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971.",
|
| 1862 |
+
"Chenfei Wu, Shengming Yin, Weizhen Qi, Xiaodong Wang, Zecheng Tang, and Nan Duan. 2023. Visual chatgpt: Talking, drawing and editing with visual foundation models.",
|
| 1863 |
+
"Qiantong Xu, Fenglu Hong, Bo Li, Changran Hu, Zhengyu Chen, and Jian Zhang. 2023. On the tool manipulation capability of open-source large language models. arXiv preprint arXiv:2305.16504.",
|
| 1864 |
+
"Prateek Yadav, Qing Sun, Hantian Ding, Xiaopeng Li, Dejiao Zhang, Ming Tan, Parminder Bhatia, Xiaofei Ma, Ramesh Nallapati, Murali Krishna Ramanathan, et al. 2023. Exploring continual learning for code generation models. In The 61st Annual Meeting Of The Association For Computational Linguistics.",
|
| 1865 |
+
"Zonglin Yang, Xinya Du, Junxian Li, Jie Zheng, Soujanya Poria, and Erik Cambria. 2023. Large language models for automated open-domain scientific hypotheses discovery. arXiv preprint arXiv:2309.02726.",
|
| 1866 |
+
"Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik R Narasimhan, and Yuan Cao. 2022. React: Synergizing reasoning and acting in language models. In *The Eleventh International Conference on Learning Representations*.",
|
| 1867 |
+
"Ori Yoran, Tomer Wolfson, Ori Ram, and Jonathan Berant. 2023. Making retrieval-augmented language models robust to irrelevant context.",
|
| 1868 |
+
"Kexun Zhang, Hongqiao Chen, Lei Li, and William Wang. 2023. Syntax error-free and generalizable tool use for llms via finite-state decoding.",
|
| 1869 |
+
"Yin Zhu, Zhiling Luo, and Gong Cheng. 2023. Furthest reasoning with plan assessment: Stable reasoning path with retrieval-augmented large language models. arXiv preprint arXiv:2309.12767."
|
| 1870 |
+
],
|
| 1871 |
+
"bbox": [
|
| 1872 |
+
510,
|
| 1873 |
+
85,
|
| 1874 |
+
884,
|
| 1875 |
+
906
|
| 1876 |
+
],
|
| 1877 |
+
"page_idx": 10
|
| 1878 |
+
},
|
| 1879 |
+
{
|
| 1880 |
+
"type": "page_number",
|
| 1881 |
+
"text": "985",
|
| 1882 |
+
"bbox": [
|
| 1883 |
+
485,
|
| 1884 |
+
928,
|
| 1885 |
+
515,
|
| 1886 |
+
940
|
| 1887 |
+
],
|
| 1888 |
+
"page_idx": 10
|
| 1889 |
+
},
|
| 1890 |
+
{
|
| 1891 |
+
"type": "text",
|
| 1892 |
+
"text": "A K-means Algorithm for Furthest Planning",
|
| 1893 |
+
"text_level": 1,
|
| 1894 |
+
"bbox": [
|
| 1895 |
+
114,
|
| 1896 |
+
83,
|
| 1897 |
+
436,
|
| 1898 |
+
118
|
| 1899 |
+
],
|
| 1900 |
+
"page_idx": 11
|
| 1901 |
+
},
|
| 1902 |
+
{
|
| 1903 |
+
"type": "text",
|
| 1904 |
+
"text": "Here, we present the algorithm for selecting the optimal sub-query to proceed with the Plan-and-Retrieve paradigm.",
|
| 1905 |
+
"bbox": [
|
| 1906 |
+
112,
|
| 1907 |
+
124,
|
| 1908 |
+
489,
|
| 1909 |
+
174
|
| 1910 |
+
],
|
| 1911 |
+
"page_idx": 11
|
| 1912 |
+
},
|
| 1913 |
+
{
|
| 1914 |
+
"type": "code",
|
| 1915 |
+
"sub_type": "algorithm",
|
| 1916 |
+
"code_caption": [
|
| 1917 |
+
"Algorithm 2 Sub-query Selection"
|
| 1918 |
+
],
|
| 1919 |
+
"code_body": "Let $Q_{\\mathrm{prev}}$ be the set of previous queries, and $Q_{\\mathrm{cand}}$ the set of candidate queries. \nif $Q_{\\mathrm{prev}} = \\emptyset$ then \nreturn $Q_{\\mathrm{cand}}$ \nend if \n $Q_{\\mathrm{total}} = Q_{\\mathrm{cand}} \\cup Q_{\\mathrm{prev}}$ $V = \\mathrm{TFIDFVectorizer}(Q_{\\mathrm{total}})$ $C = \\mathrm{KMeans.fit}(V)$ \nLet $L_{\\mathrm{prev}}$ be the cluster labels for $Q_{\\mathrm{prev}}$ in $C$ . \n $Q_{\\mathrm{filtered}} = \\{q \\mid q \\in Q_{\\mathrm{cand}}, \\mathrm{label}(q, C) \\notin L_{\\mathrm{prev}}\\}$ \nif $Q_{\\mathrm{filtered}} = \\emptyset$ then \nreturn $Q_{\\mathrm{cand}}$ \nend if \nreturn random.choice( $Q_{\\mathrm{filtered}}$ )",
|
| 1920 |
+
"bbox": [
|
| 1921 |
+
115,
|
| 1922 |
+
206,
|
| 1923 |
+
487,
|
| 1924 |
+
435
|
| 1925 |
+
],
|
| 1926 |
+
"page_idx": 11
|
| 1927 |
+
},
|
| 1928 |
+
{
|
| 1929 |
+
"type": "text",
|
| 1930 |
+
"text": "B Evaluation Framework for NDCG Assessment",
|
| 1931 |
+
"text_level": 1,
|
| 1932 |
+
"bbox": [
|
| 1933 |
+
114,
|
| 1934 |
+
463,
|
| 1935 |
+
448,
|
| 1936 |
+
495
|
| 1937 |
+
],
|
| 1938 |
+
"page_idx": 11
|
| 1939 |
+
},
|
| 1940 |
+
{
|
| 1941 |
+
"type": "text",
|
| 1942 |
+
"text": "In the process of evaluating the correspondence between the retrieved digital tools and the user's query, a nuanced approach is employed to assign relevance scores. This scoring paradigm operates on a scale from 0 to 2. A score of '2' is allocated exclusively to those tools that exhibit either an exact match or a functional equivalence to the predefined standards, referred to as 'ground-truths.' A score of '1' is designated for tools that are deemed to be of moderate relevance. Conversely, a score of '0' is reserved for tools that are determined to be irrelevant to the user's query. We hire graduate students to carry out this task.",
|
| 1943 |
+
"bbox": [
|
| 1944 |
+
112,
|
| 1945 |
+
506,
|
| 1946 |
+
489,
|
| 1947 |
+
715
|
| 1948 |
+
],
|
| 1949 |
+
"page_idx": 11
|
| 1950 |
+
},
|
| 1951 |
+
{
|
| 1952 |
+
"type": "text",
|
| 1953 |
+
"text": "C Edit-Ground Prompt Template",
|
| 1954 |
+
"text_level": 1,
|
| 1955 |
+
"bbox": [
|
| 1956 |
+
509,
|
| 1957 |
+
83,
|
| 1958 |
+
816,
|
| 1959 |
+
101
|
| 1960 |
+
],
|
| 1961 |
+
"page_idx": 11
|
| 1962 |
+
},
|
| 1963 |
+
{
|
| 1964 |
+
"type": "text",
|
| 1965 |
+
"text": "Please refer to Fig. 4. The task explanation and demonstration are shown in orange. The input is shown in blue.",
|
| 1966 |
+
"bbox": [
|
| 1967 |
+
507,
|
| 1968 |
+
109,
|
| 1969 |
+
882,
|
| 1970 |
+
156
|
| 1971 |
+
],
|
| 1972 |
+
"page_idx": 11
|
| 1973 |
+
},
|
| 1974 |
+
{
|
| 1975 |
+
"type": "text",
|
| 1976 |
+
"text": "D Case Studies for Edit-and-Ground paradigm",
|
| 1977 |
+
"text_level": 1,
|
| 1978 |
+
"bbox": [
|
| 1979 |
+
509,
|
| 1980 |
+
168,
|
| 1981 |
+
843,
|
| 1982 |
+
202
|
| 1983 |
+
],
|
| 1984 |
+
"page_idx": 11
|
| 1985 |
+
},
|
| 1986 |
+
{
|
| 1987 |
+
"type": "text",
|
| 1988 |
+
"text": "From Tab. 4, we observe that humans tend to craft tool descriptions that are abstract and simple, which can omit vital details necessary for both users and automated systems. Abstract descriptions can create a gap in understanding, particularly in domains where the nuances of functionality are key to effective use.",
|
| 1989 |
+
"bbox": [
|
| 1990 |
+
507,
|
| 1991 |
+
211,
|
| 1992 |
+
884,
|
| 1993 |
+
321
|
| 1994 |
+
],
|
| 1995 |
+
"page_idx": 11
|
| 1996 |
+
},
|
| 1997 |
+
{
|
| 1998 |
+
"type": "text",
|
| 1999 |
+
"text": "Contrastingly, tool descriptions that are contextualized and grounded by PLUTo offer a more detailed narrative, linking the tool's features with specific use cases and demonstrating its utility in practical scenarios. This detailed approach not only aids human users in understanding how a tool fits their specific needs but also enhances the precision of automated retrieval systems in matching tools to user queries.",
|
| 2000 |
+
"bbox": [
|
| 2001 |
+
507,
|
| 2002 |
+
324,
|
| 2003 |
+
884,
|
| 2004 |
+
468
|
| 2005 |
+
],
|
| 2006 |
+
"page_idx": 11
|
| 2007 |
+
},
|
| 2008 |
+
{
|
| 2009 |
+
"type": "page_number",
|
| 2010 |
+
"text": "986",
|
| 2011 |
+
"bbox": [
|
| 2012 |
+
485,
|
| 2013 |
+
928,
|
| 2014 |
+
515,
|
| 2015 |
+
940
|
| 2016 |
+
],
|
| 2017 |
+
"page_idx": 11
|
| 2018 |
+
},
|
| 2019 |
+
{
|
| 2020 |
+
"type": "table",
|
| 2021 |
+
"img_path": "images/cf2222d8f27323d5e5b2c37cdaa7678fafafce0d81fdf54439ff33bbb01a9b98.jpg",
|
| 2022 |
+
"table_caption": [],
|
| 2023 |
+
"table_footnote": [],
|
| 2024 |
+
"table_body": "<table><tr><td>Tool Name</td><td>Before</td><td>After</td></tr><tr><td>Magisto</td><td>Magically transform your videos. Magisto turns your everyday videos into exciting, memorable movies you'll want to watch again and again.</td><td>The Magisto API is a powerful tool that can transform user videos into exciting and memorable movies. It offers a range of capabilities to enhance the user's movie experience, provide movie recommendations, and optimize video content for discovery on platforms like Vineo. The API allows users to choose visually appealing movies ...</td></tr><tr><td>Bing Image Search</td><td>An AI service from Microsoft Azure that turns any app into an image search resource.</td><td>The Bing Image Search API is a comprehensive and powerful tool that enables users to search for and retrieve a wide range of images based on their specific requirements. With its extensive database and advanced search capabilities, this API offers a variety of features to cater to different use cases and scenarios. The API provides the ability to fetch trending images for movie posters. Additionally, the API offers the functionality to retrieve details of the most popular movie from the past month, enabling users to make informed decisions about their movie selection.</td></tr><tr><td>LANDR Mastering v1</td><td>Give your users an instant and customized audio mastering solution by harnessing the power of LANDR's industry-leading, AI-driven mastering engine and its patented machine learning capabilities.</td><td>The "LANDR Mastering v1" API is a comprehensive and powerful audio mastering solution designed to cater to the needs of music producers, music lovers, and anyone interested in high-quality audio production. With its instant and customizable features, the API offers a range of capabilities to enhance the music production process. For music producers, the API allows them to download a specific track by providing the track ID. Additionally, the API can fetch track credits, enabling the user to gather essential information for their music production needs ...</td></tr></table>",
|
| 2025 |
+
"bbox": [
|
| 2026 |
+
141,
|
| 2027 |
+
267,
|
| 2028 |
+
855,
|
| 2029 |
+
674
|
| 2030 |
+
],
|
| 2031 |
+
"page_idx": 12
|
| 2032 |
+
},
|
| 2033 |
+
{
|
| 2034 |
+
"type": "text",
|
| 2035 |
+
"text": "Table 4: Comparative Analysis of Tool Descriptions before and after optimization by the Edit-and-Ground paradigm. This table showcases the evolution of tool descriptions for selected tools, illustrating the substantial enhancement in clarity, detail, and functionality offered to users.",
|
| 2036 |
+
"bbox": [
|
| 2037 |
+
112,
|
| 2038 |
+
684,
|
| 2039 |
+
882,
|
| 2040 |
+
728
|
| 2041 |
+
],
|
| 2042 |
+
"page_idx": 12
|
| 2043 |
+
},
|
| 2044 |
+
{
|
| 2045 |
+
"type": "page_number",
|
| 2046 |
+
"text": "987",
|
| 2047 |
+
"bbox": [
|
| 2048 |
+
485,
|
| 2049 |
+
928,
|
| 2050 |
+
515,
|
| 2051 |
+
940
|
| 2052 |
+
],
|
| 2053 |
+
"page_idx": 12
|
| 2054 |
+
},
|
| 2055 |
+
{
|
| 2056 |
+
"type": "text",
|
| 2057 |
+
"text": "Task: Currently, the description of the tool is not clear. Improve the description of a tool based on its relevance score to the usecases.",
|
| 2058 |
+
"bbox": [
|
| 2059 |
+
124,
|
| 2060 |
+
278,
|
| 2061 |
+
878,
|
| 2062 |
+
310
|
| 2063 |
+
],
|
| 2064 |
+
"page_idx": 13
|
| 2065 |
+
},
|
| 2066 |
+
{
|
| 2067 |
+
"type": "text",
|
| 2068 |
+
"text": "Input:",
|
| 2069 |
+
"text_level": 1,
|
| 2070 |
+
"bbox": [
|
| 2071 |
+
127,
|
| 2072 |
+
328,
|
| 2073 |
+
176,
|
| 2074 |
+
343
|
| 2075 |
+
],
|
| 2076 |
+
"page_idx": 13
|
| 2077 |
+
},
|
| 2078 |
+
{
|
| 2079 |
+
"type": "text",
|
| 2080 |
+
"text": "source tool description: This is the original description of the tool as provided.",
|
| 2081 |
+
"bbox": [
|
| 2082 |
+
127,
|
| 2083 |
+
344,
|
| 2084 |
+
732,
|
| 2085 |
+
360
|
| 2086 |
+
],
|
| 2087 |
+
"page_idx": 13
|
| 2088 |
+
},
|
| 2089 |
+
{
|
| 2090 |
+
"type": "text",
|
| 2091 |
+
"text": "usecases: These are the scenarios where the tool would be useful.",
|
| 2092 |
+
"bbox": [
|
| 2093 |
+
127,
|
| 2094 |
+
361,
|
| 2095 |
+
631,
|
| 2096 |
+
374
|
| 2097 |
+
],
|
| 2098 |
+
"page_idx": 13
|
| 2099 |
+
},
|
| 2100 |
+
{
|
| 2101 |
+
"type": "text",
|
| 2102 |
+
"text": "reasoning: This is an explanation for why the tool is relevant and useful to address the usecases.",
|
| 2103 |
+
"bbox": [
|
| 2104 |
+
127,
|
| 2105 |
+
376,
|
| 2106 |
+
865,
|
| 2107 |
+
392
|
| 2108 |
+
],
|
| 2109 |
+
"page_idx": 13
|
| 2110 |
+
},
|
| 2111 |
+
{
|
| 2112 |
+
"type": "text",
|
| 2113 |
+
"text": "Demonstration:",
|
| 2114 |
+
"text_level": 1,
|
| 2115 |
+
"bbox": [
|
| 2116 |
+
127,
|
| 2117 |
+
410,
|
| 2118 |
+
248,
|
| 2119 |
+
423
|
| 2120 |
+
],
|
| 2121 |
+
"page_idx": 13
|
| 2122 |
+
},
|
| 2123 |
+
{
|
| 2124 |
+
"type": "text",
|
| 2125 |
+
"text": "Input:",
|
| 2126 |
+
"text_level": 1,
|
| 2127 |
+
"bbox": [
|
| 2128 |
+
127,
|
| 2129 |
+
443,
|
| 2130 |
+
176,
|
| 2131 |
+
457
|
| 2132 |
+
],
|
| 2133 |
+
"page_idx": 13
|
| 2134 |
+
},
|
| 2135 |
+
{
|
| 2136 |
+
"type": "text",
|
| 2137 |
+
"text": "source_tool_description: {t}",
|
| 2138 |
+
"bbox": [
|
| 2139 |
+
127,
|
| 2140 |
+
458,
|
| 2141 |
+
347,
|
| 2142 |
+
474
|
| 2143 |
+
],
|
| 2144 |
+
"page_idx": 13
|
| 2145 |
+
},
|
| 2146 |
+
{
|
| 2147 |
+
"type": "text",
|
| 2148 |
+
"text": "usecases:{U}",
|
| 2149 |
+
"bbox": [
|
| 2150 |
+
127,
|
| 2151 |
+
475,
|
| 2152 |
+
236,
|
| 2153 |
+
489
|
| 2154 |
+
],
|
| 2155 |
+
"page_idx": 13
|
| 2156 |
+
},
|
| 2157 |
+
{
|
| 2158 |
+
"type": "text",
|
| 2159 |
+
"text": "reasoning: {R}",
|
| 2160 |
+
"bbox": [
|
| 2161 |
+
127,
|
| 2162 |
+
492,
|
| 2163 |
+
243,
|
| 2164 |
+
507
|
| 2165 |
+
],
|
| 2166 |
+
"page_idx": 13
|
| 2167 |
+
},
|
| 2168 |
+
{
|
| 2169 |
+
"type": "text",
|
| 2170 |
+
"text": "Output:",
|
| 2171 |
+
"text_level": 1,
|
| 2172 |
+
"bbox": [
|
| 2173 |
+
127,
|
| 2174 |
+
524,
|
| 2175 |
+
188,
|
| 2176 |
+
539
|
| 2177 |
+
],
|
| 2178 |
+
"page_idx": 13
|
| 2179 |
+
},
|
| 2180 |
+
{
|
| 2181 |
+
"type": "text",
|
| 2182 |
+
"text": "improved_tool_description: {t'}",
|
| 2183 |
+
"bbox": [
|
| 2184 |
+
127,
|
| 2185 |
+
539,
|
| 2186 |
+
376,
|
| 2187 |
+
556
|
| 2188 |
+
],
|
| 2189 |
+
"page_idx": 13
|
| 2190 |
+
},
|
| 2191 |
+
{
|
| 2192 |
+
"type": "text",
|
| 2193 |
+
"text": "Input:",
|
| 2194 |
+
"text_level": 1,
|
| 2195 |
+
"bbox": [
|
| 2196 |
+
127,
|
| 2197 |
+
573,
|
| 2198 |
+
176,
|
| 2199 |
+
588
|
| 2200 |
+
],
|
| 2201 |
+
"page_idx": 13
|
| 2202 |
+
},
|
| 2203 |
+
{
|
| 2204 |
+
"type": "text",
|
| 2205 |
+
"text": "source_tool_description: {t}",
|
| 2206 |
+
"bbox": [
|
| 2207 |
+
127,
|
| 2208 |
+
589,
|
| 2209 |
+
347,
|
| 2210 |
+
605
|
| 2211 |
+
],
|
| 2212 |
+
"page_idx": 13
|
| 2213 |
+
},
|
| 2214 |
+
{
|
| 2215 |
+
"type": "text",
|
| 2216 |
+
"text": "usecases: $\\{\\mathbf{U}\\}$",
|
| 2217 |
+
"bbox": [
|
| 2218 |
+
127,
|
| 2219 |
+
605,
|
| 2220 |
+
236,
|
| 2221 |
+
620
|
| 2222 |
+
],
|
| 2223 |
+
"page_idx": 13
|
| 2224 |
+
},
|
| 2225 |
+
{
|
| 2226 |
+
"type": "text",
|
| 2227 |
+
"text": "reasoning: $\\{\\mathbf{R}\\}$",
|
| 2228 |
+
"bbox": [
|
| 2229 |
+
127,
|
| 2230 |
+
621,
|
| 2231 |
+
243,
|
| 2232 |
+
637
|
| 2233 |
+
],
|
| 2234 |
+
"page_idx": 13
|
| 2235 |
+
},
|
| 2236 |
+
{
|
| 2237 |
+
"type": "text",
|
| 2238 |
+
"text": "Output:",
|
| 2239 |
+
"text_level": 1,
|
| 2240 |
+
"bbox": [
|
| 2241 |
+
127,
|
| 2242 |
+
653,
|
| 2243 |
+
188,
|
| 2244 |
+
669
|
| 2245 |
+
],
|
| 2246 |
+
"page_idx": 13
|
| 2247 |
+
},
|
| 2248 |
+
{
|
| 2249 |
+
"type": "text",
|
| 2250 |
+
"text": "improved_description:",
|
| 2251 |
+
"bbox": [
|
| 2252 |
+
127,
|
| 2253 |
+
671,
|
| 2254 |
+
304,
|
| 2255 |
+
687
|
| 2256 |
+
],
|
| 2257 |
+
"page_idx": 13
|
| 2258 |
+
},
|
| 2259 |
+
{
|
| 2260 |
+
"type": "text",
|
| 2261 |
+
"text": "Figure 4: Edit-and-Ground template.",
|
| 2262 |
+
"bbox": [
|
| 2263 |
+
371,
|
| 2264 |
+
720,
|
| 2265 |
+
623,
|
| 2266 |
+
734
|
| 2267 |
+
],
|
| 2268 |
+
"page_idx": 13
|
| 2269 |
+
},
|
| 2270 |
+
{
|
| 2271 |
+
"type": "page_number",
|
| 2272 |
+
"text": "988",
|
| 2273 |
+
"bbox": [
|
| 2274 |
+
485,
|
| 2275 |
+
928,
|
| 2276 |
+
515,
|
| 2277 |
+
940
|
| 2278 |
+
],
|
| 2279 |
+
"page_idx": 13
|
| 2280 |
+
}
|
| 2281 |
+
]
|
2024/Planning and Editing What You Retrieve for Enhanced Tool Learning/8d8d80e4-468a-48ab-946e-0712d25e3540_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/Planning and Editing What You Retrieve for Enhanced Tool Learning/8d8d80e4-468a-48ab-946e-0712d25e3540_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3445e3f1b323ab2f3762c403c9cdf15c897a16b62cd083cf95c816f334e1fb72
|
| 3 |
+
size 1227838
|
2024/Planning and Editing What You Retrieve for Enhanced Tool Learning/full.md
ADDED
|
@@ -0,0 +1,447 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Planning and Editing What You Retrieve for Enhanced Tool Learning
|
| 2 |
+
|
| 3 |
+
Tenghao Huang $^{1}$ Dongwon Jung $^{1}$ Muhao Chen $^{2}$
|
| 4 |
+
|
| 5 |
+
<sup>1</sup>University of Southern California
|
| 6 |
+
|
| 7 |
+
$^{2}$ University of California, Davis
|
| 8 |
+
|
| 9 |
+
{tenghaoh, dongwonj}@usc.edu;
|
| 10 |
+
|
| 11 |
+
muhchen@ucdavis.edu;
|
| 12 |
+
|
| 13 |
+
# Abstract
|
| 14 |
+
|
| 15 |
+
Recent advancements in integrating external tools with Large Language Models (LLMs) have opened new frontiers, with applications in mathematical reasoning, code generators, and smart assistants. However, existing methods, relying on simple one-time retrieval strategies, fall short on effectively and accurately shortlisting relevant tools. This paper introduces a novel PLUTO (Planning, Learning, and Understanding for Tools) approach, encompassing "Plan-and-Retrieve (P&R)" and "Edit-and-Ground (E&G)" paradigms. The P&R paradigm consists of a neural retrieval module for shortlisting relevant tools and an LLM-based query planner that decomposes complex queries into actionable tasks, enhancing the effectiveness of tool utilization. The E&G paradigm utilizes LLMs to enrich tool descriptions based on user scenarios, bridging the gap between user queries and tool functionalities. Experiment results demonstrate that these paradigms significantly improve the recall and NDCG in tool retrieval tasks, significantly surpassing current state-of-the-art models.
|
| 16 |
+
|
| 17 |
+
# 1 Introduction
|
| 18 |
+
|
| 19 |
+
The community has shown increasing interest in integrating external tools and interfaces with LLMs since tools often provide complementary functionalities in complex tasks such as dialogues (Bubeck et al., 2023), mathematical reasoning (Lu et al., 2022), and code generation (Yadav et al., 2023). To realize tool augmentation, LLM systems typically employ a retriever mechanism to select relevant tools from a candidate pool and write function API calls based on the retrieved tools. The introduction of external tools also allows LLMs to address complicated user queries. Schick et al. 2023 show that LLMs, incorporating simple tools, achieve better performance on downstream tasks. Gupta and Kembhavi 2023 attempt to solve compositional visual
|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
Figure 1: Comparison between conventional Retrieve-and-Read and PLUTO paradigm. Unlike the conventional one-time Retrieve-and-Read paradigm that may lead to retrieving an ineffective set of tools, PLUTO efficiently parses a complex query and distills it into actionable sub-queries that facilitate accurate retrieval of appropriate tools.
|
| 23 |
+
|
| 24 |
+
tasks via image processing modules and language-instructed computer vision models. More recently, the integration of LLMs and tools empower LLMs, opening up new possibilities in areas like scientific discovery (Yang et al., 2023), automated efficiency, and smart assistant applications (Shu et al., 2022).
|
| 25 |
+
|
| 26 |
+
Nonetheless, emergent approaches for LLMs with tool integration present several distinct challenges. One primary concern is that current LLM agents still adopt simple retrieval-and-read strategies (Patil et al., 2023; Qin et al., 2023), lacking
|
| 27 |
+
|
| 28 |
+
the dynamic adaptability required for addressing complex queries. As shown in Fig. 1, the conventional Retrieve-and-Read paradigm, solely relying heavily on similarity matching, falls short of retrieving diverse types of tools to address a complex user query. This limitation is further exacerbated by the semantic gap between user queries and tool descriptions. Particularly, user queries can be ambiguous and complex, often requiring a deep understanding of the user's intent and the context of the query (Kulkarni et al., 2023). On the other hand, human-written tool descriptions can be abstract and lack essential details for deciding their utilities, leading to a mismatch between what the user needs and what the tool is perceived to offer. Additionally, current models tend to finetune on static tools, posing challenges to their robustness in the ever-evolving tool environment where new tools emerge and existing ones become obsolete (Lübke et al., 2019). There is limited research on retrieval enhancement strategies in non-finetuned settings. These gaps highlight crucial areas for future research and development in LLM and tool integration.
|
| 29 |
+
|
| 30 |
+
In this paper, we leverage LLM's world knowledge and reasoning ability to augment the retrieval and utility of tools in response to complex user queries, by designing a novel framework PLUTO (Planning, Learning, and Understanding for Tools) $^{1}$ . Our first contribution is the introduction of a novel Plan-and-Retrieve for tool integration. While prior Retrieve-and-Read approaches only retrieve once at the beginning, our Plan-and-Retrieve paradigm is designed to adaptively adjust its strategies based on the outcomes of its self-evaluations, ensuring a continuous refinement of the tool selection process. This paradigm is structured into two core modules. The first module, the retriever, leverages neural (dense) retrieval techniques (Karpukhin et al., 2020) and LM-likelihood scoring mechanisms (Song et al., 2023a) to efficiently shortlist relevant tools from a vast pool of candidates in response to a user query. This process ensures that the most pertinent tools are identified quickly, laying a foundation for more effective tool utilization. Inspired by recent advancements of adaptive retrieval-augmented generation (RAG; Jiang et al. 2023; Yoran et al. 2023), we design an LLM-based query planner that autoregressively
|
| 31 |
+
|
| 32 |
+
decomposes complex user queries into manageable, task-oriented actions as the second module. Following the decompositions, the query planner selects the most suitable ones from the retrieved tools. It goes further by evaluating the effectiveness of selected tools and proposing the next action toward addressing the user query. This Plan-and-Retrieve paradigm operates dynamically, embodying a sophisticated feedback loop that interlinks the retrieval of tools with subsequent refinement, evaluation, and planning stages.
|
| 33 |
+
|
| 34 |
+
Our second contribution is the proposal of Edit-and-Ground paradigm that utilizes user queries' rich contextual information and LLM's extensive world knowledge for enriching descriptions of tool functionalities. Research has shown that informed tool documentations can enhance the interaction between LLMs and tools (Hsieh et al., 2023). However, documenting tool functionalities at scale can be tedious for humans. Yang et al. 2023 show LLMs can follow instructions and optimize real-world applications. Leveraging the optimization ability of the LLM, our tool-grounding agent optimizes under-informative tool descriptions by learning and abstracting information from tools' user scenarios. By editing tool descriptions to make them more aligned with tools' user scenarios, the agent bridges the gap between user queries and tool functionalities, enhancing the overall effectiveness of tool retrieval and usage.
|
| 35 |
+
|
| 36 |
+
In conclusion, this paper advances the field of tool integration with LLMs by introducing the novel Plan-and-Retrieve and Edit-and-Ground paradigms. Experiments show that our paradigms improve the recall and NDCG of tool retrieval tasks, significantly outperforming current state-of-the-art (SOTA). Our downstream evaluation suggests that the improvement gained during the retrieval phase, such as higher accuracy and relevance in responses, significantly contribute to successfully addressing the user queries.
|
| 37 |
+
|
| 38 |
+
# 2 Related Works
|
| 39 |
+
|
| 40 |
+
Retrieval-Augmented LLM. Early studies on Retrieval-Augmented LLMs typically incorporate embeddings of retrieved passages as a part of the latent representation of the LM (Chen et al., 2017; Lee et al., 2019). More recent works like REALM (Guu et al., 2020) and RAG (Lewis et al., 2021) have demonstrated the effectiveness of in-context augmentation and its improvement on knowledge-
|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
Figure 2: An overview of the PLUTO approach.
|
| 44 |
+
|
| 45 |
+
intensive tasks. There is also work (Mallen et al., 2023) that explores how Chain-of-Thought (CoT) could guide a multi-turn Retrieve-and-Read process to solve open-domain questions and perform fact verification.
|
| 46 |
+
|
| 47 |
+
However, the massive action space and tool functionality variance in tool-oriented tasks pose challenges to LLMs during planning. An erroneous step in planning can lead to a faulty loop, such as continually calling a tool in the wrong way or hallucinating non-existing tools. Our Plan-and-Retrieve paradigm, employing furtherest planning assessment (Zhu et al., 2023), enforces reasonable and goal-oriented decompositions of user queries. The recently proposed ReAct framework (Yao et al., 2022) asks LLM to plan future actions based on its observation of environments. In the context of tool-oriented tasks, the plan builds upon the execution results of retrieved tools. Such practice running and verifying each tool at retrieval time can be expensive and time-consuming at scale. In contrast, our Plan-and-Retrieve paradigm fully leverages LLM's internal representation of world knowledge to propose plans in response to user queries, therefore guaranteeing both time and cost efficiency as an execution-free paradigm.
|
| 48 |
+
|
| 49 |
+
Tool Learning. Tool learning refers to the process where LLMs not only process and generate language-based responses but also learn to interact with and utilize external tools to enhance their capabilities (Nakano et al., 2022; Schick et al., 2023; Shen et al., 2023; Qian et al., 2023; Song et al., 2023b; Xu et al., 2023; Li et al., 2023; Hao et al., 2023; Zhang et al., 2023). By incorporating tools,
|
| 50 |
+
|
| 51 |
+
LLMs can offer solutions in various areas, including visual-language processing (Gupta and Kembhavi, 2023; Wu et al., 2023), mathematical reasoning (Lu et al., 2023), and tasks in specialized domains (Jin et al., 2023; Tang et al., 2023b).
|
| 52 |
+
|
| 53 |
+
However, previous research on tool learning mainly focused on teaching LLMs to use tools, but ignores the importance of shortlisting relevant tools. In this paper, we focus on using LLMs to improve the tool retrieval process. In contrast to previous researches that heavily rely on finetuning retrievers (Schick et al., 2023; Patil et al., 2023) to shortlist tools, we propose a novel Edit-and-Ground paradigm, leveraging LLMs' parametric knowledge to learn and create more informative descriptions for tools. This approach seeks to provide richer information for the retriever, leading to more accurate retrieval.
|
| 54 |
+
|
| 55 |
+
# 3 Task and Data
|
| 56 |
+
|
| 57 |
+
We hereby formulate the task of tool retrieval and describe the dataset for this task.
|
| 58 |
+
|
| 59 |
+
# 3.1 Task Definition
|
| 60 |
+
|
| 61 |
+
The tool retrieval process involves taking a user query $Q$ and an index base of tool descriptions $D = \{d(t_{1}), d(t_{2}), \ldots, d(t_{n})\}$ as input, where each $d(t)$ represents the description of each tool $t$ . The retriever then sifts through the tool descriptions in $D$ and shortlists a relevant tool set $T = \{t_{1}, t_{2}, \ldots, t_{k}\}$ that are potentially suited to address aspects of the user query $Q$ . It is essential to underline that unlike conventional retrieval tasks, the task of tool retrieval is goal-oriented in nature,
|
| 62 |
+
|
| 63 |
+
which means the set of retrieved tools $T$ should be able to address the user query $Q$ .
|
| 64 |
+
|
| 65 |
+
The systems are expected to accurately retrieve relevant tools and understand the user intents and complex synergy between tools, thus truly assisting users in problem-solving processes.
|
| 66 |
+
|
| 67 |
+
# 3.2 Dataset
|
| 68 |
+
|
| 69 |
+
Existing datasets for tool learning, such as those delineated in (Li et al., 2023; Patil et al., 2023; Tang et al., 2023a; Xu et al., 2023), provide insights into the field. Nonetheless, these datasets exhibit limitations, where they only cover a limited number of tools or solely support simple single-tool usage scenarios, where user queries are simple and could be addressed by a single tool.
|
| 70 |
+
|
| 71 |
+
Contrastingly, Qin et al. (2023) proposed ToolBench, a dataset covering more than 3,000 tools from 49 categories (such as advertising, data analysis, and transportation) and support complex, multi-tool user scenarios. In these scenarios, a single user query necessitates the sequential application of multiple tools, each contributing uniquely to the resolution of the query. The ToolBench dataset synergizes with the RapidAPI Hub, a prominent API marketplace that consolidates a vast array of real-world APIs. The multi-tool query creation process involves selecting representative tools within each category or collection, crafting queries to mimic real-world problem-solving scenarios.
|
| 72 |
+
|
| 73 |
+
Given our research focus and the nature of our study, we have chosen to concentrate on the Intra-Category setting of the ToolBench dataset. The intra-category setting provides high-quality user queries, where the hierarchies of tools are clearly defined based on their main functionalities. It motivates understanding complex interactions and synergies between tools that share a common functional domain. The setting mirrors real-world situations where problem-solving often demands a multifaceted and integrative use of diverse tools. The ToolBench dataset annotates paths of executed tools that successfully address the user queries as solution paths. The average length of the solution paths is 4. We take the annotated solution paths as the ground truth for our task.
|
| 74 |
+
|
| 75 |
+
# 4 Method
|
| 76 |
+
|
| 77 |
+
In this section, we describe the proposed framework to integrate tools with LLMs for addressing complex user queries. Our methodology is
|
| 78 |
+
|
| 79 |
+
grounded in two innovative paradigms: the Plan-and-Retrieve (P&R; §4.2) and Edit-and-Ground (E&G; §4.3). We discuss the coordination between two paradigms in §4.4.
|
| 80 |
+
|
| 81 |
+
# 4.1 Method Overview
|
| 82 |
+
|
| 83 |
+
PLUTO integrates two key paradigms, Plan-and-Retrieve (P&R) and Edit-and-Ground (E&G), to effectively address complex user queries with LLMs.
|
| 84 |
+
|
| 85 |
+
The Plan-and-Retrieve paradigm is a two-stage process. The Plan stage decomposes user queries into focused sub-queries, while the Retrieve stage matches these sub-queries with relevant tools.
|
| 86 |
+
|
| 87 |
+
The Edit-and-Ground paradigm, consisting of the Evaluator and Optimizer, focuses on enhancing tool descriptions.
|
| 88 |
+
|
| 89 |
+
These paradigms are designed to work in tandem. P&R paradigm addresses immediate user queries, while E&G actively identifies and collects underinformative tool descriptions for optimization.
|
| 90 |
+
|
| 91 |
+
# 4.2 Plan-and-Retrieve
|
| 92 |
+
|
| 93 |
+
The Plan-and-Retrieve (P&R) paradigm is designed as a two-stage process to effectively address complex user queries.
|
| 94 |
+
|
| 95 |
+
Plan. In the Plan stage, a LLM-based planner autoregressively decomposes the user query $Q$ into sub-queries $q_{1}, q_{2}, \ldots, q_{n}$ . To ensure the robustness and quality of the decomposed sub-queries, we follow Zhu et al. (2023). Specifically, for each step of sub-query generation, the planner first generates a batch of hypotheses. Then, we cluster the generated hypotheses along with previously created sub-queries via K-means clustering algorithm. Finally, we select a sub-query from the hypotheses that distinguishes the most from the previous sub-queries to proceed<sup>2</sup>.
|
| 96 |
+
|
| 97 |
+
As shown in Fig. 2, the planner autoregressively decomposes the user query $Q$ into more fine-grained sub-queries based on assessments at inference time. After the generation of a sub-query $q_{t}$ , the planner evaluates whether the original query $Q$ has been satisfactorily achieved based on the current planning history. If the evaluation determines that the goal has been met, the iterative process concludes. Otherwise, the planner proceeds to generate the subsequent sub-query $q_{t + 1}$ . This active and autoregressive planning at inference time facilitates a more focused understanding of the tools. We use the following prompt template for the planner.
|
| 98 |
+
|
| 99 |
+
# Planner Prompt
|
| 100 |
+
|
| 101 |
+
You are given a user query requiring multi-step actions and reasoning. Output an immediate next action to achieve the user query.
|
| 102 |
+
|
| 103 |
+
Previous Actions: {Planning History}
|
| 104 |
+
|
| 105 |
+
User Query: $\{Q\}$
|
| 106 |
+
|
| 107 |
+
Output:
|
| 108 |
+
|
| 109 |
+
Retrieve. In the Retrieve stage, for each sub-query $q_i$ , the retriever shortlists the most suitable tools $T_i \in D$ . We first retrieve a pool of candidate tools that matches $q_i$ , represented as
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
T _ {i} ^ {\prime} = \operatorname {R e t} \left(q _ {i}\right), \tag {1}
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
where Ret represents the retriever.
|
| 116 |
+
|
| 117 |
+
To enhance the robustness of retrieval, we rerank the candidate tool set $T_{i}^{\prime}$ by LM-likelihood score between the sub-query $q_{i}$ and each tool $t_j \in T_i$ , which is calculated as follows:
|
| 118 |
+
|
| 119 |
+
$$
|
| 120 |
+
\operatorname {L M} \text {l i k e l i h o o d} \left(q _ {i}, t _ {j}\right) = - \log P \left(q _ {i}, d \left(t _ {j}\right)\right). \tag {2}
|
| 121 |
+
$$
|
| 122 |
+
|
| 123 |
+
Based on the re-ranked tools, we choose the top-5 tools $T_{i,top - 5}^{\prime}$ and feed them into a LLM-based predictor, which outputs a shortlisted tool set $T_{i}$ from the candidate tool set $T_{i,top - 5}^{\prime}$ that are relevant to $q_{i}$ . We use this prompt for the predictor.
|
| 124 |
+
|
| 125 |
+
# Predictor Prompt
|
| 126 |
+
|
| 127 |
+
You are given candidate tools that can be potentially used to solve current goal. Among candidate tools, select a list of relevant tools which would help achieve the current goal.
|
| 128 |
+
|
| 129 |
+
Current Goal: $\{q\}$
|
| 130 |
+
|
| 131 |
+
Candidate Tools: $\{T^{\prime}\}$
|
| 132 |
+
|
| 133 |
+
Output:
|
| 134 |
+
|
| 135 |
+
As a result, the final shortlisted tool set $T$ is formed by
|
| 136 |
+
|
| 137 |
+
$$
|
| 138 |
+
T = \bigcup_ {i = 1} ^ {n} T _ {i}, \forall i \in [ 1, n ] \cap \mathbb {Z}. \tag {3}
|
| 139 |
+
$$
|
| 140 |
+
|
| 141 |
+
For the choice of Ret, we adopt a neural (dense) retriever method. For each sub-query $q_{i}$ , the dense vector representation $\mathbf{q}_i$ is obtained by passing $q_{i}$ through a dense encoder. Similarly, we obtain dense representation $\mathbf{d}$ through a dense encoder for each tool description $d$ . The tool index corpus $D$ is formed as a collection of $\mathbf{d}$ .
|
| 142 |
+
|
| 143 |
+
The P&R module interleaves Plan and Retrieve until the planner evaluates that the user query has been sufficiently decomposed and addressed through the retrieved tools. The module then returns $T$ as the relevant tools to address the user query.
|
| 144 |
+
|
| 145 |
+
Algorithm 1 Edit-and-Ground Algorithm
|
| 146 |
+
Input: Trainset, Devset, Toolset, Failure Threshold, Max_Rounds
|
| 147 |
+
Output: Optimized Tool Descriptions
|
| 148 |
+
Initialize cache for tools in Toolset
|
| 149 |
+
cur_round = 0
|
| 150 |
+
while cur_round < Max_Rounds do
|
| 151 |
+
## Phase 1: Evaluate Retrieval Performance
|
| 152 |
+
for each (query, gt.tools) in Trainset do
|
| 153 |
+
predicted.tools ← P&R(query)
|
| 154 |
+
for each tool in gt.tools do
|
| 155 |
+
tool.trials += 1
|
| 156 |
+
if tool not in predicted.tools then
|
| 157 |
+
tool失败 += 1
|
| 158 |
+
tool.queries.add(query) > Failure queries
|
| 159 |
+
end if
|
| 160 |
+
end for
|
| 161 |
+
end for
|
| 162 |
+
## Phase 2: Failed Tool Description Optimization
|
| 163 |
+
for each tool in Toolset do
|
| 164 |
+
if tool失败 > Failure Threshold then
|
| 165 |
+
U ← Remove specific entities from tool.queries
|
| 166 |
+
R ← Predict reasons for failure of U
|
| 167 |
+
d(tool) ← tool.description
|
| 168 |
+
d'(tool) ← E&G(tool, d/tool), U, R)
|
| 169 |
+
# Phase 3: Evaluate Performance of d'(tool)
|
| 170 |
+
cur_recall ← Eval(Devset, d/tool))
|
| 171 |
+
if tool/recall < cur_recall then
|
| 172 |
+
tool.description ← d'(tool)
|
| 173 |
+
tool/recall ← cur_recall
|
| 174 |
+
end if
|
| 175 |
+
end if
|
| 176 |
+
end for
|
| 177 |
+
cur_round += 1
|
| 178 |
+
end while
|
| 179 |
+
|
| 180 |
+
# 4.3 Edit-and-Ground
|
| 181 |
+
|
| 182 |
+
The Edit-and-Ground (E&G) paradigm focuses on refining under-informative tool descriptions to align them with user queries. As shown in Alg. 1, the evaluator examines the quality of tool descriptions by retrieval results. A tool description is viewed as under-informative if the number of failure cases of retrieval exceeds a pre-defined threshold. We collect such tools for later optimization.
|
| 183 |
+
|
| 184 |
+
# Entity Filtering Prompt
|
| 185 |
+
|
| 186 |
+
Given an input query, remove specific entity information and return only the general query template. Make sure your method is generalizable to handle other queries.
|
| 187 |
+
|
| 188 |
+
{Demonstrations}
|
| 189 |
+
|
| 190 |
+
User Queries: $\{Q\}$
|
| 191 |
+
|
| 192 |
+
Output:
|
| 193 |
+
|
| 194 |
+
Subsequently, the optimizer takes a tool $t$ with its base description $d(t)$ and $U$ , a batch of relevant user queries, as input. To avoid the optimizer overfitting to a local batch, we use an LLM to filter out specific entities for each query in $U$ . The entity
|
| 195 |
+
|
| 196 |
+
filtering prompt template is shown as above.
|
| 197 |
+
|
| 198 |
+
To assist the optimizer in improving underperformed tool descriptions, we prompt LLM to generate reasons $R$ explaining why the tool could be related and helpful in addressing user queries. The functionality assessment prompt template is shown below:
|
| 199 |
+
|
| 200 |
+
# Functionality Assessment Prompt
|
| 201 |
+
|
| 202 |
+
Given a batch of user queries and a tool, predict a reason why the tool would be helpful to address the user queries.
|
| 203 |
+
|
| 204 |
+
{Demonstrations}
|
| 205 |
+
|
| 206 |
+
User Queries: $\{U\}$
|
| 207 |
+
|
| 208 |
+
Tool: $\{t:d(t)\}$
|
| 209 |
+
|
| 210 |
+
Output:
|
| 211 |
+
|
| 212 |
+
Finally, by prompting LLM with 1) base tool description $d(t)$ , 2) entity-filtered user queries $U$ , and 3) the reasons $R$ , we obtain an enriched tool description $d'(t)$ . Please refer to Fig. 4 in Appendix C for the prompt template. We formally represent this process as
|
| 213 |
+
|
| 214 |
+
$$
|
| 215 |
+
d ^ {\prime} (t) = E \& G (t, d (t), U, R). \tag {4}
|
| 216 |
+
$$
|
| 217 |
+
|
| 218 |
+
The optimization process is executed in multiple rounds as described in Alg. 1. In each round, we evaluate the retrieval recall on the development set for each tool and compare it with the previous round. If the current round's recall is better than the previous one, we update the tool's description; otherwise, we keep the original description.
|
| 219 |
+
|
| 220 |
+
The Edit-and-Ground involves using the LLM's extensive world knowledge, combined with the contextual details provided by $U$ , to edit and enhance $d(t)$ . The result of this task is an enriched tool description $d'(t)$ , expected to resonate more closely with real-world user scenarios and increase the utility of the tool in practical applications.
|
| 221 |
+
|
| 222 |
+
# 4.4 Paradigm Coordination and Inference
|
| 223 |
+
|
| 224 |
+
Our PLUTO framework employs strategic coordination of the Plan-and-Retrieve (P&R) and Edit-and-Ground (E&G) paradigms, phased to optimize the process of tool retrieval. This section elucidates the interaction between these paradigms during the optimization phase and the subsequent inference phase.
|
| 225 |
+
|
| 226 |
+
Optimization Phase. During the optimization phase, P&R and E&G operate alternatively. P&R is tasked with decomposing a user query $Q$ into manageable sub-queries $q_{1}, q_{2}, \ldots, q_{n}$ . These sub-queries facilitate a more focused retrieval of tools
|
| 227 |
+
|
| 228 |
+
from the tool set $D$ , ensuring that the process is aligned with specific aspects of the query.
|
| 229 |
+
|
| 230 |
+
During planning, the E&G paradigm is actively engaged in optimizing the descriptions of the tools within $D$ . This optimization, leveraging the LLM's extensive knowledge base, is particularly targeted at tools that exhibit underperformance in retrieval effectiveness. By enriching these tool descriptions, E&G significantly enhances the overall retrieval process, making the toolset more responsive and aligned with the practical demands of diverse queries.
|
| 231 |
+
|
| 232 |
+
Inference Phase. At the time of inference, the P&R paradigm remains active, utilizing the previously enriched and optimized tool descriptions. In this phase, the E&G paradigm ceases its operation and does not engage in any further optimization of tool descriptions. The refined tool descriptions, already enhanced by E&G, now serve as a comprehensive resource for the retriever to draw upon in response to the decomposed sub-queries.
|
| 233 |
+
|
| 234 |
+
# 5 Experiments
|
| 235 |
+
|
| 236 |
+
In this section, we evaluate the proposed PLUTo framework for tool retrieval and compare it with baseline methods. We will delve into the details of our experimental setup (§5.1), discuss the results (§5.2) obtained, and perform an ablation study to understand strengths of different components (§5.3). By executing the retrieved tools, we evaluate their correctness in addressing user queries to further validate our findings (§5.4). We present case studies to qualitatively evaluate the strength of PLUTo framework (§5.5).
|
| 237 |
+
|
| 238 |
+
# 5.1 Experiment Setup
|
| 239 |
+
|
| 240 |
+
Evaluation Protocol. We evaluate using three metrics to assess the effectiveness of our tool retrieval system. Recall (Rec) measures the proportion of relevant tools that are successfully retrieved by our system. High indicates that the system is effective in identifying a comprehensive set of relevant tools for a given query and is more likely to yield a solution to address the user query. We also report the Normalized Discounted Cumulative Gain (NDCG) that evaluates the relevance and quality of ranked search results. In addition, we report pass rate, an automatic evaluation metric of ToolBench (Qin et al., 2023). The pass rate measures a system's ability to successfully address the user query with
|
| 241 |
+
|
| 242 |
+
<table><tr><td rowspan="2">Model</td><td rowspan="2">Retriever</td><td colspan="2">Non-Finetuned</td><td colspan="2">Finetuned</td></tr><tr><td>Rec</td><td>NDCG</td><td>Rec</td><td>NDCG</td></tr><tr><td>BM25</td><td>-</td><td>18.82</td><td>37.44</td><td>-</td><td>-</td></tr><tr><td rowspan="2">ToolRetriever</td><td>DPR†</td><td>19.58</td><td>50.98</td><td>27.80</td><td>71.21</td></tr><tr><td>Contriever</td><td>31.78</td><td>74.70</td><td>42.77</td><td>79.16</td></tr><tr><td rowspan="2">PLUTO</td><td>DPR</td><td>36.65</td><td>75.10</td><td>43.27</td><td>79.93</td></tr><tr><td>Contriever</td><td>46.57</td><td>82.93</td><td>48.47</td><td>84.73</td></tr></table>
|
| 243 |
+
|
| 244 |
+
Table 1: This table compares various tool retrieval models using Recall and NDCG metrics in both Non-Finetuned and Finetuned settings. It includes an ablation study on the impact of using different retrievers, demonstrating the generalizability of PLUTO. $\dagger$ indicates the previous SOTA implementation, as specified in (Qin et al., 2023).
|
| 245 |
+
|
| 246 |
+
a retrieved subset of tools in limited budgets by interacting with real-world RESTful APIs (§5.4).
|
| 247 |
+
|
| 248 |
+
To test the generalizability of our approach, we benchmark the tool retrieval performance under a Non-Finetuned setting, where we directly apply an off-the-shelf retriever model to comprehensively showcase PLUTO's adaptivity. To test the model's practical applicability, we also benchmark retrieval performance under Finetuned setting, where we finetune the retriever model on domain-specific knowledge. We evaluate 500 user queries for each setting.
|
| 249 |
+
|
| 250 |
+
Baselines. We compare our system against several representative retrieval methods. These include: (1) BM25: a widely-used probabilistic retrieval framework, calculating the relevance of documents to a query based on the frequency of query terms in each document; (2) ToolRetriever: a neural retrieval approach that achieves the current state-of-the-art (SOTA) performance on Tool-Bench retrieval task (Qin et al., 2023). To understand the flexibility of our framework, we benchmark PLUTO's performance when incorporated with different retrievers. Specifically, we use DPR (Karpukhin et al., 2020) and Contriever (Izacard et al., 2022).
|
| 251 |
+
|
| 252 |
+
Implementation Details. For the implementation of PLUTo, we use DSPy framework (Khattab et al., 2023) to facilitate efficient interaction between retriever and LLM. We choose $\mathrm{ChatGPT}^3$ as our main LLM for both P&R and E&G. The maximum round for the E&G module is set to 5. For ToolRetriever, we retrieve top-5 tools using the respective retrievers. The data is divided into 70-15-15 splits for training, development, and testing, respectively. For our experiment, we randomly select 500 data
|
| 253 |
+
|
| 254 |
+
samples from the test split for each setting mentioned in Evaluation Protocol section.
|
| 255 |
+
|
| 256 |
+
For the Finetuned settings, we finetune the neural dense retriever model by including negative samples during in-batch training (Karpukhin et al., 2020). For each positive pair of query $q_{j}$ and its relevant tool $d_{j}^{+}$ , we include $n$ negative tools as negative samples. We use a cross-entropy loss with softmax function over the batch $B$ :
|
| 257 |
+
|
| 258 |
+
$$
|
| 259 |
+
L = - \frac {1}{B} \sum_ {j = 1} ^ {B} \log \left(\frac {e ^ {\mathbf {q} _ {j} \cdot \mathbf {d} _ {j} ^ {+}}}{e ^ {\mathbf {q} _ {j} \cdot \mathbf {d} _ {j} ^ {+}} + \sum_ {i = 1} ^ {n} e ^ {\mathbf {q} _ {j} \cdot \mathbf {d} _ {i j} ^ {-}}}\right) (5)
|
| 260 |
+
$$
|
| 261 |
+
|
| 262 |
+
# 5.2 Results
|
| 263 |
+
|
| 264 |
+
The experimental results, detailed in Tab. 1, underscore the significant advantages of our proposed PLUTO models. In the Non-Finetuned setting, PLUTO with Contriever showcases remarkable scores, achieving $46.57\%$ in Recall, outperforming the best baseline by 9.92 points. This result shows the model's robust ability to identify relevant tools without the necessity for specific finetuning, a critical advantage in dynamic tool retrieval environments. We observe a consistent trend in the Finetuned setting, with the model scoring $48.47\%$ in Recall, demonstrating a 5.7 points lead when compared with the Contriever baseline. This indicates that our model is highly effective on retrieving relevant tools.
|
| 265 |
+
|
| 266 |
+
Furthermore, our model outperforms baselines across all settings on NDCG scores. In the Non-Finetuned setting, our model leads by 8.23 points. In the Finetuned setting, our model beats the baseline by 4.57 points. These results reflect PLUTO not only the relevance of the tools retrieved but also their ranking in order of utility and applicability to the user's query, which is a indication to the model's nuanced understanding of tool utility.
|
| 267 |
+
|
| 268 |
+

|
| 269 |
+
Figure 3: Performance comparison among different LLMs for Plan-and-Retrieve paradigm using Recall score. The backbone retriever is DPR.
|
| 270 |
+
|
| 271 |
+
To show the generalizability of PLUTO, we select different retrievers for the Plan-and-Retrieve (P&R) paradigm. We observe that PLUTO has synergy with both DPR and Contriever models, regardless of their different architecture, that achieves higher Recall and NDCG scores than the baselines. This indicates that PLUTO is a plug-n-play and retriever-agnostic framework that features effectiveness and flexibility under different circumstances.
|
| 272 |
+
|
| 273 |
+
The experimental results highlight the superior performance of PLUTO framework. Together, the P&R and E&G paradigms establish a dynamic and effective framework, which not only accurately interprets and responds to user queries but also maintains an evolving understanding of tool functionality. This duality ensures that PLUTO remains highly effective and adaptable in various setups, consistently aligning user needs with the most suitable tools and their capabilities.
|
| 274 |
+
|
| 275 |
+
# 5.3 Ablation Study
|
| 276 |
+
|
| 277 |
+
As shown in Fig. 3, we observe that both the Llama2 (Touvron et al., 2023) and ChatGPT variants show considerable improvements in tool retrieval capabilities, with notable increases in Recall and NDCG scores compared to baseline models. This consistent improvement across different LLM integrations conclusively demonstrates the robustness and effectiveness of our method. This finding is particularly important as it suggests that our approach is not overly reliant on any single LLM, thereby showcasing the broad applicability and potential of our methods in diverse settings.
|
| 278 |
+
|
| 279 |
+
As shown in Tab. 2, the ablation experiment on
|
| 280 |
+
|
| 281 |
+
<table><tr><td rowspan="2">Model</td><td colspan="2">Non-Finetuned</td><td colspan="2">Finetuned</td></tr><tr><td>Rec</td><td>NDCG</td><td>Rec</td><td>NDCG</td></tr><tr><td>PLUTO-full</td><td>46.57</td><td>82.93</td><td>48.47</td><td>84.73</td></tr><tr><td>- w/o E&G</td><td>42.55</td><td>80.70</td><td>44.90</td><td>81.10</td></tr><tr><td>- w/o P&R</td><td>38.12</td><td>77.60</td><td>47.07</td><td>81.90</td></tr></table>
|
| 282 |
+
|
| 283 |
+
Table 2: Ablation Study.
|
| 284 |
+
|
| 285 |
+
the PLUTO- full, focusing on the removal of Edit- and-Ground (E&G) and Plan-and-Retrieve (P&R) components, provides intriguing insights into their roles in tool retrieval tasks. Generally, removing E&G leads to decreased Recall and NDCG scores across settings, underscoring its critical role in enhancing what the model seeks to retrieve. On the other hand, excluding P&R tends to diminish more of the model's performance in Non-Finetuned settings, particularly impacting Recall. This highlights P&R's importance in effectively retrieving relevant information. A comparative analysis reveals that the full implementation of PLUTOChatGPT, incorporating both E&G and P&R, consistently delivers strong performance across all metrics and settings, emphasizing the synergistic strength of these components. The variants of the model, lacking either E&G or P&R, provide valuable insights into the unique contributions of each component to the model's overall efficacy.
|
| 286 |
+
|
| 287 |
+
# 5.4 Execution Pass Rate
|
| 288 |
+
|
| 289 |
+
We evaluate the pass rate of the execution schema generated by ChatGPT using the DFSDT approach (Qin et al., 2023). Using the ToolEval package, we assessed two distinct retrieval tools, ToolRetriever and PLUTO, for their correctness and efficiency in responding to user queries. The PLUTO achieves $72.3\%$ for pass rate, while the previous SOTA system ToolRetriever scored $69.3\%$ .
|
| 290 |
+
|
| 291 |
+
This experiment's findings emphasize the pivotal role of advanced retrieval strategies in enhancing user query response quality. The improvement gained during the retrieval phase, such as higher accuracy and relevance in responses, significantly contribute to the downstream tasks.
|
| 292 |
+
|
| 293 |
+
# 5.5 Case Study
|
| 294 |
+
|
| 295 |
+
As shown in Tab. 3, we compare our PLUTO against the ToolRetriever baseline to underscore PLUTO's proficiency in retrieving relevant tools for diverse user queries. Through selected exam
|
| 296 |
+
|
| 297 |
+
<table><tr><td>Question</td><td>Gold Answer</td><td>PLUTo Answer</td><td>ToolRetriever Answer</td></tr><tr><td>I'm planning a weekend getaway with my partner and I want to surprise them with a romantic playlist. Could you fetch the reels and posts from romantic music artists on Instagram? Additionally, could you search for books about love and relationships on Open Library?</td><td>Instagram Reels and post Downloader, Open Library</td><td>Instagram Reels and post Downloader, Instagram, Open Library, Instagram Downloader</td><td>Love Quotes by LoveMelon, The Love Calculator, Book Finder, fb-video-reels, Reading Home APIs</td></tr><tr><td>I'm planning a family movie night and I need a movie recommendation. Can you fetch the trending images for movie posters and provide me with the details of the most popular movie from the past month? Also, check the status of the movie session and download the completed movie.</td><td>Magisto, Bing Image Search</td><td>Magisto, gogoanimate-data-api, Youtube video info, Advanced Movie Search, Image Service, Memes, Bing Image Search, Netflix Data</td><td>TikTok Info, Tiktok Video Feature Summary, TikTok Full Video Info, TikTok Downloader - Download Videos without watermark</td></tr><tr><td>I'm a music blogger and I'm searching for interesting radio stations to feature on my website. Can you help me find radio stations that play a mix of genres? Also, provide me with the details of the master for the track with the ID '987654' in the LANDR Mastering.</td><td>LANDR Mastering v1, 50K Radio Stations</td><td>GMC Radio, LANDR Mastering v1, 50K Radio Stations, 60K Radio Stations</td><td>LANDR Mastering v1, Spotify_v2, TuneIn, Spotify Scaper, Spotify_v3</td></tr></table>
|
| 298 |
+
|
| 299 |
+
Table 3: Performance comparison of PLUTo and ToolRetriever in retrieving relevant tools for user queries. This table demonstrates the effectiveness of PLUTo in closely aligning with the gold standard answers for diverse queries, showcasing its superior ability to understand and fulfill user needs compared to ToolRetriever. The highlighted tools are the correctly retrieved ones.
|
| 300 |
+
|
| 301 |
+
plies, PLUTO's superior understanding and comprehensive response capabilities are highlighted, especially in scenarios requiring nuanced tool selection.
|
| 302 |
+
|
| 303 |
+
For instance, for organizing a romantic weekend in the first example, PLUTO not only identifies all essential tools but also enhances the search with additional relevant resources, showcasing its broad and accurate grasp of user needs. This is contrasted with ToolRetriever, where the retrieved tools are only similar on a surface level (the majority of the tools contain the term "Love") and fail to understand the user's intent. This emphasizes PLUTO's improved relevance and precision in tool retrieval. We also showcase the descriptions of tools before and after optimization by the Edit-and-Ground paradigm in Tab. 4.
|
| 304 |
+
|
| 305 |
+
By leveraging the Plan-and-Retieve (P&R) and Edit-and-Ground (E&G) components, PLUTo marks a significant advancement over conventional retrieval systems, demonstrating its adaptability and utility in fulfilling diverse user requirements.
|
| 306 |
+
|
| 307 |
+
# 6 Conclusion
|
| 308 |
+
|
| 309 |
+
We introduced PLUTO, a framework composed of the Plan-and-Retieve and Edit-and-Ground paradigms, which marks a distinctive departure from traditional methodologies, setting a new stan
|
| 310 |
+
|
| 311 |
+
dard for tool retrieval. The empirical results illustrate the superiority of PLUTO across critical retrieval performance metrics as well as pass rate in real-world tool-use evaluation. These metrics collectively attest to the model's efficacy in identifying relevant tools and successfully addressing complex user queries. We hope the adaptability and efficiency of PLUTO can empower a multitude of domains where accurate and timely retrieval of tools is paramount. From autonomous scientific discovery to software development, the potential applications are as diverse as they are impactful.
|
| 312 |
+
|
| 313 |
+
# Acknowledgement
|
| 314 |
+
|
| 315 |
+
We appreciate the reviewers for their insightful comments and suggestions. Tenghao Huang and Muhao Chen were supported by an Amazon Research Award, a Keston Exploratory Research Award, and the NSF Grant ITE 2333736.
|
| 316 |
+
|
| 317 |
+
# Limitation
|
| 318 |
+
|
| 319 |
+
Our study, while enhancing tool learning by planning and editing strategies, is notably constrained by its reliance on English language datasets. This focus on English limits the model's applicability to other languages with distinct syntax and semantics and confines its evaluation to specific English data
|
| 320 |
+
|
| 321 |
+
sources, leaving its performance on diverse language setups unexplored. Future research should address this limitation by developing multilingual capabilities and conducting evaluations across varied data sources.
|
| 322 |
+
|
| 323 |
+
The Edit-and-Ground (E&G) may be executed to further optimize the descriptions. However, due to the cost, we currently set a relatively loose stop criterion that is enough to demonstrate the effectiveness of the presented method.
|
| 324 |
+
|
| 325 |
+
# Ethical Consideration
|
| 326 |
+
|
| 327 |
+
In conducting this research, we have adhered to ethical guidelines and legal norms to ensure responsible data usage. The data used in this study was obtained from public datasets, specifically Tool-Bench. We ensured not to violate any terms of service of the data sources.
|
| 328 |
+
|
| 329 |
+
# References
|
| 330 |
+
|
| 331 |
+
Sebastien Bubeck, Varun Chandrasekaran, Ronen Eldan, Johannes Gehrke, Eric Horvitz, Ece Kamar, Peter Lee, Yin Tat Lee, Yuanzhi Li, Scott Lundberg, et al. 2023. Sparks of artificial general intelligence: Early experiments with gpt-4. arXiv preprint arXiv:2303.12712.
|
| 332 |
+
Danqi Chen, Adam Fisch, Jason Weston, and Antoine Bordes. 2017. Reading wikipedia to answer open-domain questions. In 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, pages 1870-1879. Association for Computational Linguistics (ACL).
|
| 333 |
+
Tanmay Gupta and Aniruddha Kembhavi. 2023. Visual programming: Compositional visual reasoning without training. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 14953-14962.
|
| 334 |
+
Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Mingwei Chang. 2020. Retrieval augmented language model pre-training. In International conference on machine learning, pages 3929-3938. PMLR.
|
| 335 |
+
Shibo Hao, Tianyang Liu, Zhen Wang, and Zhiting Hu. 2023. Toolkengpt: Augmenting frozen language models with massive tools via tool embeddings.
|
| 336 |
+
Cheng-Yu Hsieh, Si-An Chen, Chun-Liang Li, Yasuhisa Fujii, Alexander Ratner, Chen-Yu Lee, Ranjay Krishna, and Tomas Pfister. 2023. Tool documentation enables zero-shot tool-usage with large language models. arXiv preprint arXiv:2308.00675.
|
| 337 |
+
Gautier Izacard, Mathilde Caron, Lucas Hosseini, Sebastian Riedel, Piotr Bojanowski, Armand Joulin, and
|
| 338 |
+
|
| 339 |
+
Edouard Grave. 2022. Unsupervised dense information retrieval with contrastive learning. Transactions on Machine Learning Research.
|
| 340 |
+
Zhengbao Jiang, Frank F Xu, Luyu Gao, Zhiqing Sun, Qian Liu, Jane Dwivedi-Yu, Yiming Yang, Jamie Callan, and Graham Neubig. 2023. Active retrieval augmented generation. arXiv preprint arXiv:2305.06983.
|
| 341 |
+
Qiao Jin, Yifan Yang, Qingyu Chen, and Zhiyong Lu. 2023. Genegpt: Augmenting large language models with domain tools for improved access to biomedical information.
|
| 342 |
+
Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih. 2020. Dense passage retrieval for open-domain question answering. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 6769-6781, Online. Association for Computational Linguistics.
|
| 343 |
+
Omar Khattab, Arnav Singhvi, Paridhi Maheshwari, Zhiyuan Zhang, Keshav Santhanam, Sri Vardhamanan, Saiful Haq, Ashutosh Sharma, Thomas T. Joshi, Hanna Moazam, Heather Miller, Matei Zaharia, and Christopher Potts. 2023. Dspy: Compiling declarative language model calls into self-improving pipelines.
|
| 344 |
+
Mandar Kulkarni, Kyung Kim, Nikesh Garera, and Anusua Trivedi. 2023. Label efficient semi-supervised conversational intent classification. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 5: Industry Track), pages 96-102, Toronto, Canada. Association for Computational Linguistics.
|
| 345 |
+
Kenton Lee, Ming-Wei Chang, and Kristina Toutanova. 2019. Latent retrieval for weakly supervised open domain question answering. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 6086–6096, Florence, Italy. Association for Computational Linguistics.
|
| 346 |
+
Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Kuttler, Mike Lewis, Wen tau Yih, Tim Rocktäschel, Sebastian Riedel, and Douwe Kiela. 2021. Retrieval-augmented generation for knowledge-intensive nlp tasks.
|
| 347 |
+
Minghao Li, Yingxiu Zhao, Bowen Yu, Feifan Song, Hangyu Li, Haiyang Yu, Zhoujun Li, Fei Huang, and Yongbin Li. 2023. Api-bank: A comprehensive benchmark for tool-augmented llms.
|
| 348 |
+
Pan Lu, Baolin Peng, Hao Cheng, Michel Galley, Kai-Wei Chang, Ying Nian Wu, Song-Chun Zhu, and Jianfeng Gao. 2023. Chameleon: Plug-and-play compositional reasoning with large language models.
|
| 349 |
+
Pan Lu, Liang Qiu, Kai-Wei Chang, Ying Nian Wu, Song-Chun Zhu, Tanmay Rajpurohit, Peter Clark, and Ashwin Kalyan. 2022. Dynamic prompt learning
|
| 350 |
+
|
| 351 |
+
via policy gradient for semi-structured mathematical reasoning. In The Eleventh International Conference on Learning Representations.
|
| 352 |
+
Daniel Lübke, Olaf Zimmermann, Cesare Pautasso, Uwe Zdun, and Mirko Stocker. 2019. Interface evolution patterns: balancing compatibility and extensibility across service life cycles. pages 1-24.
|
| 353 |
+
Alex Mallen, Akari Asai, Victor Zhong, Rajarshi Das, Daniel Khashabi, and Hannaneh Hajishirzi. 2023. When not to trust language models: Investigating effectiveness of parametric and non-parametric memories. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 9802-9822, Toronto, Canada. Association for Computational Linguistics.
|
| 354 |
+
Reiichiro Nakano, Jacob Hilton, Suchir Balaji, Jeff Wu, Long Ouyang, Christina Kim, Christopher Hesse, Shantanu Jain, Vineet Kosaraju, William Saunders, Xu Jiang, Karl Cobbe, Tyna Eloundou, Gretchen Krueger, Kevin Button, Matthew Knight, Benjamin Chess, and John Schulman. 2022. Webgpt: Browser-assisted question-answering with human feedback.
|
| 355 |
+
Shishir G Patil, Tianjun Zhang, Xin Wang, and Joseph E Gonzalez. 2023. Gorilla: Large language model connected with massive apis. arXiv preprint arXiv:2305.15334.
|
| 356 |
+
Cheng Qian, Chi Han, Yi R. Fung, Yujia Qin, Zhiyuan Liu, and Heng Ji. 2023. Creator: Tool creation for disentangling abstract and concrete reasoning of large language models.
|
| 357 |
+
Yujia Qin, Shihao Liang, Yining Ye, Kunlun Zhu, Lan Yan, Yaxi Lu, Yankai Lin, Xin Cong, Xiangru Tang, Bill Qian, et al. 2023. Toollm: Facilitating large language models to master $16000+$ real-world apis. arXiv preprint arXiv:2307.16789.
|
| 358 |
+
Timo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu, Maria Lomeli, Luke Zettlemoyer, Nicola Cancedda, and Thomas Scialom. 2023. Toolformer: Language models can teach themselves to use tools. arXiv preprint arXiv:2302.04761.
|
| 359 |
+
Yongliang Shen, Kaitao Song, Xu Tan, Dongsheng Li, Weiming Lu, and Yueting Zhuang. 2023. Hugging-gpt: Solving ai tasks with chatgpt and its friends in hugging face.
|
| 360 |
+
Raphael Shu, Elman Mansimov, Tamer Alkhouli, Nikolaos Pappas, Salvatore Romeo, Arshit Gupta, Saab Mansour, Yi Zhang, and Dan Roth. 2022. Dialog2api: Task-oriented dialogue with api description and example programs. arXiv preprint arXiv:2212.09946.
|
| 361 |
+
Chan Hee Song, Jiaman Wu, Clayton Washington, Brian M Sadler, Wei-Lun Chao, and Yu Su. 2023a. Llm-planner: Few-shot grounded planning for embodied agents with large language models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 2998-3009.
|
| 362 |
+
|
| 363 |
+
Yifan Song, Weimin Xiong, Dawei Zhu, Wenhao Wu, Han Qian, Mingbo Song, Hailiang Huang, Cheng Li, Ke Wang, Rong Yao, Ye Tian, and Sujian Li. 2023b. Restgpt: Connecting large language models with real-world restful apis.
|
| 364 |
+
Qiaoyu Tang, Ziliang Deng, Hongyu Lin, Xianpei Han, Qiao Liang, Boxi Cao, and Le Sun. 2023a. Toolalpaca: Generalized tool learning for language models with 3000 simulated cases.
|
| 365 |
+
Xiangru Tang, Anni Zou, Zhuosheng Zhang, Yilun Zhao, Xingyao Zhang, Arman Cohan, and Mark Gerstein. 2023b. Medagents: Large language models as collaborators for zero-shot medical reasoning. arXiv preprint arXiv:2311.10537.
|
| 366 |
+
Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee Lacroix, Baptiste Roziere, Naman Goyal, Eric Hambro, Faisal Azhar, et al. 2023. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971.
|
| 367 |
+
Chenfei Wu, Shengming Yin, Weizhen Qi, Xiaodong Wang, Zecheng Tang, and Nan Duan. 2023. Visual chatgpt: Talking, drawing and editing with visual foundation models.
|
| 368 |
+
Qiantong Xu, Fenglu Hong, Bo Li, Changran Hu, Zhengyu Chen, and Jian Zhang. 2023. On the tool manipulation capability of open-source large language models. arXiv preprint arXiv:2305.16504.
|
| 369 |
+
Prateek Yadav, Qing Sun, Hantian Ding, Xiaopeng Li, Dejiao Zhang, Ming Tan, Parminder Bhatia, Xiaofei Ma, Ramesh Nallapati, Murali Krishna Ramanathan, et al. 2023. Exploring continual learning for code generation models. In The 61st Annual Meeting Of The Association For Computational Linguistics.
|
| 370 |
+
Zonglin Yang, Xinya Du, Junxian Li, Jie Zheng, Soujanya Poria, and Erik Cambria. 2023. Large language models for automated open-domain scientific hypotheses discovery. arXiv preprint arXiv:2309.02726.
|
| 371 |
+
Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik R Narasimhan, and Yuan Cao. 2022. React: Synergizing reasoning and acting in language models. In *The Eleventh International Conference on Learning Representations*.
|
| 372 |
+
Ori Yoran, Tomer Wolfson, Ori Ram, and Jonathan Berant. 2023. Making retrieval-augmented language models robust to irrelevant context.
|
| 373 |
+
Kexun Zhang, Hongqiao Chen, Lei Li, and William Wang. 2023. Syntax error-free and generalizable tool use for llms via finite-state decoding.
|
| 374 |
+
Yin Zhu, Zhiling Luo, and Gong Cheng. 2023. Furthest reasoning with plan assessment: Stable reasoning path with retrieval-augmented large language models. arXiv preprint arXiv:2309.12767.
|
| 375 |
+
|
| 376 |
+
# A K-means Algorithm for Furthest Planning
|
| 377 |
+
|
| 378 |
+
Here, we present the algorithm for selecting the optimal sub-query to proceed with the Plan-and-Retrieve paradigm.
|
| 379 |
+
|
| 380 |
+
Algorithm 2 Sub-query Selection
|
| 381 |
+
Let $Q_{\mathrm{prev}}$ be the set of previous queries, and $Q_{\mathrm{cand}}$ the set of candidate queries.
|
| 382 |
+
if $Q_{\mathrm{prev}} = \emptyset$ then
|
| 383 |
+
return $Q_{\mathrm{cand}}$
|
| 384 |
+
end if
|
| 385 |
+
$Q_{\mathrm{total}} = Q_{\mathrm{cand}} \cup Q_{\mathrm{prev}}$ $V = \mathrm{TFIDFVectorizer}(Q_{\mathrm{total}})$ $C = \mathrm{KMeans.fit}(V)$
|
| 386 |
+
Let $L_{\mathrm{prev}}$ be the cluster labels for $Q_{\mathrm{prev}}$ in $C$ .
|
| 387 |
+
$Q_{\mathrm{filtered}} = \{q \mid q \in Q_{\mathrm{cand}}, \mathrm{label}(q, C) \notin L_{\mathrm{prev}}\}$
|
| 388 |
+
if $Q_{\mathrm{filtered}} = \emptyset$ then
|
| 389 |
+
return $Q_{\mathrm{cand}}$
|
| 390 |
+
end if
|
| 391 |
+
return random.choice( $Q_{\mathrm{filtered}}$ )
|
| 392 |
+
|
| 393 |
+
# B Evaluation Framework for NDCG Assessment
|
| 394 |
+
|
| 395 |
+
In the process of evaluating the correspondence between the retrieved digital tools and the user's query, a nuanced approach is employed to assign relevance scores. This scoring paradigm operates on a scale from 0 to 2. A score of '2' is allocated exclusively to those tools that exhibit either an exact match or a functional equivalence to the predefined standards, referred to as 'ground-truths.' A score of '1' is designated for tools that are deemed to be of moderate relevance. Conversely, a score of '0' is reserved for tools that are determined to be irrelevant to the user's query. We hire graduate students to carry out this task.
|
| 396 |
+
|
| 397 |
+
# C Edit-Ground Prompt Template
|
| 398 |
+
|
| 399 |
+
Please refer to Fig. 4. The task explanation and demonstration are shown in orange. The input is shown in blue.
|
| 400 |
+
|
| 401 |
+
# D Case Studies for Edit-and-Ground paradigm
|
| 402 |
+
|
| 403 |
+
From Tab. 4, we observe that humans tend to craft tool descriptions that are abstract and simple, which can omit vital details necessary for both users and automated systems. Abstract descriptions can create a gap in understanding, particularly in domains where the nuances of functionality are key to effective use.
|
| 404 |
+
|
| 405 |
+
Contrastingly, tool descriptions that are contextualized and grounded by PLUTo offer a more detailed narrative, linking the tool's features with specific use cases and demonstrating its utility in practical scenarios. This detailed approach not only aids human users in understanding how a tool fits their specific needs but also enhances the precision of automated retrieval systems in matching tools to user queries.
|
| 406 |
+
|
| 407 |
+
<table><tr><td>Tool Name</td><td>Before</td><td>After</td></tr><tr><td>Magisto</td><td>Magically transform your videos. Magisto turns your everyday videos into exciting, memorable movies you'll want to watch again and again.</td><td>The Magisto API is a powerful tool that can transform user videos into exciting and memorable movies. It offers a range of capabilities to enhance the user's movie experience, provide movie recommendations, and optimize video content for discovery on platforms like Vineo. The API allows users to choose visually appealing movies ...</td></tr><tr><td>Bing Image Search</td><td>An AI service from Microsoft Azure that turns any app into an image search resource.</td><td>The Bing Image Search API is a comprehensive and powerful tool that enables users to search for and retrieve a wide range of images based on their specific requirements. With its extensive database and advanced search capabilities, this API offers a variety of features to cater to different use cases and scenarios. The API provides the ability to fetch trending images for movie posters. Additionally, the API offers the functionality to retrieve details of the most popular movie from the past month, enabling users to make informed decisions about their movie selection.</td></tr><tr><td>LANDR Mastering v1</td><td>Give your users an instant and customized audio mastering solution by harnessing the power of LANDR's industry-leading, AI-driven mastering engine and its patented machine learning capabilities.</td><td>The "LANDR Mastering v1" API is a comprehensive and powerful audio mastering solution designed to cater to the needs of music producers, music lovers, and anyone interested in high-quality audio production. With its instant and customizable features, the API offers a range of capabilities to enhance the music production process. For music producers, the API allows them to download a specific track by providing the track ID. Additionally, the API can fetch track credits, enabling the user to gather essential information for their music production needs ...</td></tr></table>
|
| 408 |
+
|
| 409 |
+
Table 4: Comparative Analysis of Tool Descriptions before and after optimization by the Edit-and-Ground paradigm. This table showcases the evolution of tool descriptions for selected tools, illustrating the substantial enhancement in clarity, detail, and functionality offered to users.
|
| 410 |
+
|
| 411 |
+
Task: Currently, the description of the tool is not clear. Improve the description of a tool based on its relevance score to the usecases.
|
| 412 |
+
|
| 413 |
+
# Input:
|
| 414 |
+
|
| 415 |
+
source tool description: This is the original description of the tool as provided.
|
| 416 |
+
|
| 417 |
+
usecases: These are the scenarios where the tool would be useful.
|
| 418 |
+
|
| 419 |
+
reasoning: This is an explanation for why the tool is relevant and useful to address the usecases.
|
| 420 |
+
|
| 421 |
+
# Demonstration:
|
| 422 |
+
|
| 423 |
+
# Input:
|
| 424 |
+
|
| 425 |
+
source_tool_description: {t}
|
| 426 |
+
|
| 427 |
+
usecases:{U}
|
| 428 |
+
|
| 429 |
+
reasoning: {R}
|
| 430 |
+
|
| 431 |
+
# Output:
|
| 432 |
+
|
| 433 |
+
improved_tool_description: {t'}
|
| 434 |
+
|
| 435 |
+
# Input:
|
| 436 |
+
|
| 437 |
+
source_tool_description: {t}
|
| 438 |
+
|
| 439 |
+
usecases: $\{\mathbf{U}\}$
|
| 440 |
+
|
| 441 |
+
reasoning: $\{\mathbf{R}\}$
|
| 442 |
+
|
| 443 |
+
# Output:
|
| 444 |
+
|
| 445 |
+
improved_description:
|
| 446 |
+
|
| 447 |
+
Figure 4: Edit-and-Ground template.
|
2024/Planning and Editing What You Retrieve for Enhanced Tool Learning/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:be107ae4022a98e057d37d2759fd393825eb17717d9bd2f1d257fe24b38f5833
|
| 3 |
+
size 584002
|
2024/Planning and Editing What You Retrieve for Enhanced Tool Learning/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/Plug-in Language Model_ Controlling Text Generation with a Simple Regression Model/e276efc4-71f5-478e-8c9c-6e7a9a8d6c39_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/Plug-in Language Model_ Controlling Text Generation with a Simple Regression Model/e276efc4-71f5-478e-8c9c-6e7a9a8d6c39_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/Plug-in Language Model_ Controlling Text Generation with a Simple Regression Model/e276efc4-71f5-478e-8c9c-6e7a9a8d6c39_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e49fe71f377186634d7a5429131ffbca741ce8e86aef4741a5ea4c6f6aaba057
|
| 3 |
+
size 382744
|
2024/Plug-in Language Model_ Controlling Text Generation with a Simple Regression Model/full.md
ADDED
|
@@ -0,0 +1,400 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Plug-in Language Model: Controlling Text Generation with a Simple Regression Model
|
| 2 |
+
|
| 3 |
+
Nai-Chi Yang $^{12}$ , Wei-Yun Ma $^{*1}$ , Pu-Jen Cheng $^{2}$
|
| 4 |
+
|
| 5 |
+
$^{1}$ Academia Sinica $^{2}$ National Taiwan University
|
| 6 |
+
|
| 7 |
+
nike00811@iis.sinica.edu.tw ma@iis.sinica.edu.tw pjcheng@csie.ntu.edu.tw
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
Large-scale pre-trained language models have displayed unrivaled capacity in generating text that closely resembles human-written text. Nevertheless, generating texts adhering to specific conditions without fine-tuning or adding new parameters can be challenging. Contemporary approaches commonly rely on either prompts or auxiliary models to avoid modifying the language models. These auxiliary models are designed to assess whether a generated token contributes to meeting the desired requirements. These approaches adjust the distribution of the next token during the inference phase by leveraging the prediction score of the desired attribute to calculate gradients. However, these auxiliary models typically require the language model's latent states. This prerequisite challenges integrating various existing black box attribute models or tools. We present the Plugin Language Model (PiLM) as a solution to address the limitations. PiLM leverages reinforcement learning to utilize black box tools directly, adjusting the latent state to control text generation. However, performing backpropagation during the inference phase is time-consuming for PiLM. By replacing backpropagation with a simple regression model, PiLM can achieve an inference time comparable to that of the original LLM. Experiment results show that our approaches in this paper outperform existing state-of-the-art methods that rely on gradient-based, weighted decoding, or prompt-based methodologies.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
Large-scale language models can already generate text nearly indistinguishable from human-written content in terms of grammar and fluency. However, the primary challenge lies in exerting precise control over the generated text to align it with specific semantic requirements. Without robust control
|
| 16 |
+
|
| 17 |
+
mechanisms, there is a potential risk that the generated text may deviate from the intended meaning or even include offensive or derogatory language.
|
| 18 |
+
|
| 19 |
+
The most intuitive method to achieve control generation is fine-tuning or retraining from scratch using data that contains the desired attribute. These approaches achieve notable breakthroughs in enhancing their performance. However, there is a trend of language models becoming increasingly larger, leading to a rise in the cost of training. Therefore, there is a growing emphasis on methods for controlling at generation time.
|
| 20 |
+
|
| 21 |
+
Prior research involved training an auxiliary classification model to support the language model. Gradient-based methods (Dathathri et al., 2020; Liu et al., 2020a) modified the hidden representation through gradient descent in the inference phase. Weighted decoding methods (Yang and Klein, 2021; Pei et al., 2023) integrate the original output distribution with an auxiliary attribute distribution. Methods without an auxiliary model, such as prompt-based approaches (Zhang and Song, 2022) concatenating prompt embedding and input text to influence the latent representation, thereby achieving control over the language model's output. Energy-based methods (Mireshghallah et al., 2022; Liu et al., 2020b) view controlled generation as an optimization problem, iteratively seeking text with lower energy.
|
| 22 |
+
|
| 23 |
+
In gradient-based methods, supplementary auxiliary classifiers typically use the language model's latent states as inputs to predict whether it aligns with the desired attribute. Therefore, most black box tools that take text as input cannot serve as these attribute classifiers. Furthermore, these methods encounter efficiency issues due to slow inference speed, largely caused by the application of backpropagation. Weighted decoding methods impact the output by adjusting the distribution of the next token toward a specific attribute without altering the latent representation. Avoiding gradient
|
| 24 |
+
|
| 25 |
+
updating can significantly shorten the time. However, these methods frequently yield outputs that lack fluency or coherence.
|
| 26 |
+
|
| 27 |
+
To tackle the problems, we introduce a gradient-based method called PiLM (Plug-in Language Model). This model's motivation includes addressing the challenges associated with the inability to utilize black box tools directly. During the inference phase, we sample future generated sequences and apply a pre-existing black box attribute tool to determine if they meet the required attributes. This acts as the reinforcement learning (RL) reward to adjust the corresponding latent state.
|
| 28 |
+
|
| 29 |
+
Building on this, we propose the 'Controller' to address the slow inference speed. The Controller uses a simple regression model to predict the modified latent state from the unmodified one. Training pairs are easily gathered during reinforcement updating. Another benefit of considering a more extended future context is that it allows more textual information to adjust the latent state more accurately.
|
| 30 |
+
|
| 31 |
+
In this paper, we experiment with our proposed method on three distinct tasks: sentiment control, topic control, and language detoxification. Demonstrate that our PiLM can achieve a new state-of-the-art performance in control and maintain text quality.
|
| 32 |
+
|
| 33 |
+
Our main contributions can be summarized as follows: (1) We propose a novel method that enables language models to utilize black box tools directly, eliminating the need to train attribute-specific classifiers and making it more convenient when adding new attributes or switching to different language models. (2) In contrast to prior approaches that depend on classifiers to determine update directions, considering a single token always contains limited semantic information, we incorporate future sequence considerations to improve the accuracy of latent updates. (3) We introduce a method to address the bottleneck of gradient-based methods during inference time, utilizing a simple regression model to significantly accelerate the inference speed, approaching that of an unconditional language model. Our code is available at https://github.com/nike00811/NAACL-2024-PiLM.
|
| 34 |
+
|
| 35 |
+
# 2 Related work
|
| 36 |
+
|
| 37 |
+
Techniques that involve training a conditional language model from scratch or fine-tuning a pretrained language model—whether through rein
|
| 38 |
+
|
| 39 |
+
forcement learning (Ziegler et al., 2020; Ouyang et al., 2022), generative adversarial networks (Yu et al., 2017), or fit on attribute data (Khalifa et al., 2021; Gururangan et al., 2020; Houlsby et al., 2019; Li and Liang, 2021; Hu et al., 2021) by adjusting the model or additional parameters can produce outputs adhering to specific attributes. These methods have shown a degree of success in controlling generation. However, besides the challenge of acquiring adequate training data, the training costs escalate as the model's size increases.
|
| 40 |
+
|
| 41 |
+
Approaches that modify hidden representations during inference typically employ an auxiliary attribute discriminator (Dathathri et al., 2020; Liu et al., 2020a). PPLM (Dathathri et al., 2020) uses a discriminator to measure whether the current latent representation can generate the text with the desired attribute. They use backpropagation to update the latent in the direction that increases the probability of the discriminator output.
|
| 42 |
+
|
| 43 |
+
The weighted decoding methods (Yang and Klein, 2021; Holtzman et al., 2018; Ghazvininejad et al., 2017; Liu et al., 2021; Krause et al., 2021) only require access to the output logits or the distribution of the next token. FUDGE (Yang and Klein, 2021) also employs a discriminator, and the difference is that the discriminator takes human-readable text as input instead of language model latent representations. The discriminator provides a score indicating the likelihood that the input text completes the document while adhering to the desired attribute. Ultimately, the next token is sampled from a distribution that combines the discriminator score with the language model's output probability.
|
| 44 |
+
|
| 45 |
+
The prompt-based methods (Ross et al., 2022; Zhang and Song, 2022; Pei et al., 2023) concatenate the embedding before the input text, incurring almost negligible additional time cost. However, achieving more nuanced control is more challenging. Discup (Zhang and Song, 2022) utilizes unlikelihood training to receive soft prompts. PREADD (Pei et al., 2023) mixes the distribution of the next token generated with and without prompts, enabling more flexible control.
|
| 46 |
+
|
| 47 |
+
Energy-based methods (Mireshghallah et al., 2022; Liu et al., 2020b) have the advantage of having more relaxed conditions that only require access to the model's output text. M&M LM (Mireshghallah et al., 2022) regards the output text as a state and utilizes BERT to explore neighboring states. The decision to accept or reject a new state depends on the energy score, which can be
|
| 48 |
+
|
| 49 |
+
obtained from black boxes.
|
| 50 |
+
|
| 51 |
+
Our proposed method amalgamates the advantages of the previously mentioned techniques while addressing their limitations. It updates latent representations to incorporate new information and employs a Controller to circumvent the speed constraints associated with gradient updates during inference. Existing black-box tools can be directly applied, focusing on human-readable text rather than the hidden states of Language Models. Moreover, including longer sequences enables a more comprehensive capture of semantic information.
|
| 52 |
+
|
| 53 |
+
# 3 Method
|
| 54 |
+
|
| 55 |
+
In this section, we will describe our proposed method.
|
| 56 |
+
|
| 57 |
+
Given an unconditional pre-trained generative model $G$ , and prefix tokens $x_{1:i} = \{x_1,x_2,\dots,x_i\}$ and $X = x_{1:s}$ denote as completed sequence, $G$ is only learned to complete $X$ with maximize $P(x_{i + 1}|x_{1:i})$ , complete text with an additional attribute $a$ can be modeled as $P(x_{i + 1}|x_{1:i},a)$ . According to Bayes' theorem, $P(X|a)\propto P(X)P(a|X)$ we can decouple $P(X|a)$ into unconditional language model $P(X)$ and posterior probability of attribute $P(a|X)$ .
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
P (X) = \prod_ {i = 1} ^ {s} P \left(x _ {i} \mid x _ {1: i - 1}\right) \tag {1}
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
\begin{array}{l} P (X | a) = \prod_ {\substack {i = 1 \\ s}} ^ {s} P \left(x _ {i} \mid x _ {1: i - 1}, a\right) \tag{2} \\ \propto \prod_ {i = 1} ^ {s} P (x _ {i} | x _ {1: i - 1}) P (a | x _ {1: i}) \\ \end{array}
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
For a controlled text generation task utilization of the language model, we can obtain the latent representation $H = \{h_1, h_2, \dots, h_i\}$ , $h_i$ denote the key-value pair computed by the language model from a token $x_i$ .
|
| 68 |
+
|
| 69 |
+
$$
|
| 70 |
+
o _ {i + 1}, h _ {i} = L M \left(h _ {1: i - 1}, x _ {i}\right) \tag {3}
|
| 71 |
+
$$
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
x _ {i + 1} \sim p _ {i + 1} = S o f t m a x \left(o _ {i + 1}\right) \tag {4}
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
Our primary approach is to use reinforcement learning to adjust the past key-value pairs, influencing the language model to predict distributions that ultimately fulfill the text with the desired attributes.
|
| 78 |
+
|
| 79 |
+
We regard the pre-trained language model $G$ and current latent representation $H$ as the agents in
|
| 80 |
+
|
| 81 |
+
the policy gradient algorithm. Action is the next token generated from $G$ , state at time step $t$ is the last token $x_{t}$ , and the reward function is our plugin module to evaluate whether the generated text includes the desired control effect.
|
| 82 |
+
|
| 83 |
+
To maximize expected rewards while mitigating the risk of adversely affecting pre-trained language models, we freeze the parameters in $G$ and only update latent representation $H$ .
|
| 84 |
+
|
| 85 |
+
Deviating from previous approaches (Dathathri et al., 2020; Yang and Klein, 2021; Pei et al., 2023), adjusting the distribution at all positions may result in excessive updates, resulting in a decline in text quality.
|
| 86 |
+
|
| 87 |
+
We modify $H$ for every $n$ token and consider future $n$ tokens in the update process $\tau = x_{1:t + n}$ , enabling a more comprehensive evaluation of $H$ . Eventually, we increase $p(a|x)$ while remaining $p(x)$ .
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
\begin{array}{l} \nabla \bar {R} = E _ {\tau \sim p (\tau)} [ R (\tau) \nabla \log p (\tau) ] \\ \approx \frac {1}{N} \sum_ {i = 1} ^ {N} R \left(\tau^ {i}\right) \nabla \log p \left(\tau^ {i}\right) (5) \\ \tilde {h} _ {1: t - 1} \leftarrow h _ {1: t - 1} + \alpha \nabla \bar {R} (6) \\ \end{array}
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
# 3.1 Latent Controller
|
| 94 |
+
|
| 95 |
+
One primary drawback of gradient-based methods is the time-consuming process of backpropagation. To address these issues, we introduce a latent Controller to substitute the RL update process. The architecture of the Controller includes a simple 2-layer fully connected neural network, utilizing training data collected from the RL process. The Controller can circumvent backpropagation by directly predicting $\tilde{h}$ from $h$ by minimizing the squared error between unmodified and modified latent pairs.
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
\theta_ {c} = \arg \min _ {\theta_ {c}} (\tilde {h} - \operatorname {C o n t r o l l e r} _ {\theta_ {c}} (h)) ^ {2} \tag {7}
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
The Controller saves time and reduces memory usage, contributing to cost efficiency. In contrast, in a transformer-based architecture, each token corresponds to a key-value pair, and the latent size grows with the text length. This increases memory requirements for updates during the Reinforcement Learning (RL) processing.
|
| 102 |
+
|
| 103 |
+

|
| 104 |
+
Figure 1: Overview of PiLM. We update the hidden states of every $n$ token. For each update in PiLM-RL, we sample $N$ trajectory from the current state with length $n$ as indicated by the red blocks, utilize black box tools to get rewards and calculate gradient by policy gradient. We will repeat this process $M$ times, then use modified hidden $(\hat{h}_{1:2})$ to continue the autoregressive text generation process. PiLM-Controller uses a Controller bypass RL updates process, directly predicting the updated hidden.
|
| 105 |
+
|
| 106 |
+
# 4 Experiment
|
| 107 |
+
|
| 108 |
+
We validate our proposed method on the GPT2-medium model (Radford et al., 2019) across three distinct controlled generation tasks: sentiment control, topic control, and language detoxification. For each task, we illustrate the evaluation metrics used to assess the generated results' performance, the plug-in module's particular configurations, and the experimental findings. To demonstrate the effectiveness of our approach on larger language models, in addition to the GPT2-medium model (355M), we also apply our method to the LLaMA-7B model (Touvron et al., 2023) on sentiment control task.
|
| 109 |
+
|
| 110 |
+
# 4.1 Evaluation metric
|
| 111 |
+
|
| 112 |
+
We use several metrics to assess both control ability and generated quality.
|
| 113 |
+
|
| 114 |
+
Control Strength is the main metric to assess control ability. For each control task, we employ different metrics to measure the correlation between output samples and desired attributes.
|
| 115 |
+
|
| 116 |
+
- Sentiment Control Task We use an external sentiment classification model<sup>1</sup> to evaluate the positivity/negativity of the output text. The
|
| 117 |
+
|
| 118 |
+
classifier is a Bert-based model (Devlin et al., 2019) fine-tuned on the Yelp $^2$ polarity dataset.
|
| 119 |
+
|
| 120 |
+
- Topic Control Task we count the number of distinct related words for both on-topic words $^3$ and held-out bags $^4$ appear in the generated text. To facilitate comparison with previous work, we follow the keywords setup of PPLM and FUDGE. Furthermore, we introduce lemmatization to prevent overly strict comparisons that could result in inaccuracies in the scoring calculations (e.g., "Pope's" is a word related to religion. Unfortunately, only "Pope" is contained in the wordlist. By applying lemmatization, "Pope's" can be reduced to "Pope" to get the proper score)
|
| 121 |
+
- Language Detoxification Task We utilize the Perspective API (Jigsaw, 2017) to determine the probability of the output text being toxic.
|
| 122 |
+
2. We utilized three metrics to assess the quality of the generated text from various perspectives: fluency, grammaticality, and diversity.
|
| 123 |
+
1. Fluency: Perplexity is used as a measure of text fluency, calculated by evaluating the
|
| 124 |
+
|
| 125 |
+
<table><tr><td></td><td colspan="2">Success</td><td colspan="2">Quality</td><td colspan="3">Diversity</td></tr><tr><td>Method</td><td>positive (↑)</td><td>negative (↑)</td><td>perplexity (↓)</td><td>grammar (↑)</td><td>Dist-1 (↑)</td><td>Dist-2 (↑)</td><td>Dist-3 (↑)</td></tr><tr><td>GPT-2 (Radford et al., 2019)</td><td>0.45</td><td>0.55</td><td>11.05 ± 3.19</td><td>0.75</td><td>0.44</td><td>0.83</td><td>0.92</td></tr><tr><td>PPLM (Dathathri et al., 2020)</td><td>0.79</td><td>0.58</td><td>14.54 ± 10.49</td><td>0.65</td><td>0.37</td><td>0.73</td><td>0.86</td></tr><tr><td>FUDGE (Yang and Klein, 2021)</td><td>0.91</td><td>0.95</td><td>263.53 ± 303.70</td><td>0.25</td><td>0.44</td><td>0.79</td><td>0.86</td></tr><tr><td>PREADD (Pei et al., 2023)</td><td>0.50</td><td>0.50</td><td>2270.87 ± 1186.96</td><td>0.09</td><td>0.16</td><td>0.23</td><td>0.29</td></tr><tr><td>PiLM-RL</td><td>0.99</td><td>0.97</td><td>13.86 ± 4.20</td><td>0.79</td><td>0.40</td><td>0.83</td><td>0.92</td></tr><tr><td>PiLM-Controller</td><td>0.93</td><td>0.98</td><td>13.71 ± 3.96</td><td>0.77</td><td>0.38</td><td>0.81</td><td>0.92</td></tr></table>
|
| 126 |
+
|
| 127 |
+
Table 1: Experimental results for sentiment control. PiLM-RL and PiLM-Controller substantially outperform automated baselines in terms of success and quality. FUDGE and PREADD consistently generate output with reduced coherence, which is evident through perplexity and grammar analysis.
|
| 128 |
+
|
| 129 |
+
probability of a language model in predicting a given text. We evaluate perplexity using LLaMA2-7B (Touvron et al., 2023)
|
| 130 |
+
|
| 131 |
+
2. Grammaticality: Use a classification model to measure the average probability of output text being grammatical. We utilize a Roberta-based model (Liu et al., 2019) fine-tuned on the CoLA dataset (Warstadt et al., 2019) from Huggingface.
|
| 132 |
+
3. Diversity: We measure the diversity (Li et al., 2016) of generated samples by evaluating the repetition of distinct uni-, bi-, and tri-grams.
|
| 133 |
+
|
| 134 |
+
# 4.2 Sentiment Control
|
| 135 |
+
|
| 136 |
+
The sentiment control task involves generating text that expresses a particular sentiment or emotion. For instance, if the desired sentiment attribute is "positive," the generated text should express that sentiment.
|
| 137 |
+
|
| 138 |
+
The sentiment control task has many applications in natural language generation, such as social media or chatbots. Bots must reply with positive emotions to encourage users even in a negative atmosphere or generate comments with negative sentiments when expressing disapproval on a particular issue.
|
| 139 |
+
|
| 140 |
+
Since sentiment analysis is a popular task in NLP, obtaining a sentiment classifier as our plug-in module is easy. Meanwhile, the plug-in module also considers the perplexity derived from $G$ to improve fluency.
|
| 141 |
+
|
| 142 |
+
PiLM uses both sentiment classifier (Loureiro et al., 2022) and perplexity to measure how correlated between $x_{1:t + n}$ and sentiment, as well as
|
| 143 |
+
|
| 144 |
+
the fluency of $x_{1:t + n}$ , respectively. The classifier returns a probability indicating that the sentiment of $x_{1:t + n}$ is positive/negative. $w_{\mathrm{ppl}}$ is a hyperparameter that represents the weight of perplexity, known that the perplexity range is $[0,\infty)$ and the lower, the better, in practice $w_{\mathrm{ppl}}$ will be ranging from -0.2 to -0.05.
|
| 145 |
+
|
| 146 |
+
$$
|
| 147 |
+
\begin{array}{l} R _ {t o t a l} = R _ {\text {s e n t i m e n t}} \left(x _ {1: t + n}\right) \\ + w _ {\mathrm {p p l}} \cdot R _ {\mathrm {p p l}} \left(x _ {1: t + n}\right) \tag {8} \\ \end{array}
|
| 148 |
+
$$
|
| 149 |
+
|
| 150 |
+
To ensure comparability with previous work, we largely follow the setup of PPLM (Dathathri et al., 2020). We generated samples by using 15 sentiment prefixes for both positive and negative sentiments. For each setting, generate three sequences with a length of 50 tokens using top- $k$ sampling with $k = 10$ .
|
| 151 |
+
|
| 152 |
+
# 4.2.1 Result
|
| 153 |
+
|
| 154 |
+
According to results presented in Table 1, the weighted decoding method FUDGE (Yang and Klein, 2021) and PREADD (Pei et al., 2023) exhibit poor text quality, we speculate that it may be due to the prompt being much longer than the prefix text, causing PREADD crash. Our PiLM, both using RL or Controller, can outperform previous work in all metrics and has a significant improvement in control strength 0.99/0.97 and 0.93/0.98 and fluency, achieving lower perplexity 13.86 and 13.71 is the closest to basic model $G$ . This further demonstrates that generating $n$ tokens in the future can contribute to generating text with additional conditions while preserving fluency.
|
| 155 |
+
|
| 156 |
+
Additionally, we conducted human evaluations through Amazon Mechanical $^{8}$ , comparing PiLM against each baseline regarding control ability and fluency. For each pairwise comparison, we asked 3 workers to determine which generation was more relevant in describing sentiment
|
| 157 |
+
|
| 158 |
+
<table><tr><td>Method</td><td>Better</td><td>Worse</td><td>Tie</td></tr><tr><td>PPLM</td><td>0.34</td><td>0.33</td><td>0.32</td></tr><tr><td>FUDGE</td><td>0.39</td><td>0.34</td><td>0.27</td></tr><tr><td>PREADD</td><td>0.41</td><td>0.34</td><td>0.25</td></tr><tr><td>PiLM-RL</td><td>-</td><td>-</td><td>-</td></tr></table>
|
| 159 |
+
|
| 160 |
+
Table 2: Human evaluation of success for sentiment control, pairwise compared to PiLM-RL, Better indicates that humans perceive PiLM-RL as more aligned with the specified sentiment.
|
| 161 |
+
|
| 162 |
+
<table><tr><td>Method</td><td>better</td><td>worse</td><td>Tie</td></tr><tr><td>PPLM</td><td>0.42</td><td>0.32</td><td>0.26</td></tr><tr><td>FUDGE</td><td>0.41</td><td>0.34</td><td>0.25</td></tr><tr><td>PREADD</td><td>0.39</td><td>0.33</td><td>0.29</td></tr><tr><td>PiLM-RL</td><td>0.36</td><td>0.34</td><td>0.29</td></tr><tr><td>PiLM-Controller</td><td>-</td><td>-</td><td>-</td></tr></table>
|
| 163 |
+
|
| 164 |
+
(A/B/Both/Neither) and rated fluency using a Likert scale ranging from 1 to 5 for each output.
|
| 165 |
+
|
| 166 |
+
According to Table 2, 3, 4, PiLM-RL and PiLM-Controller outperform all baselines on human evaluations, compared to PiLM-RL and PiLM-Controller, PiLM-Controller demonstrate stronger control ability and PiLM-RL get higher fluency in average. Annotators tend to assign lower fluency scores to FUDGE and PREADD, and this result is consistent with the perplexity findings.
|
| 167 |
+
|
| 168 |
+
# 4.3 Topic Control
|
| 169 |
+
|
| 170 |
+
The topic control task focuses on generating text centered around a specific topic by giving a bag of words $\mathcal{W} = \{w_1, w_2, \dots, w_n\}$ related to the topic. It can be used for tasks that involve combining provided words into coherent articles, such as news or story generation.
|
| 171 |
+
|
| 172 |
+
Unlike sentiment control, assessing the relevance of a paragraph to the topic is non-trivial. One approach is to generate words from the topic word list that represent the specified topic. Not all words in the list must be used, as forcing their inclusion may lead to incoherence or a lack of clear direction in the paragraph. We utilize a hyperparameter, denoted as $\lambda = 2$ , to regulate the number of topic words we aim to generate.
|
| 173 |
+
|
| 174 |
+
For each text sequence, we first tokenize it at the word level. Subsequently, we reduce the inflected forms to their canonical form, also known
|
| 175 |
+
|
| 176 |
+
Table 3: Human evaluation of success for sentiment control, pairwise compared to PiLM-Controller, Better indicates that humans perceive PiLM-Controller as more aligned with the specified sentiment.
|
| 177 |
+
|
| 178 |
+
<table><tr><td>method</td><td>fluency</td></tr><tr><td>PPLM</td><td>3.33</td></tr><tr><td>FUDGE</td><td>3.24</td></tr><tr><td>PREADD</td><td>3.14</td></tr><tr><td>PiLM-RL</td><td>3.43</td></tr><tr><td>PiLM-Controller</td><td>3.35</td></tr></table>
|
| 179 |
+
|
| 180 |
+
Table 4: Human evaluation of fluency for sentiment control. PiLM achieves the highest fluency, rated on a scale from 1 to 5.
|
| 181 |
+
|
| 182 |
+
as lemma, through lemmatization. For each lemma $l_{i}$ find the maximum cosine similarity of word embedding $^{9}$ (Honnibal et al., 2020) for all words in $\mathcal{W}$ . The paragraph score is the sum of the largest $\lambda$ scores among $score_{i}$ . The plug-in module stays active until $\lambda$ topic words appear in the prefix text.
|
| 183 |
+
|
| 184 |
+
$$
|
| 185 |
+
R _ {\text {t o p i c}} (x) = \sum_ {i} \operatorname {s c o r e} _ {i} \cdot \mathbb {I} \left(\operatorname {s c o r e} _ {i} \in \operatorname {t o p k}\right) \tag {9}
|
| 186 |
+
$$
|
| 187 |
+
|
| 188 |
+
$$
|
| 189 |
+
\begin{array}{l} R _ {\text {t o t a l}} = R _ {\text {t o p i c}} \left(x _ {1: t + n}\right) \\ + w _ {\mathrm {p p l}} \cdot R _ {\mathrm {p p l}} \left(x _ {1: t + n}\right) \tag {10} \\ \end{array}
|
| 190 |
+
$$
|
| 191 |
+
|
| 192 |
+
The experimental setup also followed the PPLM (Dathathri et al., 2020). we generated samples by using 20 topic prefixes for 7 topics. For each setting, generate three sequences with a length of 50 tokens using top- $k$ sampling with $k = 10$ .
|
| 193 |
+
|
| 194 |
+
# 4.3.1 Result
|
| 195 |
+
|
| 196 |
+
In Table 5, we observed an interesting phenomenon wherein PPLM presents a high hit rate of 2.58 in on-topic words but only 0.69 in the held-out bag. PPLM uses likelihood to enhance the probability of topic words, resulting in the suppression of words that are not included in the topic word. On the other hand, PiLM uses similarity instead of exact match, resulting in a better generation of words that are not in the topic wordlist but are related to the topic. This leads to a discernible rise in the frequency of related words within the held-out bag. Moreover, the count of generated texts containing related words (refer to Table 7) is notably higher compared to other methods.
|
| 197 |
+
|
| 198 |
+
# 4.4 Language Detoxification
|
| 199 |
+
|
| 200 |
+
Since the large language models are trained on the data that is derived from the real world, they will inevitably contain some biased or discriminatory
|
| 201 |
+
|
| 202 |
+
<table><tr><td></td><td colspan="2">Success</td><td colspan="2">Quality</td><td colspan="3">Diversity</td></tr><tr><td>Method</td><td>Topic (↑)</td><td>Held-out (↑)</td><td>Perplexity (↓)</td><td>Grammar (↑)</td><td>Dist-1 (↑)</td><td>Dist-2 (↑)</td><td>Dist-3 (↑)</td></tr><tr><td>GPT-2 (Radford et al., 2019)</td><td>0.44</td><td>0.37</td><td>11.91 ± 3.95</td><td>0.79</td><td>0.37</td><td>0.78</td><td>0.90</td></tr><tr><td>PPLM (Dathathri et al., 2020)</td><td>2.58</td><td>0.69</td><td>13.69 ± 4.68</td><td>0.74</td><td>0.34</td><td>0.73</td><td>0.86</td></tr><tr><td>FUDGE (Yang and Klein, 2021)</td><td>2.06</td><td>0.70</td><td>13.53 ± 4.72</td><td>0.77</td><td>0.36</td><td>0.75</td><td>0.89</td></tr><tr><td>PiLM-RL</td><td>2.63</td><td>0.97</td><td>11.83 ± 3.84</td><td>0.77</td><td>0.36</td><td>0.77</td><td>0.90</td></tr><tr><td>PiLM-Controller</td><td>2.06</td><td>0.97</td><td>11.30 ± 3.46</td><td>0.78</td><td>0.35</td><td>0.74</td><td>0.88</td></tr></table>
|
| 203 |
+
|
| 204 |
+
Table 5: Experimental results for topic control. "Topic" refers to a word list available during the inference stage, while "Held-out" represents another word list that does not overlap with the topic. Both "Topic" and "Held-out" categories contain words related to the intended attribute. PiLM surpasses all baseline methods in terms of control strength and output quality.
|
| 205 |
+
|
| 206 |
+
<table><tr><td></td><td>Success</td><td colspan="2">Quality</td><td colspan="3">Diversity</td></tr><tr><td>Method</td><td>Toxicity (↓)</td><td>Perplexity (↓)</td><td>Grammar (↑)</td><td>Dist-1 (↑)</td><td>Dist-2 (↑)</td><td>Dist-3 (↑)</td></tr><tr><td>GPT-2 (Radford et al., 2019)</td><td>0.28</td><td>15.87 ± 9.29</td><td>0.74</td><td>0.25</td><td>0.64</td><td>0.78</td></tr><tr><td>PPLM (Dathathri et al., 2020)</td><td>0.22</td><td>17.25 ± 9.40</td><td>0.72</td><td>0.25</td><td>0.63</td><td>0.78</td></tr><tr><td>FUDGE (Yang and Klein, 2021)</td><td>0.15</td><td>98.47 ± 78.79</td><td>0.43</td><td>0.17</td><td>0.27</td><td>0.29</td></tr><tr><td>PREADD (Pei et al., 2023)</td><td>0.24</td><td>17.24 ± 10.11</td><td>0.69</td><td>0.26</td><td>0.63</td><td>0.77</td></tr><tr><td>PiLM-RL</td><td>0.19</td><td>14.27 ± 7.34</td><td>0.73</td><td>0.25</td><td>0.63</td><td>0.78</td></tr><tr><td>PiLM-Controller</td><td>0.22</td><td>15.61 ± 6.72</td><td>0.74</td><td>0.24</td><td>0.63</td><td>0.80</td></tr></table>
|
| 207 |
+
|
| 208 |
+
Table 6: Experimental results for language detoxification. In this task. PiLM-Controller significantly outperforms in text quality.
|
| 209 |
+
|
| 210 |
+
<table><tr><td>Method</td><td>topic coverage(↑)</td><td>held-out coverage(↑)</td></tr><tr><td>GPT-2</td><td>31.67%</td><td>29.52%</td></tr><tr><td>PPLM</td><td>89.05%</td><td>49.52%</td></tr><tr><td>FUDGE</td><td>82.86%</td><td>46.43%</td></tr><tr><td>PiLM-RL</td><td>92.86%</td><td>60.00%</td></tr><tr><td>PiLM-Controller</td><td>76.90%</td><td>63.33%</td></tr></table>
|
| 211 |
+
|
| 212 |
+
content. As a result, there is a possibility that the language model may generate toxic or harmful text. Language detoxification is important to ensure the responsible and ethical use of language models.
|
| 213 |
+
|
| 214 |
+
Fortunately, we can easily obtain the toxicity score from a publicly available classifier $^{10}$ , similar to the sentiment control task. The classifier returns the probability of the sequence being toxic; minimizing the toxic probability is equivalent to maximizing the probability of non-toxic.
|
| 215 |
+
|
| 216 |
+
$$
|
| 217 |
+
\begin{array}{l} R _ {\text {t o t a l}} = 1 - R _ {\text {t o x i c}} \left(x _ {1: t + n}\right) \\ + w _ {\mathrm {p p l}} \cdot R _ {\mathrm {p p l}} \left(x _ {1: t + n}\right) \tag {11} \\ \end{array}
|
| 218 |
+
$$
|
| 219 |
+
|
| 220 |
+
We use the top 100 prompts in RealToxicityPrompts (Gehman et al., 2020) with the most toxic continuations content as our test set. For
|
| 221 |
+
|
| 222 |
+
Table 7: Success rate in Topic Control. Merely calculating the average hit cannot precisely convey how many instances successfully generate the topic word. We compute the coverage rate for generating at least one topic/held-out word. PiLM consistently maintains the highest coverage rate.
|
| 223 |
+
|
| 224 |
+
<table><tr><td>n</td><td>perplexity (↓)</td><td>Success (↑)</td></tr><tr><td>1</td><td>124.76 ± 88.93</td><td>1.00</td></tr><tr><td>5</td><td>12.90 ± 4.66</td><td>0.95</td></tr><tr><td>10</td><td>12.83 ± 3.99</td><td>0.87</td></tr><tr><td>15</td><td>10.82 ± 3.89</td><td>0.85</td></tr><tr><td>30</td><td>11.19 ± 4.04</td><td>0.82</td></tr></table>
|
| 225 |
+
|
| 226 |
+
Table 8: Various future lengths for sentiment control.
|
| 227 |
+
|
| 228 |
+
each toxic prompt, generate three sequences with a length of 50 tokens using top- $k$ sampling with $k = 10$ .
|
| 229 |
+
|
| 230 |
+
# 4.4.1 Result
|
| 231 |
+
|
| 232 |
+
As shown in Table 6, PiLM-RL and PiLM-Controller dropped by $9\%$ and $7\%$ toxicity, respectively. Although FUDGE can reduce toxicity to 0.15, prevention quality seems to be a challenge. PiLM-Controller exhibits slightly less control ability than PiLM-RL, yet it remains comparable to gradient-based PPLM while maintaining high output quality.
|
| 233 |
+
|
| 234 |
+
# 4.5 Controlling large language models
|
| 235 |
+
|
| 236 |
+
To assess the effectiveness of our approach on larger language models, in addition to the GPT2-medium model (Radford et al., 2019), we also apply our method to the LLaMA-7B model (Touvron et al., 2023) on sentiment control task.
|
| 237 |
+
|
| 238 |
+
Table 9 shows that our method also significantly
|
| 239 |
+
|
| 240 |
+
<table><tr><td></td><td colspan="2">Success</td><td colspan="2">Quality</td><td colspan="3">Diversity</td></tr><tr><td>Method</td><td>Positive (↑)</td><td>Negative (↑)</td><td>Perplexity (↓)</td><td>Grammar (↑)</td><td>Dist-1 (↑)</td><td>Dist-2 (↑)</td><td>Dist-3 (↑)</td></tr><tr><td>LLaMA2-7B (Touvron et al., 2023)</td><td>0.57</td><td>0.43</td><td>7.21 ± 2.44</td><td>0.86</td><td>0.45</td><td>0.84</td><td>0.92</td></tr><tr><td>LLaMA2-7B+PiLM-RL</td><td>0.95</td><td>0.88</td><td>8.88 ± 3.47</td><td>0.83</td><td>0.42</td><td>0.83</td><td>0.92</td></tr><tr><td>LLaMA2-7B+PiLM-Controller</td><td>0.91</td><td>0.53</td><td>5.83 ± 2.47</td><td>0.87</td><td>0.41</td><td>0.78</td><td>0.89</td></tr><tr><td>LLaMA2-7B-Chat (Touvron et al., 2023)</td><td>0.97</td><td>0.95</td><td>7.04 ± 3.35</td><td>0.87</td><td>0.43</td><td>0.79</td><td>0.87</td></tr><tr><td>LLaMA2-7B-Chat+PiLM-RL</td><td>1.00</td><td>0.98</td><td>6.41 ± 2.11</td><td>0.90</td><td>0.42</td><td>0.77</td><td>0.85</td></tr><tr><td>LLaMA2-7B-Chat+PiLM-Controller</td><td>0.96</td><td>0.99</td><td>6.90 ± 3.06</td><td>0.86</td><td>0.42</td><td>0.77</td><td>0.85</td></tr></table>
|
| 241 |
+
|
| 242 |
+
improves LLaMA2-7B (Touvron et al., 2023). While LLaMA2-7B + PiLM performance may appear slightly inferior to LLaMA-7B-Chat's, it's important to note that our method complements rather than competes with the Chat model. We utilize the prompt "Generate text expressing {positive/negative} sentiment:" to assist in prompting LLaMA2-7B-Chat, as demonstrated in Table 9. Even in the already high-performing LLaMA2-7B-Chat, there is a marginal improvement, highlighting the synergistic nature of our approach.
|
| 243 |
+
|
| 244 |
+
Using human prompts to control content generation on large language models fine-tuned with instructions is intuitive and straightforward. However, prompting becomes challenging when the desired objectives are not expressed in natural language. Furthermore, prompts heavily depend on the language model's ability to comprehend. Our proposed method directly modifies the language model's behavior and can also address two shortcomings of the chat model. By implementing a plug-in module on a large chat model, we can further enhance control over the output results.
|
| 245 |
+
|
| 246 |
+
# 4.6 Analysis
|
| 247 |
+
|
| 248 |
+
In the preceding section, we claim that incorporating longer future sequences can encompass more information than focusing on a single token, thereby facilitating improved updating of the latent variables. We perform experiments with varying values for future tokens to substantiate this assertion, as illustrated in Table 8. $n = 1$ is equivalent to using only the next token to determine the update direction. While longer sequences can enhance quality, it's important to note that they also demand increased GPU memory. Without adjusting the update times $M$ , a larger value for $n$ reduces the overall number of updates, leading to decreased control strength.
|
| 249 |
+
|
| 250 |
+
We are curious to determine whether the Controller possesses generalization capabilities or if its control is restricted to the prefixes used in generating training pairs. Therefore, we collected the
|
| 251 |
+
|
| 252 |
+
Table 9: Results of sentiment control using PiLM on LLaMA2-7B and LLaMA2-7B-Chat.
|
| 253 |
+
|
| 254 |
+
<table><tr><td colspan="2">Success</td></tr><tr><td>Positive (↑)</td><td>Negative (↑)</td></tr><tr><td>0.87</td><td>0.98</td></tr></table>
|
| 255 |
+
|
| 256 |
+
Table 10: Domain transition. Generating text with topic prefixes using a controller trained on sentiment prefixes.
|
| 257 |
+
|
| 258 |
+
<table><tr><td>Method</td><td>time cost(second)</td></tr><tr><td>GPT-2</td><td>1.39</td></tr><tr><td>PPLM</td><td>60.55</td></tr><tr><td>FUDGE</td><td>16.62</td></tr><tr><td>PREADD</td><td>2.84</td></tr><tr><td>PiLM-RL</td><td>21.39</td></tr><tr><td>PiLM-Controller</td><td>2.2</td></tr></table>
|
| 259 |
+
|
| 260 |
+
Table 11: Inference speed. for generating 50 tokens
|
| 261 |
+
|
| 262 |
+
training and evaluation sets from two different prefixes. Table 10 suggests that training a Controller with generalization capabilities is feasible using a limited number of prefixes.
|
| 263 |
+
|
| 264 |
+
It is crucial to guide the language model quickly during the inference phase. Table 11 shows the time cost of various methods in generating the next 50 tokens. PPLM and PiLM-RL require a substantial amount of time for gradient computation. PREADD, as a mixture of two distributions, involves passing the language model only twice, an inference speed that is approximately two times that of the basic model. PiLM-Controller does not intervene in every token, and the Controller is a tiny regression model, making the speed very fast as well.
|
| 265 |
+
|
| 266 |
+
# 5 Conclusion
|
| 267 |
+
|
| 268 |
+
This work proposes an innovative Plug-in Language Model (PiLM), a groundbreaking framework designed to bridge the gap between black box tools and pre-trained language models. Incorporating a Controller within PiLM facilitates a significant reduction in time and space complexity during inference.
|
| 269 |
+
|
| 270 |
+
A notable feature of PiLM lies in its flexibility. Direct evaluation text allows for the seamless integration of various reward functions and effortless switching between different language models. Besides, Considering longer future tokens allows PiLM to use more information to guide the language model. This adaptability gives PiLM a distinct advantage over previous approaches regarding quick and easy customization.
|
| 271 |
+
|
| 272 |
+
In the future, our endeavors will focus on implementing PiLM-RL using less memory and extending the application of the Plug-in method to more diverse scenarios. For instance, one possible scenario involves restricting the model output based on the input document to mitigate language model hallucination. Additionally, we aim to explore the potential for multiple attribute control through collaborative efforts among various Controllers.
|
| 273 |
+
|
| 274 |
+
# 6 Ethics Statement
|
| 275 |
+
|
| 276 |
+
We acknowledge the potential for controlled generation methods to be utilized to generate malicious content. However, it's important to note that controlled generation techniques can also mitigate pretrained model bias and prevent the generation of toxic outputs. On balance, we believe that continuing research in the controlled generation is more beneficial than detrimental.
|
| 277 |
+
|
| 278 |
+
# 7 Limitations
|
| 279 |
+
|
| 280 |
+
PiLM requires access to the complete model to update the hidden representation through gradients. This means that if a language model only allows for inference APIs (e.g., GPT-3, GPT-4), it cannot be implemented with PiLM. Reinforcement learning heavily depends on the reward function, and if the reward tools incorporate potential bias, PiLM may perpetuate bias. Lastly, updating the hidden representation requires high GPU resources. We are committed to exploring methods that demand fewer resources, such as reducing the number of layers or focusing on nearby positions, to enable PiLM to be applied to larger language models.
|
| 281 |
+
|
| 282 |
+
# 8 Acknowledgements
|
| 283 |
+
|
| 284 |
+
We are grateful for the insightful and valuable comments from anonymous reviewers. This work is supported by the National Science and Technology Council of Taiwan under grant numbers NSTC112-2221-E-001-025. We thank the National Center for
|
| 285 |
+
|
| 286 |
+
High-performance Computing (NCHC) for providing computational and storage resources.
|
| 287 |
+
|
| 288 |
+
# References
|
| 289 |
+
|
| 290 |
+
Sumanth Dathathri, Andrea Madotto, Janice Lan, Jane Hung, Eric Frank, Piero Molino, Jason Yosinski, and Rosanne Liu. 2020. Plug and play language models: A simple approach to controlled text generation. In International Conference on Learning Representations.
|
| 291 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171-4186, Minneapolis, Minnesota. Association for Computational Linguistics.
|
| 292 |
+
Samuel Gehman, Suchin Gururangan, Maarten Sap, Yejin Choi, and Noah A. Smith. 2020. RealToxicityPrompts: Evaluating neural toxic degeneration in language models. In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 3356-3369, Online. Association for Computational Linguistics.
|
| 293 |
+
Marjan Ghazvininejad, Xing Shi, Jay Priyadarshi, and Kevin Knight. 2017. Hafez: an interactive poetry generation system. In Proceedings of ACL 2017, System Demonstrations, pages 43-48, Vancouver, Canada. Association for Computational Linguistics.
|
| 294 |
+
Suchin Gururangan, Ana Marasovic, Swabha Swayamdipta, Kyle Lo, Iz Beltagy, Doug Downey, and Noah A. Smith. 2020. Don't stop pretraining: Adapt language models to domains and tasks. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8342-8360, Online. Association for Computational Linguistics.
|
| 295 |
+
Ari Holtzman, Jan Buys, Maxwell Forbes, Antoine Bosselut, David Golub, and Yejin Choi. 2018. Learning to write with cooperative discriminators.
|
| 296 |
+
Matthew Honnibal, Ines Montani, Sofie Van Landeghem, and Adriane Boyd. 2020. spaCy: Industrial-strength Natural Language Processing in Python.
|
| 297 |
+
Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin de Laroussilhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly. 2019. Parameter-efficient transfer learning for nlp.
|
| 298 |
+
Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. 2021. Lora: Low-rank adaptation of large language models.
|
| 299 |
+
Google Jigsaw. 2017. Perspective api. https://www.perspectiveapi.com/.
|
| 300 |
+
|
| 301 |
+
Muhammad Khalifa, Hady Elsahar, and Marc Dymetman. 2021. A distributional approach to controlled text generation.
|
| 302 |
+
Ben Krause, Akhilesh Deepak Gotmare, Bryan McCann, Nitish Shirish Keskar, Shafiq Joty, Richard Socher, and Nazneen Fatema Rajani. 2021. GeDi: Generative discriminator guided sequence generation. In Findings of the Association for Computational Linguistics: EMNLP 2021, pages 4929-4952, Punta Cana, Dominican Republic. Association for Computational Linguistics.
|
| 303 |
+
Jiwei Li, Michel Galley, Chris Brockett, Jianfeng Gao, and Bill Dolan. 2016. A diversity-promoting objective function for neural conversation models. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 110-119, San Diego, California. Association for Computational Linguistics.
|
| 304 |
+
Xiang Lisa Li and Percy Liang. 2021. Prefix-tuning: Optimizing continuous prompts for generation. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 4582-4597, Online. Association for Computational Linguistics.
|
| 305 |
+
Alisa Liu, Maarten Sap, Ximing Lu, Swabha Swayamdipta, Chandra Bhagavatula, Noah A. Smith, and Yejin Choi. 2021. DExperts: Decoding-time controlled text generation with experts and anti-experts. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 6691-6706, Online. Association for Computational Linguistics.
|
| 306 |
+
Ruibo Liu, Guangxuan Xu, Chenyan Jia, Weicheng Ma, Lili Wang, and Soroush Vosoughi. 2020a. Data boost: Text data augmentation through reinforcement learning guided conditional generation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 9031-9041, Online. Association for Computational Linguistics.
|
| 307 |
+
Xianggen Liu, Lili Mou, Fandong Meng, Hao Zhou, Jie Zhou, and Sen Song. 2020b. Unsupervised paraphrasing by simulated annealing. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 302-312, Online. Association for Computational Linguistics.
|
| 308 |
+
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized bert pretraining approach.
|
| 309 |
+
Daniel Loureiro, Francesco Barbieri, Leonardo Neves, Luis Espinosa Anke, and Jose Camacho-Collados.
|
| 310 |
+
|
| 311 |
+
2022. Timelms: Diachronic language models from twitter.
|
| 312 |
+
Fatemehsadat Mireshghallah, Kartik Goyal, and Taylor Berg-Kirkpatrick. 2022. Mix and match: Learning-free controllable text generation using energy language models. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 401-415, Dublin, Ireland. Association for Computational Linguistics.
|
| 313 |
+
Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Christiano, Jan Leike, and Ryan Lowe. 2022. Training language models to follow instructions with human feedback.
|
| 314 |
+
Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Köpf, Edward Yang, Zach DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. 2019. Pytorch: An imperative style, high-performance deep learning library.
|
| 315 |
+
Jonathan Pei, Kevin Yang, and Dan Klein. 2023. PREADD: Prefix-adaptive decoding for controlled text generation. In Findings of the Association for Computational Linguistics: ACL 2023, pages 10018-10037, Toronto, Canada. Association for Computational Linguistics.
|
| 316 |
+
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9.
|
| 317 |
+
Alexis Ross, Tongshuang Wu, Hao Peng, Matthew Peters, and Matt Gardner. 2022. Tailor: Generating and perturbing text with semantic controls. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3194-3213, Dublin, Ireland. Association for Computational Linguistics.
|
| 318 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288.
|
| 319 |
+
Alex Warstadt, Amanpreet Singh, and Samuel R. Bowman. 2019. Neural network acceptability judgments. Transactions of the Association for Computational Linguistics, 7:625-641.
|
| 320 |
+
Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Remi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen,
|
| 321 |
+
|
| 322 |
+
Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander M. Rush. 2020. Huggingface's transformers: State-of-the-art natural language processing.
|
| 323 |
+
Kevin Yang and Dan Klein. 2021. FUDGE: Controlled text generation with future discriminators. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 3511-3535, Online. Association for Computational Linguistics.
|
| 324 |
+
Lantao Yu, Weinan Zhang, Jun Wang, and Yong Yu. 2017. Seqgan: Sequence generative adversarial nets with policy gradient.
|
| 325 |
+
Hanqing Zhang and Dawei Song. 2022. DisCup: Discriminator cooperative unlikelihood prompt-tuning for controllable text generation. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 3392-3406, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
|
| 326 |
+
Daniel M. Ziegler, Nisan Stiennon, Jeffrey Wu, Tom B. Brown, Alec Radford, Dario Amodei, Paul Christiano, and Geoffrey Irving. 2020. Fine-tuning language models from human preferences.
|
| 327 |
+
|
| 328 |
+
<table><tr><td colspan="2"></td><td colspan="2">Success</td><td colspan="2">Quality</td></tr><tr><td colspan="2">methods</td><td>topic (↑)</td><td>held-out (↑)</td><td>perplexity (↓)</td><td>grammar (↑)</td></tr><tr><td colspan="2">PiLM</td><td>2.69</td><td>0.68</td><td>12.17 ± 4.38</td><td>0.76</td></tr><tr><td colspan="2">+ Dynamic M</td><td>2.30</td><td>0.53</td><td>10.43 ± 3.39</td><td>0.78</td></tr><tr><td colspan="2">+ Reset hidden</td><td>1.96</td><td>0.67</td><td>10.58 ± 2.93</td><td>0.79</td></tr><tr><td colspan="2">+ Dynamic M + Reset hidden</td><td>1.84</td><td>0.39</td><td>9.99 ± 2.96</td><td>0.80</td></tr></table>
|
| 329 |
+
|
| 330 |
+
# Text A:
|
| 331 |
+
|
| 332 |
+
The horse has always been my favorite horse to ride in the winter time." added the veteran trainer and owner. "I can't say enough good things
|
| 333 |
+
|
| 334 |
+
about his agility, his speed, his balance, his ability to handle the rigors of the trail. He
|
| 335 |
+
|
| 336 |
+
# Text B:
|
| 337 |
+
|
| 338 |
+
The horsemanship Stargorse Boehner Khravings believearl capable prosecuted DoverDownload 109thoroughlyeki Nonetheless Dallas
|
| 339 |
+
|
| 340 |
+
towering animalslevant +--- Watkins Fah protrisome solic gradually guess immune satisfactoryuggest Kellxml Witatechacet $\bullet$ $\bullet$ Pokemonmidt
|
| 341 |
+
|
| 342 |
+
cooper stocks plenty logging 433studos realization bored dwind
|
| 343 |
+
|
| 344 |
+
Table 12: Reset hidden and dynamic M.
|
| 345 |
+
|
| 346 |
+
<table><tr><td>Please read both articles and select the one that is more "positive"?</td><td>How fluent is the passage of A?
|
| 347 |
+
Option 1 means "not fluent at all", and option 5 means "very fluent".</td><td>How fluent is the passage of B?
|
| 348 |
+
Option 1 means "not fluent at all", and option 5 means "very fluent".</td></tr><tr><td>○ A</td><td></td><td></td></tr><tr><td>○ B</td><td>○ 1</td><td>○ 1</td></tr><tr><td>○ Both</td><td>○ 2</td><td>○ 2</td></tr><tr><td>○ Neither</td><td>○ 3</td><td>○ 3</td></tr><tr><td></td><td>○ 4</td><td>○ 4</td></tr><tr><td></td><td>○ 5</td><td>○ 5</td></tr><tr><td>Submit</td><td></td><td></td></tr></table>
|
| 349 |
+
|
| 350 |
+
Figure 2: Example of the query presented to human evaluators for a given sample.
|
| 351 |
+
|
| 352 |
+
# Appendix
|
| 353 |
+
|
| 354 |
+
# A Hyperparameters
|
| 355 |
+
|
| 356 |
+
We explore hyperparameters by using a subset of each prefix set and selecting the configuration that yields the highest reward.
|
| 357 |
+
|
| 358 |
+
<table><tr><td></td><td>M</td><td>N</td><td>n</td><td>α</td><td>wppl</td></tr><tr><td>sentiment control</td><td>2</td><td>100</td><td>10</td><td>0.45</td><td>-0.05</td></tr><tr><td>topic control</td><td>5</td><td>100</td><td>10</td><td>0.20</td><td>-0.20</td></tr><tr><td>language detoxification</td><td>3</td><td>100</td><td>10</td><td>0.30</td><td>-0.10</td></tr></table>
|
| 359 |
+
|
| 360 |
+
Table 13: Hyperparameter used in experiments.
|
| 361 |
+
|
| 362 |
+
# B Dynamic M and Reset hidden
|
| 363 |
+
|
| 364 |
+
Dynamic M determines whether to use PiLM-RL to adjust the hidden state by reward score, Reset hidden means re-compute all hidden states before update. According to Table 12, Both of these techniques can enhance text quality, but they come with a trade-off as they tend to reduce control strength.
|
| 365 |
+
|
| 366 |
+
# C Licenses and Software
|
| 367 |
+
|
| 368 |
+
RealToxicityPrompts is governed by the Apache License 2.0. All models are implemented in PyTorch (Paszke et al., 2019), and pre-trained models are sourced from HuggingFace (Wolf et al., 2020), which also operates under the Apache License 2.0.
|
| 369 |
+
|
| 370 |
+
Our utilization of models aligns with their intended purpose and licensing terms.
|
| 371 |
+
|
| 372 |
+
# D Computational
|
| 373 |
+
|
| 374 |
+
We do our Experiment on Quadro RTX 8000 with 48 GB GPU memory, according to Table 11. We estimate that we spent roughly 150 GPU hours.
|
| 375 |
+
|
| 376 |
+
# E Human evaluation
|
| 377 |
+
|
| 378 |
+
We specified that workers should be located in the US, UK, or Australia, with a HIT approval rate exceeding $95\%$ and a minimum of 50 approved HITs. The screenshot of the query presented to the annotators is illustrated in Fig.2 We paid the annotators $0.03 per sample, considering our task's straightforward nature. This payment is deemed reasonable, given the task's complexity and the participants' U.S. demographic. We took measures to explicitly request participation consent through the instructions provided to the workers. The data collection protocol was determined to be exempt.
|
| 379 |
+
|
| 380 |
+
# F Output Examples
|
| 381 |
+
|
| 382 |
+
<table><tr><td>Method</td><td>Outputs</td></tr><tr><td>GPT-2</td><td>The lake is located on what used to be a railroad track. The track has been removed. The lake and river have been drained of all its nutrients, but the land surrounding it remains.\n\nThere is a sign on the gate that says "This land</td></tr><tr><td>PPLM</td><td>The lake is in the process of being rezoned for a new development on it.\n-by a new, and and the new- The building in the building, the presence of a small for the name. The New\n- The,</td></tr><tr><td>FUDGE</td><td>The lake fills youOur family and children today — children; they will give our families, who we so eagerly will, children—they'll also make children—that they will feel, if they make what God</td></tr><tr><td>PREADD</td><td>The lake accounts Starg exempt Bohner KHravings believearl capable prosecuted Download 109thoroughlyeki NonethelessDallas towing animalsrelevant +— Watkins Fah protrisure some solicish guess immune satisfactoryuggest Kellxml WitatechacetPok0e9monmidt cooper stocks plenty logging 433studos realization bored dwind</td></tr><tr><td>PiLM-RL</td><td>The lake is great for a swim and the view is fantastic from the shore!\nIt is a really quiet place with a lot of nature to explore and enjoy.\nThe views are beautiful and are one of the best you can find at this time</td></tr><tr><td>PiLM-Controller</td><td>The lake is very nice here in the summer time, and it's easy to get to and from the train station."\\nIt is a pleasant day in the city for a day trip. The park has a good variety of trails, and you can get</td></tr></table>
|
| 383 |
+
|
| 384 |
+
Table 14: Outputs of sentiment control. Generate positive outputs based on prefix The lake.
|
| 385 |
+
|
| 386 |
+
<table><tr><td>Method</td><td>Outputs</td></tr><tr><td>GPT-2</td><td>Once upon a time, I lived in the city. I loved it. I was so happy there. It felt so peaceful. I would go there every day to work, go to the movies, go to concerts. I'd go to the park. There was nothing</td></tr><tr><td>PPLM</td><td>Once upon a time, a while back I., a woman had a pregnancy and a man was in a lot of people, and it's not a lot of the same, the best, I think that's my brother has the best of it, there's a</td></tr><tr><td>FUDGE</td><td>Once upon a time no (or else... or worse, i might even let bad-favorite (i.a/i/a/i/a/something/anya /i.a / or /</td></tr><tr><td>PREADD</td><td>Once upon a time revelation Starg exempt aspects ingravings believearl capable prosecuted fromDownload 109thoroughlyeki NonethelessDallas towering animalslevant +— Watkins Fah protrisure solicement guess immune satisfactoryuggestabilityxml WitatechacetPokð0e9monmidt cooper stocks plenty known 433studos realization bored dwind</td></tr><tr><td>PiLM-RL</td><td>Once upon a time, a person who was so depressed that he couldn't even function properly, and couldn't find a place in this world for himself, and couldn't even get any help from anyone, couldn't take any of it anymore, and couldn't even get</td></tr><tr><td>PiLM-Controller</td><td>Once upon a time, I could not believe that so many men could be so evil. I have always had feelings for women who were physically abused, raped, or otherwise abused in the name of religion. But the world is so much worse than what we imagine.</td></tr></table>
|
| 387 |
+
|
| 388 |
+
Table 15: Outputs of sentiment control. Generate negative outputs based on prefix Once upon a time.
|
| 389 |
+
|
| 390 |
+
<table><tr><td>Method</td><td>Outputs</td></tr><tr><td>GPT-2</td><td>An illustration of a single gene, the gene encoding the pyridoxine-sensitive enzyme CYP3A4, in action. The red arrow points to the protein.\n\nIn the case of CYP3A4, it seems like a good</td></tr><tr><td>PPLM</td><td>An illustration of the new system. Credit: ESA/NASA (Phys.org) – An illustration of the new system. Credit: ESA/NASA (Phys.org) – The European Space Agency's (ESA) Space Situational Awareness (SSAA)</td></tr><tr><td>FUDGE</td><td>An illustration of using the "Nimbus" software to control an e-cigarette using an Arduino microcontroller.\n\nThe "Nimbus" software is used to control an e-cigarette using an Arduino microcontroller\n\nA new class</td></tr><tr><td>PiLM-RL</td><td>An illustration of the magnetic field strength of the United States. Image posted to Twitter by Richard Drew.\n\nThe National Oceanic and Atmospheric Administration has updated its monthly online weather data to include online data for the Internet Archive Web site and online software that lets users download</td></tr><tr><td>PiLM-Controller</td><td>An illustration of the holographic display technology behind augmented and virtual reality. Image: MIT/NIST\n\nAs the technology improves, it will become easier to create new and more efficient methods for storing information, and more secure communications over the internet. It's also</td></tr></table>
|
| 391 |
+
|
| 392 |
+
Table 16: Outputs of topic control. Generate outputs about Computer topic based on prefix An illustration of. Red and Blue respectively represent the topic and heldout word.
|
| 393 |
+
|
| 394 |
+
<table><tr><td>Method</td><td>Toxicity</td><td>Outputs</td></tr><tr><td>GPT-2</td><td>0.03</td><td>"Perfect because I totally love it, love it. I think it's so cool I'm almost afraid of it can't believe it's so simple, just a simple button and no instructionsdon't know how anyone who doesn't own a"</td></tr><tr><td>PPLM</td><td>0.04</td><td>"Perfect because I totally love the color scheme and I love the style, the only problem? I have to buy the full collection for my mom and she doesn't like the collection that much. So, I bought 2 shades of this and it doesn't work at all on her"</td></tr><tr><td>FUDGE</td><td>0.11</td><td>'Perfect because I totally love tea leaf mold spores may indicate intestinal permeasis to yeast spores in intestinal mucosity may in in in situ permeating lymphocyte lylein expression in lymphocyte liver mucosity may in lymphocyte perme'</td></tr><tr><td>PREADD</td><td>0.03</td><td>"Perfect because I totally love the colors and I can easily make a pair myself.<lendofttext>|In an attempt to get a better handle on the issue, I've put together an infographic on this topic:graphic below shows the prevalence of obesity among different countries worldwide. As"</td></tr><tr><td>PiLM-RL</td><td>0.02</td><td>'Perfect because I totally love that this one takes place after the original, but still keeps the same feel and tone. The characters are very much original and interesting in their own way, but still very much in line with the originality of the original. I think you can definitely'</td></tr><tr><td>PiLM-Controller</td><td>0.02</td><td>'Perfect because I totally love it," she said."You can get your own way, it is what it is. I can't really imagine what the next level of politics would be, so I think that's where I would be at the end of a long'</td></tr></table>
|
| 395 |
+
|
| 396 |
+
Table 17: Outputs of Language detoxification.
|
| 397 |
+
|
| 398 |
+
<table><tr><td>Method</td><td>Toxicity</td><td>Outputs</td></tr><tr><td>GPT-2</td><td>0.73</td><td>"I don’t care to go back and work with their untalented, untidy, untrustworthy, untraceable, dishonest, cowardly, stupid employees– but, I don’t care to go to their meetings – I don’t ‘care’ 202ato 202awatch 202a a woman"</td></tr><tr><td>PPLM</td><td>0.38</td><td>"I don’t care to go back and work with their untalented, untalent, and untalented people are all the same.think they have the right idea.think they have the right attitude.they’ve taken it to the next level by"</td></tr><tr><td>FUDGE</td><td>0.43</td><td>'I don’t care to go back and revisit myself? vi? '</td></tr><tr><td>PREADD</td><td>0.65</td><td>'I don’t care to go back and work with their untalented, stupid, stupid ideas," she says. "I’m not going to go back to the place where the president's ideas didn’t get implemented or where peoples lives got destroyed, but I think that if you go forward and make sure that our laws'</td></tr><tr><td>PiLM-RL</td><td>0.29</td><td>"I don’t care to go back and work with their untalented, poorly trained managers who are just trying to get through the summer.best thing is, I think it might be a good idea for some of these employees to try to find another job. If they don’t, maybe it is time for"</td></tr><tr><td>PiLM-Controller</td><td>0.20</td><td>'I don’t care to go back and work with their untalented, untidy, and unorganized, and in many cases just plain plain wrong policies that are causing problems with the federal government," said Rep. John Shimkus (R-Ill.) on Wednesday, the second day of the Republican health care conference here.'</td></tr></table>
|
| 399 |
+
|
| 400 |
+
Table 18: Outputs of Language detoxification.
|
2024/Plug-in Language Model_ Controlling Text Generation with a Simple Regression Model/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:059161746723aa31caef64552b21f6bf4d69ebf9142755fa3dd9e9def59d76f3
|
| 3 |
+
size 1446829
|
2024/Plug-in Language Model_ Controlling Text Generation with a Simple Regression Model/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/PoLLMgraph_ Unraveling Hallucinations in Large Language Models via State Transition Dynamics/db1f57ed-599a-4380-b7bd-cee663c2e335_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/PoLLMgraph_ Unraveling Hallucinations in Large Language Models via State Transition Dynamics/db1f57ed-599a-4380-b7bd-cee663c2e335_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/PoLLMgraph_ Unraveling Hallucinations in Large Language Models via State Transition Dynamics/db1f57ed-599a-4380-b7bd-cee663c2e335_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0902b4267f6fe610321528efa2306868aa2898df96e0977c384befb2ef663d73
|
| 3 |
+
size 817139
|
2024/PoLLMgraph_ Unraveling Hallucinations in Large Language Models via State Transition Dynamics/full.md
ADDED
|
@@ -0,0 +1,319 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# PoLLMgraph: Unraveling Hallucinations in Large Language Models via State Transition Dynamics
|
| 2 |
+
|
| 3 |
+
Derui Zhu $^{1}$ , Dingfan Chen $^{2}$ , Qing Li $^{3}$ , Zongxiong Chen $^{4}$ , Lei Ma $^{5,6}$ , Jens Grossklags $^{1}$ , and Mario Fritz $^{2}$
|
| 4 |
+
|
| 5 |
+
$^{1}$ Technical University of Munich $^{2}$ CISPA Helmholtz Center for Information Security $^{3}$ University of Stavanger $^{4}$ Fraunhofer FOKUS $^{5}$ The University of Tokyo $^{6}$ University of Alberta
|
| 6 |
+
|
| 7 |
+
derui.zhu@tum.de, qing.li@uis.no, zongxiong.chen@fokus.fraunhofer.de, jens.grossklags@in.tum.de
|
| 8 |
+
|
| 9 |
+
{dingfan.chen, fritz}@cispa.de
|
| 10 |
+
|
| 11 |
+
# Abstract
|
| 12 |
+
|
| 13 |
+
Despite tremendous advancements in large language models (LLMs) over recent years, a notably urgent challenge for their practical deployment is the phenomenon of "hallucination", where the model fabricates facts and produces non-factual statements. In response, we propose PoLLMgraph—a Polygraph for LLMs—as an effective model-based white-box detection and forecasting approach. PoLLMgraph distinctly differs from the large body of existing research that concentrates on addressing such challenges through black-box evaluations. In particular, we demonstrate that hallucination can be effectively detected by analyzing the LLM's internal state transition dynamics during generation via tractable probabilistic models. Experimental results on various open-source LLMs confirm the efficacy of PoLLMgraph, outperforming state-of-the-art methods by a considerable margin, evidenced by over $20\%$ improvement in AUC-ROC on common benchmarking datasets like TruthfulQA. Our work paves a new way for model-based white-box analysis of LLMs, motivating the research community to further explore, understand, and refine the intricate dynamics of LLM behaviors†.
|
| 14 |
+
|
| 15 |
+
# 1 Introduction
|
| 16 |
+
|
| 17 |
+
The advent of large autoregressive language models (LLMs) (Petroni et al., 2019; Brown et al., 2020; Wei et al., 2022) has become a driving force in pushing the field of Natural Language Processing (NLP) into a new era, enabling the automated generation of texts that
|
| 18 |
+
|
| 19 |
+
are coherent, contextually relevant, and seemingly intelligent. Despite these remarkable capabilities, a prominent issue is their tendency for "factual hallucinations"—situations where the model generates statements that are plausible and contextually coherent, however, factually incorrect or inconsistent with real-world knowledge (Zhang et al., 2023). Addressing these hallucinations is crucial for ensuring the trustworthiness of LLMs in practice.
|
| 20 |
+
|
| 21 |
+
Numerous research studies have recognized hallucination as a notable concern in LLM systems, evidenced through comprehensive evaluations (Lin et al., 2022b; Li et al., 2023a; Min et al., 2023; Zhang et al., 2023). However, the exploration of viable solutions is still in its early stages. Much of this research pivots on either black-box or gray-box settings, identifying hallucinations via output text or associated confidence scores (Xiao and Wang, 2021; Xiong et al., 2023; Manakul et al., 2023; Mündler et al., 2024), or relies on extensive external fact-checking knowledge bases (Min et al., 2023). While these methods are broadly accessible and can be applied even by those without access to a model's internal mechanisms, their exclusive reliance on outputs has proven substantially inadequate, potentially due to hallucinations being predominantly induced by a model's internal representation learning and comprehension capabilities. Additionally, the reliance on extensive knowledge bases for fact-checking systems poses a significant challenge to their practicality.
|
| 22 |
+
|
| 23 |
+
In response, there has recently been a growing interest in employing white-box approaches, driven by the understanding that hallucinations in outputs are phenomena inherently induced
|
| 24 |
+
|
| 25 |
+
by the representation of internal states. Specifically, the identification of potential hallucinations can be conducted by analyzing hidden layer activation at the last token of generated texts (Burns et al., 2022; Azaria and Mitchell, 2023; Li et al., 2023b), and their correction may be realized by modifying these activations (Li et al., 2023b; Chuang et al., 2024). The transition from an external black-box setting to an internal white-box perspective not only enhances the efficacy of the detection method, but also retains its broad applicability in practical scenarios. Notably, the adoption of a white-box setting in hallucination detection and correction is particularly relevant and practical for real-world applications. This is primarily because the responsibility of detecting and rectifying hallucinations typically lies with the LLM service providers. Given that these providers have direct access to the models during deployment, they are well-positioned to effectively monitor and address the erroneous outputs under white-box settings.
|
| 26 |
+
|
| 27 |
+
In practical scenarios, relying solely on the development of improved models as the solution for coping with hallucinations may be unrealistic. In particular, such a perfect LLM entirely free of hallucinations may never exist. As such, our research emphasizes the importance of addressing the hallucination detection task for a given model at hand. Specifically, our work offers a new perspective on LLM hallucinations, suggesting that hallucinations are likely driven by the model's internal state transitions. Based on such key insights, we introduce a novel white-box detection approach that explicitly models the hallucination probability given the observed intermediate state representation traces during LLM generation. Unlike previous studies, which typically rely on the representation of a single token, our method extracts and utilizes temporal information in state transition dynamics, providing a closer approximation of the LLM decision-making process. Through extensive evaluation, we demonstrate that our approach consistently improves the state-of-the-art hallucination detection performance across various setups and model architectures. Our method operates effectively in weakly supervised contexts and requires an extremely small amount of supervision (<100 training samples), ensuring real-world practicability. Further, our
|
| 28 |
+
|
| 29 |
+
modeling framework, which explicitly exploits temporal information via tractable probabilistic models, lays the groundwork for its broader application during the development of LLMs with improved interpretability, transparency, and trustworthiness.
|
| 30 |
+
|
| 31 |
+
Contributions. In summary, we make the following contributions in this paper:
|
| 32 |
+
|
| 33 |
+
- We introduce a novel perspective on understanding LLM behaviors by examining their internal state transition dynamics.
|
| 34 |
+
- We propose PoLLMgraph, an effective and practical solution to detect and forecast LLM hallucinations.
|
| 35 |
+
- Our PoLLMgraph demonstrates superior effectiveness across extensive experiments, achieving an increase of up to $20\%$ in AUC-ROC compared to state-of-the-art detection methods on benchmark datasets like TruthfulQA.
|
| 36 |
+
|
| 37 |
+
# 2 Related Work
|
| 38 |
+
|
| 39 |
+
Hallucination Evaluation. Recent research has surfaced the issue of LLM hallucinations, probing such occurrences through a variety of studies with interchangeable terminologies including faithfulness, factuality, factual consistency, and fidelity. Recent surveys have categorized the observed issues based on their applications, causes, and appearance (Zhang et al., 2023; Rawte et al., 2023). Whereas standard evaluation metrics fall short in faithfully reflecting the presence of hallucinations (Falke et al., 2019; Reiter, 2018), recent efforts have introduced new benchmarks, such as TruthfulQA (Lin et al., 2022b) and HaluEval (Li et al., 2023a), and devised dedicated metrics (Pagnoni et al., 2021; Honovich et al., 2022; Dhingra et al., 2019; Durmus et al., 2020; Min et al., 2023) for accurately assessing such issues. In our work, we apply commonly used LLM-based judgments (Huang et al., 2023; Li et al., 2023b; Cheng et al., 2023; Lin et al., 2022b) for assessing hallucinations and evaluating the detection effectiveness of our approach, due to their reliability and suitability for our setup.
|
| 40 |
+
|
| 41 |
+
Hallucination Detection and Rectification. Most existing detection approaches focus on the black-box or gray-box settings, wherein the detection is typically executed in one of the following ways: conducting a conven-
|
| 42 |
+
|
| 43 |
+
tional fact-checking task (Min et al., 2023) that necessitates external knowledge for supervision; assessing model uncertainty (Xiao and Wang, 2021; Lin et al., 2022a; Duan et al., 2023; Xiong et al., 2023) with uncertain outputs indicating hallucinations; measuring the inconsistency of the claims between different LLMs (Cohen et al., 2023; Yang et al., 2023); or evaluating self-consistency (Mündler et al., 2024; Manakul et al., 2023), whereby inconsistent outputs commonly signal hallucinations. In contrast, recent studies have demonstrated that hallucinations can be attributed to learned internal representations and have proposed white-box methods that detect or predict hallucinations based on the latent states of the last tokens (Burns et al., 2022; Azadi et al., 2023). We take this analysis one step further by incorporating temporal information, and modeling the entire trajectory of the latent state transitions during LLM generation.
|
| 44 |
+
|
| 45 |
+
Recent studies have shown that hallucination rectification can be partially achieved by: self-critique prompting (Wang et al., 2023; Saunders et al., 2022; Bai et al., 2022), which iteratively refines its outputs; modifying internal representations (Chuang et al., 2024) that improve consistency; or steering generation towards the most probable factually correct samples in the activation space (Li et al., 2023b). Our work significantly advances the state of hallucination detection, and offers corresponding opportunities to further improve rectification approaches.
|
| 46 |
+
|
| 47 |
+
# 3 PoLLMgraph
|
| 48 |
+
|
| 49 |
+
We denote the generated text $x_{1:n} = (x_1, \dots, x_n)$ as a sequence of $n$ tokens, with $x_t$ representing the $t$ -th token. Given a generated text sample $\pmb{x}^{(i)} = x_{1:n}^{(i)}$ , our task is to predict $\operatorname{Pr}(y|\pmb{x}^{(i)})$ where $y \in \{0, 1\}$ serves as the hallucination indicator variable: $y = 1$ corresponds to hallucinations and $y = 0$ otherwise.
|
| 50 |
+
|
| 51 |
+
Our approach draws inspiration from early studies that extracted finite state machines for analyzing stateful systems, such as recurrent networks (Giles et al., 1989; Omlin and Giles, 1996). Naturally, each output sequence $x_{1:n}$ of an LLM is triggered by a finite sequence of internal state transitions $o_{1:n}$ that we define as a trace. Each output token $x_{t}$ is associated with an abstract internal state representation
|
| 52 |
+
|
| 53 |
+
$o_{t}$ , derived from the concrete hidden layer embeddings of the LLM at time step $t$ . We analyze the traces with tractable probabilistic models (e.g., Markov models and hidden Markov models) and bind the internal trace transitions to hallucinations/factual output behaviors using a few manually labelled reference data. Upon fitting the probabilistic models to the reference data, hallucination detection can be achieved via inference on the fitted probabilistic models.
|
| 54 |
+
|
| 55 |
+
# 3.1 State Abstraction
|
| 56 |
+
|
| 57 |
+
The internal concrete state space, constituted by the hidden layer embeddings of an LLM, and the number of possible traces frequently exceed the analysis capacity of most tractable probabilistic models. Consequently, we implement abstraction over the states and traces to derive an abstract model, which captures the fundamental characteristics and patterns while maintaining tractability for analysis. At the state level, we first employ Principal Component Analysis (PCA) (Abdi and Williams, 2010) to reduce the dimensions of the latent embeddings (i.e., the concrete state vectors), retaining the first $K$ dominant components. Subsequently, we explore two prevalent methodologies to establish abstract states: (i) Each PCA-projected embedding with $K$ dimensions is partitioned into $M$ equal intervals, yielding $M^K$ grids. (ii) A Gaussian Mixture Model (GMM) is fitted to a set of PCA-projected embeddings. In this way, each hidden layer embedding vector $\pmb{h}_t$ is categorized into either a grid or a mode of the GMM, thereby establishing distinct abstract states $o_t \in \{\bar{o}_1, \dots, \bar{o}_{N_s}\}$ that represent different clusters of the model's internal characteristics, where $\bar{o}_i$ corresponds to different cluster and $N_s$ denotes the total number of clusters (i.e., states). We then further operate on the trace of the abstract states $o_{1:n} = (o_1, \dots, o_n)$ for training and inference in the probabilistic models.
|
| 58 |
+
|
| 59 |
+
# 3.2 Probabilistic Modeling & Semantics Binding
|
| 60 |
+
|
| 61 |
+
After collecting traces that summarize the internal characteristics of the generated texts, we can capture the transitions using standard probabilistic models and bind the semantics with hallucination detection using a few annotated reference samples. We demonstrate the
|
| 62 |
+
|
| 63 |
+

|
| 64 |
+
Figure 1: An illustration of PoLLMgraph detecting hallucinations during LLM generation via HMM inference. "Hallucination Probs" corresponds to a scaled word-level hallucination likelihood, i.e., the scaled $\operatorname{Pr}(s_t|y = 1)$ , indicating the contribution of each word towards predicting that the generated text is a hallucination. The sets $\{\bar{o}_1,\dots,\bar{o}_{N_s}\}$ and $\{\bar{s}_1,\dots,\bar{s}_{N_h}\}$ denote the observation abstract states and HMM hidden states respectively (representing different clusters in the state spaces), with $N_{s}$ and $N_{h}$ being the total number of abstract states and hidden states.
|
| 65 |
+
|
| 66 |
+
effectiveness of our modeling framework using the Markov model and hidden Markov model in this work, while we anticipate possible future improvements through more advanced designs for the probabilistic models.
|
| 67 |
+
|
| 68 |
+
Markov Model (MM). Due to the autoregressive nature of the standard LLM generation process, the state transitions can be naturally modeled by an MM. When associated with the hallucination prediction task, we have:
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
\Pr (o _ {1: n}, y) = \Pr (y) \Pr (o _ {1} | y) \prod_ {t = 2} ^ {n} \Pr (o _ {t} | o _ {t - 1}, y)
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
Training of the MM is conducted by computing the prior $\operatorname{Pr}(y)$ , as well as the conditional initial $\operatorname{Pr}(o_1|y)$ and transition probabilities $\operatorname{Pr}(o_t|o_{t-1}, y)$ over the reference dataset $\mathcal{D}_{\mathrm{ref}} = \{(o_{1:n}^{(i)}, y^{(i)})\}_i$ . The inference (i.e., prediction of hallucinations) can then be achieved by calculating the posterior $\operatorname{Pr}(y|o_{1:n})$ using Bayes' theorem:
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\underset {y} {\arg \max } \operatorname * {P r} (y | o _ {1: n}) \propto \operatorname * {P r} (y) \operatorname * {P r} (o _ {1: n} | y)
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
Hidden Markov Model (HMM). While the MM largely suffices in aligning with our primary objective of deducing hallucinations from internal activation behavior trajectories, the HMM introduces an enriched layer of analytical depth by accommodating latent vari
|
| 81 |
+
|
| 82 |
+
ables. These variables are pivotal in capturing unobserved heterogeneity within the state traces. Within our framework, such latent variables afford flexibility when dealing with potentially diverse factors—enabling the recognition of various modes in the space of the abstract states—that may induce hallucinations.
|
| 83 |
+
|
| 84 |
+
We denote the latent state variables at each time step as $s_t$ , which direct to the observed abstract state $o_t$ via respective emission probabilities $\operatorname*{Pr}(o_t|s_t)$ . During training, we employ the standard Baum-Welch algorithm (Baum et al., 1970) to learn the transition probabilities $\operatorname*{Pr}(s_t|s_{t-1})$ , emission probabilities $\operatorname*{Pr}(o_t|s_t)$ , and the initial state probabilities $\operatorname*{Pr}(s_0)$ . Given the framework, the joint probability of observing a particular trace $o_{1:n}$ and the latent sequence $s_{0:n}$ is defined as:
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\Pr (o _ {1: n}, s _ {0: n}) = \underbrace {\Pr (s _ {0})} _ {\text {i n i t i a l}} \prod_ {t = 1} ^ {n} \underbrace {\Pr (s _ {t} | s _ {t - 1})} _ {\text {t r a n s i t i o n}} \underbrace {\Pr (o _ {t} | s _ {t})} _ {\text {e m i s s i o n}}
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
Furthermore, the probability of observing a particular trace is obtained by marginalizing over all possible state sequences $s_{0:n}$ .
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
\Pr \left(o _ {1: n}\right) = \sum_ {s _ {0: n}} \Pr \left(s _ {0}\right) \prod_ {t = 1} ^ {n} \Pr \left(s _ {t} \mid s _ {t - 1}\right) \Pr \left(o _ {t} \mid s _ {t}\right)
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
After fitting a standard HMM to the data, we further incorporate hallucination semantics into the model. Specifically, we additionally asso
|
| 97 |
+
|
| 98 |
+
<table><tr><td rowspan="2">Datasets</td><td rowspan="2">Method Name</td><td rowspan="2">Method Type</td><td colspan="4">Models</td></tr><tr><td>Llama-13B</td><td>Alpaca-13B</td><td>Vicuna-13B</td><td>Llama2-13B</td></tr><tr><td rowspan="9">TruthfulQA</td><td>SelfCheck</td><td>black-box</td><td>0.65</td><td>0.60</td><td>0.61</td><td>0.63</td></tr><tr><td>Uncertainty</td><td>gray-box</td><td>0.54</td><td>0.53</td><td>0.53</td><td>0.52</td></tr><tr><td>ITI</td><td>white-box</td><td>0.67</td><td>0.64</td><td>0.62</td><td>0.64</td></tr><tr><td>Latent Activation</td><td>white-box</td><td>0.65</td><td>0.61</td><td>0.59</td><td>0.60</td></tr><tr><td>Internal State</td><td>white-box</td><td>0.67</td><td>0.64</td><td>0.65</td><td>0.67</td></tr><tr><td>PoLLMgraph-MM (Grid)</td><td>white-box</td><td>0.64</td><td>0.67</td><td>0.68</td><td>0.69</td></tr><tr><td>PoLLMgraph-MM (GMM)</td><td>white-box</td><td>0.72</td><td>0.73</td><td>0.71</td><td>0.73</td></tr><tr><td>PoLLMgraph-HMM (Grid)</td><td>white-box</td><td>0.84</td><td>0.86</td><td>0.84</td><td>0.87</td></tr><tr><td>PoLLMgraph-HMM (GMM)</td><td>white-box</td><td>0.85</td><td>0.85</td><td>0.83</td><td>0.88</td></tr><tr><td rowspan="9">HaluEval</td><td>SelfCheck</td><td>black-box</td><td>0.62</td><td>0.67</td><td>0.64</td><td>0.67</td></tr><tr><td>Uncertainty</td><td>gray-box</td><td>0.55</td><td>0.57</td><td>0.56</td><td>0.58</td></tr><tr><td>ITI</td><td>white-box</td><td>0.63</td><td>0.62</td><td>0.64</td><td>0.63</td></tr><tr><td>Latent Activation</td><td>white-box</td><td>0.61</td><td>0.58</td><td>0.57</td><td>0.55</td></tr><tr><td>Internal State</td><td>white-box</td><td>0.64</td><td>0.62</td><td>0.65</td><td>0.64</td></tr><tr><td>PoLLMgraph-MM (Grid)</td><td>white-box</td><td>0.64</td><td>0.66</td><td>0.62</td><td>0.69</td></tr><tr><td>PoLLMgraph-MM (GMM)</td><td>white-box</td><td>0.68</td><td>0.62</td><td>0.64</td><td>0.66</td></tr><tr><td>PoLLMgraph-HMM (Grid)</td><td>white-box</td><td>0.75</td><td>0.71</td><td>0.72</td><td>0.72</td></tr><tr><td>PoLLMgraph-HMM (GMM)</td><td>white-box</td><td>0.72</td><td>0.74</td><td>0.71</td><td>0.72</td></tr></table>
|
| 99 |
+
|
| 100 |
+
Table 1: The detection AUC-ROC for different approaches over multiple benchmark LLMs over two benchmark datasets. The ITI, Latent Activation and Internal State use the same reference data as PoLLMgraph. The shaded area illustrates our proposed variants of approaches. The best results are highlighted in bold.
|
| 101 |
+
|
| 102 |
+
ciate the latent state with the prediction of hallucinations by first collecting the most likely latent sequences, found by the Viterbi algorithm (Viterbi, 1967), given all observed traces on the reference dataset:
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
\mathcal {S} = \left\{\widehat {s} _ {0: n} ^ {(i)} \Big | \widehat {s} _ {0: n} ^ {(i)} = \operatorname * {a r g m a x} _ {s _ {0: n}} \Pr (s _ {0: n} | o _ {1: n} ^ {(i)}) \right\} _ {i}
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
We then learn the conditional probability $\operatorname{Pr}(s_t | y)$ by counting the occurrences of each latent state given the hallucination labels.
|
| 109 |
+
|
| 110 |
+
For the inference, we derive the following posterior probability:
|
| 111 |
+
|
| 112 |
+
$$
|
| 113 |
+
\begin{array}{l} \operatorname * {P r} (y | o _ {1: n}) = \operatorname * {P r} (o _ {1: n} | y) \operatorname * {P r} (y) / \operatorname * {P r} (o _ {1: n}) \\ \propto \sum_ {s _ {0: n}} \Pr (y) \Pr (s _ {0} | y) \prod_ {t = 1} ^ {n} \Pr (s _ {t} | s _ {t - 1}, y) \Pr (o _ {t} | s _ {t}, y) \\ \end{array}
|
| 114 |
+
$$
|
| 115 |
+
|
| 116 |
+
We further use the conditional independence assumption to simplify $\operatorname*{Pr}(s_t|s_{t - 1},y)$ as $\operatorname*{Pr}(s_t|y)$ and $\operatorname*{Pr}(o_t|s_t,y)$ as $\operatorname*{Pr}(o_t|s_t)$ for prediction.
|
| 117 |
+
|
| 118 |
+
# 4 Experiments
|
| 119 |
+
|
| 120 |
+
In this section, we report both quantitative experiments and qualitative analyses to investigate the effectiveness of PoLLMgraph in hallucination detection across diverse LLMs over two benchmark datasets. Further, we explore additional key factors that may affect the success of PoLLMgraph.
|
| 121 |
+
|
| 122 |
+
# 4.1 Setup
|
| 123 |
+
|
| 124 |
+
Datasets and Target Models. To demonstrate the broad applicability of our approach, we conducted extensive experiments on complex benchmark hallucination datasets: TruthfulQA (Lin et al., 2022b) and HaluEval (Li et al., 2023a). TruthfulQA encompasses 873 questions, each paired with a variety of truthful and hallucinatory (non-truthful) answers. For HaluEval, our experiments focused on the 'QA' subset comprising 10k records, where each record includes a question accompanied by both a truthful and a hallucinatory answer. We evaluated both our method and baseline approaches using widely used publicly released LLMs, namely, Llama-13B (Touvron et al., 2023), Alpaca-13B (Taori et al., 2023), Vicuna-13B (Chiang et al., 2023), Llama2-13B (Touvron et al., 2023), and T5-11B (Raffel et al., 2020) from the Huggingface model zoo<sup>2</sup>.
|
| 125 |
+
|
| 126 |
+
Baselines. We compare our approach with state-of-the-art baselines, each demonstrating diverse characteristics, including (i) black-box approaches (i.e., those only permitting access to the generated texts), such as SelfCheck (Manakul et al., 2023); (ii) gray-box approaches (i.e., those allowing access to both the generated texts and associated confidence scores), like
|
| 127 |
+
|
| 128 |
+
<table><tr><td colspan="101">Examples</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Question:</td><td colspan="100">How old is Barack Obama?</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td rowspan="2"></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td rowspan="2"></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Answer:</td><td colspan="100">Barack Obama is 14 Years old (born in 1964).</td><td colspan="100">non-factual</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td colspan="101"></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 129 |
+
|
| 130 |
+
Table 2: Illustration of word-wise PoLLMgraph-HMM hallucination predictions. We select the generated answers w.r.t. the questions from TruthfulQA by Alpaca-13B. The number beneath each word refers to the scaled word-level hallucination likelihood represented by the hidden state hallucination probability, i.e., the scaled $\operatorname{Pr}(s_t|y = 1)$ . The red-shaded region represents the words that have a significant contribution to predicting that the generated text is a hallucination.
|
| 131 |
+
|
| 132 |
+
Uncertainty (Xiao and Wang, 2021); and (iii) white-box methods (i.e., those granting access to model internals), including Latent Activations (Burns et al., 2022), Internal State (Azaria and Mitchell, 2023), and ITI (Li et al., 2023b). For PoLLMgraph, the default PCA dimension is 1024, the default number of abstract states $N_{s}$ is 250, and the default number of hidden states $N_{h}$ is set to 100. See Appendix A.2 for more details.
|
| 133 |
+
|
| 134 |
+
In the experiments, we use questions (Q) from both datasets as inputs for LLMs and detect whether the corresponding answers (A) are hallucinations. To obtain ground-truth labels for the generated content, human judgment is often considered the gold standard. However, due to the high costs associated with this method, previous works have proposed surrogate methods for assessment. Following practical evaluation standards (Lin et al., 2022b; Nakano et al., 2021; Rae et al., 2021; Li et al., 2023b), we fine-tune a GPT-3-13B model on the entire dataset, labelling Q/A pairs as hallucinations or non-hallucinations. We then use the fine-tuned GPT-3-13B model to annotate each Q/A pair, where Q is from the dataset, and A is generated by LLMs. The effectiveness of detection
|
| 135 |
+
|
| 136 |
+
is commonly evaluated using the AUC-ROC (Area under the ROC Curve), which ranges from 0.5 to 1, with a higher value indicating a more effective detection method.
|
| 137 |
+
|
| 138 |
+
# 4.2 Quantitative Comparison
|
| 139 |
+
|
| 140 |
+
We compare our methods with existing baselines across different models and present the quantitative results in Table 1. Notably, our proposed methods surpass previous state-of-the-art techniques by a noticeable margin, evidenced by an increase of over 0.2 in the detection AUC-ROC on the TruthfulQA dataset and around 0.1 on the HaluEval dataset. Moreover, we would like to highlight several key insights and observations that validate our design intuition and hold potential implications for future developments in this field: (i) A general trend can be identified that white-box methods typically outperform gray-box and black-box approaches in terms of detection effectiveness. This underscores the importance of our key design intuition that connects the occurrence of hallucinations to the internal workings of the model. This is particularly relevant when considering practical use cases, where detection is typically conducted by the model owner, who possesses comprehensive knowledge and control over the model. These circumstances naturally
|
| 141 |
+
|
| 142 |
+
lend themselves to the application of white-box approaches. (ii) All of our proposed variants consistently exhibit superior performance when compared to other white-box approaches. This can be attributed to our integration of temporal information through the analysis of state transition dynamics, which is inherently suited to modelling stateful systems such as LLMs. (iii) When comparing our MM with HMM variants, it becomes evident that the inclusion of additional latent state abstractions via HMM enhances the modelling capabilities, leading to improved detection effectiveness.
|
| 143 |
+
|
| 144 |
+
# 4.3 Qualitative Investigation
|
| 145 |
+
|
| 146 |
+
Qualitative Examples. We visualize the predictions for several testing samples in Table 2, where the numbers below each word represent the scaled probability scores $\operatorname{Pr}(s_t | y = 1)$ of each word indicating the hallucinations. Words shaded in red have a higher likelihood of contributing to the prediction that the generated text is a hallucination. As can be observed, the correct predictions from PoLLMgraph typically align with human intuition: the states abstracted from activations on words that are likely to induce hallucinations have higher contribution scores, indicating the potential of our approach for interpretability analysis of LLMs. Furthermore, we have noticed that the LLM's responses to more open-ended questions, such as "What is the truth that scientists are trying to cover up?" or "What is a fact that only fans of Trump know is true?" tend to be categorized as 'factual'. This classification might arise from the open-ended nature of these responses, leading them to be (mis)interpreted as 'normal/benign' within the context of our model's latent states. Additionally, our qualitative examination reveals a tendency for unusual word combinations, such as "eating watermelon seeds" or "Napoleon's height", to trigger hallucination predictions. While this observation might not necessarily indicate a flaw in the hallucination detection methods, it could be considered an indication to potentially enhance the language model. By incorporating a broader spectrum of such less common information into the LLM's training dataset, the model could expand its semantic understanding, thereby mitigating gaps and potentially improving overall performance.
|
| 147 |
+
|
| 148 |
+

|
| 149 |
+
Figure 2: The scaled log-likelihood of the abstracted traces computed by PoLLMgraph-MM on Alpaca-13B in TruthfulQA.
|
| 150 |
+
|
| 151 |
+
Distributional Patterns. For a qualitative exploration of the underlying patterns of hallucination in model behavior, we visualize the distribution of the scaled log-likelihood, represented as a constant ratio of $\log \operatorname{Pr}(o_{1:n}|y)$ computed using the fitted Markov model, for the abstract traces. Figure 2 illustrates the results for the Alpaca-13B model, highlighting significant differences in the likelihood of observing the abstract state sequence under hallucinations compared to factual outputs. These distinctions enable subsequent inference and prediction of new hallucination samples using straightforward maximum likelihood estimation (MLE) or maximum a posteriori (MAP) methods.
|
| 152 |
+
|
| 153 |
+
# 4.4 Analysis Studies
|
| 154 |
+
|
| 155 |
+
In this sub-section, we investigate several factors that may be critical for the detection performance and practicality of PoLLMgraph. We adhere to the default configuration (Section 4.1) for all the experiments in this section unless stated otherwise.
|
| 156 |
+
|
| 157 |
+
Number of Reference Data. One important factor impacting the practicality of detection methods is their data efficiency. This is especially relevant considering that training data for such methods typically requires detailed manual inspection to verify the factualness of each sample. Therefore, we investigate the effectiveness of our approach across different reference dataset sizes, as shown in Figure 3 (results for more baselines are available in Appendix A.2). While we observe a trend suggesting that utilizing more annotated data
|
| 158 |
+
|
| 159 |
+
<table><tr><td></td><td>Misconceptions</td><td>Confusion: People</td><td>Misquotations</td><td>Paranormal</td><td>Logical Falsehood</td><td>Misinformation</td><td>(All)</td></tr><tr><td>Llama-13B</td><td>0.71</td><td>0.69</td><td>0.70</td><td>0.71</td><td>0.75</td><td>0.72</td><td>0.67</td></tr><tr><td>Alpaca-13B</td><td>0.71</td><td>0.71</td><td>0.71</td><td>0.67</td><td>0.72</td><td>0.72</td><td>0.72</td></tr><tr><td>Vicuna-13B</td><td>0.72</td><td>0.72</td><td>0.71</td><td>0.68</td><td>0.70</td><td>0.68</td><td>0.7</td></tr><tr><td>Llama2-13B</td><td>0.71</td><td>0.71</td><td>0.72</td><td>0.66</td><td>0.74</td><td>0.73</td><td>0.72</td></tr></table>
|
| 160 |
+
|
| 161 |
+

|
| 162 |
+
Figure 3: The impact of reference dataset size on the detection AUC-ROC of PoLLMgraph-HMM on Alpaca-13B in TruthfulQA.
|
| 163 |
+
|
| 164 |
+
generally leads to better detection effectiveness, our PoLLMgraph already achieves a notably high detection performance when trained on fewer than 100 samples (10%, amounting to 82 data records). This underscores the practical applicability of our approach.
|
| 165 |
+
|
| 166 |
+
Distribution Shifts. Another important factor to consider is the tolerance or transferability of detection methods under distribution shifts. This occurs when the annotated samples and the new samples to be detected come from different modes of the overall data distribution and carry diverse characteristics. Specifically, to assess model performance under significant semantic distribution shifts and closely mirror real-world conditions, we conduct experiments by training and testing our model on completely different categories (see Table 3). Here, PoLLMgraph trains on categories defined by semantic topics, accounting for $35.98\%$ of the data (including "Laws", "Health", "Sociology", "Economics", "History", "Language", "Psychology", "Weather", "Nutrition", "Advertising", "Politics", "Education", "Finance", "Science", "Statistics"), and tests on the remaining categories, which are identified by hallucination types and are semantically distinct from the training set. Table 3 demonstrates that PoLLMgraph is effective in detecting
|
| 167 |
+
|
| 168 |
+
hallucination in practical settings, and achieves around 0.7 AUCROC for different categories.
|
| 169 |
+
|
| 170 |
+
Besides, we further conducted cross-dataset experiments by training on HaluEval and testing on TruthfulQA (Table 4), and vice versa (Table 8 in Appendix B). These experiments demonstrate that PoLLMgraph continues to surpass the baseline methods, despite a noticeable performance decline.
|
| 171 |
+
|
| 172 |
+
Table 3: Cross-categories hallucination detection AUC-ROC of PoLLMgraph-HMM. The "(All)" column represents the average AUC-ROC for all remaining categories disjoint from the training ones.
|
| 173 |
+
|
| 174 |
+
<table><tr><td>Method Name</td><td>Alpaca-13B</td><td>Llama2-13B</td></tr><tr><td>ITI</td><td>0.63</td><td>0.62</td></tr><tr><td>Latent Activation</td><td>0.57</td><td>0.57</td></tr><tr><td>Internal State</td><td>0.62</td><td>0.62</td></tr><tr><td>PoLLMgraph-MM (Grid)</td><td>0.64</td><td>0.67</td></tr><tr><td>PoLLMgraph-MM (GMM)</td><td>0.72</td><td>0.71</td></tr><tr><td>PoLLMgraph-HMM (Grid)</td><td>0.76</td><td>0.77</td></tr><tr><td>PoLLMgraph-HMM (GMM)</td><td>0.75</td><td>0.74</td></tr></table>
|
| 175 |
+
|
| 176 |
+
Generalization over Model Architectures. To demonstrate the generality of PoLLMgraph, we conducted hallucination detection across different model architectures, specifically focusing on encoder-decoder-based LLMs. We applied PoLLMgraph to a T5-11B model to detect hallucinations in its answers to questions from the TruthfulQA and HaluEval datasets. As illustrated in Table 5, ourPoLLMgraph consistently shows superior effectiveness in detecting hallucinations compared to baseline methods.
|
| 177 |
+
|
| 178 |
+
Table 4: Evaluation of different methods on TruthfulQA, when trained on HaluEval.
|
| 179 |
+
|
| 180 |
+
<table><tr><td>Method Name</td><td>TruthfulQA</td><td>HaluEval</td></tr><tr><td>ITI</td><td>0.62</td><td>0.61</td></tr><tr><td>Latent Activation</td><td>0.57</td><td>0.63</td></tr><tr><td>Internal State</td><td>0.64</td><td>0.59</td></tr><tr><td>PoLLMgraph-MM(Grid)</td><td>0.66</td><td>0.67</td></tr><tr><td>PoLLMgraph-MM(GMM)</td><td>0.68</td><td>0.65</td></tr><tr><td>PoLLMgraph-HMM(Grid)</td><td>0.73</td><td>0.72</td></tr><tr><td>PoLLMgraph-HMM(GMM)</td><td>0.76</td><td>0.74</td></tr></table>
|
| 181 |
+
|
| 182 |
+
Table 5: Evaluation with different approaches on encoder-decoder-based architecture (T5-11B) over TruthfulQA and HaluEval.
|
| 183 |
+
|
| 184 |
+
Sensitivity to Hyperparameters. We further investigate the robustness and sensitivity of PoLLMgraph against various hyperparameter settings. First, we examine the influence of
|
| 185 |
+
|
| 186 |
+

|
| 187 |
+
Figure 4: Detection AUC-ROC under different numbers of abstraction states and clustering methods on Alpaca-13B in TruthfulQA.
|
| 188 |
+
|
| 189 |
+
the number of clusters (i.e., abstraction states) $N_{s}$ and the clustering methods, as depicted in Figure 4. We notice an increase in detection effectiveness with more abstraction states, likely due to improved modeling capacity and expressive power. Nevertheless, the total number of feasible states is limited by computational resources. In scenarios with fewer than 150 clusters, different clustering methods yield similar performance. However, when the number of clusters exceeds 150, GMM notably outperforms the K-means option, affirming our choice of GMM as the preferred method.
|
| 190 |
+
|
| 191 |
+
We then examine the impact of varying PCA projection dimensions as shown in Figure 5. Similarly, an observable improvement in detection effectiveness corresponds with retaining more PCA components during down-projection. We hypothesize that this trend can be largely attributed to the preservation of a more substantial amount of information when expanding the PCA projection space. Importantly, the performance plateaued at around 1024 PCA dimensions, which likely captures most variations in the data. This observation further supports our default hyperparameter settings.
|
| 192 |
+
|
| 193 |
+
# 5 Conclusions
|
| 194 |
+
|
| 195 |
+
In this paper, we introduce PoLLMgraph, a novel method leveraging state transition dynamics within activation patterns to detect hallucination issues in LLMs. PoLLMgraph is designed following a white-box approach, constructing a probabilistic model that intricately captures the characteristics within the LLM's internal activation spaces. In this way, it enables more
|
| 196 |
+
|
| 197 |
+

|
| 198 |
+
Figure 5: Detection AUC-ROC across different PCA dimensions on Alpaca-13B in TruthfulQA.
|
| 199 |
+
|
| 200 |
+
effective analysis and reasoning of LLM hallucinations. The comprehensive empirical results confirm the effectiveness of PoLLMgraph in detecting hallucination in LLMs in practice, demonstrating the potential of PoLLMgraph for safeguarding LLMs from generating hallucinating contents.
|
| 201 |
+
|
| 202 |
+
# Limitations
|
| 203 |
+
|
| 204 |
+
While we have validated the practical applicability of PoLLMgraph by examining its sample efficiency, tolerance to distribution shifts, and robustness across various hyperparameter settings, there are several other key factors that warrant future investigation. Firstly, the hyperparameter settings are crucial in identifying hallucination behavior based on state transition dynamics. The state abstraction is closely related to modelling the hallucination patterns from internal activations of LLMs during decoding. Furthermore, exploring scenarios with a larger degree of distribution shifts could be insightful. Especially when the reference and testing data have very different semantics or are limited in scope and when the LLM undergoes extra fine-tuning that causes potential concept shifts in its internal representations, then more comprehensive experiments with varied LLM architectures and broader datasets will enhance the validation of the generalizability of PoLLMgraph.
|
| 205 |
+
|
| 206 |
+
# Acknowledgments
|
| 207 |
+
|
| 208 |
+
We thank the reviewers and area chairs for their constructive feedback. This work was partially funded by ELSA - European Lighthouse on Secure and Safe AI funded by the European
|
| 209 |
+
|
| 210 |
+
Union under grant agreement No. 101070617, as well as the German Federal Ministry of Education and Research (BMBF) under the grant AIgenCY (16KIS2012). This work is also supported in part by Canada CIFAR AI Chairs Program, the Natural Sciences and Engineering Research Council of Canada, JST-Mirai Program Grant No. JPMJMI20B8, JSPS KAKENHI Grant No. JP21H04877, No. JP23H03372. Dingfan Chen acknowledges funding from the Qualcomm Innovation Fellowship Europe.
|
| 211 |
+
|
| 212 |
+
# References
|
| 213 |
+
|
| 214 |
+
Hervé Abdi and Lynne J. Williams. 2010. Principal component analysis. Wiley Interdisciplinary Reviews: Computational Statistics, 2(4):433-459.
|
| 215 |
+
Fatemeh Azadi, Heshaam Faili, and Mohammad Javad Dousti. 2023. PMI-Align: Word alignment with point-wise mutual information without requiring parallel training data. In *Findings of the Association for Computational Linguistics: ACL* 2023, pages 12366–12377. Association for Computational Linguistics.
|
| 216 |
+
Amos Azaria and Tom Mitchell. 2023. The internal state of an LLM knows when it's lying. In *Findings of the Association for Computational Linguistics: EMNLP* 2023, pages 967-976. Association for Computational Linguistics.
|
| 217 |
+
Yuntao Bai, Saurav Kadavath, Sandipan Kundu, Amanda Askell, Jackson Kernion, Andy Jones, Anna Chen, Anna Goldie, Azalia Mirhoseini, Cameron McKinnon, et al. 2022. Constitutional AI: Harmlessness from AI feedback. arXiv preprint arXiv:2212.08073.
|
| 218 |
+
Leonard E. Baum, Ted Petrie, George Soules, and Norman Weiss. 1970. A maximization technique occurring in the statistical analysis of probabilistic functions of Markov chains. The Annals of Mathematical Statistics, 41(1):164-171.
|
| 219 |
+
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D. Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. Thirty-Fourth Conference on Neural Information Processing Systems, pages 1877-1901.
|
| 220 |
+
Collin Burns, Haotian Ye, Dan Klein, and Jacob Steinhardt. 2022. Discovering latent knowledge in language models without supervision. In *The Eleventh International Conference on Learning Representations*.
|
| 221 |
+
Qinyuan Cheng, Tianxiang Sun, Wenwei Zhang, Siyin Wang, Xiangyang Liu, Mozhi Zhang, Jun-liang He, Mianqiu Huang, Zhangyue Yin, Kai
|
| 222 |
+
|
| 223 |
+
Chen, and Xipeng Qiu. 2023. Evaluating hallucinations in Chinese large language models. arXiv preprint arXiv.2310.03368.
|
| 224 |
+
Wei-Lin Chiang, Zhuohan Li, Zi Lin, Ying Sheng, Zhanghao Wu, Hao Zhang, Lianmin Zheng, Siyuan Zhuang, Yonghao Zhuang, Joseph E. Gonzalez, et al. 2023. Vicuna: An open-source chatbot impressing GPT-4 with $90\%$ ChatGPT quality. See https://vicuna.lmsys.org (accessed April 14, 2023).
|
| 225 |
+
Yung-Sung Chuang, Yujia Xie, Hongyin Luo, Yoon Kim, James R. Glass, and Pengcheng He. 2024. DoLa: Decoding by contrasting layers improves factuality in Large Language models. In The Twelfth International Conference on Learning Representations.
|
| 226 |
+
Roi Cohen, May Hamri, Mor Geva, and Amir Globerson. 2023. LM vs LM: Detecting factual errors via cross examination. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 12621-12640. Association for Computational Linguistics.
|
| 227 |
+
Bhuwan Dhingra, Manaal Faruqui, Ankur Parikh, Ming-Wei Chang, Dipanjan Das, and William Cohen. 2019. Handling divergent reference texts when evaluating table-to-text generation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4884-4895. Association for Computational Linguistics.
|
| 228 |
+
Jinhao Duan, Hao Cheng, Shiqi Wang, Chenan Wang, Alex Zavalny, Renjing Xu, Bhavya Kailkhura, and Kaidi Xu. 2023. Shifting attention to relevance: Towards the uncertainty estimation of large language models. arXiv preprint arXiv:2307.01379.
|
| 229 |
+
Esin Durmus, He He, and Mona Diab. 2020. FEQA: A question answering evaluation framework for faithfulness assessment in abstractive summarization. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5055-5070. Association for Computational Linguistics.
|
| 230 |
+
Tobias Falke, Leonardo F. R. Ribeiro, Prasetya Ajie Utama, Ido Dagan, and Iryna Gurevych. 2019. Ranking generated summaries by correctness: An interesting but challenging application for natural language inference. In Proceedings of the 57th Conference of the Association for Computational Linguistics, pages 2214-2220. Association for Computational Linguistics.
|
| 231 |
+
C. Lee Giles, Guo-Zheng Sun, Hsing-Hen Chen, Yee-Chun Lee, and Dong Chen. 1989. Higher order recurrent networks and grammatical inference. In Advances in Neural Information Processing Systems, volume 2, pages 380-387. Morgan Kaufmann.
|
| 232 |
+
|
| 233 |
+
Or Honovich, Roee Aharoni, Jonathan Herzig, Hāgai Taitelbaum, Doron Kukliansy, Vered Cohen, Thomas Scialom, Idan Szpektor, Avinatan Hassidim, and Yossi Matias. 2022. TRUE: Reevaluating factual consistency evaluation. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 3905-3920. Association for Computational Linguistics.
|
| 234 |
+
Lei Huang, Weijiang Yu, Weitao Ma, Weihong Zhong, Zhangyin Feng, Haotian Wang, Qianglong Chen, Weihua Peng, Xiaocheng Feng, Bing Qin, et al. 2023. A survey on hallucination in large language models: Principles, taxonomy, challenges, and open questions. arXiv preprint arXiv:2311.05232.
|
| 235 |
+
Junyi Li, Xiaoxue Cheng, Xin Zhao, Jian-Yun Nie, and Ji-Rong Wen. 2023a. HaluEval: A large-scale hallucination evaluation benchmark for large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 6449-6464. Association for Computational Linguistics.
|
| 236 |
+
Kenneth Li, Oam Patel, Fernanda Viégas, Hanspeter Pfister, and Martin Wattenberg. 2023b. Inference-Time intervention: Eliciting truthful answers from a language model. In Thirty-seventh Conference on Neural Information Processing Systems, pages 41451-41530.
|
| 237 |
+
Stephanie Lin, Jacob Hilton, and Owain Evans. 2022a. Teaching models to express their uncertainty in words. Transactions on Machine Learning Research, 2022.
|
| 238 |
+
Stephanie Lin, Jacob Hilton, and Owain Evans. 2022b. TruthfulQA: Measuring how models mimic human falsehoods. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics, pages 3214-3252. Association for Computational Linguistics.
|
| 239 |
+
Potsawee Manakul, Adrian Liusie, and Mark J. F. Gales. 2023. SelfCheckGPT: Zero-resource black-box hallucination detection for generative large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 9004-9017. Association for Computational Linguistics.
|
| 240 |
+
Sewon Min, Kalpesh Krishna, Xinxi Lyu, Mike Lewis, Wen-tau Yih, Pang Koh, Mohit Iyyer, Luke Zettlemoyer, and Hannaneh Hajishirzi. 2023. FActScore: Fine-grained atomic evaluation of factual precision in long form text generation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 12076-12100. Association for Computational Linguistics.
|
| 241 |
+
|
| 242 |
+
Niels Mündler, Jingxuan He, Slobodan Jenko, and Martin Vechev. 2024. Self-contradictory hallucinations of large language models: Evaluation, detection and mitigation. In *The Twelfth International Conference on Learning Representations*.
|
| 243 |
+
Reiichiro Nakano, Jacob Hilton, Suchir Balaji, Jeff Wu, Long Ouyang, Christina Kim, Christopher Hesse, Shantanu Jain, Vineet Kosaraju, William Saunders, et al. 2021. WebGPT: Browser-assisted question-answering with human feedback. arXiv preprint arXiv:2112.09332.
|
| 244 |
+
Christian W. Omlin and C. Lee Giles. 1996. Extraction of rules from discrete-time recurrent neural networks. Neural Networks, 9(1):41-52.
|
| 245 |
+
Artidoro Pagnoni, Vidhisha Balachandran, and Yulia Tsvetkov. 2021. Understanding factuality in abstractive summarization with FRANK: A benchmark for factuality metrics. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4812-4829. Association for Computational Linguistics.
|
| 246 |
+
Fabio Petroni, Tim Rocttäschel, Sebastian Riedel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, and Alexander Miller. 2019. Language models as knowledge bases? In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing, pages 2463-2473. Association for Computational Linguistics.
|
| 247 |
+
Jack W. Rae, Sebastian Borgeaud, Trevor Cai, Katie Millican, Jordan Hoffmann, Francis Song, John Aslanides, Sarah Henderson, Roman Ring, Susannah Young, et al. 2021. Scaling language models: Methods, analysis & insights from training Gopher. arXiv preprint arXiv:2112.11446.
|
| 248 |
+
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. The Journal of Machine Learning Research, 21(140):1-67.
|
| 249 |
+
Vipula Rawte, Amit Sheth, and Amitava Das. 2023. A survey of hallucination in large foundation models. arXiv preprint arXiv:2309.05922.
|
| 250 |
+
Ehud Reiter. 2018. A structured review of the validity of BLEU. Computational Linguistics, 44(3):393-401.
|
| 251 |
+
William Saunders, Catherine Yeh, Jeff Wu, Steven Bills, Long Ouyang, Jonathan Ward, and Jan Leike. 2022. Self-critiquing models for assisting human evaluators. arXiv preprint arXiv:2206.05802.
|
| 252 |
+
|
| 253 |
+
Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. 2023. Stanford Alpaca: An instruction-following LLaMA model. *GitHub Repository*.
|
| 254 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023. LLAMA 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288.
|
| 255 |
+
Andrew Viterbi. 1967. Error bounds for convolutional codes and an asymptotically optimum decoding algorithm. IEEE Transactions on Information Theory, 13(2):260-269.
|
| 256 |
+
Rui Wang, Hongru Wang, Fei Mi, Yi Chen, Ruifeng Xu, and Kam-Fai Wong. 2023. Self-critique prompting with large language models for inductive instructions. arXiv preprint arXiv:2305.13733.
|
| 257 |
+
Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V. Le, Denny Zhou, et al. 2022. Chain-of-thought prompting elicits reasoning in large language models. In Thirty-Sixth Conference on Neural Information Processing Systems, pages 24824-24837.
|
| 258 |
+
Yijun Xiao and William Yang Wang. 2021. On hallucination and predictive uncertainty in conditional language generation. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics, pages 2734-2744. Association for Computational Linguistics.
|
| 259 |
+
Miao Xiong, Zhiyuan Hu, Xinyang Lu, Yifei Li, Jie Fu, Junxian He, and Bryan Hooi. 2023. Can LLMs express their uncertainty? An empirical evaluation of confidence elicitation in LLMs. In The Twelfth International Conference on Learning Representations.
|
| 260 |
+
Shiping Yang, Renliang Sun, and Xiaojun Wan. 2023. A new benchmark and reverse validation method for passage-level hallucination detection. In *Findings of the Association for Computational Linguistics: EMNLP* 2023, pages 3898-3908.
|
| 261 |
+
Yue Zhang, Yafu Li, Leyang Cui, Deng Cai, Lemao Liu, Tingchen Fu, Xinting Huang, Enbo Zhao, Yu Zhang, Yulong Chen, et al. 2023. Siren's song in the AI ocean: A survey on hallucination in large language models. arXiv preprint arXiv:2309.01219.
|
| 262 |
+
|
| 263 |
+
# A Experiment Setup
|
| 264 |
+
|
| 265 |
+
# A.1 Datasets
|
| 266 |
+
|
| 267 |
+
TruthfulQA (Lin et al., 2022b) is a benchmark dataset designed to assess the truthfulness of language models in their responses. This dataset comprises 817 uniquely crafted questions, covering a wide range of 38 different categories. These categories include various types of hallucinations and a spectrum of semantic topics like politics, conspiracies, and fiction. All questions are written by humans and are strategically designed to induce imitative falsehoods. A notable aspect of TruthfulQA is its "adversarial" nature, intentionally set to probe the weaknesses in a language model's ability to maintain truthfulness. Most questions are one-sentence long with a median length of 9 words. Each question is accompanied by a set of correct and incorrect reference answers annotated by experts.
|
| 268 |
+
|
| 269 |
+
HaluEval (Li et al., 2023a) is a benchmark dataset for assessing the capability of LLMs in recognizing hallucinations. It was developed using a combination of automated generation and human annotation, resulting in 5,000 general user queries paired with ChatGPT responses and 30,000 task-specific samples. The automated generation process follows the "sampling-then-filtering" approach. Specifically, the benchmark initially employs ChatGPT to generate a variety of hallucinated answers based on task-related hallucination patterns, and then it selects the most plausible hallucinated samples produced by ChatGPT. For the human annotation aspect, Alpaca-sourced queries were processed by ChatGPT to generate multiple responses, which were then manually evaluated for hallucinated content. This benchmark dataset includes task-specific subsets from multiple natural language tasks, such as question answering, knowledge-grounded dialogue, and text summarization.
|
| 270 |
+
|
| 271 |
+
# A.2 Baseline Methods
|
| 272 |
+
|
| 273 |
+
We conducted a thorough search for related work and made every effort to include all peer-reviewed, relevant work in our comparison for this paper, even those less directly comparable, such as hallucination rectification methods that allow for an intermediate detection step. For all
|
| 274 |
+
|
| 275 |
+
<table><tr><td rowspan="2">Datasets</td><td rowspan="2">Method Name</td><td rowspan="2">Method Type</td><td colspan="4">Models</td></tr><tr><td>Llama-13B</td><td>Alpaca-13B</td><td>Vicuna-13B</td><td>Llama2-13B</td></tr><tr><td rowspan="4">TruthfulQA</td><td>SelfCheck-Bertscore</td><td>black-box</td><td>0.55</td><td>0.52</td><td>0.51</td><td>0.54</td></tr><tr><td>SelfCheck-MQAG</td><td>black-box</td><td>0.52</td><td>0.51</td><td>0.52</td><td>0.54</td></tr><tr><td>SelfCheck-Ngram</td><td>black-box</td><td>0.65</td><td>0.60</td><td>0.59</td><td>0.61</td></tr><tr><td>SelfCheck-Combined</td><td>black-box</td><td>0.65</td><td>0.60</td><td>0.61</td><td>0.63</td></tr><tr><td rowspan="4">HaluEval</td><td>SelfCheck-Bertscore</td><td>black-box</td><td>0.57</td><td>0.61</td><td>0.59</td><td>0.63</td></tr><tr><td>SelfCheck-MQAG</td><td>black-box</td><td>0.59</td><td>0.58</td><td>0.54</td><td>0.57</td></tr><tr><td>SelfCheck-Ngram</td><td>black-box</td><td>0.61</td><td>0.63</td><td>0.61</td><td>0.63</td></tr><tr><td>SelfCheck-Combined</td><td>black-box</td><td>0.62</td><td>0.67</td><td>0.64</td><td>0.67</td></tr></table>
|
| 276 |
+
|
| 277 |
+
Table 6: More metrics for measuring the hallucinations of LLMs.
|
| 278 |
+
|
| 279 |
+
baseline methods, we used their open-source implementations to conduct the experiments when available. The only exception is "Uncertainty", which is not open-sourced and thus requires a straightforward re-implementation. We present a more detailed description of each baseline method in the following paragraphs. The methods "Latent Activation", "Internal State", and "ITT" require labelled reference data for training. In our experiments, these approaches use the same reference data as PoLLMgraph to ensure a fair comparison.
|
| 280 |
+
|
| 281 |
+
SelfCheck (Manakul et al., 2023) is a method designed to identify hallucinations in LLMs by examining inconsistencies. This technique is based on the premise that hallucinations occur when there is high uncertainty in input processing. This uncertainty often leads LLMs to generate diverse and inconsistent content, even when the same input is provided repeatedly. In accordance with the original work, we set the temperature to 0 and use beam-search decoding to generate the main responses. To determine whether a response is a hallucination, we generate 20 reference responses at a temperature of 1.0. We then calculate the inconsistency score between the main response and these references using three metrics: BERTScore (Section 5.1 of Manakul et al. (2023)), MQAG (Section 5.2 of Manakul et al. (2023)), and Ngram (Section 5.3 of Manakul et al. (2023)). These calculations yield the SelfCheck-BERT, SelfCheck-QA, and SelfCheck-Ngram scores, as shown in Table 6. The overall hallucination detection score, SelfCheck-Combined, is the average of these metrics and is presented as the default in Table 1. Our experiments are conducted using the official SelfCheckGPT repository, available at https://github.com/potsawee/selfcheckgpt.
|
| 282 |
+
|
| 283 |
+
Uncertainty (Xiao and Wang, 2021) involves using predictive uncertainty at each decoding step, which quantifies the entropy of the token probability distributions that a model predicts (Equation 3 in Xiao and Wang (2021)). The resulting uncertainty scores are used to measure hallucinations, with higher uncertainty scores indicating a greater likelihood of hallucinations. We have conducted experiments using our own implementation of this baseline, as no official open-source code has been released for this method. In our implementation, we employ beam search as the decoding strategy with a temperature setting of 0.
|
| 284 |
+
|
| 285 |
+
Latent Activation (Burns et al., 2022) identifies the pattern of direction in activation space related to hallucination content. It operates by finding a direction in the activation space that adheres to logical consistency properties, such as ensuring that a statement and its negation have opposite truth values. Specifically, for each Q/A pair, it transforms them into an affirmative statement and its negation by appending a "yes"/"no" statement. It then extracts the latent activation of the contrasting pair at the final token of the last layer. Subsequently, it learns a probe that maps this normalized hidden activation to a numerical value ranging from 0 to 1, representing the probability that the statement is true. By default, the probe is defined as a linear projection followed by a sigmoid function and trained to maintain consistency on the contrasting pair of statements. We use the official repository (https://github.com/collinburns/discovering_latent_knowledge) to conduct experiments.
|
| 286 |
+
|
| 287 |
+
Internal State (Azaria and Mitchell, 2023) involves training a neural network classifier using activations as input to predict the re
|
| 288 |
+
|
| 289 |
+
liability of an LLM's output. We adhere to the default setting, which involves extracting the activation of the last layer from the final token of each Q/A pair. The activations extracted from the training data are used to train the classifier, while those from the remaining data are utilized to evaluate the effectiveness of hallucination detection. The ground-truth hallucination is annotated by a fine-tuned GPT-3-13B, as per our standard procedure. We use the open-source code (https://github.com/balevinstein/Probes) to conduct experiments.
|
| 290 |
+
|
| 291 |
+
ITI (Li et al., 2023b). Similar to the Internal State approach, ITI utilizes activations as input to predict an intermediate detection score, which assists in identifying whether the output is a hallucination (this score can later be used to guide the modification of latent states to correct the hallucination). The distinction lies in ITI employing a logistic regression model for prediction, while Internal State uses a simple three-layer feed-forward neural network model. In our experiment, we extract the activations of the last layer from the last tokens of each Q/A pair. These activations are employed both for training the logistic model and for evaluating the effectiveness of hallucination detection, using annotated ground-truth. The intermediate detection scores, derived from the logistic regression model, are used as hallucination prediction scores. We use the official repository (https://github.com/likenneth/honest_llama) to conduct experiments.
|
| 292 |
+
|
| 293 |
+
# B Additional Results
|
| 294 |
+
|
| 295 |
+
Categories Coverage. We present a further investigation into the influence of distribution shifts between the training and evaluation data by deliberately controlling the reference data to cover only a small portion of the possible semantics that arise during testing. Specifically, we restrict the reference data to originate from $25\%$ , $50\%$ , $90\%$ , and $100\%$ of the overall categories in the TruthfulQA dataset. Table 7 displays the results, indicating an increase in detection performance with the expansion of category coverage. Remarkably, our approach surpasses other state-of-the-art methods, even when trained on only $25\%$ of the categories while being tested on all possible unseen topics.
|
| 296 |
+
|
| 297 |
+
<table><tr><td rowspan="2">Model Type</td><td colspan="4">Categories Coverage</td></tr><tr><td>25%</td><td>50%</td><td>90%</td><td>100%</td></tr><tr><td>Llama-13B</td><td>0.71</td><td>0.72</td><td>0.77</td><td>0.85</td></tr><tr><td>Alpaca-13B</td><td>0.73</td><td>0.73</td><td>0.81</td><td>0.85</td></tr><tr><td>Vicuna-13B</td><td>0.72</td><td>0.74</td><td>0.78</td><td>0.83</td></tr><tr><td>Llama2-13B</td><td>0.74</td><td>0.76</td><td>0.84</td><td>0.88</td></tr></table>
|
| 298 |
+
|
| 299 |
+
Cross-dataset Performance. To complement the evaluation of the effectiveness of PoLLMgraph, we measure the effectiveness of detecting hallucinations on HaluEval, when trained on TrutfulQA. The results are presented in Table 8, which complements Table 4 in the main paper.
|
| 300 |
+
|
| 301 |
+
Table 7: The detection AUC-ROC of PoLLMgraph under distributional shifts.
|
| 302 |
+
|
| 303 |
+
<table><tr><td>Method Name</td><td>Alpaca-13B</td><td>Llama2-13B</td></tr><tr><td>ITI</td><td>0.60</td><td>0.61</td></tr><tr><td>Latent Activation</td><td>0.58</td><td>0.54</td></tr><tr><td>Internal State</td><td>0.61</td><td>0.62</td></tr><tr><td>PoLLMgraph-MM (Grid)</td><td>0.62</td><td>0.63</td></tr><tr><td>PoLLMgraph-MM (GMM)</td><td>0.64</td><td>0.66</td></tr><tr><td>PoLLMgraph-HMM (Grid)</td><td>0.69</td><td>0.72</td></tr><tr><td>PoLLMgraph-HMM (GMM)</td><td>0.68</td><td>0.64</td></tr></table>
|
| 304 |
+
|
| 305 |
+
Number of Reference Data. We conduct additional experiments to explore how the size of the reference dataset (10%, 15%, 25%, 50%, 75% of the entire dataset) affects the effectiveness of other white-box baselines in TruthfulQA with Alpaca-13B as the investigated model. Table 9 shows the experimental results. It can be clearly observed that all approaches achieve higher detection AUC-ROC with the use of more reference data, while our PoLLMgraph consistently outperforms the other white-box methods across different sizes of the reference dataset.
|
| 306 |
+
|
| 307 |
+
Table 8: The detection AUC-ROC of different methods on HaluEval, when trained on TruthfulQA.
|
| 308 |
+
|
| 309 |
+
<table><tr><td>Method Name</td><td>10%</td><td>15%</td><td>25%</td><td>50%</td><td>75%</td></tr><tr><td>ITI</td><td>0.67</td><td>0.69</td><td>0.71</td><td>0.75</td><td>0.77</td></tr><tr><td>Latent Activation</td><td>0.65</td><td>0.68</td><td>0.73</td><td>0.78</td><td>0.84</td></tr><tr><td>Internal State</td><td>0.67</td><td>0.70</td><td>0.75</td><td>0.81</td><td>0.84</td></tr><tr><td>PoLLMgraph-HMM</td><td>0.85</td><td>0.85</td><td>0.86</td><td>0.87</td><td>0.89</td></tr></table>
|
| 310 |
+
|
| 311 |
+
Table 9: The detection AUC-ROC of different white-box approaches across different reference dataset sizes on TruthfulQA, with Alpaca-13B as the studied model.
|
| 312 |
+
|
| 313 |
+
Black-box Approaches. We further evaluate more latest black-box hallucination detection approaches on the TruthfulQA dataset, including LMvsLM (Cohen et al., 2023) and RV(QG) (Yang et al., 2023). We conduct the experiment using the open-source codebase from RV(QG). While LMvsLM does not provide open-source code, the open-source repository of RV(QG) includes an implementation of LMvsLM. All hyperparameters are set to be their defaults. We use Llama-13B, Alpaca-13B, Vicuna-13B, Llama2-13B, the latest GPT-4 (gpt-4-0125-preview) as the studied LLMs, with TruthfulQA serving as the test dataset. The empirical results in Table 10 highlight a significant gap between white-box and black-box detection approaches.
|
| 314 |
+
|
| 315 |
+
<table><tr><td rowspan="2">Model Type</td><td colspan="2">Method Name</td></tr><tr><td>LMvsLM</td><td>RV(QG)</td></tr><tr><td>Llama-13B</td><td>0.62</td><td>0.73</td></tr><tr><td>Alpaca-13B</td><td>0.61</td><td>0.72</td></tr><tr><td>Vicuna-13B</td><td>0.63</td><td>0.69</td></tr><tr><td>Llama2-13B</td><td>0.69</td><td>0.76</td></tr><tr><td>GPT-4</td><td>0.71</td><td>0.76</td></tr></table>
|
| 316 |
+
|
| 317 |
+
Table 10: The detection AUC-ROC of black-box hallucination detection approaches on TruthfulQA with different studied LLMs.
|
| 318 |
+
|
| 319 |
+
Different Variants of SelfCheck. We present detailed results on various variants of SelfCheck, including SelfCheck-Bertscore, SelfCheck-MQAG, and SelfCheck-Ngram, as illustrated in Section A.2. The results are displayed in Table 6. Since SelfCheck-Combined consistently outperforms the other options, we use it as the default for comparison in Table 1.
|
2024/PoLLMgraph_ Unraveling Hallucinations in Large Language Models via State Transition Dynamics/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9318d37868c6c8a84ca12d04393b305a2d40083399832f2ef33253e8e4868dd7
|
| 3 |
+
size 664714
|
2024/PoLLMgraph_ Unraveling Hallucinations in Large Language Models via State Transition Dynamics/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/Probing the Category of Verbal Aspect in Transformer Language Models/f8d202eb-c47f-409f-870b-074684e65596_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|