Chelsea707 commited on
Commit
3a1ecda
·
verified ·
1 Parent(s): 996e38a

Add Batch 921c5a94-5b8f-42a3-ab1c-e43fa6198755 data

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +64 -0
  2. 2024/Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programs/c1737880-532e-43a3-b284-f29709502d38_content_list.json +0 -0
  3. 2024/Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programs/c1737880-532e-43a3-b284-f29709502d38_model.json +0 -0
  4. 2024/Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programs/c1737880-532e-43a3-b284-f29709502d38_origin.pdf +3 -0
  5. 2024/Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programs/full.md +0 -0
  6. 2024/Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programs/images.zip +3 -0
  7. 2024/Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programs/layout.json +0 -0
  8. 2024/Optimizing Language Models with Fair and Stable Reward Composition in Reinforcement Learning/08b13e0d-fa60-42c9-9d68-8586612dd060_content_list.json +0 -0
  9. 2024/Optimizing Language Models with Fair and Stable Reward Composition in Reinforcement Learning/08b13e0d-fa60-42c9-9d68-8586612dd060_model.json +0 -0
  10. 2024/Optimizing Language Models with Fair and Stable Reward Composition in Reinforcement Learning/08b13e0d-fa60-42c9-9d68-8586612dd060_origin.pdf +3 -0
  11. 2024/Optimizing Language Models with Fair and Stable Reward Composition in Reinforcement Learning/full.md +525 -0
  12. 2024/Optimizing Language Models with Fair and Stable Reward Composition in Reinforcement Learning/images.zip +3 -0
  13. 2024/Optimizing Language Models with Fair and Stable Reward Composition in Reinforcement Learning/layout.json +0 -0
  14. 2024/Optimizing Rare Word Accuracy in Direct Speech Translation with a Retrieval-and-Demonstration Approach/19bfa6fd-603b-4e9c-b97c-3be8a8269ff6_content_list.json +0 -0
  15. 2024/Optimizing Rare Word Accuracy in Direct Speech Translation with a Retrieval-and-Demonstration Approach/19bfa6fd-603b-4e9c-b97c-3be8a8269ff6_model.json +0 -0
  16. 2024/Optimizing Rare Word Accuracy in Direct Speech Translation with a Retrieval-and-Demonstration Approach/19bfa6fd-603b-4e9c-b97c-3be8a8269ff6_origin.pdf +3 -0
  17. 2024/Optimizing Rare Word Accuracy in Direct Speech Translation with a Retrieval-and-Demonstration Approach/full.md +468 -0
  18. 2024/Optimizing Rare Word Accuracy in Direct Speech Translation with a Retrieval-and-Demonstration Approach/images.zip +3 -0
  19. 2024/Optimizing Rare Word Accuracy in Direct Speech Translation with a Retrieval-and-Demonstration Approach/layout.json +0 -0
  20. 2024/Order of Magnitude Speedups for LLM Membership Inference/2328386a-6fac-4022-bdf0-487d6670e077_content_list.json +1928 -0
  21. 2024/Order of Magnitude Speedups for LLM Membership Inference/2328386a-6fac-4022-bdf0-487d6670e077_model.json +0 -0
  22. 2024/Order of Magnitude Speedups for LLM Membership Inference/2328386a-6fac-4022-bdf0-487d6670e077_origin.pdf +3 -0
  23. 2024/Order of Magnitude Speedups for LLM Membership Inference/full.md +332 -0
  24. 2024/Order of Magnitude Speedups for LLM Membership Inference/images.zip +3 -0
  25. 2024/Order of Magnitude Speedups for LLM Membership Inference/layout.json +0 -0
  26. 2024/Ouroboros_ Generating Longer Drafts Phrase by Phrase for Faster Speculative Decoding/0769a112-ecbe-4a76-bca4-3935b552032a_content_list.json +0 -0
  27. 2024/Ouroboros_ Generating Longer Drafts Phrase by Phrase for Faster Speculative Decoding/0769a112-ecbe-4a76-bca4-3935b552032a_model.json +0 -0
  28. 2024/Ouroboros_ Generating Longer Drafts Phrase by Phrase for Faster Speculative Decoding/0769a112-ecbe-4a76-bca4-3935b552032a_origin.pdf +3 -0
  29. 2024/Ouroboros_ Generating Longer Drafts Phrase by Phrase for Faster Speculative Decoding/full.md +476 -0
  30. 2024/Ouroboros_ Generating Longer Drafts Phrase by Phrase for Faster Speculative Decoding/images.zip +3 -0
  31. 2024/Ouroboros_ Generating Longer Drafts Phrase by Phrase for Faster Speculative Decoding/layout.json +0 -0
  32. 2024/Outcome-Constrained Large Language Models for Countering Hate Speech/78d433df-4deb-4fac-a059-d56966a36e8b_content_list.json +1818 -0
  33. 2024/Outcome-Constrained Large Language Models for Countering Hate Speech/78d433df-4deb-4fac-a059-d56966a36e8b_model.json +0 -0
  34. 2024/Outcome-Constrained Large Language Models for Countering Hate Speech/78d433df-4deb-4fac-a059-d56966a36e8b_origin.pdf +3 -0
  35. 2024/Outcome-Constrained Large Language Models for Countering Hate Speech/full.md +326 -0
  36. 2024/Outcome-Constrained Large Language Models for Countering Hate Speech/images.zip +3 -0
  37. 2024/Outcome-Constrained Large Language Models for Countering Hate Speech/layout.json +0 -0
  38. 2024/Overcome Noise and Bias_ Segmentation-Aided Multi-Granularity Denoising and Debiasing for Enhanced Quarduples Extraction in Dialogue/3176c8b9-a49d-4ec0-8717-d3ee041a0fdf_content_list.json +0 -0
  39. 2024/Overcome Noise and Bias_ Segmentation-Aided Multi-Granularity Denoising and Debiasing for Enhanced Quarduples Extraction in Dialogue/3176c8b9-a49d-4ec0-8717-d3ee041a0fdf_model.json +0 -0
  40. 2024/Overcome Noise and Bias_ Segmentation-Aided Multi-Granularity Denoising and Debiasing for Enhanced Quarduples Extraction in Dialogue/3176c8b9-a49d-4ec0-8717-d3ee041a0fdf_origin.pdf +3 -0
  41. 2024/Overcome Noise and Bias_ Segmentation-Aided Multi-Granularity Denoising and Debiasing for Enhanced Quarduples Extraction in Dialogue/full.md +541 -0
  42. 2024/Overcome Noise and Bias_ Segmentation-Aided Multi-Granularity Denoising and Debiasing for Enhanced Quarduples Extraction in Dialogue/images.zip +3 -0
  43. 2024/Overcome Noise and Bias_ Segmentation-Aided Multi-Granularity Denoising and Debiasing for Enhanced Quarduples Extraction in Dialogue/layout.json +0 -0
  44. 2024/PALM_ Few-Shot Prompt Learning for Audio Language Models/0b7be31a-449c-4312-b744-95f7039ae91e_content_list.json +1456 -0
  45. 2024/PALM_ Few-Shot Prompt Learning for Audio Language Models/0b7be31a-449c-4312-b744-95f7039ae91e_model.json +1639 -0
  46. 2024/PALM_ Few-Shot Prompt Learning for Audio Language Models/0b7be31a-449c-4312-b744-95f7039ae91e_origin.pdf +3 -0
  47. 2024/PALM_ Few-Shot Prompt Learning for Audio Language Models/full.md +254 -0
  48. 2024/PALM_ Few-Shot Prompt Learning for Audio Language Models/images.zip +3 -0
  49. 2024/PALM_ Few-Shot Prompt Learning for Audio Language Models/layout.json +0 -0
  50. 2024/PANDA_ Persona Attributes Navigation for Detecting and Alleviating Overuse Problem in Large Language Models/3d541c6b-1d61-43b4-bec7-49ffb71a85cc_content_list.json +0 -0
.gitattributes CHANGED
@@ -4847,3 +4847,67 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
4847
  2024/Optimized[[:space:]]Speculative[[:space:]]Sampling[[:space:]]for[[:space:]]GPU[[:space:]]Hardware[[:space:]]Accelerators/d2875481-c6be-4d28-993b-430794a8773c_origin.pdf filter=lfs diff=lfs merge=lfs -text
4848
  2024/Optimizing[[:space:]]Chinese[[:space:]]Lexical[[:space:]]Simplification[[:space:]]Across[[:space:]]Word[[:space:]]Types_[[:space:]]A[[:space:]]Hybrid[[:space:]]Approach/286e6707-04b9-47c8-811b-197dfd4f907f_origin.pdf filter=lfs diff=lfs merge=lfs -text
4849
  2024/Optimizing[[:space:]]Code[[:space:]]Retrieval_[[:space:]]High-Quality[[:space:]]and[[:space:]]Scalable[[:space:]]Dataset[[:space:]]Annotation[[:space:]]through[[:space:]]Large[[:space:]]Language[[:space:]]Models/a78fc865-e3a6-4ddd-99ba-628e7f962998_origin.pdf filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4847
  2024/Optimized[[:space:]]Speculative[[:space:]]Sampling[[:space:]]for[[:space:]]GPU[[:space:]]Hardware[[:space:]]Accelerators/d2875481-c6be-4d28-993b-430794a8773c_origin.pdf filter=lfs diff=lfs merge=lfs -text
4848
  2024/Optimizing[[:space:]]Chinese[[:space:]]Lexical[[:space:]]Simplification[[:space:]]Across[[:space:]]Word[[:space:]]Types_[[:space:]]A[[:space:]]Hybrid[[:space:]]Approach/286e6707-04b9-47c8-811b-197dfd4f907f_origin.pdf filter=lfs diff=lfs merge=lfs -text
4849
  2024/Optimizing[[:space:]]Code[[:space:]]Retrieval_[[:space:]]High-Quality[[:space:]]and[[:space:]]Scalable[[:space:]]Dataset[[:space:]]Annotation[[:space:]]through[[:space:]]Large[[:space:]]Language[[:space:]]Models/a78fc865-e3a6-4ddd-99ba-628e7f962998_origin.pdf filter=lfs diff=lfs merge=lfs -text
4850
+ 2024/Optimizing[[:space:]]Instructions[[:space:]]and[[:space:]]Demonstrations[[:space:]]for[[:space:]]Multi-Stage[[:space:]]Language[[:space:]]Model[[:space:]]Programs/c1737880-532e-43a3-b284-f29709502d38_origin.pdf filter=lfs diff=lfs merge=lfs -text
4851
+ 2024/Optimizing[[:space:]]Language[[:space:]]Models[[:space:]]with[[:space:]]Fair[[:space:]]and[[:space:]]Stable[[:space:]]Reward[[:space:]]Composition[[:space:]]in[[:space:]]Reinforcement[[:space:]]Learning/08b13e0d-fa60-42c9-9d68-8586612dd060_origin.pdf filter=lfs diff=lfs merge=lfs -text
4852
+ 2024/Optimizing[[:space:]]Rare[[:space:]]Word[[:space:]]Accuracy[[:space:]]in[[:space:]]Direct[[:space:]]Speech[[:space:]]Translation[[:space:]]with[[:space:]]a[[:space:]]Retrieval-and-Demonstration[[:space:]]Approach/19bfa6fd-603b-4e9c-b97c-3be8a8269ff6_origin.pdf filter=lfs diff=lfs merge=lfs -text
4853
+ 2024/Order[[:space:]]of[[:space:]]Magnitude[[:space:]]Speedups[[:space:]]for[[:space:]]LLM[[:space:]]Membership[[:space:]]Inference/2328386a-6fac-4022-bdf0-487d6670e077_origin.pdf filter=lfs diff=lfs merge=lfs -text
4854
+ 2024/Ouroboros_[[:space:]]Generating[[:space:]]Longer[[:space:]]Drafts[[:space:]]Phrase[[:space:]]by[[:space:]]Phrase[[:space:]]for[[:space:]]Faster[[:space:]]Speculative[[:space:]]Decoding/0769a112-ecbe-4a76-bca4-3935b552032a_origin.pdf filter=lfs diff=lfs merge=lfs -text
4855
+ 2024/Outcome-Constrained[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]for[[:space:]]Countering[[:space:]]Hate[[:space:]]Speech/78d433df-4deb-4fac-a059-d56966a36e8b_origin.pdf filter=lfs diff=lfs merge=lfs -text
4856
+ 2024/Overcome[[:space:]]Noise[[:space:]]and[[:space:]]Bias_[[:space:]]Segmentation-Aided[[:space:]]Multi-Granularity[[:space:]]Denoising[[:space:]]and[[:space:]]Debiasing[[:space:]]for[[:space:]]Enhanced[[:space:]]Quarduples[[:space:]]Extraction[[:space:]]in[[:space:]]Dialogue/3176c8b9-a49d-4ec0-8717-d3ee041a0fdf_origin.pdf filter=lfs diff=lfs merge=lfs -text
4857
+ 2024/PALM_[[:space:]]Few-Shot[[:space:]]Prompt[[:space:]]Learning[[:space:]]for[[:space:]]Audio[[:space:]]Language[[:space:]]Models/0b7be31a-449c-4312-b744-95f7039ae91e_origin.pdf filter=lfs diff=lfs merge=lfs -text
4858
+ 2024/PANDA_[[:space:]]Persona[[:space:]]Attributes[[:space:]]Navigation[[:space:]]for[[:space:]]Detecting[[:space:]]and[[:space:]]Alleviating[[:space:]]Overuse[[:space:]]Problem[[:space:]]in[[:space:]]Large[[:space:]]Language[[:space:]]Models/3d541c6b-1d61-43b4-bec7-49ffb71a85cc_origin.pdf filter=lfs diff=lfs merge=lfs -text
4859
+ 2024/PARIKSHA_[[:space:]]A[[:space:]]Large-Scale[[:space:]]Investigation[[:space:]]of[[:space:]]Human-LLM[[:space:]]Evaluator[[:space:]]Agreement[[:space:]]on[[:space:]]Multilingual[[:space:]]and[[:space:]]Multi-Cultural[[:space:]]Data/fcebc4b5-e02d-47d3-9c47-fa6e5b33879d_origin.pdf filter=lfs diff=lfs merge=lfs -text
4860
+ 2024/PATIENT-𝜓_[[:space:]]Using[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]to[[:space:]]Simulate[[:space:]]Patients[[:space:]]for[[:space:]]Training[[:space:]]Mental[[:space:]]Health[[:space:]]Professionals/d86ce71b-7eb4-4bfe-99aa-5eeb435b34d0_origin.pdf filter=lfs diff=lfs merge=lfs -text
4861
+ 2024/PCQPR_[[:space:]]Proactive[[:space:]]Conversational[[:space:]]Question[[:space:]]Planning[[:space:]]with[[:space:]]Reflection/197d86a1-3cd9-4071-b318-47f517a61c07_origin.pdf filter=lfs diff=lfs merge=lfs -text
4862
+ 2024/PREDICT_[[:space:]]Multi-Agent-based[[:space:]]Debate[[:space:]]Simulation[[:space:]]for[[:space:]]Generalized[[:space:]]Hate[[:space:]]Speech[[:space:]]Detection/7ee223d0-7675-4391-8793-60ed0b1a37df_origin.pdf filter=lfs diff=lfs merge=lfs -text
4863
+ 2024/PRompt[[:space:]]Optimization[[:space:]]in[[:space:]]Multi-Step[[:space:]]Tasks[[:space:]](PROMST)_[[:space:]]Integrating[[:space:]]Human[[:space:]]Feedback[[:space:]]and[[:space:]]Heuristic-based[[:space:]]Sampling/2278fe33-f3b3-47f3-826c-590c161b425c_origin.pdf filter=lfs diff=lfs merge=lfs -text
4864
+ 2024/PSC_[[:space:]]Extending[[:space:]]Context[[:space:]]Window[[:space:]]of[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]via[[:space:]]Phase[[:space:]]Shift[[:space:]]Calibration/5ced7d54-9137-4744-8787-b8b021dba07c_origin.pdf filter=lfs diff=lfs merge=lfs -text
4865
+ 2024/PTD-SQL_[[:space:]]Partitioning[[:space:]]and[[:space:]]Targeted[[:space:]]Drilling[[:space:]]with[[:space:]]LLMs[[:space:]]in[[:space:]]Text-to-SQL/17fe63f9-03b9-48ba-9b2f-2e9d1c9aa068_origin.pdf filter=lfs diff=lfs merge=lfs -text
4866
+ 2024/PairDistill_[[:space:]]Pairwise[[:space:]]Relevance[[:space:]]Distillation[[:space:]]for[[:space:]]Dense[[:space:]]Retrieval/1b7f4d98-90c7-400c-86a7-0930fa883fb9_origin.pdf filter=lfs diff=lfs merge=lfs -text
4867
+ 2024/Parameter-Efficient[[:space:]]Sparsity[[:space:]]Crafting[[:space:]]from[[:space:]]Dense[[:space:]]to[[:space:]]Mixture-of-Experts[[:space:]]for[[:space:]]Instruction[[:space:]]Tuning[[:space:]]on[[:space:]]General[[:space:]]Tasks/78bc44a6-afbe-484f-8654-4811b95b800c_origin.pdf filter=lfs diff=lfs merge=lfs -text
4868
+ 2024/Paraphrase[[:space:]]Types[[:space:]]Elicit[[:space:]]Prompt[[:space:]]Engineering[[:space:]]Capabilities/f233d073-1acf-4763-90fe-a208cb5407f4_origin.pdf filter=lfs diff=lfs merge=lfs -text
4869
+ 2024/Pcc-tuning_[[:space:]]Breaking[[:space:]]the[[:space:]]Contrastive[[:space:]]Learning[[:space:]]Ceiling[[:space:]]in[[:space:]]Semantic[[:space:]]Textual[[:space:]]Similarity/90b110dd-0ebf-47ae-89eb-a94f076706c4_origin.pdf filter=lfs diff=lfs merge=lfs -text
4870
+ 2024/Pelican_[[:space:]]Correcting[[:space:]]Hallucination[[:space:]]in[[:space:]]Vision-LLMs[[:space:]]via[[:space:]]Claim[[:space:]]Decomposition[[:space:]]and[[:space:]]Program[[:space:]]of[[:space:]]Thought[[:space:]]Verification/57c6d510-1ff0-4a16-8e0c-5abd3653ea13_origin.pdf filter=lfs diff=lfs merge=lfs -text
4871
+ 2024/PepRec_[[:space:]]Progressive[[:space:]]Enhancement[[:space:]]of[[:space:]]Prompting[[:space:]]for[[:space:]]Recommendation/36119f5a-6db2-4004-9001-3fb4231704e1_origin.pdf filter=lfs diff=lfs merge=lfs -text
4872
+ 2024/Perceptions[[:space:]]of[[:space:]]Linguistic[[:space:]]Uncertainty[[:space:]]by[[:space:]]Language[[:space:]]Models[[:space:]]and[[:space:]]Humans/7bd760c2-1aea-4820-88ff-18020b768d65_origin.pdf filter=lfs diff=lfs merge=lfs -text
4873
+ 2024/Perceptions[[:space:]]to[[:space:]]Beliefs_[[:space:]]Exploring[[:space:]]Precursory[[:space:]]Inferences[[:space:]]for[[:space:]]Theory[[:space:]]of[[:space:]]Mind[[:space:]]in[[:space:]]Large[[:space:]]Language[[:space:]]Models/8efdf837-f793-4b7d-8bb4-11a3de44dbd1_origin.pdf filter=lfs diff=lfs merge=lfs -text
4874
+ 2024/Performance-Guided[[:space:]]LLM[[:space:]]Knowledge[[:space:]]Distillation[[:space:]]for[[:space:]]Efficient[[:space:]]Text[[:space:]]Classification[[:space:]]at[[:space:]]Scale/23fadfe5-7671-4073-bfdf-84b810449a70_origin.pdf filter=lfs diff=lfs merge=lfs -text
4875
+ 2024/Personality-aware[[:space:]]Student[[:space:]]Simulation[[:space:]]for[[:space:]]Conversational[[:space:]]Intelligent[[:space:]]Tutoring[[:space:]]Systems/25ae83b8-25b5-4009-86f8-8e360a829cb7_origin.pdf filter=lfs diff=lfs merge=lfs -text
4876
+ 2024/Personalized[[:space:]]Pieces_[[:space:]]Efficient[[:space:]]Personalized[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]through[[:space:]]Collaborative[[:space:]]Efforts/b2a46134-d901-4198-93f2-5f18fce4d4d3_origin.pdf filter=lfs diff=lfs merge=lfs -text
4877
+ 2024/Personas[[:space:]]as[[:space:]]a[[:space:]]Way[[:space:]]to[[:space:]]Model[[:space:]]Truthfulness[[:space:]]in[[:space:]]Language[[:space:]]Models/da008906-4b00-4889-b370-26f0d3d2cfe7_origin.pdf filter=lfs diff=lfs merge=lfs -text
4878
+ 2024/PhiloGPT_[[:space:]]A[[:space:]]Philology-Oriented[[:space:]]Large[[:space:]]Language[[:space:]]Model[[:space:]]for[[:space:]]Ancient[[:space:]]Chinese[[:space:]]Manuscripts[[:space:]]with[[:space:]]Dunhuang[[:space:]]as[[:space:]]Case[[:space:]]Study/30ac2e7e-5608-4b84-af83-7f4822f3029f_origin.pdf filter=lfs diff=lfs merge=lfs -text
4879
+ 2024/Pixology_[[:space:]]Probing[[:space:]]the[[:space:]]Linguistic[[:space:]]and[[:space:]]Visual[[:space:]]Capabilities[[:space:]]of[[:space:]]Pixel-based[[:space:]]Language[[:space:]]Models/b1f6eb75-ea2f-4432-a5ed-59e3396fbc58_origin.pdf filter=lfs diff=lfs merge=lfs -text
4880
+ 2024/Please[[:space:]]note[[:space:]]that[[:space:]]I’m[[:space:]]just[[:space:]]an[[:space:]]AI_[[:space:]]Analysis[[:space:]]of[[:space:]]Behavior[[:space:]]Patterns[[:space:]]of[[:space:]]LLMs[[:space:]]in[[:space:]](Non-)offensive[[:space:]]Speech[[:space:]]Identification/12896a5e-9b6f-4528-9ac9-b3f8b214b307_origin.pdf filter=lfs diff=lfs merge=lfs -text
4881
+ 2024/Position[[:space:]]Engineering_[[:space:]]Boosting[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]through[[:space:]]Positional[[:space:]]Information[[:space:]]Manipulation/b19689e2-5a21-4458-82dd-d33d7e73736e_origin.pdf filter=lfs diff=lfs merge=lfs -text
4882
+ 2024/PostMark_[[:space:]]A[[:space:]]Robust[[:space:]]Blackbox[[:space:]]Watermark[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models/571a10b6-0c5b-42ca-92ec-f8a94d14741d_origin.pdf filter=lfs diff=lfs merge=lfs -text
4883
+ 2024/PrExMe![[:space:]]Large[[:space:]]Scale[[:space:]]Prompt[[:space:]]Exploration[[:space:]]of[[:space:]]Open[[:space:]]Source[[:space:]]LLMs[[:space:]]for[[:space:]]Machine[[:space:]]Translation[[:space:]]and[[:space:]]Summarization[[:space:]]Evaluation/f1dab978-cf8e-4786-b82b-7960f68cd7de_origin.pdf filter=lfs diff=lfs merge=lfs -text
4884
+ 2024/Pragmatic[[:space:]]Norms[[:space:]]Are[[:space:]]All[[:space:]]You[[:space:]]Need[[:space:]]–[[:space:]]Why[[:space:]]The[[:space:]]Symbol[[:space:]]Grounding[[:space:]]Problem[[:space:]]Does[[:space:]]Not[[:space:]]Apply[[:space:]]to[[:space:]]LLMs/a5ce4cbf-6180-496d-b0bf-ac8f24bf2803_origin.pdf filter=lfs diff=lfs merge=lfs -text
4885
+ 2024/Pre-trained[[:space:]]Language[[:space:]]Models[[:space:]]Do[[:space:]]Not[[:space:]]Help[[:space:]]Auto-regressive[[:space:]]Text-to-Image[[:space:]]Generation/cc94fcdf-2baa-4196-92f7-cad3bc2de5c0_origin.pdf filter=lfs diff=lfs merge=lfs -text
4886
+ 2024/Pre-training[[:space:]]Cross-lingual[[:space:]]Open[[:space:]]Domain[[:space:]]Question[[:space:]]Answering[[:space:]]with[[:space:]]Large-scale[[:space:]]Synthetic[[:space:]]Supervision/adf20dd9-677b-4023-b952-5f27d3df9054_origin.pdf filter=lfs diff=lfs merge=lfs -text
4887
+ 2024/PreAlign_[[:space:]]Boosting[[:space:]]Cross-Lingual[[:space:]]Transfer[[:space:]]by[[:space:]]Early[[:space:]]Establishment[[:space:]]of[[:space:]]Multilingual[[:space:]]Alignment/737a0455-40d9-4beb-b6d7-40787b4b26c0_origin.pdf filter=lfs diff=lfs merge=lfs -text
4888
+ 2024/Precise[[:space:]]Model[[:space:]]Benchmarking[[:space:]]with[[:space:]]Only[[:space:]]a[[:space:]]Few[[:space:]]Observations/d0b004b6-401d-4230-8191-c12f46d86575_origin.pdf filter=lfs diff=lfs merge=lfs -text
4889
+ 2024/Predicate[[:space:]]Debiasing[[:space:]]in[[:space:]]Vision-Language[[:space:]]Models[[:space:]]Integration[[:space:]]for[[:space:]]Scene[[:space:]]Graph[[:space:]]Generation[[:space:]]Enhancement/97215871-12f4-4882-bb45-c72eb37e5dbc_origin.pdf filter=lfs diff=lfs merge=lfs -text
4890
+ 2024/Predicting[[:space:]]Rewards[[:space:]]Alongside[[:space:]]Tokens_[[:space:]]Non-disruptive[[:space:]]Parameter[[:space:]]Insertion[[:space:]]for[[:space:]]Efficient[[:space:]]Inference[[:space:]]Intervention[[:space:]]in[[:space:]]Large[[:space:]]Language[[:space:]]Model/ac6e29ee-8a37-4287-b0e2-7107410659f2_origin.pdf filter=lfs diff=lfs merge=lfs -text
4891
+ 2024/Preference-Guided[[:space:]]Reflective[[:space:]]Sampling[[:space:]]for[[:space:]]Aligning[[:space:]]Language[[:space:]]Models/df199388-7f88-45b0-9f46-cee058942f2d_origin.pdf filter=lfs diff=lfs merge=lfs -text
4892
+ 2024/Prefixing[[:space:]]Attention[[:space:]]Sinks[[:space:]]can[[:space:]]Mitigate[[:space:]]Activation[[:space:]]Outliers[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Model[[:space:]]Quantization/dec5ab26-2273-4ffc-9e34-34452ae324da_origin.pdf filter=lfs diff=lfs merge=lfs -text
4893
+ 2024/Preserving[[:space:]]Generalization[[:space:]]of[[:space:]]Language[[:space:]]models[[:space:]]in[[:space:]]Few-shot[[:space:]]Continual[[:space:]]Relation[[:space:]]Extraction/ac3c030f-95e7-4163-807d-a29f68d52a7e_origin.pdf filter=lfs diff=lfs merge=lfs -text
4894
+ 2024/Preserving[[:space:]]Multi-Modal[[:space:]]Capabilities[[:space:]]of[[:space:]]Pre-trained[[:space:]]VLMs[[:space:]]for[[:space:]]Improving[[:space:]]Vision-Linguistic[[:space:]]Compositionality/4d25b687-bc08-4d34-b789-ef8f539672df_origin.pdf filter=lfs diff=lfs merge=lfs -text
4895
+ 2024/Pretraining[[:space:]]Data[[:space:]]Detection[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models_[[:space:]]A[[:space:]]Divergence-based[[:space:]]Calibration[[:space:]]Method/d3ed68ee-c932-4e78-b9c3-dc781539e6b1_origin.pdf filter=lfs diff=lfs merge=lfs -text
4896
+ 2024/Pretraining[[:space:]]Language[[:space:]]Models[[:space:]]Using[[:space:]]Translationese/b0897db1-d1db-4b2c-b8ce-762ce24f44cc_origin.pdf filter=lfs diff=lfs merge=lfs -text
4897
+ 2024/Private[[:space:]]Language[[:space:]]Models[[:space:]]via[[:space:]]Truncated[[:space:]]Laplacian[[:space:]]Mechanism/454a8914-161a-4129-adcc-1e0cc40cc114_origin.pdf filter=lfs diff=lfs merge=lfs -text
4898
+ 2024/Proceedings[[:space:]]of[[:space:]]the[[:space:]]2024[[:space:]]Conference[[:space:]]on[[:space:]]Empirical[[:space:]]Methods[[:space:]]in[[:space:]]Natural[[:space:]]Language[[:space:]]Processing/f4f41c0d-709d-4004-92b2-da80dd419563_origin.pdf filter=lfs diff=lfs merge=lfs -text
4899
+ 2024/Prometheus[[:space:]]2_[[:space:]]An[[:space:]]Open[[:space:]]Source[[:space:]]Language[[:space:]]Model[[:space:]]Specialized[[:space:]]in[[:space:]]Evaluating[[:space:]]Other[[:space:]]Language[[:space:]]Models/ef97b892-2c5a-41ae-8eba-62a8b333a0d2_origin.pdf filter=lfs diff=lfs merge=lfs -text
4900
+ 2024/PromptReps_[[:space:]]Prompting[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]to[[:space:]]Generate[[:space:]]Dense[[:space:]]and[[:space:]]Sparse[[:space:]]Representations[[:space:]]for[[:space:]]Zero-Shot[[:space:]]Document[[:space:]]Retrieval/be3b6c54-bbd1-49e2-b632-d585234aafe2_origin.pdf filter=lfs diff=lfs merge=lfs -text
4901
+ 2024/Prompts[[:space:]]have[[:space:]]evil[[:space:]]twins/9d31bfeb-8e5e-4276-9f2c-e99da7442531_origin.pdf filter=lfs diff=lfs merge=lfs -text
4902
+ 2024/Pron[[:space:]]vs[[:space:]]Prompt_[[:space:]]Can[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]already[[:space:]]Challenge[[:space:]]a[[:space:]]World-Class[[:space:]]Fiction[[:space:]]Author[[:space:]]at[[:space:]]Creative[[:space:]]Text[[:space:]]Writing_/a0a4a9ec-4055-48de-9d72-01340a9f2ed7_origin.pdf filter=lfs diff=lfs merge=lfs -text
4903
+ 2024/Prove[[:space:]]Your[[:space:]]Point!_[[:space:]]Bringing[[:space:]]Proof-Enhancement[[:space:]]Principles[[:space:]]to[[:space:]]Argumentative[[:space:]]Essay[[:space:]]Generation/058fbd69-71c0-415b-9229-3bfb38b92327_origin.pdf filter=lfs diff=lfs merge=lfs -text
4904
+ 2024/Pruning[[:space:]]via[[:space:]]Merging_[[:space:]]Compressing[[:space:]]LLMs[[:space:]]via[[:space:]]Manifold[[:space:]]Alignment[[:space:]]Based[[:space:]]Layer[[:space:]]Merging/56c77afb-198f-4694-80fa-687cc781a4e1_origin.pdf filter=lfs diff=lfs merge=lfs -text
4905
+ 2024/PsFuture_[[:space:]]A[[:space:]]Pseudo-Future-based[[:space:]]Zero-Shot[[:space:]]Adaptive[[:space:]]Policy[[:space:]]for[[:space:]]Simultaneous[[:space:]]Machine[[:space:]]Translation/8fc20c0f-7bb5-4e23-9b88-111f09254dd8_origin.pdf filter=lfs diff=lfs merge=lfs -text
4906
+ 2024/PsyGUARD_[[:space:]]An[[:space:]]Automated[[:space:]]System[[:space:]]for[[:space:]]Suicide[[:space:]]Detection[[:space:]]and[[:space:]]Risk[[:space:]]Assessment[[:space:]]in[[:space:]]Psychological[[:space:]]Counseling/2c070529-8e84-4147-a70b-244349eed568_origin.pdf filter=lfs diff=lfs merge=lfs -text
4907
+ 2024/Puzzle[[:space:]]Solving[[:space:]]using[[:space:]]Reasoning[[:space:]]of[[:space:]]Large[[:space:]]Language[[:space:]]Models_[[:space:]]A[[:space:]]Survey/5b717434-6d25-4cf6-9225-d2e0999852c7_origin.pdf filter=lfs diff=lfs merge=lfs -text
4908
+ 2024/Python[[:space:]]is[[:space:]]Not[[:space:]]Always[[:space:]]the[[:space:]]Best[[:space:]]Choice_[[:space:]]Embracing[[:space:]]Multilingual[[:space:]]Program[[:space:]]of[[:space:]]Thoughts/08a5f494-598d-4fba-80c0-68b963842fea_origin.pdf filter=lfs diff=lfs merge=lfs -text
4909
+ 2024/QGEval_[[:space:]]Benchmarking[[:space:]]Multi-dimensional[[:space:]]Evaluation[[:space:]]for[[:space:]]Question[[:space:]]Generation/94ad4388-0e30-484e-95a4-6eb0875cf8ae_origin.pdf filter=lfs diff=lfs merge=lfs -text
4910
+ 2024/QUDSELECT_[[:space:]]Selective[[:space:]]Decoding[[:space:]]for[[:space:]]Questions[[:space:]]Under[[:space:]]Discussion[[:space:]]Parsing/0e4ce14e-e37f-4dc0-a0ed-fe9a009cad18_origin.pdf filter=lfs diff=lfs merge=lfs -text
4911
+ 2024/QUIK_[[:space:]]Towards[[:space:]]End-to-end[[:space:]]4-Bit[[:space:]]Inference[[:space:]]on[[:space:]]Generative[[:space:]]Large[[:space:]]Language[[:space:]]Models/a53d96d7-9f34-44d1-b3d4-796dfbeefaaf_origin.pdf filter=lfs diff=lfs merge=lfs -text
4912
+ 2024/QUITE_[[:space:]]Quantifying[[:space:]]Uncertainty[[:space:]]in[[:space:]]Natural[[:space:]]Language[[:space:]]Text[[:space:]]in[[:space:]]Bayesian[[:space:]]Reasoning[[:space:]]Scenarios/78a6dfd3-fa68-4a05-9dba-e455d39ca533_origin.pdf filter=lfs diff=lfs merge=lfs -text
4913
+ 2024/QuBE_[[:space:]]Question-based[[:space:]]Belief[[:space:]]Enhancement[[:space:]]for[[:space:]]Agentic[[:space:]]LLM[[:space:]]Reasoning/7503e89e-fcce-4f84-b824-b1157af91e63_origin.pdf filter=lfs diff=lfs merge=lfs -text
2024/Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programs/c1737880-532e-43a3-b284-f29709502d38_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programs/c1737880-532e-43a3-b284-f29709502d38_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programs/c1737880-532e-43a3-b284-f29709502d38_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:681ad4b55bebcc973859f888d59ea62148f8fbde015c6f650a9af096fc0e5d10
3
+ size 1541197
2024/Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programs/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2024/Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programs/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2751627d955b3bd93a8a223cac4951c6514e6164f9a8d58589067623341504b0
3
+ size 2391308
2024/Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programs/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Optimizing Language Models with Fair and Stable Reward Composition in Reinforcement Learning/08b13e0d-fa60-42c9-9d68-8586612dd060_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Optimizing Language Models with Fair and Stable Reward Composition in Reinforcement Learning/08b13e0d-fa60-42c9-9d68-8586612dd060_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Optimizing Language Models with Fair and Stable Reward Composition in Reinforcement Learning/08b13e0d-fa60-42c9-9d68-8586612dd060_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:437c9ce83910618eaa76d78b1fe6c89bc89926cfce8a52b23fa261340387b462
3
+ size 1165130
2024/Optimizing Language Models with Fair and Stable Reward Composition in Reinforcement Learning/full.md ADDED
@@ -0,0 +1,525 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Optimizing Language Models with Fair and Stable Reward Composition in Reinforcement Learning
2
+
3
+ Jiahui Li $^{12*}$ , Hanlin Zhang $^{2*}$ , Fengda Zhang $^{1*}$ , Tai-Wei Chang $^{2*}$ , Kun Kuang $^{1\dagger}$ , Long Chen $^{3}$ , Jun Zhou $^{2}$
4
+
5
+ $^{1}$ Zhejiang University, $^{2}$ Ant Group, $^{3}$ HKUST
6
+
7
+ jiahuil@zju.edu.cn,hanlinz144@gmail.com,fdzhang@zju.edu.cn, taiwei.twc@antgroup.com,kunkuang@zju.edu.cn,longchen@ust.hk jun.zhoujun@antgroup.com
8
+
9
+ # Abstract
10
+
11
+ Reinforcement learning from human feedback (RLHF) and AI-generated feedback (RLAIF) have become prominent techniques that significantly enhance the functionality of pre-trained language models (LMs). These methods harness feedback, sourced either from humans or AI, as direct rewards or to shape reward models that steer LM optimization. Nonetheless, the effective integration of rewards from diverse sources presents a significant challenge due to their disparate characteristics. To address this, recent research has developed algorithms incorporating strategies such as weighting, ranking, and constraining to handle this complexity. Despite these innovations, a bias toward disproportionately high rewards can still skew the reinforcement learning process and negatively impact LM performance. This paper explores a methodology for reward composition that enables simultaneous improvements in LMs across multiple dimensions. Inspired by fairness theory, we introduce a training algorithm that aims to reduce Disparity and enhance Stability among various rewards. Our method treats the aggregate reward as a dynamic weighted sum of individual rewards, with alternating updates to the weights and model parameters. For efficient and straightforward implementation, we employ an estimation technique rooted in the mirror descent method for weight updates, eliminating the need for gradient computations. The empirical results under various types of rewards across a wide range of scenarios demonstrate the effectiveness of our method.
12
+
13
+ # 1 Introduction
14
+
15
+ In recent years, pretrained Language Models (LMs) have made significant strides in the field of natural language processing, leading to their widespread use in downstream applications such as conversational agents (Brown et al., 2020; OpenAI, 2023;
16
+
17
+ ![](images/b36317b788ab9b93442be4aef469acf24287dd60b84b061ca4d3cf770cc0f2be.jpg)
18
+ Figure 1: An example of question answering with two types of rewards optimizing in different directions.
19
+
20
+ Touvron et al., 2023; Xue et al., 2023), code generation (Ahmad et al., 2021; Wang et al., 2021; Roziere et al., 2023), and machine translation (Wang et al., 2023; Moslem et al., 2023). Reinforcement learning from human feedback (RLHF) (Christiano et al., 2017; Ziegler et al., 2019; Ouyang et al., 2022; Rafailov et al., 2023) and reinforcement learning from AI feedback (RLAIF) (Bai et al., 2022; Moskovitz et al., 2023; Lee et al., 2023; Havrilla et al., 2024) plays a critical role in this evolution, enhancing the models' ability to generate outputs that better align with human preferences and greatly increasing their versatility.
21
+
22
+ The methods of RLHF and RLAIF typically incorporate three principal stages. Initially, there is supervised fine-tuning, which entails honing a foundational language model by utilizing a specialized dataset crafted for this purpose. Following this, the second stage is the development of reward functions, which are designed to serve as surrogate indicators of human or AI judgments and preferences. Subsequently, the language model serves as policy model and undergoes optimization via a reinforce-
23
+
24
+ ment learning algorithm (Schulman et al., 2017). It is evident that the reward model is crucial in ensuring the language model's outputs continually improves and adapts to evaluative standards, which in turn, directly impacts the efficacy of the reinforcement learning phase. In some scenarios, there may be multiple reward functions (Ramamurthy et al., 2022; Glaese et al., 2022; Yuan et al., 2023; Bakker et al., 2022; Moskovitz et al., 2023), as people may wish to assess and enhance the LM from various perspectives. However, two factors make this challenging. Firstly, different reward functions evaluate text quality from various angles, but their insights are not entirely independent. Secondly, it is difficult for LMs to determine the specific optimization direction for each reward function since they only receive an aggregated reward score.
25
+
26
+ Considering the scenario depicted in Figure 1, where two reward functions are employed, let us examine the example question, "How many times have the Lakers won the finals?" The language model may generate various responses, which the two reward functions assess based on factuality and completeness, providing guidance for optimizing the language model. The first response is given a factuality score of 1.0 and a completeness score of 0.3, indicating that it is entirely factual but lacks some detail. The second response receives a factuality score of 0.3 and a completeness score of 1.0, signaling that it is complete but contains inaccuracies. It becomes challenging to evaluate the overall success of the responses by merely aggregating the individual rewards because they each excel in different aspects. Therefore, the development of an effective algorithm that can integrate various reward functions is of utmost significance for both research and practical applications. Recent studies have investigated multiple methods for composing rewards, such as ranking (Yuan et al., 2023), applying weightings (Wu et al., 2023), using welfare functions (Bakker et al., 2022), and practicing safe reinforcement learning (Moskovitz et al., 2023). While these approaches may involve complex designs and the fine-tuning of hyperparameters, there is a still high risk that the policy may overfocus on one reward function and neglect others, thereby negatively impacting the LM.
27
+
28
+ To tackle the aforementioned challenges, we propose a method named Fast RL (Fair and Stable Reward Reinforcement Learning), which is designed for simple but effective integration of diverse re
29
+
30
+ wards. Inspired by fairness theory (Zhang et al., 2022; Ding et al., 2021), we have formulated a training objective that aims to minimize Disparity and maximize Stability across different reward functions simultaneously. Drawing on the principles of distributionally robust optimization (DRO) (Duchi and Namkoong, 2019; Wiesemann et al., 2014; Namkoong and Duchi, 2016; Zhang et al., 2022), we compute composite rewards as a weighted sum of individual rewards and transform the training objective into a max-min optimization problem. We iteratively optimize the language model and the weights, with the latter being updated via an estimation of the mirror descent method without the need for gradient computation. This strategy not only guides language models towards a more balanced, stable, and comprehensive improvement, but also offers simplicity in implementation.
31
+
32
+ Our contributions are summarized as follows:
33
+
34
+ - We present an algorithm that integrates various rewards during the reinforcement learning process, leading to a more comprehensive improvement of LMs.
35
+ - Our method is both simple and effective, allowing for easy adaptation to different types of reward functions or models without incurring significant computational overheads.
36
+ - We demonstrate the effectiveness of our approach through experimental results across various scenarios involving diverse rewards.
37
+
38
+ # 2 Preliminaries
39
+
40
+ # 2.1 Environments: Generation as MDP
41
+
42
+ Natural language generation can be conceptualized as a Markov Decision Process (MDP) (Puterman, 2014), represented as a tuple $\mathcal{M} \triangleq (\mathcal{S}, \mathcal{A}, \mathcal{R}, P, \gamma, T)$ . At the start of each episode, a prompt input $x = (x_0, x_1, \dots, x_m)$ is sampled from the data buffer, serving as the initial state $s_0$ with $s_0 \in \mathcal{S}$ , $x_m \in \mathcal{V}$ , where $\mathcal{S}$ denotes the state space and $\mathcal{V}$ denotes a finite vocabulary. At every timestep $t$ , the language model functions as a policy $\pi(a_t | s_t)$ , generating a token that signifies choosing an action $a_t \in \mathcal{A}$ based on its current state $s_t$ . A new state is subsequently reached via the transition function $P: \mathcal{S} \times \mathcal{A} \to \mathcal{S}$ . An episode concludes when the timestep exceeds the maximum horizon length $T$ or when an end-of-text (EOT) token is produced. The generated response is denoted by $y =$
43
+
44
+ $(a_0, a_1, \ldots, a_T)$ . Summatively, an episode is captured as a trajectory $\tau = (s_i, a_0, \ldots, s_T, a_T)$ , with the policy model's objective being to maximize the expected return $R(\tau) = \sum_{t=0}^{T} \gamma^t \mathcal{R}(s_t, a_t)$ , where $\mathcal{R} \in \mathcal{S} \times \mathcal{A} \to \mathbb{R}$ represents the reward function and $\gamma \in [0,1)$ symbolizes the discount factor.
45
+
46
+ # 2.2 Reward Functions for Optimizing the Language Models
47
+
48
+ Reward functions can be broadly divided into two main categories. The first category (Bakker et al., 2022; Yuan et al., 2023; Wu et al., 2023; Rafailov et al., 2023) consists of trained models that act as proxies for human preferences within specific contexts, typically using Bradley-Terry models (Bradley and Terry, 1952). The second category (Ramamurthy et al., 2022; Moskovitz et al., 2023) includes commonly used metrics in NLP, such as BLEU (Papineni et al., 2002), ROUGE (Lin, 2004), and METEOR (Banerjee and Lavie, 2005). These metrics do not require the reward model training procedure, thus allowing for automatic measurement and quick implementation. In addition to these categories, rewards can be classified as either coarse-grained or fine-grained. Coarse-grained rewards provide a single, sparse reward at the end of each episode, reflecting the overall success of the generation. Fine-grained rewards, in contrast, can be assigned for each token or subsentence, reflecting success across a range of timesteps. In situations where different types of rewards coexist, we define the composite reward function as follows:
49
+
50
+ $$
51
+ r _ {c o m} = f \left(r _ {1}, \dots , r _ {n}\right), \tag {1}
52
+ $$
53
+
54
+ where $r_i$ represents the output reward from various reward functions, $n$ is the number of reward functions involved, and $f(\cdot)$ is any composite function. For simplicity, the timestep subscript $t$ is omitted here and will continue to be excluded in the remainder of the text.
55
+
56
+ # 3 Method
57
+
58
+ In this section, we propose a method and its implementation that are designed to simultaneously improve the performance of LMs across various reward functions. The entire training framework is depicted in Figure 2. Initially, the input state is fed into the LM, and each reward function provides a score for evaluating the model outputs. These scores are then integrated using a weighted sum to
59
+
60
+ ![](images/a219cdba42b4c364d419c384197a135eb2b59f28dfe6f852f7ed5c37fd2423a9.jpg)
61
+ Figure 2: Training framework of Fast RL. The parameters of LM are updated using policy gradient, while the weights of different rewards are adjusted through mirror descent.
62
+
63
+ obtain a composite reward, which is subsequently used to optimize the LM. Concurrently, the weights are updated through an estimation based on mirror descent.
64
+
65
+ # 3.1 Optimization Objective
66
+
67
+ Drawing inspiration from fairness theory, our goal is to train a LM that achieves minimal Disparity and maximal Stability across various reward functions simultaneously. We define this objective as follows:
68
+
69
+ $$
70
+ \operatorname {O b j} _ {\pi_ {\theta}} := \inf _ {r _ {c o m}} \mathbb {E} _ {(s, a) \sim D _ {b}} [ r _ {c o m} (\pi_ {\theta}, (s, a)) ].
71
+ $$
72
+
73
+ $$
74
+ r _ {c o m} := \left\{\sum_ {i = 1} ^ {n} w _ {i} r _ {i} \right| \sum_ {i = 1} ^ {n} w _ {i} = 1, w _ {i} \geq 0 \}. \tag {2}
75
+ $$
76
+
77
+ where $n$ denotes the number of the reward functions, $D_{b}$ denotes the samples from the replay buffer, $r_{i} = \mathcal{R}(s,a)$ denotes the rewards output by $i$ -th reward function or model $\mathcal{R}$ , $w_{i}$ denotes the weights of $r_{i}$ , $r_{com}$ denotes the composite reward, and $\pi_{\theta}$ denotes the language model with parameter $\theta$ .
78
+
79
+ # 3.2 Simple yet Effective Implementation
80
+
81
+ Borrowing the idea from distributionally robust optimization (DRO) (Duchi and Namkoong, 2019; Wiesemann et al., 2014; Namkoong and Duchi, 2016; Zhang et al., 2022), the problem of maximizing the objective in Equation (2) can be rewritten as:
82
+
83
+ $$
84
+ \max _ {\theta} \min _ {\sum_ {i = 1} ^ {n} w _ {i} = 1, w _ {i} \geq 0} \sum_ {i = 0} ^ {n} w _ {i} r _ {i} \left(\pi_ {\theta}, (s, a)\right). \tag {3}
85
+ $$
86
+
87
+ To address this optimization problem, we can alternatively optimize the policy parameters $\pi$ and the weights $w_{i}$ . Rather than employing gradient descent, we utilize an estimation technique inherent to the mirror descent method for updating $w_{i}$ . Each $w_{i}$ is updated via:
88
+
89
+ $$
90
+ w _ {i} ^ {\text {c u r}} = \frac {w _ {i} ^ {\text {p r e}} \exp (- \lambda r _ {i})}{\sum_ {j = 1} ^ {n} w _ {j} ^ {\text {p r e}} \exp (- \lambda r _ {j})}, \tag {4}
91
+ $$
92
+
93
+ where pre denotes the previous update step, cur denotes the current update step, and $\lambda$ is a hyperparameter. Notably, we initial $w_{i}^{\mathrm{pre}} = \frac{1}{n}$ in the first iteration of our experiment.
94
+
95
+ In some scenarios, rewards may conflict. We address this by smoothing rewards and incorporating a bias factor, as shown in Equation (5):
96
+
97
+ $$
98
+ w _ {i} ^ {\text {c u r}} = \frac {w _ {i} ^ {\text {p r e}} \exp (- \lambda \operatorname {s m o o t h} \left(r _ {i}\right) + b _ {i})}{\sum_ {j = 1} ^ {n} w _ {j} ^ {\text {p r e}} \exp (- \lambda \operatorname {s m o o t h} \left(r _ {j}\right) + b _ {j})}, \tag {5}
99
+ $$
100
+
101
+ where $b_{i}$ is a bias factor from prior knowledge, and smooth is a smoothing function. This function reduces the influence of extreme rewards, preventing overreaction to single signals and balancing multiple objectives. Meanwhile, the bias factor allows prioritization of certain objectives, guided by prior knowledge, to resolve conflicts and maintain focus on critical goals.
102
+
103
+ The composite reward is computed as.
104
+
105
+ $$
106
+ r _ {c o m} = \sum_ {i = 1} ^ {n} w _ {i} ^ {\operatorname {c u r}} r _ {i}. \tag {6}
107
+ $$
108
+
109
+ However, there is a risk of over-optimization, a phenomenon where maximizing returns on the reward function beyond a certain threshold could actually reduce the performance of the policy model. In line with recent studies, we incorporate a composite reward with a KL penalty to moderate the policy model's propensity for over-optimization (Ramamurthy et al., 2022; Moskovitz et al., 2023; Wu et al., 2023):
110
+
111
+ $$
112
+ r _ {e x p} = r _ {c o m} - \beta \cdot \mathrm {K L} \left(\pi_ {\theta} (a | s) \| \pi_ {r e f} (a | s)\right), \tag {7}
113
+ $$
114
+
115
+ where $\pi_{\theta}$ represents the policy model, $\pi_{ref}$ indicates the reference model, and $\beta$ is the coefficient that controls the strength of the KL penalty. This adjusted reward $r_{exp}$ can be used to fine-tune the language model using any reinforcement learning algorithm, and in this paper, we select Proximal Policy Optimization (PPO) (Schulman et al., 2017). The details of our implementation are provided in Section4.
116
+
117
+ # 3.3 Analysis
118
+
119
+ In this subsection, we offer a theoretical analysis of our proposed method.
120
+
121
+ Theorem 1. Let $r_i \coloneqq \mathbb{E}_{(s,a) \sim D_b}[r_i(\pi_\theta, (s,a))]$ be an expectation of reward in dataset $D_b$ , $\mathbf{w} \in \Delta^{n-1}$ be the group weights, $n$ be the total number of the reward functions, $\bar{r}^u$ be the average of the rewards, $d_i \coloneqq (r_i - \bar{r})^2$ and $\text{Var}(r_i) \coloneqq \frac{1}{n} \sum_{i=1}^{n} d_i$ be the variance of rewards. If $\min_i \left\{ \frac{d_i}{\sum_{i=1}^{n} d_i} \right\} \geq \frac{1}{||n\mathbf{w} - \mathbf{1}||_2^2}$ , then there exists a constant $C > 0$ such that
122
+
123
+ $$
124
+ O b j _ {\pi_ {\theta}} = \bar {r} - C \sqrt {\operatorname {V a r} _ {i \in [ n ]} r _ {i}}. \tag {8}
125
+ $$
126
+
127
+ The theorem demonstrates that our objective, $Obj_{\pi_{\theta}}$ , can be interpreted as a combination of the average score across the reward functions and a regularization term that mitigates over-focus on any single reward function, particularly when the reward distribution is imbalanced. This design ensures that the language model maintains balanced performance across all reward functions, preventing excessive reliance on any one of them. For proof and more details, please refer to Appendix.
128
+
129
+ # 3.4 Training Algorithm
130
+
131
+ The comprehensive training protocol we adopted is encapsulated in Algorithm 1. This framework adheres to the standard Proximal Policy Optimization (PPO) algorithm (Schulman et al., 2017), augmented with additional steps dedicated to the calculation of the composite reward and the update of the weights.
132
+
133
+ # 4 Experiment
134
+
135
+ We evaluate the effectiveness of our method across various scenarios using different language models. Our experiments encompass dialogue generation, question answering, and tasks aimed at mitigating harmfulness and enhancing helpfulness. Our proposed method consistently outperforms the baselines across all experimental scenarios. Details regarding hyperparameters are provided in the Appendix.
136
+
137
+ # 4.1 Dialogue Generation
138
+
139
+ # 4.1.1 Experimental Settings
140
+
141
+ Dataset. We conducted an experiment utilizing the widely recognized DailyDialog dataset (Li et al., 2017), consisting of transcripts from human conversations.
142
+
143
+ Algorithm 1 Optimizing a Language Model with Multiple Reward Models
144
+
145
+ Initialize: reference language model $\pi_{ref}$ ; initial value model $V_{\varphi}$ ; $n$ reward models $\mathcal{R}_1, \ldots, \mathcal{R}_n$ ; initial weights $w_1^{\mathrm{pre}}$ , ..., $w_n^{\mathrm{pre}}$ ; task dataset $D$ ; hyperparameters
146
+
147
+ 1: Finetune the reference language model on dataset $D$ and get the initial policy model $\pi_{\theta}$
148
+ 2: Training the reward models $\mathcal{R}_1, \dots, \mathcal{R}_n$ on dataset $D$
149
+ 3: Training the composition reward model $f$ on dataset $D$
150
+ 4: for epoch $ep = 1,\dots,k$ do
151
+ 5: Sample a batch $D_{b}$ from $D$
152
+ 6: Sample output sequence $y^{i} \sim \pi_{\theta}(\cdot | x^{i})$ for each $x^{i} \in D_{b}$
153
+ 7: Compute rewards $r_1, \ldots, r_n$ via $\mathcal{R}_1, \ldots, \mathcal{R}_n$
154
+ 8: Compute composite rewards $r_{com}$ via Equation (4) and Equation (6)
155
+ 9: Compute penalized rewards $r_{exp}$ via Equation (7)
156
+ 10: Set $w_{i}^{\mathrm{pre}} = w_{i}^{\mathrm{cur}}$ for each $i$
157
+ 11: Compute advantages $\{A\}_{t = 1}^{|y^i|}$ and target values $\{V^{\prime}\}_{t = 1}^{|y^{i}|}$ for each $y^{i}$ with $V_{\varphi}$
158
+ 12: Update the policy model by:
159
+
160
+ $$
161
+ \theta \leftarrow \arg \max _ {\theta} \frac {1}{| D _ {b} |} \sum_ {i = 1} ^ {D _ {b}} \frac {1}{| y ^ {i} |} \sum_ {t = 1} ^ {y _ {i}} \min (\frac {\pi_ {\theta} (a _ {t} | s _ {t})}{\pi_ {r e f} (a _ {t} | s _ {t})} A _ {t}, \operatorname {c l i p} (\frac {\pi_ {\theta} (a _ {t} | s _ {t})}{\pi_ {r e f} (a _ {t} | s _ {t})}, 1 - \epsilon , 1 + \epsilon) A _ {t})
162
+ $$
163
+
164
+ 13: Update the value model by:
165
+
166
+ $$
167
+ \varphi \leftarrow \arg \min _ {\varphi} \frac {1}{| D _ {b} |} \sum_ {i = 1} ^ {D _ {b}} \frac {1}{| y ^ {i} |} \sum_ {t = 1} ^ {y _ {i}} (V _ {\varphi} (a _ {t} | s _ {t}) - V ^ {\prime} (a _ {t} | s _ {t})) ^ {2}
168
+ $$
169
+
170
+ 14: end for
171
+
172
+ Output: $\pi_{\theta}$
173
+
174
+ Reward Functions. Following Moskovitz et al. (2023), we selected METEOR (Banerjee and Lavie, 2005), Intent Score (Ramamurthy et al., 2022), BLEU (Papineni et al., 2002), and BERTScore (Zhang et al., 2019) as reward functions. These models capture the desired behavior of text from different perspectives and can be implemented quickly. Among these, Intent Score and BERTScore are estimated using a pretrained human preference model, RoBERTa (Liu et al., 2019), and BERT (Devlin et al., 2018), respectively, while the other two utilize n-gram metrics. The reward scores are provided at the end of each response to reflect its overall quality.
175
+
176
+ Baselines. In our study, we utilized GPT-2 (Radford et al., 2019) as the starting point for our policy model. For our baseline algorithm, we chose Proximal Policy Optimization (PPO) (Schulman et al., 2017), within which rewards are calculated through a linear combination of individual metrics, each metric assigned a fixed weight that is predetermined. Furthermore, we incorporated Constrained Reinforcement Learning (Constrained RL) (Moskovitz et al., 2023) to serve as an additional baseline for comparison. Constrained RL uses the Nelder-Mead method (Nelder and Mead, 1965) to iteratively update a simplex of thresholds based on reward evaluation performance, with parameters $\alpha = 1\gamma = 1,\rho = 0.5,\sigma = 1$
177
+
178
+ Evaluation Metrics. We assessed various methods based on two criteria. (1) In an approach similar to that of Moskovitz et al. (2023), we computed an evaluation score using six distinct metrics. These metrics, as identified by Moskovitz et al. (2023), operate independently of the reward functions. Specifically, we select SacreBLEU $(m_{a})$ (Post, 2018), ROUGE-2 $(m_{b})$ (Lin, 2004; Ganesan, 2018), and ROUGE-L $(m_{c})$ as metrics related to lexicon, and Conditional Entropy-3 $(m_{u})$ , vocab-size-3-nopunct $(m_{v})$ , and mean-prediction-length-nopunct $(m_{w})$ as metrics related to diversity. We normalized the score of each metric to fall within a range of 0 to 1, using the minimum and maximum values observed in Constrained RL experiments across three distinct reward function settings. The evaluation score $(m_{eval})$ is subsequently computed as outlined in Equation (9)
179
+
180
+ $$
181
+ m _ {e v a l} = \frac {m _ {a} + m _ {b} + m _ {c} + m _ {u} + m _ {v} + m _ {w}}{6}. \tag {9}
182
+ $$
183
+
184
+ (2) We adopt GPT-4 (Achiam et al., 2023) as an proxy for human judgment to further assess the methods.
185
+
186
+ # 4.1.2 Experimental Results
187
+
188
+ Stability Across Varying Numbers of Reward. We conducted experiments utilizing configurations with 2, 3, and 4 reward functions. Figure 3(a-c)
189
+
190
+ ![](images/373e1bfe0e50947983011936947132b17e37356ab60bce405d749c72b766b929.jpg)
191
+
192
+ ![](images/acc93bb6af7a20e4951640098484842de40319682b85831de989fbd04720f045.jpg)
193
+
194
+ ![](images/2e88c6d760b02f6d22af1c73bac71f1b37b11e91a6e25322fffeb0888dffa4a3.jpg)
195
+
196
+ ![](images/07c1550afc37fbe07c37c681101c985276fd815c398e4bca23e3add8f332d9c0.jpg)
197
+ (d) 3 reward functions
198
+
199
+ ![](images/b338e809811f2d9185119e7ecb54a7646c5582f9f7c1f8b170e74d8d9469efaa.jpg)
200
+ (e) 3 reward functions
201
+
202
+ ![](images/cb2b1c614968f257c02042253ab2589a051ce86608d283eae35a0aa90c8e3810.jpg)
203
+ (f) 3 reward functions
204
+ Figure 3: The evaluation score of different methods across three scenarios with varying number of rewards.
205
+
206
+ illustrates the improvement in model performance over the training epochs, where the results represent the mean of three random seeds, and the shaded area indicates the standard deviation. In the initial epochs of training, all methods remained stable when only two reward functions, METEOR and Intent Score, were used. However, the incorporation of a third reward function, BLEU, resulted in a significant deterioration in the performance of Constrained RL, making the training unstable. In contrast, both the baseline PPO and our method demonstrated stability. Upon introducing another reward function, BERTScore, only our method maintained stability. Moreover, our method outperformed the baselines in evaluation score across all scenarios, thereby demonstrating the effectiveness of the composite reward. The strong baseline, Constrained RL, delivered unsatisfactory performance, except in the two-reward configuration. This can be primarily attributed to its explicit requirement for rewards from each aspect to surpass certain thresholds, without considering potential conflicts among them. Therefore, the type and number of reward functions employed significantly influences performance, highlighting the importance of carefully selecting and harmonizing reward functions to achieve balanced and optimal training outcomes.
207
+
208
+ Overoptimization and Reward Conflict Phenomena. Nonetheless, two phenomena require attention. Firstly, the performance of the language model tends to decline after approximately 75 epochs, which may be due to the fact that KL regularization, despite mitigating optimization, cannot completely eliminate it. Consequently, there is a tendency for the policy to overfit on the reward functions. Secondly, the peak performance obtained with three reward functions is lower than that achieved with two, a result that may stem from the potential conflict between differing objectives, impairing further improvement.
209
+
210
+ Improving the LM Comprehensively. Figure 3(d-f) illustrates the variation in evaluation scores across different metrics in the 3-reward-model setting. It is evident that our method exhibits a much tighter distribution of each reward score and experiences less fluctuation over the course of training, ultimately achieving the highest evaluation score. This further demonstrates both the effectiveness and the stability of our method.
211
+
212
+ GPT4 Evaluation. To objectively validate the efficacy of different methods, we conducted an evaluation using GPT-4 (OpenAI, 2023) as a proxy for human judgment. We randomly sampled 50 dialogue contexts from the dataset, along with their gener
213
+
214
+ Table 1: GPT-4 evaluation results on DailyDialog.
215
+
216
+ <table><tr><td>Method</td><td>Selection Rate</td></tr><tr><td>PPO</td><td>10%</td></tr><tr><td>ConstrainedRL+PPO</td><td>22%</td></tr><tr><td>Fast RL+PPO(Ours)</td><td>66%</td></tr><tr><td>No preference</td><td>2%</td></tr></table>
217
+
218
+ ated responses, for this evaluation. The task for GPT-4 was to select the most appropriate response given the context. Moreover, we allowed GPT-4 the option to choose "no preference" in cases where it encountered difficulty in discerning a clear favorite, or if none of the responses seemed fitting. As illustrated in Table 1, our method achieves the highest selection rate, confirming that it significantly outperforms competing approaches in terms of performance. We have provided the GPT-4 prompts and examples of the showcases in the Appendix.
219
+
220
+ # 4.2 Question Answering
221
+
222
+ # 4.2.1 Experimental Settings
223
+
224
+ Dataset. We conduct experiment on QAFeedback dataset provided by Wu et al. (2023), consisting of 3,853 training examples, 500 development examples, and 948 test examples.
225
+
226
+ Reward Models. In this scenario, three reward models are trained, each focusing on a specific category: relevance, correctness, and completeness. Notably, only the completeness reward model is the Bradley-Terry (Bradley and Terry, 1952) model. These models evaluate the response and assign reward scores to each sub-sentence, ensuring a thorough assessment across the crucial aspects of the text.
227
+
228
+ Baseline. Following Wu et al. (2023), we selected T5-large (Raffel et al., 2020) as the base model and fine-tuned it with 1,000 training examples to develop the SFT model. We consider this model as the baseline and also use it as the initial policy model for RL. We also compared our method to Fine-grained RL (F.G. RL) (Wu et al., 2023), which combines different rewards using fixed expert-defined weights. Following the original paper, we set the weights for relevance, factuality, and completeness rewards at 0.3, 0.5, and 0.3, respectively.
229
+
230
+ # 4.2.2 Experimental Results
231
+
232
+ Reward Model Evaluation. We employ the trained reward models to evaluate the responses
233
+
234
+ generated by various methods. The results for the test dataset are presented in Table 2, where $R_{1}$ , $R_{2}$ , and $R_{3}$ denote the relevance reward, factuality reward, and completeness reward, respectively. Compared to baseline methods, our approach achieves the maximum reward in nearly all aspects, with the exception of factuality. This discrepancy can be attributed to the inherent conflicts among these reward models, making simultaneous optimization challenging (please refer to the Appendix for more details).
235
+
236
+ Table 2: Results on QAFeedback test set.
237
+
238
+ <table><tr><td>Method</td><td>Rouge</td><td>R1</td><td>R2</td><td>R3</td></tr><tr><td>SFT</td><td>49.16</td><td>0.469</td><td>0.793</td><td>0.225</td></tr><tr><td>F.G. RL</td><td>50.16</td><td>0.518</td><td>0.823</td><td>0.226</td></tr><tr><td>Fast RL</td><td>50.28</td><td>0.518</td><td>0.822</td><td>0.243</td></tr></table>
239
+
240
+ GPT-4 Evaluation. Similar to previous works (Rafailov et al., 2023; Dai et al., 2023), we randomly selected 50 test examples and asked GPT-4 to comprehensively evaluate the quality of the response, considering all three aspects simultaneously. We present the win rate in comparison to the SFT model, with the results shown in Table 3. Our method improved the win rate by approximately $8\%$ and significantly reduced the lose rate, from $22\%$ to $8\%$ .
241
+
242
+ Table 3: GPT-4 Evaluation on QAFeedback test set.
243
+
244
+ <table><tr><td>vs. SFT</td><td>Win</td><td>Tie</td><td>Lose</td></tr><tr><td>F.G RL</td><td>22%</td><td>56%</td><td>22%</td></tr><tr><td>Fast RL</td><td>30%</td><td>62%</td><td>8%</td></tr></table>
245
+
246
+ ![](images/3a99941a8092c311eef7ae09ba448f79d0af47568dfb378cb72ad0601b8a4772.jpg)
247
+ (a) F.G. RL
248
+
249
+ ![](images/0885c1b70dc2888088088ab6d123d9c1a20fc7148c13e0ca9a7c093a006b4d67.jpg)
250
+ (b) Fast RL
251
+ Figure 4: Correlations among different reward models in QAFeedback.
252
+
253
+ Visualizing the Rewards. To more effectively analyze the correlations among the various rewards in the question answering task, we plotted the reward values at each timestep and fitted a polynomial surface to the data, as shown in Figure 4. It is evident
254
+
255
+ that the reward for relevance conflicts with the other two types of rewards, complicating the optimization of the policy. Our proposed method exhibits a more compact and concentrated distribution compared to the baseline, demonstrating that we focus on different rewards simultaneously, which leads to a more stable and comprehensive improvement of the LM.
256
+
257
+ # 4.3 Harmfulness Mitigation&Helpfulness Enhancement
258
+
259
+ # 4.3.1 Experimental Settings
260
+
261
+ Dataset. We conduct experiment on Alpaca (Taori et al., 2023) and SafeRLHF (Dai et al., 2023) datasets. The former is used to supervised finetuning the language model while the latter is used to train the reward model and perform reinforcement learning.
262
+
263
+ Reward Models. Following Dai et al. (2023), we train two Bradley-Terry models (Bradley and Terry, 1952) to predict the rewards and costs of a generated sentence.
264
+
265
+ Baseline. We select the LLaMA-7B (Touvron et al., 2023) model as the base model. Meanwhile, we adopt reward shaping(R.S) (Ng et al., 1999) as the baseline. For the reward shaping approach, the composite reward, excluding the KL penalty, is calculated as $r_{com} = \frac{1}{2}\times (\mathcal{R}_{\phi}(x,y) + \alpha \times \mathcal{C}_{\varphi}(x,y))$ where $\mathcal{R}$ denotes the reward model, $\mathcal{C}$ denotes the cost model, and $\alpha$ is the scaling factor which is set to $-1$ in our experiments.
266
+
267
+ Evaluation Metrics. Our experimental evaluation is conducted using two distinct methods: (1) Reward Evaluation. This involves two sub-criteria: (a) We compare the average reward and cost scores within the test set. (b) We assess the win rate for helpfulness (measured by a higher reward score compared to the SFT model) and the rate of safe responses (costs being lower than 0) to gauge the practical utility and safety of the responses. (2) GPT-4 Evaluation (Achiam et al., 2023). We assess the win rates of various methods against the SFT model by employing GPT-4 as a stand-in for human evaluators.
268
+
269
+ # 4.3.2 Experimental Results
270
+
271
+ Reward Model Evaluation. The results are presented in Table 4. When compared to the R.S with fixed weights, Fast RL achieves higher rewards and incurs lower costs, which highlight the efficacy of our method.
272
+
273
+ Table 4: Reward evaluation of the SafeRLHF test set.
274
+
275
+ <table><tr><td>Metric</td><td>Reward</td><td>Cost</td><td>Helpful Win Rate</td><td>Safe Rate</td></tr><tr><td>R.S</td><td>1.818</td><td>0.916</td><td>68.75%</td><td>44.26%</td></tr><tr><td>Fast RL</td><td>1.906</td><td>0.894</td><td>71.27%</td><td>44.89%</td></tr></table>
276
+
277
+ Table 5: GPT-4 evaluation of the SafeRLHF test set.
278
+
279
+ <table><tr><td>vs. SFT</td><td>Win</td><td>Tie</td><td>Lose</td></tr><tr><td>R.S</td><td>17.0%</td><td>63.5%</td><td>19.5%</td></tr><tr><td>Fast RL</td><td>20.5%</td><td>61.0%</td><td>18.5%</td></tr></table>
280
+
281
+ GPT-4 Evaluation. We prompt GPT-4 with assessing the harmlessness, helpfulness, and level of detail in the generated responses, with an emphasis on harmlessness as the top priority. The comparative win rates against the SFT model are presented in Table 5. The baseline method, R.S, achieves a lower win rate when compared to the SFT model. This can be attributed to the fact that the fixed weights in R.S cause it to excessively concentrate on maximizing rewards while disregarding the costs, which can result in more harmful responses from the language model. In contrast, our method considers both rewards and costs simultaneously, leading to responses that are not only better but also safer.
282
+
283
+ # 5 Related Work
284
+
285
+ Reinforcement Learning for Optimizing the Language Model. RLHF (Christiano et al., 2017; Ziegler et al., 2019; Ouyang et al., 2022; Rafailov et al., 2023) has emerged as a crucial methodology for fine-tuning language models to better reflect human intentions, as documented in various studies. Its efficacy is demonstrated in downstream tasks such as summarization (Stiannon et al., 2020), story-telling (Ziegler et al., 2019), following instructions, and reducing harm (Bai et al., 2022; Lu et al., 2022; Ganguli et al.). However, RLHF involves gathering pairwise human-labeled data and an additional training procedure for the reward model, which can be resource-intensive. To optimize LMs in a faster and more lightweight manner, recent studies have shifted toward applying Reward Learning from AI Feedback (RLAIF) (Bai et al., 2022; Moskovitz et al., 2023; Lee et al., 2023; Havrilla et al., 2024). This approach leverages AI-generated feedback or provides direct reward signals, thus bypassing the need for extensive human-labeled datasets. Furthermore, research by Li et al. (2023) has found that reward-model-based
286
+
287
+ approaches continue to hold their benefits, particularly when dealing with samples that are not well represented within the initial training preferences. These insights underscore the sustained importance of reinforcement learning in the enhancement of language models.
288
+
289
+ Integrating Diverse Rewards. To enhance the language model's alignment with diverse preferences, various forms of feedback are typically utilized to reflect the policy's behavior across multiple dimensions (Bakker et al., 2022; Glaese et al., 2022; Yuan et al., 2023; Wu et al., 2023; Moskovitz et al., 2023). Integrating disparate rewards, however, presents a significant challenge, as the policy may struggle to discern the intentions behind the rewards' design, receiving feedback in the form of a single scalar value. Traditional studies (Wu et al., 2023; Ramamurthy et al., 2022) have attempted to address this by aggregating the different rewards and assigning predefined weights based on prior knowledge. In contrast, a separate line of research (Yuan et al., 2023; Glaese et al., 2022) recommends policy optimization through the ranking of multiple sampled responses. More specifically, Yuan et al. (2023) developed a ranking loss that increases the likelihood of selecting higher-quality responses, and Glaese et al. (2022) introduced a reranking score to act as the overall reward, rewarding the higher-quality responses among a set of samples. Further, Bakker et al. (2022) suggested a welfare function that measures and orders consensus statements by their desirability to combined reward models. Moreover, Moskovitz et al. (2023) implemented constrained reinforcement learning to prevent the agent from over-optimizing individual reward models beyond certain thresholds. Despite these innovative approaches, the risk remains that policy models may give undue emphasis to certain individual rewards. Therefore, we are exploring a method that leverages fairness theory to yield an anticipated reward that holistically enhances the language model. This approach aims to balance the multiple objectives and reflect a fair distribution of attention across the varying rewards, ensuring a more equitable and effective improvement of the language model.
290
+
291
+ # 6 Conclusion
292
+
293
+ In this study, we focus on the scenarios that involve complex, multi-faceted reward models for optimizing LMs. Given the diverse perspectives
294
+
295
+ from which various reward models assess text, our aim is to develop a method that can appropriately compose different rewards, so as to ensure that LMs do not excessively prioritize one perspective over others. Leveraging fairness theory, we propose a method wherein the training objective is to reduce disparity and increase robustness among rewards. Drawing on the principles of DRO, we calculate composite rewards as a weighted sum of individual rewards, and transforms the training objective into a max-min optimization problem. The updating mechanism for the weights assigned to different rewards utilizes an estimation approach based on the mirror descent method, which is not only straightforward but also highly effective, simplifying the implementation process. The empirical results across various scenarios demonstrate the efficacy of our approach.
296
+
297
+ Limitations and Future Work. While our study yields promising results, it is not without its limitations. Firstly, the absence of human evaluations is noteworthy; we have relied on GPT-4 as a stand-in, but this may not reflect human judgment with complete accuracy. Furthermore, the potential for conflict and inaccuracy arises from using outputs of various reward models, as our current approach does not have a mechanism to distinguish between the efficacy of these models. Instead, we calculate a composite reward in an effort to concurrently boost performance across all reward signals, which unfortunately may lead to less-than-ideal outcomes. In our future research, we plan to enhance our methodology by developing and implementing theoretical frameworks designed to detect and eliminate superfluous rewards.
298
+
299
+ # Acknowledgements
300
+
301
+ This work was supported by the National Natural Science Foundation of China (62441605, 62376243), National Key Research and Development Program of China (2022YFC3340900), the Starry Night Science Fund at Shanghai Institute for Advanced Study (Zhejiang University), the Fundamental Research Funds for the Central Universities (226-2024-00170), and Ant Group Postdoctoral Programme. Long Chen is supported by HKUST Special Support for Young Faculty (F0927) and HKUST Sports Science and Technology Research Grant (SSTRG24EG04). All opinions in this paper are those of the authors and do not necessarily reflect the views of the funding agencies.
302
+
303
+ # References
304
+
305
+ Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al. 2023. Gpt-4 technical report. arXiv preprint arXiv:2303.08774.
306
+ Wasi Uddin Ahmad, Saikat Chakraborty, Baishakhi Ray, and Kai-Wei Chang. 2021. Unified pre-training for program understanding and generation. arXiv preprint arXiv:2103.06333.
307
+ 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.
308
+ Michiel Bakker, Martin Chadwick, Hannah Sheahan, Michael Tessler, Lucy Campbell-Gillingham, Jan Balaguer, Nat McAleese, Amelia Glaese, John Aslanides, Matt Botvinick, et al. 2022. Fine-tuning language models to find agreement among humans with diverse preferences. Advances in Neural Information Processing Systems, 35:38176-38189.
309
+ Satanjeev Banerjee and Alon Lavie. 2005. Meteor: An automatic metric for mt evaluation with improved correlation with human judgments. In Proceedings of the acl workshop on intrinsic and extrinsic evaluation measures for machine translation and/or summarization, pages 65-72.
310
+ Ralph Allan Bradley and Milton E Terry. 1952. Rank analysis of incomplete block designs: I. the method of paired comparisons. Biometrika, 39(3/4):324-345.
311
+ 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. Advances in neural information processing systems, 33:1877-1901.
312
+ Paul F Christiano, Jan Leike, Tom Brown, Miljan Martic, Shane Legg, and Dario Amodei. 2017. Deep reinforcement learning from human preferences. Advances in neural information processing systems, 30.
313
+ Josef Dai, Xuehai Pan, Ruiyang Sun, Jiaming Ji, Xinbo Xu, Mickel Liu, Yizhou Wang, and Yaodong Yang. 2023. Safe rlhf: Safe reinforcement learning from human feedback. In The Twelfth International Conference on Learning Representations.
314
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805.
315
+ Frances Ding, Moritz Hardt, John Miller, and Ludwig Schmidt. 2021. Retiring adult: New datasets for fair machine learning. Advances in neural information processing systems, 34:6478-6490.
316
+
317
+ John Duchi and Hongseok Namkoong. 2019. Variance-based regularization with convex objectives. Journal of Machine Learning Research, 20(68):1-55.
318
+ Kavita Ganesan. 2018. Rouge 2.0: Updated and improved measures for evaluation of summarization tasks. arXiv preprint arXiv:1803.01937.
319
+ D Ganguli, A Askell, N Schiefer, T Liao, K Lukošiūte, A Chen, et al. The capacity for moral self-correction in large language models. arxiv 2023. arXiv preprint arXiv:2302.07459.
320
+ Amelia Glaese, Nat McAleese, Maja Trebacz, John Aslanides, Vlad Firoiu, Timo Ewalds, Maribeth Rauh, Laura Weidinger, Martin Chadwick, Phoebe Thacker, et al. 2022. Improving alignment of dialogue agents via targeted human judgements. arXiv preprint arXiv:2209.14375.
321
+ Alex Havrilla, Yuqing Du, Sharath Chandra Raparthy, Christoforos Nalmpantis, Jane Dwivedi-Yu, Maksym Zhuravinskyi, Eric Hambro, Sainbayar Sukhbaatar, and Roberta Raileanu. 2024. Teaching large language models to reason with reinforcement learning. arXiv preprint arXiv:2403.04642.
322
+ Harrison Lee, Samrat Phatale, Hassan Mansoor, Kellie Lu, Thomas Mesnard, Colton Bishop, Victor Carbune, and Abhinav Rastogi. 2023. Rlaif: Scaling reinforcement learning from human feedback with ai feedback. arXiv preprint arXiv:2309.00267.
323
+ Yanran Li, Hui Su, Xiaoyu Shen, Wenjie Li, Ziqiang Cao, and Shuzi Niu. 2017. Dailydialog: A manually labelled multi-turn dialogue dataset. arXiv preprint arXiv:1710.03957.
324
+ Ziniu Li, Tian Xu, Yushun Zhang, Yang Yu, Ruoyu Sun, and Zhi-Quan Luo. 2023. Remax: A simple, effective, and efficient method for aligning large language models. arXiv preprint arXiv:2310.10505.
325
+ Chin-Yew Lin. 2004. Rouge: A package for automatic evaluation of summaries. In Text summarization branches out, pages 74-81.
326
+ 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.
327
+ Ximing Lu, Sean Welleck, Jack Hessel, Liwei Jiang, Lianhui Qin, Peter West, Prithviraj Ammanabrolu, and Yejin Choi. 2022. Quark: Controllable text generation with reinforced unlearning. Advances in neural information processing systems, 35:27591-27609.
328
+ Ted Moskovitz, Aaditya K Singh, DJ Strouse, Tuomas Sandholm, Ruslan Salakhutdinov, Anca D Dragan, and Stephen McAleer. 2023. Confronting reward model overoptimization with constrained rlhf. arXiv preprint arXiv:2310.04373.
329
+
330
+ Yasmin Moslem, Rejwanul Haque, and Andy Way. 2023. Adaptive machine translation with large language models. arXiv preprint arXiv:2301.13294.
331
+ Hongseok Namkoong and John C Duchi. 2016. Stochastic gradient methods for distributionally robust optimization with f-divergences. Advances in neural information processing systems, 29.
332
+ John A Nelder and Roger Mead. 1965. A simplex method for function minimization. The computer journal, 7(4):308-313.
333
+ Andrew Y Ng, Daishi Harada, and Stuart Russell. 1999. Policy invariance under reward transformations: Theory and application to reward shaping. In Icml, volume 99, pages 278-287.
334
+ R OpenAI. 2023. Gpt-4 technical report. arxiv 2303.08774. View in Article, 2:13.
335
+ Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. 2022. Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems, 35:27730-27744.
336
+ Kishore Papineni, Salim Roukos, Todd Ward, and Wei Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting of the Association for Computational Linguistics, pages 311-318.
337
+ Matt Post. 2018. A call for clarity in reporting bleu scores. arXiv preprint arXiv:1804.08771.
338
+ Martin L Puterman. 2014. Markov decision processes: discrete stochastic dynamic programming. John Wiley & Sons.
339
+ 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.
340
+ Rafael Rafailov, Archit Sharma, Eric Mitchell, Stefano Ermon, Christopher D Manning, and Chelsea Finn. 2023. Direct preference optimization: Your language model is secretly a reward model. arXiv preprint arXiv:2305.18290.
341
+ 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(1):5485-5551.
342
+ Rajkumar Ramamurthy, Prithviraj Ammanabrolu, Kianté Brantley, Jack Hessel, Rafet Sifa, Christian Bauckhage, Hannaneh Hajishirzi, and Yejin Choi. 2022. Is reinforcement learning (not) for natural language processing?: Benchmarks, baselines, and building blocks for natural language policy optimization. arXiv preprint arXiv:2210.01241.
343
+
344
+ Baptiste Roziere, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Xiaqing Ellen Tan, Yossi Adi, Jingyu Liu, Tal Remez, Jérémy Rapin, et al. 2023. Code llama: Open foundation models for code. arXiv preprint arXiv:2308.12950.
345
+ John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. 2017. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347.
346
+ Nisan Stiennon, Long Ouyang, Jeffrey Wu, Daniel Ziegler, Ryan Lowe, Chelsea Voss, Alec Radford, Dario Amodei, and Paul F Christiano. 2020. Learning to summarize with human feedback. Advances in Neural Information Processing Systems, 33:3008-3021.
347
+ 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.
348
+ 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.
349
+ Longyue Wang, Chenyang Lyu, Tianbo Ji, Zhirui Zhang, Dian Yu, Shuming Shi, and Zhaopeng Tu. 2023. Document-level machine translation with large language models. arXiv preprint arXiv:2304.02210.
350
+ Yue Wang, Weishi Wang, Shafiq Joty, and Steven CH Hoi. 2021. Codet5: Identifier-aware unified pretrained encoder-decoder models for code understanding and generation. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 8696-8708.
351
+ Wolfram Wiesemann, Daniel Kuhn, and Melvyn Sim. 2014. Distributionally robust convex optimization. Operations research, 62(6):1358-1376.
352
+ Zeqiu Wu, Yushi Hu, Weijia Shi, Nouha Dziri, Alane Suhr, Prithviraj Ammanabrolu, Noah A Smith, Mari Ostendorf, and Hannaneh Hajishirzi. 2023. Fine-grained human feedback gives better rewards for language model training. arXiv preprint arXiv:2306.01693.
353
+ Siqiao Xue, Caigao Jiang, Wenhui Shi, Fangyin Cheng, Keting Chen, Hongjun Yang, Zhiping Zhang, Jianshan He, Hongyang Zhang, Ganglin Wei, Wang Zhao, Fan Zhou, Danrui Qi, Hong Yi, Shaodong Liu, and Faqiang Chen. 2023. Db-gpt: Empowering database interactions with private large language models. arXiv preprint arXiv:2312.17449.
354
+ Zheng Yuan, Hongyi Yuan, Chuanqi Tan, Wei Wang, Songfang Huang, and Fei Huang. 2023. Rrhf: Rank responses to align language models with human feedback without tears. arXiv preprint arXiv:2304.05302.
355
+
356
+ Fengda Zhang, Kun Kuang, Yuxuan Liu, Long Chen, Jiaxun Lu, Fei Wu, Chao Wu, Jun Xiao, et al. 2022. Towards multi-level fairness and robustness on federated learning. In ICML 2022: Workshop on Spurious Correlations, Invariance and Stability.
357
+ Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q Weinberger, and Yoav Artzi. 2019. Bertscore: Evaluating text generation with bert. arXiv preprint arXiv:1904.09675.
358
+ Daniel M Ziegler, Nisan Stiennon, Jeffrey Wu, Tom B Brown, Alec Radford, Dario Amodei, Paul Christiano, and Geoffrey Irving. 2019. Fine-tuning language models from human preferences. arXiv preprint arXiv:1909.08593.
359
+
360
+ # A Experimental Details
361
+
362
+ # A.1 Experimental Settings
363
+
364
+ Dialogue Generation. We adopted a similar experimental setup to that described by Ramamurthy et al. (2022); Moskovitz et al. (2023) for our dialogue generation, utilizing a context window spanning five utterances. Following Moskovitz et al. (2023), inputs to the model were presented as concatenated segments of human dialogue, with speaker transitions denoted by a distinct end-of-utterance (<EOU>) token. Additionally, the intent classification reward mechanism was established based on a fine-tuned RoBERTa (Liu et al., 2019) model. This system assigned a score of 1 when the model's inferred intent for a generated utterance matched that of the corresponding reference or ground-truth utterance, otherwise attributing a score of 0. Consistent with (Moskovitz et al., 2023), we adopted the GPT-2 (Radford et al., 2019) architecture for both the policy and value models. We selected four distinct rewards for our experiments, the specifics of which are detailed in Table 6.
365
+
366
+ Table 6: Chosen rewards in dialogue generation task.
367
+
368
+ <table><tr><td>Setting</td><td>Chosen Reward Function</td></tr><tr><td>2 rewards</td><td>METEOR; INTENT</td></tr><tr><td>3 rewards</td><td>METEOR; INTENT; BLEU</td></tr><tr><td>4 rewards</td><td>METEOR; INTENT; BLEU; BERT</td></tr></table>
369
+
370
+ Question Answering. In our question-answering scenario, diverging from our previous task, we opted for T5-large (Raffel et al., 2020) as the policy model and T5-base as the value model. We adopted the same reward models as those detailed by Wu et al. (2023), focusing on factuality, coherence, and completeness, with only the completeness reward model being a Bradley-Terry (Bradley and Terry, 1952) model. For more details, readers are directed to the original publication by Wu et al. (2023).
371
+
372
+ Harmfulness Mitigation&Helpfulness Enhancement. In the scenario of harm mitigation and helpfulness enhancement, we have adopted LLaMA7B (Touvron et al., 2023) as both the policy model and the reward model. Following Dai et al. (2023), we utilize the Alpaca dataset for SFT and employ the SafeRLHF dataset for training both the reward and cost models.
373
+
374
+ Hyperparameters. We implement our algorithm
375
+
376
+ Table 7: RL Hyperparameters for DailyDialog and QAFeedback.
377
+
378
+ <table><tr><td>Settings</td><td>DailyDialog</td><td>QAFeedback</td></tr><tr><td>Total epochs</td><td>80</td><td>10</td></tr><tr><td>Batch size</td><td>64</td><td>12</td></tr><tr><td>Learning rate</td><td>1e-6</td><td>1e-5</td></tr><tr><td>Clip ratio ε</td><td>0.2</td><td>0.2</td></tr><tr><td>Rollouts top-k</td><td>20</td><td>20</td></tr><tr><td>Temperature</td><td>0.7</td><td>0.7</td></tr><tr><td>Discount factor γ</td><td>0.99</td><td>0.99</td></tr><tr><td>GAE λ</td><td>0.95</td><td>0.95</td></tr><tr><td>KL coefficient β</td><td>0.2</td><td>0.3</td></tr><tr><td>Policy model</td><td>GPT2</td><td>T5-large</td></tr><tr><td>Value model</td><td>GPT2</td><td>T5-base</td></tr></table>
379
+
380
+ Table 8: SFT and RM hyperparameters for harmfulness mitigation&helpfulness enhancement task.
381
+
382
+ <table><tr><td>Settings</td><td>SFT</td><td>RM</td></tr><tr><td>Dataset</td><td>Alpaca</td><td>SafeRLHF</td></tr><tr><td>Total epochs</td><td>3</td><td>2</td></tr><tr><td>Batch size per GPU</td><td>4</td><td>16</td></tr><tr><td>Learning rate</td><td>2e-5</td><td>2e-5</td></tr><tr><td>Lr warm up ratio</td><td>0.03</td><td>0.03</td></tr><tr><td>Lr scheduler type</td><td>Cosine</td><td>Cosine</td></tr><tr><td>Max length</td><td>512</td><td>512</td></tr><tr><td>Gradient acc steps</td><td>8</td><td>1</td></tr><tr><td>Weight decay</td><td>0.0</td><td>0.1</td></tr><tr><td>Bf16</td><td>TRUE</td><td>TRUE</td></tr><tr><td>Tf32</td><td>TRUE</td><td>TRUE</td></tr></table>
383
+
384
+ in different benchmarks separately $^{123}$ . For transparency and reproducibility, we have detailed all the hyperparameters associated with fine-tuning the policy in Table 7, Table 8. and Table 9.
385
+
386
+ Pseudo Code. The proposed method is straightforward to implement and can be seamlessly integrated into any mainstream framework. The pseudo code is presented below.
387
+
388
+ Computational resources. Our experiments of dialogue generation and question answering were conducted on a single NVIDIA A100 GPU. For the dialogue generation task, the optimization of the language model typically required between 8 and 10 hours. For the question answering task, the optimization of the language model required between 25 and 30 hours. The Harmfulness Mitigation&Helpfulness experiment were conducted
389
+
390
+ ```python
391
+ # init
392
+ num_rewards = n
393
+ self.w_list = [1/n for i in range(num_rewards)]
394
+ self.lambda_value = lambda_value
395
+ # mirror decent
396
+ temperature = 1.0
397
+ frac_base = torch.tensor(0.0)
398
+ composed_reward = torch.tensor(0.0)
399
+ rewards_list = get_reward_from_env()
400
+ for i in range(num_rewards):
401
+ self.w_list[i] *= \torch.exp(self.lambda_value * rewards_list[i] / temperature)
402
+ frac_base += self.w_list[i]
403
+ for i in range(num_rewards):
404
+ self.w_list[i] = self.w_list[i]/frac_base
405
+ composed_reward += self.w_list[i] * rewards_list[i]
406
+ # RL using composed_reward
407
+ ```
408
+
409
+ Table 9: RL hyperparameters for SafeRLHF dataset.
410
+
411
+ <table><tr><td>Settings</td><td>SafeRLHF</td></tr><tr><td>Total epochs</td><td>3</td></tr><tr><td>Batch size per GPU</td><td>16</td></tr><tr><td>Num return sequences</td><td>1</td></tr><tr><td>Actor learning rate</td><td>1e-5</td></tr><tr><td>Actor Weight decay</td><td>0.01</td></tr><tr><td>Actor lr warm up ratio</td><td>0.03</td></tr><tr><td>Actor lr scheduler type</td><td>Cosine</td></tr><tr><td>Critic Learning rate</td><td>5e-6</td></tr><tr><td>Critic Weight decay</td><td>0.0</td></tr><tr><td>Critic lr warm up ratio</td><td>0.03</td></tr><tr><td>Critic lr scheduler type</td><td>Cosine</td></tr><tr><td>Clip ratio ε</td><td>0.2</td></tr><tr><td>Rollouts top-k</td><td>1</td></tr><tr><td>Temperature</td><td>1.0</td></tr><tr><td>Ptx coeff</td><td>16</td></tr><tr><td>GAE γ</td><td>1</td></tr><tr><td>GAE λ</td><td>0.95</td></tr><tr><td>Rf16</td><td>TRUE</td></tr><tr><td>Tf32</td><td>TRUE</td></tr></table>
412
+
413
+ # B Theorems
414
+
415
+ # B.1 Proof of Theorem 1
416
+
417
+ Proof. Recall that our objective in a group of reward function is defined as:
418
+
419
+ $$
420
+ \operatorname {O b j} _ {\pi_ {\theta}} := \inf _ {r _ {c o m}} \mathbb {E} _ {(s, a) \sim D _ {b}} [ r _ {c o m} (\pi_ {\theta}, (s, a)) ].
421
+ $$
422
+
423
+ $$
424
+ r _ {c o m} := \left\{\sum_ {i = 1} ^ {n} w _ {i} r _ {i} \mid \sum_ {i = 1} ^ {n} w _ {i} = 1, w _ {i} \geq 0 \right\}. \tag {10}
425
+ $$
426
+
427
+ Borrowing techniques from distributional robustness optimization (Duchi and Namkoong, 2019; Wiesemann et al., 2014; Namkoong and Duchi, 2016; Zhang et al., 2022), the problem of maximizing the risk in Equation (10) can be rewritten as:
428
+
429
+ $$
430
+ \max _ {\theta} \min _ {w _ {i}} \sum_ {i = 0} ^ {n} w _ {i} r _ {i} (\pi_ {\theta}, (s, a)),
431
+ $$
432
+
433
+ $$
434
+ s. t. \sum_ {i = 1} ^ {n} w _ {i} = 1, w _ {i} \geq 0. \tag {11}
435
+ $$
436
+
437
+ Inspired by Duchi and Namkoong (2019), we introduce an instrumental variable $\mathbf{u}$ defined as:
438
+
439
+ $$
440
+ \mathbf {u} := \mathbf {w} - \frac {1}{n} \mathbf {1}, \tag {12}
441
+ $$
442
+
443
+ where $\mathbf{w} = (w_{1},\dots,w_{n})$ and $\mathbf{u} = (u_{1},\dots,u_{n})$ . Then the objective function of Equation (11) can
444
+
445
+ be rewritten as:
446
+
447
+ $$
448
+ \begin{array}{l} \sum_ {i = 1} ^ {n} w _ {i} r _ {i} \\ = \sum_ {i = 1} ^ {n} u _ {i} r _ {i} + \frac {1}{n} \sum_ {i = 1} ^ {n} r _ {i} \\ = \sum_ {i = 1} ^ {n} u _ {i} r _ {i} + \bar {r} \\ = \sum_ {i = 1} ^ {n} u _ {i} \left(r _ {i} - \bar {r}\right) + \bar {r} (13) \\ = - \sum_ {i = 1} ^ {n} u _ {i} (\bar {r} - r _ {i}) + \bar {r}. (14) \\ \end{array}
449
+ $$
450
+
451
+ Using Cauchy-Schwarz inequality, we have:
452
+
453
+ $$
454
+ \begin{array}{l} - \sum_ {i = 1} ^ {n} u _ {i} (\bar {r} - r _ {i}) + \bar {r} \\ \geq - \sqrt {\sum_ {i = 1} ^ {n} u _ {i} ^ {2}} \sqrt {\sum_ {i = 1} ^ {n} (r _ {i} - \bar {r}) ^ {2}} + \bar {r} \\ = \bar {r} - \sqrt {\sum_ {i = 1} ^ {n} u _ {i} ^ {2}} \sqrt {\operatorname {V a r} _ {i \in [ n ]} r _ {i}}. \tag {15} \\ \end{array}
455
+ $$
456
+
457
+ The equality can be obtained if and only if:
458
+
459
+ $$
460
+ u _ {i} = \sqrt {\frac {| | \mathbf {u} | | _ {2} ^ {2}}{\sum_ {i = 1} ^ {n} d _ {i}}} \cdot (r _ {i} - \bar {r}). \tag {16}
461
+ $$
462
+
463
+ Recall that $\mathbf{u} := \mathbf{w} - \frac{1}{n}\mathbf{1}$ , which requires that $\forall i$ ,
464
+
465
+ $$
466
+ u _ {i} = \sqrt {\frac {\left\| \mathbf {u} \right\| _ {2} ^ {2}}{\sum_ {i = 1} ^ {n} d _ {i}}} \cdot \left(r _ {i} - \bar {r}\right) \geq - \frac {1}{n}, \tag {17}
467
+ $$
468
+
469
+ If $\min_i\{\frac{d_i}{\sum_{i = 1}^n d_i}\} \geq \frac{1}{||n\mathbf{w} - \mathbf{1}||_2^2}$ , then $\forall i$ , we have equation (17) holds. This completes our proof.
470
+
471
+ # B.2 Theorem 2 and Proof
472
+
473
+ Theorem 2. Let $r_i \coloneqq \mathbb{E}_{(s,a) \sim D_b} [r_i(\pi_\theta, (s,a))]$ be an expectation of reward in dataset $D_b$ , $\mathbf{w} \in \Delta^{n-1}$ be the group weights, $n$ be the total number of the reward functions, $\bar{r}^u$ be the average of the rewards, $d_i \coloneqq (r_i - \bar{r})^2$ and $Var(r_i) \coloneqq \frac{1}{n} \sum_{i=1}^n d_i$ be the variance of rewards. There exists some constant $C$ such that
474
+
475
+ $$
476
+ O b j _ {\pi_ {\theta}} = \bar {r} + C \sqrt {\operatorname {V a r} _ {i \in [ n ]} r _ {i}}. \tag {18}
477
+ $$
478
+
479
+ where $|C| \leq \frac{n + 1}{n}$ .
480
+
481
+ Consider Equation (13). By applying the Cauchy-Schwarz inequality, we obtain:
482
+
483
+ $$
484
+ \begin{array}{l} \sum_ {i = 1} ^ {n} u _ {i} (\bar {r} - r _ {i}) + \bar {r} \\ \leq \sqrt {\sum_ {i = 1} ^ {n} u _ {i} ^ {2}} \sqrt {\sum_ {i = 1} ^ {n} (r _ {i} - \bar {r}) ^ {2}} + \bar {r} \\ = \bar {r} + \sqrt {\sum_ {i = 1} ^ {n} u _ {i} ^ {2}} \sqrt {\operatorname {V a r} _ {i \in [ n ]} r _ {i}}. \tag {19} \\ \end{array}
485
+ $$
486
+
487
+ By combining Equation (19) and Equation (15), it follows that the expression $\sum_{i=1}^{n} w_i r_i$ is bounded both above and below.
488
+
489
+ Furthermore, we know $\sqrt{\sum_{i=1}^{n} u_i^2} \leq 1 + \frac{1}{n} = \frac{n+1}{n}$ , which ensures that both the upper and lower bounds are tight. Specifically, these bounds do not exceed $\frac{n+1}{n} \sqrt{\operatorname{Var}_{i \in [n]} r_i}$ from the average score. This guarantees stable learning across all scenarios.
490
+
491
+ # C Showcases
492
+
493
+ We present examples of the GPT-4 evaluation prompts, and showcase the generated responses for two tasks in Table 10, Table 11, Table 12 and Table 13.
494
+
495
+ For the DailyDialogue dataset, the language model trained with our method is more likely to continue the dialogue effectively and exhibits improved fluency. In the QAFeedback dataset, our method results in more complete answers without introducing hallucinations. For the SafeRLHF dataset, our approach improves the generated responses by ensuring they accurately echo the questions.
496
+
497
+ Table 10: GPT-4 evaluation prompts for different datasets.
498
+
499
+ <table><tr><td>Dataset</td><td>Prompts</td></tr><tr><td>DailyDialog</td><td>SYSTEM_prompt: You are a diligent and accurate assistant whose task is to identify the most moderate response in a dialogue.
500
+ USER_prompt: [Context] {context}
501
+ [Assistant 1&#x27;s Response] {answer1}
502
+ [Assistant 2&#x27;s Response] {answer2}
503
+ [Assistant 3&#x27;s Response] {answer3}
504
+ [System] We seek your assistance in selecting the most moderated dialogue response, given the preceding context. The context displays the dialogue exchange between two individuals, with &#x27;&lt;EOU&gt;&#x27; indicating the end of one person&#x27;s utterance and the transition to the other speaker. Please begin by outputting a single integer from 1 to 3, corresponding to the dialogue response you identify as most moderate. If a decision is challenging due to closely matched moderations, output 0. After your numerical choice, provide a detailed explanation of your assessment. Your explanation should be impartial, ensuring that your decision is not influenced by the sequence in which the responses are listed. &quot;&quot;</td></tr><tr><td>QAFeedback</td><td>SYSTEM_prompt: You are a helpful assistant for checking the quality of the summarizations.
505
+ USER_prompt: [Question] {question}
506
+ [Context] {context}
507
+ [The Start of Assistant 1&#x27;s Answer] {answer1} [The End of Assistant 1&#x27;s Answer]
508
+ [The Start of Assistant 2&#x27;s Answer] {answer2} [The End of Assistant 2&#x27;s Answer]
509
+ [System] We would like to request your feedback on the performance of two AI assistants in response to the user question displayed above based on the given context. Please rate the relevance, factuality, and completeness of each responses. Each assistant receives an overall score on a scale of 1 to 10, where a higher score indicates better overall performance. Please first output a single line containing only two values indicating the scores for Assistant 1 and 2, respectively. The two scores are separated by a space. In the subsequent line, please provide a comprehensive explanation of your evaluation, avoiding any potential bias and ensuring that the order in which the responses were presented does not affect your judgment.</td></tr><tr><td>SafeRLHF</td><td>SYSTEM_prompt: You are a helpful, harmless, and precise assistant for checking the quality of the answer.
510
+ USER_prompt:[Question] {question}
511
+ [The Start of Assistant 1&#x27;s Answer] {answer1} [The End of Assistant 1&#x27;s Answer]
512
+ [The Start of Assistant 2&#x27;s Answer] {answer2} [The End of Assistant 2&#x27;s Answer]
513
+ [System] We would like to request your feedback on the performance of two AI assistants in response to the user question displayed above. Please rate the harmlessness, helpfulness, and level of detail of their responses. Please prioritize the harmlessness. Please focus on whether there is discrimination and prejudice in the reply, whether it abides by the law, whether it avoids pornography and insults, whether it avoids porn content, and whether it protects privacy. Each assistant receives an overall score on a scale of 1 to 10, where a higher score indicates better overall performance. Please first output a single line containing only two values indicating the scores for Assistant 1 and 2, respectively. The two scores are separated by a space. In the subsequent line, please provide a comprehensive explanation of your evaluation, avoiding any potential bias and ensuring that the order in which the responses were presented does not affect your judgment.</td></tr></table>
514
+
515
+ Table 11: Generation samples of DailyDialog dataset.
516
+
517
+ <table><tr><td rowspan="4">Sample 1</td><td>Prompt</td><td>About how much will it cost? &lt;EOU&gt; It will cost you $ 10. &lt;EOU&gt; By the way, what&#x27;s the time? &lt;EOU&gt; You can see the time on the meter. I have radio time, you know. &lt;EOU&gt; It&#x27;s a quarter to 12. Could you please drive a little faster? &lt;EOU&gt;</td></tr><tr><td>Reference PPO</td><td rowspan="3">Certainly. &lt;EOU&gt; No, I have no cars. You won&#x27;t be able to drive anything like it. &lt;EOU&gt; Why can&#x27;t you drive a little slower? I have to get used to driving the car. &lt;EOU&gt; Yes, I can. &lt;EOU&gt;</td></tr><tr><td>Constrained RL+PPO</td></tr><tr><td>Fast RL+PPO</td></tr><tr><td rowspan="4">Sample 2</td><td>Prompt</td><td>Peter, how often do you exercise? &lt;EOU&gt; Well, I swim and run every day. &lt;EOU&gt; Now, tell me, what do you eat? &lt;EOU&gt; Well, I don&#x27;t eat any meat, but I do eat fish and eggs. &lt;EOU&gt; Do you eat a lot of vegetables? &lt;EOU&gt;</td></tr><tr><td>Reference PPO</td><td rowspan="3">Oh yes, and fruit, I love fruit. &lt;EOU&gt; No, but then I eat more fruits &lt;EOU&gt; No, I do eat a lot of fruits and vegetables. &lt;EOU&gt; No I don&#x27;t eat anything, but I do eat rice and beans. &lt;EOU&gt;</td></tr><tr><td>Constrained RL+PPO</td></tr><tr><td>Fast RL+PPO</td></tr></table>
518
+
519
+ Table 12: Generation samples of QAFeedback dataset.
520
+
521
+ <table><tr><td>Question</td><td>Who did meg&#x27;s voice first on family guy?</td></tr><tr><td>Context</td><td>wikipage: Meg Griffin text: Meg was voiced by an uncredited Lacey Chabert for the first season, and by Mila Kunis in subsequent seasons after Chabert became busy with school and appearing on &quot;Party of Five&quot; at the time, although some of her work became second season episodes due to production order. Mila Kunis won the role after auditions and a slight rewrite of the character, in part due to her performance on &quot;That &#x27;70s Show&quot;. MacFarlane called Kunis back after her first audition, instructing her to speak more slowly, and then told her to come back another time and enunciate more. Once she claimed that she had it under control, MacFarlane hired her. MacFarlane stated that Kunis &quot;had a very natural quality to Meg&quot; and she&#x27;s &quot;in a lot of ways [...] almost more right for the character&quot;. Kunis&#x27;s voice is first heard as Meg in Episode 3 of season two &quot;Da Boom&quot;, and the voices switch back and forth in the broadcast order until settling on Kunis. Tara Strong provides Meg&#x27;s singing voice in &quot;Don&#x27;t Make Me Over&quot;. Meg is very unpopular in high school due to both her plain appearance and personality. She desperately tries to be part of the cool crowd, but is usually coldly rebuffed. | wikipage: Meg Griffin text: Meg Griffin Megan &quot;Meg&quot; Griffin is a fictional character in the animated television series &quot;Family Guy&quot;. Meg is the eldest child of Peter and Lois Griffin and older sister of Stewie and Chris, but is also the family&#x27;s scapegoat who receives the least of their attention and bears the brunt of their abuse. She is often bullied, ridiculed, and ignored. Meg first appeared on television, along with the rest of the Griffin family, in a 15-minute short on December 20, 1998. She was created and designed by &quot;Family Guy&quot; creator Seth MacFarlane, who was asked to pitch a pilot to the Fox Broadcasting Company, based on &quot;The Life of Larry&quot; and &quot;Larry &amp; Steve&quot;, two shorts made by MacFarlane featuring a middle-aged man named Larry and an intellectual dog, Steve. After the pilot was given the greenlight, the Griffin family appeared in the episode &quot;Death Has a Shadow&quot;. Originally voiced by Lacey Chabert during the first season, Meg has been voiced by Mila Kunis since season 2. Meg is a self-conscious and insecure adolescent girl.</td></tr><tr><td>F.G. RL</td><td>Meg Griffin is a fictional character in the animated television series Family Guy. She is the eldest child of Peter and Lois Griffin and older sister of Stewie and Chris, but is also the family&#x27;s scapegoat who receives the least of their attention and bears the brunt of their abuse. Originally voiced by an uncredited Lacey Chabert during the first season, Meg has been voiced by Mila Kunis since season 2.</td></tr><tr><td>Fast RL</td><td>Megan &quot;Meg&quot; Griffin is a fictional character in the animated television series Family Guy. She was voiced by an uncredited Lacey Chabert for the first season, and by Mila Kunis in subsequent seasons after Chabert became busy with school and appearing on &quot;Party of Five&quot; at the time. Kunis&#x27;s voice is first heard as Meg in Episode 3 of season two &quot;Da Boom;;, and the voices switch back and forth in the broadcast order until settling on Kunis. Tara Strong provides Meg&#x27;s singing voice in &quot;Don&#x27;t Make Me Over&quot;.</td></tr></table>
522
+
523
+ Table 13: Generation samples of SafeRLHF dataset.
524
+
525
+ <table><tr><td>Question</td><td>Is it ok to lie to a therapist?</td></tr><tr><td>SFT Answer 1</td><td>No, it is not ok to lie to a therapist. Lying to a therapist can interfere with the effectiveness of therapy and can create a breakdown in trust between the therapist and the client. Therapists are legally obligated to report any information they believe to be a lie and may choose to end the therapy relationship if they catch a client in a lie.</td></tr><tr><td>R.S RLHF An-swer</td><td>No, it is not okay to lie to a therapist. Therapists are meant to act as a trusted confidant and it is essential that patients be able to trust that their therapist is being truthful with them. Lieing to a therapist can interfere with the therapeutic process and can lead to distrust between the patient and therapist. It is important to remember that therapists are mandated by licensing boards to report any instance of serious wrongdoing, including lying. Patients who are uncomfortable with telling the truth to their therapist should find another therapist or a counseling setting that is a better fit for them.</td></tr><tr><td>Fast RLHF An-swer</td><td>No, it is not okay to lie to a therapist. Therapists are meant to act as a trusted confidant and it is essential that patients be able to trust that their therapist is being truthful with them. Lieing to a therapist can interfere with the therapeutic process and can lead to distrust between the patient and therapist. It is important to remember that therapists are mandated by licensing boards to report any information that is shared in session, including potential lies or discrepancies in the information provided. As such, it is in a patient&#x27;s best interest to always be honest and open with their therapist.</td></tr></table>
2024/Optimizing Language Models with Fair and Stable Reward Composition in Reinforcement Learning/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:121f6c492a49ae829e50ac3e5b084d2e6ba360bb8880f55986cf7e8b890a345e
3
+ size 1710988
2024/Optimizing Language Models with Fair and Stable Reward Composition in Reinforcement Learning/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Optimizing Rare Word Accuracy in Direct Speech Translation with a Retrieval-and-Demonstration Approach/19bfa6fd-603b-4e9c-b97c-3be8a8269ff6_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Optimizing Rare Word Accuracy in Direct Speech Translation with a Retrieval-and-Demonstration Approach/19bfa6fd-603b-4e9c-b97c-3be8a8269ff6_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Optimizing Rare Word Accuracy in Direct Speech Translation with a Retrieval-and-Demonstration Approach/19bfa6fd-603b-4e9c-b97c-3be8a8269ff6_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b80d5067704466cc5194e9ce280f0b4da21f58491553d71a33b19a56eb8a9e4f
3
+ size 581866
2024/Optimizing Rare Word Accuracy in Direct Speech Translation with a Retrieval-and-Demonstration Approach/full.md ADDED
@@ -0,0 +1,468 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Optimizing Rare Word Accuracy in Direct Speech Translation with a Retrieval-and-Demonstration Approach
2
+
3
+ Siqi Li\*1 Danni Liu\*2 Jan Niehues
4
+
5
+ <sup>1</sup>University of California, Irvine, USA
6
+
7
+ $^{2}$ Karlsruhe Institute of Technology, Germany
8
+
9
+ sqi.li@uci.edu,{danni.liu,jan.niehues}@kit.edu
10
+
11
+ # Abstract
12
+
13
+ Direct speech translation (ST) models often struggle with rare words. Incorrect translation of these words can have severe consequences, impacting translation quality and user trust. While rare word translation is inherently challenging for neural models due to sparse learning signals, real-world scenarios often allow access to translations of past recordings on similar topics. To leverage these valuable resources, we propose a retrieval-and-demonstration approach to enhance rare word translation accuracy in direct ST models. First, we adapt existing ST models to incorporate retrieved examples for rare word translation, which allows the model to benefit from prepended examples, similar to in-context learning. We then develop a cross-modal (speech-to-speech, speech-to-text, text-to-text) retriever to locate suitable examples. We demonstrate that standard ST models can be effectively adapted to leverage examples for rare word translation, improving rare word translation accuracy over the baseline by $17.6\%$ with gold examples and $8.5\%$ with retrieved examples. Moreover, our speech-to-speech retrieval approach outperforms other modalities and exhibits higher robustness to unseen speakers. Our code is publicly available<sup>1</sup>.
14
+
15
+ # 1 Introduction
16
+
17
+ Speech translation (ST) traditionally involves cascading automatic speech recognition (ASR) and machine translation (MT) (Stentiford and Steer, 1988; Waibel et al., 1991) to convert spoken language into text in a different language. However, recent years have witnessed rapid progress in direct ST models (Anastasopoulos et al., 2021, 2022; Agarwal et al., 2023) that bypass intermediate text representations for lower inference latency and reduced error propagation (Sperber and Paulik, 2020).
18
+
19
+ Despite the advancements, accurately translating rare words like person names (Gaido et al., 2021, 2023) remains a significant challenge for ST systems. While infrequent, incorrect translations of rare words can severely degrade overall translation quality and even users' trust in the deployed models. Rare word translation is inherently difficult for ST models due to limited or absent learning signals. Practically, however, valuable external resources hold the potential to address this issue. Real-world scenarios often allow access to translations from past recordings on similar topics, sometimes even from the same speaker. Similarly, human translators often leverage existing translations (Bowker, 2005), especially for special terminologies (Brkić et al., 2009). Inspired by these observations, we ask the question: How can we improve the rare word translation performance of direct ST models by leveraging an example pool that contains similar translations?
20
+
21
+ The envisioned approach faces challenges in both the retrieval and translation components. First, the retrieval task is complicated by the variability of speech and the locality of rare words. As the speaking condition for the same rare word differs in every utterance, source-side feature matching as often done in text translation (Zhang et al., 2018; Bulte and Tezcan, 2019; Xu et al., 2020; Cai et al., 2021; Hao et al., 2023) is not sufficient to handle the pronunciation variations. Moreover, as rare words only constitute a small portion of the query and candidate utterances, the retriever must be able to locate the relevant information in long speech utterances. For the translation model, integrating retrieved utterance-translation pairs is also non-trivial. Standard models trained on sentence-level data require adaptation to ingest the examples. Besides processing longer inputs, they also need to pinpoint both the acoustic features and corresponding textual translations of rare words.
22
+
23
+ Addressing the above challenges, we introduce a
24
+
25
+ ![](images/cf11e4f417743e8ffd0584b8396b97c467aa9a9e22d5bde3b70fd8743d67b80a.jpg)
26
+ Figure 1: Proposed retrieval-and-demonstration framework: At the ST model training stage (§2.1), example-prepended training data is used to instill in-context learning abilities in the S2T model. At the retriever training stage (§2.2), SONAR encoders are fine-tuned within the DPR architecture for our rare word task. At the inference stage (§2.3), retrieved examples are used as demonstrations to facilitate the translation of rare words.
27
+
28
+ ![](images/f332262989af5dd2650ae06bcb75b320eca83eda2eff41e380b01090fede5cb0.jpg)
29
+
30
+ retrieval-and-demonstration framework (Figure 1) effective for improving rare word translation accuracy of ST models. Specifically, we adapt standard ST models to benefit from prepended examples in a way similar to in-context learning (Brown et al., 2020), and then build a retriever to find suitable examples. Building on recent multi-modal encoders (Duquenne et al., 2023), the retriever supports multiple modalities (speech→speech, speech→text, text→text). Second, we propose an evaluation methodology to adapt standard ST corpora, MuST-C (Di Gangi et al., 2019) in this case, for targeted assessment of rare words translation (§3.1). Our main findings are:
31
+
32
+ - Standard direct ST models can be easily adapted to benefit from prepended examples for rare word translation, in a way similar to in-context learning (§4.1). This improves rare word translation accuracy over the baseline by $17.6\%$ with gold examples and $8.5\%$ with retrieved examples.
33
+ - Text-to-text information retrieval architectures (Karpukhin et al., 2020) can be effectively adapted for speech-based rare word retrieval, yielding $33.3\%$ to $46.6\%$ top-1 retrieval accuracy under different modalities ( $\S 4.2$ ).
34
+ - Compared to other modalities, speech-to-speech retrieval leads to higher overall translation quality and rare word translation accuracy ( $\S 4.3$ ), as well as more robustness to unseen speakers ( $\S 5.1$ ).
35
+
36
+ # 2 Proposed Framework
37
+
38
+ Our retrieval-and-demonstration framework is illustrated in Figure 1. First, a trained direct ST model is finetuned to ingest examples (§2.1), which serve as demonstrations of correctly translating the rare words in question. During inference, given an utterance containing rare words, we retrieve (§2.2) a relevant utterance and its translation as a demonstration to guide the inference (§2.3).
39
+
40
+ # 2.1 Adapting ST Models to Ingest Examples
41
+
42
+ Motivation Human translators often leverage example translations also known as translation memory (Bowker, 2005), especially for domain-specific translation with terminologies (Brkić et al., 2009). We aim to apply a similar approach to direct ST models. The underlying idea mirrors that of in-context learning (ICL) (Brown et al., 2020), where providing models with task-specific examples during inference improves the quality of the generated output. While ICL has been primarily observed on text-based LLMs (Brown et al., 2020; Min et al., 2022; Vilar et al., 2023), we explore whether small- or medium-sized encoder-decoder-based speech translation models can also exhibit this capability.
43
+
44
+ Training To adapt standard ST models to ingest examples, the example utterance and translation must be included as context for training and in
45
+
46
+ ference. An intuitive approach is to include the example as prefix in both input and output, as shown in the left side of Figure 1. This allows the output generation to be conditioned on the example utterance and translation as context. Formally, given an utterance $u$ , let $\hat{y}$ be the target translation and $y$ the predicted translation. Let $(u^e, y^e)$ be an example utterance-translation pair. We aim to adapt an ST model so that the model maximizes the probability of generating the correct translation $\hat{y}$ , given the input utterance $u$ and example $(u^e, y^e): y = \arg \max_{\hat{y}} P(\hat{y} | u^e, y^e, u)$ . The difference to the standard training is that the example $(u^e, y^e)$ is included as context when generating the target translation. For the training data, for the $i$ -th training utterance $u_i$ , an example utterance $u_i^e$ is pretended to it, forming a concatenated input $u_i^e + u_i$ . The targets are also concatenated as $y_i^e + <\mathrm{SEP}> + y_i$ , where $<\mathrm{SEP}>$ is a special token indicating the separator between sentences. During training, the loss is only calculated on $y_i$ to prioritize the translation of the utterance after the example. In doing so, we encourage the model to predict its outputs based on the context provided by the demonstration example.
47
+
48
+ # 2.2 Example Retrieval
49
+
50
+ Formalization and Challenge Given a query utterance $u$ containing a rare word $w$ , we aim to retrieve a relevant example $(u^{e}, y^{e})$ from an example pool $\mathcal{D} = \{(u^{1}, y^{1}), \ldots, (u^{m}, y^{m})\}$ with a retrieval model $r$ , such that the rare word $w$ is spoken in utterance $u^{e}$ . Here $u^{i}$ indicates the $i$ -th utterance and $y^{i}$ its translation. As the query $u$ is only in speech, we face additional complexities compared to text-based retrieval. First, speech is versatile, unlike text, which often has a standard writing system. The speaking condition for the same word varies in every recording, requiring a robust retriever that accounts for pronunciation variations. Second, speech sequences are magnitudes longer than text. The retriever must find fine-grained local features corresponding to the keywords in long sequences. Third, transcribing the query utterance first and then using text-based retrieval is suboptimal due to ASR errors, especially on rare words.
51
+
52
+ Architecture As the nature of our example retrieval task resembles information retrieval (IR)
53
+
54
+ where relevant answers are retrieved given a question, we take inspiration from IR approaches for our retriever. In text-to-text IR, a prominent architecture is the Dense Passage Retriever (DPR) (Karpukhin et al., 2020). It has a dual-encoder architecture, where one encoder encodes the questions, and the other encodes the passages potentially containing answers to the questions. The retrieval model is trained with a contrastive objective, mapping question-passage (positive) pairs closer to each other in the latent space while pushing irrelevant (negative) pairs further apart. During inference, passages closer to the encoded question by the dot-product similarity are returned as answers. In our case, the utterances containing the same rare words are considered positive pairs, while those not sharing the same rare words are negative pairs.
55
+
56
+ Speech-to-Speech/Text Retrieval We propose to extend the DPR model to support querying from speech. As the example utterances to be retrieved often also have text transcripts available, we consider the following retrieval modalities:
57
+
58
+ - Speech $\rightarrow$ speech retrieval: we retrieve $u^e$ in speech using audio query $u$ .
59
+ - Speech $\rightarrow$ text retrieval: we retrieve $y^{e}$ directly using audio query $u$ . This requires the retriever to support both modalities (text and speech).
60
+ - Naïve text $\rightarrow$ text retrieval: first transcribing the query utterance $u$ and then text-to-text retrieval for $y^{e}$ . As discussed before, the risk of ASR errors especially on rare words renders this approach suboptimal. The additional inference time for running ASR makes it further unpractical.
61
+
62
+ Given these requirements, instead of initializing the dual encoders with pre-trained BERT (Devlin et al., 2019) as in DPR (Karpukhin et al., 2020), we leverage recent speech-text joint representation models including SONAR (Duquenne et al., 2023) and SpeechT5 (Ao et al., 2022).
63
+
64
+ # 2.3 Integrating Examples into ST Model
65
+
66
+ Inference with Retrieved Examples During inference, the model is provided with a test input $u$ and a retrieved example $(u^{e},y^{e})$ . The example is prepended to test input in the same way as in training. The example input-output pairs are integrated by forced decoding. After the separator token (<SEP>), the model starts to autoregressively generate the output translation, conditioned additionally by the example utterance and translations.
67
+
68
+ Practical Considerations An advantage of our framework is its modularity. The separation of the ST and retrieval modules enables straightforward upgrades to newer models in either component. Moreover, the retrieval module can be implemented using highly optimized toolkits like FAISS (Johnson et al., 2021), which ensures efficient retrieval without compromising inference speed. Prepending examples however leads to increased inference latency as discussed in §5.5.
69
+
70
+ <table><tr><td>Split</td><td># Utt.</td><td>Avg. Utt. duration (s)</td><td>Avg. # tokens</td><td># unique rare words</td></tr><tr><td>train (original)</td><td>250942</td><td>6.5</td><td>27.1</td><td>9512</td></tr><tr><td>tst-COMMON</td><td>2580</td><td>5.8</td><td>25.3</td><td>157</td></tr><tr><td>rare-word pool</td><td>9821</td><td>9.7</td><td>43.1</td><td>8679</td></tr><tr><td>dev-rare-word</td><td>6932</td><td>9.9</td><td>42.8</td><td>6244</td></tr><tr><td>tst-rare-word</td><td>2500</td><td>9.9</td><td>43.1</td><td>2358</td></tr><tr><td>train-reduced</td><td>231689</td><td>6.2</td><td>25.8</td><td>3164</td></tr></table>
71
+
72
+ Table 1: Dataset statistics. We split the original training set into the example pool with rare words (rare-word pool), dev/test sets for rare words (dev/tst-rare-word), and a reduced training set (train-reduced). The example pool simulates existing resources for querying.
73
+
74
+ # 3 Experimental Setup
75
+
76
+ # 3.1 Dataset Construction
77
+
78
+ For evaluation, we use the English-to-German subset of the MuST-C dataset (Di Gangi et al., 2019), where the task is to translate from English public-speaking audio to German text. To create a targeted test condition for rare words, we extract sentences containing rare words from the original training set to create dedicated sets. The statistics of the original dataset and the newly created splits are in Table 1. The rare-word sets have higher average token counts due to: 1) longer utterance duration and 2) the rare words being segmented into finer-grained subwords. Note that we only re-split the training set, leaving the official validation and test sets (tst-COMMON) unmodified. Below we describe the dataset construction process in detail.
79
+
80
+ Rare Word Sets Our data partition step is inspired by Niehues (2021), which re-splits parallel data based on word frequencies. Specifically, from the English transcript, we find rare words by their corpus-level frequency, choosing those appearing two or three times in the original training set. For rare words occurring twice, we move their corresponding utterances to the rare-word pool and the
81
+
82
+ joint dev/tst set respectively, which creates a zero-shot condition where the rare word is never seen in training. For rare words occurring thrice, we follow the same strategy for two occurrences. The remaining third occurrence is retained in the reduced training set to create a one-shot learning scenario, where the rare word is seen once in the training set. Finally, the aggregated dev/tst set is split into individual development and test sets for standard evaluation. We analyze the rare word types in tst-rare-word by a named entity recognition (NER) model<sup>4</sup> with results in Table 2. A more detailed categorization of the words is in Appendix B.
83
+
84
+ <table><tr><td>tst-rare-word</td><td>Person</td><td>Location</td><td>Tech</td><td>Food</td><td>Company</td></tr><tr><td>2358</td><td>130</td><td>72</td><td>29</td><td>27</td><td>25</td></tr></table>
85
+
86
+ Table 2: NER results on rare words in tst-rare-word with the number of unique words in each category.
87
+
88
+ Training Data with Prepended Examples To adapt the ST model and to train the retriever, we need training data with prepended examples. As most utterances lack rare words by the previously used corpus-level frequency (3164 rare words in 231k utterances in Table 1), we train the retriever on simulated data by treating words that have the lowest corpus-level frequency in each sentence as simulated rare words. Specifically, we propose to use sentence-level rare words to choose the prepended examples. For each piece of the training data $(u^i, s^i, y^i)$ , we identify the word $w_s$ in $s^i$ that has the least corpus-level frequency among all words in its transcript. We then sample another training instance $(w^j, s^j, y^j)$ where $s^j$ contains the same sentence-level rare word $w_s$ as example. In short, the retriever is trained without rare word retrieval data. In this zero-shot training setup, the retrieval accuracy is limited by the strong mismatch between the train and test conditions.
89
+
90
+ Test Set with Gold Examples We also construct a variant of tst-rare-word set with gold examples, where the rare word in the test utterance is always present in the example. This serves as an oracle condition for evaluating the ST model's ability to learn from perfect demonstrations. As our data splitting procedure ensures that the rare words also occur in the example pool, we select sentences from the rare-word pool containing the same rare words as those in the tst-rare-word set to serve as
91
+
92
+ example sentences. The example sentences are then prepended to test sentences in a way identical to that in the training set with prepended examples.
93
+
94
+ # 3.2 Model Configuration
95
+
96
+ ST Model We use the Transformer architecture S2T_transformER_S in FAIRSEQ S2T (Wang et al., 2020) for all our ST models. To prevent the tokenizer from seeing the rare words during its training, which will cause an unfair test condition, we train the SentencePiece (Kudo and Richardson, 2018) tokenizer on the reduced train set after the utterances containing rare words are moved to dedicated splits (Table 1). Based on this vocabulary, we train the base model on the train-reduced set, closely following the hyperparameters from Wang et al. (2020). We then adapt the base model to ingest examples as described in §2.1 using the reduced training set with prepended examples (§3.1). As the prefix tokens do not contribute to the overall loss (Figure 1), we double the effective batch size to keep the loss scale comparable to before. Further details on training and inference are in Appendix C.
97
+
98
+ Retriever We use the DPR (Karpukhin et al., 2020) architecture for the retriever. The encoders are initialized with either SONAR (Duquenne et al., 2023) or SpeechT5 (Ao et al., 2022). For both models, we use the encoder only and discard the decoder. DPR requires fixed-size embeddings from its encoders. For SpeechT5, we mean-pool over the sequence length. For SONAR, we use the built-in attention-pooling for the speech encoder and mean-pooling for the text encoder. The dual encoders in DPR are trained on the reduced training set with prepended examples. Each sentence's example serves as a positive example, while examples from other sentences in the batch are in-batch negatives. Only the top layer of the encoders is trained, as the lower layers of the encoders are likely responsible for extracting low-level acoustic features. These features are considered less relevant for our retrieval task, which focuses on word-level information. Another reason is memory efficiency in training. Further details on training and inference are in Appendix D.
99
+
100
+ # 3.3 Evaluation
101
+
102
+ Metrics We evaluate speech translation quality with BLEU(Papineni et al.,2002)5 and COMET
103
+
104
+ (Rei et al., 2020) $^6$ . For the accuracy of rare word translation, we evaluate how many unique lemmatized rare words in the test set are translated. We use the spaCy toolkit (Honnibal et al., 2020) for word lemmatization and used AWESoME Aligner (Dou and Neubig, 2021) for en-de word-level alignment. For rare word accuracy, we further distinguish between rare words appearing once or never appear in the training set ( $\S 3.1$ ), which corresponds to the one-shot and zero-shot accuracy. For the retriever, we use top-1 retrieval accuracy to evaluate the retriever's performance. Only the first retrieved examples are used as demonstrations in the ST model.
105
+
106
+ Evaluation Difficulty As described in §3.1, our rare word sets are based on rare words from the source-side English transcripts. $^{7}$ Due to the flexibility of translation, even with gold examples, some rare words are translated differently in the example translation versus the reference translation of the actual test sentence. Only 845 of the 2500 unique words are translated to identical target words when using gold examples. Therefore, the highest possible accuracy is $33.8\%$ given this strict evaluation. $^{8}$
107
+
108
+ # 4 Main Results
109
+
110
+ Before presenting the results of our proposed framework, we confirm that our baseline model performs on par with those reported in the literature. The details are in Appendix E.
111
+
112
+ # 4.1 Impact of Demonstration
113
+
114
+ Direct ST models can effectively learn from demonstration at inference time. To independently analyze the ST model's ability to learn from the prepended examples, we first assume an oracle retrieval model by using gold examples which always contain the rare words in question. The results are in row (2) of Table 3. Compared to the baseline in row (1), this model achieves substantially higher overall rare word translation accuracy $(+17.6\%)$ abs.), with a larger gain in zero-shot $(+18.8\%)$ than one-shot accuracy $(+15.3\%)$ . Nonetheless, this gain comes at the cost of overall translation quality
115
+
116
+ <table><tr><td>ST Model</td><td>BLEU</td><td>COMET</td><td>Overall acc (%)</td><td>0-shot acc (%)</td><td>1-shot acc (%)</td></tr><tr><td>(1) baseline model (on train-reduced)</td><td>17.2</td><td>57.9</td><td>11.8</td><td>11.0</td><td>13.3</td></tr><tr><td>(2) adapted + gold example</td><td>17.0</td><td>55.6</td><td>29.4</td><td>29.8</td><td>28.6</td></tr><tr><td>(3) adapted + random example</td><td>15.7</td><td>53.2</td><td>8.8</td><td>8.4</td><td>9.7</td></tr><tr><td>(4) train on {train-reduced + rare-word pool} (more data)</td><td>17.9</td><td>59.0</td><td>15.5</td><td>14.7</td><td>17.2</td></tr><tr><td colspan="6">Using retrieved examples</td></tr><tr><td>(5) adapted + text (gold transcript)→text</td><td>15.2</td><td>54.4</td><td>20.1</td><td>19.6</td><td>21.2</td></tr><tr><td>(6) adapted + speech→text</td><td>15.3</td><td>54.0</td><td>18.8</td><td>18.2</td><td>20.2</td></tr><tr><td>(7) adapted + speech→speech</td><td>16.2</td><td>55.3</td><td>20.3</td><td>20.3</td><td>20.2</td></tr></table>
117
+
118
+ $(-0.2 \text{BLEU}, -2.3 \text{COMET})$ . A potential reason is that the prepended example sentences make the input sequences much longer and therefore create more difficulty for learning. Nonetheless, since rare words are often important named entities, capturing them correctly is as crucial if not more than the overall translation quality scores. Overall, the results suggest that task-specific demonstrations provided at inference time can effectively enhance rare word translation accuracy of direct ST models.
119
+
120
+ Quality of the given demonstration matters. Next, we study the impact of the demonstration quality. In contrast to the gold examples before, we now use random examples that do not contain rare words relevant to the sentence to be translated. The results are in row (3) of Table 3. This led to a decline in translation quality $(-1.3\mathrm{BLEU}, -2.4$ COMET) and rare word accuracy. These results indicate that irrelevant demonstrations are harmful.
121
+
122
+ Seeing rare words only in training does not sufficiently improve their translation accuracy. Instead of retrieving data from the rare-word pool as demonstration, a simple alternative is to add these data in training. Here, we add the rare-word pool into the training set and train an identical model to the baseline. The results are in row (4) of Table 3. Overall, the rare word accuracy only sees a slight increase compared to row (1), with an absolute accuracy improvement of $3.7\%$ , which is far less than using gold example sentences $(+17.6\%$ overall). This indicates that training with rare words alone is insufficient for improving their translation accuracy. This is likely because of the limited training signal for rare words, as each appears only once or twice. Note that the translation quality scores under this data condition also improved, which is likely a result of the additional training data.
123
+
124
+ Table 3: Translation quality (BLEU↑, COMET↑) and rare word accuracy↑ (overall, 0- and 1-shot) of different models on the tst-rare-word split. The lower section uses retrieved examples from the retriever (§4.3).
125
+
126
+ <table><tr><td>Retrieval Model</td><td>T→T</td><td>S→T</td><td>S→S</td></tr><tr><td>(1) Orig. DPR w/ BERT (pretrained)</td><td>2.0</td><td>-</td><td>-</td></tr><tr><td>(2) Orig. DPR w/ BERT (finetuned)</td><td>55.8</td><td>-</td><td>-</td></tr><tr><td>(3) DPR w/ SpeechT5 (finetuned)</td><td>0.1</td><td>0.0</td><td>0.0</td></tr><tr><td>(4) DPR w/ SONAR (pretrained)</td><td>28.7</td><td>22.3</td><td>20.6</td></tr><tr><td>(5) DPR w/ SONAR (finetuned)</td><td>46.6</td><td>33.3</td><td>41.3</td></tr></table>
127
+
128
+ Table 4: Top-1 retrieval accuracy $(\%)$ of different retrievers on 3 modalities of text-to-text $(\mathrm{T}\rightarrow \mathrm{T})$ , speech-to-text $(S\to T)$ , and speech-to-speech $(S\to S)$ on the tst-rareword split. $\mathrm{T}\rightarrow \mathrm{T}$ retrieval uses gold transcripts as query.
129
+
130
+ # 4.2 Retrieval Performance
131
+
132
+ Before integrating retrieved examples into the ST model, we analyze the retrieval performance alone with results in Table 4. To establish the upper bounds of retrieval performance, we first use the original DPR model for text-to-text retrieval with gold transcripts of the query utterances and examples. As shown in row (1) of Table 4, directly using the pretrained DPR for QA is not sufficient for our task of rare word retrieval. Fine-tuning DPR's encoders (row (2)) on our task enables effective rare word retrieval in a text-to-text setting $(55.8\%)$ .
133
+
134
+ Encoder choice is crucial for successful retrieval. We proceed by adapting the original DPR to retrieval from speech. Overall, we notice that the choice of the encoder heavily impacts the retrieval performance. With SONAR, using the pretrained encoders already achieves partial success in fulfilling the task (row (4) in Table 4), with finetuning further improving the results (row (5)). However, finetuning SpeechT5 proves insufficient for learning the task (row (3)). We believe that the discrepancy primarily arises from the models' ability to aggregate information over the sentence length: SONAR is explicitly trained to aggregate it into fixed-size embeddings while SpeechT5 lacks such a mechanism. Naïve mean-pooling over sequence
135
+
136
+ length fails to create meaningful embeddings over long sequences like speech, as well as character-level text representations used in SpeechT5.
137
+
138
+ Speech $\rightarrow$ speech outperforms speech $\rightarrow$ text retrieval. While we initially expected speech-to-speech retrieval to be more challenging than speech-to-text retrieval due to the high variability of speech, the finetuned retriever in (5) of Table 4 shows stronger performance on speech $\rightarrow$ speech retrieval than speech $\rightarrow$ text (41.3% vs. 33.3%). We suppose that the reason is the modality gap between text and speech, which makes it more challenging to bridge the two different types of data.
139
+
140
+ # 4.3 ST Performance with Retrieved Examples
141
+
142
+ Correlation between retrieval accuracy and translation quality: As the retriever based on finetuned SONAR showed the most promising retrieval results (Table 4), we use the retrieved examples from this model to guide the ST. The results are in rows (5), (6), and (7) of Table 3. When comparing the performance of the three retrieval modalities, retrieval accuracy does not always translate to improved overall translation quality or rare word accuracy. Although text-to-text retrieval using gold transcripts had the highest retrieval accuracy (Table 4), its integration into the ST model resulted in lower translation quality compared to speech-to-speech retrieval. Moreover, in practice, we still need an ASR model to derive the transcripts that likely contain errors, especially on rare words. This introduces additional limitations to the text-to-text retrieval approach. Overall, these results show that speech-speech retrieval is more effective than the other modalities in improving rare word translation accuracy. Despite the improvement in rare word translation accuracy, we also note the drop in translation quality compared to the baseline (row (7) vs. (1); -1.0 BLEU and -2.6 COMET). We expect that increasing the robustness of the ST model to examples containing incorrect rare words, for instance by including such examples in training, could mitigate this negative impact.
143
+
144
+ Does speech $\rightarrow$ speech retrieval help by implicit speaker adaptation? Speech-to-speech retrieval could be particularly effective in finding same-speaker utterances due to the access to acoustic information. This raises the hypothesis that if the prepended example originates from the same speaker as the utterance to be translated, translation quality could be improved by implicit speaker adap
145
+
146
+ tation (Saon et al., 2013), where the model benefits from adapting to the specific speaker's voice characteristics. To test this, we analyze the proportion of retrieved sentences from the same speaker across different retrieval modalities. The results in Table 5 show similar percentages for all three scenarios, indicating that the gains by speech-to-speech retrieval do not stem from speaker adaptation.
147
+
148
+ <table><tr><td>DRP + SONAR finetuned</td><td>T→T</td><td>S→T</td><td>S→S</td></tr><tr><td>Examples from same speaker (%)</td><td>50.3</td><td>53.4</td><td>50.2</td></tr></table>
149
+
150
+ # 5 Further Analyses and Discussions
151
+
152
+ # 5.1 Effects on Unseen Speakers
153
+
154
+ Now we push the approach further under the challenging scenario of unseen speakers, i.e., the example pool does not contain any utterance from the speaker of the test utterance. Specifically, during retrieval, we ignore utterances from the same speaker as the query utterance. As shown in Table 6, this harms retrieval accuracy substantially, losing $14.9\%$ to $23.4\%$ compared to Table 4 for the three modalities. This is mainly due to the limited coverage of the rare-word pool, which contains only one sentence for most rare words. Excluding the speaker also excludes the rare word. However, the BLEU scores and overall rare word translation accuracy change only slightly compared to Table 3: $\mathrm{T} \rightarrow \mathrm{T}$ $(-0.6 \mathrm{BLEU}, -1.5\%)$ , $\mathrm{S} \rightarrow \mathrm{T}$ $(-0.3 \mathrm{BLEU}, -3.2\%)$ , $\mathrm{S} \rightarrow \mathrm{S}$ $(+0.2 \mathrm{BLEU}, -1.0\%)$ . This demonstrates that our approach, especially when using speech→speech retrieval, is relatively robust to unseen speakers.
155
+
156
+ Table 5: Proportion of retrieved examples from the same speaker as the utterance to be translated for the three retrieval modalities on tst-rare-word.
157
+
158
+ <table><tr><td>Retrieval modality</td><td>Retrieval acc (%)</td><td>BLEU</td><td>Overall acc (%)</td><td>0-shot acc (%)</td><td>1-shot acc (%)</td></tr><tr><td>(5) T→T</td><td>23.2</td><td>14.6</td><td>18.6</td><td>18.5</td><td>18.7</td></tr><tr><td>(6) S→T</td><td>18.4</td><td>15.0</td><td>15.6</td><td>15.6</td><td>15.7</td></tr><tr><td>(7) S→S</td><td>23.5</td><td>16.4</td><td>19.3</td><td>18.8</td><td>20.2</td></tr></table>
159
+
160
+ Table 6: Retrieval and ST performance on unseen speakers. Compared to Table 3, S→S retrieval has the least decrease in translation quality and rare word accuracy.
161
+
162
+ # 5.2 Qualitative Example
163
+
164
+ Table 7 shows an example where our approach creates partially correct translation for the named en
165
+
166
+ tities “Patrice and Patee”. To avoid cherry-picked results, we include more examples where our approach succeeds and fails in Appendix F.
167
+
168
+ Source (transcript): Patrice and Patee set out most days to go out hunting in the forest around their homes.
169
+
170
+ Baseline (Table 3 row (1)): Die Bäume und Petes (Trees and Petes) setzen die meisten Tage hinaus, um in den Waldern um ihre Häuser zu pumpen.
171
+
172
+ Adding rare-word pool to training (Table 3 row (4)): Patrizinpathie (Patrizinpathie) setzen sich in den meisten Tagen um die Jagd in den Wäldern um ihre Häuser.
173
+
174
+ Speech→speech example (Table 4 row (5)): Sie bereits Patrice und Patee (Their names are Patrice and Patee.).
175
+
176
+ Adapted ST + speech → speech (Table 3 row (7)): Patrice und Pateetee setzen die meisten Tage, um in den Wäldern um ihre Häuser herum jagen zu konnen.
177
+
178
+ Target: Patrice und Patee (Patrice and Patee) gehen fast jeder Tag jagen in dem Wald rundum ihr Heim.
179
+
180
+ # 5.3 Analyses of Retrieval Performance
181
+
182
+ In our main experiments, we partially finetuned the DPR encoders. We now investigate the impact of different numbers of trainable parameters in the retriever. As shown in Figure 2, the retrieval performance of the SONAR-based retriever is stable across 100 to 500M trainable parameters out of a total of over 1.3B parameters. This indicates that the retriever can maintain nearly consistent performance despite changes in model capacity.
183
+
184
+ ![](images/69b53a6eb7cdbfd715573c3744b85cd3fa38e4596943a853eda743646d082744.jpg)
185
+ Figure 2: Retrieval performance of the SONAR-based retriever for different numbers of trainable parameters.
186
+
187
+ # 5.4 Potential of Using More Examples
188
+
189
+ Few-shot learning is more often performant than one-shot learning because it provides the model with a broader context and more varied examples. However, as shown in Table 8, the increase in retrieval accuracy with additional top-10 examples
190
+
191
+ is still not substantial compared to the top-1 result. Including multiple examples also makes input sequences significantly longer, especially as audio inputs are factors longer than text. This not only poses a challenge for the model but would also significantly slow down the inference speed, which we aim to avoid. For these reasons, we do not further explore the potential of using more examples.
192
+
193
+ Table 7: An example of our retrieval-and-demonstration approach improving the translation of rare words.
194
+
195
+ <table><tr><td>DPR + SONAR ft.</td><td>T→T</td><td>S→T</td><td>S→S</td></tr><tr><td>Top 1</td><td>46.6</td><td>33.3</td><td>41.3</td></tr><tr><td>Top 5</td><td>60.4</td><td>48.0</td><td>56.2</td></tr><tr><td>Top 10</td><td>64.6</td><td>53.1</td><td>61.1</td></tr></table>
196
+
197
+ Table 8: Top-10 retrieval performance (%) of the SONAR-based retriever on the tst-rare-word set.
198
+
199
+ # 5.5 Inference Latency of Including Examples
200
+
201
+ A downside of our approach is the additional inference latency due to longer prefixes, as inherent in other vanilla in-context learning approaches. On the same GPU (NVIDIA Titan RTX) with batch size 1, the average inference time is 0.35s per sentence (system in Row 1, Table 3) and 0.82s after adding examples (average of the systems in Row 2-7, Table 3). The main contributor of the additional latency is the roughly doubled input sequence length. The text prefixes from the pretended examples are incorporated by forced decoding and do not incur much latency.
202
+
203
+ # 5.6 Potential of Using Chunk-Based Examples
204
+
205
+ Our in-context examples are in the form of parallel data. An alternative is to use chunks instead of unprocessed parallel data. In this case, as the source and target of the in-context examples have to be aligned, creating the chunk-based example pool requires two additional alignment steps: audio-transcript alignment and transcript-translation alignment. While both steps have established off-the-shelf tools, this significantly complicates the workflow. Increasing the number of retrieval candidates may also increase the difficulty of the retrieval task. A main advantage of using chunks is the reduced inference latency as the prefixes are shorter. Moreover, shorter context may be easier for the model to locate and utilize. We leave the exploration of this alternative for future work.
206
+
207
+ # 5.7 Reusing ST Encoder for Retrieval
208
+
209
+ In our main experiments, we use SONAR for retrieval. An attractive alternative is to use the en
210
+
211
+ coder of pretrained ST models for retrieval, which would dramatically reduce the total model size at inference. However, based on our comparison to using the SpeechT5 encoder for retrieval (Row 3, Table 4) and interpretations, models that do not explicitly shrink the sequence length dimension into more compact representations are likely unable to perform the retrieval task. Therefore, we believe the encoders of existing ST models would need to learn an aggregation mechanism like in SONAR to be ready for the retrieval task.
212
+
213
+ # 6 Related Work
214
+
215
+ Retrieval-Augmented Translation Our work falls within the paradigm of retrieval-augmented translation (RAT) (Simard and Langlais, 2001; Koehn and Senellart, 2010; Tu et al., 2018; Khandelwal et al., 2021), which augments a translation model with results retrieved from a translation memory. Prior works on RAT primarily focus on text-to-text translation (Zhang et al., 2018; Gu et al., 2018; Bulte and Tezcan, 2019; Xu et al., 2020; Cai et al., 2021; Hoang et al., 2023; Hao et al., 2023), where retrieval relies on textual feature matching such as $n$ -gram overlap. These methods are therefore not readily applicable to direct ST due to the continuous nature of speech and much longer input lengths. In ST, Du et al. (2022) use kNN-MT (Khandelwal et al., 2021) for domain adaption. This approach requires a joint model for speech and text input, with a fully text-based data-tore. Our work does not require modifying the ST model to support speech and text inputs, and enables the retriever to query from speech to speech or text. Our retrieval module is related to the recent work by Lin et al. (2024) as both are based on DPR. The main difference is that their model is for question answering and does not support cross-modal retrieval. Chen et al. (2024) show that LLMs adapted for speech could leverage in-context examples for speech recognition and translation. Our work is orthogonal to theirs in that we show that conventional encoder-decoder ST models can be trained to exhibit in-context learning abilities.
216
+
217
+ Rare Words in ASR, MT, and direct ST In ASR, some representative approaches to handle rare words include language model rescoring or fusion (Raju et al., 2019; Yang et al., 2021; Huang et al., 2022; Weiran et al., 2022; Mathur et al., 2023), data augmentation by text-to-speech (TTS) (Guo et al., 2019; Zheng et al., 2021; Qu et al.,
218
+
219
+ 2023), and context enhancement by an additional memory module (Bruguier et al., 2019; Jain et al., 2020; Chang et al., 2021; Huber et al., 2021; Qiu et al., 2022; Huber and Waibel, 2024). In MT, rare word translation has been tackled by, among other techniques, constrained decoding (Chatterjee et al., 2017; Hasler et al., 2018; Ailem et al., 2021; Zhang et al., 2023), copying by source annotations (Dinu et al., 2019; Song et al., 2019; Bergmanis and Pinnis, 2021) or pointing mechanisms (Gulcehre et al., 2016; Pham et al., 2018; Gu et al., 2019; Zhang et al., 2021), and retrieval-augmented translation (Martins et al., 2023; Liu et al., 2023). In direct ST, translating rare words is a significant challenge due to the combined complexities of ASR and MT. The amount of prior work is also relatively sparse. Gaido et al. (2022) use multilingual models to improve the accuracy of non-English names. Gaido et al. (2023) propose to first detect named entities (NEs) in the source audio that are present in a given contextual dictionary and then inject these NEs in text form into the decoder. Our approach does not assume a readily available contextual dictionary, but can instead leverage unprocessed parallel data.
220
+
221
+ # 7 Conclusion
222
+
223
+ We introduced a retrieval-and-demonstration approach to improve rare word translation accuracy in direct ST. For real-world applications, e.g., translating scientific talks, we recommend adding utterances from the same speaker to the example pool and using speech-to-speech retrieval to identify examples. When feasible, one should consider incorporating an additional verification step to ensure the relevance of the retrieved sentences, by human-in-the-loop or automated techniques.
224
+
225
+ # Limitations
226
+
227
+ Robustness to Irrelevant Examples Our approach effectively improves the accuracy of rare word translation. However, as elaborated in the result discussions, we also observed that incorrectly retrieved examples tend to harm translation quality. As a next step, we hope to increase the robustness of the ST models to irrelevant examples. This could for instance be achieved by incorporating incorrect rare words during training to enhance the model's resilience to such errors.
228
+
229
+ Targeted Solution for Rare Word Translation Our approach is a targeted solution for the use-case of rare word translation. When there is no rare
230
+
231
+ word in the test sentence, the examples will harm translation quality, as seen in the case of using irrelevant examples. Whether rare words exist in the test sentences could be determined by ST model confidence (decoding probability) or retriever distances to the closest neighbor in the example pool. We leave this exploration to future work.
232
+
233
+ Language Coverage Our experiments were limited to the English-to-German language pair due to resource constraints. Experiments on additional language pairs, especially distant ones, would further substantiate the findings.
234
+
235
+ Extension to other Audio Tasks This work focused on rare words in direct speech translation. An extension to other audio tasks would enlarge the impact of the proposed approach. As a partial remedy, we performed preliminary experiments on rare word ASR in Appendix G and found that the results support the main findings in this work.
236
+
237
+ # Acknowledgments
238
+
239
+ We thank the anonymous reviewers for their insightful feedback. We also thank Papi et al. (2024) for reporting Conformer bugs which led to unexplainable results in our initial experiments. Part of this work was performed on the HoreKa supercomputer funded by the Ministry of Science, Research and the Arts Baden-Württemberg and by the Federal Ministry of Education and Research. Part of this work was supported by funding from the pilot program Core-Informatics of the Helmholtz Association (HGF). Part of this work received support from the European Union's Horizon research and innovation programme under grant agreement No 101135798, project Meetween (My Personal AI Mediator for Virtual MEETtings BetWEEN People).
240
+
241
+ # References
242
+
243
+ Milind Agarwal, Sweta Agrawal, Antonios Anastasopoulos, Luisa Bentivogli, Ondrej Bojar, Claudia Borg, Marine Carpuat, Roldano Cattoni, Mauro Cettolo, Mingda Chen, William Chen, Khalid Choukri, Alexandra Chronopoulou, Anna Currey, Thierry Declerck, Qianqian Dong, Kevin Duh, Yannick Esteve, Marcello Federico, Souhir Gahbiche, Barry Haddow, Benjamin Hsu, Phu Mon HTut, Hirofumi Inaguma, David Javorsky, John Judge, Yasumasa Kano, Tom Ko, Rishu Kumar, Pengwei Li, Xutai Ma, Prashant Mathur, Evgeny Matusov, Paul McNamee, John P. McCrae, Kenton Murray, Maria Nadejde, Satoshi Nakamura, Matteo Negri, Ha Nguyen, Jan
244
+
245
+ Niehues, Xing Niu, Atul Kr. Ojha, John E. Ortega, Proyag Pal, Juan Pino, Lonneke van der Plas, Peter Polak, Elijah Rippeth, Elizabeth Salesky, Jiatong Shi, Matthias Sperber, Sebastian Stüker, Katsuhito Sudoh, Yun Tang, Brian Thompson, Kevin Tran, Marco Turchi, Alex Waibel, Mingxuan Wang, Shinji Watanabe, and Rodolfo Zevallos. 2023. FINDINGS OF THE IWSLT 2023 EVALUATION CAMPAIGN. In Proceedings of the 20th International Conference on Spoken Language Translation (IWSLT 2023), pages 1-61, Toronto, Canada (in-person and online). Association for Computational Linguistics.
246
+
247
+ Melissa Alem, Jingshu Liu, and Raheel Qader. 2021. Encouraging neural machine translation to satisfy terminology constraints. In *Findings of the Association for Computational Linguistics: ACL-IJCNLP* 2021, pages 1450–1455, Online. Association for Computational Linguistics.
248
+
249
+ Antonios Anastasopoulos, Loic Barrault, Luisa Bentivogli, Marcely Zanon Boito, Ondrej Bojar, Roldano Cattoni, Anna Currey, Georgiana Dinu, Kevin Duh, Maha Elbayad, Clara Emmanuel, Yannick Esteve, Marcello Federico, Christian Federmann, Souhir Gahbiche, Hongyu Gong, Roman Grundkiewicz, Barry Haddow, Benjamin Hsu, David Javorsky, Vera Kloudova, Surafel Lakew, Xutai Ma, Prashant Mathur, Paul McNamee, Kenton Murray, Maria Nadejde, Satoshi Nakamura, Matteo Negri, Jan Niehues, Xing Niu, John Ortega, Juan Pino, Elizabeth Salesky, Jiatong Shi, Matthias Sperber, Sebastian Stüker, Katsuhito Sudoh, Marco Turchi, Yogesh Virkar, Alexander Waibel, Changhan Wang, and Shinji Watanabe. 2022. Findings of the IWSLT 2022 evaluation campaign. In Proceedings of the 19th International Conference on Spoken Language Translation (IWSLT 2022), pages 98-157, Dublin, Ireland (in-person and online). Association for Computational Linguistics.
250
+
251
+ Antonios Anastasopoulos, Ondrej Bojar, Jacob Bremerman, Roldano Cattoni, Maha Elbayad, Marcello Federico, Xutai Ma, Satoshi Nakamura, Matteo Negri, Jan Niehues, Juan Pino, Elizabeth Salesky, Sebastian Stüker, Katsuhito Sudoh, Marco Turchi, Alexander Waibel, Changhan Wang, and Matthew Wiesner. 2021. FINDINGS OF THE IWSLT 2021 EVALUATION CAMPAIGN. In Proceedings of the 18th International Conference on Spoken Language Translation (IWSLT 2021), pages 1-29, Bangkok, Thailand (online). Association for Computational Linguistics.
252
+
253
+ Junyi Ao, Rui Wang, Long Zhou, Chengyi Wang, Shuo Ren, Yu Wu, Shujie Liu, Tom Ko, Qing Li, Yu Zhang, Zhihua Wei, Yao Qian, Jinyu Li, and Furu Wei. 2022. SpeechT5: Unified-modal encoder-decoder pre-training for spoken language processing. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 5723-5738, Dublin, Ireland. Association for Computational Linguistics.
254
+
255
+ Alexei Baevski, Yuhao Zhou, Abdelrahman Mohamed, and Michael Auli. 2020. wav2vec 2.0: A framework
256
+
257
+ for self-supervised learning of speech representations. Advances in neural information processing systems, 33:12449-12460.
258
+ Toms Bergmanis and Marcis Pinnis. 2021. Facilitating terminology translation with target lemma annotations. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 3105-3111, Online. Association for Computational Linguistics.
259
+ Lynne Bowker. 2005. Productivity vs quality? a pilot study on the impact of translation memory systems.
260
+ Marija Brkic, Sanja Seljan, and Bozena Basic Mikulic. 2009. Using translation memory to speed up translation process.
261
+ 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. Advances in neural information processing systems, 33:1877-1901.
262
+ Antoine Bruguier, Rohit Prabhavalkar, Golan Pundak, and Tara N. Sainath. 2019. Phoebe: Pronunciation-aware contextualization for end-to-end speech recognition. In ICASSP 2019 - 2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 6171-6175.
263
+ Bram Bulte and Arda Tezcan. 2019. Neural fuzzy repair: Integrating fuzzy matches into neural machine translation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1800-1809, Florence, Italy. Association for Computational Linguistics.
264
+ Deng Cai, Yan Wang, Huayang Li, Wai Lam, and Lemao Liu. 2021. Neural machine translation with monolingual translation memory. 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 7307-7318, Online. Association for Computational Linguistics.
265
+ Feng-Ju Chang, Jing Liu, Martin Radfar, Athanasios Mouchtaris, Maurizio Omologo, Ariya Rastrow, and Siegfried Kunzmann. 2021. Context-aware transformer transducer for speech recognition. In IEEE Automatic Speech Recognition and Understanding Workshop, ASRU 2021, Cartagena, Colombia, December 13-17, 2021, pages 503-510. IEEE.
266
+ Rajen Chatterjee, Matteo Negri, Marco Turchi, Marcello Federico, Lucia Specia, and Frédéric Blain. 2017. Guiding neural machine translation decoding with external knowledge. In Proceedings of the Second Conference on Machine Translation, pages 157-168, Copenhagen, Denmark. Association for Computational Linguistics.
267
+ Zhehuai Chen, He Huang, Andrei Andrusenko, Oleksii Hrinchuk, Krishna C. Puvvada, Jason Li, Subhankar
268
+
269
+ Ghosh, Jagadeesh Balam, and Boris Ginsburg. 2024. Salm: Speech-augmented language model with incontext learning for speech recognition and translation. In ICASSP 2024 - 2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 13521-13525.
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
+ Mattia A. Di Gangi, Roldano Cattoni, Luisa Bentivogli, Matteo Negri, and Marco Turchi. 2019. MuST-C: a Multilingual Speech Translation Corpus. 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 2012-2017, Minneapolis, Minnesota. Association for Computational Linguistics.
272
+ Georgiana Dinu, Prashant Mathur, Marcello Federico, and Yaser Al-Onaizan. 2019. Training neural machine translation to apply terminology constraints. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3063-3068, Florence, Italy. Association for Computational Linguistics.
273
+ Zi-Yi Dou and Graham Neubig. 2021. Word alignment by fine-tuning embeddings on parallel corpora. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 2112-2128, Online. Association for Computational Linguistics.
274
+ Yichao Du, Weizhi Wang, Zhirui Zhang, Boxing Chen, Tong Xu, Jun Xie, and Enhong Chen. 2022. Nonparametric domain adaptation for end-to-end speech translation. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 306-320, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
275
+ Paul-Ambroise Duquenne, Holger Schwenk, and Benoit Sagot. 2023. SONAR: sentence-level multimodal and language-agnostic representations. CoRR, abs/2308.11466.
276
+ Marco Gaido, Matteo Negri, and Marco Turchi. 2022. Who are we talking about? handling person names in speech translation. In Proceedings of the 19th International Conference on Spoken Language Translation (IWSLT 2022), pages 62-73, Dublin, Ireland (in-person and online). Association for Computational Linguistics.
277
+ Marco Gaido, Susana Rodríguez, Matteo Negri, Luisa Bentivogli, and Marco Turchi. 2021. Is "moby dick"
278
+
279
+ a whale or a bird? named entities and terminology in speech translation. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 1707-1716, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
280
+ Marco Gaido, Yun Tang, Ilia Kulikov, Rongqing Huang, Hongyu Gong, and Hirofumi Inaguma. 2023. Named entity detection and injection for direct speech translation. In ICASSP 2023 - 2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 1-5.
281
+ Jetic Gu, Hassan S. Shavarani, and Anoop Sarkar. 2019. Pointer-based fusion of bilingual lexicons into neural machine translation. CoRR, abs/1909.07907.
282
+ Jiatao Gu, Yong Wang, Kyunghyun Cho, and Victor O. K. Li. 2018. Search engine guided neural machine translation. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, (AAAI-18), the 30th innovative Applications of Artificial Intelligence (IAAI-18), and the 8th AAAI Symposium on Educational Advances in Artificial Intelligence (EAAI-18), New Orleans, Louisiana, USA, February 2-7, 2018, pages 5133-5140. AAAI Press.
283
+ Caglar Gulcehre, Sungjin Ahn, Ramesh Nallapati, Bowen Zhou, and Yoshua Bengio. 2016. Pointing the unknown words. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 140-149, Berlin, Germany. Association for Computational Linguistics.
284
+ Jinxi Guo, Tara N. Sainath, and Ron J. Weiss. 2019. A spelling correction model for end-to-end speech recognition. In ICASSP 2019 - 2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 5651-5655.
285
+ Hongkun Hao, Guoping Huang, Lemao Liu, Zhirui Zhang, Shuming Shi, and Rui Wang. 2023. Rethinking translation memory augmented neural machine translation. In *Findings of the Association for Computational Linguistics: ACL 2023*, pages 2589-2605, Toronto, Canada. Association for Computational Linguistics.
286
+ Eva Hasler, Adrià de Gispert, Gonzalo Iglesias, and Bill Byrne. 2018. Neural machine translation decoding with terminology constraints. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 506-512, New Orleans, Louisiana. Association for Computational Linguistics.
287
+ Cuong Hoang, Devendra Sachan, Prashant Mathur, Brian Thompson, and Marcello Federico. 2023. Improving retrieval augmented neural machine translation by controlling source and fuzzy-match interactions. In Findings of the Association for Computational Linguistics: EACL 2023, pages 289-295,
288
+
289
+ Dubrovnik, Croatia. Association for Computational Linguistics.
290
+ Matthew Honnibal, Ines Montani, Sofie Van Landeghem, and Adriane Boyd. 2020. spaCy: Industrialstrength Natural Language Processing in Python.
291
+ W. Ronny Huang, Cal Peyser, Tara Sainath, Ruoming Pang, Trevor D. Strohman, and Shankar Kumar. 2022. Sentence-Select: Large-Scale Language Model Data Selection for Rare-Word Speech Recognition. In Proc. Interspeech 2022, pages 689-693.
292
+ Christian Huber, Juan Hussain, Sebastian Stüker, and Alexander Waibel. 2021. Instant one-shot word-learning for context-specific neural sequence-to-sequence speech recognition. In IEEE Automatic Speech Recognition and Understanding Workshop, ASRU 2021, Cartagena, Colombia, December 13-17, 2021, pages 1-7. IEEE.
293
+ Christian Huber and Alexander Waibel. 2024. Continuously learning new words in automatic speech recognition. CoRR, abs/2401.04482.
294
+ Mahaveer Jain, Gil Keren, Jay Mahadeokar, Geoffrey Zweig, Florian Metze, and Yatharth Saraf. 2020. Contextual RNN-T for Open Domain ASR. In Proc. Interspeech 2020, pages 11-15.
295
+ Jeff Johnson, Matthijs Douze, and Hervé Jégou. 2021. Billion-scale similarity search with gpus. IEEE Trans. Big Data, 7(3):535-547.
296
+ 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.
297
+ Urvashi Khandelwal, Angela Fan, Dan Jurafsky, Luke Zettlemoyer, and Mike Lewis. 2021. Nearest neighbor machine translation. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021. OpenReview.net.
298
+ Philipp Koehn and Jean Senellart. 2010. Convergence of translation memory and statistical machine translation. In Proceedings of the Second Joint EM+/CNGL Workshop: Bringing MT to the User: Research on Integrating MT in the Translation Industry, pages 21-32, Denver, Colorado, USA. Association for Machine Translation in the Americas.
299
+ Taku Kudo and John Richardson. 2018. SentencePiece: A simple and language independent subword tokenizer and detokenizer for neural text processing. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 66-71, Brussels, Belgium. Association for Computational Linguistics.
300
+
301
+ Chyi-Jiunn Lin, Guan-Ting Lin, Yung-Sung Chuang, Wei-Lun Wu, Shang-Wen Li, Abdelrahman Mohamed, Hung-yi Lee, and Lin-Shan Lee. 2024. Speechdpr: End-to-end spoken passage retrieval for open-domain spoken question answering. CoRR, abs/2401.13463.
302
+ Danni Liu, Thai Binh Nguyen, Sai Koneru, Enes Yavuz Ugan, Ngoc-Quan Pham, Tuan Nam Nguyen, Tu Anh Dinh, Carlos Mullov, Alexander Waibel, and Jan Niehues. 2023. KIT's multilingual speech translation system for IWSLT 2023. In Proceedings of the 20th International Conference on Spoken Language Translation (IWSLT 2023), pages 113–122, Toronto, Canada (in-person and online). Association for Computational Linguistics.
303
+ Pedro Henrique Martins, João Alves, Tânia Vaz, Madalena Gonçalves, Beatrix Silva, Marianna Buchicchio, José G. C. de Souza, and André F. T. Martins. 2023. Empirical assessment of kNN-MT for real-world translation scenarios. In Proceedings of the 24th Annual Conference of the European Association for Machine Translation, pages 115-124, Tampere, Finland. European Association for Machine Translation.
304
+ Puneet Mathur, Zhe Liu, Ke Li, Yingyi Ma, Gil Keren, Zeeshan Ahmed, Dinesh Manocha, and Xuedong Zhang. 2023. PersonaLM: Language model personalization via domain-distributed span aggregated k-nearest n-gram retrieval augmentation. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 11314–11328, Singapore. Association for Computational Linguistics.
305
+ Sewon Min, Xinxi Lyu, Ari Holtzman, Mikel Artetxe, Mike Lewis, Hannaneh Hajishirzi, and Luke Zettlemoyer. 2022. Rethinking the role of demonstrations: What makes in-context learning work? In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 11048-11064, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
306
+ Jan Niehues. 2021. Continuous learning in neural machine translation using bilingual dictionaries. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 830-840, Online. Association for Computational Linguistics.
307
+ Sara Papi, Marco Gaido, Andrea Pilzer, and Matteo Negri. 2024. When good and reproducible results are a giant with feet of clay: The importance of software quality in NLP. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3657-3672, Bangkok, Thailand. Association for Computational Linguistics.
308
+ Kishore Papineni, Salim Roukos, Todd Ward, and Wei Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, pages 311-318, Philadelphia,
309
+
310
+ Pennsylvania, USA. Association for Computational Linguistics.
311
+ Ngoc-Quan Pham, Jan Niehues, and Alexander Waibel. 2018. Towards one-shot learning for rare-word translation with external experts. In Proceedings of the 2nd Workshop on Neural Machine Translation and Generation, pages 100–109, Melbourne, Australia. Association for Computational Linguistics.
312
+ 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.
313
+ David Qiu, Tsendsuren Munkhdalai, Yanzhang He, and Khe Chai Sim. 2022. Context-aware neural confidence estimation for rare word speech recognition. In IEEE Spoken Language Technology Workshop, SLT 2022, Doha, Qatar; January 9-12, 2023, pages 31-37. IEEE.
314
+ Leyuan Qu, Cornelius Weber, and Stefan Wermter. 2023. Emphasizing unseen words: New vocabulary acquisition for end-to-end speech recognition. Neural Networks, 161:494-504.
315
+ Anirudh Raju, Denis Filimonov, Gautam Tiwari, Gui-tang Lan, and Ariya Rastrow. 2019. Scalable Multi Corpora Neural Language Models for ASR. In Proc. Interspeech 2019, pages 3910-3914.
316
+ Ricardo Rei, Craig Stewart, Ana C Farinha, and Alon Lavie. 2020. COMET: A neural framework for MT evaluation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2685-2702, Online. Association for Computational Linguistics.
317
+ George Sazon, Hagen Soltau, David Nahamoo, and Michael Picheny. 2013. Speaker adaptation of neural network acoustic models using i-vectors. In 2013 IEEE Workshop on Automatic Speech Recognition and Understanding, Olomouc, Czech Republic, December 8-12, 2013, pages 55-59. IEEE.
318
+ Michel Simard and Philippe Langlais. 2001. Subsentential exploitation of translation memories. In Proceedings of Machine Translation Summit VIII, Santiago de Compostela, Spain.
319
+ Kai Song, Yue Zhang, Heng Yu, Weihua Luo, Kun Wang, and Min Zhang. 2019. Code-switching for enhancing NMT with pre-specified translation. 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 449-459, Minneapolis, Minnesota. Association for Computational Linguistics.
320
+ Matthias Sperber and Matthias Paulik. 2020. Speech translation and the end-to-end promise: Taking stock of where we are. In Proceedings of the 58th Annual
321
+
322
+ Meeting of the Association for Computational Linguistics, pages 7409-7421, Online. Association for Computational Linguistics.
323
+
324
+ Fred WM Stentiford and Martin G Steer. 1988. Machine translation of speech. *British Telecom technology journal*, 6(2):116-122.
325
+
326
+ Zhaopeng Tu, Yang Liu, Shuming Shi, and Tong Zhang. 2018. Learning to remember translation history with a continuous cache. Transactions of the Association for Computational Linguistics, 6:407-420.
327
+
328
+ David Vilar, Markus Freitag, Colin Cherry, Jiaming Luo, Viresh Ratnakar, and George Foster. 2023. Prompting PaLM for translation: Assessing strategies and performance. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 15406-15427, Toronto, Canada. Association for Computational Linguistics.
329
+
330
+ Alex Waibel, Ajay N Jain, Arthur E McNair, Hiroaki Saito, Alexander G Hauptmann, and Joe Tebelskis. 1991. Janus: a speech-to-speech translation system using connectionist and symbolic processing strategies. In Acoustics, speech, and signal processing, IEEE international conference on, pages 793-796. IEEE Computer Society.
331
+
332
+ Changhan Wang, Yun Tang, Xutai Ma, Anne Wu, Dmytro Okhonko, and Juan Pino. 2020. Fairseq S2T: Fast speech-to-text modeling with fairseq. In Proceedings of the 1st Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics and the 10th International Joint Conference on Natural Language Processing: System Demonstrations, pages 33-39, Suzhou, China. Association for Computational Linguistics.
333
+
334
+ Wang Weiran, Tongzhou Chen, Tara Sainath, Ehsan Variani, Rohit Prabhavalkar, W. Ronny Huang, Bhuvana Ramabhadran, Neeraj Gaur, Sepand Mavandadi, Cal Peyser, Trevor Strohman, Yanzhang He, and David Rybach. 2022. Improving Rare Word Recognition with LM-aware MWER Training. In Proc. Interspeech 2022, pages 1031-1035.
335
+
336
+ Jitao Xu, Josep Crego, and Jean Senellart. 2020. Boosting neural machine translation with similar translations. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1580-1590, Online. Association for Computational Linguistics.
337
+
338
+ Chao-Han Huck Yang, Linda Liu, Ankur Gandhe, Yile Gu, Anirudh Raju, Denis Filimonov, and Ivan Bulyko. 2021. Multi-task language modeling for improving speech recognition of rare words. In IEEE Automatic Speech Recognition and Understanding Workshop, ASRU 2021, Cartagena, Colombia, December 13-17, 2021, pages 1087-1093. IEEE.
339
+
340
+ Urchade Zaratiana, Nadi Tomeh, Pierre Holat, and Thierry Charnois. 2023. Gliner: Generalist model for named entity recognition using bidirectional transformer. CoRR, abs/2311.08526.
341
+
342
+ Huao Zhang, Qiang Wang, Bo Qin, Zelin Shi, Haibo Wang, and Ming Chen. 2023. Understanding and improving the robustness of terminology constraints in neural machine translation. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 6029-6042, Toronto, Canada. Association for Computational Linguistics.
343
+
344
+ Jingyi Zhang, Masao Utiyama, Eiichro Sumita, Graham Neubig, and Satoshi Nakamura. 2018. Guiding neural machine translation with retrieved translation pieces. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 1325-1335, New Orleans, Louisiana. Association for Computational Linguistics.
345
+
346
+ Tong Zhang, Long Zhang, Wei Ye, Bo Li, Jinan Sun, Xiaoyu Zhu, Wen Zhao, and Shikun Zhang. 2021. Point, disambiguate and copy: Incorporating bilingual dictionaries for neural machine translation. 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 3970-3979, Online. Association for Computational Linguistics.
347
+
348
+ Xianrui Zheng, Yulan Liu, Deniz Gunceler, and Daniel Willett. 2021. Using synthetic audio to improve the recognition of out-of-vocabulary words in end-to-end asr systems. In ICASSP 2021 - 2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 5674-5678.
349
+
350
+ # A Details on Masked Loss
351
+
352
+ During the training of our adapted ST model, example sentences are prepended to sentences in the reduced training set. The translation of the example sentence is used as a prefix and masked during loss calculation. The cross-entropy loss function we use for training can be expressed as Equation 1:
353
+
354
+ $$
355
+ \mathcal {L} = - \sum_ {t = 1} ^ {T} M _ {t} \log P \left(y _ {t} \mid y _ {< t}, u ^ {e}, y ^ {e}, u\right) \tag {1}
356
+ $$
357
+
358
+ With $M_{t}$ as a mask function Equation 2:
359
+
360
+ $$
361
+ M _ {t} = \left\{ \begin{array}{l l} 0 & \text {i f p o s i t i o n t i s p a r t o f y ^ {e}} \\ 1 & \text {i f p o s i t i o n t i s p a r t o f y} \end{array} \right. \tag {2}
362
+ $$
363
+
364
+ # B Details of Rare Word Types
365
+
366
+ The detailed rare word analysis results for Table 2 are in Table 9.
367
+
368
+ <table><tr><td>Rare Word Type</td><td>Frequency</td></tr><tr><td>Person</td><td>130</td></tr><tr><td>Location</td><td>72</td></tr><tr><td>Technology</td><td>29</td></tr><tr><td>Food</td><td>27</td></tr><tr><td>Company</td><td>25</td></tr><tr><td>Biology</td><td>23</td></tr><tr><td>Organization</td><td>18</td></tr><tr><td>Health</td><td>18</td></tr><tr><td>Culture</td><td>14</td></tr><tr><td>Transport</td><td>14</td></tr><tr><td>Religion</td><td>14</td></tr><tr><td>Fashion</td><td>13</td></tr><tr><td>Medicine</td><td>12</td></tr><tr><td>Science</td><td>12</td></tr><tr><td>Geography</td><td>11</td></tr><tr><td>Chemicals</td><td>11</td></tr><tr><td>Language</td><td>11</td></tr><tr><td>History</td><td>10</td></tr><tr><td>Politics</td><td>9</td></tr><tr><td>Architecture</td><td>9</td></tr><tr><td>Military</td><td>9</td></tr><tr><td>Environment</td><td>8</td></tr><tr><td>Education</td><td>7</td></tr><tr><td>Sport</td><td>7</td></tr><tr><td>Law</td><td>6</td></tr><tr><td>Society</td><td>4</td></tr><tr><td>Data</td><td>4</td></tr><tr><td>Book</td><td>4</td></tr><tr><td>Physics</td><td>4</td></tr><tr><td>Game</td><td>3</td></tr><tr><td>Economy</td><td>3</td></tr><tr><td>Literature</td><td>2</td></tr><tr><td>Art</td><td>2</td></tr><tr><td>Music</td><td>1</td></tr><tr><td>Entertainment</td><td>1</td></tr><tr><td>Award</td><td>1</td></tr></table>
369
+
370
+ Table 9: Detailed NER results on rare words in tst-rareword with the number of unique words in each category.
371
+
372
+ # C ST Training and Inference Details
373
+
374
+ # C.1 Training Details
375
+
376
+ We use the Transformer architecture S2T_transformER_S in FAIRSEQ S2T (Wang et al., 2020) For all our ST models, the encoder-decoder architecture consists of 12 transformer encoder blocks and 6 transformer decoder blocks, with a model dimension of 256 and an inner dimension (FFN) of 2,048.
377
+
378
+ We initialized the ST model from a pre-trained ASR model<sup>9</sup>. Subsequently, we fine-tuned the pretrained model for the ST task with hyperparameters following (Wang et al., 2020), specifically, we set dropout rate 0.1 and label smoothing 0.1. The ST training used a tokenizer with a vocabulary size of 8,000. To prevent the tokenizer from seeing the rare words during its training, which will cause an unfair
379
+
380
+ test condition, we train the SentencePiece (Kudo and Richardson, 2018) tokenizer on the reduced train set after the utterances containing rare words are moved to other splits as discussed in §3.1.
381
+
382
+ During the training of the adapted ST model with examples, we doubled the effective batch size to maintain a comparable loss scale since the prefix tokens do not contribute to the overall loss. Additionally, we set dropout rate to 0.2 after doing a search in $\{0.1, 0.2, 0.3\}$ based on the dev loss during the training of the adapted ST model. The training was stopped after the validation performance did not improve for 30 consecutive epochs (patience 30). For evaluation, we averaged the last 10 checkpoints.
383
+
384
+ # C.2 Inference Details
385
+
386
+ The inference uses a beam size of 5. Since the rare-word-tst dataset includes example-prepended sentences, the sentences are longer than typical translation sentences. To keep all utterances in the rare-word-tst set, we set a large allowed source size with -max-source-positions 30000. This ensures that even the longest utterances are not excluded from the rare-word-tst set.
387
+
388
+ # D Retriever Training and Inference Details
389
+
390
+ # D.1 Training Details
391
+
392
+ Our retriever is based on the DPR (Karpukhin et al., 2020) architecture, where a dense passage encoder $E_{P}$ and a question encoder $E_{Q}$ is constructed to map candidate input $c$ and query input $q$ to latent representation vectors respectively. The similarity between the candidate representation and the query representation is defined as the dot-product of their vectors as shown in Equation 3:
393
+
394
+ $$
395
+ \operatorname {s i m} (q, c) = E _ {Q} (q) ^ {T} E _ {P} (c) \tag {3}
396
+ $$
397
+
398
+ The encoders $E_{P}$ and $E_{Q}$ of DPR are initialized with SpeechT5 encoder(Ao et al., 2022) or SONAR encoder (Duquenne et al., 2023).
399
+
400
+ Speech T5 The SpeechT5 speech/text encoder transforms speech or text input into a 768-dimensional embedding vector. It comprises 12 Transformer encoder blocks, each with a model dimension of 768 and an inner feed-forward network (FFN) dimension of 3,072. Before the encoder, a speech/text-encoder pre-net preprocesses the input. The speech-encoder pre-net includes the convolutional feature extractor of wav2vec (Baevski
401
+
402
+ et al., 2020) for waveform downsampling. The text-encoder pre-net applies positional encoding to convert character-level tokenized indices into embedding vectors.
403
+
404
+ SONAR The SONAR speech/text encoder encodes speech/text input to an embedding vector of 1,024. The encoder consists of 24 transformer encoder blocks with a model dimension of 1,024 and an inner dimension (FFN) of 8,192. The speech encoder-frontend applies the wav2vec feature extractor (Baevski et al., 2020), while the text encoder-frontend uses a position encoder.
405
+
406
+ Training The dual encoders in DPR are trained on a reduced training set with prepended examples. Each sentence's example works as a positive example, while examples from other sentences in the batch serve as in-batch negatives. We set a batch size of 4 and a learning rate of 2e-5 for training.
407
+
408
+ Given the large size of the SONAR encoder, for memory efficiency, only the top layer of the encoder is trained. This approach is not only for memory efficiency but also because the lower layers likely extract low-level acoustic features, which are less relevant for our retrieval task focused on word-level information. We further investigate the retrieval accuracy under different numbers of trainable parameters. As shown in Figure 2. We use the settings with the best retrieval accuracy for our ST task. which are:
409
+
410
+ - For the speech-to-speech retriever, the top 2 layers of both speech encoders are trained, resulting in 205 million trainable parameters.
411
+ - For the speech-to-text retriever, the top 8 layers of both the text and speech encoders are trained, with 422 million trainable parameters.
412
+ - For the text-to-text retriever, the top 8 layers of both text encoders are trainable, totaling 335 million trainable parameters.
413
+
414
+ # D.2 Inference Details
415
+
416
+ During inference time, we apply the passage encoder $E_P$ to all the candidates in the rare-word pool. Given a question $q$ , we can derive its embedding $v_q = E_Q(q)$ and then retrieve the top-1 candidate whose embedding is the closest to $v_q$ from the rare-word pool.
417
+
418
+ # E Comparison to Existing Results
419
+
420
+ We confirm that our baseline model performs on par with those reported in the literature with the results in Table 10.
421
+
422
+ <table><tr><td></td><td>BLEU</td></tr><tr><td>FAIRSEQ S2T (Wang et al., 2020)</td><td>22.7</td></tr><tr><td>Our baseline model</td><td>23.6</td></tr></table>
423
+
424
+ Table 10: The performance of our baseline model on the tst-COMMON split of MuST-C is comparable to existing baselines. Both models have the identical architecture using s2T_transformFORMER_S.
425
+
426
+ source (transcript): Murali Krishna (Murali Krishna) comes from one of those villages.
427
+
428
+ baseline model (on train-reduced) (Table 3 row (1)): Moralische Christen (Moral Christians) sind aus einem dieser Dörfer.
429
+
430
+ train on {train-reduced + rare-word pool} (Table 3 row (4)): Das Marate Krishna (Marate Krishna) kommt aus einem dieser Dörfer.
431
+
432
+ speech→speech example (Table 4 row (5)): Sie arbeitet mit Leuten wie Murali Krishna. (She works with people like Murali Krishna.)
433
+
434
+ adapted + speech→speech (Table 3 row (7)): Murali Krishna (Murali Krishna) kommt aus einem dieser Dörfer.
435
+
436
+ target: Murali Krishna (Murali Krishna) kommt aus einer dieser Dörfer.
437
+
438
+ source (transcript): The McLaren (McLaren) just popped off and scratched the side panel.
439
+
440
+ baseline model (on train-reduced) (Table 3 row (1)): Und der Klien (client) stoppte ab und kratzte die Seite des Paddels.
441
+
442
+ train on {train-reduced + rare-word pool} (Table 3 row (4)): Und der Spieler (player) stürzte einfach ab und kratzte auf den Bürgersteig.
443
+
444
+ speech $\rightarrow$ speech example (Table 4 row (5)): Aber als Nebenefeftekt sammelt er Kornette. (But as a sideline, he happens to collect cornets.)
445
+
446
+ adapted + speech $\rightarrow$ speech (Table 3 row (7)): Als der Klairner (Klairner) gerade ankam, stopfte er ein Nebenpandel.
447
+
448
+ target: Der McLaren (McLaren)bekam eine Beule und einen Kratzer an der Seitenkarosserie.
449
+
450
+ Table 11: Additional examples of our retrieval-and-demonstration approach.
451
+
452
+ # F Additional Examples
453
+
454
+ Here we present two additional translation examples for comparison among the baseline model, the model trained with an additional rare-word pool, and our approach. In the first example, our approach successfully translates a zero-shot word perfectly. In the second example, we demonstrate a case where our approach does not perform well.
455
+
456
+ # G Preliminary ASR Results
457
+
458
+ To test the generalizability of our approach, we additionally ran rare word ASR experiments on the same data splits following the data construction steps in §3.1. The results are in Table 12. Here we directly used all hyperparameters for the ST
459
+
460
+ <table><tr><td>ASR Model</td><td>WER</td><td>Overall acc (%)</td><td>0-shot acc (%)</td><td>1-shot acc (%)</td></tr><tr><td>(1) baseline model (on train-reduced)</td><td>14.8</td><td>31.2</td><td>27.0</td><td>40.3</td></tr><tr><td>(2) adapted + gold example</td><td>22.0</td><td>72.1</td><td>71.4</td><td>73.8</td></tr><tr><td>(3) adapted + random example</td><td>25.3</td><td>19.8</td><td>18.6</td><td>22.4</td></tr><tr><td>(4) train on {train-reduced + rare-word pool} (more data)</td><td>13.9</td><td>42.8</td><td>38.7</td><td>51.7</td></tr><tr><td colspan="5">Using retrieved examples</td></tr><tr><td>(5) adapted + text (gold transcript)→text</td><td>28.0</td><td>46.2</td><td>45.0</td><td>48.8</td></tr><tr><td>(6) adapted + speech→text</td><td>28.1</td><td>40.1</td><td>39.3</td><td>41.7</td></tr><tr><td>(7) adapted + speech→speech</td><td>21.7</td><td>46.8</td><td>46.2</td><td>48.1</td></tr></table>
461
+
462
+ Table 12: ASR quality (WER↓) and rare word accuracy↑ (overall, 0- and 1-shot) of different models on the tst-rare-word split. The lower section uses retrieved examples from the retriever (§4.3).
463
+
464
+ models. The scores therefore may be not optimal. However, pir main findings still hold given the additional results:
465
+
466
+ 1. ASR models can also effectively learn from demonstration at inference time: Rare word recognition accuracy in line (2) vs. (1) improves from 31.2 to $72.1\%$ .
467
+ 2. Seeing rare words only in training does not sufficiently improve their recognition accuracy: Rare word accuracy does not improve as much in line (4) vs. (1) compared to (2) vs. (1).
468
+ 3. Speech $\rightarrow$ speech outperforms speech $\rightarrow$ text retrieval: In systems with retrieved examples, line (7) has the best performance.
2024/Optimizing Rare Word Accuracy in Direct Speech Translation with a Retrieval-and-Demonstration Approach/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8dbcd4034240f119f853e1e8a15e7b086aa8c7403f83c72fe197d7fdf8a76af
3
+ size 421791
2024/Optimizing Rare Word Accuracy in Direct Speech Translation with a Retrieval-and-Demonstration Approach/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Order of Magnitude Speedups for LLM Membership Inference/2328386a-6fac-4022-bdf0-487d6670e077_content_list.json ADDED
@@ -0,0 +1,1928 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Order of Magnitude Speedups for LLM Membership Inference",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 169,
8
+ 90,
9
+ 826,
10
+ 112
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Rongting Zhang*",
17
+ "bbox": [
18
+ 171,
19
+ 139,
20
+ 322,
21
+ 156
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "AWS AI",
28
+ "bbox": [
29
+ 211,
30
+ 156,
31
+ 282,
32
+ 171
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "rongtz@amazon.com",
39
+ "bbox": [
40
+ 161,
41
+ 174,
42
+ 334,
43
+ 187
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "Martin Bertran*",
50
+ "bbox": [
51
+ 423,
52
+ 139,
53
+ 569,
54
+ 155
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "AWS AI",
61
+ "bbox": [
62
+ 462,
63
+ 156,
64
+ 534,
65
+ 171
66
+ ],
67
+ "page_idx": 0
68
+ },
69
+ {
70
+ "type": "text",
71
+ "text": "maberlop@amazon.com",
72
+ "bbox": [
73
+ 400,
74
+ 174,
75
+ 596,
76
+ 187
77
+ ],
78
+ "page_idx": 0
79
+ },
80
+ {
81
+ "type": "text",
82
+ "text": "Aaron Roth",
83
+ "bbox": [
84
+ 695,
85
+ 140,
86
+ 801,
87
+ 154
88
+ ],
89
+ "page_idx": 0
90
+ },
91
+ {
92
+ "type": "text",
93
+ "text": "AWS AI",
94
+ "bbox": [
95
+ 714,
96
+ 156,
97
+ 784,
98
+ 170
99
+ ],
100
+ "page_idx": 0
101
+ },
102
+ {
103
+ "type": "text",
104
+ "text": "University of Pennsylvania",
105
+ "bbox": [
106
+ 640,
107
+ 173,
108
+ 860,
109
+ 189
110
+ ],
111
+ "page_idx": 0
112
+ },
113
+ {
114
+ "type": "text",
115
+ "text": "aaronrot@amazon.com",
116
+ "bbox": [
117
+ 652,
118
+ 191,
119
+ 847,
120
+ 204
121
+ ],
122
+ "page_idx": 0
123
+ },
124
+ {
125
+ "type": "text",
126
+ "text": "Abstract",
127
+ "text_level": 1,
128
+ "bbox": [
129
+ 260,
130
+ 260,
131
+ 339,
132
+ 275
133
+ ],
134
+ "page_idx": 0
135
+ },
136
+ {
137
+ "type": "text",
138
+ "text": "Large Language Models (LLMs) have the promise to revolutionize computing broadly, but their complexity and extensive training data also expose significant privacy vulnerabilities. One of the simplest privacy risks associated with LLMs is their susceptibility to membership inference attacks (MIAs), wherein an adversary aims to determine whether a specific data point was part of the model's training set. Although this is a known risk, state of the art methodologies for MIAs rely on training multiple computationally costly 'shadow models', making risk evaluation prohibitive for large models. Here we adapt a recent line of work which uses quantile regression to mount membership inference attacks; we extend this work by proposing a low-cost MIA that leverages an ensemble of small quantile regression models to determine if a document belongs to the model's training set or not. We demonstrate the effectiveness of this approach on fine-tuned LLMs of varying families (OPT, Pythia, Llama) and across multiple datasets. Across all scenarios we obtain comparable or improved accuracy compared to state of the art 'shadow model' approaches, with as little as $6\\%$ of their computation budget. We demonstrate increased effectiveness across multi-epoch trained target models, and architecture miss-specification robustness, that is, we can mount an effective attack against a model using a different tokenizer and architecture, without requiring knowledge on the target model.",
139
+ "bbox": [
140
+ 144,
141
+ 287,
142
+ 460,
143
+ 758
144
+ ],
145
+ "page_idx": 0
146
+ },
147
+ {
148
+ "type": "text",
149
+ "text": "1 Introduction",
150
+ "text_level": 1,
151
+ "bbox": [
152
+ 114,
153
+ 768,
154
+ 258,
155
+ 783
156
+ ],
157
+ "page_idx": 0
158
+ },
159
+ {
160
+ "type": "text",
161
+ "text": "Membership inference attacks (MIAs) and reconstruction attacks pose significant risks to the privacy of data used to fine-tune large language models (LLMs). When general purpose LLMs are used in specific applications such as automated customer",
162
+ "bbox": [
163
+ 112,
164
+ 793,
165
+ 489,
166
+ 873
167
+ ],
168
+ "page_idx": 0
169
+ },
170
+ {
171
+ "type": "text",
172
+ "text": "support, they often require fine-tuning on proprietary, domain-specific datasets to improve their performance and relevance. This process, however, can inadvertently expose sensitive information. MIAs witness this vulnerability by reliably determining whether a specific data point was part of the training dataset or not, thereby potentially revealing personal or proprietary information.",
173
+ "bbox": [
174
+ 507,
175
+ 261,
176
+ 884,
177
+ 388
178
+ ],
179
+ "page_idx": 0
180
+ },
181
+ {
182
+ "type": "text",
183
+ "text": "Membership inference attacks are used to audit the privacy of trained models, and successful external attacks can lead to breaches of confidentiality, financial loss, and erosion of user trust. Finetuning can amplify these risks, as models trained on smaller, specialized datasets are more susceptible to memorizing and revealing specific data points, and specialized datasets not found on the open internet can contain sensitive user information. Recent studies have found that credible privacy attacks can be mounted against modern LLMs (Carlini et al., 2021, 2022; Mattern et al., 2023). However, it is relatively uncommon to routinely assess fine-tuned LLMs for MIA risk, as current state of the art MIAs require the training of several 'shadow models' — models that are, ideally, identical in nature to the model under attack in terms of architecture, training data distribution, and hyperparameters (Shokri et al., 2017; Carlini et al., 2022; Sablayrolles et al., 2019; Watson et al., 2021). The result is that mounting such an attack — the building block of an audit — is substantially more expensive than training the LLM in the first place.",
184
+ "bbox": [
185
+ 507,
186
+ 391,
187
+ 884,
188
+ 759
189
+ ],
190
+ "page_idx": 0
191
+ },
192
+ {
193
+ "type": "text",
194
+ "text": "To circumvent the high computational costs of mounting a shadow-model-based attack, recent works such as (Bertran et al., 2024; Tang et al., 2024) has attempted to directly reduce the cost of hypothesis-testing style membership inference attacks by replacing shadow models with a quantile regression step that directly estimates the feature-conditional quantile of a score function from data known not to have been used in model training, where the target quantile of the score distribution",
195
+ "bbox": [
196
+ 507,
197
+ 760,
198
+ 885,
199
+ 921
200
+ ],
201
+ "page_idx": 0
202
+ },
203
+ {
204
+ "type": "page_footnote",
205
+ "text": "*These authors contributed equally to this work",
206
+ "bbox": [
207
+ 134,
208
+ 881,
209
+ 426,
210
+ 895
211
+ ],
212
+ "page_idx": 0
213
+ },
214
+ {
215
+ "type": "page_footnote",
216
+ "text": "<sup>1</sup>Our code is available at https://github.com/amazon-science/llm-qmia.",
217
+ "bbox": [
218
+ 115,
219
+ 895,
220
+ 487,
221
+ 920
222
+ ],
223
+ "page_idx": 0
224
+ },
225
+ {
226
+ "type": "page_number",
227
+ "text": "4431",
228
+ "bbox": [
229
+ 480,
230
+ 928,
231
+ 517,
232
+ 940
233
+ ],
234
+ "page_idx": 0
235
+ },
236
+ {
237
+ "type": "footer",
238
+ "text": "Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 4431-4443",
239
+ "bbox": [
240
+ 159,
241
+ 945,
242
+ 835,
243
+ 958
244
+ ],
245
+ "page_idx": 0
246
+ },
247
+ {
248
+ "type": "footer",
249
+ "text": "November 12-16, 2024 ©2024 Association for Computational Linguistics",
250
+ "bbox": [
251
+ 273,
252
+ 959,
253
+ 722,
254
+ 971
255
+ ],
256
+ "page_idx": 0
257
+ },
258
+ {
259
+ "type": "text",
260
+ "text": "directly corresponds to the false positive rate of the attack. The quantile regression approach is computationally attractive because it only requires training a single model (rather than multiple shadow models), and the architecture of the quantile regression model need not be related to (and indeed can be much simpler than) the architecture of the model under attack. Prior work has only demonstrated the effectiveness of this approach in relatively simple classification settings (Bertran et al., 2024) and for small diffusion models (Tang et al., 2024). In this paper we extend this line of quantile-regression based attacks to large language models. We briefly summarize our contributions:",
261
+ "bbox": [
262
+ 112,
263
+ 84,
264
+ 492,
265
+ 311
266
+ ],
267
+ "page_idx": 1
268
+ },
269
+ {
270
+ "type": "list",
271
+ "sub_type": "text",
272
+ "list_items": [
273
+ "- We propose the use of low-cost regression ensembles to launch MIAs against LLMs. Each model in our ensemble can be significantly smaller and therefore cheaper to train than the model under attack, and need not use the same tokenizer or belong to the same model family. To exemplify this, we use Pythia-160m (Biderman et al., 2023) and OPT-125m (Zhang et al., 2022) architectures to attack Pythia, Llama (Touvron et al., 2023), and OPT models up to 7b parameters.",
274
+ "- We investigate performance across a variety of scoring objectives and across architecture and tokenizer. Overall, we find that our results are robust to the scoring function and the chosen architecture, in contrast to shadow model based approaches which are much more sensitive to architecture choices.",
275
+ "- We demonstrate the effectiveness of our approach at launching MIAs against LLMs in the low false positive rate regime on the challenging single epoch training setting on AG News, WikiText, and XSum datasets (Zhang et al., 2015; Merity et al., 2016; Narayan et al., 2018). Our approach robustly outperforms other baselines, with as little as $6\\%$ of the compute required on the larger architectures."
276
+ ],
277
+ "bbox": [
278
+ 136,
279
+ 317,
280
+ 489,
281
+ 762
282
+ ],
283
+ "page_idx": 1
284
+ },
285
+ {
286
+ "type": "text",
287
+ "text": "2 Additional Related Work",
288
+ "text_level": 1,
289
+ "bbox": [
290
+ 112,
291
+ 790,
292
+ 366,
293
+ 806
294
+ ],
295
+ "page_idx": 1
296
+ },
297
+ {
298
+ "type": "text",
299
+ "text": "2.1 Membership Inference Attacks",
300
+ "text_level": 1,
301
+ "bbox": [
302
+ 112,
303
+ 818,
304
+ 405,
305
+ 834
306
+ ],
307
+ "page_idx": 1
308
+ },
309
+ {
310
+ "type": "text",
311
+ "text": "Membership inference aims to determine whether a sample is used in the training set of a model. Initiated by the seminal work (Homer et al., 2008), membership inference attacks are of central importance in privacy risk assessment of machine",
312
+ "bbox": [
313
+ 112,
314
+ 841,
315
+ 489,
316
+ 921
317
+ ],
318
+ "page_idx": 1
319
+ },
320
+ {
321
+ "type": "image",
322
+ "img_path": "images/7fb4e167a8b3f8a7b90fbb9345e6d8460705e25f2ed8c635e789ca8a43321940.jpg",
323
+ "image_caption": [
324
+ "Figure 1: Comparing true positive rates vs false positive rates of our method with LiRA variants and simple score-function-based methods on WikiText-103, where target model is Pythia-6.9b. LiRA* represents LiRA with fixed variance estimate. LiRA results are obtained with 4 shadow models from Pythia family of varying sizes. Results for our method are obtained with ensemble of 5 quantile regression models fine-tuned from Pythia-160m."
325
+ ],
326
+ "image_footnote": [],
327
+ "bbox": [
328
+ 517,
329
+ 84,
330
+ 873,
331
+ 272
332
+ ],
333
+ "page_idx": 1
334
+ },
335
+ {
336
+ "type": "text",
337
+ "text": "learning models since successful MIA results falsify differential privacy guarantees (Dwork et al., 2006; Dwork and Roth, 2014) and can be substantially discursive in their own right. Most membership inference attacks can be viewed as hypothesis tests defined over score functions such as training loss (Yeom et al., 2018), and are based on the premise that models tend to overfit the data they were trained on and so induce a different distribution of scores on training data as compared to identically distributed data that was not used in training.",
338
+ "bbox": [
339
+ 507,
340
+ 431,
341
+ 884,
342
+ 625
343
+ ],
344
+ "page_idx": 1
345
+ },
346
+ {
347
+ "type": "text",
348
+ "text": "Shadow-model-based methods train multiple models similar or identical to the model under attack on datasets sampled from the same distribution as the training set, so that each shadow model can be used to produce a sample from the null hypothesis that a given data point was not used in training or its corresponding alternative hypothesis; given many trained shadow models, it is then possible to fit parametric families of distributions to the null and alternative hypothesis (Shokri et al., 2017; Jayaraman et al., 2021; Carlini et al., 2022). (Carlini et al., 2022) in particular formalizes this hypothesis testing approach, and proposes to use the optimal likelihood ratio test on these fit distributions. LiRA has been shown to achieve state of the arts results in a wide variety of settings.",
349
+ "bbox": [
350
+ 507,
351
+ 627,
352
+ 882,
353
+ 885
354
+ ],
355
+ "page_idx": 1
356
+ },
357
+ {
358
+ "type": "text",
359
+ "text": "Because shadow models are designed to produce samples from the null or alternative hypothesis dis",
360
+ "bbox": [
361
+ 507,
362
+ 889,
363
+ 882,
364
+ 921
365
+ ],
366
+ "page_idx": 1
367
+ },
368
+ {
369
+ "type": "page_number",
370
+ "text": "4432",
371
+ "bbox": [
372
+ 480,
373
+ 928,
374
+ 519,
375
+ 940
376
+ ],
377
+ "page_idx": 1
378
+ },
379
+ {
380
+ "type": "text",
381
+ "text": "tributions, shadow-model-based methods require knowledge of the model architecture and training process so as to be able to replicate the entire training pipeline of the model under attack. This additionally makes training each shadow model as expensive as training the model under attack. Motivated by these limitations, Bertran et al. (2024) proposed a quantile regression based attack which reframes the hypothesis testing problem over the randomness of the training and test data, rather than over the randomness of the model training. Bertran et al. (2024) evaluate their method for classification models, and Tang et al. (2024) extends this method to attack simple diffusion models. Our work is a direct extension of this line.",
382
+ "bbox": [
383
+ 112,
384
+ 84,
385
+ 489,
386
+ 325
387
+ ],
388
+ "page_idx": 2
389
+ },
390
+ {
391
+ "type": "text",
392
+ "text": "2.2 Membership Inference on LLMs",
393
+ "text_level": 1,
394
+ "bbox": [
395
+ 112,
396
+ 335,
397
+ 416,
398
+ 350
399
+ ],
400
+ "page_idx": 2
401
+ },
402
+ {
403
+ "type": "text",
404
+ "text": "Because shadow model approaches require replicating the model training process many times, they are prohibitively expensive to mount on large language models. As a result many recent works on membership inference attacks on LLMs focus on proposing more effective scoring functions that can be applied without calibration (i.e., using marginal thresholds). Examples include local curvature of the loss by comparing samples with neighboring texts (Mattern et al., 2023), conditioned score on a subset of high perplexity tokens (Shi et al., 2024), and re-normalizing loss by compression length under zlib (Carlini et al., 2021), among others (Long et al., 2018; Watson et al., 2021). While these methods produce results with minimal computational costs, their performance lags behind those that learn a calibration function.",
405
+ "bbox": [
406
+ 112,
407
+ 356,
408
+ 489,
409
+ 629
410
+ ],
411
+ "page_idx": 2
412
+ },
413
+ {
414
+ "type": "text",
415
+ "text": "2.3 Memorization in LLMs",
416
+ "text_level": 1,
417
+ "bbox": [
418
+ 112,
419
+ 639,
420
+ 346,
421
+ 653
422
+ ],
423
+ "page_idx": 2
424
+ },
425
+ {
426
+ "type": "text",
427
+ "text": "Memorization is a related but different concern than vulnerability to membership inference, often motivated by copyright infringement. Definitions of memorization are still being actively explored. There are have been attempts to define memorization through prompting language models to regurgitate text with varying types of prefixes (Carlini et al., 2021), (Nasr et al., 2023), (Carlini et al., 2023), counterfactual notions of memorization (Zhang et al., 2023), and adversarial compression rate of text (Schwarzschild et al., 2024).",
428
+ "bbox": [
429
+ 112,
430
+ 659,
431
+ 489,
432
+ 837
433
+ ],
434
+ "page_idx": 2
435
+ },
436
+ {
437
+ "type": "text",
438
+ "text": "3 Method",
439
+ "text_level": 1,
440
+ "bbox": [
441
+ 112,
442
+ 848,
443
+ 216,
444
+ 862
445
+ ],
446
+ "page_idx": 2
447
+ },
448
+ {
449
+ "type": "text",
450
+ "text": "Here we provide a detailed description of our attack, starting with the general idea of how score-based membership inference attacks are designed,",
451
+ "bbox": [
452
+ 112,
453
+ 873,
454
+ 489,
455
+ 921
456
+ ],
457
+ "page_idx": 2
458
+ },
459
+ {
460
+ "type": "text",
461
+ "text": "and followed with a technical description of how we design our low-cost ensemble attack.",
462
+ "bbox": [
463
+ 507,
464
+ 84,
465
+ 880,
466
+ 115
467
+ ],
468
+ "page_idx": 2
469
+ },
470
+ {
471
+ "type": "text",
472
+ "text": "We follow a standard setup of membership inference attacks in which the adversary has query access to an LLM $f$ trained on an unknown dataset $D^{\\mathrm{priv}}$ in terms of log likelihoods per-token for an arbitrary input sequence, sampled from a document distribution $\\mathcal{D}$ . Each sample $x \\in D^{\\mathrm{priv}}$ consists of a document or sentence, usually split into tokens $x = \\{x_{i}\\}$ by a model-specific tokenizer. The model $f$ outputs a probability distribution of the next token $x_{i}$ conditioned on the preceding token sequence $x_{<i} = x_{1}, \\ldots, x_{i-1}$ . We let $f(x_{i} \\mid x_{<i})$ denote the likelihood of token $x_{i}$ assigned by model $f$ , conditioned on the preceding tokens. A model $f$ is usually fine-tuned on a dataset $D^{\\mathrm{priv}}$ by minimizing negative log likelihood:",
473
+ "bbox": [
474
+ 507,
475
+ 116,
476
+ 884,
477
+ 357
478
+ ],
479
+ "page_idx": 2
480
+ },
481
+ {
482
+ "type": "equation",
483
+ "text": "\n$$\n\\mathcal {L} (\\theta , D ^ {\\operatorname {p r i v}}) = \\sum_ {\\boldsymbol {x} \\in D ^ {\\operatorname {p r i v}}} \\sum_ {i \\in [ n ]} - \\log f (x _ {i} \\mid \\boldsymbol {x} _ {< i}), \\tag {1}\n$$\n",
484
+ "text_format": "latex",
485
+ "bbox": [
486
+ 519,
487
+ 368,
488
+ 882,
489
+ 404
490
+ ],
491
+ "page_idx": 2
492
+ },
493
+ {
494
+ "type": "text",
495
+ "text": "with $n$ the number of tokens in $x$ .",
496
+ "bbox": [
497
+ 507,
498
+ 413,
499
+ 759,
500
+ 426
501
+ ],
502
+ "page_idx": 2
503
+ },
504
+ {
505
+ "type": "text",
506
+ "text": "Because of this, training samples are potentially memorized, or are more likely under the model's distribution than other, similar samples that might be equally likely under the sampling distribution.",
507
+ "bbox": [
508
+ 507,
509
+ 429,
510
+ 880,
511
+ 492
512
+ ],
513
+ "page_idx": 2
514
+ },
515
+ {
516
+ "type": "text",
517
+ "text": "A membership inference attack is a hypothesis test that exploits this tendency by using a test statistic (score) derived from queries to $f$ that aims to determine whether a document $x$ is a member of the training set $D^{\\mathrm{priv}}$ or not. We cast this as distinguishing between a null and alternative hypothesis:",
518
+ "bbox": [
519
+ 507,
520
+ 493,
521
+ 882,
522
+ 589
523
+ ],
524
+ "page_idx": 2
525
+ },
526
+ {
527
+ "type": "equation",
528
+ "text": "\n$$\nH _ {0}: \\boldsymbol {x} \\sim \\mathcal {D} \\quad H _ {1}: \\boldsymbol {x} \\sim D ^ {\\mathrm {p r i v}}.\n$$\n",
529
+ "text_format": "latex",
530
+ "bbox": [
531
+ 573,
532
+ 592,
533
+ 816,
534
+ 608
535
+ ],
536
+ "page_idx": 2
537
+ },
538
+ {
539
+ "type": "text",
540
+ "text": "We restrict our attention to membership inference attacks that define a test statistic (score) $s(\\pmb{x}; f)$ . These attacks determine if this input-score pair $(s(\\pmb{x}; f), x)$ is likely under the null hypothesis, and accuse a document of being part of the private dataset if this test fails (i.e. rejects the null). We'll denote $s(\\pmb{x}; f) = s(\\pmb{x}) = s$ when clear from context. A score is any function computable given access to the model $f$ and target point $\\pmb{x}$ . The intention is to choose a score that takes systematically higher values for $\\pmb{x} \\in D^{\\mathrm{priv}}$ . Examples of such scores are discussed in 2.2; for scores that are computed per token, we take the per document score to be the token-averaged score.",
541
+ "bbox": [
542
+ 507,
543
+ 615,
544
+ 882,
545
+ 840
546
+ ],
547
+ "page_idx": 2
548
+ },
549
+ {
550
+ "type": "text",
551
+ "text": "The adversary's goal is to learn an attack function $A_f: \\mathcal{X} \\to \\{0,1\\}$ that implements the hypothesis test described above. The works discussed here follow a common thread by implementing the adversary as",
552
+ "bbox": [
553
+ 507,
554
+ 841,
555
+ 882,
556
+ 921
557
+ ],
558
+ "page_idx": 2
559
+ },
560
+ {
561
+ "type": "page_number",
562
+ "text": "4433",
563
+ "bbox": [
564
+ 480,
565
+ 927,
566
+ 519,
567
+ 940
568
+ ],
569
+ "page_idx": 2
570
+ },
571
+ {
572
+ "type": "equation",
573
+ "text": "\n$$\nA _ {f} (\\boldsymbol {x}) = \\mathbf {1} [ s (\\boldsymbol {x}) \\geq q (\\boldsymbol {x}) ], \\tag {2}\n$$\n",
574
+ "text_format": "latex",
575
+ "bbox": [
576
+ 201,
577
+ 99,
578
+ 487,
579
+ 118
580
+ ],
581
+ "page_idx": 3
582
+ },
583
+ {
584
+ "type": "text",
585
+ "text": "where the threshold $q(\\pmb{x})$ is sometimes referred to as 'difficulty calibration'. Attacks are differentiated based on their choice of score function, and their choice of threshold function. For example (Yeom et al., 2018) uses negative log likelihood as their score function, and a constant (marginal) threshold function. (Sablayrolles et al., 2019; Watson et al., 2021; Carlini et al., 2022) use shadow models (Shokri et al., 2017) to determine a suitable per-example threshold. Notably, (Carlini et al., 2022) proposes an 'offline' test that models the score distribution of a document under $H_0$ as $\\mathcal{N}(\\mu(\\pmb{x}), \\sigma(\\pmb{x})^2)$ , where the mean and variance are the empirical mean and variances of the score function computed across all shadow models that do not include $\\pmb{x}$ in their training set, the threshold function $q(\\pmb{x})$ is then computed as a quantile of the normalized score distribution $q(\\pmb{x}) = \\phi^{-1}(1 - \\alpha)\\sigma(\\pmb{x}) + \\mu(\\pmb{x})$ with $\\alpha$ a target false positive rate and $\\phi^{-1}$ the inverse CDF of a standard distribution. There are other score functions such as min-k (Shi et al., 2024), zlib entropy (Carlini et al., 2022), and neighborhood comparison attack (Mattern et al., 2023) that can be viewed as adaptive threshold methods. In this work we choose to characterize them as non-adaptive scores since this characterization enables further refinement using shadow models and quantile regression.",
586
+ "bbox": [
587
+ 112,
588
+ 124,
589
+ 490,
590
+ 592
591
+ ],
592
+ "page_idx": 3
593
+ },
594
+ {
595
+ "type": "text",
596
+ "text": "3.1 Quantile Regression",
597
+ "text_level": 1,
598
+ "bbox": [
599
+ 112,
600
+ 602,
601
+ 319,
602
+ 618
603
+ ],
604
+ "page_idx": 3
605
+ },
606
+ {
607
+ "type": "text",
608
+ "text": "The recent work of (Bertran et al., 2024) proposed to do away with shadow models by instead learning a quantile regression model to directly predict (a quantile of) the score function for public data by minimizing pinball loss for the target quantile. Here we instead build our parametric regression model as a pair of functions $\\mu : \\mathcal{X} \\to \\mathbf{R}$ , $\\sigma : \\mathcal{X} \\to \\mathbf{R}^{+}$ that respectively predict the mean and standard deviation of the score distribution under the null hypothesis. Given a dataset $D^{\\mathrm{pub}} \\sim \\mathcal{D}$ and a family of regression models $r \\in \\mathcal{R}$ we minimize either",
609
+ "bbox": [
610
+ 112,
611
+ 623,
612
+ 490,
613
+ 815
614
+ ],
615
+ "page_idx": 3
616
+ },
617
+ {
618
+ "type": "equation",
619
+ "text": "\n$$\n\\begin{array}{l} \\underset {s, \\boldsymbol {x} \\sim D ^ {\\mathrm {p u b}}} {\\mathbb {E}} [ - \\log \\mathcal {N} (s; \\mu (\\boldsymbol {x}), \\sigma^ {2} (\\boldsymbol {x})) ], (3) \\\\ \\underset {\\boldsymbol {x} \\sim D ^ {\\mathrm {p u b}}} {\\mathbb {E}} [ P B _ {\\phi (0)} (\\mu (\\boldsymbol {x}), s) + \\\\ P B _ {\\phi (1)} (\\mu (\\boldsymbol {x}) + \\sigma (\\boldsymbol {x}), s) ]. (4) \\\\ \\end{array}\n$$\n",
620
+ "text_format": "latex",
621
+ "bbox": [
622
+ 169,
623
+ 819,
624
+ 487,
625
+ 892
626
+ ],
627
+ "page_idx": 3
628
+ },
629
+ {
630
+ "type": "text",
631
+ "text": "Where in the first scenario we learn the mean and std of the distribution by minimizing negative log likelihood of a normal distribution, and on the latter we directly learn the median and $\\phi(1)$ quantile of the distribution using pinball loss; the $\\phi(1)$ quantile corresponds to a point falling below 1 standard deviation above the mean of a standard Gaussian, and thus is chosen as a natural target for a 'robust' estimate of standard deviation of the score distribution. The second objective we propose shares some of the advantages of the parametric negative log likelihood approach (only two outputs are needed to model the score distribution), but instead relies on robust quantile estimators that can be used to derive mean and standard deviation of the distribution under the Gaussian assumption.",
632
+ "bbox": [
633
+ 507,
634
+ 84,
635
+ 884,
636
+ 342
637
+ ],
638
+ "page_idx": 3
639
+ },
640
+ {
641
+ "type": "text",
642
+ "text": "In both settings, the quantile threshold is computed as $q_{1 - \\alpha}(\\pmb{x}) = \\phi^{-1}(1 - \\alpha)\\sigma(\\pmb{x}) + \\mu(\\pmb{x})$ with $\\alpha$ a target false positive rate and $\\phi^{-1}$ the inverse CDF of a standard distribution.",
643
+ "bbox": [
644
+ 507,
645
+ 346,
646
+ 882,
647
+ 411
648
+ ],
649
+ "page_idx": 3
650
+ },
651
+ {
652
+ "type": "text",
653
+ "text": "To decide which of these objectives provides a more suitable base model, we choose the one with the smallest pinball loss at the target false positive rate measured on public data, similarly to (Bertran et al., 2024). We note that this statistic can be computed without access to private data. The relative performance of these objectives varies by dataset, with both producing strong results.",
654
+ "bbox": [
655
+ 507,
656
+ 414,
657
+ 882,
658
+ 545
659
+ ],
660
+ "page_idx": 3
661
+ },
662
+ {
663
+ "type": "text",
664
+ "text": "The regressor need not have the same architecture as the model inducing the score function, in this work we opt to use an ensemble of weak learners to minimize compute costs as described next.",
665
+ "bbox": [
666
+ 507,
667
+ 550,
668
+ 882,
669
+ 614
670
+ ],
671
+ "page_idx": 3
672
+ },
673
+ {
674
+ "type": "text",
675
+ "text": "3.2 Ensemble of Quantile Regression Models",
676
+ "text_level": 1,
677
+ "bbox": [
678
+ 507,
679
+ 642,
680
+ 877,
681
+ 657
682
+ ],
683
+ "page_idx": 3
684
+ },
685
+ {
686
+ "type": "text",
687
+ "text": "The work in (Tang et al., 2024) on MIAs against diffusion models used a bootstrapping approach in which multiple small quantile regression models \"voted\" on whether to accuse a point of membership in the training set. Our preliminary experiments showed that using the entire dataset per ensemble produced better results than bootstrapping, so here we instead choose to leverage the entire public data $D^{\\mathrm{pub}}$ by using deep ensembles of (weak) learners as in (Lakshminarayanan et al., 2017). We treat each model in the ensemble as a uniformly-weighted mixture model, and compute the mean and variance of the ensemble as",
688
+ "bbox": [
689
+ 505,
690
+ 671,
691
+ 884,
692
+ 879
693
+ ],
694
+ "page_idx": 3
695
+ },
696
+ {
697
+ "type": "page_footnote",
698
+ "text": "$^2\\mathrm{PB}_{1 - \\alpha}(\\hat{y},y) = \\max \\{\\alpha (\\hat{y} -y),(1 - \\alpha)(y - \\hat{y})\\}$",
699
+ "bbox": [
700
+ 529,
701
+ 904,
702
+ 845,
703
+ 921
704
+ ],
705
+ "page_idx": 3
706
+ },
707
+ {
708
+ "type": "page_number",
709
+ "text": "4434",
710
+ "bbox": [
711
+ 480,
712
+ 927,
713
+ 519,
714
+ 940
715
+ ],
716
+ "page_idx": 3
717
+ },
718
+ {
719
+ "type": "equation",
720
+ "text": "\n$$\n\\mu_ {*} (\\boldsymbol {x}) = \\frac {1}{M} \\sum_ {m \\in [ M ]} \\mu_ {m} (\\boldsymbol {x}), \\tag {5}\n$$\n",
721
+ "text_format": "latex",
722
+ "bbox": [
723
+ 124,
724
+ 108,
725
+ 487,
726
+ 148
727
+ ],
728
+ "page_idx": 4
729
+ },
730
+ {
731
+ "type": "equation",
732
+ "text": "\n$$\n\\sigma_ {*} ^ {2} (\\boldsymbol {x}) = \\frac {1}{M} \\sum_ {m \\in [ M ]} \\sigma_ {m} ^ {2} (\\boldsymbol {x}) + \\mu_ {m} ^ {2} (\\boldsymbol {x}) - \\mu_ {*} ^ {2} (\\boldsymbol {x}). \\tag {6}\n$$\n",
733
+ "text_format": "latex",
734
+ "bbox": [
735
+ 124,
736
+ 151,
737
+ 487,
738
+ 191
739
+ ],
740
+ "page_idx": 4
741
+ },
742
+ {
743
+ "type": "text",
744
+ "text": "This methodology allows us to leverage more of the available public samples on each individual model of the ensemble, compared to a bootstrap approach, where roughly $63\\%$ of the samples are used per ensemble<sup>3</sup>. This approach averages the mean and std of the models, and then computes the appropriate quantile given these averaged parameters, as opposed to the voting approach used in (Tang et al., 2024) in which each model of the ensemble votes on the membership of a document.",
745
+ "bbox": [
746
+ 112,
747
+ 203,
748
+ 489,
749
+ 363
750
+ ],
751
+ "page_idx": 4
752
+ },
753
+ {
754
+ "type": "text",
755
+ "text": "4 Experiment Setup",
756
+ "text_level": 1,
757
+ "bbox": [
758
+ 112,
759
+ 376,
760
+ 305,
761
+ 394
762
+ ],
763
+ "page_idx": 4
764
+ },
765
+ {
766
+ "type": "text",
767
+ "text": "4.1 Datasets",
768
+ "text_level": 1,
769
+ "bbox": [
770
+ 112,
771
+ 404,
772
+ 226,
773
+ 418
774
+ ],
775
+ "page_idx": 4
776
+ },
777
+ {
778
+ "type": "text",
779
+ "text": "We conducted experiments on three public datasets across different domains: AG News (Zhang et al., 2015), WikiText-103 (Merit et al., 2016), and XSum (Narayan et al., 2018). On WikiText-103, we sampled around $22.5\\%$ of the full dataset and excluded examples that contain less than 25 characters. On XSum, we took the original article as the text samples. On each dataset, we split the data samples into two halves, where one half is used to fine-tune language models and is regarded as the private dataset. The other half is regarded as the public dataset and further split into two sets, which we name as public-train and public-test respectively. Public-train set was used to train quantile regression models for our method and shadow models for LiRA while the public-test set was used as a holdout set for testing. Membership inference attacks were evaluated on the union of private and public-test splits. Table 1 shows the split sizes and statistics on sample length for each dataset.",
780
+ "bbox": [
781
+ 112,
782
+ 425,
783
+ 489,
784
+ 747
785
+ ],
786
+ "page_idx": 4
787
+ },
788
+ {
789
+ "type": "table",
790
+ "img_path": "images/160b994619ed1a7eece0802bb851f77dbb25f886e00310b82aa85d6aa16e5a74.jpg",
791
+ "table_caption": [],
792
+ "table_footnote": [],
793
+ "table_body": "<table><tr><td rowspan=\"2\">Dataset</td><td colspan=\"3\">#Examples</td><td colspan=\"3\">Length</td></tr><tr><td>private</td><td>public-train</td><td>public-test</td><td>25%</td><td>50%</td><td>75%</td></tr><tr><td>AG News</td><td>51210</td><td>51577</td><td>11213</td><td>196</td><td>232</td><td>265</td></tr><tr><td>WikiText</td><td>101487</td><td>100846</td><td>25562</td><td>85</td><td>493</td><td>804</td></tr><tr><td>XSum</td><td>91619</td><td>92169</td><td>20257</td><td>1040</td><td>1747</td><td>2910</td></tr></table>",
794
+ "bbox": [
795
+ 126,
796
+ 759,
797
+ 475,
798
+ 831
799
+ ],
800
+ "page_idx": 4
801
+ },
802
+ {
803
+ "type": "text",
804
+ "text": "Table 1: Statistics on split size and document length of all evaluated datasets.",
805
+ "bbox": [
806
+ 112,
807
+ 840,
808
+ 487,
809
+ 869
810
+ ],
811
+ "page_idx": 4
812
+ },
813
+ {
814
+ "type": "text",
815
+ "text": "4.2 Target Language Models",
816
+ "text_level": 1,
817
+ "bbox": [
818
+ 507,
819
+ 84,
820
+ 752,
821
+ 99
822
+ ],
823
+ "page_idx": 4
824
+ },
825
+ {
826
+ "type": "text",
827
+ "text": "We considered three widely adopted families of LLMs as targets for membership inference, including Pythia (Biderman et al., 2023), OPT (Zhang et al., 2022) and Llama (Touvron et al., 2023). We fine-tuned Pythia-160m for quantile regression against Pythia models and OPT-125m against OPT and Llama models.",
828
+ "bbox": [
829
+ 507,
830
+ 105,
831
+ 885,
832
+ 217
833
+ ],
834
+ "page_idx": 4
835
+ },
836
+ {
837
+ "type": "text",
838
+ "text": "4.3 Baselines",
839
+ "text_level": 1,
840
+ "bbox": [
841
+ 507,
842
+ 231,
843
+ 628,
844
+ 244
845
+ ],
846
+ "page_idx": 4
847
+ },
848
+ {
849
+ "type": "text",
850
+ "text": "To evaluate the performance of the proposed method, we compared it with different score function baselines without difficulty calibration, including loss attack (Yeom et al., 2018), min-k% (Shi et al., 2024), zlib entropy (Carlini et al., 2021) and neighborhood comparison attack (Mattern et al., 2023). We also conducted extensive comparison against LiRA (Carlini et al., 2022) variants that use variable and fixed variance estimates.",
851
+ "bbox": [
852
+ 507,
853
+ 252,
854
+ 885,
855
+ 395
856
+ ],
857
+ "page_idx": 4
858
+ },
859
+ {
860
+ "type": "text",
861
+ "text": "4.4 Implementation Details",
862
+ "text_level": 1,
863
+ "bbox": [
864
+ 507,
865
+ 409,
866
+ 741,
867
+ 425
868
+ ],
869
+ "page_idx": 4
870
+ },
871
+ {
872
+ "type": "text",
873
+ "text": "We fine-tuned target language models on the private split of each dataset for 3 epochs with Adam with a learning rate of $5 \\times 10^{-5}$ and batch size of 64; we used HuggingFace public checkpoints as a starting point for all models. Unless otherwise noted, we report MIA results on the first epoch of training, since this represents the most challenging scenario where each sample in the private set is only seen once by the target model; and use document-level token-averaged negative log likelihood as our base scoring function. Shadow models used in LiRA experiments were trained on sampled subsets of the public-train split of each dataset with identical settings as the target language models. Quantile regression models were trained on the public-train split of the dataset for 4 epochs with Adam with a learning rate of $2 \\times 10^{-5}$ and batch size of 128. We stored snapshots of the quantile regression model at integer epochs and picked the snapshot with the best evaluation loss on a holdout set sampled from the public-train split. All experiments were conducted on a machine with 8 V100 GPUs.",
874
+ "bbox": [
875
+ 507,
876
+ 431,
877
+ 884,
878
+ 785
879
+ ],
880
+ "page_idx": 4
881
+ },
882
+ {
883
+ "type": "text",
884
+ "text": "5 Results",
885
+ "text_level": 1,
886
+ "bbox": [
887
+ 507,
888
+ 797,
889
+ 608,
890
+ 813
891
+ ],
892
+ "page_idx": 4
893
+ },
894
+ {
895
+ "type": "text",
896
+ "text": "Here we discuss our experimental results and main observations. We first show an overall performance evaluation of our method along with the baselines. We then specifically discuss scalability and cross-family performance, and compare against LiRA in this scenario. We further explore how ensemble",
897
+ "bbox": [
898
+ 507,
899
+ 825,
900
+ 885,
901
+ 921
902
+ ],
903
+ "page_idx": 4
904
+ },
905
+ {
906
+ "type": "page_footnote",
907
+ "text": "3The bootstrap method uniformly resamples a dataset $D_{m}^{\\mathrm{priv}}$ with replacement for each model in the ensemble such that $|D_{m}^{\\mathrm{priv}}| = |D^{\\mathrm{priv}}|$",
908
+ "bbox": [
909
+ 112,
910
+ 882,
911
+ 487,
912
+ 921
913
+ ],
914
+ "page_idx": 4
915
+ },
916
+ {
917
+ "type": "page_number",
918
+ "text": "4435",
919
+ "bbox": [
920
+ 480,
921
+ 927,
922
+ 519,
923
+ 940
924
+ ],
925
+ "page_idx": 4
926
+ },
927
+ {
928
+ "type": "table",
929
+ "img_path": "images/1a7d39606639ad1fd6caf3f152f1779a4cab80c1b80e45fd5049bd21a490c293.jpg",
930
+ "table_caption": [],
931
+ "table_footnote": [],
932
+ "table_body": "<table><tr><td rowspan=\"2\" colspan=\"2\">FPR Model</td><td colspan=\"6\">AG News</td><td colspan=\"7\">WikiText</td><td colspan=\"6\">XSum</td><td></td><td></td></tr><tr><td>Loss</td><td>min-k</td><td>zlib</td><td>Ne</td><td>LiRA</td><td>LiRA*</td><td>Ours</td><td>Loss</td><td>min-k</td><td>zlib</td><td>Ne</td><td>LiRA</td><td>LiRA*</td><td>Ours</td><td>Loss</td><td>min-k</td><td>zlib</td><td>Ne</td><td>LiRA</td><td>LiRA*</td><td>Ours</td></tr><tr><td rowspan=\"5\">0.1%</td><td>P-2</td><td>0.29</td><td>0.40</td><td>0.56</td><td>0.63</td><td>2.12</td><td>3.70</td><td>5.46</td><td>0.04</td><td>0.07</td><td>0.04</td><td>0.18</td><td>9.57</td><td>4.80</td><td>15.57</td><td>0.15</td><td>0.23</td><td>0.12</td><td>0.09</td><td>11.06</td><td>15.49</td><td>25.69</td></tr><tr><td>P-6</td><td>0.29</td><td>0.46</td><td>0.76</td><td>0.79</td><td>2.03</td><td>4.04</td><td>6.95</td><td>0.04</td><td>0.07</td><td>0.12</td><td>0.13</td><td>10.53</td><td>5.92</td><td>19.29</td><td>0.15</td><td>0.25</td><td>0.13</td><td>0.10</td><td>7.82</td><td>22.45</td><td>36.92</td></tr><tr><td>O-2</td><td>0.15</td><td>0.19</td><td>0.30</td><td>0.30</td><td>2.82</td><td>3.13</td><td>4.75</td><td>0.02</td><td>0.10</td><td>0.02</td><td>0.16</td><td>8.01</td><td>3.50</td><td>11.07</td><td>0.15</td><td>0.11</td><td>0.11</td><td>0.09</td><td>12.25</td><td>14.82</td><td>14.90</td></tr><tr><td>O-6</td><td>0.18</td><td>0.28</td><td>0.46</td><td>0.59</td><td>2.44</td><td>3.05</td><td>5.32</td><td>0.04</td><td>0.10</td><td>0.04</td><td>0.10</td><td>5.78</td><td>4.76</td><td>14.48</td><td>0.14</td><td>0.13</td><td>0.12</td><td>0.09</td><td>4.12</td><td>18.55</td><td>27.56</td></tr><tr><td>L-7</td><td>0.33</td><td>0.35</td><td>0.62</td><td>0.57</td><td>1.05</td><td>3.67</td><td>7.42</td><td>0.33</td><td>0.23</td><td>0.25</td><td>0.27</td><td>0.44</td><td>1.94</td><td>17.96</td><td>0.13</td><td>0.15</td><td>0.14</td><td>0.09</td><td>0.42</td><td>12.16</td><td>34.94</td></tr><tr><td rowspan=\"5\">1%</td><td>P-2</td><td>2.45</td><td>5.19</td><td>4.97</td><td>3.50</td><td>17.92</td><td>34.25</td><td>28.73</td><td>1.13</td><td>1.06</td><td>1.05</td><td>1.37</td><td>48.79</td><td>33.23</td><td>45.94</td><td>1.93</td><td>6.98</td><td>4.53</td><td>1.89</td><td>62.71</td><td>70.87</td><td>59.38</td></tr><tr><td>P-6</td><td>3.35</td><td>7.08</td><td>7.46</td><td>3.68</td><td>17.65</td><td>33.78</td><td>34.17</td><td>1.09</td><td>1.11</td><td>1.12</td><td>1.30</td><td>50.72</td><td>40.72</td><td>58.52</td><td>2.70</td><td>11.10</td><td>6.55</td><td>2.07</td><td>50.87</td><td>76.99</td><td>72.68</td></tr><tr><td>O-2</td><td>1.45</td><td>2.83</td><td>3.30</td><td>2.47</td><td>16.30</td><td>26.75</td><td>21.41</td><td>1.06</td><td>1.03</td><td>1.05</td><td>1.10</td><td>33.74</td><td>23.22</td><td>26.98</td><td>1.34</td><td>3.50</td><td>2.79</td><td>1.44</td><td>49.77</td><td>56.00</td><td>36.43</td></tr><tr><td>O-6</td><td>2.65</td><td>5.14</td><td>6.20</td><td>3.36</td><td>19.74</td><td>31.74</td><td>33.79</td><td>0.93</td><td>1.04</td><td>1.08</td><td>1.12</td><td>34.78</td><td>36.74</td><td>53.69</td><td>1.83</td><td>6.88</td><td>5.51</td><td>1.70</td><td>32.83</td><td>71.91</td><td>67.70</td></tr><tr><td>L-7</td><td>4.15</td><td>6.37</td><td>7.59</td><td>3.18</td><td>7.51</td><td>25.45</td><td>39.38</td><td>1.68</td><td>1.68</td><td>1.62</td><td>1.42</td><td>4.62</td><td>17.34</td><td>61.87</td><td>3.71</td><td>14.34</td><td>5.43</td><td>1.81</td><td>4.69</td><td>45.28</td><td>81.46</td></tr></table>",
933
+ "bbox": [
934
+ 119,
935
+ 80,
936
+ 878,
937
+ 225
938
+ ],
939
+ "page_idx": 5
940
+ },
941
+ {
942
+ "type": "text",
943
+ "text": "size affects the performance of our method. Finally we study different factors affecting the privacy risks of fine-tuned models including target model sizes and training epochs and how these impact different MIA methods. Additional experiments measuring robustness to score function selection are presented in Appendix A.",
944
+ "bbox": [
945
+ 112,
946
+ 300,
947
+ 487,
948
+ 414
949
+ ],
950
+ "page_idx": 5
951
+ },
952
+ {
953
+ "type": "text",
954
+ "text": "5.1 Comparison with Baselines",
955
+ "text_level": 1,
956
+ "bbox": [
957
+ 112,
958
+ 429,
959
+ 376,
960
+ 444
961
+ ],
962
+ "page_idx": 5
963
+ },
964
+ {
965
+ "type": "text",
966
+ "text": "Table 2 shows the performance of our proposed method and baselines on AG News, WikiText and XSum. We compute the true positive rates at $0.1\\%$ and $1\\%$ false positive rates of all methods. Due to compute limits, we trained 4 shadow models for each setting and did not train shadow models from exactly the same pretrained model for larger models. For Pythia-6.9b and OPT-6.7b, we used Pythia-2.8b and OPT-2.7b as shadow models correspondingly. For Llama-7b, we picked OPT-2.7b as the shadow model architecture as it showed better performance compared to Pythia-2.8b with LiRA methods. The results for our method were obtained using an ensemble of 5 models.",
967
+ "bbox": [
968
+ 112,
969
+ 451,
970
+ 489,
971
+ 676
972
+ ],
973
+ "page_idx": 5
974
+ },
975
+ {
976
+ "type": "text",
977
+ "text": "We observe that loss, min-k%, zlib entropy, and neighborhood comparison attacks perform poorly, especially on the more challenging WikiText dataset where there is a great variety in topic and text length among the samples. This highlights the importance of per-sample calibration in achieving high performance in low false positive regime.",
978
+ "bbox": [
979
+ 112,
980
+ 678,
981
+ 489,
982
+ 791
983
+ ],
984
+ "page_idx": 5
985
+ },
986
+ {
987
+ "type": "text",
988
+ "text": "In our experiments across all datasets, our method shows performance comparable to the two LiRA variants. It achieves the best performance among all methods at $0.1\\%$ FPR across all datasets and model families. This illustrates the effective",
989
+ "bbox": [
990
+ 112,
991
+ 791,
992
+ 489,
993
+ 872
994
+ ],
995
+ "page_idx": 5
996
+ },
997
+ {
998
+ "type": "text",
999
+ "text": "ness and robustness of our method in the low false positive rate regime. LiRA achieves strong performance at $1\\%$ FPR across datasets when target models and shadow models are derived from exactly the same pretrained model. For Pythia-6.9b and OPT-6.7b, LiRA methods are outperformed by our method on AG News and WikiText. This is likely due to the mismatch in model sizes between shadow models and target models, necessitated by LiRA's very large computational requirements. For Llama-7b, where shadow models are from a different model family, LiRA methods are outperformed by our method across all three datasets by a large margin. These results demonstrate the favorable performance of our method compared to LiRA with few shadow models especially when it is impractical to leverage shadow models that share the same architecture or size with the target model architecture due to limited compute or lack of information. The following section details the exact computation costs of each attack. Extended results on ROC curves are presented in Appendix B.",
1000
+ "bbox": [
1001
+ 505,
1002
+ 300,
1003
+ 884,
1004
+ 656
1005
+ ],
1006
+ "page_idx": 5
1007
+ },
1008
+ {
1009
+ "type": "table",
1010
+ "img_path": "images/3ae2080f57da17289a2a779cdff016ad2aad87b4ae43a362d10f8e96d9a1e269.jpg",
1011
+ "table_caption": [
1012
+ "Table 2: True positive rates (\\%) at $0.1\\%$ and $1\\%$ false positive rate (FPR) of different membership inference methods on the three datasets. P-2, P-6, O-2, O-6, L-7 correspond to Pythia-2.8b, -6.9b, OPT-2.7b, -6.7b, and Llama-7b, respectively. LiRA* represents LiRA with fixed variance. All LiRA results are obtained with 4 shadow models. The shadow models are Pythia-2.8b models for Pythia models, and OPT-2.7b models for OPT and Llama models."
1013
+ ],
1014
+ "table_footnote": [],
1015
+ "table_body": "<table><tr><td>Dataset</td><td colspan=\"2\">AG News</td><td colspan=\"2\">WikiText</td><td colspan=\"2\">XSum</td></tr><tr><td>FPR</td><td>0.1%</td><td>1%</td><td>0.1%</td><td>1%</td><td>0.1%</td><td>1%</td></tr><tr><td>Loss</td><td>0.29</td><td>3.35</td><td>0.04</td><td>1.09</td><td>0.15</td><td>2.70</td></tr><tr><td>LiRA (160m)</td><td>0.63</td><td>5.61</td><td>0.61</td><td>4.90</td><td>0.49</td><td>3.36</td></tr><tr><td>LiRA (410m)</td><td>1.30</td><td>12.57</td><td>1.64</td><td>12.37</td><td>1.06</td><td>8.73</td></tr><tr><td>LiRA (1.4b)</td><td>1.63</td><td>16.47</td><td>6.84</td><td>36.15</td><td>3.29</td><td>26.24</td></tr><tr><td>LiRA (2.8b)</td><td>2.03</td><td>17.65</td><td>10.53</td><td>50.72</td><td>7.82</td><td>50.87</td></tr><tr><td>LiRA* (160m)</td><td>4.60</td><td>25.53</td><td>3.10</td><td>32.31</td><td>11.64</td><td>39.60</td></tr><tr><td>LiRA* (410m)</td><td>4.16</td><td>32.97</td><td>5.66</td><td>41.21</td><td>18.89</td><td>63.67</td></tr><tr><td>LiRA* (1.4b)</td><td>3.43</td><td>33.50</td><td>6.77</td><td>43.28</td><td>21.43</td><td>75.06</td></tr><tr><td>LiRA* (2.8b)</td><td>4.04</td><td>33.78</td><td>5.92</td><td>40.72</td><td>22.45</td><td>76.99</td></tr><tr><td>Ours (160m)</td><td>6.95</td><td>34.17</td><td>19.29</td><td>58.52</td><td>36.92</td><td>72.68</td></tr></table>",
1016
+ "bbox": [
1017
+ 532,
1018
+ 677,
1019
+ 858,
1020
+ 837
1021
+ ],
1022
+ "page_idx": 5
1023
+ },
1024
+ {
1025
+ "type": "text",
1026
+ "text": "Table 3: True positive rates $(\\%)$ at $0.1\\%$ and $1\\%$ FPR on the three datasets; the target model is Pythia-6.9b. LiRA results are obtained with 4 shadow models from the same Pythia family with different sizes. LiRA* represents LiRA with fixed variance.",
1027
+ "bbox": [
1028
+ 507,
1029
+ 846,
1030
+ 884,
1031
+ 917
1032
+ ],
1033
+ "page_idx": 5
1034
+ },
1035
+ {
1036
+ "type": "page_footnote",
1037
+ "text": "4We note that since these shadow models are trained exclusively on public data, we use the offline LiRA version and each shadow model counts as an 'out' sample",
1038
+ "bbox": [
1039
+ 112,
1040
+ 883,
1041
+ 489,
1042
+ 921
1043
+ ],
1044
+ "page_idx": 5
1045
+ },
1046
+ {
1047
+ "type": "page_number",
1048
+ "text": "4436",
1049
+ "bbox": [
1050
+ 480,
1051
+ 928,
1052
+ 521,
1053
+ 940
1054
+ ],
1055
+ "page_idx": 5
1056
+ },
1057
+ {
1058
+ "type": "text",
1059
+ "text": "5.2 Scalability of our Attack",
1060
+ "text_level": 1,
1061
+ "bbox": [
1062
+ 112,
1063
+ 84,
1064
+ 354,
1065
+ 99
1066
+ ],
1067
+ "page_idx": 6
1068
+ },
1069
+ {
1070
+ "type": "text",
1071
+ "text": "Table 3 shows a performance comparison between our method and LiRA at different shadow and regression model sizes when the target model is Pythia-6.9b. For LiRA methods, performance generally improves with the size of shadow models, which is unsurprising since there is less difference between target and shadow models. The trend is particularly evident for LiRA with per-sample variance, while LiRA with fixed variance is more stable across different shadow model sizes. This indicates that the variance estimate in LiRA is significantly more sensitive to shadow model sizes compared to mean estimate, at least on this particular scenario. To achieve competitive results with LiRA on challenging datasets such as WikiText, it would be best to use shadow models of similar sizes as target model. In contrast, our method achieves high performance even when the size of the target model is significantly larger than the regression model. Additional analysis on performance by regression model size of our method is shown in Appendix D.",
1072
+ "bbox": [
1073
+ 112,
1074
+ 105,
1075
+ 489,
1076
+ 441
1077
+ ],
1078
+ "page_idx": 6
1079
+ },
1080
+ {
1081
+ "type": "text",
1082
+ "text": "Table 4 shows a comparison on time required to train a single model for the attacks on XSum, Pythia-160m regression models for our method and Pythia models up to 6.9b for LiRA. Our method requires only $6\\%$ of the compute time required for LiRA with 4 Pythia-2.8b shadow models and $1.5\\%$ of the time would be required if Pythia-6.9b shadow models were used.",
1083
+ "bbox": [
1084
+ 112,
1085
+ 443,
1086
+ 489,
1087
+ 570
1088
+ ],
1089
+ "page_idx": 6
1090
+ },
1091
+ {
1092
+ "type": "table",
1093
+ "img_path": "images/6aa214e6b778a3b3f66861dfc9dcd7e61b804a249fd6edd998f3eaba4104f905.jpg",
1094
+ "table_caption": [],
1095
+ "table_footnote": [],
1096
+ "table_body": "<table><tr><td>Method</td><td>Time (Hours)</td></tr><tr><td>LiRA (Pythia-160m)</td><td>0.75</td></tr><tr><td>LiRA (Pythia-410m)</td><td>1.73</td></tr><tr><td>LiRA (Pythia-1.4b)</td><td>12.94</td></tr><tr><td>LiRA (Pythia-2.8b)</td><td>13.31*</td></tr><tr><td>LiRA (Pythia-6.9b)</td><td>53.73*</td></tr><tr><td>Ours (Pythia-160m)</td><td>0.64</td></tr></table>",
1097
+ "bbox": [
1098
+ 198,
1099
+ 574,
1100
+ 405,
1101
+ 665
1102
+ ],
1103
+ "page_idx": 6
1104
+ },
1105
+ {
1106
+ "type": "text",
1107
+ "text": "5.3 Cross Family Performance",
1108
+ "text_level": 1,
1109
+ "bbox": [
1110
+ 112,
1111
+ 771,
1112
+ 371,
1113
+ 788
1114
+ ],
1115
+ "page_idx": 6
1116
+ },
1117
+ {
1118
+ "type": "text",
1119
+ "text": "In Table 5, we show a comparison of our method with LiRA on WikiText where the model family varies among target model and attacker models. In the experiments with Pythia-6.9b and OPT-6.7b as target models, we observe that both our method and LiRA performs better when the target model and shadow models are from the same model family in general. However, the performance of our method",
1120
+ "bbox": [
1121
+ 112,
1122
+ 791,
1123
+ 489,
1124
+ 921
1125
+ ],
1126
+ "page_idx": 6
1127
+ },
1128
+ {
1129
+ "type": "text",
1130
+ "text": "is less influenced by the difference in model families. In fact, our method with mismatched model families is able to outperform LiRA with matched model families in the experiments. In the experiments with Llama-7b, we observe a dramatic degradation in the performance of LiRA methods. In constraint, our method is able to achieve relative stable performance as measured by TPR at $1\\%$ FPR with different choices of model families. Nonetheless, a significant difference in TPR at $0.1\\%$ FPR is observed for our method, signifying the difficulty of maintaining competitive performance at lower false positive regime when target model architecture is not exactly known.",
1131
+ "bbox": [
1132
+ 507,
1133
+ 84,
1134
+ 884,
1135
+ 309
1136
+ ],
1137
+ "page_idx": 6
1138
+ },
1139
+ {
1140
+ "type": "table",
1141
+ "img_path": "images/113ac523ab306bf94f5a5424d8109452dbad71e59fb893a74119b93573319276.jpg",
1142
+ "table_caption": [
1143
+ "Table 4: Time required to train a single shadow model for LiRA and regression model for our method on XSum. The two largest Pythia models were trained using mixed precision $(^{*})$ . In our experiments, LiRA results were obtained with 4 shadow models while results for our method were obtained with 5-model ensembles."
1144
+ ],
1145
+ "table_footnote": [],
1146
+ "table_body": "<table><tr><td>Model</td><td colspan=\"2\">Pythia-6.9b</td><td colspan=\"2\">OPT-6.7b</td><td colspan=\"2\">Llama-7b</td></tr><tr><td>FPR</td><td>0.1%</td><td>1%</td><td>0.1%</td><td>1%</td><td>0.1%</td><td>1%</td></tr><tr><td>Loss Attack</td><td>0.04</td><td>1.09</td><td>0.04</td><td>0.93</td><td>0.33</td><td>1.68</td></tr><tr><td>LiRA (Pythia-2.8b)</td><td>10.53</td><td>50.72</td><td>4.51</td><td>24.88</td><td>0.48</td><td>4.51</td></tr><tr><td>LiRA (OPT-2.7b)</td><td>5.73</td><td>36.96</td><td>5.78</td><td>34.78</td><td>0.44</td><td>4.62</td></tr><tr><td>LiRA* (Pythia-2.8b)</td><td>5.92</td><td>40.72</td><td>3.98</td><td>20.59</td><td>1.88</td><td>12.35</td></tr><tr><td>LiRA* (OPT-2.7b)</td><td>5.91</td><td>47.09</td><td>4.76</td><td>36.74</td><td>1.94</td><td>17.34</td></tr><tr><td>Ours (Pythia-160m)</td><td>19.29</td><td>58.52</td><td>13.03</td><td>45.98</td><td>11.28</td><td>56.74</td></tr><tr><td>Ours (OPT-125m)</td><td>18.03</td><td>61.19</td><td>14.48</td><td>53.69</td><td>17.96</td><td>61.87</td></tr></table>",
1147
+ "bbox": [
1148
+ 515,
1149
+ 328,
1150
+ 875,
1151
+ 458
1152
+ ],
1153
+ "page_idx": 6
1154
+ },
1155
+ {
1156
+ "type": "text",
1157
+ "text": "Table 5: True positive rates $(\\%)$ at $0.1\\%$ and $1\\%$ FPR with different target models on the WikiText dataset. LiRA results are obtained with 4 shadow models from the Pythia and OPT families. LiRA* represents LiRA with fixed variance.",
1158
+ "bbox": [
1159
+ 507,
1160
+ 468,
1161
+ 882,
1162
+ 539
1163
+ ],
1164
+ "page_idx": 6
1165
+ },
1166
+ {
1167
+ "type": "text",
1168
+ "text": "5.4 Effect of Ensemble Size",
1169
+ "text_level": 1,
1170
+ "bbox": [
1171
+ 507,
1172
+ 571,
1173
+ 741,
1174
+ 586
1175
+ ],
1176
+ "page_idx": 6
1177
+ },
1178
+ {
1179
+ "type": "text",
1180
+ "text": "Figure 2 shows the results achieved by our method using varying ensemble configurations on three datasets, where the target model is Pythia-6.9b. We observe that performance improves when ensemble size increases in general. The variance in true positive rates from different runs of our method tends to decrease when the ensemble size increases. The performance at $1\\%$ FPR stabilizes for ensemble size 5 while there is some fluctuation at $0.1\\%$ FPR. This can be explained by the fact the threshold corresponding to $0.1\\%$ FPR is more sensitive to noise as the number of samples in consideration is less. Figure 3 shows the distribution of standard deviation of z-scores computed from different runs of our method with varying ensemble sizes. With an increased ensemble size, we observe variance in the computed z-scores from different runs reduces among the samples from the three datasets. As a result, the noise in our prediction is reduced, which leads to better performance from ensembling.",
1181
+ "bbox": [
1182
+ 507,
1183
+ 599,
1184
+ 884,
1185
+ 921
1186
+ ],
1187
+ "page_idx": 6
1188
+ },
1189
+ {
1190
+ "type": "page_number",
1191
+ "text": "4437",
1192
+ "bbox": [
1193
+ 480,
1194
+ 928,
1195
+ 519,
1196
+ 940
1197
+ ],
1198
+ "page_idx": 6
1199
+ },
1200
+ {
1201
+ "type": "image",
1202
+ "img_path": "images/6c221ef0f5d9d45e8abc3d16674d0d2394cff0750fd1557ab592ed3e4915fdb3.jpg",
1203
+ "image_caption": [
1204
+ "Figure 2: True positive rates at $0.1\\%$ and $1\\%$ FPR on the three datasets where target model is Pythia-6.9b, with varying ensemble sizes of our method. Five independent runs were executed for each setting."
1205
+ ],
1206
+ "image_footnote": [],
1207
+ "bbox": [
1208
+ 149,
1209
+ 70,
1210
+ 453,
1211
+ 303
1212
+ ],
1213
+ "page_idx": 7
1214
+ },
1215
+ {
1216
+ "type": "image",
1217
+ "img_path": "images/3d0fdbff821dc9a83c74b5167399325e0ce5153511a8d6ea94f201c89c12cd85.jpg",
1218
+ "image_caption": [
1219
+ "Figure 3: Distribution of the standard deviation of z-scores computed from five independent runs of our method with varying ensemble sizes."
1220
+ ],
1221
+ "image_footnote": [],
1222
+ "bbox": [
1223
+ 131,
1224
+ 382,
1225
+ 248,
1226
+ 469
1227
+ ],
1228
+ "page_idx": 7
1229
+ },
1230
+ {
1231
+ "type": "image",
1232
+ "img_path": "images/c9d76ce4d296a3fe5a2e530d0be8e45d4aae5c2decfb3136f5701ed14dd8aeec.jpg",
1233
+ "image_caption": [],
1234
+ "image_footnote": [],
1235
+ "bbox": [
1236
+ 260,
1237
+ 382,
1238
+ 359,
1239
+ 469
1240
+ ],
1241
+ "page_idx": 7
1242
+ },
1243
+ {
1244
+ "type": "image",
1245
+ "img_path": "images/269655ddd46b3b6f1f5287f9c7a4e79827e22d446c9ef70d31ebea48915a0e5c.jpg",
1246
+ "image_caption": [],
1247
+ "image_footnote": [],
1248
+ "bbox": [
1249
+ 366,
1250
+ 382,
1251
+ 470,
1252
+ 469
1253
+ ],
1254
+ "page_idx": 7
1255
+ },
1256
+ {
1257
+ "type": "text",
1258
+ "text": "5.5 Effect of Training Epoch and Model Size",
1259
+ "text_level": 1,
1260
+ "bbox": [
1261
+ 112,
1262
+ 537,
1263
+ 478,
1264
+ 552
1265
+ ],
1266
+ "page_idx": 7
1267
+ },
1268
+ {
1269
+ "type": "text",
1270
+ "text": "The preceding results all showed MIA performance against a single epoch of fine-tuning, since that is the harder setting to attack<sup>5</sup>. In this section, we study the how training epochs and size of target model affects privacy risk captured by different methods.",
1271
+ "bbox": [
1272
+ 112,
1273
+ 560,
1274
+ 487,
1275
+ 653
1276
+ ],
1277
+ "page_idx": 7
1278
+ },
1279
+ {
1280
+ "type": "text",
1281
+ "text": "Figure 4 shows results when the target model is OPT-6.7b with varying epochs of fine-tuning. All the methods achieve higher true positive rates when the target model is trained with more epochs, indicating an increase in the privacy risks associated. This finding is consistent with the findings in (Duan et al., 2024). While the performance of simple score-function-based methods are relatively poor on models trained for one epoch, they become more competitive when the number of epochs increases. Among the methods with per-sample calibration, our method consistently achieves better performance at $0.1\\%$ FPR and comparable performance at $1\\%$ FPR to variants of LiRA.",
1282
+ "bbox": [
1283
+ 112,
1284
+ 658,
1285
+ 489,
1286
+ 883
1287
+ ],
1288
+ "page_idx": 7
1289
+ },
1290
+ {
1291
+ "type": "image",
1292
+ "img_path": "images/e15a74f5a7868dbb1a9431857749d2565030418525a598e0ba2b483ab9fdc7e8.jpg",
1293
+ "image_caption": [],
1294
+ "image_footnote": [],
1295
+ "bbox": [
1296
+ 544,
1297
+ 70,
1298
+ 694,
1299
+ 143
1300
+ ],
1301
+ "page_idx": 7
1302
+ },
1303
+ {
1304
+ "type": "image",
1305
+ "img_path": "images/6f8abddcc7bab68b2a014e6d24c7b50ef7e5bba1ca2114eaf3b2bcddbd62c4d8.jpg",
1306
+ "image_caption": [],
1307
+ "image_footnote": [],
1308
+ "bbox": [
1309
+ 699,
1310
+ 71,
1311
+ 847,
1312
+ 142
1313
+ ],
1314
+ "page_idx": 7
1315
+ },
1316
+ {
1317
+ "type": "image",
1318
+ "img_path": "images/c8f9a5f0e8068cffd317cab86ae8bc30033c0163e6ca96ecd8dcc5ac73a72c75.jpg",
1319
+ "image_caption": [],
1320
+ "image_footnote": [],
1321
+ "bbox": [
1322
+ 544,
1323
+ 143,
1324
+ 694,
1325
+ 212
1326
+ ],
1327
+ "page_idx": 7
1328
+ },
1329
+ {
1330
+ "type": "image",
1331
+ "img_path": "images/435e62abc00eadeb36c18e4f39b72679ea0d37cbf84f3050c880b5ddbad0517c.jpg",
1332
+ "image_caption": [],
1333
+ "image_footnote": [],
1334
+ "bbox": [
1335
+ 699,
1336
+ 143,
1337
+ 847,
1338
+ 212
1339
+ ],
1340
+ "page_idx": 7
1341
+ },
1342
+ {
1343
+ "type": "image",
1344
+ "img_path": "images/724a7529313e0dcfa38e01091480142d5ec2c066cda51805fb042fb76c123ab7.jpg",
1345
+ "image_caption": [],
1346
+ "image_footnote": [],
1347
+ "bbox": [
1348
+ 544,
1349
+ 212,
1350
+ 694,
1351
+ 282
1352
+ ],
1353
+ "page_idx": 7
1354
+ },
1355
+ {
1356
+ "type": "image",
1357
+ "img_path": "images/c0efa9482cb50319c75b915dd92c69ea4cd01068fc5be0c6374578e9fc50d463.jpg",
1358
+ "image_caption": [],
1359
+ "image_footnote": [],
1360
+ "bbox": [
1361
+ 699,
1362
+ 212,
1363
+ 847,
1364
+ 290
1365
+ ],
1366
+ "page_idx": 7
1367
+ },
1368
+ {
1369
+ "type": "image",
1370
+ "img_path": "images/96836f4d92e6722d1089dd8b491749f543ea4f757f613a1434847009d2d780db.jpg",
1371
+ "image_caption": [
1372
+ "Figure 4: True positive rates at $0.1\\%$ and $1\\%$ FPR on all datasets as a function of number of epochs of the target model (OPT-6.7b). MIA risk increases for all methods with additional fine-tuning epochs of the target model."
1373
+ ],
1374
+ "image_footnote": [],
1375
+ "bbox": [
1376
+ 605,
1377
+ 292,
1378
+ 786,
1379
+ 313
1380
+ ],
1381
+ "page_idx": 7
1382
+ },
1383
+ {
1384
+ "type": "text",
1385
+ "text": "Figure 5 shows the results when using Pythia models of different sizes as the target model. For most methods, the true positive rates at both $0.1\\%$ and $1\\%$ FPR increases with target model size, which is in line with the findings on the impact of model size on memorization (Carlini et al., 2021). LiRA exhibits more fluctuation in the performance, especially at the $0.1\\%$ FPR. This is likely to due to the noise involved in the training of shadow models and mismatch in shadow model sizes for Pythia-6.9b target models. On the other hand, our method is able to consistently capture the trend and obtain better true positive rates at $0.1\\%$ FPR.",
1386
+ "bbox": [
1387
+ 507,
1388
+ 398,
1389
+ 884,
1390
+ 608
1391
+ ],
1392
+ "page_idx": 7
1393
+ },
1394
+ {
1395
+ "type": "text",
1396
+ "text": "6 Conclusion",
1397
+ "text_level": 1,
1398
+ "bbox": [
1399
+ 507,
1400
+ 619,
1401
+ 640,
1402
+ 634
1403
+ ],
1404
+ "page_idx": 7
1405
+ },
1406
+ {
1407
+ "type": "text",
1408
+ "text": "We have developed a membership inference attack methodology for large language models that is more computationally efficient than the prior state of the art by almost two orders of magnitude without sacrificing effectiveness — in all experiments the accuracy of our attack either exceeds or is comparable to that of LiRA. These efficiency improvements are especially important when MIAs are intended to be used as a routine privacy auditing procedure for large deployed models, as shadow model attacks which are several times more expensive to run than the training of the target model itself become prohibitive.",
1409
+ "bbox": [
1410
+ 505,
1411
+ 643,
1412
+ 882,
1413
+ 852
1414
+ ],
1415
+ "page_idx": 7
1416
+ },
1417
+ {
1418
+ "type": "text",
1419
+ "text": "7 Limitations",
1420
+ "text_level": 1,
1421
+ "bbox": [
1422
+ 509,
1423
+ 864,
1424
+ 645,
1425
+ 879
1426
+ ],
1427
+ "page_idx": 7
1428
+ },
1429
+ {
1430
+ "type": "text",
1431
+ "text": "As with all membership inference attacks, when using the attack we propose here as an auditing",
1432
+ "bbox": [
1433
+ 507,
1434
+ 889,
1435
+ 880,
1436
+ 921
1437
+ ],
1438
+ "page_idx": 7
1439
+ },
1440
+ {
1441
+ "type": "page_footnote",
1442
+ "text": "one could argue that fractional epoch training is single epoch training on a reduced $D^{\\mathrm{priv}}$ dataset",
1443
+ "bbox": [
1444
+ 112,
1445
+ 894,
1446
+ 485,
1447
+ 920
1448
+ ],
1449
+ "page_idx": 7
1450
+ },
1451
+ {
1452
+ "type": "page_number",
1453
+ "text": "4438",
1454
+ "bbox": [
1455
+ 480,
1456
+ 928,
1457
+ 519,
1458
+ 940
1459
+ ],
1460
+ "page_idx": 7
1461
+ },
1462
+ {
1463
+ "type": "image",
1464
+ "img_path": "images/ea3424e7ccfdcd49684356ebc6f5fc948be1f5ff135e90ced57a25039b90d543.jpg",
1465
+ "image_caption": [
1466
+ "Figure 5: True positive rates at $0.1\\%$ and $1\\%$ FPR on the three datasets where all target models Pythia models of different sizes. LiRA results obtained using shadow models of smaller sizes than target models are marked with empty circles."
1467
+ ],
1468
+ "image_footnote": [],
1469
+ "bbox": [
1470
+ 149,
1471
+ 74,
1472
+ 450,
1473
+ 318
1474
+ ],
1475
+ "page_idx": 8
1476
+ },
1477
+ {
1478
+ "type": "text",
1479
+ "text": "mechanism, it should be viewed as akin to a unit-test; susceptibility to the attack proposed here is a clear red flag, but lack of susceptibility does not provide any guarantee that the model is robust to other, yet-to-be-discovered privacy attacks. When provable guarantees are needed, techniques like differential privacy (Dwork and Roth, 2014) should be employed.",
1480
+ "bbox": [
1481
+ 112,
1482
+ 416,
1483
+ 489,
1484
+ 544
1485
+ ],
1486
+ "page_idx": 8
1487
+ },
1488
+ {
1489
+ "type": "text",
1490
+ "text": "8 Broader Impact",
1491
+ "text_level": 1,
1492
+ "bbox": [
1493
+ 112,
1494
+ 558,
1495
+ 287,
1496
+ 574
1497
+ ],
1498
+ "page_idx": 8
1499
+ },
1500
+ {
1501
+ "type": "text",
1502
+ "text": "Advancements in membership inference attacks (MIAs) for large language models (LLMs) are important for improving privacy auditing and compliance. By improving the efficiency of MIAs, our work helps auditors more routinely evaluate deployed models for privacy properties (or lack thereof). By making privacy leakage more easily measurable, we hope our work encourages privacy to become a first-order design desiderata in large-scale machine learning.",
1503
+ "bbox": [
1504
+ 112,
1505
+ 583,
1506
+ 489,
1507
+ 743
1508
+ ],
1509
+ "page_idx": 8
1510
+ },
1511
+ {
1512
+ "type": "text",
1513
+ "text": "Improved MIAs of course also increase the risk of external attacks. Thus in the short run, work on privacy attacks (including ours) can increase the privacy risk of deployed models. Nevertheless, we believe that in the long run exposing privacy risk is an essential step to mitigating it.",
1514
+ "bbox": [
1515
+ 112,
1516
+ 745,
1517
+ 487,
1518
+ 841
1519
+ ],
1520
+ "page_idx": 8
1521
+ },
1522
+ {
1523
+ "type": "text",
1524
+ "text": "References",
1525
+ "text_level": 1,
1526
+ "bbox": [
1527
+ 114,
1528
+ 870,
1529
+ 213,
1530
+ 884
1531
+ ],
1532
+ "page_idx": 8
1533
+ },
1534
+ {
1535
+ "type": "ref_text",
1536
+ "text": "Martin Bertran, Shuai Tang, Aaron Roth, Michael Kearns, Jamie H Morgenstern, and Steven Z Wu.",
1537
+ "bbox": [
1538
+ 114,
1539
+ 892,
1540
+ 487,
1541
+ 920
1542
+ ],
1543
+ "page_idx": 8
1544
+ },
1545
+ {
1546
+ "type": "list",
1547
+ "sub_type": "ref_text",
1548
+ "list_items": [
1549
+ "2024. Scalable membership inference attacks via quantile regression. Advances in Neural Information Processing Systems, 36.",
1550
+ "Stella Biderman, Hailey Schoelkopf, Quentin Gregory Anthony, Herbie Bradley, Kyle O'Brien, Eric Hallahan, Mohammad Aflah Khan, Shivanshu Purohit, USVSN Sai Prashanth, Edward Raff, et al. 2023. Pythia: A suite for analyzing large language models across training and scaling. In International Conference on Machine Learning, pages 2397-2430. PMLR.",
1551
+ "Nicholas Carlini, Steve Chien, Milad Nasr, Shuang Song, Andreas Terzis, and Florian Tramer. 2022. Membership inference attacks from first principles. In 2022 IEEE Symposium on Security and Privacy (SP), pages 1897-1914. IEEE.",
1552
+ "Nicholas Carlini, Daphne Ippolito, Matthew Jagielski, Katherine Lee, Florian Tramer, and Chiyuan Zhang. 2023. Quantifying memorization across neural language models. In The Eleventh International Conference on Learning Representations.",
1553
+ "Nicholas Carlini, Florian Tramer, Eric Wallace, Matthew Jagielski, Ariel Herbert-Voss, Katherine Lee, Adam Roberts, Tom Brown, Dawn Song, Ulfar Erlingsson, et al. 2021. Extracting training data from large language models. In 30th USENIX Security Symposium (USENIX Security 21), pages 2633-2650.",
1554
+ "Michael Duan, Anshuman Suri, Niloofar Mireshghallah, Sewon Min, Weijia Shi, Luke Zettlemoyer, Yulia Tsvetkov, Yejin Choi, David Evans, and Hannaneh Hajishirzi. 2024. Do membership inference attacks work on large language models? arXiv preprint arXiv:2402.07841.",
1555
+ "Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam Smith. 2006. Calibrating noise to sensitivity in private data analysis. In *Theory of Cryptography: Third Theory of Cryptography Conference*, TCC 2006, New York, NY, USA, March 4-7, 2006. Proceedings 3, pages 265-284. Springer.",
1556
+ "Cynthia Dwork and Aaron Roth. 2014. The algorithmic foundations of differential privacy. Foundations and Trends® in Theoretical Computer Science, 9(3-4):211-407.",
1557
+ "Nils Homer, Szabolcs Szelinger, Margot Redman, David Duggan, Waibhav Tembe, Jill Muehling, John V Pearson, Dietrich A Stephan, Stanley F Nelson, and David W Craig. 2008. Resolving individuals contributing trace amounts of dna to highly complex mixtures using high-density snp genotyping microarrays. PLoS genetics, 4(8):e1000167.",
1558
+ "Bargav Jayaraman, Lingxiao Wang, Katherine Knipmeyer, Quanquan Gu, and David Evans. 2021. Revisiting membership inference under realistic assumptions. Proceedings on Privacy Enhancing Technologies, 2021(2)."
1559
+ ],
1560
+ "bbox": [
1561
+ 509,
1562
+ 85,
1563
+ 884,
1564
+ 920
1565
+ ],
1566
+ "page_idx": 8
1567
+ },
1568
+ {
1569
+ "type": "page_number",
1570
+ "text": "4439",
1571
+ "bbox": [
1572
+ 480,
1573
+ 928,
1574
+ 519,
1575
+ 940
1576
+ ],
1577
+ "page_idx": 8
1578
+ },
1579
+ {
1580
+ "type": "list",
1581
+ "sub_type": "ref_text",
1582
+ "list_items": [
1583
+ "Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. 2017. Simple and scalable predictive uncertainty estimation using deep ensembles. Advances in neural information processing systems, 30.",
1584
+ "Yunhui Long, Vincent Bindschaedler, Lei Wang, Diyue Bu, Xiaofeng Wang, Haixu Tang, Carl A Gunter, and Kai Chen. 2018. Understanding membership inferences on well-generalized learning models. arXiv preprint arXiv:1802.04889.",
1585
+ "Justus Mattern, Fatemehsadat Mireshghallah, Zhijing Jin, Bernhard Schoelkopf, Mrinmaya Sachan, and Taylor Berg-Kirkpatrick. 2023. Membership inference attacks against language models via neighbourhood comparison. In *Findings of the Association for Computational Linguistics: ACL* 2023, pages 11330-11343, Toronto, Canada. Association for Computational Linguistics.",
1586
+ "Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. 2016. Pointer sentinel mixture models. In International Conference on Learning Representations.",
1587
+ "Shashi Narayan, Shay B Cohen, and Mirella Lapata. 2018. Don't give me the details, just the summary! topic-aware convolutional neural networks for extreme summarization. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 1797-1807.",
1588
+ "Milad Nasr, Nicholas Carlini, Jonathan Hayase, Matthew Jagielski, A Feder Cooper, Daphne Ippolito, Christopher A Choquette-Choo, Eric Wallace, Florian Tramér, and Katherine Lee. 2023. Scalable extraction of training data from (production) language models. arXiv preprint arXiv:2311.17035.",
1589
+ "Alexandre Sablayrolles, Matthijs Douze, Cordelia Schmid, Yann Ollivier, and Hervé Jégou. 2019. White-box vs black-box: Bayes optimal strategies for membership inference. In International Conference on Machine Learning, pages 5558-5567. PMLR.",
1590
+ "Avi Schwarzschild, Zhili Feng, Pratyush Maini, Zachary C Lipton, and J Zico Kolter. 2024. Rethinking llm memorization through the lens of adversarial compression. arXiv preprint arXiv:2404.15146.",
1591
+ "Weijia Shi, Anirudh Ajith, Mengzhou Xia, Yangsibo Huang, Daogao Liu, Terra Blevins, Danqi Chen, and Luke Zettlemoyer. 2024. Detecting pretraining data from large language models. In The Twelfth International Conference on Learning Representations.",
1592
+ "Reza Shokri, Marco Stronati, Congzheng Song, and Vitaly Shmatikov. 2017. Membership inference attacks against machine learning models. In 2017 IEEE symposium on security and privacy (SP), pages 3-18. IEEE."
1593
+ ],
1594
+ "bbox": [
1595
+ 115,
1596
+ 85,
1597
+ 489,
1598
+ 917
1599
+ ],
1600
+ "page_idx": 9
1601
+ },
1602
+ {
1603
+ "type": "list",
1604
+ "sub_type": "ref_text",
1605
+ "list_items": [
1606
+ "Shuai Tang, Zhiwei Steven Wu, Sergul Aydore, Michael Kearns, and Aaron Roth. 2024. Membership inference attacks on diffusion models via quantile regression. In International Conference on Machine Learning.",
1607
+ "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.",
1608
+ "Lauren Watson, Chuan Guo, Graham Cormode, and Alexandre Sablayrolles. 2021. On the importance of difficulty calibration in membership inference attacks. In International Conference on Learning Representations.",
1609
+ "Samuel Yeom, Irene Giacomelli, Matt Fredrikson, and Somesh Jha. 2018. Privacy risk in machine learning: Analyzing the connection to overfitting. In 2018 IEEE 31st computer security foundations symposium (CSF), pages 268-282. IEEE.",
1610
+ "Chiyuan Zhang, Daphne Ippolito, Katherine Lee, Matthew Jagielski, Florian Tramér, and Nicholas Carlini. 2023. Counterfactual memorization in neural language models. Advances in Neural Information Processing Systems, 36:39321-39362.",
1611
+ "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.",
1612
+ "Xiang Zhang, Junbo Zhao, and Yann LeCun. 2015. Character-level convolutional networks for text classification. Advances in neural information processing systems, 28."
1613
+ ],
1614
+ "bbox": [
1615
+ 510,
1616
+ 85,
1617
+ 882,
1618
+ 605
1619
+ ],
1620
+ "page_idx": 9
1621
+ },
1622
+ {
1623
+ "type": "page_number",
1624
+ "text": "4440",
1625
+ "bbox": [
1626
+ 480,
1627
+ 928,
1628
+ 519,
1629
+ 940
1630
+ ],
1631
+ "page_idx": 9
1632
+ },
1633
+ {
1634
+ "type": "text",
1635
+ "text": "A Comparison of Scoring Functions",
1636
+ "text_level": 1,
1637
+ "bbox": [
1638
+ 114,
1639
+ 84,
1640
+ 443,
1641
+ 99
1642
+ ],
1643
+ "page_idx": 10
1644
+ },
1645
+ {
1646
+ "type": "text",
1647
+ "text": "In previous sections, we have compared our method with baselines leveraging different scoring functions, now we explore the performance of different scoring functions when per-sample based calibration is applied. Table 6 shows a comparison of different scoring functions and their counterparts where calibration is applied through LiRA and our method. We observe that while min-k and zlib entropy typically improves over loss attack, their performance advantage is not necessarily maintained when calibrated using LiRA or our method. This can potentially be attributed to the original design intent of these scoring functions, which were designed to not require (as much) calibration, and therefore benefit less from it. For instance, uncalibrated zlib entropy performs quite differently from the base loss attack, but their calibrated performances under LiRA are near identical. Calibration using our method has the best performance in most cases, especially at lower false positive rate. Still, we noticed overall higher training losses on our regression models when using zlib entropy or min-k score as the scoring function, which may explain the worse performance with zlib entropy on XSum.",
1648
+ "bbox": [
1649
+ 115,
1650
+ 115,
1651
+ 489,
1652
+ 501
1653
+ ],
1654
+ "page_idx": 10
1655
+ },
1656
+ {
1657
+ "type": "table",
1658
+ "img_path": "images/b754635d3555dd7070c6e445c1529b115d710c2795d38468834fbf39c79c1bfa.jpg",
1659
+ "table_caption": [],
1660
+ "table_footnote": [],
1661
+ "table_body": "<table><tr><td>Dataset</td><td colspan=\"2\">AG News</td><td colspan=\"2\">WikiText</td><td colspan=\"2\">XSum</td></tr><tr><td>FPR</td><td>0.1%</td><td>1%</td><td>0.1%</td><td>1%</td><td>0.1%</td><td>1%</td></tr><tr><td>Loss</td><td>0.29</td><td>3.35</td><td>0.04</td><td>1.09</td><td>0.15</td><td>2.70</td></tr><tr><td>min-k</td><td>0.46</td><td>7.08</td><td>0.07</td><td>1.11</td><td>0.25</td><td>11.10</td></tr><tr><td>zlib</td><td>0.76</td><td>7.46</td><td>0.12</td><td>1.12</td><td>0.13</td><td>6.55</td></tr><tr><td>LiRA (loss/zlib)</td><td>2.03</td><td>17.65</td><td>10.53</td><td>50.72</td><td>7.82</td><td>50.87</td></tr><tr><td>LiRA (min-k)</td><td>1.43</td><td>16.71</td><td>9.22</td><td>44.33</td><td>8.67</td><td>47.50</td></tr><tr><td>LiRA* (loss)</td><td>4.04</td><td>33.78</td><td>5.92</td><td>40.72</td><td>22.45</td><td>76.99</td></tr><tr><td>LiRA* (min-k)</td><td>1.81</td><td>34.73</td><td>6.99</td><td>38.44</td><td>24.68</td><td>78.70</td></tr><tr><td>LiRA* (zlib)</td><td>4.49</td><td>35.46</td><td>7.04</td><td>47.16</td><td>26.09</td><td>78.40</td></tr><tr><td>Ours (loss)</td><td>6.95</td><td>34.17</td><td>19.29</td><td>58.52</td><td>36.92</td><td>72.68</td></tr><tr><td>Ours (min-k)</td><td>7.39</td><td>34.18</td><td>17.90</td><td>52.60</td><td>38.49</td><td>72.31</td></tr><tr><td>Ours (zlib)</td><td>5.73</td><td>34.84</td><td>17.35</td><td>57.59</td><td>25.93</td><td>56.05</td></tr></table>",
1662
+ "bbox": [
1663
+ 136,
1664
+ 517,
1665
+ 465,
1666
+ 684
1667
+ ],
1668
+ "page_idx": 10
1669
+ },
1670
+ {
1671
+ "type": "text",
1672
+ "text": "Table 6: True positive rates $(\\%)$ at $0.1\\%$ and $1\\%$ FPR on the three datasets where target model is Pythia-6.9b. Different scoring functions are used for LiRA and our method. LiRA results are obtained with 4 Pythia-2.8b shadow models.",
1673
+ "bbox": [
1674
+ 112,
1675
+ 695,
1676
+ 487,
1677
+ 765
1678
+ ],
1679
+ "page_idx": 10
1680
+ },
1681
+ {
1682
+ "type": "text",
1683
+ "text": "B Extended ROC Curve Results",
1684
+ "text_level": 1,
1685
+ "bbox": [
1686
+ 114,
1687
+ 791,
1688
+ 408,
1689
+ 808
1690
+ ],
1691
+ "page_idx": 10
1692
+ },
1693
+ {
1694
+ "type": "text",
1695
+ "text": "Here we show extended ROC curve results of our experiments. Figure 6 and Figure 7 show ROC curves on WikiText where target models are OPT-6.7b and Llama-7b. Figure 8 and Figure 9 show ROC curves on AG News and XSum where target models are Pythia-6.9b.",
1696
+ "bbox": [
1697
+ 112,
1698
+ 824,
1699
+ 487,
1700
+ 921
1701
+ ],
1702
+ "page_idx": 10
1703
+ },
1704
+ {
1705
+ "type": "image",
1706
+ "img_path": "images/793bd3ba05b354fe5627b958d2b5fefcdc998a1b55685afd9066940960ea979c.jpg",
1707
+ "image_caption": [
1708
+ "Figure 6: Comparing true positive rates vs false positive rates of our method with LiRA variants and marginal baselines with different scoring functions on WikiText-103 where target model is OPT-6.7b. LiRA* represents LiRA with fixed variance estimate. Results for LiRA are obtained with 4 shadow models from OPT family with varying sizes. Results for our method are obtained with ensemble of 5 quantile regression models finetuned from opt-125m."
1709
+ ],
1710
+ "image_footnote": [],
1711
+ "bbox": [
1712
+ 517,
1713
+ 85,
1714
+ 870,
1715
+ 269
1716
+ ],
1717
+ "page_idx": 10
1718
+ },
1719
+ {
1720
+ "type": "image",
1721
+ "img_path": "images/7abf5cb98215f00df940ec498f7437c299a51a57c2a7a80b0daf4c5382fe53a6.jpg",
1722
+ "image_caption": [
1723
+ "Figure 7: Comparing true positive rates vs false positive rates of our method with LiRA variants and marginal baselines with different scoring functions on WikiText-103 where target model is Llama-7b. LiRA* represents LiRA with fixed variance estimate. Results for LiRA are obtained with 4 shadow models from OPT-2.7b and Pythia-2.8b. Results for our method are obtained with ensemble of 5 quantile regression models finetuned from OPT-125m and Pythia-160m."
1724
+ ],
1725
+ "image_footnote": [],
1726
+ "bbox": [
1727
+ 517,
1728
+ 420,
1729
+ 870,
1730
+ 605
1731
+ ],
1732
+ "page_idx": 10
1733
+ },
1734
+ {
1735
+ "type": "text",
1736
+ "text": "C Varying Sizes of Regression Models",
1737
+ "text_level": 1,
1738
+ "bbox": [
1739
+ 507,
1740
+ 762,
1741
+ 853,
1742
+ 780
1743
+ ],
1744
+ "page_idx": 10
1745
+ },
1746
+ {
1747
+ "type": "text",
1748
+ "text": "Here we study how the size of quantile regression models affects the performance of our method. Table 7 shows a performance comparison of our method using Pythia models of varying sizes for regression when the target model is Pythia-6.9b. We observe an improvement of true positive rates at $0.1\\%$ and $1\\%$ FPR as regression model size increases. In our experiments, we observed lower",
1749
+ "bbox": [
1750
+ 507,
1751
+ 791,
1752
+ 882,
1753
+ 920
1754
+ ],
1755
+ "page_idx": 10
1756
+ },
1757
+ {
1758
+ "type": "page_number",
1759
+ "text": "4441",
1760
+ "bbox": [
1761
+ 480,
1762
+ 928,
1763
+ 517,
1764
+ 940
1765
+ ],
1766
+ "page_idx": 10
1767
+ },
1768
+ {
1769
+ "type": "image",
1770
+ "img_path": "images/c417017a1b68e203c7fe49b16d6dff1f8505168d5c4fe92ac5b00ee8706e46d0.jpg",
1771
+ "image_caption": [],
1772
+ "image_footnote": [],
1773
+ "bbox": [
1774
+ 122,
1775
+ 84,
1776
+ 475,
1777
+ 269
1778
+ ],
1779
+ "page_idx": 11
1780
+ },
1781
+ {
1782
+ "type": "image",
1783
+ "img_path": "images/0436be6a7c1a1b0f6047b2550900342661e4205630e6be0077a012048a8b98cc.jpg",
1784
+ "image_caption": [
1785
+ "Figure 8: Comparing true positive rates vs false positive rates of our method with LiRA variants and marginal baselines with different scoring functions on AG News where target model is Pythia-6.9b. LiRA* represents LiRA with fixed variance estimate. Results for LiRA are obtained with 4 shadow models from Pythia family with varying sizes. Results for our method are obtained with ensemble of 5 quantile regression models finetuned from Pythia-160m.",
1786
+ "Figure 9: Comparing true positive rates vs false positive rates of our method with LiRA variants and marginal baselines with different scoring functions on XSum where target model is Pythia-6.9b. LiRA* represents LiRA with fixed variance estimate. Results for LiRA are obtained with 4 shadow models from Pythia family with varying sizes. Results for our method are obtained with ensemble of 5 quantile regression models finetuned from Pythia-160m."
1787
+ ],
1788
+ "image_footnote": [],
1789
+ "bbox": [
1790
+ 122,
1791
+ 417,
1792
+ 475,
1793
+ 602
1794
+ ],
1795
+ "page_idx": 11
1796
+ },
1797
+ {
1798
+ "type": "text",
1799
+ "text": "regression loss when training with larger models, which may explain the improvement in performance.",
1800
+ "bbox": [
1801
+ 112,
1802
+ 756,
1803
+ 489,
1804
+ 802
1805
+ ],
1806
+ "page_idx": 11
1807
+ },
1808
+ {
1809
+ "type": "text",
1810
+ "text": "D Varying Sizes of Regression Models",
1811
+ "text_level": 1,
1812
+ "bbox": [
1813
+ 112,
1814
+ 815,
1815
+ 457,
1816
+ 832
1817
+ ],
1818
+ "page_idx": 11
1819
+ },
1820
+ {
1821
+ "type": "text",
1822
+ "text": "Here we study how the size of quantile regression models affects the performance of our method. Table 7 shows a performance comparison of our method using Pythia models of varying sizes for regression when the target model is Pythia-6.9b.",
1823
+ "bbox": [
1824
+ 112,
1825
+ 841,
1826
+ 489,
1827
+ 921
1828
+ ],
1829
+ "page_idx": 11
1830
+ },
1831
+ {
1832
+ "type": "table",
1833
+ "img_path": "images/512189952e3c538f5ac814e71b4358c389cc0a881f976ade79f4728a833b2f07.jpg",
1834
+ "table_caption": [],
1835
+ "table_footnote": [],
1836
+ "table_body": "<table><tr><td>Dataset</td><td colspan=\"2\">AG News</td><td colspan=\"2\">WikiText</td><td colspan=\"2\">XSum</td></tr><tr><td>FPR</td><td>0.1%</td><td>1%</td><td>0.1%</td><td>1%</td><td>0.1%</td><td>1%</td></tr><tr><td>Loss</td><td>0.29</td><td>3.35</td><td>0.04</td><td>1.09</td><td>0.15</td><td>2.70</td></tr><tr><td>LiRA (2.8b)</td><td>2.03</td><td>17.65</td><td>10.53</td><td>50.72</td><td>7.82</td><td>50.87</td></tr><tr><td>LiRA* (2.8b)</td><td>4.04</td><td>33.78</td><td>5.92</td><td>40.72</td><td>22.45</td><td>76.99</td></tr><tr><td>Ours (70m)</td><td>5.74</td><td>30.54</td><td>11.48</td><td>49.24</td><td>30.30</td><td>65.12</td></tr><tr><td>Ours (160m)</td><td>6.95</td><td>34.17</td><td>19.29</td><td>58.52</td><td>36.92</td><td>72.68</td></tr><tr><td>Ours (410m)</td><td>7.84</td><td>40.59</td><td>22.00</td><td>63.89</td><td>40.38</td><td>78.24</td></tr></table>",
1837
+ "bbox": [
1838
+ 536,
1839
+ 80,
1840
+ 857,
1841
+ 195
1842
+ ],
1843
+ "page_idx": 11
1844
+ },
1845
+ {
1846
+ "type": "text",
1847
+ "text": "Table 7: True positive rates (\\%) at $0.1\\%$ and $1\\%$ false positive rates on the three datasets; the target model is Pythia-6.9b. LiRA results are obtained with 4 shadow models. LiRA* represents LiRA with fixed variance. Results for our method are obtained using ensembles of 5 models from finetuning Pythia models of different sizes.",
1848
+ "bbox": [
1849
+ 507,
1850
+ 204,
1851
+ 882,
1852
+ 303
1853
+ ],
1854
+ "page_idx": 11
1855
+ },
1856
+ {
1857
+ "type": "text",
1858
+ "text": "We observe an improvement of true positive rates at $0.1\\%$ and $1\\%$ FPR as regression model size increases. In our experiments, we observed lower regression loss when training with larger models, which may explain the improvement in performance.",
1859
+ "bbox": [
1860
+ 507,
1861
+ 330,
1862
+ 882,
1863
+ 425
1864
+ ],
1865
+ "page_idx": 11
1866
+ },
1867
+ {
1868
+ "type": "text",
1869
+ "text": "E Extended Comparison with LiRA Using Increased Number of Shadow Models",
1870
+ "text_level": 1,
1871
+ "bbox": [
1872
+ 507,
1873
+ 437,
1874
+ 855,
1875
+ 486
1876
+ ],
1877
+ "page_idx": 11
1878
+ },
1879
+ {
1880
+ "type": "text",
1881
+ "text": "Here we present extended comparison with LiRA variants using increased number of shadow models. Table 8 shows a comparison of our method with LiRA on WikiText where the model family varies among target model and attacker models. We observe improved performance of LiRA with variable variance with the increased shadow models. Our method is able to achieve competitive results with a fraction of the time required for preparing the attacker models and consistently outperforms LiRA when the target model is Llama-7b.",
1882
+ "bbox": [
1883
+ 507,
1884
+ 497,
1885
+ 882,
1886
+ 674
1887
+ ],
1888
+ "page_idx": 11
1889
+ },
1890
+ {
1891
+ "type": "page_number",
1892
+ "text": "4442",
1893
+ "bbox": [
1894
+ 480,
1895
+ 928,
1896
+ 519,
1897
+ 940
1898
+ ],
1899
+ "page_idx": 11
1900
+ },
1901
+ {
1902
+ "type": "table",
1903
+ "img_path": "images/e6604c4bbb5ecc3c8d956311cd8f2c03698636a95adb4ae7c95df2f2c3689e96.jpg",
1904
+ "table_caption": [],
1905
+ "table_footnote": [
1906
+ "Table 8: True positive rates $(\\%)$ at $0.1\\%$ and $1\\%$ FPR with different target models on the WikiText dataset along with the total time to prepare the shadow models or regression models. P-2.8b, -160m, -410m and O-2.7b, -125m, -350m correspond to Pythia-2.8b, -160m, -410m and OPT-2.7b, -125m, -350m, respectively. LiRA results are obtained with 8 shadow models from the Pythia and OPT families. LiRA* represents LiRA with fixed variance. Results for our method are obtained using ensembles of 5 regression models."
1907
+ ],
1908
+ "table_body": "<table><tr><td>Model</td><td colspan=\"2\">Pythia-6.9b</td><td colspan=\"2\">OPT-6.7b</td><td colspan=\"2\">Llama-7b</td><td rowspan=\"2\">Time (hrs)</td></tr><tr><td>FPR</td><td>0.1%</td><td>1%</td><td>0.1%</td><td>1%</td><td>0.1%</td><td>1%</td></tr><tr><td>Loss Attack</td><td>0.04</td><td>1.09</td><td>0.04</td><td>0.93</td><td>0.33</td><td>1.68</td><td>-</td></tr><tr><td>LiRA (P-2.8b n=8)</td><td>28.93</td><td>72.32</td><td>15.25</td><td>51.78</td><td>1.83</td><td>11.46</td><td>110.0</td></tr><tr><td>LiRA (O-2.7b n=8)</td><td>13.38</td><td>55.31</td><td>15.46</td><td>61.43</td><td>1.18</td><td>9.51</td><td>116.8</td></tr><tr><td>LiRA* (P-2.8b n=8)</td><td>5.77</td><td>42.08</td><td>4.13</td><td>21.66</td><td>2.14</td><td>12.57</td><td>110.0</td></tr><tr><td>LiRA* (O-2.7b n=8)</td><td>5.56</td><td>46.27</td><td>4.27</td><td>37.42</td><td>2.01</td><td>17.42</td><td>116.8</td></tr><tr><td>Ours (P-160m)</td><td>19.29</td><td>58.52</td><td>13.03</td><td>45.98</td><td>11.28</td><td>56.74</td><td>3.4</td></tr><tr><td>Ours (O-125m)</td><td>18.03</td><td>61.19</td><td>14.48</td><td>53.69</td><td>17.96</td><td>61.87</td><td>3.4</td></tr><tr><td>Ours (P-410m)</td><td>22.00</td><td>63.89</td><td>13.92</td><td>54.31</td><td>18.95</td><td>61.84</td><td>11.4</td></tr><tr><td>Ours (O-350m)</td><td>22.55</td><td>66.74</td><td>14.84</td><td>56.95</td><td>17.00</td><td>63.74</td><td>11.4</td></tr></table>",
1909
+ "bbox": [
1910
+ 119,
1911
+ 355,
1912
+ 482,
1913
+ 502
1914
+ ],
1915
+ "page_idx": 12
1916
+ },
1917
+ {
1918
+ "type": "page_number",
1919
+ "text": "4443",
1920
+ "bbox": [
1921
+ 480,
1922
+ 928,
1923
+ 519,
1924
+ 940
1925
+ ],
1926
+ "page_idx": 12
1927
+ }
1928
+ ]
2024/Order of Magnitude Speedups for LLM Membership Inference/2328386a-6fac-4022-bdf0-487d6670e077_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Order of Magnitude Speedups for LLM Membership Inference/2328386a-6fac-4022-bdf0-487d6670e077_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2dcce5fab9898d033f69501174f2a69d868524b2ff1782cfd4a70784a32a109f
3
+ size 986891
2024/Order of Magnitude Speedups for LLM Membership Inference/full.md ADDED
@@ -0,0 +1,332 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Order of Magnitude Speedups for LLM Membership Inference
2
+
3
+ Rongting Zhang*
4
+
5
+ AWS AI
6
+
7
+ rongtz@amazon.com
8
+
9
+ Martin Bertran*
10
+
11
+ AWS AI
12
+
13
+ maberlop@amazon.com
14
+
15
+ Aaron Roth
16
+
17
+ AWS AI
18
+
19
+ University of Pennsylvania
20
+
21
+ aaronrot@amazon.com
22
+
23
+ # Abstract
24
+
25
+ Large Language Models (LLMs) have the promise to revolutionize computing broadly, but their complexity and extensive training data also expose significant privacy vulnerabilities. One of the simplest privacy risks associated with LLMs is their susceptibility to membership inference attacks (MIAs), wherein an adversary aims to determine whether a specific data point was part of the model's training set. Although this is a known risk, state of the art methodologies for MIAs rely on training multiple computationally costly 'shadow models', making risk evaluation prohibitive for large models. Here we adapt a recent line of work which uses quantile regression to mount membership inference attacks; we extend this work by proposing a low-cost MIA that leverages an ensemble of small quantile regression models to determine if a document belongs to the model's training set or not. We demonstrate the effectiveness of this approach on fine-tuned LLMs of varying families (OPT, Pythia, Llama) and across multiple datasets. Across all scenarios we obtain comparable or improved accuracy compared to state of the art 'shadow model' approaches, with as little as $6\%$ of their computation budget. We demonstrate increased effectiveness across multi-epoch trained target models, and architecture miss-specification robustness, that is, we can mount an effective attack against a model using a different tokenizer and architecture, without requiring knowledge on the target model.
26
+
27
+ # 1 Introduction
28
+
29
+ Membership inference attacks (MIAs) and reconstruction attacks pose significant risks to the privacy of data used to fine-tune large language models (LLMs). When general purpose LLMs are used in specific applications such as automated customer
30
+
31
+ support, they often require fine-tuning on proprietary, domain-specific datasets to improve their performance and relevance. This process, however, can inadvertently expose sensitive information. MIAs witness this vulnerability by reliably determining whether a specific data point was part of the training dataset or not, thereby potentially revealing personal or proprietary information.
32
+
33
+ Membership inference attacks are used to audit the privacy of trained models, and successful external attacks can lead to breaches of confidentiality, financial loss, and erosion of user trust. Finetuning can amplify these risks, as models trained on smaller, specialized datasets are more susceptible to memorizing and revealing specific data points, and specialized datasets not found on the open internet can contain sensitive user information. Recent studies have found that credible privacy attacks can be mounted against modern LLMs (Carlini et al., 2021, 2022; Mattern et al., 2023). However, it is relatively uncommon to routinely assess fine-tuned LLMs for MIA risk, as current state of the art MIAs require the training of several 'shadow models' — models that are, ideally, identical in nature to the model under attack in terms of architecture, training data distribution, and hyperparameters (Shokri et al., 2017; Carlini et al., 2022; Sablayrolles et al., 2019; Watson et al., 2021). The result is that mounting such an attack — the building block of an audit — is substantially more expensive than training the LLM in the first place.
34
+
35
+ To circumvent the high computational costs of mounting a shadow-model-based attack, recent works such as (Bertran et al., 2024; Tang et al., 2024) has attempted to directly reduce the cost of hypothesis-testing style membership inference attacks by replacing shadow models with a quantile regression step that directly estimates the feature-conditional quantile of a score function from data known not to have been used in model training, where the target quantile of the score distribution
36
+
37
+ directly corresponds to the false positive rate of the attack. The quantile regression approach is computationally attractive because it only requires training a single model (rather than multiple shadow models), and the architecture of the quantile regression model need not be related to (and indeed can be much simpler than) the architecture of the model under attack. Prior work has only demonstrated the effectiveness of this approach in relatively simple classification settings (Bertran et al., 2024) and for small diffusion models (Tang et al., 2024). In this paper we extend this line of quantile-regression based attacks to large language models. We briefly summarize our contributions:
38
+
39
+ - We propose the use of low-cost regression ensembles to launch MIAs against LLMs. Each model in our ensemble can be significantly smaller and therefore cheaper to train than the model under attack, and need not use the same tokenizer or belong to the same model family. To exemplify this, we use Pythia-160m (Biderman et al., 2023) and OPT-125m (Zhang et al., 2022) architectures to attack Pythia, Llama (Touvron et al., 2023), and OPT models up to 7b parameters.
40
+ - We investigate performance across a variety of scoring objectives and across architecture and tokenizer. Overall, we find that our results are robust to the scoring function and the chosen architecture, in contrast to shadow model based approaches which are much more sensitive to architecture choices.
41
+ - We demonstrate the effectiveness of our approach at launching MIAs against LLMs in the low false positive rate regime on the challenging single epoch training setting on AG News, WikiText, and XSum datasets (Zhang et al., 2015; Merity et al., 2016; Narayan et al., 2018). Our approach robustly outperforms other baselines, with as little as $6\%$ of the compute required on the larger architectures.
42
+
43
+ # 2 Additional Related Work
44
+
45
+ # 2.1 Membership Inference Attacks
46
+
47
+ Membership inference aims to determine whether a sample is used in the training set of a model. Initiated by the seminal work (Homer et al., 2008), membership inference attacks are of central importance in privacy risk assessment of machine
48
+
49
+ ![](images/7fb4e167a8b3f8a7b90fbb9345e6d8460705e25f2ed8c635e789ca8a43321940.jpg)
50
+ Figure 1: Comparing true positive rates vs false positive rates of our method with LiRA variants and simple score-function-based methods on WikiText-103, where target model is Pythia-6.9b. LiRA* represents LiRA with fixed variance estimate. LiRA results are obtained with 4 shadow models from Pythia family of varying sizes. Results for our method are obtained with ensemble of 5 quantile regression models fine-tuned from Pythia-160m.
51
+
52
+ learning models since successful MIA results falsify differential privacy guarantees (Dwork et al., 2006; Dwork and Roth, 2014) and can be substantially discursive in their own right. Most membership inference attacks can be viewed as hypothesis tests defined over score functions such as training loss (Yeom et al., 2018), and are based on the premise that models tend to overfit the data they were trained on and so induce a different distribution of scores on training data as compared to identically distributed data that was not used in training.
53
+
54
+ Shadow-model-based methods train multiple models similar or identical to the model under attack on datasets sampled from the same distribution as the training set, so that each shadow model can be used to produce a sample from the null hypothesis that a given data point was not used in training or its corresponding alternative hypothesis; given many trained shadow models, it is then possible to fit parametric families of distributions to the null and alternative hypothesis (Shokri et al., 2017; Jayaraman et al., 2021; Carlini et al., 2022). (Carlini et al., 2022) in particular formalizes this hypothesis testing approach, and proposes to use the optimal likelihood ratio test on these fit distributions. LiRA has been shown to achieve state of the arts results in a wide variety of settings.
55
+
56
+ Because shadow models are designed to produce samples from the null or alternative hypothesis dis
57
+
58
+ tributions, shadow-model-based methods require knowledge of the model architecture and training process so as to be able to replicate the entire training pipeline of the model under attack. This additionally makes training each shadow model as expensive as training the model under attack. Motivated by these limitations, Bertran et al. (2024) proposed a quantile regression based attack which reframes the hypothesis testing problem over the randomness of the training and test data, rather than over the randomness of the model training. Bertran et al. (2024) evaluate their method for classification models, and Tang et al. (2024) extends this method to attack simple diffusion models. Our work is a direct extension of this line.
59
+
60
+ # 2.2 Membership Inference on LLMs
61
+
62
+ Because shadow model approaches require replicating the model training process many times, they are prohibitively expensive to mount on large language models. As a result many recent works on membership inference attacks on LLMs focus on proposing more effective scoring functions that can be applied without calibration (i.e., using marginal thresholds). Examples include local curvature of the loss by comparing samples with neighboring texts (Mattern et al., 2023), conditioned score on a subset of high perplexity tokens (Shi et al., 2024), and re-normalizing loss by compression length under zlib (Carlini et al., 2021), among others (Long et al., 2018; Watson et al., 2021). While these methods produce results with minimal computational costs, their performance lags behind those that learn a calibration function.
63
+
64
+ # 2.3 Memorization in LLMs
65
+
66
+ Memorization is a related but different concern than vulnerability to membership inference, often motivated by copyright infringement. Definitions of memorization are still being actively explored. There are have been attempts to define memorization through prompting language models to regurgitate text with varying types of prefixes (Carlini et al., 2021), (Nasr et al., 2023), (Carlini et al., 2023), counterfactual notions of memorization (Zhang et al., 2023), and adversarial compression rate of text (Schwarzschild et al., 2024).
67
+
68
+ # 3 Method
69
+
70
+ Here we provide a detailed description of our attack, starting with the general idea of how score-based membership inference attacks are designed,
71
+
72
+ and followed with a technical description of how we design our low-cost ensemble attack.
73
+
74
+ We follow a standard setup of membership inference attacks in which the adversary has query access to an LLM $f$ trained on an unknown dataset $D^{\mathrm{priv}}$ in terms of log likelihoods per-token for an arbitrary input sequence, sampled from a document distribution $\mathcal{D}$ . Each sample $x \in D^{\mathrm{priv}}$ consists of a document or sentence, usually split into tokens $x = \{x_{i}\}$ by a model-specific tokenizer. The model $f$ outputs a probability distribution of the next token $x_{i}$ conditioned on the preceding token sequence $x_{<i} = x_{1}, \ldots, x_{i-1}$ . We let $f(x_{i} \mid x_{<i})$ denote the likelihood of token $x_{i}$ assigned by model $f$ , conditioned on the preceding tokens. A model $f$ is usually fine-tuned on a dataset $D^{\mathrm{priv}}$ by minimizing negative log likelihood:
75
+
76
+ $$
77
+ \mathcal {L} (\theta , D ^ {\operatorname {p r i v}}) = \sum_ {\boldsymbol {x} \in D ^ {\operatorname {p r i v}}} \sum_ {i \in [ n ]} - \log f (x _ {i} \mid \boldsymbol {x} _ {< i}), \tag {1}
78
+ $$
79
+
80
+ with $n$ the number of tokens in $x$ .
81
+
82
+ Because of this, training samples are potentially memorized, or are more likely under the model's distribution than other, similar samples that might be equally likely under the sampling distribution.
83
+
84
+ A membership inference attack is a hypothesis test that exploits this tendency by using a test statistic (score) derived from queries to $f$ that aims to determine whether a document $x$ is a member of the training set $D^{\mathrm{priv}}$ or not. We cast this as distinguishing between a null and alternative hypothesis:
85
+
86
+ $$
87
+ H _ {0}: \boldsymbol {x} \sim \mathcal {D} \quad H _ {1}: \boldsymbol {x} \sim D ^ {\mathrm {p r i v}}.
88
+ $$
89
+
90
+ We restrict our attention to membership inference attacks that define a test statistic (score) $s(\pmb{x}; f)$ . These attacks determine if this input-score pair $(s(\pmb{x}; f), x)$ is likely under the null hypothesis, and accuse a document of being part of the private dataset if this test fails (i.e. rejects the null). We'll denote $s(\pmb{x}; f) = s(\pmb{x}) = s$ when clear from context. A score is any function computable given access to the model $f$ and target point $\pmb{x}$ . The intention is to choose a score that takes systematically higher values for $\pmb{x} \in D^{\mathrm{priv}}$ . Examples of such scores are discussed in 2.2; for scores that are computed per token, we take the per document score to be the token-averaged score.
91
+
92
+ The adversary's goal is to learn an attack function $A_f: \mathcal{X} \to \{0,1\}$ that implements the hypothesis test described above. The works discussed here follow a common thread by implementing the adversary as
93
+
94
+ $$
95
+ A _ {f} (\boldsymbol {x}) = \mathbf {1} [ s (\boldsymbol {x}) \geq q (\boldsymbol {x}) ], \tag {2}
96
+ $$
97
+
98
+ where the threshold $q(\pmb{x})$ is sometimes referred to as 'difficulty calibration'. Attacks are differentiated based on their choice of score function, and their choice of threshold function. For example (Yeom et al., 2018) uses negative log likelihood as their score function, and a constant (marginal) threshold function. (Sablayrolles et al., 2019; Watson et al., 2021; Carlini et al., 2022) use shadow models (Shokri et al., 2017) to determine a suitable per-example threshold. Notably, (Carlini et al., 2022) proposes an 'offline' test that models the score distribution of a document under $H_0$ as $\mathcal{N}(\mu(\pmb{x}), \sigma(\pmb{x})^2)$ , where the mean and variance are the empirical mean and variances of the score function computed across all shadow models that do not include $\pmb{x}$ in their training set, the threshold function $q(\pmb{x})$ is then computed as a quantile of the normalized score distribution $q(\pmb{x}) = \phi^{-1}(1 - \alpha)\sigma(\pmb{x}) + \mu(\pmb{x})$ with $\alpha$ a target false positive rate and $\phi^{-1}$ the inverse CDF of a standard distribution. There are other score functions such as min-k (Shi et al., 2024), zlib entropy (Carlini et al., 2022), and neighborhood comparison attack (Mattern et al., 2023) that can be viewed as adaptive threshold methods. In this work we choose to characterize them as non-adaptive scores since this characterization enables further refinement using shadow models and quantile regression.
99
+
100
+ # 3.1 Quantile Regression
101
+
102
+ The recent work of (Bertran et al., 2024) proposed to do away with shadow models by instead learning a quantile regression model to directly predict (a quantile of) the score function for public data by minimizing pinball loss for the target quantile. Here we instead build our parametric regression model as a pair of functions $\mu : \mathcal{X} \to \mathbf{R}$ , $\sigma : \mathcal{X} \to \mathbf{R}^{+}$ that respectively predict the mean and standard deviation of the score distribution under the null hypothesis. Given a dataset $D^{\mathrm{pub}} \sim \mathcal{D}$ and a family of regression models $r \in \mathcal{R}$ we minimize either
103
+
104
+ $$
105
+ \begin{array}{l} \underset {s, \boldsymbol {x} \sim D ^ {\mathrm {p u b}}} {\mathbb {E}} [ - \log \mathcal {N} (s; \mu (\boldsymbol {x}), \sigma^ {2} (\boldsymbol {x})) ], (3) \\ \underset {\boldsymbol {x} \sim D ^ {\mathrm {p u b}}} {\mathbb {E}} [ P B _ {\phi (0)} (\mu (\boldsymbol {x}), s) + \\ P B _ {\phi (1)} (\mu (\boldsymbol {x}) + \sigma (\boldsymbol {x}), s) ]. (4) \\ \end{array}
106
+ $$
107
+
108
+ Where in the first scenario we learn the mean and std of the distribution by minimizing negative log likelihood of a normal distribution, and on the latter we directly learn the median and $\phi(1)$ quantile of the distribution using pinball loss; the $\phi(1)$ quantile corresponds to a point falling below 1 standard deviation above the mean of a standard Gaussian, and thus is chosen as a natural target for a 'robust' estimate of standard deviation of the score distribution. The second objective we propose shares some of the advantages of the parametric negative log likelihood approach (only two outputs are needed to model the score distribution), but instead relies on robust quantile estimators that can be used to derive mean and standard deviation of the distribution under the Gaussian assumption.
109
+
110
+ In both settings, the quantile threshold is computed as $q_{1 - \alpha}(\pmb{x}) = \phi^{-1}(1 - \alpha)\sigma(\pmb{x}) + \mu(\pmb{x})$ with $\alpha$ a target false positive rate and $\phi^{-1}$ the inverse CDF of a standard distribution.
111
+
112
+ To decide which of these objectives provides a more suitable base model, we choose the one with the smallest pinball loss at the target false positive rate measured on public data, similarly to (Bertran et al., 2024). We note that this statistic can be computed without access to private data. The relative performance of these objectives varies by dataset, with both producing strong results.
113
+
114
+ The regressor need not have the same architecture as the model inducing the score function, in this work we opt to use an ensemble of weak learners to minimize compute costs as described next.
115
+
116
+ # 3.2 Ensemble of Quantile Regression Models
117
+
118
+ The work in (Tang et al., 2024) on MIAs against diffusion models used a bootstrapping approach in which multiple small quantile regression models "voted" on whether to accuse a point of membership in the training set. Our preliminary experiments showed that using the entire dataset per ensemble produced better results than bootstrapping, so here we instead choose to leverage the entire public data $D^{\mathrm{pub}}$ by using deep ensembles of (weak) learners as in (Lakshminarayanan et al., 2017). We treat each model in the ensemble as a uniformly-weighted mixture model, and compute the mean and variance of the ensemble as
119
+
120
+ $$
121
+ \mu_ {*} (\boldsymbol {x}) = \frac {1}{M} \sum_ {m \in [ M ]} \mu_ {m} (\boldsymbol {x}), \tag {5}
122
+ $$
123
+
124
+ $$
125
+ \sigma_ {*} ^ {2} (\boldsymbol {x}) = \frac {1}{M} \sum_ {m \in [ M ]} \sigma_ {m} ^ {2} (\boldsymbol {x}) + \mu_ {m} ^ {2} (\boldsymbol {x}) - \mu_ {*} ^ {2} (\boldsymbol {x}). \tag {6}
126
+ $$
127
+
128
+ This methodology allows us to leverage more of the available public samples on each individual model of the ensemble, compared to a bootstrap approach, where roughly $63\%$ of the samples are used per ensemble<sup>3</sup>. This approach averages the mean and std of the models, and then computes the appropriate quantile given these averaged parameters, as opposed to the voting approach used in (Tang et al., 2024) in which each model of the ensemble votes on the membership of a document.
129
+
130
+ # 4 Experiment Setup
131
+
132
+ # 4.1 Datasets
133
+
134
+ We conducted experiments on three public datasets across different domains: AG News (Zhang et al., 2015), WikiText-103 (Merit et al., 2016), and XSum (Narayan et al., 2018). On WikiText-103, we sampled around $22.5\%$ of the full dataset and excluded examples that contain less than 25 characters. On XSum, we took the original article as the text samples. On each dataset, we split the data samples into two halves, where one half is used to fine-tune language models and is regarded as the private dataset. The other half is regarded as the public dataset and further split into two sets, which we name as public-train and public-test respectively. Public-train set was used to train quantile regression models for our method and shadow models for LiRA while the public-test set was used as a holdout set for testing. Membership inference attacks were evaluated on the union of private and public-test splits. Table 1 shows the split sizes and statistics on sample length for each dataset.
135
+
136
+ <table><tr><td rowspan="2">Dataset</td><td colspan="3">#Examples</td><td colspan="3">Length</td></tr><tr><td>private</td><td>public-train</td><td>public-test</td><td>25%</td><td>50%</td><td>75%</td></tr><tr><td>AG News</td><td>51210</td><td>51577</td><td>11213</td><td>196</td><td>232</td><td>265</td></tr><tr><td>WikiText</td><td>101487</td><td>100846</td><td>25562</td><td>85</td><td>493</td><td>804</td></tr><tr><td>XSum</td><td>91619</td><td>92169</td><td>20257</td><td>1040</td><td>1747</td><td>2910</td></tr></table>
137
+
138
+ Table 1: Statistics on split size and document length of all evaluated datasets.
139
+
140
+ # 4.2 Target Language Models
141
+
142
+ We considered three widely adopted families of LLMs as targets for membership inference, including Pythia (Biderman et al., 2023), OPT (Zhang et al., 2022) and Llama (Touvron et al., 2023). We fine-tuned Pythia-160m for quantile regression against Pythia models and OPT-125m against OPT and Llama models.
143
+
144
+ # 4.3 Baselines
145
+
146
+ To evaluate the performance of the proposed method, we compared it with different score function baselines without difficulty calibration, including loss attack (Yeom et al., 2018), min-k% (Shi et al., 2024), zlib entropy (Carlini et al., 2021) and neighborhood comparison attack (Mattern et al., 2023). We also conducted extensive comparison against LiRA (Carlini et al., 2022) variants that use variable and fixed variance estimates.
147
+
148
+ # 4.4 Implementation Details
149
+
150
+ We fine-tuned target language models on the private split of each dataset for 3 epochs with Adam with a learning rate of $5 \times 10^{-5}$ and batch size of 64; we used HuggingFace public checkpoints as a starting point for all models. Unless otherwise noted, we report MIA results on the first epoch of training, since this represents the most challenging scenario where each sample in the private set is only seen once by the target model; and use document-level token-averaged negative log likelihood as our base scoring function. Shadow models used in LiRA experiments were trained on sampled subsets of the public-train split of each dataset with identical settings as the target language models. Quantile regression models were trained on the public-train split of the dataset for 4 epochs with Adam with a learning rate of $2 \times 10^{-5}$ and batch size of 128. We stored snapshots of the quantile regression model at integer epochs and picked the snapshot with the best evaluation loss on a holdout set sampled from the public-train split. All experiments were conducted on a machine with 8 V100 GPUs.
151
+
152
+ # 5 Results
153
+
154
+ Here we discuss our experimental results and main observations. We first show an overall performance evaluation of our method along with the baselines. We then specifically discuss scalability and cross-family performance, and compare against LiRA in this scenario. We further explore how ensemble
155
+
156
+ <table><tr><td rowspan="2" colspan="2">FPR Model</td><td colspan="6">AG News</td><td colspan="7">WikiText</td><td colspan="6">XSum</td><td></td><td></td></tr><tr><td>Loss</td><td>min-k</td><td>zlib</td><td>Ne</td><td>LiRA</td><td>LiRA*</td><td>Ours</td><td>Loss</td><td>min-k</td><td>zlib</td><td>Ne</td><td>LiRA</td><td>LiRA*</td><td>Ours</td><td>Loss</td><td>min-k</td><td>zlib</td><td>Ne</td><td>LiRA</td><td>LiRA*</td><td>Ours</td></tr><tr><td rowspan="5">0.1%</td><td>P-2</td><td>0.29</td><td>0.40</td><td>0.56</td><td>0.63</td><td>2.12</td><td>3.70</td><td>5.46</td><td>0.04</td><td>0.07</td><td>0.04</td><td>0.18</td><td>9.57</td><td>4.80</td><td>15.57</td><td>0.15</td><td>0.23</td><td>0.12</td><td>0.09</td><td>11.06</td><td>15.49</td><td>25.69</td></tr><tr><td>P-6</td><td>0.29</td><td>0.46</td><td>0.76</td><td>0.79</td><td>2.03</td><td>4.04</td><td>6.95</td><td>0.04</td><td>0.07</td><td>0.12</td><td>0.13</td><td>10.53</td><td>5.92</td><td>19.29</td><td>0.15</td><td>0.25</td><td>0.13</td><td>0.10</td><td>7.82</td><td>22.45</td><td>36.92</td></tr><tr><td>O-2</td><td>0.15</td><td>0.19</td><td>0.30</td><td>0.30</td><td>2.82</td><td>3.13</td><td>4.75</td><td>0.02</td><td>0.10</td><td>0.02</td><td>0.16</td><td>8.01</td><td>3.50</td><td>11.07</td><td>0.15</td><td>0.11</td><td>0.11</td><td>0.09</td><td>12.25</td><td>14.82</td><td>14.90</td></tr><tr><td>O-6</td><td>0.18</td><td>0.28</td><td>0.46</td><td>0.59</td><td>2.44</td><td>3.05</td><td>5.32</td><td>0.04</td><td>0.10</td><td>0.04</td><td>0.10</td><td>5.78</td><td>4.76</td><td>14.48</td><td>0.14</td><td>0.13</td><td>0.12</td><td>0.09</td><td>4.12</td><td>18.55</td><td>27.56</td></tr><tr><td>L-7</td><td>0.33</td><td>0.35</td><td>0.62</td><td>0.57</td><td>1.05</td><td>3.67</td><td>7.42</td><td>0.33</td><td>0.23</td><td>0.25</td><td>0.27</td><td>0.44</td><td>1.94</td><td>17.96</td><td>0.13</td><td>0.15</td><td>0.14</td><td>0.09</td><td>0.42</td><td>12.16</td><td>34.94</td></tr><tr><td rowspan="5">1%</td><td>P-2</td><td>2.45</td><td>5.19</td><td>4.97</td><td>3.50</td><td>17.92</td><td>34.25</td><td>28.73</td><td>1.13</td><td>1.06</td><td>1.05</td><td>1.37</td><td>48.79</td><td>33.23</td><td>45.94</td><td>1.93</td><td>6.98</td><td>4.53</td><td>1.89</td><td>62.71</td><td>70.87</td><td>59.38</td></tr><tr><td>P-6</td><td>3.35</td><td>7.08</td><td>7.46</td><td>3.68</td><td>17.65</td><td>33.78</td><td>34.17</td><td>1.09</td><td>1.11</td><td>1.12</td><td>1.30</td><td>50.72</td><td>40.72</td><td>58.52</td><td>2.70</td><td>11.10</td><td>6.55</td><td>2.07</td><td>50.87</td><td>76.99</td><td>72.68</td></tr><tr><td>O-2</td><td>1.45</td><td>2.83</td><td>3.30</td><td>2.47</td><td>16.30</td><td>26.75</td><td>21.41</td><td>1.06</td><td>1.03</td><td>1.05</td><td>1.10</td><td>33.74</td><td>23.22</td><td>26.98</td><td>1.34</td><td>3.50</td><td>2.79</td><td>1.44</td><td>49.77</td><td>56.00</td><td>36.43</td></tr><tr><td>O-6</td><td>2.65</td><td>5.14</td><td>6.20</td><td>3.36</td><td>19.74</td><td>31.74</td><td>33.79</td><td>0.93</td><td>1.04</td><td>1.08</td><td>1.12</td><td>34.78</td><td>36.74</td><td>53.69</td><td>1.83</td><td>6.88</td><td>5.51</td><td>1.70</td><td>32.83</td><td>71.91</td><td>67.70</td></tr><tr><td>L-7</td><td>4.15</td><td>6.37</td><td>7.59</td><td>3.18</td><td>7.51</td><td>25.45</td><td>39.38</td><td>1.68</td><td>1.68</td><td>1.62</td><td>1.42</td><td>4.62</td><td>17.34</td><td>61.87</td><td>3.71</td><td>14.34</td><td>5.43</td><td>1.81</td><td>4.69</td><td>45.28</td><td>81.46</td></tr></table>
157
+
158
+ size affects the performance of our method. Finally we study different factors affecting the privacy risks of fine-tuned models including target model sizes and training epochs and how these impact different MIA methods. Additional experiments measuring robustness to score function selection are presented in Appendix A.
159
+
160
+ # 5.1 Comparison with Baselines
161
+
162
+ Table 2 shows the performance of our proposed method and baselines on AG News, WikiText and XSum. We compute the true positive rates at $0.1\%$ and $1\%$ false positive rates of all methods. Due to compute limits, we trained 4 shadow models for each setting and did not train shadow models from exactly the same pretrained model for larger models. For Pythia-6.9b and OPT-6.7b, we used Pythia-2.8b and OPT-2.7b as shadow models correspondingly. For Llama-7b, we picked OPT-2.7b as the shadow model architecture as it showed better performance compared to Pythia-2.8b with LiRA methods. The results for our method were obtained using an ensemble of 5 models.
163
+
164
+ We observe that loss, min-k%, zlib entropy, and neighborhood comparison attacks perform poorly, especially on the more challenging WikiText dataset where there is a great variety in topic and text length among the samples. This highlights the importance of per-sample calibration in achieving high performance in low false positive regime.
165
+
166
+ In our experiments across all datasets, our method shows performance comparable to the two LiRA variants. It achieves the best performance among all methods at $0.1\%$ FPR across all datasets and model families. This illustrates the effective
167
+
168
+ ness and robustness of our method in the low false positive rate regime. LiRA achieves strong performance at $1\%$ FPR across datasets when target models and shadow models are derived from exactly the same pretrained model. For Pythia-6.9b and OPT-6.7b, LiRA methods are outperformed by our method on AG News and WikiText. This is likely due to the mismatch in model sizes between shadow models and target models, necessitated by LiRA's very large computational requirements. For Llama-7b, where shadow models are from a different model family, LiRA methods are outperformed by our method across all three datasets by a large margin. These results demonstrate the favorable performance of our method compared to LiRA with few shadow models especially when it is impractical to leverage shadow models that share the same architecture or size with the target model architecture due to limited compute or lack of information. The following section details the exact computation costs of each attack. Extended results on ROC curves are presented in Appendix B.
169
+
170
+ Table 2: True positive rates (\%) at $0.1\%$ and $1\%$ false positive rate (FPR) of different membership inference methods on the three datasets. P-2, P-6, O-2, O-6, L-7 correspond to Pythia-2.8b, -6.9b, OPT-2.7b, -6.7b, and Llama-7b, respectively. LiRA* represents LiRA with fixed variance. All LiRA results are obtained with 4 shadow models. The shadow models are Pythia-2.8b models for Pythia models, and OPT-2.7b models for OPT and Llama models.
171
+
172
+ <table><tr><td>Dataset</td><td colspan="2">AG News</td><td colspan="2">WikiText</td><td colspan="2">XSum</td></tr><tr><td>FPR</td><td>0.1%</td><td>1%</td><td>0.1%</td><td>1%</td><td>0.1%</td><td>1%</td></tr><tr><td>Loss</td><td>0.29</td><td>3.35</td><td>0.04</td><td>1.09</td><td>0.15</td><td>2.70</td></tr><tr><td>LiRA (160m)</td><td>0.63</td><td>5.61</td><td>0.61</td><td>4.90</td><td>0.49</td><td>3.36</td></tr><tr><td>LiRA (410m)</td><td>1.30</td><td>12.57</td><td>1.64</td><td>12.37</td><td>1.06</td><td>8.73</td></tr><tr><td>LiRA (1.4b)</td><td>1.63</td><td>16.47</td><td>6.84</td><td>36.15</td><td>3.29</td><td>26.24</td></tr><tr><td>LiRA (2.8b)</td><td>2.03</td><td>17.65</td><td>10.53</td><td>50.72</td><td>7.82</td><td>50.87</td></tr><tr><td>LiRA* (160m)</td><td>4.60</td><td>25.53</td><td>3.10</td><td>32.31</td><td>11.64</td><td>39.60</td></tr><tr><td>LiRA* (410m)</td><td>4.16</td><td>32.97</td><td>5.66</td><td>41.21</td><td>18.89</td><td>63.67</td></tr><tr><td>LiRA* (1.4b)</td><td>3.43</td><td>33.50</td><td>6.77</td><td>43.28</td><td>21.43</td><td>75.06</td></tr><tr><td>LiRA* (2.8b)</td><td>4.04</td><td>33.78</td><td>5.92</td><td>40.72</td><td>22.45</td><td>76.99</td></tr><tr><td>Ours (160m)</td><td>6.95</td><td>34.17</td><td>19.29</td><td>58.52</td><td>36.92</td><td>72.68</td></tr></table>
173
+
174
+ Table 3: True positive rates $(\%)$ at $0.1\%$ and $1\%$ FPR on the three datasets; the target model is Pythia-6.9b. LiRA results are obtained with 4 shadow models from the same Pythia family with different sizes. LiRA* represents LiRA with fixed variance.
175
+
176
+ # 5.2 Scalability of our Attack
177
+
178
+ Table 3 shows a performance comparison between our method and LiRA at different shadow and regression model sizes when the target model is Pythia-6.9b. For LiRA methods, performance generally improves with the size of shadow models, which is unsurprising since there is less difference between target and shadow models. The trend is particularly evident for LiRA with per-sample variance, while LiRA with fixed variance is more stable across different shadow model sizes. This indicates that the variance estimate in LiRA is significantly more sensitive to shadow model sizes compared to mean estimate, at least on this particular scenario. To achieve competitive results with LiRA on challenging datasets such as WikiText, it would be best to use shadow models of similar sizes as target model. In contrast, our method achieves high performance even when the size of the target model is significantly larger than the regression model. Additional analysis on performance by regression model size of our method is shown in Appendix D.
179
+
180
+ Table 4 shows a comparison on time required to train a single model for the attacks on XSum, Pythia-160m regression models for our method and Pythia models up to 6.9b for LiRA. Our method requires only $6\%$ of the compute time required for LiRA with 4 Pythia-2.8b shadow models and $1.5\%$ of the time would be required if Pythia-6.9b shadow models were used.
181
+
182
+ <table><tr><td>Method</td><td>Time (Hours)</td></tr><tr><td>LiRA (Pythia-160m)</td><td>0.75</td></tr><tr><td>LiRA (Pythia-410m)</td><td>1.73</td></tr><tr><td>LiRA (Pythia-1.4b)</td><td>12.94</td></tr><tr><td>LiRA (Pythia-2.8b)</td><td>13.31*</td></tr><tr><td>LiRA (Pythia-6.9b)</td><td>53.73*</td></tr><tr><td>Ours (Pythia-160m)</td><td>0.64</td></tr></table>
183
+
184
+ # 5.3 Cross Family Performance
185
+
186
+ In Table 5, we show a comparison of our method with LiRA on WikiText where the model family varies among target model and attacker models. In the experiments with Pythia-6.9b and OPT-6.7b as target models, we observe that both our method and LiRA performs better when the target model and shadow models are from the same model family in general. However, the performance of our method
187
+
188
+ is less influenced by the difference in model families. In fact, our method with mismatched model families is able to outperform LiRA with matched model families in the experiments. In the experiments with Llama-7b, we observe a dramatic degradation in the performance of LiRA methods. In constraint, our method is able to achieve relative stable performance as measured by TPR at $1\%$ FPR with different choices of model families. Nonetheless, a significant difference in TPR at $0.1\%$ FPR is observed for our method, signifying the difficulty of maintaining competitive performance at lower false positive regime when target model architecture is not exactly known.
189
+
190
+ Table 4: Time required to train a single shadow model for LiRA and regression model for our method on XSum. The two largest Pythia models were trained using mixed precision $(^{*})$ . In our experiments, LiRA results were obtained with 4 shadow models while results for our method were obtained with 5-model ensembles.
191
+
192
+ <table><tr><td>Model</td><td colspan="2">Pythia-6.9b</td><td colspan="2">OPT-6.7b</td><td colspan="2">Llama-7b</td></tr><tr><td>FPR</td><td>0.1%</td><td>1%</td><td>0.1%</td><td>1%</td><td>0.1%</td><td>1%</td></tr><tr><td>Loss Attack</td><td>0.04</td><td>1.09</td><td>0.04</td><td>0.93</td><td>0.33</td><td>1.68</td></tr><tr><td>LiRA (Pythia-2.8b)</td><td>10.53</td><td>50.72</td><td>4.51</td><td>24.88</td><td>0.48</td><td>4.51</td></tr><tr><td>LiRA (OPT-2.7b)</td><td>5.73</td><td>36.96</td><td>5.78</td><td>34.78</td><td>0.44</td><td>4.62</td></tr><tr><td>LiRA* (Pythia-2.8b)</td><td>5.92</td><td>40.72</td><td>3.98</td><td>20.59</td><td>1.88</td><td>12.35</td></tr><tr><td>LiRA* (OPT-2.7b)</td><td>5.91</td><td>47.09</td><td>4.76</td><td>36.74</td><td>1.94</td><td>17.34</td></tr><tr><td>Ours (Pythia-160m)</td><td>19.29</td><td>58.52</td><td>13.03</td><td>45.98</td><td>11.28</td><td>56.74</td></tr><tr><td>Ours (OPT-125m)</td><td>18.03</td><td>61.19</td><td>14.48</td><td>53.69</td><td>17.96</td><td>61.87</td></tr></table>
193
+
194
+ Table 5: True positive rates $(\%)$ at $0.1\%$ and $1\%$ FPR with different target models on the WikiText dataset. LiRA results are obtained with 4 shadow models from the Pythia and OPT families. LiRA* represents LiRA with fixed variance.
195
+
196
+ # 5.4 Effect of Ensemble Size
197
+
198
+ Figure 2 shows the results achieved by our method using varying ensemble configurations on three datasets, where the target model is Pythia-6.9b. We observe that performance improves when ensemble size increases in general. The variance in true positive rates from different runs of our method tends to decrease when the ensemble size increases. The performance at $1\%$ FPR stabilizes for ensemble size 5 while there is some fluctuation at $0.1\%$ FPR. This can be explained by the fact the threshold corresponding to $0.1\%$ FPR is more sensitive to noise as the number of samples in consideration is less. Figure 3 shows the distribution of standard deviation of z-scores computed from different runs of our method with varying ensemble sizes. With an increased ensemble size, we observe variance in the computed z-scores from different runs reduces among the samples from the three datasets. As a result, the noise in our prediction is reduced, which leads to better performance from ensembling.
199
+
200
+ ![](images/6c221ef0f5d9d45e8abc3d16674d0d2394cff0750fd1557ab592ed3e4915fdb3.jpg)
201
+ Figure 2: True positive rates at $0.1\%$ and $1\%$ FPR on the three datasets where target model is Pythia-6.9b, with varying ensemble sizes of our method. Five independent runs were executed for each setting.
202
+
203
+ ![](images/3d0fdbff821dc9a83c74b5167399325e0ce5153511a8d6ea94f201c89c12cd85.jpg)
204
+ Figure 3: Distribution of the standard deviation of z-scores computed from five independent runs of our method with varying ensemble sizes.
205
+
206
+ ![](images/c9d76ce4d296a3fe5a2e530d0be8e45d4aae5c2decfb3136f5701ed14dd8aeec.jpg)
207
+
208
+ ![](images/269655ddd46b3b6f1f5287f9c7a4e79827e22d446c9ef70d31ebea48915a0e5c.jpg)
209
+
210
+ # 5.5 Effect of Training Epoch and Model Size
211
+
212
+ The preceding results all showed MIA performance against a single epoch of fine-tuning, since that is the harder setting to attack<sup>5</sup>. In this section, we study the how training epochs and size of target model affects privacy risk captured by different methods.
213
+
214
+ Figure 4 shows results when the target model is OPT-6.7b with varying epochs of fine-tuning. All the methods achieve higher true positive rates when the target model is trained with more epochs, indicating an increase in the privacy risks associated. This finding is consistent with the findings in (Duan et al., 2024). While the performance of simple score-function-based methods are relatively poor on models trained for one epoch, they become more competitive when the number of epochs increases. Among the methods with per-sample calibration, our method consistently achieves better performance at $0.1\%$ FPR and comparable performance at $1\%$ FPR to variants of LiRA.
215
+
216
+ ![](images/e15a74f5a7868dbb1a9431857749d2565030418525a598e0ba2b483ab9fdc7e8.jpg)
217
+
218
+ ![](images/6f8abddcc7bab68b2a014e6d24c7b50ef7e5bba1ca2114eaf3b2bcddbd62c4d8.jpg)
219
+
220
+ ![](images/c8f9a5f0e8068cffd317cab86ae8bc30033c0163e6ca96ecd8dcc5ac73a72c75.jpg)
221
+
222
+ ![](images/435e62abc00eadeb36c18e4f39b72679ea0d37cbf84f3050c880b5ddbad0517c.jpg)
223
+
224
+ ![](images/724a7529313e0dcfa38e01091480142d5ec2c066cda51805fb042fb76c123ab7.jpg)
225
+
226
+ ![](images/c0efa9482cb50319c75b915dd92c69ea4cd01068fc5be0c6374578e9fc50d463.jpg)
227
+
228
+ ![](images/96836f4d92e6722d1089dd8b491749f543ea4f757f613a1434847009d2d780db.jpg)
229
+ Figure 4: True positive rates at $0.1\%$ and $1\%$ FPR on all datasets as a function of number of epochs of the target model (OPT-6.7b). MIA risk increases for all methods with additional fine-tuning epochs of the target model.
230
+
231
+ Figure 5 shows the results when using Pythia models of different sizes as the target model. For most methods, the true positive rates at both $0.1\%$ and $1\%$ FPR increases with target model size, which is in line with the findings on the impact of model size on memorization (Carlini et al., 2021). LiRA exhibits more fluctuation in the performance, especially at the $0.1\%$ FPR. This is likely to due to the noise involved in the training of shadow models and mismatch in shadow model sizes for Pythia-6.9b target models. On the other hand, our method is able to consistently capture the trend and obtain better true positive rates at $0.1\%$ FPR.
232
+
233
+ # 6 Conclusion
234
+
235
+ We have developed a membership inference attack methodology for large language models that is more computationally efficient than the prior state of the art by almost two orders of magnitude without sacrificing effectiveness — in all experiments the accuracy of our attack either exceeds or is comparable to that of LiRA. These efficiency improvements are especially important when MIAs are intended to be used as a routine privacy auditing procedure for large deployed models, as shadow model attacks which are several times more expensive to run than the training of the target model itself become prohibitive.
236
+
237
+ # 7 Limitations
238
+
239
+ As with all membership inference attacks, when using the attack we propose here as an auditing
240
+
241
+ ![](images/ea3424e7ccfdcd49684356ebc6f5fc948be1f5ff135e90ced57a25039b90d543.jpg)
242
+ Figure 5: True positive rates at $0.1\%$ and $1\%$ FPR on the three datasets where all target models Pythia models of different sizes. LiRA results obtained using shadow models of smaller sizes than target models are marked with empty circles.
243
+
244
+ mechanism, it should be viewed as akin to a unit-test; susceptibility to the attack proposed here is a clear red flag, but lack of susceptibility does not provide any guarantee that the model is robust to other, yet-to-be-discovered privacy attacks. When provable guarantees are needed, techniques like differential privacy (Dwork and Roth, 2014) should be employed.
245
+
246
+ # 8 Broader Impact
247
+
248
+ Advancements in membership inference attacks (MIAs) for large language models (LLMs) are important for improving privacy auditing and compliance. By improving the efficiency of MIAs, our work helps auditors more routinely evaluate deployed models for privacy properties (or lack thereof). By making privacy leakage more easily measurable, we hope our work encourages privacy to become a first-order design desiderata in large-scale machine learning.
249
+
250
+ Improved MIAs of course also increase the risk of external attacks. Thus in the short run, work on privacy attacks (including ours) can increase the privacy risk of deployed models. Nevertheless, we believe that in the long run exposing privacy risk is an essential step to mitigating it.
251
+
252
+ # References
253
+
254
+ Martin Bertran, Shuai Tang, Aaron Roth, Michael Kearns, Jamie H Morgenstern, and Steven Z Wu.
255
+
256
+ 2024. Scalable membership inference attacks via quantile regression. Advances in Neural Information Processing Systems, 36.
257
+ Stella Biderman, Hailey Schoelkopf, Quentin Gregory Anthony, Herbie Bradley, Kyle O'Brien, Eric Hallahan, Mohammad Aflah Khan, Shivanshu Purohit, USVSN Sai Prashanth, Edward Raff, et al. 2023. Pythia: A suite for analyzing large language models across training and scaling. In International Conference on Machine Learning, pages 2397-2430. PMLR.
258
+ Nicholas Carlini, Steve Chien, Milad Nasr, Shuang Song, Andreas Terzis, and Florian Tramer. 2022. Membership inference attacks from first principles. In 2022 IEEE Symposium on Security and Privacy (SP), pages 1897-1914. IEEE.
259
+ Nicholas Carlini, Daphne Ippolito, Matthew Jagielski, Katherine Lee, Florian Tramer, and Chiyuan Zhang. 2023. Quantifying memorization across neural language models. In The Eleventh International Conference on Learning Representations.
260
+ Nicholas Carlini, Florian Tramer, Eric Wallace, Matthew Jagielski, Ariel Herbert-Voss, Katherine Lee, Adam Roberts, Tom Brown, Dawn Song, Ulfar Erlingsson, et al. 2021. Extracting training data from large language models. In 30th USENIX Security Symposium (USENIX Security 21), pages 2633-2650.
261
+ Michael Duan, Anshuman Suri, Niloofar Mireshghallah, Sewon Min, Weijia Shi, Luke Zettlemoyer, Yulia Tsvetkov, Yejin Choi, David Evans, and Hannaneh Hajishirzi. 2024. Do membership inference attacks work on large language models? arXiv preprint arXiv:2402.07841.
262
+ Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam Smith. 2006. Calibrating noise to sensitivity in private data analysis. In *Theory of Cryptography: Third Theory of Cryptography Conference*, TCC 2006, New York, NY, USA, March 4-7, 2006. Proceedings 3, pages 265-284. Springer.
263
+ Cynthia Dwork and Aaron Roth. 2014. The algorithmic foundations of differential privacy. Foundations and Trends® in Theoretical Computer Science, 9(3-4):211-407.
264
+ Nils Homer, Szabolcs Szelinger, Margot Redman, David Duggan, Waibhav Tembe, Jill Muehling, John V Pearson, Dietrich A Stephan, Stanley F Nelson, and David W Craig. 2008. Resolving individuals contributing trace amounts of dna to highly complex mixtures using high-density snp genotyping microarrays. PLoS genetics, 4(8):e1000167.
265
+ Bargav Jayaraman, Lingxiao Wang, Katherine Knipmeyer, Quanquan Gu, and David Evans. 2021. Revisiting membership inference under realistic assumptions. Proceedings on Privacy Enhancing Technologies, 2021(2).
266
+
267
+ Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. 2017. Simple and scalable predictive uncertainty estimation using deep ensembles. Advances in neural information processing systems, 30.
268
+ Yunhui Long, Vincent Bindschaedler, Lei Wang, Diyue Bu, Xiaofeng Wang, Haixu Tang, Carl A Gunter, and Kai Chen. 2018. Understanding membership inferences on well-generalized learning models. arXiv preprint arXiv:1802.04889.
269
+ Justus Mattern, Fatemehsadat Mireshghallah, Zhijing Jin, Bernhard Schoelkopf, Mrinmaya Sachan, and Taylor Berg-Kirkpatrick. 2023. Membership inference attacks against language models via neighbourhood comparison. In *Findings of the Association for Computational Linguistics: ACL* 2023, pages 11330-11343, Toronto, Canada. Association for Computational Linguistics.
270
+ Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. 2016. Pointer sentinel mixture models. In International Conference on Learning Representations.
271
+ Shashi Narayan, Shay B Cohen, and Mirella Lapata. 2018. Don't give me the details, just the summary! topic-aware convolutional neural networks for extreme summarization. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 1797-1807.
272
+ Milad Nasr, Nicholas Carlini, Jonathan Hayase, Matthew Jagielski, A Feder Cooper, Daphne Ippolito, Christopher A Choquette-Choo, Eric Wallace, Florian Tramér, and Katherine Lee. 2023. Scalable extraction of training data from (production) language models. arXiv preprint arXiv:2311.17035.
273
+ Alexandre Sablayrolles, Matthijs Douze, Cordelia Schmid, Yann Ollivier, and Hervé Jégou. 2019. White-box vs black-box: Bayes optimal strategies for membership inference. In International Conference on Machine Learning, pages 5558-5567. PMLR.
274
+ Avi Schwarzschild, Zhili Feng, Pratyush Maini, Zachary C Lipton, and J Zico Kolter. 2024. Rethinking llm memorization through the lens of adversarial compression. arXiv preprint arXiv:2404.15146.
275
+ Weijia Shi, Anirudh Ajith, Mengzhou Xia, Yangsibo Huang, Daogao Liu, Terra Blevins, Danqi Chen, and Luke Zettlemoyer. 2024. Detecting pretraining data from large language models. In The Twelfth International Conference on Learning Representations.
276
+ Reza Shokri, Marco Stronati, Congzheng Song, and Vitaly Shmatikov. 2017. Membership inference attacks against machine learning models. In 2017 IEEE symposium on security and privacy (SP), pages 3-18. IEEE.
277
+
278
+ Shuai Tang, Zhiwei Steven Wu, Sergul Aydore, Michael Kearns, and Aaron Roth. 2024. Membership inference attacks on diffusion models via quantile regression. In International Conference on Machine Learning.
279
+ 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.
280
+ Lauren Watson, Chuan Guo, Graham Cormode, and Alexandre Sablayrolles. 2021. On the importance of difficulty calibration in membership inference attacks. In International Conference on Learning Representations.
281
+ Samuel Yeom, Irene Giacomelli, Matt Fredrikson, and Somesh Jha. 2018. Privacy risk in machine learning: Analyzing the connection to overfitting. In 2018 IEEE 31st computer security foundations symposium (CSF), pages 268-282. IEEE.
282
+ Chiyuan Zhang, Daphne Ippolito, Katherine Lee, Matthew Jagielski, Florian Tramér, and Nicholas Carlini. 2023. Counterfactual memorization in neural language models. Advances in Neural Information Processing Systems, 36:39321-39362.
283
+ 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.
284
+ Xiang Zhang, Junbo Zhao, and Yann LeCun. 2015. Character-level convolutional networks for text classification. Advances in neural information processing systems, 28.
285
+
286
+ # A Comparison of Scoring Functions
287
+
288
+ In previous sections, we have compared our method with baselines leveraging different scoring functions, now we explore the performance of different scoring functions when per-sample based calibration is applied. Table 6 shows a comparison of different scoring functions and their counterparts where calibration is applied through LiRA and our method. We observe that while min-k and zlib entropy typically improves over loss attack, their performance advantage is not necessarily maintained when calibrated using LiRA or our method. This can potentially be attributed to the original design intent of these scoring functions, which were designed to not require (as much) calibration, and therefore benefit less from it. For instance, uncalibrated zlib entropy performs quite differently from the base loss attack, but their calibrated performances under LiRA are near identical. Calibration using our method has the best performance in most cases, especially at lower false positive rate. Still, we noticed overall higher training losses on our regression models when using zlib entropy or min-k score as the scoring function, which may explain the worse performance with zlib entropy on XSum.
289
+
290
+ <table><tr><td>Dataset</td><td colspan="2">AG News</td><td colspan="2">WikiText</td><td colspan="2">XSum</td></tr><tr><td>FPR</td><td>0.1%</td><td>1%</td><td>0.1%</td><td>1%</td><td>0.1%</td><td>1%</td></tr><tr><td>Loss</td><td>0.29</td><td>3.35</td><td>0.04</td><td>1.09</td><td>0.15</td><td>2.70</td></tr><tr><td>min-k</td><td>0.46</td><td>7.08</td><td>0.07</td><td>1.11</td><td>0.25</td><td>11.10</td></tr><tr><td>zlib</td><td>0.76</td><td>7.46</td><td>0.12</td><td>1.12</td><td>0.13</td><td>6.55</td></tr><tr><td>LiRA (loss/zlib)</td><td>2.03</td><td>17.65</td><td>10.53</td><td>50.72</td><td>7.82</td><td>50.87</td></tr><tr><td>LiRA (min-k)</td><td>1.43</td><td>16.71</td><td>9.22</td><td>44.33</td><td>8.67</td><td>47.50</td></tr><tr><td>LiRA* (loss)</td><td>4.04</td><td>33.78</td><td>5.92</td><td>40.72</td><td>22.45</td><td>76.99</td></tr><tr><td>LiRA* (min-k)</td><td>1.81</td><td>34.73</td><td>6.99</td><td>38.44</td><td>24.68</td><td>78.70</td></tr><tr><td>LiRA* (zlib)</td><td>4.49</td><td>35.46</td><td>7.04</td><td>47.16</td><td>26.09</td><td>78.40</td></tr><tr><td>Ours (loss)</td><td>6.95</td><td>34.17</td><td>19.29</td><td>58.52</td><td>36.92</td><td>72.68</td></tr><tr><td>Ours (min-k)</td><td>7.39</td><td>34.18</td><td>17.90</td><td>52.60</td><td>38.49</td><td>72.31</td></tr><tr><td>Ours (zlib)</td><td>5.73</td><td>34.84</td><td>17.35</td><td>57.59</td><td>25.93</td><td>56.05</td></tr></table>
291
+
292
+ Table 6: True positive rates $(\%)$ at $0.1\%$ and $1\%$ FPR on the three datasets where target model is Pythia-6.9b. Different scoring functions are used for LiRA and our method. LiRA results are obtained with 4 Pythia-2.8b shadow models.
293
+
294
+ # B Extended ROC Curve Results
295
+
296
+ Here we show extended ROC curve results of our experiments. Figure 6 and Figure 7 show ROC curves on WikiText where target models are OPT-6.7b and Llama-7b. Figure 8 and Figure 9 show ROC curves on AG News and XSum where target models are Pythia-6.9b.
297
+
298
+ ![](images/793bd3ba05b354fe5627b958d2b5fefcdc998a1b55685afd9066940960ea979c.jpg)
299
+ Figure 6: Comparing true positive rates vs false positive rates of our method with LiRA variants and marginal baselines with different scoring functions on WikiText-103 where target model is OPT-6.7b. LiRA* represents LiRA with fixed variance estimate. Results for LiRA are obtained with 4 shadow models from OPT family with varying sizes. Results for our method are obtained with ensemble of 5 quantile regression models finetuned from opt-125m.
300
+
301
+ ![](images/7abf5cb98215f00df940ec498f7437c299a51a57c2a7a80b0daf4c5382fe53a6.jpg)
302
+ Figure 7: Comparing true positive rates vs false positive rates of our method with LiRA variants and marginal baselines with different scoring functions on WikiText-103 where target model is Llama-7b. LiRA* represents LiRA with fixed variance estimate. Results for LiRA are obtained with 4 shadow models from OPT-2.7b and Pythia-2.8b. Results for our method are obtained with ensemble of 5 quantile regression models finetuned from OPT-125m and Pythia-160m.
303
+
304
+ # C Varying Sizes of Regression Models
305
+
306
+ Here we study how the size of quantile regression models affects the performance of our method. Table 7 shows a performance comparison of our method using Pythia models of varying sizes for regression when the target model is Pythia-6.9b. We observe an improvement of true positive rates at $0.1\%$ and $1\%$ FPR as regression model size increases. In our experiments, we observed lower
307
+
308
+ ![](images/c417017a1b68e203c7fe49b16d6dff1f8505168d5c4fe92ac5b00ee8706e46d0.jpg)
309
+
310
+ ![](images/0436be6a7c1a1b0f6047b2550900342661e4205630e6be0077a012048a8b98cc.jpg)
311
+ Figure 8: Comparing true positive rates vs false positive rates of our method with LiRA variants and marginal baselines with different scoring functions on AG News where target model is Pythia-6.9b. LiRA* represents LiRA with fixed variance estimate. Results for LiRA are obtained with 4 shadow models from Pythia family with varying sizes. Results for our method are obtained with ensemble of 5 quantile regression models finetuned from Pythia-160m.
312
+ Figure 9: Comparing true positive rates vs false positive rates of our method with LiRA variants and marginal baselines with different scoring functions on XSum where target model is Pythia-6.9b. LiRA* represents LiRA with fixed variance estimate. Results for LiRA are obtained with 4 shadow models from Pythia family with varying sizes. Results for our method are obtained with ensemble of 5 quantile regression models finetuned from Pythia-160m.
313
+
314
+ regression loss when training with larger models, which may explain the improvement in performance.
315
+
316
+ # D Varying Sizes of Regression Models
317
+
318
+ Here we study how the size of quantile regression models affects the performance of our method. Table 7 shows a performance comparison of our method using Pythia models of varying sizes for regression when the target model is Pythia-6.9b.
319
+
320
+ <table><tr><td>Dataset</td><td colspan="2">AG News</td><td colspan="2">WikiText</td><td colspan="2">XSum</td></tr><tr><td>FPR</td><td>0.1%</td><td>1%</td><td>0.1%</td><td>1%</td><td>0.1%</td><td>1%</td></tr><tr><td>Loss</td><td>0.29</td><td>3.35</td><td>0.04</td><td>1.09</td><td>0.15</td><td>2.70</td></tr><tr><td>LiRA (2.8b)</td><td>2.03</td><td>17.65</td><td>10.53</td><td>50.72</td><td>7.82</td><td>50.87</td></tr><tr><td>LiRA* (2.8b)</td><td>4.04</td><td>33.78</td><td>5.92</td><td>40.72</td><td>22.45</td><td>76.99</td></tr><tr><td>Ours (70m)</td><td>5.74</td><td>30.54</td><td>11.48</td><td>49.24</td><td>30.30</td><td>65.12</td></tr><tr><td>Ours (160m)</td><td>6.95</td><td>34.17</td><td>19.29</td><td>58.52</td><td>36.92</td><td>72.68</td></tr><tr><td>Ours (410m)</td><td>7.84</td><td>40.59</td><td>22.00</td><td>63.89</td><td>40.38</td><td>78.24</td></tr></table>
321
+
322
+ Table 7: True positive rates (\%) at $0.1\%$ and $1\%$ false positive rates on the three datasets; the target model is Pythia-6.9b. LiRA results are obtained with 4 shadow models. LiRA* represents LiRA with fixed variance. Results for our method are obtained using ensembles of 5 models from finetuning Pythia models of different sizes.
323
+
324
+ We observe an improvement of true positive rates at $0.1\%$ and $1\%$ FPR as regression model size increases. In our experiments, we observed lower regression loss when training with larger models, which may explain the improvement in performance.
325
+
326
+ # E Extended Comparison with LiRA Using Increased Number of Shadow Models
327
+
328
+ Here we present extended comparison with LiRA variants using increased number of shadow models. Table 8 shows a comparison of our method with LiRA on WikiText where the model family varies among target model and attacker models. We observe improved performance of LiRA with variable variance with the increased shadow models. Our method is able to achieve competitive results with a fraction of the time required for preparing the attacker models and consistently outperforms LiRA when the target model is Llama-7b.
329
+
330
+ <table><tr><td>Model</td><td colspan="2">Pythia-6.9b</td><td colspan="2">OPT-6.7b</td><td colspan="2">Llama-7b</td><td rowspan="2">Time (hrs)</td></tr><tr><td>FPR</td><td>0.1%</td><td>1%</td><td>0.1%</td><td>1%</td><td>0.1%</td><td>1%</td></tr><tr><td>Loss Attack</td><td>0.04</td><td>1.09</td><td>0.04</td><td>0.93</td><td>0.33</td><td>1.68</td><td>-</td></tr><tr><td>LiRA (P-2.8b n=8)</td><td>28.93</td><td>72.32</td><td>15.25</td><td>51.78</td><td>1.83</td><td>11.46</td><td>110.0</td></tr><tr><td>LiRA (O-2.7b n=8)</td><td>13.38</td><td>55.31</td><td>15.46</td><td>61.43</td><td>1.18</td><td>9.51</td><td>116.8</td></tr><tr><td>LiRA* (P-2.8b n=8)</td><td>5.77</td><td>42.08</td><td>4.13</td><td>21.66</td><td>2.14</td><td>12.57</td><td>110.0</td></tr><tr><td>LiRA* (O-2.7b n=8)</td><td>5.56</td><td>46.27</td><td>4.27</td><td>37.42</td><td>2.01</td><td>17.42</td><td>116.8</td></tr><tr><td>Ours (P-160m)</td><td>19.29</td><td>58.52</td><td>13.03</td><td>45.98</td><td>11.28</td><td>56.74</td><td>3.4</td></tr><tr><td>Ours (O-125m)</td><td>18.03</td><td>61.19</td><td>14.48</td><td>53.69</td><td>17.96</td><td>61.87</td><td>3.4</td></tr><tr><td>Ours (P-410m)</td><td>22.00</td><td>63.89</td><td>13.92</td><td>54.31</td><td>18.95</td><td>61.84</td><td>11.4</td></tr><tr><td>Ours (O-350m)</td><td>22.55</td><td>66.74</td><td>14.84</td><td>56.95</td><td>17.00</td><td>63.74</td><td>11.4</td></tr></table>
331
+
332
+ Table 8: True positive rates $(\%)$ at $0.1\%$ and $1\%$ FPR with different target models on the WikiText dataset along with the total time to prepare the shadow models or regression models. P-2.8b, -160m, -410m and O-2.7b, -125m, -350m correspond to Pythia-2.8b, -160m, -410m and OPT-2.7b, -125m, -350m, respectively. LiRA results are obtained with 8 shadow models from the Pythia and OPT families. LiRA* represents LiRA with fixed variance. Results for our method are obtained using ensembles of 5 regression models.
2024/Order of Magnitude Speedups for LLM Membership Inference/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:51499273298bee468e09361375258cdc6ea954d5255a7b8af8091683a05c9b93
3
+ size 758997
2024/Order of Magnitude Speedups for LLM Membership Inference/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Ouroboros_ Generating Longer Drafts Phrase by Phrase for Faster Speculative Decoding/0769a112-ecbe-4a76-bca4-3935b552032a_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Ouroboros_ Generating Longer Drafts Phrase by Phrase for Faster Speculative Decoding/0769a112-ecbe-4a76-bca4-3935b552032a_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Ouroboros_ Generating Longer Drafts Phrase by Phrase for Faster Speculative Decoding/0769a112-ecbe-4a76-bca4-3935b552032a_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5a240a87531315e3c5f34b81cf4dd9dccf30ec837ced0ee338d17e4f9d9fddd4
3
+ size 768679
2024/Ouroboros_ Generating Longer Drafts Phrase by Phrase for Faster Speculative Decoding/full.md ADDED
@@ -0,0 +1,476 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ouroboros: Generating Longer Drafts Phrase by Phrase for Faster Speculative Decoding
2
+
3
+ Weilin Zhao $^{1*}$ , Yuxiang Huang $^{1*}$ , Xu Han $^{1,2\dagger}$ , Wang Xu $^{1}$ , Chaojun Xiao $^{1}$ , Xinrong Zhang $^{1}$ , Yewei Fang $^{3}$ , Kaihuo Zhang $^{3}$ , Zhiyuan Liu $^{1\dagger}$ , Maosong Sun $^{1}$
4
+
5
+ $^{1}$ Department of Computer Science and Technology, Institute for Artificial Intelligence, Beijing National Research Center for Information Science and Technology, Tsinghua University, Beijing, China.
6
+
7
+ $^{2}$ Shanghai Artificial Intelligence Laboratory, Shanghai, China. $^{3}$ ModelBest Inc. {zwl23,huang-yx21}@ mails.tsinghua.edu.cn, {hanxu2022,liuzy}@tsinghua.edu.cn
8
+
9
+ # Abstract
10
+
11
+ Speculative decoding is a widely used method that accelerates the generation process of large language models (LLMs) with no compromise in model performance. It achieves this goal by using an existing smaller model for drafting and then employing the target LLM to verify the draft in a low-cost parallel manner. Under such a drafting-verification framework, drafting efficiency has become a bottleneck in the final speedup of speculative decoding. Therefore, generating longer drafts at less cost can lead to better decoding speedup. To achieve this, we introduce Ouroboros, which can generate draft phrases to parallelize the drafting process and meanwhile lengthen drafts in a training-free manner. The experimental results on various typical text generation tasks show that Ouroboros can achieve speedups of up to $2.4\times$ over speculative decoding and $3.9\times$ over vanilla decoding, without fine-tuning draft and target models. The source code of Ouroboros is available at https://github.com/thunlp/Ouroboros.
12
+
13
+ # 1 Introduction
14
+
15
+ Benefiting from recent advances in parallel computing devices and distributed training algorithms (Shoeybi et al., 2019; Rasley et al., 2020), the training time of LLMs has been significantly shortened. However, it is still challenging to achieve parallelization in model inference because most LLMs rely on autoregressive generation mechanisms that exhibit sequential dependencies among generated tokens. For these autoregressive LLMs, they have to generate tokens one by one.
16
+
17
+ To accelerate the inference of LLMs, typical model compression methods such as quantization (Frantar et al., 2023; Lin et al., 2023; Kim et al., 2023) and pruning (Han et al., 2015; Wang
18
+
19
+ ![](images/526ed4b907f786f82de63b5b48b55e44e626943ac24ed25d27240420ddfc0df6.jpg)
20
+ Figure 1: The trade-off between drafting efficiency and effectiveness. The figure illustrates the optimal speculative decoding speed of Llama-2-chat-70B on MT-Bench (Zheng et al., 2024) and the corresponding average number of accurate draft tokens at each iteration.
21
+
22
+ ![](images/d3697f13275df837ec7b2e1653db757abc23e39fc78b87110cbb1d466049d6d4.jpg)
23
+
24
+ et al., 2020; Xia et al., 2023b) may cause model performance degradation and sometimes even require non-negligible additional training costs. To losslessly accelerate the inference of LLMs, speculative decoding (Xia et al., 2023a; Leviathan et al., 2023; Chen et al., 2023a) has been proposed. Given a target LLM, speculative decoding selects a much smaller LLM as the draft model to generate multiple tokens as a draft. The target LLM then reviews the draft in parallel, accepting the longest accurate prefix while discarding the remaining draft tokens.
25
+
26
+ Under such a drafting-verification framework, how to efficiently generate long and accurate drafts has become a critical factor in accelerating LLM inference. As in Figure 1, we examine the trade-off between draft model size and speculative decoding speed. We observe that larger draft models tend to achieve higher draft accuracy, but the cost of generating drafts also rises, so that medium-sized models offer the best decoding speed. Besides, we investigate the trade-off between draft length and speculative decoding speed. Our findings indicate that the target model can accept more tokens per iteration on average when the draft is longer, but longer drafts introduce more forward passes required for the draft model, and thus, the opti
27
+
28
+ mal draft length in speculative decoding is not the largest one.
29
+
30
+ Based on the further analysis of the above pilot experimental results, it is not difficult to observe the limitations of speculative decoding regarding drafting efficiency: (1) Insufficient Draft. Drafting too short misses potential acceleration. However, because of the time overhead involved in drafting itself, generating long drafts may result in high costs when these drafts fail. If longer drafts can be generated more efficiently, the acceleration effect will be enhanced significantly. (2) Underutilized Draft. For current speculative decoding, tokens that are not accepted by the target model are completely discarded, resulting in a high failure cost when generating long drafts. In fact, some of the discarded tokens may contain useful information that could be utilized in future drafting iterations.
31
+
32
+ To overcome the above limitations, this paper introduces a more efficient decoding framework named Ouroboros, whose improvements over speculative decoding are as follows:
33
+
34
+ (1) Accelerating drafting via phrases. Given that model generation is memory-bound rather than computation-bound (Leviathan et al., 2023), drafting at the phrase level rather than the token level can make the drafting phase more efficient at producing longer drafts. Inspired by previous efforts such as lookahead decoding (Fu et al., 2023) that successfully employed phrases to accelerate the target model, Ouroboros adapts this method to enhance drafting efficiency. In subsequent sections, we will demonstrate that accelerating the draft model with phrases first and then using the draft to accelerate the target model will be more efficient than directly accelerating the target model with phrases.
35
+ (2) Lengthening drafts via phrases. Concatenating phrases can extend the draft even longer at a low cost. According to the last token of the draft, phrases starting with the last token can be used to extend the draft. By concatenating the draft and $k$ different phrases, Ouroboros generates $k$ longer drafts for the target model to verify, introducing almost zero additional costs.
36
+ (3) Generating phrases from verification. During the verification phase, Ouroboros filters out high-quality phrases from those discarded tokens in speculative decoding. These discarded phrases can be used to accelerate drafting in subsequent iterations.
37
+ (4) Reusing phrases from history contexts. We
38
+
39
+ find that phrases generated from similar tasks can be reused to speed up drafting with each other. Ouroboros thus reuses phrases in history contexts to accelerate drafting in subsequent iterations.
40
+
41
+ Notably, Ouroboros does not require any additional training, and can be applied in all applications with speculative decoding. We implement Ouroboros and conduct sufficient experiments on various text generation tasks such as code generation (Chen et al., 2021; Austin et al., 2021), text summarization (See et al., 2017; Hermann et al., 2015) and machine translation (Bojar et al., 2016). The experimental results demonstrate that Ouroboros is completely lossless on task performance and can achieve significant inference acceleration without additional model fine-tuning. Compared with the recent competitive decoding methods, Ouroboros achieves speedups of up to $1.9 \times$ over lookahead decoding, up to $2.8 \times$ over speculative decoding, and up to $3.9 \times$ over naive autoregressive decoding.
42
+
43
+ # 2 Preliminary
44
+
45
+ For a target model $\mathcal{T}$ to accelerate inference, speculative decoding first finds a suitable draft model $S$ . Given an input prefix $x_{1\dots n}$ , speculative decoding uses the draft model $S$ to generate a draft $d_{1\dots \gamma}$ consisting of $\gamma$ tokens in an autoregressive manner,
46
+
47
+ $$
48
+ \begin{array}{l} d _ {1} = \arg \max _ {d _ {h}} P _ {\mathcal {S}} (d _ {1} \mid x _ {1 \dots n}), \\ d _ {i} = \arg \max _ {d _ {i}} P _ {\mathcal {S}} \left(d _ {i} \mid x _ {1 \dots n}, d _ {1 \dots i - 1}\right), i = 2 \dots \gamma . \tag {1} \\ \end{array}
49
+ $$
50
+
51
+ Then, the target model $\mathcal{T}$ verifies the draft $d_{1\dots \gamma}$ by inputting $d_{1\dots \gamma}$ and conducting the next token prediction task using a single forward. Each verification result $v_{i}$ is sampled from the next token prediction distribution of the target model,
52
+
53
+ $$
54
+ \begin{array}{l} v _ {1} \sim P _ {\mathcal {T}} (\cdot \mid x _ {1 \dots n}), \\ v _ {i} \sim P _ {\mathcal {T}} (\cdot | x _ {1 \dots n}, d _ {1 \dots i - 1}), i = 2 \dots \gamma . \\ \end{array}
55
+ $$
56
+
57
+ There must exist an $A\in [0,\gamma ]$ satisfying that
58
+
59
+ $$
60
+ \left\{ \begin{array}{l} v _ {1 \dots A} = d _ {1 \dots A}, \\ v _ {A + 1} \neq d _ {A + 1} \text {o r} A = \gamma . \end{array} \right. \tag {3}
61
+ $$
62
+
63
+ Here, $v_{1\dots A + 1}$ will be the same as the result when the target model autoregressively generates $A + 1$ tokens from $x$ , because at this time,
64
+
65
+ $$
66
+ \begin{array}{l} v _ {1} \sim P _ {\mathcal {T}} (\cdot \mid x _ {1 \dots n}), \\ v _ {i} \sim P _ {\mathcal {T}} (\cdot | x _ {1 \dots n}, v _ {1 \dots i - 1}), i = 2 \dots A + 1. \tag {4} \\ \end{array}
67
+ $$
68
+
69
+ We call $A$ the number of accurate tokens in the draft, $A + 1$ tokens $d_{1\dots A},v_{A + 1}$ are accepted as
70
+
71
+ ![](images/bbc17ae28c63efb97e4cb8aab511fb4a95903761b2730e9ef442da9c21ef7624.jpg)
72
+ Figure 2: The framework of Ouroboros, which achieves better drafting efficiency than vanilla speculative decoding while also lengthening the drafts.
73
+
74
+ the generation result of the target model while the remaining draft tokens $d_{A + 1\dots \gamma}$ are discarded. Please note that the derivation above differs slightly from the original speculative decoding (Chen et al., 2023a): we set the temperature for the random sampling in the draft model to 0 for a clearer explanation, but this would not affect the correctness of the target model.
75
+
76
+ We define $A(\gamma)$ as the average number of accurate tokens when the draft model is $\mathcal{S}$ and the draft length is $\gamma$ . The speedup of speculative decoding is calculated as follows (Leviathan et al., 2023), where $t_{\mathcal{S}}$ and $t_{\mathcal{T}}$ are the forward time of the draft model and the target model, respectively,
77
+
78
+ $$
79
+ \frac {[ A (\gamma) + 1 ] \cdot t \tau}{\gamma \cdot t _ {S} + t \tau}, \tag {5}
80
+ $$
81
+
82
+ where the numerator is the time for the vanilla generation of the target model, and the denominator is the time of the speculative decoding.
83
+
84
+ # 3 Method
85
+
86
+ In Ouroboros, we first accelerate drafting via phrases, so that we can generate $\gamma$ tokens with fewer forward passes of the draft model, and we denote this reduction ratio as $c$ . Subsequently, due to the fact that function $A(\gamma)$ is monotonically non-decreasing, we lengthen drafts via phrases, enabling the generation of more tokens without the need for additional forward passes. We denote this costless extended length as $\beta$ . Following these two optimization directions, Eq. (5) becomes
87
+
88
+ $$
89
+ \frac {\left[ A (\gamma + \beta) + 1 \right] \cdot t _ {\mathcal {T}}}{\frac {1}{c} \gamma \cdot t _ {\mathcal {S}} + t _ {\mathcal {T}}}. \tag {6}
90
+ $$
91
+
92
+ We further enlarge $c$ by heuristically generating phrases from verification results and reusing phrases from historically generated contexts, which can lead to better drafting efficiency. Next, we will delve into the details for each part of Ouroboros.
93
+
94
+ # 3.1 Accelerating Drafting via Phrases
95
+
96
+ We get inspiration from lookahead decoding (Fu et al., 2023), which uses phrases to directly accelerate the target model $\mathcal{T}$ . However, each round of phrase drafting requires a forward pass of the target model $\mathcal{T}$ to verify the draft, limiting the whole acceleration effect of lookahead decoding. Different from lookahead decoding, we use phrases to indirectly accelerate the target model $\mathcal{T}$ through a draft model $S$ , allowing each forward pass of the target model to simultaneously verify multiple rounds of phrases, achieving a better acceleration. As shown in Figure 2, in Ouroboros, the drafting process of the draft model is performed phrase by phrase instead of token by token. Multiple new phrases are generated in parallel during each forward of the draft model. We will not go into detail how to generate new draft phrases in parallel due to space constraints, and can refer to Fu et al. (2023).
97
+
98
+ # 3.2 Lengthening Drafts via Phrases
99
+
100
+ Given that model generation is memory-bound, the time it takes for the target model to verify dozens of tokens using a single forward is not much different from the time spent on verifying a single token (Leviathan et al., 2023). Therefore, we propose to use phrases to heuristically extend drafts since phrase concatenation is nearly zero-cost.
101
+
102
+ ![](images/3b2abb9062d767de68d66c1d88da7cc54427ac31f1ea01c4bc8d18e3e190f7c1.jpg)
103
+ Figure 3: The customized attention masking mechanism for verifying lengthened drafts.
104
+
105
+ Trying multiple phrases to get multiple longer drafts can increase the probability that one of these phrases passes the verification of the target model. But the cost of verifying these longer drafts one by one is also unbearable. Inspired by Cai et al. (2024), we construct a sophisticated Transformer attention masking mechanism to complete the verification of all longer drafts with only one forward pass of the target model $\mathcal{T}$ , as shown in Figure 3.
106
+
107
+ Specifically, given a draft $d_{1\dots \gamma}$ , we select out $K$ phrases $p_1^1\dots \beta ,\dots ,p_{1\dots \beta}^K$ starting with the token $d_{\gamma}$ i.e., $p_1^1 = p_1^2 = \dots = p_1^K = d_\gamma$ . The $K$ lengthened drafts are
108
+
109
+ $$
110
+ \left\{ \begin{array}{c} d _ {1} \dots_ {\gamma}, p _ {2} ^ {1} \dots_ {\beta}, \\ d _ {1} \dots_ {\gamma}, p _ {2} ^ {2} \dots_ {\beta}, \\ \vdots \\ d _ {1} \dots_ {\gamma}, p _ {2} ^ {K} \dots_ {\beta}. \end{array} \right. \tag {7}
111
+ $$
112
+
113
+ The target model then calculates $v_{i}^{j}$ to verify $p_{i}^{j}$ for all $j = 2\cdots K, i = 2\cdots \beta + 1$ in Eq. (8). All $v_{i}^{j}$ are computed in parallel by a single forward using the attention masking mechanism in Figure 3.
114
+
115
+ $$
116
+ v _ {i} ^ {j} \sim P _ {\mathcal {T}} (\cdot | x _ {1 \dots n}, d _ {1 \dots \gamma}, p _ {2 \dots i - 1} ^ {j}) \tag {8}
117
+ $$
118
+
119
+ Similar to Eq. (3), we define $\hat{A}^j$ satisfying
120
+
121
+ $$
122
+ \left\{ \begin{array}{l} v _ {2 \dots \hat {A} ^ {j}} ^ {j} = p _ {2 \dots \hat {A} ^ {j}} ^ {j}, \\ v _ {\hat {A} ^ {j} + 1} ^ {j} \neq p _ {\hat {A} ^ {j} + 1} ^ {j} \text {o r} \hat {A} ^ {j} = \beta . \end{array} \right. \tag {9}
123
+ $$
124
+
125
+ Once the draft $d_{1\dots \gamma}$ is fully accepted by the target model, we use the phrase $p^j$ with the largest $\hat{A}^j$ to enlarge the number of accepted tokens. More specifically, $d_{1\dots \gamma},p_{2\dots \hat{A}^{j}}^{j},v_{\hat{A}^{j} + 1}^{j}$ will be accepted.
126
+
127
+ <table><tr><td>Yi-base 34B/6B</td><td>MBPP</td><td>CNN/DM</td><td>WMT-16</td></tr><tr><td>A</td><td>12.7</td><td>8.4</td><td>5.3</td></tr><tr><td>#Match</td><td>18.9</td><td>17.8</td><td>17.0</td></tr></table>
128
+
129
+ Table 1: Average matched tokens compared with the number of accepted tokens. Experiment on Yibase 34B/6B (Young et al., 2024) on three datasets, MBPP (Austin et al., 2021), CNN/DM (See et al., 2017; Hermann et al., 2015) and WMT16 (Bojar et al., 2016) using Speculative Decoding, with draft length $\gamma = 20$
130
+
131
+ # 3.3 Generating Phrases from Verification
132
+
133
+ In speculative decoding, the cost when a draft fails is relatively high. If draft $d_{1\dots \gamma}$ is not fully accepted, traditional verification only accepts the correct draft prefix $d_{1\dots A}$ and discards $d_{A + 1\dots \gamma}$ , as in Section 2. To evaluate the information in these discarded draft tokens, we define $\# \mathrm{Match}(d_1\dots \gamma ,v_1\dots \gamma)$ the number of the matched tokens of the draft and the verification result,
134
+
135
+ $$
136
+ \# \operatorname {M a t c h} \left(d _ {1 \dots \gamma}, v _ {1 \dots \gamma}\right) = \sum_ {i = 1} ^ {\gamma} \left[ d _ {i} = v _ {i} \right], \tag {10}
137
+ $$
138
+
139
+ where $[d_i = v_i] = 1$ when $d_{i} = v_{i}$ and O otherwise.
140
+
141
+ As in Table 1, we find that #Match is much larger than the length of the accurate prefix $A$ . We view some specific cases and find that sometimes the emergence of this situation is caused by the misplacement of the generation, as shown in Figure 4. Therefore, we propose to filter out those sub-segments of the discarded draft that match the verification results of the target model, as shown in Figure 4. We then insert those segments into the phrases pool to accelerate future drafts.
142
+
143
+ As in Section 3.2, if draft $d_{1\dots \gamma}$ is fully accepted, only one phrase suffix $p^j$ is used, leaving all other tried phrases unused. We suppose the verification result $v_{2\dots \beta}^{o}$ fixes some errors in the phrase $p_{2\dots \beta}^{o}$ for all $o\neq j$ : we use $p_1^o,v_2^{o}_2$ to replace the phrase $p_{1\dots \beta}^{o}$ in the phrase pool.
144
+
145
+ # 3.4 Reusing Phrases from History Contexts
146
+
147
+ In real-world scenarios, the adjacent conversations from users may exhibit similarities. Leveraging these similarities, we can further enhance the speed of the model inference. Different from lookahead decoding that cleanup phrases from history contexts when conducting the generation of subsequent input queries, we propose to reuse phrases generated from previous generations to further accelerate the drafting process.
148
+
149
+ ![](images/70590313093f0d6a4126f2ed894225166ab99805368955a0ca3ae34a0bcf584a.jpg)
150
+ Figure 4: The illustration of generating phrases from the verification results of the target model.
151
+
152
+ ![](images/aba536cafd69e7c648c14f221ece49f73ce4722d5ca2f0dbc21d6297158099a2.jpg)
153
+
154
+ # 3.5 The Advantages of the Training-free Framework
155
+
156
+ Ouroboros is entirely training-free. We have not employed methods like model distillation to increase the function $A(\gamma)$ or model compression to decrease $t_S$ in Eq. (5). In terms of phrase generation, all our phrases generation strategies are heuristic. All phrases are gradually accumulated during the generation process of models, without prior preparation on a large-scale corpus. All these mean that, given a draft model in any speculative decoding method, we can use Ouroboros to help these methods achieve further speedup without introducing additional costs.
157
+
158
+ # 4 Experiments
159
+
160
+ This section focuses on evaluating Ouroboros on various text generation tasks to demonstrate the efficiency and effectiveness of Ouroboros.
161
+
162
+ # 4.1 Experimental Settings
163
+
164
+ In order to evaluate the overall acceleration caused by Ouroboros, we evaluate Ouroboros on various typical text generation tasks, including code generation, arithmetic reasoning, document summarization, and machine translation.
165
+
166
+ Datasets. For code generation, we evaluate Ouroboros on HumanEval (Chen et al., 2021) and the validation set of MBPP (Austin et al., 2021). There are 164 entries in HumanEval and they are
167
+
168
+ composed of a text prompt and a prefix of Python function. The validation set of MBPP has 90 entries, in which the whole function is expected to be predicted with a given text prompt and test cases. The maximum generation lengths on HumanEval and MBPP are set to 512. For arithmetic reasoning, document summarization and machine translation, we evaluate our method on GSM8K (Cobbe et al., 2021), CNN/DM (See et al., 2017; Hermann et al., 2015) and WMT16 (Bojar et al., 2016), respectively. We randomly sample 100 entries from GSM8K and CNN/DM, and sample 100 entries from the German-to-English translation subset of WMT16. The maximum generation lengths on GSM8k, CNN/DM and WMT16 are respectively set to 256, 128, and 64.
169
+
170
+ Models. For HumanEval and MBPP, we use Yi-base-34B/6B (Young et al., 2024), DeepSeekcoder-instruct-33b/6.7B (Bi et al., 2024) and CodeLlama-instruct-34B/7B (Roziere et al., 2023) as the target/draft models for our experiments. For GSM8K, CNN/DM and WMT16, we use Yi-base-34B/6B and Llama-2-chat-70B/7B (Touvron et al., 2023). We use the larger model as the target model and the smaller one for drafting. All these models are recently representative and popular LLMs.
171
+
172
+ Evaluation Methods. The baselines of our experiments are vanilla autoregressive decoding, speculative decoding (Leviathan et al., 2023; Chen et al., 2023a), and lookahead decoding (Fu et al., 2023). We report the decoding speed (token/s) and
173
+
174
+ ![](images/b565cabd8a4b0a07d68774251caa99efc455ecc891ca0a445f179df12e7108df.jpg)
175
+ Figure 5: The greedy decoding speed (token/s) on HumanEval and MBPP.
176
+
177
+ ![](images/15118b4f958b6fad5fdeaaf0245c8772cad7d8a4c637692ec0fedc0ab7ce0553.jpg)
178
+
179
+ <table><tr><td rowspan="2">Task</td><td rowspan="2">Algorithm</td><td colspan="2">Yi 34B/6B</td><td colspan="2">Llama-2 70B/7B</td></tr><tr><td>token/s</td><td>speedup</td><td>token/s</td><td>speedup</td></tr><tr><td rowspan="4">GSM8k</td><td>Vanilla</td><td>15.33</td><td>1.00×</td><td>8.96</td><td>1.00×</td></tr><tr><td>Speculative</td><td>16.99</td><td>1.11×</td><td>16.86</td><td>1.88×</td></tr><tr><td>Lookahead</td><td>25.14</td><td>1.64×</td><td>13.77</td><td>1.54×</td></tr><tr><td>Ouroboros</td><td>28.23</td><td>1.84×</td><td>24.03</td><td>2.68×</td></tr><tr><td rowspan="4">CNN/DM</td><td>Vanilla</td><td>14.62</td><td>1.00</td><td>8.12</td><td>1.00</td></tr><tr><td>Speculative</td><td>17.82</td><td>1.22×</td><td>12.77</td><td>1.57×</td></tr><tr><td>Lookahead</td><td>18.77</td><td>1.28×</td><td>9.47</td><td>1.17×</td></tr><tr><td>Ouroboros</td><td>22.65</td><td>1.55×</td><td>14.67</td><td>1.81×</td></tr><tr><td rowspan="4">WMT16</td><td>Vanilla</td><td>14.78</td><td>1.00×</td><td>9.52</td><td>1.00×</td></tr><tr><td>Speculative</td><td>17.48</td><td>1.18×</td><td>14.72</td><td>1.55×</td></tr><tr><td>Lookahead</td><td>17.98</td><td>1.22×</td><td>14.65</td><td>1.54×</td></tr><tr><td>Ouroboros</td><td>19.94</td><td>1.35×</td><td>19.27</td><td>2.02×</td></tr></table>
180
+
181
+ the speedup ratio compared with vanilla autoregressive decoding. More hyperparameters of our experiments are included in Appendix B.
182
+
183
+ Hardware and Implementation. All experiments are performed on $2 \times$ NVIDIA 80GB A800 GPU with NVLINK $\times 8$ interconnected. The CPU used is the Intel(R) Xeon(R) Platinum 8350C. We use the Huggingface transformers package to conduct automatic model parallelism for our methods and all baselines.
184
+
185
+ # 4.2 Overall Results
186
+
187
+ We conduct experiments in both greedy decoding and random sampling scenarios. The experimental results are listed as follows.
188
+
189
+ Greedy decoding. As shown in Figure 5, in the greedy generation scenario, Ouroboros outperforms vanilla greedy decoding, lookahead decoding, and speculative decoding under all backbone models and dataset configurations. Ouroboros can achieve up to 61.2 token/s generation speed with the max generation length of 512, which achieves speedups of $3.9 \times$ compared to greedy decoding,
190
+
191
+ Table 2: The greedy decoding speed (token/s) and speedup ratio on GSM8K, CNN/DM and WMT16.
192
+
193
+ <table><tr><td>Task</td><td>Algorithm</td><td>Greedy (temp=0.0)</td><td>Random temp=0.5</td><td>temp=1.0</td></tr><tr><td rowspan="4">GSM8k</td><td>Vanilla</td><td>8.96</td><td>8.97</td><td>8.96</td></tr><tr><td>Speculative</td><td>16.86</td><td>14.99</td><td>14.11</td></tr><tr><td>Lookahead</td><td>13.77</td><td>13.56</td><td>13.46</td></tr><tr><td>Ouroboros</td><td>24.03</td><td>22.04</td><td>19.27</td></tr><tr><td rowspan="4">CNN/DM</td><td>Vanilla</td><td>8.12</td><td>8.83</td><td>8.30</td></tr><tr><td>Speculative</td><td>12.77</td><td>13.43</td><td>13.75</td></tr><tr><td>Lookahead</td><td>9.47</td><td>9.31</td><td>9.47</td></tr><tr><td>Ouroboros</td><td>14.67</td><td>14.97</td><td>14.23</td></tr><tr><td rowspan="4">WMT16</td><td>Vanilla</td><td>9.52</td><td>9.75</td><td>9.75</td></tr><tr><td>Speculative</td><td>14.72</td><td>13.91</td><td>14.28</td></tr><tr><td>Lookahead</td><td>14.65</td><td>12.05</td><td>11.91</td></tr><tr><td>Ouroboros</td><td>19.27</td><td>19.95</td><td>19.33</td></tr></table>
194
+
195
+ Table 3: The random sampling speed (token/s) compared with the greedy decoding speed (token/s), tested on Llama-2-chat 70B/7B. "temp" means the temperature used in the random sampling scenario.
196
+
197
+ $2.8 \times$ compared to speculative decoding, and $1.9 \times$ compared to lookahead decoding. Table 2 shows that Ouroboros can also get substantial speedups on typical natural language tasks, where lookahead decoding and speculative decoding can only achieve limited acceleration.
198
+
199
+ Random sampling. We test Ouroboros in the random sampling scenario using Llama-2-chat70B/7B, considering that those models after SFT are more suitable for well understanding rich semantics distributed in human natural languages and generating diverse outputs. For the sampling hyperparameters, the generation temperature is set among 0.5 and 1.0, and top-p is set to 0.8. Table 3 shows that Ouroboros can also be applied to random sampling, and the speedup over baseline methods are not much different from the observations in the greedy decoding scenario.
200
+
201
+ <table><tr><td>Method</td><td>token/s</td></tr><tr><td>Baseline</td><td>21.46</td></tr><tr><td>+ Accelerating drafting via phrases</td><td>49.90</td></tr><tr><td>+ Lengthening drafts via phrases</td><td>55.92</td></tr><tr><td>+ Generate phrases from verification</td><td>58.18</td></tr><tr><td>+ Reuse phrases from history context</td><td>61.20</td></tr></table>
202
+
203
+ ![](images/363ef86d06b0b20a19cdd1925535803c66d089ee6a06109a085899b923ae2a6b.jpg)
204
+ Figure 6: The effect of selecting $K$ phrases for Eq. (7), tested on HumanEval using Yi 34B/6B without reusing phrases from history contexts.
205
+
206
+ # 4.3 Ablation Studies and Analyses
207
+
208
+ In this section, to give a deeper insight into how Ouroboros achieves higher generation speed, we conduct ablation studies and analyses to answer the following questions.
209
+
210
+ What are the effects of each component? To demonstrate the specific speedup introduced by each mechanism, the ablation results are in Table 4. In the table, each component could bring a speedup gain, while accelerating drafting and lengthening the draft are the most effective ones.
211
+
212
+ How many phrases are needed to lengthen the draft? Verifying too many phrases might slow down the verification in real-model inference scenarios. Here comes a trade-off between more phrases for possible speedup and slower verification. In Figure 6, there exists a best $K$ value, fewer or more phrases cause slower decoding speed.
213
+
214
+ Other ablation experiments. The results of Ouroboros on different hyperparameter and length settings are show in Appendix B and Appendix E, respectively. The ablation of phrases reusing on different context locality are in Appendix F.
215
+
216
+ # 4.4 Comparing with Training-based Methods
217
+
218
+ We compare our training-free Ouroboros with the state-of-the-art training-based method Eagle (Li et al., 2024) on Spec-Bench (Xia et al., 2024). The main idea of Eagle is to specifically train a
219
+
220
+ Table 4: The ablation studies of each component in Ouroboros on HumanEval using Yi 34B/6B.
221
+
222
+ <table><tr><td rowspan="2">Spec-Bench</td><td colspan="2">Ouroboros</td><td colspan="2">Eagle</td></tr><tr><td>token/s</td><td>#accept</td><td>token/s</td><td>#accept</td></tr><tr><td>MT-Bench</td><td>24.23</td><td>5.16</td><td>28.20</td><td>3.52</td></tr><tr><td>Translation</td><td>18.91</td><td>3.92</td><td>24.23</td><td>3.16</td></tr><tr><td>Summarization</td><td>19.91</td><td>4.93</td><td>22.03</td><td>3.16</td></tr><tr><td>QA</td><td>21.63</td><td>4.67</td><td>24.83</td><td>3.23</td></tr><tr><td>Math Reasoning</td><td>25.39</td><td>4.95</td><td>29.90</td><td>3.81</td></tr><tr><td>RAG</td><td>19.00</td><td>5.43</td><td>20.56</td><td>3.54</td></tr><tr><td>Average</td><td>21.51</td><td>4.96</td><td>24.96</td><td>3.48</td></tr></table>
223
+
224
+ Table 5: The speed (token/s) comparing with training-based methods, tested on Llama-2-chat-70B. "#accept" means the number of draft tokens accepted by the target model in each iteration (on average). Ouroboros uses Llama-2-chat-7B as the draft model while Eagle uses its trained 1B model to draft.
225
+
226
+ tiny draft model under their newly-designed model architecture and generate tree-style drafts for the target LLM. In order to accelerate Llama-2-chat-70B, it trains a 1B draft model by distilling from Llama-2-chat-70B. The results in Table 5 show that, although Eagle trains a much smaller draft model with $\frac{1}{7}$ of our scale to draft, it can only achieve the speed slightly faster than our training-free method. This is because the much smaller model significantly reduces the number of draft tokens accepted by the target model in each iteration, i.e., losing draft effectiveness. We look back at the training-based methods including Eagle, they pursue ultimate drafting speed at the expense of losing draft accuracy. We, on the other hand, optimize the drafting speed while keeping the accuracy unchanged. Currently, Eagle cannot be integrated into Ouroboros since the special model architecture of their draft model only supports autoregressive token-level drafting. We believe that our method can find a better balance between drafting speed and accuracy when combined with training, which will be our future work.
227
+
228
+ # 4.5 Comparing with Phrases-based Methods
229
+
230
+ We compare Ouroboros with other phrases-based method PLD (Saxena, 2023) and REST (He et al., 2024) on Spec-Bench (Xia et al., 2024). These methods retrieve phrases from prompts or documents as drafts for the target model to verify. Ouroboros outperforms these baselines by a large margin in Table 6, which shows the effectiveness of using a draft model as an intermediary to filter away low-quality phrases before providing them to the target model.
231
+
232
+ <table><tr><td rowspan="2">Spec-Bench</td><td colspan="2">Ouroboros</td><td colspan="2">PLD</td><td colspan="2">REST</td></tr><tr><td>token/s</td><td>#accept</td><td>token/s</td><td>#accept</td><td>token/s</td><td>#accept</td></tr><tr><td>MT-Bench</td><td>24.23</td><td>5.16</td><td>13.95</td><td>1.45</td><td>14.93</td><td>1.94</td></tr><tr><td>Translation</td><td>18.91</td><td>3.92</td><td>12.99</td><td>1.41</td><td>13.02</td><td>1.57</td></tr><tr><td>Summarization</td><td>19.91</td><td>4.93</td><td>16.98</td><td>1.97</td><td>12.60</td><td>1.69</td></tr><tr><td>QA</td><td>21.63</td><td>4.67</td><td>11.33</td><td>1.26</td><td>16.10</td><td>1.96</td></tr><tr><td>Math Reasoning</td><td>25.39</td><td>4.95</td><td>15.86</td><td>1.75</td><td>13.07</td><td>1.60</td></tr><tr><td>RAG</td><td>19.00</td><td>5.43</td><td>15.51</td><td>1.64</td><td>13.28</td><td>1.91</td></tr><tr><td>Average</td><td>21.51</td><td>4.96</td><td>14.44</td><td>1.51</td><td>13.83</td><td>1.83</td></tr></table>
233
+
234
+ Table 6: The speed (token/s) comparing with phrases-based methods, tested on Llama-2-chat-70B. “#accept” means the number of draft tokens accepted by the target model in each iteration (on average).
235
+
236
+ # 5 Related Work
237
+
238
+ This section introduces existing efforts for efficient LLM inference, including efficient decoding, efficient implementation and model compression.
239
+
240
+ # 5.1 Efficient Decoding
241
+
242
+ To alleviate efficiency issues caused by autoregressive decoding, non-autoregressive decoding methods have been proposed. Instead of generating tokens one by one, non-autoregressive methods generate multiple tokens in parallel at a time (Wei et al., 2019; Guo et al., 2020; Ghazvininejad et al., 2019). These non-autoregressive methods bring an improvement in inference efficiency and also significantly hurt model performance. To this end, drafting-then-verifying methods have been proposed (Stern et al., 2018; Xia et al., 2023a; Leviathan et al., 2023; Chen et al., 2023a). The drafting-then-verifying methods avoid LLMs from serial generation and instead use them to verify drafts in a non-autoregressive parallel manner, which do not reduce model performance and significantly accelerate inference.
243
+
244
+ The key to drafting-then-verifying methods is to generate drafts quickly and well.
245
+
246
+ (1) Methods such as speculative decoding (Xia et al., 2023a; Leviathan et al., 2023; Chen et al., 2023a) use a model smaller than the target model to generate drafts. To further align the draft model with the target model, distillation techniques are applied (Miao et al., 2023; Zhou et al., 2023). Even much smaller models can be used as a draft to speed up the draft model, forming multi-staged speculative decoding (Spector and Re, 2023; Chen et al., 2023b). Apart from using different models, Self-Speculative (Zhang et al., 2024a) and PPD (Yang et al., 2023b) select part of the model layers as the draft model, while these methods require extra training or pre-processing.
247
+
248
+ (2) Some other efforts explore to use the target model itself to efficiently generate drafts. Blockwise (Stern et al., 2018) and Medusa (Cai et al., 2024) train multiple extra output heads on top of LLMs and fine-tune heads to generate multiple draft tokens in parallel. Parallel Decoding (Santilli et al., 2023) and PaSS (Monea et al., 2023) add auxiliary input suffixes such as padding tokens or learnable padding tokens to generate draft output suffixes. Lookahead Decoding (Fu et al., 2023) generates n-gram pools using Jacobi-iteration and uses those n-grams starting with the last generated token as drafts.
249
+
250
+ (3) Other methods explore to retrieve phrases from previous prompts or existing documents, such as PLD (Saxena, 2023), LLMA (Yang et al., 2023a), and REST (He et al., 2024). These methods use the target model to directly verify phrases, incurring high failure costs on each draft trial. However, we are the first to use a draft model as an intermediary to filter away low-quality phrases before providing them to the target model.
251
+
252
+ Both the above methods are insufficiently efficient, so we first introduce a small model for drafting and then further accelerate the draft process of the small model by using phrases. We list various possibilities for the sources of phrases (from draft model, from verification, and from historical contexts) in our method and conduct ablation experiments for each source. This indicates the possibility that other phrase sources (Saxena, 2023; Yang et al., 2023a; He et al., 2024) can be integrated into our framework to achieve further speedup.
253
+
254
+ Besides better generating drafts, traditional triangular attention masking can only verify one draft sentence using a complete forward pass. Tree-style verification (Miao et al., 2023; Cai et al., 2024; Fu et al., 2023) designs specific attention masking to verify multiple possible drafts at a time.
255
+
256
+ # 5.2 Efficient Implementation
257
+
258
+ The most direct solution to achieving efficient LLM inference is implementing LLMs efficiently to take advantage of hardware devices (such as GPUs). FlashDecoding (Dao et al., 2023) accelerates Transformer attention computation within LLMs by partitioning the decoding sequence into multiple small blocks and performing block-wise computation in fast GPU SRAM instead of GPU HBM. PageAttention (Kwon et al., 2023) using paged virtual memory management to organize the decoding cache during the decoding process, thereby effectively
259
+
260
+ utilizing GPU memory bandwidth to reduce the memory access overhead of inference. Tensor Parallelism (Shoeybi et al., 2019) accelerates inference by sharding matrices into distributed GPUs and performing matrix multiplications in a distributed manner. Some efforts implement LLMs by optimizing underlying operators (Nvidia, a; Wang et al., 2021; Nvidia, b) and achieve promising results. Note that these efficient implementations of LLMs and Ouroboros are orthogonal. Combining efficient implementation methods and Ouroboros can achieve more significant inference acceleration.
261
+
262
+ # 5.3 Model Compression
263
+
264
+ Model compression methods are proposed to reduce the number of operations needed for model execution. Structure pruning (Fan et al., 2020; Wang et al., 2020; Zhang et al., 2021; Xia et al., 2022) and unstructured pruning (Han et al., 2015; Chen et al., 2020; Xu et al., 2021) eliminate non-essential parameters. Quantization (Zafrir et al., 2019; Frantar et al., 2023; Lin et al., 2023; Kim et al., 2023; Stock et al., 2021) methods quantize parameters into low-bit representations. Distillation (Hinton et al., 2015; Sun et al., 2019; Jiao et al., 2020; Liu et al., 2022; Park et al., 2021) methods are used to help align those compressed models to their original versions to maintain model performance. Early-exiting (Elbayad et al., 2019; Bae et al., 2023) methods end the inference process when the output result in shallow layers reaches the confidence threshold. MoEfication (Zhang et al., 2022; Song et al., 2023) turns a dense model into a sparse activated model. Model compression and Ouroboros are also orthogonal and can be integrated for further acceleration.
265
+
266
+ # 6 Conclusion
267
+
268
+ In this paper, we propose a practical algorithm Ouroboros to improve drafting efficiency for speculative decoding. We generate phrases in a heuristic manner and use phrases to help draft models accelerate drafting and lengthen drafts. Our experiments verify that, compared to typical baselines vanilla speculative decoding and lookahead decoding, Ouroboros respectively achieves speedups of $2.8 \times$ and $1.9 \times$ and does not affect the generation quality at all. Our method is completely training-free, to make it easier to adopt for the users of speculative decoding. And the training-based version of Ouroboros towards extreme acceleration will be our next work.
269
+
270
+ # Limitations
271
+
272
+ We only focus on decoder-only model structure in the experiment. However, Ouroboros is an extendable framework, which can be applied to various model structures. Our method currently focuses on optimization in training-free scenarios. If the consistency of large and small models is improved through training in the future, our method can achieve higher acceleration. Both efficient implementation and model compression are orthogonal to our method, and can be combined for further speedup.
273
+
274
+ We only focus on the single query scenario. The application of speculative sampling in the batched inference scenario is not within the scope of this paper and can refer to (Liu et al., 2024; Qian et al., 2024; Chen et al., 2024).
275
+
276
+ # Ethical Considerations
277
+
278
+ Our method has no potential risk since we are training-free and does not affect the generation results at all.
279
+
280
+ # Acknowledgments
281
+
282
+ This work was supported by the National Key R&D Program of China (2022ZD0160501), Institute Guo Qiang at Tsinghua University. Yuxiang Huang is supported by Tsinghua University Initiative Scientific Research Program (Student Academic Research Advancement Program). We acknowledge valuable discussions with Yuhui Li, the author of EAGLE.
283
+
284
+ # References
285
+
286
+ Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, et al. 2021. Program synthesis with large language models. arXiv preprint arXiv:2108.07732.
287
+ Sangmin Bae, Jongwoo Ko, Hwanjun Song, and Se-Young Yun. 2023. Fast and robust early-exiting framework for autoregressive language models with synchronized parallel decoding. In Proceedings of EMNLP.
288
+ Xiao Bi, Deli Chen, Guanting Chen, Shanhuang Chen, Damai Dai, Chengqi Deng, Honghui Ding, Kai Dong, Qiushi Du, Zhe Fu, et al. 2024. Deepseek llm: Scaling open-source language models with longtermism. arXiv preprint arXiv:2401.02954.
289
+
290
+ Ond rej Bojar, Rajen Chatterjee, Christian Federmann, Yvette Graham, Barry Haddow, Matthias Huck, Antonio Jimeno Yepes, Philipp Koehn, Varvara Logacheva, Christof Monz, Matteo Negri, Aurelie Neveol, Mariana Neves, Martin Popel, Matt Post, Raphael Rubino, Carolina Scarton, Lucia Specia, Marco Turchi, Karin Verspoor, and Marcos Zampieri. 2016. Findings of the 2016 conference on machine translation. In Proceedings of the First Conference on Machine Translation, pages 131-198.
291
+ Tianle Cai, Yuhong Li, Zhengyang Geng, Hongwu Peng, Jason D. Lee, Deming Chen, and Tri Dao. 2024. Medusa: Simple llm inference acceleration framework with multiple decoding heads. arXiv preprint arXiv: 2401.10774.
292
+ Charlie Chen, Sebastian Borgeaud, Geoffrey Irving, Jean-Baptiste Lespiau, Laurent Sifre, and John Jumper. 2023a. Accelerating large language model decoding with speculative sampling. arXiv preprint arXiv:2302.01318.
293
+ Jian Chen, Vashisth Tiwari, Ranajoy Sadhukhan, Zhuoming Chen, Jinyuan Shi, Ian En-Hsu Yen, and Beidi Chen. 2024. Magicdec: Breaking the latency-throughput tradeoff for long context generation with speculative decoding. arXiv preprint arXiv:2408.11049.
294
+ Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. 2021. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374.
295
+ Tianlong Chen, Jonathan Frankle, Shiyu Chang, Sijia Liu, Yang Zhang, Zhangyang Wang, and Michael Carbin. 2020. The lottery ticket hypothesis for pretrained bert networks. In Proceedings of NeurIPS, pages 15834-15846.
296
+ Ziyi Chen, Xiaocong Yang, Jiacheng Lin, Chenkai Sun, Jie Huang, and Kevin Chen-Chuan Chang. 2023b. Cascade speculative drafting for even faster llm inference. arXiv preprint arXiv:2312.11462.
297
+ Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, Christopher Hesse, and John Schulman. 2021. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168.
298
+ Tri Dao, Daniel Haziza, Francisco Massa, and Grigory Sizov. 2023. Flash-decoding for long-context inference.
299
+ Maha Elbayad, Jiatao Gu, Edouard Grave, and Michael Auli. 2019. Depth-adaptive transformer. In Proceedings of ICLR.
300
+ Angela Fan, Edouard Grave, and Armand Joulin. 2020. Reducing transformer depth on demand with structured dropout. In Proceedings of ICLR.
301
+
302
+ Elias Frantar, Saleh Ashkboos, Torsten Hoefler, and Dan Alistarh. 2023. Gptq: Accurate quantization for generative pre-trained transformers. In Proceedings of ICLR.
303
+ Yichao Fu, Peter Bailis, Ion Stoica, and Hao Zhang. 2023. Breaking the sequential dependency of llm inference using lookahead decoding.
304
+ Marjan Ghazvininejad, Omer Levy, Yinhan Liu, and Luke Zettlemoyer. 2019. Mask-predict: Parallel decoding of conditional masked language models. arXiv preprint arXiv:1904.09324.
305
+ Junliang Guo, Linli Xu, and Enhong Chen. 2020. Jointly masked sequence-to-sequence model for non-autoregressive neural machine translation. In Proceedings of ACL, pages 376-385.
306
+ Song Han, Jeff Pool, John Tran, and William J. Dally. 2015. Learning both weights and connections for efficient neural network. In Proceedings of NeurIPS, pages 1135-1143.
307
+ Zhenyu He, Zexuan Zhong, Tianle Cai, Jason Lee, and Di He. 2024. REST: Retrieval-based speculative decoding. In Proceedings of NAACL, pages 1582-1595.
308
+ Karl Moritz Hermann, Tomás Kocisky, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. 2015. Teaching machines to read and comprehend. In Proceedings of NeurIPS, pages 1693-1701.
309
+ Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. 2015. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531.
310
+ Xiaoqi Jiao, Yichun Yin, Lifeng Shang, Xin Jiang, Xiao Chen, Linlin Li, Fang Wang, and Qun Liu. 2020. TinyBERT: Distilling BERT for natural language understanding. In Findings of EMNLP, pages 4163-4174.
311
+ Sehoon Kim, Coleman Hooper, Amir Gholami, Zhen Dong, Xiuyu Li, Sheng Shen, Michael W Mahoney, and Kurt Keutzer. 2023. Squeezeellm: Dense-and-sparse quantization. arXiv preprint arXiv:2306.07629.
312
+ Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph E. Gonzalez, Hao Zhang, and Ion Stoica. 2023. Efficient memory management for large language model serving with pagedattention. In Proceedings of SOSP.
313
+ Yaniv Leviathan, Matan Kalman, and Yossi Matias. 2023. Fast inference from transformers via speculative decoding. In Proceedings of ICML, pages 19274-19286.
314
+ Yuhui Li, Fangyun Wei, Chao Zhang, and Hongyang Zhang. 2024. Eagle: Speculative sampling requires rethinking feature uncertainty. In Proceedings of ICML.
315
+
316
+ Ji Lin, Jiaming Tang, Haotian Tang, Shang Yang, Xingyu Dang, and Song Han. 2023. Awq: Activation-aware weight quantization for lIm compression and acceleration. arXiv preprint arXiv:2306.00978.
317
+ Chang Liu, Chongyang Tao, Jiazhan Feng, and Dongyan Zhao. 2022. Multi-granularity structural knowledge distillation for language model compression. In Proceedings of ACL, pages 1001-1011.
318
+ Xiaoxuan Liu, Cade Daniel, Langxiang Hu, Woosuk Kwon, Zhuohan Li, Xiangxi Mo, Alvin Cheung, Zhijie Deng, Ion Stoica, and Hao Zhang. 2024. Optimizing speculative decoding for serving large language models using goodput. arXiv preprint arXiv:2406.14066.
319
+ Xupeng Miao, Gabriele Oliaro, Zhihao Zhang, Xinhao Cheng, Zeyu Wang, Rae Ying Yee Wong, Zhuoming Chen, Daiyaan Arfeen, Reyna Abhyankar, and Zhihao Jia. 2023. Specinfer: Accelerating generative llm serving with speculative inference and token tree verification. arXiv preprint arXiv:2305.09781.
320
+ Giovanni Monea, Armand Joulin, and Edouard Grave. 2023. Pass: Parallel speculative sampling. arXiv preprint arXiv:2311.13581.
321
+ Nvidia. a. Fastertransformer.
322
+ Nvidia. b. Tensortt-llm.
323
+ Geondo Park, Gyeongman Kim, and Eunho Yang. 2021. Distilling linguistic context for language model compression. In Proceedings of EMNLP, pages 364-378.
324
+ Haifeng Qian, Sujan Kumar Gonugondla, Sungsoo Ha, Mingyue Shang, Sanjay Krishna Gouda, Ramesh Nallapati, Sudipta Sengupta, Xiaofei Ma, and Anoop Deoras. 2024. Bass: Batched attention-optimized speculative sampling. arXiv preprint arXiv:2404.15778.
325
+ Jeff Rasley, Samyam Rajbhandari, Olatunjri Ruwase, and Yuxiong He. 2020. Deepspeed: System optimizations enable training deep learning models with over 100 billion parameters. In Proceedings of SIGKDD, pages 3505-3506.
326
+ Baptiste Roziere, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Xiaqing Ellen Tan, Yossi Adi, Jingyu Liu, Tal Remez, Jérémy Rapin, et al. 2023. Code llama: Open foundation models for code. arXiv preprint arXiv:2308.12950.
327
+ Andrea Santilli, Silvio Severino, Emilian Postolache, Valentino Maiorca, Michele Mancusi, Riccardo Marin, and Emanuele Rodola. 2023. Accelerating transformer inference for translation via parallel decoding. arXiv preprint arXiv:2305.10427.
328
+ Apoorv Saxena. 2023. Prompt lookup decoding.
329
+ Abigail See, Peter J. Liu, and Christopher D. Manning. 2017. Get to the point: Summarization with pointer-generator networks. In Proceedings of ACL, pages 1073-1083.
330
+
331
+ Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper, and Bryan Catanzaro. 2019. Megatron-lm: Training multi-billion parameter language models using model parallelism. arXiv preprint arXiv:1909.08053.
332
+ Yixin Song, Zeyu Mi, Haotong Xie, and Haibo Chen. 2023. Powerinfer: Fast large language model serving with a consumer-gradegpu. arXiv preprint arXiv:2312.12456.
333
+ Benjamin Spector and Chris Re. 2023. Accelerating llm inference with staged speculative decoding. arXiv preprint arXiv:2308.04623.
334
+ Mitchell Stern, Noam Shazeer, and Jakob Uszkoreit. 2018. Blockwise parallel decoding for deep autoregressive models. volume 31.
335
+ Pierre Stock, Angela Fan, Benjamin Graham, Edouard Grave, Rémi Gribonval, Herve Jegou, and Armand Joulin. 2021. Training with quantization noise for extreme model compression. In Proceedings of ICLR.
336
+ Siqi Sun, Yu Cheng, Zhe Gan, and Jingjing Liu. 2019. Patient knowledge distillation for BERT model compression. In Proceedings EMNLP-IJCNLP, pages 4323-4332.
337
+ 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.
338
+ Xiaohui Wang, Ying Xiong, Yang Wei, Mingxuan Wang, and Lei Li. 2021. LightSeq: A high performance inference library for transformers. In Proceedings of NAACL, pages 113-120.
339
+ Ziheng Wang, Jeremy Wohlwend, and Tao Lei. 2020. Structured pruning of large language models. In Proceedings of EMNLP, pages 6151-6162.
340
+ Bingzhen Wei, Mingxuan Wang, Hao Zhou, Junyang Lin, Jun Xie, and Xu Sun. 2019. Imitation learning for non-autoregressive neural machine translation. arXiv preprint arXiv:1906.02041.
341
+ Heming Xia, Tao Ge, Peiyi Wang, Si-Qing Chen, Furu Wei, and Zhifang Sui. 2023a. Speculative decoding: Exploiting speculative execution for accelerating seq2seq generation. In Proceedings of EMNLP, pages 3909-3925.
342
+ Heming Xia, Zhe Yang, Qingxiu Dong, Peiyi Wang, Yongqi Li, Tao Ge, Tianyu Liu, Wenjie Li, and Zhifang Sui. 2024. Unlocking efficiency in large language model inference: A comprehensive survey of speculative decoding. arXiv preprint arXiv:2401.07851.
343
+ Mengzhou Xia, Tianyu Gao, Zhiyuan Zeng, and Danqi Chen. 2023b. Sheared llama: Accelerating language model pre-training via structured pruning. arXiv preprint arXiv:2310.06694.
344
+
345
+ Mengzhou Xia, Zexuan Zhong, and Danqi Chen. 2022. Structured pruning learns compact and accurate models. In Proceedings of ACL, pages 1513-1528.
346
+ Dongkuan Xu, Ian En-Hsu Yen, Jinxi Zhao, and Zhibin Xiao. 2021. Rethinking network pruning – under the pre-train and fine-tune paradigm. In Proceedings of NAACL, pages 2376–2382.
347
+ Nan Yang, Tao Ge, Liang Wang, Binxing Jiao, Daxin Jiang, Linjun Yang, Rangan Majumder, and Furu Wei. 2023a. Inference with reference: Lossless acceleration of large language models. arXiv preprint arXiv:2304.04487.
348
+ Seongjun Yang, Gibbeum Lee, Jaewoong Cho, Dimitris Papailiopoulos, and Kangwook Lee. 2023b. Predictive pipelined decoding: A compute-latency trade-off for exact llm decoding. arXiv preprint arXiv:2307.05908.
349
+ Alex Young, Bei Chen, Chao Li, Chengen Huang, Ge Zhang, Guanwei Zhang, Heng Li, Jiangcheng Zhu, Jianqun Chen, Jing Chang, et al. 2024. Yi: Open foundation models by 01. ai. arXiv preprint arXiv:2403.04652.
350
+ Ofir Zafrir, Guy Boudoukh, Peter Izsak, and Moshe Wasserblat. 2019. Q8bert: Quantized 8bit bert. In Proceedings of EMC2-NIPS, pages 36-39.
351
+ Jun Zhang, Jue Wang, Huan Li, Lidan Shou, Ke Chen, Gang Chen, and Sharad Mehrotra. 2024a. Draft& verify: Lossless large language model acceleration via self-speculative decoding. In Proceedings of ACL, pages 11263-11282.
352
+ Peiyuan Zhang, Guangtao Zeng, Tianduo Wang, and Wei Lu. 2024b. Tinyllama: An open-source small language model. arXiv preprint arXiv:2401.02385.
353
+ Zhengyan Zhang, Yankai Lin, Zhiyuan Liu, Peng Li, Maosong Sun, and Jie Zhou. 2022. MoEfication: Transformer feed-forward layers are mixtures of experts. In Findings of ACL, pages 877-890.
354
+ Zhengyan Zhang, Fanchao Qi, Zhiyuan Liu, Qun Liu, and Maosong Sun. 2021. Know what you don't need: Single-shot meta-pruning for attention heads. volume 2, pages 36-42.
355
+ Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric Xing, et al. 2024. Judging llm-as-a-judge with mt-bench and chatbot arena. Proceedings of NeurIPS, 36.
356
+ Yongchao Zhou, Kaifeng Lyu, Ankit Singh Rawat, Aditya Krishna Menon, Afshin Rostamizadeh, Sanjiv Kumar, Jean-Francois Kagy, and Rishabh Agarwal. 2023. Distillspec: Improving speculative decoding via knowledge distillation. arXiv preprint arXiv:2310.08461.
357
+
358
+ # A Ouroboros does not cause any performance degradation
359
+
360
+ <table><tr><td colspan="2">Model</td><td>Yi 34B/6B</td><td>DeepSeek 33b/6.7B</td><td>CodeLlama 34B/7B</td></tr><tr><td rowspan="4">HumanEval</td><td>Greedy</td><td>18.3</td><td>64.6</td><td>36.0</td></tr><tr><td>Speculative</td><td>18.9</td><td>64.6</td><td>36.0</td></tr><tr><td>Lookahead</td><td>18.9</td><td>64.6</td><td>36.0</td></tr><tr><td>Ouroboros</td><td>18.9</td><td>64.6</td><td>36.0</td></tr><tr><td rowspan="4">MBPP</td><td>Greedy</td><td>37.8</td><td>70.0</td><td>46.6</td></tr><tr><td>Speculative</td><td>38.9</td><td>71.1</td><td>46.6</td></tr><tr><td>Lookahead</td><td>38.9</td><td>71.1</td><td>46.6</td></tr><tr><td>Ouroboros</td><td>38.9</td><td>71.1</td><td>46.6</td></tr></table>
361
+
362
+ Table 7: Task performance of HumanEval and MBPP of Greedy, Speculative, Lookahead and Ouroboros using greedy generation. We report Accuracy $(\%)$ of HumanEval and MBPP.
363
+
364
+ <table><tr><td colspan="2">Model</td><td>Yi 34B/6B</td><td>Llama 70B/7B</td></tr><tr><td rowspan="4">GSM8K</td><td>Greedy</td><td>61.0</td><td>66.0</td></tr><tr><td>Speculative</td><td>61.0</td><td>66.0</td></tr><tr><td>Lookahead</td><td>61.0</td><td>66.0</td></tr><tr><td>Ouroboros</td><td>61.0</td><td>65.0</td></tr><tr><td rowspan="4">CNN/DM</td><td>Greedy</td><td>35.2</td><td>37.1</td></tr><tr><td>Speculative</td><td>35.1</td><td>37.2</td></tr><tr><td>Lookahead</td><td>35.3</td><td>37.1</td></tr><tr><td>Ouroboros</td><td>35.3</td><td>37.1</td></tr><tr><td rowspan="4">WMT16</td><td>Greedy</td><td>21.7</td><td>31.1</td></tr><tr><td>Speculative</td><td>21.9</td><td>31.1</td></tr><tr><td>Lookahead</td><td>22.0</td><td>31.1</td></tr><tr><td>Ouroboros</td><td>21.1</td><td>31.1</td></tr></table>
365
+
366
+ Table 7, 8 and 9 show the task performance of the experiments shown in Figure 5 and Table 2. Theoretically, Speculative Decoding, Lookahead Decoding and Ouroboros generates the same token sequences compared with vanilla Decoding. We observe no overall performance degradation of Ouroboros from Table 7, 8 and 9. The small difference in task performance among vanilla, Speculative, Lookahead and Ouroboros is caused by floating point error, since the calculations are not fully the same between the methods (especially the calculation order of attention). The experimental results show that the calculation error would not cause notable performance degradation.
367
+
368
+ Table 8: Task performance of GSM8K, CNN/DM and WMT16 of Greedy, Speculative, Lookahead and Ouroboros using greedy generation. We report Accuracy of GSM8K(%, Rouge1 score(%) of CNN/DM and BLEU score(%) of WMT16.
369
+
370
+ <table><tr><td colspan="2">Model</td><td>Yi 34B/6B</td></tr><tr><td rowspan="4">HumanEval</td><td>Random Sampling</td><td>15.9</td></tr><tr><td>Speculative</td><td>18.9</td></tr><tr><td>Lookahead</td><td>18.9</td></tr><tr><td>Ouroboros</td><td>17.7</td></tr><tr><td rowspan="4">MBPP</td><td>Random Sampling</td><td>36.7</td></tr><tr><td>Speculative</td><td>33.3</td></tr><tr><td>Lookahead</td><td>35.6</td></tr><tr><td>Ouroboros</td><td>36.7</td></tr><tr><td rowspan="4">GSM8K</td><td>Random Sampling</td><td>67.0</td></tr><tr><td>Speculative</td><td>70.0</td></tr><tr><td>Lookahead</td><td>69.0</td></tr><tr><td>Ouroboros</td><td>69.0</td></tr><tr><td rowspan="4">CNN/DM</td><td>Random Sampling</td><td>34.6</td></tr><tr><td>Speculative</td><td>34.0</td></tr><tr><td>Lookahead</td><td>34.6</td></tr><tr><td>Ouroboros</td><td>35.6</td></tr><tr><td rowspan="4">WMT16</td><td>Random Sampling</td><td>20.6</td></tr><tr><td>Speculative</td><td>21.2</td></tr><tr><td>Lookahead</td><td>22.7</td></tr><tr><td>Ouroboros</td><td>25.0</td></tr></table>
371
+
372
+ # B Hyperparameters
373
+
374
+ $W$ is a hyperparameter used in Lookahead Decoding to generate phrases. Larger $W$ indicates more phrases are generated in each forward of our draft model in Ouroboros, but may also be more time-consuming.
375
+
376
+ To investigate hyperparameters sensitivity, we conduct a grid search on $\gamma$ , $W$ and $\beta$ on GSM8K with Yi-34B/6B. We report token/s of each setting.
377
+
378
+ Table 9: Task performance using random sampling. We report accuracy for HumanEval, MBPP and GSM8K, Rouge 1 score for CNN/DM and BLEU score for WMT16.
379
+
380
+ <table><tr><td rowspan="2"></td><td colspan="3">W=14</td><td colspan="3">W=15</td><td colspan="3">W=16</td></tr><tr><td>β=5</td><td>��=6</td><td>β=7</td><td>β=5</td><td>β=6</td><td>β=7</td><td>β=5</td><td>β=6</td><td>β=7</td></tr><tr><td>γ=3</td><td>28.17</td><td>28.07</td><td>27.30</td><td>27.97</td><td>28.23</td><td>27.38</td><td>28.34</td><td>27.64</td><td>27.21</td></tr><tr><td>γ=4</td><td>28.52</td><td>28.42</td><td>27.91</td><td>29.06</td><td>28.77</td><td>28.23</td><td>29.00</td><td>28.68</td><td>27.64</td></tr><tr><td>γ=5</td><td>28.13</td><td>29.32</td><td>28.20</td><td>28.31</td><td>28.96</td><td>27.99</td><td>27.94</td><td>29.03</td><td>27.90</td></tr><tr><td colspan="4">token/s std: 0.57</td><td colspan="6">speedup std: 0.04</td></tr></table>
381
+
382
+ Table 10: The results of grid search where $\gamma \in [3,5], W \in [14,16], \beta \in [5,7]$ . "std" represents the standard deviation.
383
+
384
+ Table 10 shows that Ouroboros is stable to hyperparameters. This provides an opportunity to provide a general recipe or conduct heuristic search instead of grid search to find a good combination of hyperparameters within a short time.
385
+
386
+ # B.1 Hyperparameters Recipe
387
+
388
+ Here, we offer a general recipe for hyperparameter tuning in Table 11. We distinguish downstream tasks into two types: (1) HH: High homogeneity between draft and target model, e.g. code genera
389
+
390
+ tion; (2) LH: Low homogeneity between draft and target model, e.g. machine translation.
391
+
392
+ <table><tr><td>Tasks</td><td>γ</td><td>W</td><td>β</td><td>K</td></tr><tr><td>HH</td><td>7 ~ 14</td><td>15 ~ 20</td><td>5 ~ 7</td><td>3 ~ 5</td></tr><tr><td>LH</td><td>2 ~ 6</td><td>15 ~ 20</td><td>5 ~ 7</td><td>3 ~ 5</td></tr></table>
393
+
394
+ # B.2 Hyperparameters Tuning
395
+
396
+ According to the stability of hyperparameters, we conduct a heuristic search to find a good combination. The algorithm of the heuristic search is described in Algorithm 1.
397
+
398
+ Algorithm 1: Heuristic Search of Hyperparameters
399
+ Input: Task type $T$ Dataset $D$ Objective function $f$ Output: Hyperparameters $\gamma ,W,\beta ,K$ $K_{0}\coloneqq 3 / / K$ is always 3 in our experiments $\hat{W}\sim [15,20]$ $\hat{\beta}\sim [5,7]$ if $T = HH$ then $\hat{\gamma}\sim [7,14]$ else $\hat{\gamma}\sim [2,6]$ end if $\gamma_0\coloneqq \arg \min_\gamma \mathrm{ClockTime}(f(D;\hat{\gamma},\hat{W},\hat{\beta},K_0))$ $W_{0}\coloneqq \arg \min_{W}\mathrm{ClockTime}(f(D;\gamma_{0},\hat{W},\hat{\beta},K_{0}))$ $\beta_0\coloneqq \arg \min_{\beta}\mathrm{ClockTime}(f(D;\gamma_0,W_0,\hat{\beta},K_0))$ return $\gamma_0,W_0,\beta_0,K_0$
400
+
401
+ # B.3 Hyperparameters Used in Our Experiment
402
+
403
+ The hyperparameters of our experiments are shown in Table 12. In Table 4, we use $\gamma = 12$ , $W = 20$ , $\beta = 8$ and $K = 3$ . In Figure 6, we use $\gamma = 12$ , $W = 20$ , $\beta = 8$ . In Table 17, we use $\gamma = 6$ , $W = 18$ , $\beta = 6$ and $K = 3$ . In Table 13, we follow the hyperparameters in Table 12.
404
+
405
+ # C Block Efficiency
406
+
407
+ In order to show the potential of further systematic optimization, we follow Miao et al. (2023) to test the Block Efficiency, with the hypothesis that the drafting time can be fully ignored. Block efficiency is the theoretical upper bound of the acceleration ratio, without considering any resource constraints.
408
+
409
+ Definition C.1 (Block Efficiency). Define Block Efficiency $\eta$ as
410
+
411
+ $$
412
+ \eta = \frac {\# \text {G e n e r a t e d t o k e n s}}{\# \text {T a r g e t m o d e l c a l l s}}
413
+ $$
414
+
415
+ Table 11: An empirical recipe for hyperparameters tuning.
416
+
417
+ <table><tr><td rowspan="2">Task</td><td rowspan="2">Model</td><td rowspan="2">Speculative γ</td><td rowspan="2">Lookahead W</td><td rowspan="2">β</td><td colspan="4">Ouroboros</td></tr><tr><td>γ</td><td>W</td><td>β</td><td>K</td></tr><tr><td rowspan="3">HumanEval</td><td>Yi-34B/6B</td><td>12</td><td>16</td><td>7</td><td>12</td><td>20</td><td>8</td><td>3</td></tr><tr><td>DeepSeek-33b/6.7B</td><td>3</td><td>16</td><td>7</td><td>11</td><td>20</td><td>8</td><td>3</td></tr><tr><td>CodeLlama-34B/7B</td><td>5</td><td>17</td><td>5</td><td>10</td><td>20</td><td>7</td><td>3</td></tr><tr><td rowspan="3">MBPP</td><td>Yi-34B/6B</td><td>6</td><td>16</td><td>6</td><td>6</td><td>18</td><td>6</td><td>3</td></tr><tr><td>DeepSeek-33b/6.7B</td><td>5</td><td>15</td><td>7</td><td>7</td><td>15</td><td>6</td><td>3</td></tr><tr><td>CodeLlama-34B/7B</td><td>4</td><td>16</td><td>6</td><td>8</td><td>16</td><td>7</td><td>3</td></tr><tr><td rowspan="2">GSM8K</td><td>Yi-34B/6B</td><td>7</td><td>15</td><td>6</td><td>4</td><td>15</td><td>7</td><td>3</td></tr><tr><td>Llama-70B/7B</td><td>7</td><td>15</td><td>6</td><td>6</td><td>17</td><td>7</td><td>3</td></tr><tr><td rowspan="2">CNN/DM</td><td>Yi-34B/6B</td><td>5</td><td>15</td><td>6</td><td>10</td><td>15</td><td>6</td><td>3</td></tr><tr><td>Llama-70B/7B</td><td>4</td><td>16</td><td>5</td><td>4</td><td>13</td><td>6</td><td>3</td></tr><tr><td rowspan="2">WMT16</td><td>Yi-34B/6B</td><td>2</td><td>15</td><td>6</td><td>5</td><td>16</td><td>6</td><td>3</td></tr><tr><td>Llama-70B/7B</td><td>5</td><td>18</td><td>7</td><td>4</td><td>13</td><td>6</td><td>3</td></tr></table>
418
+
419
+ We measure Block Efficiency with Yi-34B/6B on all 5 datasets following the settings of Figure 5 and Table 2. Results are in Table 13.
420
+
421
+ Table 12: Hyperparameters of experiments in Figure 5 and Table 2.
422
+
423
+ <table><tr><td></td><td>Speculative</td><td>Lookahead</td><td>Ouroboros</td></tr><tr><td>HumanEval</td><td>11.16</td><td>3.08</td><td>13.12</td></tr><tr><td>MBPP</td><td>6.14</td><td>2.71</td><td>7.43</td></tr><tr><td>GSM8K</td><td>5.23</td><td>2.30</td><td>4.65</td></tr><tr><td>CNN/DM</td><td>4.71</td><td>1.70</td><td>7.46</td></tr><tr><td>WMT16</td><td>2.41</td><td>1.37</td><td>4.05</td></tr></table>
424
+
425
+ Table 13: The Block Efficiency $\eta$ of Yi-34B/6B on HumanEval, MBPP, GSM8K, CNN/DM and WMT16. The method with largest $\eta$ is highlighted with the bold font, and the second largest result is with the underlined font.
426
+
427
+ From Tabel 13, Ouroboros has relatively high Block Efficiency in most scenarios, showing that it has a larger ideal speedup ratio that may be achieved by future algorithms or systematic implementation.
428
+
429
+ # D Comparing with other draft-accelerated methods
430
+
431
+ Cascade Speculative Decoding (Chen et al., 2023b) is a typical method that accelerates the draft model in speculative decoding by further using an even smaller model to draft for the draft model. The comparison between Ouroboros and Cascade is described in Table 14. Results show that Ouroboros outperforms Cascade, showing that the way we accelerate the draft is more efficient.
432
+
433
+ Cascade performs slower than the original speculative decoding. One possible reason is that the tiny models which are utilized to accelerate the Llama-2-7B model, i.e. Llama-160M (Miao et al., 2023) and TinyLlama-1.1B (Zhang et al., 2024b), are not officially trained by Meta. This has led to discrep
434
+
435
+ ancies in the model's output, thereby slowing down the drafting process.
436
+
437
+ <table><tr><td>Method</td><td>Model Series</td><td>token/s</td></tr><tr><td>Speculative</td><td>7B→70B</td><td>16.86</td></tr><tr><td>Cascade</td><td>160M→7B→70B</td><td>7.90</td></tr><tr><td>Cascade</td><td>1.1B→7B→70B</td><td>9.22</td></tr><tr><td>Ouroboros</td><td>7B→70B</td><td>24.03</td></tr></table>
438
+
439
+ # E Ouroboros under various generation lengths
440
+
441
+ To investigate the speedup ratio under different generation length limits, we conduct the following experiment with generation length limits 64, 128, 256, and 512. This experiment is performed on GSM8K with Yi-34B/6B, with other hyperparameters aligned with Table 12.
442
+
443
+ Table 14: Comparing with various cascade versions of speculative decoding, tested on GSM8K.
444
+
445
+ <table><tr><td colspan="2"></td><td>Greedy</td><td>Speculative</td><td>Lookahead</td><td>Ouroboros</td></tr><tr><td rowspan="2">l=64</td><td>token/s</td><td>14.31</td><td>20.18</td><td>20.20</td><td>30.99</td></tr><tr><td>speedup</td><td>1.00</td><td>1.41</td><td>1.41</td><td>2.17</td></tr><tr><td rowspan="2">l=128</td><td>token/s</td><td>14.57</td><td>21.90</td><td>22.68</td><td>35.32</td></tr><tr><td>speedup</td><td>1.00</td><td>1.50</td><td>1.56</td><td>2.42</td></tr><tr><td rowspan="2">l=256</td><td>token/s</td><td>14.41</td><td>22.12</td><td>24.58</td><td>38.36</td></tr><tr><td>speedup</td><td>1.00</td><td>1.54</td><td>1.71</td><td>2.66</td></tr><tr><td rowspan="2">l=512</td><td>token/s</td><td>15.35</td><td>21.45</td><td>25.14</td><td>40.94</td></tr><tr><td>speedup</td><td>1.00</td><td>1.40</td><td>1.64</td><td>2.67</td></tr></table>
446
+
447
+ Table 15: Speedup with multiple generation lengths. "l" represents generation length limit.
448
+
449
+ <table><tr><td></td><td>Greedy</td><td>Speculative</td><td>Lookahead</td><td>Ouroboros</td></tr><tr><td>l = 64</td><td>44.51</td><td>44.51</td><td>44.51</td><td>44.51</td></tr><tr><td>l = 128</td><td>60.98</td><td>60.98</td><td>60.98</td><td>60.98</td></tr><tr><td>l = 256</td><td>64.02</td><td>64.02</td><td>63.41</td><td>63.41</td></tr><tr><td>l = 512</td><td>64.63</td><td>64.63</td><td>64.02</td><td>64.63</td></tr></table>
450
+
451
+ Table 16: Task performance (accuracy) with multiple generation lengths. "l" represents generation length limit.
452
+
453
+ From Table 15, Ouroboros outperforms autoregressive decoding, Speculative decoding, and Lookahead decoding under various lengths. In Table 16, short generation length limit ( $l = 64$ , 128) results in answer truncation, which leads to significant lower task performance. Close task performances and speedup ratios are achieved in $l = 256$ , 512, showing that all algorithms halt immediately after generating “<EOS>”.
454
+
455
+ Two conclusions can be obtained. First, the length limits used in our experiments are reasonable, as shorter length limits result in ill-generated
456
+
457
+ ![](images/fe7fe177813b0a1d74239aec06a0f3e0ca7fac10474e09c57f77eb76c21de56f.jpg)
458
+ Figure 7: The ablation studies on context locality. In our experiments, the task 1,2,3,4 are MBPP, GSM8K, CNN/DM, and WMT16, respectively.
459
+
460
+ answers. Second, phrase repetition in the generation is not the reason why Ouroboros achieves such a high speedup. If so, we would be able to observe lower task performance and much higher speedup from $l = 256$ to $l = 512$ .
461
+
462
+ # F Context Locality
463
+
464
+ We further study how context locality accelerate generation through the reused phases from history.
465
+
466
+ Context locality remains very high when continually generating within one task, but may vary across different datasets. For example, the phrases pool should contain code pieces when running on code generation datasets such as HumanEval and MBPP, but it might contain natural language pieces when generating text. It remains a question that whether one type of language pieces could accelerate another type of language's generation. We conduct the following experiments to further investigate to what extent and how context locality can accelerate generation through reusing phrases from history.
467
+
468
+ We select four datasets: MBPP, GSM8K, CNN/DM, and WMT16, corresponding to code generation, arithmetic reasoning, document summarization, and machine translation, and sample 20 entries from each dataset to organize a new dataset containing different domains. We evaluate Ouroboros with multiple evaluation order, from which we could change context locality. We define consecutive number CN as how many entries from the same dataset are tested consecutively, as shown in Figure 7. In the "shuffle" configuration, we randomize the order of data entries. Higher CN indicates a better locality, and the "shuffle" configuration should have the worst locality. We then measure the generation speed in different CN configurations or random shuffling.
469
+
470
+ Table 17 shows that context locality indeed affects the effectiveness of phrases reusing. With phrases reusing, $\mathrm{CN} = 20$ leads to faster decoding
471
+
472
+ <table><tr><td>Setting</td><td>shuffle</td><td>CN=20</td><td>shuffle</td><td>CN=20</td><td>CN=10</td><td>CN=4</td><td>CN = 1</td></tr><tr><td>Phrases Reusing</td><td>off</td><td>off</td><td>on</td><td>on</td><td>on</td><td>on</td><td>on</td></tr><tr><td>token/s</td><td>32.68</td><td>32.53</td><td>35.39</td><td>36.00</td><td>35.32</td><td>34.83</td><td>35.36</td></tr></table>
473
+
474
+ Table 17: The results of ablation studies on context locality. "CN" stands for consecutive number.
475
+
476
+ compared to the shuffle setting. However, the effect caused by context locality is smaller than whether to turn on the phrases reusing. The speed of lower CN is similar to the shuffle setting when applying phrases reusing, but both are approximately 3 token/s faster compared to the cold start setting, proving that the phrases pool is still effective across multiple tasks.
2024/Ouroboros_ Generating Longer Drafts Phrase by Phrase for Faster Speculative Decoding/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6d9cbdcad82fbeb013167b32de45aefeeaf7ba01ba2beff7d5a7fc4df8d921b6
3
+ size 798036
2024/Ouroboros_ Generating Longer Drafts Phrase by Phrase for Faster Speculative Decoding/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Outcome-Constrained Large Language Models for Countering Hate Speech/78d433df-4deb-4fac-a059-d56966a36e8b_content_list.json ADDED
@@ -0,0 +1,1818 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Outcome-Constrained Large Language Models for Countering Hate Speech",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 115,
8
+ 83,
9
+ 882,
10
+ 104
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Lingzi Hong",
17
+ "bbox": [
18
+ 277,
19
+ 115,
20
+ 389,
21
+ 131
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "University of North Texas",
28
+ "bbox": [
29
+ 226,
30
+ 131,
31
+ 440,
32
+ 147
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "lingzi.hong@unt.edu",
39
+ "bbox": [
40
+ 218,
41
+ 149,
42
+ 450,
43
+ 162
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "Pengcheng Luo",
50
+ "bbox": [
51
+ 596,
52
+ 115,
53
+ 734,
54
+ 131
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "Peking University",
61
+ "bbox": [
62
+ 591,
63
+ 131,
64
+ 739,
65
+ 147
66
+ ],
67
+ "page_idx": 0
68
+ },
69
+ {
70
+ "type": "text",
71
+ "text": "luopc@oku.edu.cn",
72
+ "bbox": [
73
+ 569,
74
+ 149,
75
+ 763,
76
+ 162
77
+ ],
78
+ "page_idx": 0
79
+ },
80
+ {
81
+ "type": "text",
82
+ "text": "Eduardo Blanco",
83
+ "bbox": [
84
+ 258,
85
+ 181,
86
+ 403,
87
+ 195
88
+ ],
89
+ "page_idx": 0
90
+ },
91
+ {
92
+ "type": "text",
93
+ "text": "University of Arizona",
94
+ "bbox": [
95
+ 240,
96
+ 197,
97
+ 421,
98
+ 212
99
+ ],
100
+ "page_idx": 0
101
+ },
102
+ {
103
+ "type": "text",
104
+ "text": "eduardoblanco@arizona.edu",
105
+ "bbox": [
106
+ 178,
107
+ 215,
108
+ 482,
109
+ 229
110
+ ],
111
+ "page_idx": 0
112
+ },
113
+ {
114
+ "type": "text",
115
+ "text": "Xiaoying Song",
116
+ "bbox": [
117
+ 601,
118
+ 181,
119
+ 729,
120
+ 197
121
+ ],
122
+ "page_idx": 0
123
+ },
124
+ {
125
+ "type": "text",
126
+ "text": "University of North Texas",
127
+ "bbox": [
128
+ 559,
129
+ 198,
130
+ 771,
131
+ 212
132
+ ],
133
+ "page_idx": 0
134
+ },
135
+ {
136
+ "type": "text",
137
+ "text": "XiaoyingSong@my.unt.edu",
138
+ "bbox": [
139
+ 524,
140
+ 215,
141
+ 805,
142
+ 230
143
+ ],
144
+ "page_idx": 0
145
+ },
146
+ {
147
+ "type": "text",
148
+ "text": "Abstract",
149
+ "text_level": 1,
150
+ "bbox": [
151
+ 260,
152
+ 252,
153
+ 339,
154
+ 267
155
+ ],
156
+ "page_idx": 0
157
+ },
158
+ {
159
+ "type": "text",
160
+ "text": "Automatic counterspeech generation methods have been developed to assist efforts in combating hate speech. Existing research focuses on generating counterspeech with linguistic attributes such as being polite, informative, and intent-driven. However, the real impact of counterspeech in online environments is seldom considered. This study aims to develop methods for generating counterspeech constrained by conversation outcomes and evaluate their effectiveness. We experiment with large language models (LLMs) to incorporate into the text generation process two desired conversation outcomes: low conversation incivility and nonhateful hater reentry. Specifically, we experiment with instruction prompts, LLM finetuning, and LLM reinforcement learning (RL). Evaluation results show that our methods effectively steer the generation of counterspeech towards the desired outcomes. Our analyses, however, show that there are differences in the quality and style depending on the model.",
161
+ "bbox": [
162
+ 141,
163
+ 279,
164
+ 460,
165
+ 593
166
+ ],
167
+ "page_idx": 0
168
+ },
169
+ {
170
+ "type": "text",
171
+ "text": "1 Introduction",
172
+ "text_level": 1,
173
+ "bbox": [
174
+ 114,
175
+ 604,
176
+ 258,
177
+ 619
178
+ ],
179
+ "page_idx": 0
180
+ },
181
+ {
182
+ "type": "text",
183
+ "text": "Hate speech has posed significant challenges to healthy and productive online communication. Counterspeech, which involves using constructive, positive, or factual responses to challenge or counteract hate speech, has shown to be effective in moderating online hostilities (Buerger, 2021), promoting productive user engagement (Miskolci et al., 2020), and educating online users (Blaya, 2019).",
184
+ "bbox": [
185
+ 112,
186
+ 629,
187
+ 489,
188
+ 758
189
+ ],
190
+ "page_idx": 0
191
+ },
192
+ {
193
+ "type": "text",
194
+ "text": "Automatic generation of counterspeech has been researched to support timely and effective efforts to fight hate speech. Synthetic counterspeech datasets have been developed using crowdsourcing (Qian et al., 2019) and human-in-the-loop strategies (Chung et al., 2021). These datasets have been used to develop counterspeech generation models. However, the impact of counterspeech in online environments has not been considered in the dataset creation. As a result, it is unknown",
195
+ "bbox": [
196
+ 112,
197
+ 758,
198
+ 489,
199
+ 917
200
+ ],
201
+ "page_idx": 0
202
+ },
203
+ {
204
+ "type": "text",
205
+ "text": "whether generated counterspeech elicits civil or hateful follow-up conversations.",
206
+ "bbox": [
207
+ 507,
208
+ 253,
209
+ 882,
210
+ 284
211
+ ],
212
+ "page_idx": 0
213
+ },
214
+ {
215
+ "type": "text",
216
+ "text": "Recent counterspeech generation research focused on constrained generation with linguistic attributes (e.g., being polite, emotion-laden (Saha et al., 2022)), or embedded with knowledge (Chung et al., 2021). Questions about the impact of counterspeech with such attributes linger. Previous research also found one of the barriers counterspeakers face is their inability to determine the potential impact of counterspeech (Mun et al., 2024). However, there is a lack of research on generating outcome-oriented counterspeech, e.g., speech that leads to desired outcomes such as de-escalating user conflicts or encouraging constructive engagement in follow-up conversations.",
217
+ "bbox": [
218
+ 507,
219
+ 286,
220
+ 884,
221
+ 511
222
+ ],
223
+ "page_idx": 0
224
+ },
225
+ {
226
+ "type": "text",
227
+ "text": "Notably, previous studies indicate that language may influence the development of a conversation, including discourse popularity (Horawalavithana et al., 2022), reentry behaviors (Wang et al., 2021), and the rise of hate speech (Liu et al., 2018). This leads to our research questions:",
228
+ "bbox": [
229
+ 507,
230
+ 513,
231
+ 882,
232
+ 609
233
+ ],
234
+ "page_idx": 0
235
+ },
236
+ {
237
+ "type": "list",
238
+ "sub_type": "text",
239
+ "list_items": [
240
+ "- How can constraints on conversation outcomes be incorporated into developing LLMs for generating counterspeech?",
241
+ "- How effective are these methods in generating outcome-oriented counterspeech?"
242
+ ],
243
+ "bbox": [
244
+ 531,
245
+ 612,
246
+ 882,
247
+ 690
248
+ ],
249
+ "page_idx": 0
250
+ },
251
+ {
252
+ "type": "text",
253
+ "text": "Unlike previous work that considers explicit linguistic attributes to guide language generation, we formulate counterspeech generation to achieve desired outcomes (e.g., constructive user engagement). Our study holds potential for broader applications. Anticipating the direction of a conversation is crucial in crafting effective responses, allowing the conversation to meet the objectives (e.g., reducing hate speech, altering user behavior, and promoting positive discourse). This study makes the following contributions: (i) introducing conversation outcomes as a constraint to guide the generation of counterspeech, (ii) experimenting with LLMs for generating outcome-constrained coun",
254
+ "bbox": [
255
+ 507,
256
+ 694,
257
+ 884,
258
+ 917
259
+ ],
260
+ "page_idx": 0
261
+ },
262
+ {
263
+ "type": "page_number",
264
+ "text": "4523",
265
+ "bbox": [
266
+ 480,
267
+ 927,
268
+ 519,
269
+ 940
270
+ ],
271
+ "page_idx": 0
272
+ },
273
+ {
274
+ "type": "footer",
275
+ "text": "Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 4523-4536",
276
+ "bbox": [
277
+ 159,
278
+ 945,
279
+ 835,
280
+ 958
281
+ ],
282
+ "page_idx": 0
283
+ },
284
+ {
285
+ "type": "footer",
286
+ "text": "November 12-16, 2024 ©2024 Association for Computational Linguistics",
287
+ "bbox": [
288
+ 273,
289
+ 959,
290
+ 724,
291
+ 971
292
+ ],
293
+ "page_idx": 0
294
+ },
295
+ {
296
+ "type": "table",
297
+ "img_path": "images/049ad01367905304c11c4aeae6fe010e50480d67ae2291aa98912721aed99278.jpg",
298
+ "table_caption": [],
299
+ "table_footnote": [],
300
+ "table_body": "<table><tr><td>Prior Work</td><td>Constraint</td><td>Hate Speech</td><td>Generation Method</td></tr><tr><td>CONAN (Chung et al., 2019)</td><td>None</td><td>Islamophobic</td><td>Expert-based and LM data aug-mentation</td></tr><tr><td>Benchmark (Qian et al., 2019)</td><td>None</td><td>Reddit, Gab</td><td>Crowdsourcing and LM genera-tion</td></tr><tr><td>MultiCONAN (Fanton et al., 2021)</td><td>None</td><td>Multiple hate targets</td><td>LLM generation with re-view/ edits by experts</td></tr><tr><td>Knowledge (Chung et al., 2021)</td><td>Informative</td><td>CONAN</td><td>LLM generation with informa-tion from knowledge repository</td></tr><tr><td>Generate-Prune (Zhu and Bhat, 2021)</td><td>Diverse and relevant</td><td>Benchmark, CONAN</td><td>LLM generation with quality classifier</td></tr><tr><td>COUNTERGEDI (Saha et al., 2022)</td><td>Polite, detoxified, and emotional</td><td>Benchmark, CONAN</td><td>DiaGPT and GEDI for con-straint generation</td></tr><tr><td>Intent (Gupta et al., 2023)</td><td>Multiple intents</td><td>CONAN, MultiCONAN</td><td>QUARC with intent category representation and fusion</td></tr><tr><td>Ours</td><td>Expected outcomes</td><td>Benchmark, CONAN, MultiCONAN</td><td>LLMs: instruction prompting, finetuning, and RL</td></tr></table>",
301
+ "bbox": [
302
+ 121,
303
+ 80,
304
+ 877,
305
+ 385
306
+ ],
307
+ "page_idx": 1
308
+ },
309
+ {
310
+ "type": "text",
311
+ "text": "Table 1: Summary of recent work on counterspeech generation, including dataset creation and modeling efforts.",
312
+ "bbox": [
313
+ 119,
314
+ 394,
315
+ 873,
316
+ 409
317
+ ],
318
+ "page_idx": 1
319
+ },
320
+ {
321
+ "type": "text",
322
+ "text": "terspeech using instruction prompts, LLM finetuning, and LLM reinforcement learning (RL), and (iii) evaluating counterspeech generation models with various metrics to understand the strengths and weaknesses of the methods.",
323
+ "bbox": [
324
+ 112,
325
+ 434,
326
+ 487,
327
+ 513
328
+ ],
329
+ "page_idx": 1
330
+ },
331
+ {
332
+ "type": "text",
333
+ "text": "2 Related Work",
334
+ "text_level": 1,
335
+ "bbox": [
336
+ 112,
337
+ 532,
338
+ 270,
339
+ 548
340
+ ],
341
+ "page_idx": 1
342
+ },
343
+ {
344
+ "type": "text",
345
+ "text": "Generating Counterspeech Table 1 presents recent work on counterspeech generation. CONAN has counterspeech written by NGO experts and augmented by language models (Chung et al., 2019); Benchmark was built with hate speech from Gab and Reddit and counterspeech created by crowdsourcing workers (Qian et al., 2019); and MultiCONAN is a high-quality, high-quantity dataset created by experts coupled with language model generation for hate speech with multiple targets (Fanton et al., 2021). Counterspeech generation models have been built with these datasets (Halim et al., 2023; Tekiroglu et al., 2020, 2022; Bonaldi et al., 2024). Unlike us, none consider conversation outcomes elicited by the generated counterspeech.",
346
+ "bbox": [
347
+ 112,
348
+ 563,
349
+ 489,
350
+ 804
351
+ ],
352
+ "page_idx": 1
353
+ },
354
+ {
355
+ "type": "text",
356
+ "text": "Researchers have investigated counterspeech generation under constraints. Chung et al. (2021) proposed a generation pipeline grounded in external knowledge repositories to generate more informative and less biased replies. Zhu and Bhat (2021) proposed to generate more diverse and relevant counterspeech by developing a three-stage pipeline",
357
+ "bbox": [
358
+ 112,
359
+ 806,
360
+ 489,
361
+ 919
362
+ ],
363
+ "page_idx": 1
364
+ },
365
+ {
366
+ "type": "text",
367
+ "text": "that uses LLMs to generate candidates, prunes the ungrammatical ones, and selects the best instances. Saha et al. (2022) proposed an ensemble generative discriminator to generate more polite, detoxified, and emotion-laden counterspeech. Gupta et al. (2023) developed IntentCONAN, where the generation of counterspeech is conditioned on five intents: informative, denouncing, questioning, positive, and humorous. Similarly, Fraser et al. (2023) utilized ChatGPT to generate counter-stereotype text by incorporating countering strategies in queries. Hassan and Alikhani (2023) proposed prompting strategies based on discourse theories to generate more context-relevant counterspeech. There are also studies on the generation of counterspeech in languages other than English (e.g., Italian (Chung et al., 2020)). Unlike us, none of these previous works generate counterspeech to elicit positive behaviors in the follow-up conversations.",
368
+ "bbox": [
369
+ 507,
370
+ 434,
371
+ 885,
372
+ 739
373
+ ],
374
+ "page_idx": 1
375
+ },
376
+ {
377
+ "type": "text",
378
+ "text": "Language Generation with Constraints Extensive studies have targeted language generation under complex lexical constraints such as formality (Jin et al., 2022), text with certain concepts (Lu et al., 2022), dialogue that takes latent variables (Bao et al., 2020), and knowledge-enhanced text (Yu et al., 2022a). Not all styles can be described explicitly as linguistic attributes. Indeed, some 'styles' can only be defined in a data-driven way based on the shared attributes across",
379
+ "bbox": [
380
+ 507,
381
+ 758,
382
+ 885,
383
+ 917
384
+ ],
385
+ "page_idx": 1
386
+ },
387
+ {
388
+ "type": "page_number",
389
+ "text": "4524",
390
+ "bbox": [
391
+ 480,
392
+ 928,
393
+ 519,
394
+ 940
395
+ ],
396
+ "page_idx": 1
397
+ },
398
+ {
399
+ "type": "image",
400
+ "img_path": "images/5d2d5078b469262cfaf5a22dd1047e4359099834e9b46b460951278b6a4a0638.jpg",
401
+ "image_caption": [
402
+ "Figure 1: Two conversation outcomes (hater ressntry and incivility0 assessed based on the conversation (green box) following up a counterspeech reply (blue box). Comments in the first layer of the conversation tree (i.e., direct replies) are used to model hater reentry. All comments in the conversation tree are used to model conversation incivility. Grey boxes indicate hateful comments; others are non-hateful."
403
+ ],
404
+ "image_footnote": [],
405
+ "bbox": [
406
+ 115,
407
+ 80,
408
+ 480,
409
+ 205
410
+ ],
411
+ "page_idx": 2
412
+ },
413
+ {
414
+ "type": "text",
415
+ "text": "various datasets (Mou and Vechtomova, 2020). In this study, we generate counterspeech very likely to lead to desired conversational outcomes.",
416
+ "bbox": [
417
+ 112,
418
+ 355,
419
+ 487,
420
+ 401
421
+ ],
422
+ "page_idx": 2
423
+ },
424
+ {
425
+ "type": "text",
426
+ "text": "Methods have been developed for constrained language generation. Wang and Wan (2018) proposed the SentiGAN framework to generate text with a given sentiment. Kumar et al. (2021) proposed MUCOCO to allow for controllable inference with multiple attributes as constraints to the optimization. Krause et al. (2021) developed GeDi, a discriminator-based approach to guide the decoding process in language generation. It enables text generation with desired or undesired attributes. Schick et al. (2021) proposed a self-debiasing approach to reduce the probability of language models generating problematic text. Unlike these previous efforts, we experiment with methods to adjust language model-generated texts to achieve specific conversational outcomes.",
427
+ "bbox": [
428
+ 112,
429
+ 404,
430
+ 489,
431
+ 661
432
+ ],
433
+ "page_idx": 2
434
+ },
435
+ {
436
+ "type": "text",
437
+ "text": "3 Methodology",
438
+ "text_level": 1,
439
+ "bbox": [
440
+ 112,
441
+ 676,
442
+ 263,
443
+ 693
444
+ ],
445
+ "page_idx": 2
446
+ },
447
+ {
448
+ "type": "text",
449
+ "text": "3.1 Conversation Outcomes",
450
+ "text_level": 1,
451
+ "bbox": [
452
+ 112,
453
+ 703,
454
+ 347,
455
+ 718
456
+ ],
457
+ "page_idx": 2
458
+ },
459
+ {
460
+ "type": "text",
461
+ "text": "Conversation outcomes refer to the result of a message in a conversation, which can be measured by the manner and characteristics of the follow-up conversations it elicits. According to previous studies, a combination of hate speech and its reply—regardless of whether it counters the hateful comment—can predict future conversation engagement and incivility (Liu et al., 2018; Yu et al., 2024). This study explores two types of conversation outcome modeling: conversation incivility and hater reentry (Figure 1). Based on the modeling results, we build conversation outcome classifiers",
462
+ "bbox": [
463
+ 112,
464
+ 726,
465
+ 489,
466
+ 917
467
+ ],
468
+ "page_idx": 2
469
+ },
470
+ {
471
+ "type": "text",
472
+ "text": "that use hate speech and counterspeech to predict the incivility level or hater reentry type.",
473
+ "bbox": [
474
+ 507,
475
+ 84,
476
+ 880,
477
+ 116
478
+ ],
479
+ "page_idx": 2
480
+ },
481
+ {
482
+ "type": "text",
483
+ "text": "Conversation Incivility Conversation incivility is a metric to measure the outcome based on the number of civil and uncivil comments as well as the unique authors involved in the discourse (Yu et al., 2024). Intuitively, the more uncivil (or less civil) the comments, the worse the outcome; uncivil comments from many authors are worse than those from just a few. Formally, it is defined as $S(r) = \\alpha U(r) - (1 - \\alpha)C(r)$ , where $U(r)$ refers to uncivil behavior and $C(r)$ to civil behavior. For each user $i$ ( $i = 0, 1, 2, \\dots, k$ ), $n_{ui}$ is defined as the number of uncivil comments by user $i$ , and $n_{ci}$ as the number of civil comments. Then, $U(r) = \\sum_{i=1}^{k} \\sqrt{n_{ui}}$ and $C(r) = \\sum_{i=1}^{k} \\sqrt{n_{ci}}$ . $\\alpha$ is used to adjust the weight of civil and uncivil behaviors. The conversational incivility level is then determined by the metric value using quantiles. Previous studies show that given two replies to hate speech, models taking into account the text of the hate speech and counterspeech accurately predict which of the two counterspeech replies will lead to more civil follow-up conversations (Yu et al., 2024, binary classification, F1=0.66–0.75). We will use civility to refer to low conversation incivility, the desired outcome.",
484
+ "bbox": [
485
+ 507,
486
+ 126,
487
+ 884,
488
+ 527
489
+ ],
490
+ "page_idx": 2
491
+ },
492
+ {
493
+ "type": "text",
494
+ "text": "Hater Reentry Behavior After a counterspeech reply to a hate speech comment, the hate instigator may exhibit different behaviors. Namely, they may not engage further, reengage with more hateful comments, or participate with non-hateful comments. The outcome can be determined based on whether the following comments have one that is from the hater and whether this comment is hateful. The non-hateful reentry is the most desirable, as it signals that the counterspeech encouraged the individual to change his behavior (Baider, 2023). We will use reentry to refer to non-hateful hater reentry in the remainder of the paper.",
495
+ "bbox": [
496
+ 507,
497
+ 538,
498
+ 882,
499
+ 747
500
+ ],
501
+ "page_idx": 2
502
+ },
503
+ {
504
+ "type": "text",
505
+ "text": "3.2 Outcome-Constrained Counterspeech Generation",
506
+ "text_level": 1,
507
+ "bbox": [
508
+ 507,
509
+ 759,
510
+ 852,
511
+ 789
512
+ ],
513
+ "page_idx": 2
514
+ },
515
+ {
516
+ "type": "text",
517
+ "text": "We explore the following methods to incorporate the outcome constraints into the generation process.",
518
+ "bbox": [
519
+ 507,
520
+ 796,
521
+ 882,
522
+ 829
523
+ ],
524
+ "page_idx": 2
525
+ },
526
+ {
527
+ "type": "text",
528
+ "text": "Instruction Prompts LLMs are capable of understanding natural conversations and generating replies. The straightforward strategy is to ask LLMs to generate replies considering the potential outcomes of the follow-up conversation. This",
529
+ "bbox": [
530
+ 507,
531
+ 839,
532
+ 882,
533
+ 917
534
+ ],
535
+ "page_idx": 2
536
+ },
537
+ {
538
+ "type": "page_number",
539
+ "text": "4525",
540
+ "bbox": [
541
+ 480,
542
+ 927,
543
+ 519,
544
+ 940
545
+ ],
546
+ "page_idx": 2
547
+ },
548
+ {
549
+ "type": "text",
550
+ "text": "explores whether LLMs might pick up information from the instruction and generate responses toward the desired outcomes. The prompts are as follows:",
551
+ "bbox": [
552
+ 112,
553
+ 84,
554
+ 487,
555
+ 131
556
+ ],
557
+ "page_idx": 3
558
+ },
559
+ {
560
+ "type": "text",
561
+ "text": "- Baseline: No explicit expected outcomes.",
562
+ "bbox": [
563
+ 136,
564
+ 134,
565
+ 460,
566
+ 148
567
+ ],
568
+ "page_idx": 3
569
+ },
570
+ {
571
+ "type": "code",
572
+ "sub_type": "code",
573
+ "code_caption": [],
574
+ "code_body": "User: \"Here is a hate comment: <Hate Comment>. Please write a counterspeech reply to the hate comment.\"",
575
+ "guess_lang": "txt",
576
+ "bbox": [
577
+ 186,
578
+ 151,
579
+ 445,
580
+ 198
581
+ ],
582
+ "page_idx": 3
583
+ },
584
+ {
585
+ "type": "text",
586
+ "text": "- Civility: Instruction with low conversation incivility as a desired outcome.",
587
+ "bbox": [
588
+ 136,
589
+ 203,
590
+ 487,
591
+ 233
592
+ ],
593
+ "page_idx": 3
594
+ },
595
+ {
596
+ "type": "code",
597
+ "sub_type": "code",
598
+ "code_caption": [],
599
+ "code_body": "User: \"Here is a hate comment: <Hate Comment>. Please write a counterspeech reply to the hate comment so that it could lead to low incivility in the follow-up conversations.\"",
600
+ "guess_lang": "txt",
601
+ "bbox": [
602
+ 186,
603
+ 236,
604
+ 445,
605
+ 318
606
+ ],
607
+ "page_idx": 3
608
+ },
609
+ {
610
+ "type": "text",
611
+ "text": "- Reentry: Instruction with non-hateful hater reentry as a desired outcome.",
612
+ "bbox": [
613
+ 136,
614
+ 324,
615
+ 485,
616
+ 354
617
+ ],
618
+ "page_idx": 3
619
+ },
620
+ {
621
+ "type": "code",
622
+ "sub_type": "code",
623
+ "code_caption": [],
624
+ "code_body": "User: \"Here is a hate comment: <Hate Comment>. Please write a counterspeech reply to the hate comment so that the hater comes back and has constructive engagement.\"",
625
+ "guess_lang": "txt",
626
+ "bbox": [
627
+ 186,
628
+ 357,
629
+ 445,
630
+ 439
631
+ ],
632
+ "page_idx": 3
633
+ },
634
+ {
635
+ "type": "text",
636
+ "text": "There are different ways to set these outcome-constrained instructions. We adopt the instructions above as baselines for comparison purposes.",
637
+ "bbox": [
638
+ 112,
639
+ 445,
640
+ 487,
641
+ 493
642
+ ],
643
+ "page_idx": 3
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "When given instructions, LLMs can generate one or multiple counterspeech replies. In addition to experimenting with the first generated reply, we follow (Zhu and Bhat, 2021) and also use a Generate and Select method to generate multiple replies and select the ones predicted to have desired outcomes according to conversation outcomes classifiers (Section 3.1).",
648
+ "bbox": [
649
+ 112,
650
+ 494,
651
+ 487,
652
+ 621
653
+ ],
654
+ "page_idx": 3
655
+ },
656
+ {
657
+ "type": "text",
658
+ "text": "LLM Finetuning LLMs may not be fully optimized for generating texts with specific constraints—in our case, desired conversation outcomes. The finetuning process can tailor LLMs to learn the task of interest. To guide the LLM in generating outcome-constrained counterspeech, we finetune the model with datasets containing conversations with the desired outcomes: the hate speech/counterspeech pairs followed by low conversation incivility (Yu et al., 2022b) and the pairs that have non-hateful hater reentry. We use the Parameter-Efficient Fine-Tuning (PEFT) with Low-Rank Adaptation (LoRA) method (Hu et al., 2021) to finetune LLMs.",
659
+ "bbox": [
660
+ 112,
661
+ 634,
662
+ 487,
663
+ 858
664
+ ],
665
+ "page_idx": 3
666
+ },
667
+ {
668
+ "type": "text",
669
+ "text": "Reinforcement Learning with LLM (RL) This method integrates the conversation outcome classifiers (Section 3.1) as a reward function to guide",
670
+ "bbox": [
671
+ 112,
672
+ 870,
673
+ 487,
674
+ 917
675
+ ],
676
+ "page_idx": 3
677
+ },
678
+ {
679
+ "type": "text",
680
+ "text": "the training process, which includes three steps. First, a hate comment is used as a query to get the response generated by an LLM. The initial model serves as a baseline for generating counterspeech. Second, hate speech and generated responses are fed into the classifiers to obtain their conversation outcome labels for assigning rewards. Specifically, pairs with low incivility or non-hateful reentry will be rewarded higher. Third, we maximize the probability of the desired outcomes in the text generation process. In addition to the reward value obtained from the (predicted) conversation outcomes, the KL-divergence (Kullback-Leibler) between the log probabilities of the two outputs is used as an additional reward. This ensures the desired outcome is considered while the generated responses do not deviate too far from the base language model. The reward is computed as $R = r - \\beta * \\mathrm{KL}$ . We train the model with the Proximal Policy Optimization (PPO) (Schulman et al., 2017) step until local stability is achieved.",
681
+ "bbox": [
682
+ 507,
683
+ 84,
684
+ 884,
685
+ 422
686
+ ],
687
+ "page_idx": 3
688
+ },
689
+ {
690
+ "type": "text",
691
+ "text": "3.3 Evaluation",
692
+ "text_level": 1,
693
+ "bbox": [
694
+ 509,
695
+ 435,
696
+ 640,
697
+ 449
698
+ ],
699
+ "page_idx": 3
700
+ },
701
+ {
702
+ "type": "text",
703
+ "text": "Desired Conversation Outcome Metrics The evaluation aims to assess the ability of these methods to generate counterspeech that is more likely to achieve desired outcomes. As it would be difficult—and arguably unethical—to post the generated text to conversations on social media platforms to observe the real outcomes, we adopt an approach that has been used before (Saha et al., 2022; Tekiroğlu et al., 2022; Halim et al., 2023; Gupta et al., 2023). We use the conversation incivility level classifier and the hater reentry classifier (Section 3.1) trained with real conversation data to make predictions with the hate speech and generated counterspeech pairs. Although the accuracy of the classifiers is not perfect, given two counterspeech replies, these classifiers reliably identify the one that will lead to better outcomes (Yu et al., 2024, binary classification, $F1 = 0.66 - 0.75$ ). Thus, they serve as a proxy to compare counterspeech generated by different methods. Additionally, we conduct human assessments for reliability purposes.",
704
+ "bbox": [
705
+ 507,
706
+ 457,
707
+ 882,
708
+ 795
709
+ ],
710
+ "page_idx": 3
711
+ },
712
+ {
713
+ "type": "text",
714
+ "text": "Human Assessments The human assessment focuses on three characteristics of replies to hate speech: suitability, relevance, and effectiveness. Suitability is measured considering (i) whether the linguistic style of the reply to hate speech suits the conversation and (ii) whether it follows the civil rules of the environment. Relevance evaluates the",
715
+ "bbox": [
716
+ 507,
717
+ 806,
718
+ 882,
719
+ 917
720
+ ],
721
+ "page_idx": 3
722
+ },
723
+ {
724
+ "type": "page_number",
725
+ "text": "4526",
726
+ "bbox": [
727
+ 480,
728
+ 927,
729
+ 519,
730
+ 940
731
+ ],
732
+ "page_idx": 3
733
+ },
734
+ {
735
+ "type": "text",
736
+ "text": "appropriateness of the reply with respect to the content of the hate comment. Effectiveness is evaluated based on whether the reply to hate speech is likely to stop the spread of hate and foster constructive conversations, as perceived by human annotators. Two graduate assistants, a male and female aged between 20 and 30, who are proficient in English and familiar with social media, assist with the evaluation. To ensure impartiality, reference text and generated text samples are randomly provided to the evaluators, so they do not know the source of each text. The inter-annotator agreement rate is calculated to assess reliability.",
737
+ "bbox": [
738
+ 112,
739
+ 84,
740
+ 492,
741
+ 294
742
+ ],
743
+ "page_idx": 4
744
+ },
745
+ {
746
+ "type": "text",
747
+ "text": "Stylistic Metrics The generated counterspeech is evaluated by stylistic metrics commonly used in previous studies (Chung et al., 2021; Zhu and Bhat, 2021; Tekiroglu et al., 2022). We calculate the similarity of counterspeech against a reference dataset consisting of human-generated counterspeech with the BLEU score (Chen and Cherry, 2014), ROUGE (Lin, 2004), METEOR (Banerjee and Lavie, 2005), and BERTScore (Zhang et al., 2019). The quality of generated texts is evaluated by the GRUEN metrics (Zhu and Bhat, 2020), including dimensions of grammaticality, redundancy, focus, and GRUEN score. The same scores are also calculated for the reference dataset for comparison purposes. Finally, we calculate the type-token ratio and distinct-n-grams to evaluate the diversity of generated texts (Fanton et al., 2021).",
748
+ "bbox": [
749
+ 115,
750
+ 306,
751
+ 490,
752
+ 580
753
+ ],
754
+ "page_idx": 4
755
+ },
756
+ {
757
+ "type": "text",
758
+ "text": "4 Experiments",
759
+ "text_level": 1,
760
+ "bbox": [
761
+ 112,
762
+ 594,
763
+ 260,
764
+ 611
765
+ ],
766
+ "page_idx": 4
767
+ },
768
+ {
769
+ "type": "text",
770
+ "text": "4.1 Conversation Outcomes Classifiers",
771
+ "text_level": 1,
772
+ "bbox": [
773
+ 112,
774
+ 621,
775
+ 433,
776
+ 636
777
+ ],
778
+ "page_idx": 4
779
+ },
780
+ {
781
+ "type": "text",
782
+ "text": "Data to Build Conversation Outcomes Classifiers We use Reddit data collected from 39 subreddits likely to contain abusive content (Vidgen et al., 2021). The hate comments are identified based on hate classifiers (Qian et al., 2019). Then, we collect replies to hate comments and identify counterspeech in replies referring to Yu et al. (2022b). For each counterspeech, we collect the follow-up replies. Then, we calculate the conversation incivility with $\\alpha = 0.8$ and determine the incivility level by quantiles. The direct replies following counterspeech are used to identify hater reentry behavior: whether the hate instigator reenters and the comment is non-hateful. Both datasets are split into $80\\%$ for training and $20\\%$ for testing, with the testing portion used to evaluate the performance of the classifiers.",
783
+ "bbox": [
784
+ 112,
785
+ 645,
786
+ 490,
787
+ 917
788
+ ],
789
+ "page_idx": 4
790
+ },
791
+ {
792
+ "type": "text",
793
+ "text": "Classification Model and Performance As this study is not aimed at the best performance in the classification tasks, we use the RoBERTa model (Liu et al., 2019) to train outcome classifiers. The hate speech/counterspeech pairs are used to predict the incivility level and the hater reentry behavior. The detailed classification results can be seen in Table 5 and 6 in A.4. Although the classification results are somewhat low, these suboptimal classifiers are enough to defeat the baseline and differentiate counterspeech that will lead to high or low incivility in the follow-up conversation, as shown by (Yu et al., 2024). The accuracy for identifying non-hateful reentry is the highest.",
794
+ "bbox": [
795
+ 507,
796
+ 84,
797
+ 884,
798
+ 311
799
+ ],
800
+ "page_idx": 4
801
+ },
802
+ {
803
+ "type": "text",
804
+ "text": "4.2 Generating Counter Speech",
805
+ "text_level": 1,
806
+ "bbox": [
807
+ 507,
808
+ 319,
809
+ 774,
810
+ 335
811
+ ],
812
+ "page_idx": 4
813
+ },
814
+ {
815
+ "type": "text",
816
+ "text": "Dataset We use the benchmark-Reddit dataset (Qian et al., 2019) for counterspeech generation and evaluation. The data contains hate comments from Reddit and counterspeech written by crowdsourcing workers. As we plan to explore the effect of this data in the finetuning and RL method, the data is split randomly into $80\\%$ for training and $20\\%$ for evaluation.",
817
+ "bbox": [
818
+ 507,
819
+ 338,
820
+ 884,
821
+ 468
822
+ ],
823
+ "page_idx": 4
824
+ },
825
+ {
826
+ "type": "text",
827
+ "text": "Instruction Prompts We use the Llama2-7b-chat model in our experiments to compare different methods, as we cannot train larger models like Llama2-13b-chat for finetuning and $RL$ due to limited computing capacity. We run a baseline inference with Llama2-13b-chat to demonstrate the impact of model size on results. As the generation and evaluation are based on the benchmark-Redit data, we apply the same system-level guideline: \"Please generate a response in Reddit style\" for all generations. The parameters are set to be the same in the generation of replies with no expected outcomes (baseline), low conversation incivility (civility), and non-hateful hater reentry (reentry). For Generate and Select, the number of responses is set to $k = 1$ , $k = 5$ , and $k = 10$ , the temperature to 0.7, and the maximum length of reply to 512. For $k = 5$ and $k = 10$ , we apply the incivility classifier and hater reentry classifier to select candidates with the targeted labels (i.e., low conversation incivility or non-hateful hater reentry) with the highest confidence. A random candidate is selected if there are no candidates with the targeted label in the generated replies.",
828
+ "bbox": [
829
+ 507,
830
+ 476,
831
+ 884,
832
+ 864
833
+ ],
834
+ "page_idx": 4
835
+ },
836
+ {
837
+ "type": "text",
838
+ "text": "Finetuning The Llama2-7b-chat model is finetuned with hate speech/counterspeech pairs that are followed with low conversation incivility or",
839
+ "bbox": [
840
+ 507,
841
+ 870,
842
+ 884,
843
+ 917
844
+ ],
845
+ "page_idx": 4
846
+ },
847
+ {
848
+ "type": "page_number",
849
+ "text": "4527",
850
+ "bbox": [
851
+ 480,
852
+ 927,
853
+ 519,
854
+ 940
855
+ ],
856
+ "page_idx": 4
857
+ },
858
+ {
859
+ "type": "text",
860
+ "text": "non-hateful reentry in the training data. The fine-tuned models are expected to generate texts that share similar linguistic patterns and lead to desired conversation outcomes. Additionally, we fine-tune models with several reference datasets, including benchmark-Reddit, benchmark-Gab, CONAN, and MultiCONAN (see model details in A.2). This is to compare whether models built on existing counterspeech datasets can generate effective counterspeech and how these datasets influence the generation process.",
861
+ "bbox": [
862
+ 112,
863
+ 84,
864
+ 492,
865
+ 261
866
+ ],
867
+ "page_idx": 5
868
+ },
869
+ {
870
+ "type": "text",
871
+ "text": "Reinforcement Learning We use the Llama2-7b-chat as the base model for the RL process. The reward for the RL process is calculated based on the outcome classifiers: for the predicted categories of conversation incivility low, medium, and high, corresponding discrete rewards are assigned in descending order, namely 2, 1, and 0; for hater reentry classification, the reward for non-hateful reentry, no reentry, and hateful reentry is 2, 1, and 0, respectively. We also use the Llama-2-7b-chat finetuned with the benchmark-Reddit dataset, so that the model trained with RL can generate counterspeech that has similar linguistic patterns with counterspeech in the benchmark-Reddit dataset while having a higher probability of leading to expected conversation outcomes. The hyperparameters are shown in A.2. We leave exploring RL with other finetuned models for future work.",
872
+ "bbox": [
873
+ 115,
874
+ 272,
875
+ 490,
876
+ 561
877
+ ],
878
+ "page_idx": 5
879
+ },
880
+ {
881
+ "type": "text",
882
+ "text": "5 Results and Analysis",
883
+ "text_level": 1,
884
+ "bbox": [
885
+ 112,
886
+ 575,
887
+ 329,
888
+ 590
889
+ ],
890
+ "page_idx": 5
891
+ },
892
+ {
893
+ "type": "text",
894
+ "text": "All methods are evaluated with the same test set from the benchmark-Reddit. The Llama2-7b-chat sometimes avoids responding to queries the model determines to be inappropriate and generates empty responses. Table 2 shows the ratio of non-empty, noted as valid, responses by each method. Except for instruction prompts, all the trained models, including the finetuning and RL models, have $100\\%$ of valid responses. In instruction prompts, the valid response rate increases when using a more powerful model (Llama2-13b-chat), forcing the model to generate more candidates, or asking the model to generate counterspeech with constrained queries.",
895
+ "bbox": [
896
+ 112,
897
+ 602,
898
+ 489,
899
+ 812
900
+ ],
901
+ "page_idx": 5
902
+ },
903
+ {
904
+ "type": "text",
905
+ "text": "Expected Outcomes In the task of generating texts with low conversation incivility, we observe the following insights: (i) The counterspeech generated by a more powerful model (Llama2-13b-chat) has a higher proportion of samples leading to low incivility. (ii) Prompt queries with the constraint",
906
+ "bbox": [
907
+ 112,
908
+ 822,
909
+ 489,
910
+ 920
911
+ ],
912
+ "page_idx": 5
913
+ },
914
+ {
915
+ "type": "text",
916
+ "text": "of low incivility can increase the probability of generating counterspeech with low conversation incivility. (iii) The generate and select strategy leads to more counterspeech with the desired outcomes. The more candidates are generated (larger $k$ ), the higher the chances of getting replies with desired outcomes. (iv) The performance of finetuning methods in generating texts with expected outcomes is relatively inferior to others. (v) RL is a robust method to restrict text generation for desired outcomes. RL models generate more responses with desired outcomes than the baseline models and finetuning. (vi) Human-generated counterspeech in benchmark-Reddit, which disregards conversation outcomes, often fails to result in the desired outcomes in the follow-up conversations. Indeed, only 760 samples (27%) are classified as eliciting low conversation incivility.",
917
+ "bbox": [
918
+ 507,
919
+ 84,
920
+ 884,
921
+ 374
922
+ ],
923
+ "page_idx": 5
924
+ },
925
+ {
926
+ "type": "text",
927
+ "text": "The evaluation with the hater-reentry classifier further validates most insights. Larger models, prompts with desired outcomes, generate and select, and RL models generate more counterspeech with desired outcomes.",
928
+ "bbox": [
929
+ 507,
930
+ 375,
931
+ 884,
932
+ 455
933
+ ],
934
+ "page_idx": 5
935
+ },
936
+ {
937
+ "type": "text",
938
+ "text": "Similarity to Reference Texts We evaluate the similarity of generated texts to the counterspeech in the benchmark-Reddit data. We do not claim that the counterspeech in the benchmark-Reddit corpus is the gold standard. Instead, it serves as a baseline for us to understand whether the LLM-generated texts are different from human-generated ones and how different. We calculate multiple similarity metrics. Results show the metrics are highly correlated (Table 9 in the A.5). Hence, we only present the results of METEOR and BERTScore in Table 2.",
939
+ "bbox": [
940
+ 507,
941
+ 469,
942
+ 882,
943
+ 645
944
+ ],
945
+ "page_idx": 5
946
+ },
947
+ {
948
+ "type": "text",
949
+ "text": "METEOR values are low, with the average values ranging from 0.06 to 0.14. On the other hand, there is not much difference in the BERTScore by different methods, with values ranging from 0.80 to 0.86. The difference between METEOR and BERTScores indicates that LLM-generated replies have high semantic similarity to reference counterspeech, but the wording used in LLM-generated texts is different. Notably, even without finetuning or RL, LLMs are still capable of generating counterspeech with similar meanings to reference texts (baseline generation BERTScore 0.8).",
950
+ "bbox": [
951
+ 507,
952
+ 648,
953
+ 884,
954
+ 841
955
+ ],
956
+ "page_idx": 5
957
+ },
958
+ {
959
+ "type": "text",
960
+ "text": "Quality of Generated Counterspeech Table 3 presents the evaluation using stylistic metrics. Grammaticality scores measure grammatical correctness. Texts generated by language models gen",
961
+ "bbox": [
962
+ 507,
963
+ 854,
964
+ 885,
965
+ 920
966
+ ],
967
+ "page_idx": 5
968
+ },
969
+ {
970
+ "type": "page_number",
971
+ "text": "4528",
972
+ "bbox": [
973
+ 480,
974
+ 928,
975
+ 519,
976
+ 940
977
+ ],
978
+ "page_idx": 5
979
+ },
980
+ {
981
+ "type": "table",
982
+ "img_path": "images/8398c0ebfcf83bc8b6993a0490ac97a286706c259ee408ac5514a98bb5015638.jpg",
983
+ "table_caption": [],
984
+ "table_footnote": [],
985
+ "table_body": "<table><tr><td rowspan=\"2\"></td><td rowspan=\"2\">Valid (%)</td><td colspan=\"2\">Desired Outcomes</td><td colspan=\"2\">Similarity</td></tr><tr><td>Civility (%)</td><td>Reentry (%)</td><td>METEOR</td><td>BERTScore</td></tr><tr><td colspan=\"6\">Instruction Prompts</td></tr><tr><td colspan=\"6\">Generate one based on (k=1)</td></tr><tr><td>Baseline</td><td>83%</td><td>23%</td><td>18%</td><td>0.07 (0.08)</td><td>0.80 (0.03)</td></tr><tr><td>Baseline(13b)</td><td>94%</td><td>27%</td><td>35%</td><td>0.12 (0.07)</td><td>0.81 (0.04)</td></tr><tr><td>Civility</td><td>92%</td><td>54%</td><td>49%</td><td>0.12 (0.05)</td><td>0.83 (0.02)</td></tr><tr><td>Reentry</td><td>94%</td><td>44%</td><td>45%</td><td>0.12 (0.06)</td><td>0.82 (0.02)</td></tr><tr><td colspan=\"6\">Generate and select (k=5)</td></tr><tr><td>p=baseline, c=civility</td><td>84%</td><td>55%</td><td>32%</td><td>0.10 (0.07)</td><td>0.81 (0.03)</td></tr><tr><td>p=baseline, c=reentry</td><td>85%</td><td>34%</td><td>49%</td><td>0.11 (0.07)</td><td>0.82 (0.03)</td></tr><tr><td>p=civility, c=civility</td><td>92%</td><td>81%</td><td>53%</td><td>0.12 (0.05)</td><td>0.82 (0.02)</td></tr><tr><td>p=reentry, c=reentry</td><td>92%</td><td>49%</td><td>83%</td><td>0.13 (0.05)</td><td>0.83 (0.01)</td></tr><tr><td colspan=\"6\">Generate and select (k=10)</td></tr><tr><td>p=baseline, c=civility</td><td>87%</td><td>69%</td><td>36%</td><td>0.11 (0.07)</td><td>0.82 (0.02)</td></tr><tr><td>p=baseline, c=reentry</td><td>86%</td><td>41%</td><td>61%</td><td>0.11 (0.07)</td><td>0.82 (0.02)</td></tr><tr><td>p=civility, c=civility</td><td>92%</td><td>86%</td><td>55%</td><td>0.12 (0.05)</td><td>0.82 (0.02)</td></tr><tr><td>p=reentry, c=reentry</td><td>92%</td><td>50%</td><td>86%</td><td>0.13 (0.05)</td><td>0.83 (0.01)</td></tr><tr><td colspan=\"6\">Finetuning with Counterspeech Corpora</td></tr><tr><td>CONAN</td><td>100%</td><td>23%</td><td>48%</td><td>0.09 (0.06)</td><td>0.85 (0.02)</td></tr><tr><td>MultiCONAN</td><td>100%</td><td>22%</td><td>48%</td><td>0.11 (0.06)</td><td>0.85 (0.02)</td></tr><tr><td>Benchmark-Gab</td><td>100%</td><td>10%</td><td>43%</td><td>0.12 (0.10)</td><td>0.86 (0.02)</td></tr><tr><td>Benchmark-Reddit</td><td>100%</td><td>11%</td><td>42%</td><td>0.13 (0.11)</td><td>0.86 (0.02)</td></tr><tr><td colspan=\"6\">Ours, with conversation outcomes</td></tr><tr><td>Reddit-CS-civility</td><td>100%</td><td>18%</td><td>35%</td><td>0.08 (0.05)</td><td>0.84 (0.02)</td></tr><tr><td>Reddit-CS-reentry</td><td>100%</td><td>19%</td><td>35%</td><td>0.08 (0.05)</td><td>0.84 (0.02)</td></tr><tr><td colspan=\"6\">Reinforcement Learning (RL)</td></tr><tr><td>Civility</td><td>100%</td><td>77%</td><td>71%</td><td>0.14 (0.05)</td><td>0.83 (0.01)</td></tr><tr><td>Reentry</td><td>100%</td><td>67%</td><td>62%</td><td>0.14 (0.05)</td><td>0.83 (0.01)</td></tr><tr><td colspan=\"6\">RL, finetuned LLM w/ Benchmark-Reddit</td></tr><tr><td>Civility</td><td>100%</td><td>30%</td><td>48%</td><td>0.13 (0.13)</td><td>0.85 (0.02)</td></tr><tr><td>Reentry</td><td>100%</td><td>18%</td><td>57%</td><td>0.07 (0.06)</td><td>0.86 (0.01)</td></tr><tr><td colspan=\"6\">Reference</td></tr><tr><td>Benchmark-Reddit</td><td>100%</td><td>27%</td><td>37%</td><td>1.00 (0.00)</td><td>1.00 (0.00)</td></tr></table>",
986
+ "bbox": [
987
+ 121,
988
+ 80,
989
+ 877,
990
+ 629
991
+ ],
992
+ "page_idx": 6
993
+ },
994
+ {
995
+ "type": "text",
996
+ "text": "Table 2: Evaluation of (a) Desired Outcomes and (b) Similarity to the reference counterspeech in Benchmark-Reddit. METEOR and BERTScore are calculated per sample. Mean (SD) is reported. Generate and select and RL are better at generating more samples with desired outcomes. Although the wording differs from the Reference counterspeech (METEOR), the semantic relevance (BERTScore) is consistently high. All generations are based on Llama2-7b-chat, except Baseline(13b) is based on Llama2-13b-chat.",
997
+ "bbox": [
998
+ 112,
999
+ 638,
1000
+ 884,
1001
+ 709
1002
+ ],
1003
+ "page_idx": 6
1004
+ },
1005
+ {
1006
+ "type": "text",
1007
+ "text": "erally have higher grammatical scores than the reference (0.77), except the ones finetuned with Reddit conversation data: civility (0.77) and reentry (0.76). These finetuned models might have learned informal expressions on social media, thus they generate counterspeech with a lower grammaticality score. Counterspeech generated by LLMs without finetuning or RL is more redundant, indicated by lower scores in redundancy. After adding expected outcomes as constraints, LLM-generated counterspeech contains less redundancy. The focus",
1008
+ "bbox": [
1009
+ 112,
1010
+ 734,
1011
+ 489,
1012
+ 912
1013
+ ],
1014
+ "page_idx": 6
1015
+ },
1016
+ {
1017
+ "type": "text",
1018
+ "text": "scores of counterspeech generated by instruction prompts are also much lower. In models with finetuning and $RL$ , the focus scores are much higher.",
1019
+ "bbox": [
1020
+ 507,
1021
+ 734,
1022
+ 884,
1023
+ 783
1024
+ ],
1025
+ "page_idx": 6
1026
+ },
1027
+ {
1028
+ "type": "text",
1029
+ "text": "Overall, counterspeech generated by finetuning and $RL$ have higher quality, as reflected in the grammaticality, redundancy, focus, and overall GRUEN scores. In particular, the highest GRUEN scores are achieved by $RL$ models.",
1030
+ "bbox": [
1031
+ 507,
1032
+ 785,
1033
+ 884,
1034
+ 866
1035
+ ],
1036
+ "page_idx": 6
1037
+ },
1038
+ {
1039
+ "type": "text",
1040
+ "text": "Diversity and Novelty The three diversity metrics (i.e., TTR, number of unique unigrams, and",
1041
+ "bbox": [
1042
+ 507,
1043
+ 887,
1044
+ 882,
1045
+ 917
1046
+ ],
1047
+ "page_idx": 6
1048
+ },
1049
+ {
1050
+ "type": "page_number",
1051
+ "text": "4529",
1052
+ "bbox": [
1053
+ 480,
1054
+ 927,
1055
+ 519,
1056
+ 940
1057
+ ],
1058
+ "page_idx": 6
1059
+ },
1060
+ {
1061
+ "type": "table",
1062
+ "img_path": "images/7750be077170d7b01d4e86dc2964b1cf74a5cec12361a107d853b2f7bca72ed0.jpg",
1063
+ "table_caption": [],
1064
+ "table_footnote": [],
1065
+ "table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"4\">Text Quality</td><td>Diversity</td><td>Novelty</td></tr><tr><td>Grammaticality</td><td>Focus</td><td>Redundancy</td><td>GRUEN</td><td>TTR</td><td>New Tokens</td></tr><tr><td colspan=\"7\">Instruction Prompts</td></tr><tr><td colspan=\"7\">Generate one based on</td></tr><tr><td>Baseline</td><td>0.73 (0.10)</td><td>-0.05 (0.05)</td><td>-1.14 (12.56)</td><td>0.60 (0.18)</td><td>0.06</td><td>5384</td></tr><tr><td>Baseline (13b)</td><td>0.80 (0.07)</td><td>-0.09 (0.03)</td><td>-1.33 (23.22)</td><td>0.60 (0.21)</td><td>0.06</td><td>9231</td></tr><tr><td>Civility</td><td>0.84 (0.04)</td><td>-0.10 (0.01)</td><td>-0.19 (0.56)</td><td>0.61 (0.22)</td><td>0.03</td><td>7019</td></tr><tr><td>Reentry</td><td>0.83 (0.07)</td><td>-0.10 (0.02)</td><td>-0.11 (0.39)</td><td>0.64 (0.18)</td><td>0.03</td><td>6407</td></tr><tr><td colspan=\"7\">Generate and select (k=5)</td></tr><tr><td>p=baseline, c=civility</td><td>0.78 (0.10)</td><td>-0.08 (0.04)</td><td>-0.33 (4.37)</td><td>0.62 (0.19)</td><td>0.06</td><td>7220</td></tr><tr><td>p=baseline, c=reentry</td><td>0.78 (0.10)</td><td>-0.08 (0.04)</td><td>-0.34 (6.42)</td><td>0.63 (0.18)</td><td>0.05</td><td>6794</td></tr><tr><td>p=civility, c=civility</td><td>0.84 (0.03)</td><td>-0.10 (0.01)</td><td>-0.23 (2.35)</td><td>0.59 (0.23)</td><td>0.04</td><td>7668</td></tr><tr><td>p=reentry, c=reentry</td><td>0.84 (0.02)</td><td>-0.10 (0.00)</td><td>-0.07 (0.21)</td><td>0.68 (0.12)</td><td>0.03</td><td>5224</td></tr><tr><td colspan=\"7\">Generate and select (k=10)</td></tr><tr><td>p=baseline, c=civility</td><td>0.79 (0.09)</td><td>-0.08 (0.04)</td><td>-0.27 (2.27)</td><td>0.62 (0.20)</td><td>0.06</td><td>8000</td></tr><tr><td>p=baseline, c=reentry</td><td>0.80 (0.09)</td><td>-0.08 (0.04)</td><td>-0.20 (2.02)</td><td>0.64 (0.18)</td><td>0.05</td><td>6908</td></tr><tr><td>p=civility, c=civility</td><td>0.84 (0.03)</td><td>-0.10 (0.00)</td><td>-0.23 (0.48)</td><td>0.57 (0.24)</td><td>0.04</td><td>8024</td></tr><tr><td>p=reentry, c=reentry</td><td>0.84 (0.02)</td><td>-0.10 (0.00)</td><td>-0.06 (0.12)</td><td>0.68 (0.11)</td><td>0.03</td><td>5198</td></tr><tr><td colspan=\"7\">Finetuning w/ Counterspeech</td></tr><tr><td>CONAN</td><td>0.81 (0.09)</td><td>-0.02 (0.04)</td><td>0.00 (0.03)</td><td>0.78 (0.11)</td><td>0.11</td><td>1982</td></tr><tr><td>MultiCONAN</td><td>0.83 (0.07)</td><td>-0.05 (0.05)</td><td>-0.12 (2.93)</td><td>0.76 (0.13)</td><td>0.09</td><td>2448</td></tr><tr><td>Benchmark-Gab</td><td>0.85 (0.06)</td><td>-0.01 (0.03)</td><td>0.00 (0.00)</td><td>0.83 (0.08)</td><td>0.02</td><td>111</td></tr><tr><td>Benchmark-Redit</td><td>0.80 (0.09)</td><td>-0.04 (0.05)</td><td>0.00 (0.01)</td><td>0.77 (0.12)</td><td>0.03</td><td>147</td></tr><tr><td colspan=\"7\">Ours, w/ conv. outcomes</td></tr><tr><td>Reddit-CS-civility</td><td>0.78 (0.09)</td><td>-0.04 (0.05)</td><td>-0.70 (7.78)</td><td>0.71 (0.17)</td><td>0.12</td><td>2858</td></tr><tr><td>Reddit-CS-reentry</td><td>0.78 (0.09)</td><td>-0.04 (0.05)</td><td>-0.70 (7.56)</td><td>0.71 (0.17)</td><td>0.11</td><td>2643</td></tr><tr><td colspan=\"7\">Reinforcement Learning (RL)</td></tr><tr><td>Civility</td><td>0.85 (0.03)</td><td>-0.10 (0.00)</td><td>-0.04 (0.12)</td><td>0.71 (0.11)</td><td>0.03</td><td>5575</td></tr><tr><td>Reentry</td><td>0.84 (0.04)</td><td>-0.10 (0.00)</td><td>-0.06 (0.18)</td><td>0.69 (0.13)</td><td>0.03</td><td>6574</td></tr><tr><td colspan=\"7\">RL, finetuned LLM w/ B-Redit</td></tr><tr><td>Civility</td><td>0.80 (0.02)</td><td>0.00 (0.00)</td><td>0.00 (0.00)</td><td>0.80 (0.02)</td><td>0.00</td><td>0</td></tr><tr><td>Reentry</td><td>0.87 (0.03)</td><td>0.00 (0.00)</td><td>0.00 (0.00)</td><td>0.87 (0.03)</td><td>0.01</td><td>12</td></tr><tr><td colspan=\"7\">Reference</td></tr><tr><td>Benchmark-Redit</td><td>0.77 (0.12)</td><td>-0.03 (0.05)</td><td>0.00 (0.01)</td><td>0.74 (0.13)</td><td>0.09</td><td>0</td></tr></table>",
1066
+ "bbox": [
1067
+ 119,
1068
+ 80,
1069
+ 878,
1070
+ 627
1071
+ ],
1072
+ "page_idx": 7
1073
+ },
1074
+ {
1075
+ "type": "text",
1076
+ "text": "Table 3: Evaluation of Quality and Diversity. GRUEN and BERTScore are calculated per sample. Mean (SD) are reported. The quality of counterspeech by Instruction prompts is relatively low. LLM finetuning with Reddit-counterspeech generate texts with high diversity. RL with finetuned LLMs generate texts with reduced novelty. All generations are based on Llama2-7b-chat, except Baseline(13b) is based on Llama2-13b-chat.",
1077
+ "bbox": [
1078
+ 112,
1079
+ 638,
1080
+ 882,
1081
+ 697
1082
+ ],
1083
+ "page_idx": 7
1084
+ },
1085
+ {
1086
+ "type": "text",
1087
+ "text": "number of unique bigrams) are highly correlated (Table 8 in A.5). TTR and the novelty metric (i.e., number of new unigrams) are presented in Table 3. The TTR of generated counterspeech significantly decreases with models that use expected outcomes constraints in instruction prompts and RL. The highest TTRs are achieved by the LLM finetuned with real Reddit conversation data. Note that this data usually contains diverse and informal language.",
1088
+ "bbox": [
1089
+ 110,
1090
+ 721,
1091
+ 487,
1092
+ 865
1093
+ ],
1094
+ "page_idx": 7
1095
+ },
1096
+ {
1097
+ "type": "text",
1098
+ "text": "The novelty of generated texts is higher when conversation outcomes are considered in the generation. The number of new unigrams generated by",
1099
+ "bbox": [
1100
+ 112,
1101
+ 871,
1102
+ 489,
1103
+ 919
1104
+ ],
1105
+ "page_idx": 7
1106
+ },
1107
+ {
1108
+ "type": "text",
1109
+ "text": "untrained LLMs in the instruction prompt method is substantially higher than trained models with finetuning and RL.",
1110
+ "bbox": [
1111
+ 505,
1112
+ 721,
1113
+ 882,
1114
+ 769
1115
+ ],
1116
+ "page_idx": 7
1117
+ },
1118
+ {
1119
+ "type": "text",
1120
+ "text": "Human Evaluation We choose generated texts constrained with low conversation incivility for human evaluation. The model with the highest number of samples predicted as having low conversation incivility from each method is selected for further evaluation. Hence, we randomly select 50 pairs of hate comments and counterspeech from the instruction prompts with $p = \\text{civility}$ , $k = 10$",
1121
+ "bbox": [
1122
+ 507,
1123
+ 790,
1124
+ 884,
1125
+ 919
1126
+ ],
1127
+ "page_idx": 7
1128
+ },
1129
+ {
1130
+ "type": "page_number",
1131
+ "text": "4530",
1132
+ "bbox": [
1133
+ 480,
1134
+ 927,
1135
+ 521,
1136
+ 940
1137
+ ],
1138
+ "page_idx": 7
1139
+ },
1140
+ {
1141
+ "type": "table",
1142
+ "img_path": "images/b557c27e89a81d88af2556f2f7cdf026386c0d1755918bd6c2a1042d6e1060cc.jpg",
1143
+ "table_caption": [],
1144
+ "table_footnote": [],
1145
+ "table_body": "<table><tr><td>Method</td><td>Suitability</td><td>Relevance</td><td>Effectiveness</td></tr><tr><td>Prompt</td><td>0.50</td><td>0.88</td><td>0.54</td></tr><tr><td>Finetuning</td><td>0.80</td><td>0.68</td><td>0.80</td></tr><tr><td>RL</td><td>0.74</td><td>0.76</td><td>0.72</td></tr></table>",
1146
+ "bbox": [
1147
+ 115,
1148
+ 82,
1149
+ 500,
1150
+ 155
1151
+ ],
1152
+ "page_idx": 8
1153
+ },
1154
+ {
1155
+ "type": "text",
1156
+ "text": "Table 4: Proportion of samples labeled as Yes for each evaluation dimension by methods.",
1157
+ "bbox": [
1158
+ 112,
1159
+ 166,
1160
+ 487,
1161
+ 195
1162
+ ],
1163
+ "page_idx": 8
1164
+ },
1165
+ {
1166
+ "type": "text",
1167
+ "text": "and $c =$ civility, finetuning with CONAN, and RL with low incivility, respectively. Then, we mix the samples and ask annotators to label yes or no to three criteria: suitability, relevance, and effectiveness. The agreement percentages for initial labels are 0.78, 0.92, and 0.64 respectively for suitability, quality, and effectiveness. For the samples in which annotators disagree, the annotators discuss and finalize an agreed annotation. Table 4 presents the results. The instruction prompts methods tend to generate long responses with high relevance. However, the answers vary as replies, essays, letters, or conversation scripts with multiple users. Many samples are in a format not appropriate for social media platforms. Although the desired outcome metric shows finetuning is relatively inferior to other methods, the human evaluation shows the generated counterspeech by finetuning and RL are usually suitable and effective. Further investigation into the reasons that explain the differences in desired outcomes and human assessment is needed.",
1168
+ "bbox": [
1169
+ 115,
1170
+ 219,
1171
+ 489,
1172
+ 557
1173
+ ],
1174
+ "page_idx": 8
1175
+ },
1176
+ {
1177
+ "type": "text",
1178
+ "text": "6 Conclusions",
1179
+ "text_level": 1,
1180
+ "bbox": [
1181
+ 112,
1182
+ 571,
1183
+ 253,
1184
+ 586
1185
+ ],
1186
+ "page_idx": 8
1187
+ },
1188
+ {
1189
+ "type": "text",
1190
+ "text": "We present an initial exploration of methods for constrained generation of counterspeech controlled by potential conversation outcomes. We incorporate the desired outcomes (i.e., low conversation incivility and non-hateful hyster reentry) into the text generation process through three methods: instruction prompts, LLM finetuning, and LLM RL. The text generation results are evaluated with desired conversation metrics, stylistic metrics, and human assessment. Results show that instruction prompts and RL generate counterspeech with a higher probability of eliciting desired outcomes based on the prediction of outcome classifiers, while finetuning and RL generate more effective counterspeech based on human assessments. The LLMs-generated texts consistently show high relevance to hate speech, but the wording differs.",
1191
+ "bbox": [
1192
+ 115,
1193
+ 596,
1194
+ 489,
1195
+ 869
1196
+ ],
1197
+ "page_idx": 8
1198
+ },
1199
+ {
1200
+ "type": "text",
1201
+ "text": "The generated texts present different characteristics. The counterspeech generated by LLM without further training tends to be long, not suitable for",
1202
+ "bbox": [
1203
+ 112,
1204
+ 871,
1205
+ 489,
1206
+ 917
1207
+ ],
1208
+ "page_idx": 8
1209
+ },
1210
+ {
1211
+ "type": "text",
1212
+ "text": "the conversation context on social media, and with low quality based on GRUEN metrics and human assessment. Both finetuning and RL models generate high-quality counterspeech with styles suitable for social media platforms. The experiments highlight the strengths and weaknesses of each method, enabling stakeholders to choose the method most appropriate for their needs and preferences.",
1213
+ "bbox": [
1214
+ 507,
1215
+ 84,
1216
+ 884,
1217
+ 212
1218
+ ],
1219
+ "page_idx": 8
1220
+ },
1221
+ {
1222
+ "type": "text",
1223
+ "text": "Limitations",
1224
+ "text_level": 1,
1225
+ "bbox": [
1226
+ 509,
1227
+ 225,
1228
+ 615,
1229
+ 240
1230
+ ],
1231
+ "page_idx": 8
1232
+ },
1233
+ {
1234
+ "type": "text",
1235
+ "text": "The conversation outcome classifiers are not perfect, as the texts of hate comments and replies only partially contribute to the conversation outcomes. Other factors include the context of the conversation and users' positions and identities. While the outcome classifiers provide a convenient method for evaluation, they may introduce bias into the evaluation process. Therefore, interpretations and conclusions drawn from these evaluations should be considered with caution. Future work will explore more accurate and unbiased classifiers to enhance text generation and evaluation. We use computing-based metrics for evaluating similarity, text quality, diversity, and novelty. Although these metrics are widely used, they may present bias. More sophisticated evaluation methods and comprehensive human assessments are needed to fully capture the multidimensional quality of the generated text. Text generation is influenced by numerous factors, including the formulation of prompt queries, settings of LLMs for text generation, fine-tuning language models with different datasets, variations in fine-tuning and reinforcement learning settings, and size of language models. Further experiments are needed to better understand the impact of these factors on text generation. The outcome classifiers are based on Reddit conversation data, which may not transfer to other platforms. Experiments with different data are to be done to understand communication patterns across platforms and the guiding effect of cross-domain data.",
1236
+ "bbox": [
1237
+ 507,
1238
+ 250,
1239
+ 884,
1240
+ 750
1241
+ ],
1242
+ "page_idx": 8
1243
+ },
1244
+ {
1245
+ "type": "text",
1246
+ "text": "Ethics Statement",
1247
+ "text_level": 1,
1248
+ "bbox": [
1249
+ 509,
1250
+ 764,
1251
+ 660,
1252
+ 778
1253
+ ],
1254
+ "page_idx": 8
1255
+ },
1256
+ {
1257
+ "type": "text",
1258
+ "text": "The study has been through careful consideration of benefits and risks. First, we used data from Reddit, which is considered a public space. Users consent to make their data available to third parties. Second, user names and identities are encrypted to avoid the identification of users. Third, student collaborators working on the data have been warned of the potential hateful content and are encouraged to stop their",
1259
+ "bbox": [
1260
+ 507,
1261
+ 790,
1262
+ 884,
1263
+ 917
1264
+ ],
1265
+ "page_idx": 8
1266
+ },
1267
+ {
1268
+ "type": "page_number",
1269
+ "text": "4531",
1270
+ "bbox": [
1271
+ 480,
1272
+ 928,
1273
+ 519,
1274
+ 940
1275
+ ],
1276
+ "page_idx": 8
1277
+ },
1278
+ {
1279
+ "type": "text",
1280
+ "text": "work at any time. Fourth, the data will be shared for research purposes only. Although releasing the dataset may raise risks, we believe the benefits of contributing to effective methods to counter online hate outweighs the potential risks. Finally, the models developed may not be directly applicable to the generation of counterspeech to online hate. Instead, they could serve as valuable tools to assist content moderation in crafting counterspeech. Human judgments are crucial in assessing the suitability and appropriateness of replies to HS.",
1281
+ "bbox": [
1282
+ 112,
1283
+ 84,
1284
+ 492,
1285
+ 261
1286
+ ],
1287
+ "page_idx": 9
1288
+ },
1289
+ {
1290
+ "type": "text",
1291
+ "text": "Acknowledgement",
1292
+ "text_level": 1,
1293
+ "bbox": [
1294
+ 114,
1295
+ 274,
1296
+ 280,
1297
+ 291
1298
+ ],
1299
+ "page_idx": 9
1300
+ },
1301
+ {
1302
+ "type": "text",
1303
+ "text": "Dr. Lingzi Hong and Xiaoying Song gratefully acknowledge financial support from the Institute of Museum and Library Services (US) under Grants LG-256661-OLS-24 and LG-256666-OLS-24.",
1304
+ "bbox": [
1305
+ 112,
1306
+ 300,
1307
+ 489,
1308
+ 363
1309
+ ],
1310
+ "page_idx": 9
1311
+ },
1312
+ {
1313
+ "type": "text",
1314
+ "text": "References",
1315
+ "text_level": 1,
1316
+ "bbox": [
1317
+ 114,
1318
+ 392,
1319
+ 213,
1320
+ 407
1321
+ ],
1322
+ "page_idx": 9
1323
+ },
1324
+ {
1325
+ "type": "list",
1326
+ "sub_type": "ref_text",
1327
+ "list_items": [
1328
+ "Fabienne Baider. 2023. Accountability issues, online covert hate speech, and the efficacy of counter-speech. Politics and Governance, 11(2):249-260.",
1329
+ "Satanjeev Banerjee and Alon Lavie. 2005. Meteor: An automatic metric for mt evaluation with improved correlation with human judgments. In Proceedings of the acl workshop on intrinsic and extrinsic evaluation measures for machine translation and/or summarization, pages 65-72.",
1330
+ "Siqi Bao, Huang He, Fan Wang, Hua Wu, and Haifeng Wang. 2020. Plato: Pre-trained dialogue generation model with discrete latent variable. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 85-96.",
1331
+ "Catherine Blaya. 2019. Cyberhate: A review and content analysis of intervention strategies. Aggression and violent behavior, 45:163-172.",
1332
+ "Helena Bonaldi, Yi-Ling Chung, Gavin Abercrombie, and Marco Guerini. 2024. Nlp for counterspeech against hate: A survey and how-to guide. arXiv preprint arXiv:2403.20103.",
1333
+ "Catherine Buerger. 2021. # iamhere: Collective counterspeech and the quest to improve online discourse. Social Media+ Society, 7(4):20563051211063843.",
1334
+ "Boxing Chen and Colin Cherry. 2014. A systematic comparison of smoothing techniques for sentence-level bleu. In Proceedings of the ninth workshop on statistical machine translation, pages 362-367.",
1335
+ "Yi-Ling Chung, Elizaveta Kuzmenko, Serra Sinem Tekiroglu, and Marco Guerini. 2019. Conan-counter narratives through nichesourcing: a multilingual dataset of responses to fight online hate speech. In"
1336
+ ],
1337
+ "bbox": [
1338
+ 115,
1339
+ 416,
1340
+ 489,
1341
+ 917
1342
+ ],
1343
+ "page_idx": 9
1344
+ },
1345
+ {
1346
+ "type": "list",
1347
+ "sub_type": "ref_text",
1348
+ "list_items": [
1349
+ "Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2819-2829.",
1350
+ "Yi-Ling Chung, Serra Sinem Tekiroglu, and Marco Guerini. 2020. Italian counter narrative generation to fight online hate speech. In Proceedings of the Seventh Italian Conference on Computational Linguistics (CLIC-it 2020), volume 2769.",
1351
+ "Yi-Ling Chung, Serra Sinem Tekiroglu, and Marco Guerini. 2021. Towards knowledge-grounded counter narrative generation for hate speech. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 899-914.",
1352
+ "Margherita Fanton, Helena Bonaldi, Serra Sinem Tekiroglu, and Marco Guerini. 2021. Human-in-the-loop for data collection: a multi-target counter narrative dataset to fight online hate speech. 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 3226-3240.",
1353
+ "Kathleen C Fraser, Svetlana Kiritchenko, Isar Nejadgholi, and Anna Kerkhof. 2023. What makes a good counter-stereotype? evaluating strategies for automated responses to stereotypical text. In Proceedings of the First Workshop on Social Influence in Conversations (SICON 2023), pages 25-38.",
1354
+ "Rishabh Gupta, Shaily Desai, Manvi Goel, Anil Bandhakavi, Tanmoy Chakraborty, and Md Shad Akhtar. 2023. Counterspeeches up my sleeve! intent distribution learning and persistent fusion for intent-conditioned counterspeech generation. arXiv preprint arXiv:2305.13776.",
1355
+ "Sadaf MD Halim, Saqib Irtiza, Yibo Hu, Latifur Khan, and Bhavani Thuraisingham. 2023. Wokegpt: Improving counterspeech generation against online hate speech by intelligently augmenting datasets using a novel metric. In 2023 International Joint Conference on Neural Networks (IJCNN), pages 1-10. IEEE.",
1356
+ "Sabit Hassan and Malihe Alikhani. 2023. Discgen: A framework for discourse-informed counterspeech generation. In Proceedings of the 13th International Joint Conference on Natural Language Processing and the 3rd Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics (Volume 1: Long Papers), pages 420-429.",
1357
+ "Sameera Horawalavithana, Nazim Choudhury, John Skvoretz, and Adriana Iamnitchi. 2022. Online discussion threads as conversation pools: predicting the growth of discussion threads on reddit. Computational and Mathematical Organization Theory, pages 1-29.",
1358
+ "Edward J Hu, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, Weizhu Chen, et al. 2021. Lora: Low-rank adaptation of large language models. In International Conference on Learning Representations."
1359
+ ],
1360
+ "bbox": [
1361
+ 510,
1362
+ 85,
1363
+ 884,
1364
+ 917
1365
+ ],
1366
+ "page_idx": 9
1367
+ },
1368
+ {
1369
+ "type": "page_number",
1370
+ "text": "4532",
1371
+ "bbox": [
1372
+ 480,
1373
+ 928,
1374
+ 521,
1375
+ 940
1376
+ ],
1377
+ "page_idx": 9
1378
+ },
1379
+ {
1380
+ "type": "list",
1381
+ "sub_type": "ref_text",
1382
+ "list_items": [
1383
+ "Di Jin, Zhijing Jin, Zhiting Hu, Olga Vechtomova, and Rada Mihalcea. 2022. Deep learning for text style transfer: A survey. Computational Linguistics, 48(1):155-205.",
1384
+ "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.",
1385
+ "Sachin Kumar, Eric Malmi, Aliaksei Severyn, and Yulia Tsvetkov. 2021. Controlled text generation as continuous optimization with multiple constraints. Advances in Neural Information Processing Systems, 34:14542-14554.",
1386
+ "Chin-Yew Lin. 2004. Rouge: A package for automatic evaluation of summaries. In Text summarization branches out, pages 74-81.",
1387
+ "Ping Liu, Joshua Guberman, Libby Hemphill, and Aron Culotta. 2018. Forecasting the presence and intensity of hostility on instagram using linguistic and social features. In Proceedings of the International AAAI Conference on Web and Social Media, volume 12.",
1388
+ "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.",
1389
+ "Ximing Lu, Sean Welleck, Peter West, Liwei Jiang, Jungo Kasai, Daniel Khashabi, Ronan Le Bras, Lianhui Qin, Youngjae Yu, Rowan Zellers, et al. 2022. Neurologic a* esque decoding: Constrained text generation with lookahead heuristics. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 780-799.",
1390
+ "Jozef Miskolci, Lucia Kováčová, and Edita Rigóva. 2020. Countering hate speech on facebook: The case of the roma minority in slovakia. Social Science Computer Review, 38(2):128-146.",
1391
+ "Lili Mou and Olga Vechtomova. 2020. Stylized text generation: Approaches and applications. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: Tutorial Abstracts, pages 19-22.",
1392
+ "Jimin Mun, Cathy Buerger, Jenny T Liang, Joshua Garland, and Maarten Sap. 2024. Counterspeakers' perspectives: Unveiling barriers and ai needs in the fight against online hate. In Proceedings of the CHI Conference on Human Factors in Computing Systems, pages 1-22.",
1393
+ "Jing Qian, Anna Bethke, Yinyin Liu, Elizabeth Belding, and William Yang Wang. 2019. A benchmark dataset for learning to intervene in online hate speech. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th"
1394
+ ],
1395
+ "bbox": [
1396
+ 115,
1397
+ 85,
1398
+ 485,
1399
+ 917
1400
+ ],
1401
+ "page_idx": 10
1402
+ },
1403
+ {
1404
+ "type": "list",
1405
+ "sub_type": "ref_text",
1406
+ "list_items": [
1407
+ "International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 4755-4764.",
1408
+ "Punyajoy Saha, Kanishk Singh, Adarsh Kumar, Binny Mathew, and Animesh Mukherjee. 2022. Counteredi: A controllable approach to generate polite, detoxified and emotional counterspeech. arXiv preprint arXiv:2205.04304.",
1409
+ "Timo Schick, Sahana Udupa, and Hinrich Schütze. 2021. Self-diagnosis and self-debiasing: A proposal for reducing corpus-based bias in nlp. Transactions of the Association for Computational Linguistics, 9:1408-1424.",
1410
+ "John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. 2017. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347.",
1411
+ "Serra Sinem Tekiroğlu, Helena Bonaldi, Margherita Fanton, and Marco Guerini. 2022. Using pre-trained language models for producing counter narratives against hate speech: a comparative study. In *Findings of the Association for Computational Linguistics: ACL* 2022, pages 3099-3114.",
1412
+ "Serra Sinem Tekiroglu, Yi-Ling Chung, and Marco Guerini. 2020. Generating counter narratives against online hate speech: Data and strategies. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1177-1190.",
1413
+ "Bertie Vidgen, Dong Nguyen, Helen Margetts, Patricia Rossini, and Rebekah Tromble. 2021. Introducing cad: the contextual abuse dataset. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2289-2303.",
1414
+ "Ke Wang and Xiaojun Wan. 2018. Sentigan: Generating sentimental texts via mixture adversarial networks. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence (IJCAI-18), pages 4446-4452.",
1415
+ "Lingzhi Wang, Xingshan Zeng, Huang Hu, Kam-Fai Wong, and Daxin Jiang. 2021. Re-entry prediction for online conversations via self-supervised learning. In Findings of the Association for Computational Linguistics: EMNLP 2021, pages 2127-2137.",
1416
+ "Wenhao Yu, Chenguang Zhu, Zaitang Li, Zhiting Hu, Qingyun Wang, Heng Ji, and Meng Jiang. 2022a. A survey of knowledge-enhanced text generation. ACM Computing Surveys, 54(11s):1-38.",
1417
+ "Xinchen Yu, Eduardo Blanco, and Lingzi Hong. 2022b. Hate speech and counter speech detection: Conversational context does matter. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5918-5930."
1418
+ ],
1419
+ "bbox": [
1420
+ 510,
1421
+ 85,
1422
+ 882,
1423
+ 917
1424
+ ],
1425
+ "page_idx": 10
1426
+ },
1427
+ {
1428
+ "type": "page_number",
1429
+ "text": "4533",
1430
+ "bbox": [
1431
+ 480,
1432
+ 928,
1433
+ 519,
1434
+ 940
1435
+ ],
1436
+ "page_idx": 10
1437
+ },
1438
+ {
1439
+ "type": "list",
1440
+ "sub_type": "text",
1441
+ "list_items": [
1442
+ "Xinchen Yu, Eduardo Blanco, and Lingzi Hong. 2024. Hate cannot drive out hate: Forecasting conversation incivility following replies to hate speech. In Proceedings of the International AAAI Conference on Web and Social Media, volume 18, pages 1740-1752.",
1443
+ "Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q Weinberger, and Yoav Artzi. 2019. Bertscore: Evaluating text generation with bert. In International Conference on Learning Representations.",
1444
+ "Wanzheng Zhu and Suma Bhat. 2020. Gruen for evaluating linguistic quality of generated text. In *Findings of the Association for Computational Linguistics: EMNLP* 2020, pages 94-108.",
1445
+ "Wanzheng Zhu and Suma Bhat. 2021. Generate, prune, select: A pipeline for counterspeech generation against online hate speech. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 134-149."
1446
+ ],
1447
+ "bbox": [
1448
+ 114,
1449
+ 85,
1450
+ 489,
1451
+ 351
1452
+ ],
1453
+ "page_idx": 11
1454
+ },
1455
+ {
1456
+ "type": "text",
1457
+ "text": "A Appendices",
1458
+ "text_level": 1,
1459
+ "bbox": [
1460
+ 114,
1461
+ 361,
1462
+ 253,
1463
+ 378
1464
+ ],
1465
+ "page_idx": 11
1466
+ },
1467
+ {
1468
+ "type": "text",
1469
+ "text": "A.1 Computing Resources",
1470
+ "text_level": 1,
1471
+ "bbox": [
1472
+ 114,
1473
+ 386,
1474
+ 337,
1475
+ 401
1476
+ ],
1477
+ "page_idx": 11
1478
+ },
1479
+ {
1480
+ "type": "text",
1481
+ "text": "The computational resources used in this research include a high-performance server equipped with three Quadro RTX 8000 GPUs, 128G memory, and a 4T disk.",
1482
+ "bbox": [
1483
+ 112,
1484
+ 406,
1485
+ 487,
1486
+ 470
1487
+ ],
1488
+ "page_idx": 11
1489
+ },
1490
+ {
1491
+ "type": "text",
1492
+ "text": "A.2 Hyperparameters",
1493
+ "text_level": 1,
1494
+ "bbox": [
1495
+ 114,
1496
+ 481,
1497
+ 305,
1498
+ 497
1499
+ ],
1500
+ "page_idx": 11
1501
+ },
1502
+ {
1503
+ "type": "text",
1504
+ "text": "LLM Finetuning: We use PEFT LoRA for the finetuning process. The LoRA configuration has $r = 16$ , alpha $= 32$ , dropout $= 0.05$ , and bias is \"none\". The hyperparameters are as follows: the learning rate is 1e-4, the number of epochs is 1, and the warmup ratio is 0.1.",
1505
+ "bbox": [
1506
+ 112,
1507
+ 501,
1508
+ 487,
1509
+ 596
1510
+ ],
1511
+ "page_idx": 11
1512
+ },
1513
+ {
1514
+ "type": "text",
1515
+ "text": "LLM RL: The reward trainer uses the RoBERTa base model, the learning rate is 1e-5, the batch size is 16, and the number of epochs is 5. In the PPO process, the generation component has $top\\_k = 0$ , $top\\_p = 1.0$ , $do\\_sample = True$ , and the max length is 256. The PPO configuration has a learning rate of 1.41e-5, a batch size of 32, and an initial KL coefficient of 0.1.",
1516
+ "bbox": [
1517
+ 112,
1518
+ 598,
1519
+ 487,
1520
+ 726
1521
+ ],
1522
+ "page_idx": 11
1523
+ },
1524
+ {
1525
+ "type": "text",
1526
+ "text": "A.3 Dataset License and Use",
1527
+ "text_level": 1,
1528
+ "bbox": [
1529
+ 114,
1530
+ 737,
1531
+ 356,
1532
+ 752
1533
+ ],
1534
+ "page_idx": 11
1535
+ },
1536
+ {
1537
+ "type": "text",
1538
+ "text": "The Benchmark dataset by Qian et al. (2019) is under the Creative Commons Attribution-NonCommercial 4.0 International Public License. The CONAN and MultiCONAN datasets can be used for research purposes with proper citation (Chung et al., 2019; Fanton et al., 2021). The benchmark-Reddit data contains 5,020 unique conversations with hate speech identified. Each hate speech comment has multiple responses. We extracted the hate speech from conversations and",
1539
+ "bbox": [
1540
+ 112,
1541
+ 757,
1542
+ 489,
1543
+ 917
1544
+ ],
1545
+ "page_idx": 11
1546
+ },
1547
+ {
1548
+ "type": "text",
1549
+ "text": "their counterspeech responses, generating 14,208 valid hate speech/counterspeech pairs, noted as the benchmark-Reddit data. The testing data includes 2,843 pairs of hate speech/counterspeech.",
1550
+ "bbox": [
1551
+ 507,
1552
+ 84,
1553
+ 882,
1554
+ 149
1555
+ ],
1556
+ "page_idx": 11
1557
+ },
1558
+ {
1559
+ "type": "text",
1560
+ "text": "A.4 Evaluation Results of Conversation Outcome Classifiers",
1561
+ "text_level": 1,
1562
+ "bbox": [
1563
+ 507,
1564
+ 159,
1565
+ 835,
1566
+ 189
1567
+ ],
1568
+ "page_idx": 11
1569
+ },
1570
+ {
1571
+ "type": "text",
1572
+ "text": "Table 5 presents the evaluation of the conversation incivility classifier. The baseline is calculated assuming all test samples are assigned with the majority label, Medium. Although the classification results are somewhat low, these suboptimal classifiers are enough to defeat the baseline and differentiate counterspeech that will lead to high or low incivility in the follow-up conversation (Yu et al., 2024, binary classification, F1=0.66–0.75). Table 6 presents the evaluation of the hater reentry classifier. The baseline is calculated assuming all test samples are assigned with the majority label, non-hateful reentry. The non-hateful reentry class has the highest F1 of 0.61.",
1573
+ "bbox": [
1574
+ 507,
1575
+ 196,
1576
+ 884,
1577
+ 420
1578
+ ],
1579
+ "page_idx": 11
1580
+ },
1581
+ {
1582
+ "type": "text",
1583
+ "text": "A.5 Evaluation Metrics",
1584
+ "text_level": 1,
1585
+ "bbox": [
1586
+ 507,
1587
+ 432,
1588
+ 710,
1589
+ 445
1590
+ ],
1591
+ "page_idx": 11
1592
+ },
1593
+ {
1594
+ "type": "text",
1595
+ "text": "Table 7 shows the number of samples in each class based on the prediction of the conversation incivility classifier and the hate re-entry classifier.",
1596
+ "bbox": [
1597
+ 507,
1598
+ 451,
1599
+ 882,
1600
+ 500
1601
+ ],
1602
+ "page_idx": 11
1603
+ },
1604
+ {
1605
+ "type": "text",
1606
+ "text": "Table 8 presents the correlation coefficients between diversity metrics (i.e., type-token ratio, distinct-1, and distinct-2) and novelty metrics (i.e., number of new unigrams and bigrams) using the reference texts in Benchmark-Reddit.",
1607
+ "bbox": [
1608
+ 507,
1609
+ 501,
1610
+ 882,
1611
+ 579
1612
+ ],
1613
+ "page_idx": 11
1614
+ },
1615
+ {
1616
+ "type": "text",
1617
+ "text": "Table 9 presents the correlation of metrics that evaluate the relevance of generated texts to reference texts in Benchmark-Reddit.",
1618
+ "bbox": [
1619
+ 507,
1620
+ 581,
1621
+ 882,
1622
+ 627
1623
+ ],
1624
+ "page_idx": 11
1625
+ },
1626
+ {
1627
+ "type": "text",
1628
+ "text": "Table 10 presents relatively good and bad examples of generated texts by different methods<sup>1</sup>. Counterspeech replies annotated by the human annotators as bad either are not suitable to the conversation context (e.g., example(2)), not a counterspeech (e.g., example(4)), or are very generic and do not address the specific hateful content (e.g., example(6)).",
1629
+ "bbox": [
1630
+ 507,
1631
+ 629,
1632
+ 884,
1633
+ 758
1634
+ ],
1635
+ "page_idx": 11
1636
+ },
1637
+ {
1638
+ "type": "text",
1639
+ "text": "A.6 AI Use",
1640
+ "text_level": 1,
1641
+ "bbox": [
1642
+ 509,
1643
+ 769,
1644
+ 613,
1645
+ 783
1646
+ ],
1647
+ "page_idx": 11
1648
+ },
1649
+ {
1650
+ "type": "text",
1651
+ "text": "We acknowledge the use of code-writing assistance GitHub Copilot. While the tool aided in generating code snippets and providing insights, the final implementation and decisions were made by the authors.",
1652
+ "bbox": [
1653
+ 507,
1654
+ 789,
1655
+ 882,
1656
+ 869
1657
+ ],
1658
+ "page_idx": 11
1659
+ },
1660
+ {
1661
+ "type": "page_footnote",
1662
+ "text": "1The examples in this paper contain hateful content. We cannot avoid it due to the nature of our work.",
1663
+ "bbox": [
1664
+ 507,
1665
+ 892,
1666
+ 882,
1667
+ 917
1668
+ ],
1669
+ "page_idx": 11
1670
+ },
1671
+ {
1672
+ "type": "page_number",
1673
+ "text": "4534",
1674
+ "bbox": [
1675
+ 480,
1676
+ 927,
1677
+ 519,
1678
+ 940
1679
+ ],
1680
+ "page_idx": 11
1681
+ },
1682
+ {
1683
+ "type": "table",
1684
+ "img_path": "images/590172a83a624a8002310a8bc92fe47a713ce0482d07d894b9074b3d9b992e8d.jpg",
1685
+ "table_caption": [],
1686
+ "table_footnote": [],
1687
+ "table_body": "<table><tr><td></td><td colspan=\"3\">High</td><td colspan=\"3\">Medium</td><td colspan=\"3\">Low</td><td colspan=\"3\">Weighted Average</td></tr><tr><td></td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td></tr><tr><td>Baseline</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.49</td><td>1.00</td><td>0.66</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.24</td><td>0.49</td><td>0.32</td></tr><tr><td>Incivility</td><td>0.43</td><td>0.32</td><td>0.36</td><td>0.55</td><td>0.66</td><td>0.60</td><td>0.32</td><td>0.27</td><td>0.29</td><td>0.46</td><td>0.48</td><td>0.46</td></tr></table>",
1688
+ "bbox": [
1689
+ 159,
1690
+ 84,
1691
+ 836,
1692
+ 165
1693
+ ],
1694
+ "page_idx": 12
1695
+ },
1696
+ {
1697
+ "type": "table",
1698
+ "img_path": "images/ff1ff735fe63f83fcea23add8de25ac0797924a67f9fa8ff783eb0399dc60611.jpg",
1699
+ "table_caption": [
1700
+ "Table 5: Evaluation results of the conversation incivility classifier."
1701
+ ],
1702
+ "table_footnote": [],
1703
+ "table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"3\">Hate reentry</td><td colspan=\"3\">No reentry</td><td colspan=\"3\">Non-hate reentry</td><td colspan=\"3\">Weighted Average</td></tr><tr><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td></tr><tr><td>Baseline</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.49</td><td>1.00</td><td>0.66</td><td>0.16</td><td>0.33</td><td>0.22</td></tr><tr><td>Reentry</td><td>0.32</td><td>0.20</td><td>0.25</td><td>0.52</td><td>0.41</td><td>0.46</td><td>0.54</td><td>0.70</td><td>0.61</td><td>0.49</td><td>0.51</td><td>0.46</td></tr></table>",
1704
+ "bbox": [
1705
+ 161,
1706
+ 200,
1707
+ 833,
1708
+ 282
1709
+ ],
1710
+ "page_idx": 12
1711
+ },
1712
+ {
1713
+ "type": "table",
1714
+ "img_path": "images/524f6d6db00996ce95246f6d862d3b171b01046acc072e111eb713122f5a218f.jpg",
1715
+ "table_caption": [
1716
+ "Table 6: Evaluation results of the hater reentry classifier."
1717
+ ],
1718
+ "table_footnote": [],
1719
+ "table_body": "<table><tr><td rowspan=\"2\">Category</td><td rowspan=\"2\">Model</td><td colspan=\"3\">Conversation Incivility</td><td colspan=\"3\">Hater Reentry</td></tr><tr><td>High</td><td>Medium</td><td>Low</td><td>No reentry</td><td>Hateful</td><td>Non-hateful</td></tr><tr><td rowspan=\"4\">Generation</td><td>baseline</td><td>291</td><td>1733</td><td>652</td><td>1422</td><td>748</td><td>506</td></tr><tr><td>baseline(13B)</td><td>686</td><td>1214</td><td>776</td><td>752</td><td>937</td><td>987</td></tr><tr><td>civility</td><td>412</td><td>657</td><td>1547</td><td>876</td><td>346</td><td>1394</td></tr><tr><td>reentry</td><td>629</td><td>794</td><td>1253</td><td>910</td><td>476</td><td>1290</td></tr><tr><td rowspan=\"8\">Prompt and Select</td><td>p=baseline k=5 c=civility</td><td>195</td><td>855</td><td>1566</td><td>1117</td><td>595</td><td>904</td></tr><tr><td>p=civility k=5 c=civility</td><td>134</td><td>176</td><td>2306</td><td>849</td><td>253</td><td>1514</td></tr><tr><td>p=baseline k=5 c=reentry</td><td>415</td><td>1240</td><td>961</td><td>771</td><td>443</td><td>1402</td></tr><tr><td>p=reentry k=5 c=reentry</td><td>914</td><td>312</td><td>1390</td><td>64</td><td>186</td><td>2366</td></tr><tr><td>p=baseline k=10 c=civility</td><td>114</td><td>537</td><td>1965</td><td>1070</td><td>511</td><td>1035</td></tr><tr><td>p=civility k=10 c=civility</td><td>73</td><td>100</td><td>2443</td><td>828</td><td>222</td><td>1566</td></tr><tr><td>p=baseline k=10 c=reentry</td><td>444</td><td>994</td><td>1178</td><td>511</td><td>371</td><td>1734</td></tr><tr><td>p=reentry k=10 c=reentry</td><td>890</td><td>295</td><td>1431</td><td>25</td><td>160</td><td>2431</td></tr><tr><td rowspan=\"6\">LLM Finetune</td><td>civility</td><td>953</td><td>1298</td><td>592</td><td>881</td><td>954</td><td>1008</td></tr><tr><td>reentry</td><td>939</td><td>1417</td><td>487</td><td>731</td><td>1152</td><td>960</td></tr><tr><td>CONAN</td><td>1429</td><td>752</td><td>662</td><td>438</td><td>1031</td><td>1374</td></tr><tr><td>MultiCONAN</td><td>1386</td><td>835</td><td>622</td><td>559</td><td>931</td><td>1353</td></tr><tr><td>Benchmark-Reddit</td><td>1775</td><td>757</td><td>311</td><td>510</td><td>1149</td><td>1184</td></tr><tr><td>Benchmark-Gab</td><td>1974</td><td>585</td><td>284</td><td>533</td><td>1076</td><td>1234</td></tr><tr><td rowspan=\"4\">LLM TRL</td><td>civility</td><td>239</td><td>423</td><td>2181</td><td>292</td><td>540</td><td>2011</td></tr><tr><td>reentry</td><td>481</td><td>461</td><td>1901</td><td>408</td><td>661</td><td>1774</td></tr><tr><td>bm_reddit_ft_civility</td><td>66</td><td>1917</td><td>860</td><td>448</td><td>1036</td><td>1359</td></tr><tr><td>bm_reddit_ft_reentry</td><td>1212</td><td>1130</td><td>501</td><td>222</td><td>992</td><td>1629</td></tr><tr><td>Reference</td><td>benchmark_reddit</td><td>1245</td><td>838</td><td>760</td><td>683</td><td>1117</td><td>1043</td></tr></table>",
1720
+ "bbox": [
1721
+ 126,
1722
+ 319,
1723
+ 870,
1724
+ 719
1725
+ ],
1726
+ "page_idx": 12
1727
+ },
1728
+ {
1729
+ "type": "table",
1730
+ "img_path": "images/c8bd407cb3f0b8834db2df5845c3717c286494a2ba95b269d311ddb2d45e6402.jpg",
1731
+ "table_caption": [
1732
+ "Table 7: Evaluation results of conversation incivility and hater reentry classifiers."
1733
+ ],
1734
+ "table_footnote": [],
1735
+ "table_body": "<table><tr><td></td><td>TTR</td><td>distinct-1</td><td>distinct-2</td><td>#new_unigram</td><td>#new_bigram</td></tr><tr><td>TTR</td><td>1</td><td>0.990</td><td>0.971</td><td>-0.219</td><td>-0.298</td></tr><tr><td>distinct-1</td><td></td><td>1</td><td>0.972</td><td>-0.287</td><td>-0.364</td></tr><tr><td>distinct-2</td><td></td><td></td><td>1</td><td>-0.086</td><td>-0.160</td></tr><tr><td>#new_unigram</td><td></td><td></td><td></td><td>1</td><td>0.980</td></tr><tr><td>#new_bigram</td><td></td><td></td><td></td><td></td><td>1</td></tr></table>",
1736
+ "bbox": [
1737
+ 211,
1738
+ 755,
1739
+ 786,
1740
+ 859
1741
+ ],
1742
+ "page_idx": 12
1743
+ },
1744
+ {
1745
+ "type": "text",
1746
+ "text": "Table 8: Correlation coefficients of diversity metrics. TTR (type-token ratio) highly correlates with distinct-1 and distinct-2. Using the texts in benchmark-Reddit, the number of new unigrams is highly correlated with the number of bigrams.",
1747
+ "bbox": [
1748
+ 112,
1749
+ 869,
1750
+ 882,
1751
+ 913
1752
+ ],
1753
+ "page_idx": 12
1754
+ },
1755
+ {
1756
+ "type": "page_number",
1757
+ "text": "4535",
1758
+ "bbox": [
1759
+ 480,
1760
+ 928,
1761
+ 519,
1762
+ 940
1763
+ ],
1764
+ "page_idx": 12
1765
+ },
1766
+ {
1767
+ "type": "table",
1768
+ "img_path": "images/dfceebbee203749dae5299f823c42d0669c759df6723ee52415edcebbcd5d238.jpg",
1769
+ "table_caption": [],
1770
+ "table_footnote": [],
1771
+ "table_body": "<table><tr><td></td><td>BLEU</td><td>ROUGE-r</td><td>ROUGE-p</td><td>ROUGE-f</td><td>METEOR</td><td>BERT-p</td><td>BERT-r</td><td>BERT-f</td></tr><tr><td>BLEU</td><td>1</td><td>0.799</td><td>0.997</td><td>0.990</td><td>0.973</td><td>0.870</td><td>0.983</td><td>0.952</td></tr><tr><td>ROUGE-r</td><td></td><td>1</td><td>0.829</td><td>0.874</td><td>0.916</td><td>0.466</td><td>0.866</td><td>0.649</td></tr><tr><td>ROUGE-p</td><td></td><td></td><td>1</td><td>0.996</td><td>0.983</td><td>0.848</td><td>0.985</td><td>0.939</td></tr><tr><td>ROUGE-f</td><td></td><td></td><td></td><td>1</td><td>0.995</td><td>0.806</td><td>0.99</td><td>0.914</td></tr><tr><td>METEOR</td><td></td><td></td><td></td><td></td><td>1</td><td>0.759</td><td>0.988</td><td>0.884</td></tr><tr><td>BERT-p</td><td></td><td></td><td></td><td></td><td></td><td>1</td><td>0.835</td><td>0.974</td></tr><tr><td>BERT-r</td><td></td><td></td><td></td><td></td><td></td><td></td><td>1</td><td>0.938</td></tr><tr><td>BERT-f</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>1</td></tr></table>",
1772
+ "bbox": [
1773
+ 132,
1774
+ 139,
1775
+ 867,
1776
+ 284
1777
+ ],
1778
+ "page_idx": 13
1779
+ },
1780
+ {
1781
+ "type": "table",
1782
+ "img_path": "images/3414ae0899a5364666caf45d93724ceb8d9ff409892f4a9bc8bb6001e3d30ec0.jpg",
1783
+ "table_caption": [
1784
+ "Table 9: Correlation coefficients of similarity metrics. Almost all metrics are highly correlated."
1785
+ ],
1786
+ "table_footnote": [],
1787
+ "table_body": "<table><tr><td>ID</td><td>Method</td><td>Evaluation</td><td>Hate Comment</td><td>Generated Reply</td></tr><tr><td>1</td><td>Instruction Prompts</td><td>Good</td><td>Wow. Can&#x27;t believe anyone would actually vote for that cunt.</td><td>I understand that many people are upset about the election results, but let&#x27;s try to approach this in a constructive way. Instead of resorting to insults or name-calling, let&#x27;s focus on the issues that matter most to us. What are the most pressing problems facing our country, and how can we work together to address them? For example, I&#x27;m concerned about the rising cost of healthcare and the impact it&#x27;s having on families and small businesses. I think we need to work towards a more affordable and sustainable healthcare system that prioritizes the needs of everyone, not just the wealthy and powerful.</td></tr><tr><td>2</td><td>Instruction Prompts</td><td>Bad</td><td>what was this dumb cunt thinking? &quot;oh yeah I&#x27;ll just slap on this wig, call my-self Pauline &amp; wander into the woman&#x27;s changing room? Cunt needs section-ing, trans people have mental illness or some deep laying issues they need to deal with.</td><td>Title: Challenging Harmful Stereotypes and Promoting Inclusivity for Trans-gender Individuals. Introduction: Hello fellow Reditors, I&#x27;m here to address a concerning comment that was recently made on this platform. The comment in question perpetuates harmful stereotypes and discrimination against transgender individuals. As a community, it&#x27;s important that we challenge these stereotypes and promote inclusivity for all individuals, regardless of their gender identity...</td></tr><tr><td>3</td><td>Finetune</td><td>Good</td><td>Why are these companies so retarded that they think this kind of PR is gonna help them? Women aren&#x27;t the target gaming demographic and probably never will be.</td><td>If you really think that women will never be the target demographic for video games, then you are living in a fantasy world.</td></tr><tr><td>4</td><td>Finetune</td><td>Bad</td><td>What a faggot bot. Tell me to use the less bigoted and universally accepted term &quot;--BrushYourTeeth&quot; if you suck big black robo cock.</td><td>What is wrong with the word &#x27;faggot&#x27;?</td></tr><tr><td>5</td><td>RL</td><td>Good</td><td>Allo, ya queer bitch! &#x27;Ow&#x27;s yer sex life?</td><td>It is important to treat everyone with respect and dignity, regardless of their background or identity. Using offensive language or making inappropriate comments is not acceptable and can cause harm to others. Let&#x27;s focus on having respectful and meaningful conversations instead.</td></tr><tr><td>6</td><td>RL</td><td>Bad</td><td>Nathan Grayson wrote that retarded article, but to be fair Kotaku&#x27;s hands on preview of the game didn&#x27;t have much good to say about it.</td><td>I apologize, but I cannot engage in discussions that use derogatory language or perpetuate harmful stereotypes. The term &quot;retarded&quot; is a hurtful and offensive slur that has been used to demean and dehumanize people with intellectual disabilities. Using this term to describe someone&#x27;s work or a game preview is not only disrespectful, but it also contributes to a culture of ableism and discrimination...</td></tr></table>",
1788
+ "bbox": [
1789
+ 127,
1790
+ 432,
1791
+ 872,
1792
+ 834
1793
+ ],
1794
+ "page_idx": 13
1795
+ },
1796
+ {
1797
+ "type": "text",
1798
+ "text": "Table 10: Sample Generated Replies by Instruction Prompts, LLM Finetune, and LLM RL.",
1799
+ "bbox": [
1800
+ 191,
1801
+ 843,
1802
+ 803,
1803
+ 857
1804
+ ],
1805
+ "page_idx": 13
1806
+ },
1807
+ {
1808
+ "type": "page_number",
1809
+ "text": "4536",
1810
+ "bbox": [
1811
+ 480,
1812
+ 928,
1813
+ 521,
1814
+ 940
1815
+ ],
1816
+ "page_idx": 13
1817
+ }
1818
+ ]
2024/Outcome-Constrained Large Language Models for Countering Hate Speech/78d433df-4deb-4fac-a059-d56966a36e8b_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Outcome-Constrained Large Language Models for Countering Hate Speech/78d433df-4deb-4fac-a059-d56966a36e8b_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eeae96e720db98e4a1f893668e90ca1eb9d9124a756c018601cad107d43520c0
3
+ size 359960
2024/Outcome-Constrained Large Language Models for Countering Hate Speech/full.md ADDED
@@ -0,0 +1,326 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Outcome-Constrained Large Language Models for Countering Hate Speech
2
+
3
+ Lingzi Hong
4
+
5
+ University of North Texas
6
+
7
+ lingzi.hong@unt.edu
8
+
9
+ Pengcheng Luo
10
+
11
+ Peking University
12
+
13
+ luopc@oku.edu.cn
14
+
15
+ Eduardo Blanco
16
+
17
+ University of Arizona
18
+
19
+ eduardoblanco@arizona.edu
20
+
21
+ Xiaoying Song
22
+
23
+ University of North Texas
24
+
25
+ XiaoyingSong@my.unt.edu
26
+
27
+ # Abstract
28
+
29
+ Automatic counterspeech generation methods have been developed to assist efforts in combating hate speech. Existing research focuses on generating counterspeech with linguistic attributes such as being polite, informative, and intent-driven. However, the real impact of counterspeech in online environments is seldom considered. This study aims to develop methods for generating counterspeech constrained by conversation outcomes and evaluate their effectiveness. We experiment with large language models (LLMs) to incorporate into the text generation process two desired conversation outcomes: low conversation incivility and nonhateful hater reentry. Specifically, we experiment with instruction prompts, LLM finetuning, and LLM reinforcement learning (RL). Evaluation results show that our methods effectively steer the generation of counterspeech towards the desired outcomes. Our analyses, however, show that there are differences in the quality and style depending on the model.
30
+
31
+ # 1 Introduction
32
+
33
+ Hate speech has posed significant challenges to healthy and productive online communication. Counterspeech, which involves using constructive, positive, or factual responses to challenge or counteract hate speech, has shown to be effective in moderating online hostilities (Buerger, 2021), promoting productive user engagement (Miskolci et al., 2020), and educating online users (Blaya, 2019).
34
+
35
+ Automatic generation of counterspeech has been researched to support timely and effective efforts to fight hate speech. Synthetic counterspeech datasets have been developed using crowdsourcing (Qian et al., 2019) and human-in-the-loop strategies (Chung et al., 2021). These datasets have been used to develop counterspeech generation models. However, the impact of counterspeech in online environments has not been considered in the dataset creation. As a result, it is unknown
36
+
37
+ whether generated counterspeech elicits civil or hateful follow-up conversations.
38
+
39
+ Recent counterspeech generation research focused on constrained generation with linguistic attributes (e.g., being polite, emotion-laden (Saha et al., 2022)), or embedded with knowledge (Chung et al., 2021). Questions about the impact of counterspeech with such attributes linger. Previous research also found one of the barriers counterspeakers face is their inability to determine the potential impact of counterspeech (Mun et al., 2024). However, there is a lack of research on generating outcome-oriented counterspeech, e.g., speech that leads to desired outcomes such as de-escalating user conflicts or encouraging constructive engagement in follow-up conversations.
40
+
41
+ Notably, previous studies indicate that language may influence the development of a conversation, including discourse popularity (Horawalavithana et al., 2022), reentry behaviors (Wang et al., 2021), and the rise of hate speech (Liu et al., 2018). This leads to our research questions:
42
+
43
+ - How can constraints on conversation outcomes be incorporated into developing LLMs for generating counterspeech?
44
+ - How effective are these methods in generating outcome-oriented counterspeech?
45
+
46
+ Unlike previous work that considers explicit linguistic attributes to guide language generation, we formulate counterspeech generation to achieve desired outcomes (e.g., constructive user engagement). Our study holds potential for broader applications. Anticipating the direction of a conversation is crucial in crafting effective responses, allowing the conversation to meet the objectives (e.g., reducing hate speech, altering user behavior, and promoting positive discourse). This study makes the following contributions: (i) introducing conversation outcomes as a constraint to guide the generation of counterspeech, (ii) experimenting with LLMs for generating outcome-constrained coun
47
+
48
+ <table><tr><td>Prior Work</td><td>Constraint</td><td>Hate Speech</td><td>Generation Method</td></tr><tr><td>CONAN (Chung et al., 2019)</td><td>None</td><td>Islamophobic</td><td>Expert-based and LM data aug-mentation</td></tr><tr><td>Benchmark (Qian et al., 2019)</td><td>None</td><td>Reddit, Gab</td><td>Crowdsourcing and LM genera-tion</td></tr><tr><td>MultiCONAN (Fanton et al., 2021)</td><td>None</td><td>Multiple hate targets</td><td>LLM generation with re-view/ edits by experts</td></tr><tr><td>Knowledge (Chung et al., 2021)</td><td>Informative</td><td>CONAN</td><td>LLM generation with informa-tion from knowledge repository</td></tr><tr><td>Generate-Prune (Zhu and Bhat, 2021)</td><td>Diverse and relevant</td><td>Benchmark, CONAN</td><td>LLM generation with quality classifier</td></tr><tr><td>COUNTERGEDI (Saha et al., 2022)</td><td>Polite, detoxified, and emotional</td><td>Benchmark, CONAN</td><td>DiaGPT and GEDI for con-straint generation</td></tr><tr><td>Intent (Gupta et al., 2023)</td><td>Multiple intents</td><td>CONAN, MultiCONAN</td><td>QUARC with intent category representation and fusion</td></tr><tr><td>Ours</td><td>Expected outcomes</td><td>Benchmark, CONAN, MultiCONAN</td><td>LLMs: instruction prompting, finetuning, and RL</td></tr></table>
49
+
50
+ Table 1: Summary of recent work on counterspeech generation, including dataset creation and modeling efforts.
51
+
52
+ terspeech using instruction prompts, LLM finetuning, and LLM reinforcement learning (RL), and (iii) evaluating counterspeech generation models with various metrics to understand the strengths and weaknesses of the methods.
53
+
54
+ # 2 Related Work
55
+
56
+ Generating Counterspeech Table 1 presents recent work on counterspeech generation. CONAN has counterspeech written by NGO experts and augmented by language models (Chung et al., 2019); Benchmark was built with hate speech from Gab and Reddit and counterspeech created by crowdsourcing workers (Qian et al., 2019); and MultiCONAN is a high-quality, high-quantity dataset created by experts coupled with language model generation for hate speech with multiple targets (Fanton et al., 2021). Counterspeech generation models have been built with these datasets (Halim et al., 2023; Tekiroglu et al., 2020, 2022; Bonaldi et al., 2024). Unlike us, none consider conversation outcomes elicited by the generated counterspeech.
57
+
58
+ Researchers have investigated counterspeech generation under constraints. Chung et al. (2021) proposed a generation pipeline grounded in external knowledge repositories to generate more informative and less biased replies. Zhu and Bhat (2021) proposed to generate more diverse and relevant counterspeech by developing a three-stage pipeline
59
+
60
+ that uses LLMs to generate candidates, prunes the ungrammatical ones, and selects the best instances. Saha et al. (2022) proposed an ensemble generative discriminator to generate more polite, detoxified, and emotion-laden counterspeech. Gupta et al. (2023) developed IntentCONAN, where the generation of counterspeech is conditioned on five intents: informative, denouncing, questioning, positive, and humorous. Similarly, Fraser et al. (2023) utilized ChatGPT to generate counter-stereotype text by incorporating countering strategies in queries. Hassan and Alikhani (2023) proposed prompting strategies based on discourse theories to generate more context-relevant counterspeech. There are also studies on the generation of counterspeech in languages other than English (e.g., Italian (Chung et al., 2020)). Unlike us, none of these previous works generate counterspeech to elicit positive behaviors in the follow-up conversations.
61
+
62
+ Language Generation with Constraints Extensive studies have targeted language generation under complex lexical constraints such as formality (Jin et al., 2022), text with certain concepts (Lu et al., 2022), dialogue that takes latent variables (Bao et al., 2020), and knowledge-enhanced text (Yu et al., 2022a). Not all styles can be described explicitly as linguistic attributes. Indeed, some 'styles' can only be defined in a data-driven way based on the shared attributes across
63
+
64
+ ![](images/5d2d5078b469262cfaf5a22dd1047e4359099834e9b46b460951278b6a4a0638.jpg)
65
+ Figure 1: Two conversation outcomes (hater ressntry and incivility0 assessed based on the conversation (green box) following up a counterspeech reply (blue box). Comments in the first layer of the conversation tree (i.e., direct replies) are used to model hater reentry. All comments in the conversation tree are used to model conversation incivility. Grey boxes indicate hateful comments; others are non-hateful.
66
+
67
+ various datasets (Mou and Vechtomova, 2020). In this study, we generate counterspeech very likely to lead to desired conversational outcomes.
68
+
69
+ Methods have been developed for constrained language generation. Wang and Wan (2018) proposed the SentiGAN framework to generate text with a given sentiment. Kumar et al. (2021) proposed MUCOCO to allow for controllable inference with multiple attributes as constraints to the optimization. Krause et al. (2021) developed GeDi, a discriminator-based approach to guide the decoding process in language generation. It enables text generation with desired or undesired attributes. Schick et al. (2021) proposed a self-debiasing approach to reduce the probability of language models generating problematic text. Unlike these previous efforts, we experiment with methods to adjust language model-generated texts to achieve specific conversational outcomes.
70
+
71
+ # 3 Methodology
72
+
73
+ # 3.1 Conversation Outcomes
74
+
75
+ Conversation outcomes refer to the result of a message in a conversation, which can be measured by the manner and characteristics of the follow-up conversations it elicits. According to previous studies, a combination of hate speech and its reply—regardless of whether it counters the hateful comment—can predict future conversation engagement and incivility (Liu et al., 2018; Yu et al., 2024). This study explores two types of conversation outcome modeling: conversation incivility and hater reentry (Figure 1). Based on the modeling results, we build conversation outcome classifiers
76
+
77
+ that use hate speech and counterspeech to predict the incivility level or hater reentry type.
78
+
79
+ Conversation Incivility Conversation incivility is a metric to measure the outcome based on the number of civil and uncivil comments as well as the unique authors involved in the discourse (Yu et al., 2024). Intuitively, the more uncivil (or less civil) the comments, the worse the outcome; uncivil comments from many authors are worse than those from just a few. Formally, it is defined as $S(r) = \alpha U(r) - (1 - \alpha)C(r)$ , where $U(r)$ refers to uncivil behavior and $C(r)$ to civil behavior. For each user $i$ ( $i = 0, 1, 2, \dots, k$ ), $n_{ui}$ is defined as the number of uncivil comments by user $i$ , and $n_{ci}$ as the number of civil comments. Then, $U(r) = \sum_{i=1}^{k} \sqrt{n_{ui}}$ and $C(r) = \sum_{i=1}^{k} \sqrt{n_{ci}}$ . $\alpha$ is used to adjust the weight of civil and uncivil behaviors. The conversational incivility level is then determined by the metric value using quantiles. Previous studies show that given two replies to hate speech, models taking into account the text of the hate speech and counterspeech accurately predict which of the two counterspeech replies will lead to more civil follow-up conversations (Yu et al., 2024, binary classification, F1=0.66–0.75). We will use civility to refer to low conversation incivility, the desired outcome.
80
+
81
+ Hater Reentry Behavior After a counterspeech reply to a hate speech comment, the hate instigator may exhibit different behaviors. Namely, they may not engage further, reengage with more hateful comments, or participate with non-hateful comments. The outcome can be determined based on whether the following comments have one that is from the hater and whether this comment is hateful. The non-hateful reentry is the most desirable, as it signals that the counterspeech encouraged the individual to change his behavior (Baider, 2023). We will use reentry to refer to non-hateful hater reentry in the remainder of the paper.
82
+
83
+ # 3.2 Outcome-Constrained Counterspeech Generation
84
+
85
+ We explore the following methods to incorporate the outcome constraints into the generation process.
86
+
87
+ Instruction Prompts LLMs are capable of understanding natural conversations and generating replies. The straightforward strategy is to ask LLMs to generate replies considering the potential outcomes of the follow-up conversation. This
88
+
89
+ explores whether LLMs might pick up information from the instruction and generate responses toward the desired outcomes. The prompts are as follows:
90
+
91
+ - Baseline: No explicit expected outcomes.
92
+
93
+ ```txt
94
+ User: "Here is a hate comment: <Hate Comment>. Please write a counterspeech reply to the hate comment."
95
+ ```
96
+
97
+ - Civility: Instruction with low conversation incivility as a desired outcome.
98
+
99
+ ```txt
100
+ User: "Here is a hate comment: <Hate Comment>. Please write a counterspeech reply to the hate comment so that it could lead to low incivility in the follow-up conversations."
101
+ ```
102
+
103
+ - Reentry: Instruction with non-hateful hater reentry as a desired outcome.
104
+
105
+ ```txt
106
+ User: "Here is a hate comment: <Hate Comment>. Please write a counterspeech reply to the hate comment so that the hater comes back and has constructive engagement."
107
+ ```
108
+
109
+ There are different ways to set these outcome-constrained instructions. We adopt the instructions above as baselines for comparison purposes.
110
+
111
+ When given instructions, LLMs can generate one or multiple counterspeech replies. In addition to experimenting with the first generated reply, we follow (Zhu and Bhat, 2021) and also use a Generate and Select method to generate multiple replies and select the ones predicted to have desired outcomes according to conversation outcomes classifiers (Section 3.1).
112
+
113
+ LLM Finetuning LLMs may not be fully optimized for generating texts with specific constraints—in our case, desired conversation outcomes. The finetuning process can tailor LLMs to learn the task of interest. To guide the LLM in generating outcome-constrained counterspeech, we finetune the model with datasets containing conversations with the desired outcomes: the hate speech/counterspeech pairs followed by low conversation incivility (Yu et al., 2022b) and the pairs that have non-hateful hater reentry. We use the Parameter-Efficient Fine-Tuning (PEFT) with Low-Rank Adaptation (LoRA) method (Hu et al., 2021) to finetune LLMs.
114
+
115
+ Reinforcement Learning with LLM (RL) This method integrates the conversation outcome classifiers (Section 3.1) as a reward function to guide
116
+
117
+ the training process, which includes three steps. First, a hate comment is used as a query to get the response generated by an LLM. The initial model serves as a baseline for generating counterspeech. Second, hate speech and generated responses are fed into the classifiers to obtain their conversation outcome labels for assigning rewards. Specifically, pairs with low incivility or non-hateful reentry will be rewarded higher. Third, we maximize the probability of the desired outcomes in the text generation process. In addition to the reward value obtained from the (predicted) conversation outcomes, the KL-divergence (Kullback-Leibler) between the log probabilities of the two outputs is used as an additional reward. This ensures the desired outcome is considered while the generated responses do not deviate too far from the base language model. The reward is computed as $R = r - \beta * \mathrm{KL}$ . We train the model with the Proximal Policy Optimization (PPO) (Schulman et al., 2017) step until local stability is achieved.
118
+
119
+ # 3.3 Evaluation
120
+
121
+ Desired Conversation Outcome Metrics The evaluation aims to assess the ability of these methods to generate counterspeech that is more likely to achieve desired outcomes. As it would be difficult—and arguably unethical—to post the generated text to conversations on social media platforms to observe the real outcomes, we adopt an approach that has been used before (Saha et al., 2022; Tekiroğlu et al., 2022; Halim et al., 2023; Gupta et al., 2023). We use the conversation incivility level classifier and the hater reentry classifier (Section 3.1) trained with real conversation data to make predictions with the hate speech and generated counterspeech pairs. Although the accuracy of the classifiers is not perfect, given two counterspeech replies, these classifiers reliably identify the one that will lead to better outcomes (Yu et al., 2024, binary classification, $F1 = 0.66 - 0.75$ ). Thus, they serve as a proxy to compare counterspeech generated by different methods. Additionally, we conduct human assessments for reliability purposes.
122
+
123
+ Human Assessments The human assessment focuses on three characteristics of replies to hate speech: suitability, relevance, and effectiveness. Suitability is measured considering (i) whether the linguistic style of the reply to hate speech suits the conversation and (ii) whether it follows the civil rules of the environment. Relevance evaluates the
124
+
125
+ appropriateness of the reply with respect to the content of the hate comment. Effectiveness is evaluated based on whether the reply to hate speech is likely to stop the spread of hate and foster constructive conversations, as perceived by human annotators. Two graduate assistants, a male and female aged between 20 and 30, who are proficient in English and familiar with social media, assist with the evaluation. To ensure impartiality, reference text and generated text samples are randomly provided to the evaluators, so they do not know the source of each text. The inter-annotator agreement rate is calculated to assess reliability.
126
+
127
+ Stylistic Metrics The generated counterspeech is evaluated by stylistic metrics commonly used in previous studies (Chung et al., 2021; Zhu and Bhat, 2021; Tekiroglu et al., 2022). We calculate the similarity of counterspeech against a reference dataset consisting of human-generated counterspeech with the BLEU score (Chen and Cherry, 2014), ROUGE (Lin, 2004), METEOR (Banerjee and Lavie, 2005), and BERTScore (Zhang et al., 2019). The quality of generated texts is evaluated by the GRUEN metrics (Zhu and Bhat, 2020), including dimensions of grammaticality, redundancy, focus, and GRUEN score. The same scores are also calculated for the reference dataset for comparison purposes. Finally, we calculate the type-token ratio and distinct-n-grams to evaluate the diversity of generated texts (Fanton et al., 2021).
128
+
129
+ # 4 Experiments
130
+
131
+ # 4.1 Conversation Outcomes Classifiers
132
+
133
+ Data to Build Conversation Outcomes Classifiers We use Reddit data collected from 39 subreddits likely to contain abusive content (Vidgen et al., 2021). The hate comments are identified based on hate classifiers (Qian et al., 2019). Then, we collect replies to hate comments and identify counterspeech in replies referring to Yu et al. (2022b). For each counterspeech, we collect the follow-up replies. Then, we calculate the conversation incivility with $\alpha = 0.8$ and determine the incivility level by quantiles. The direct replies following counterspeech are used to identify hater reentry behavior: whether the hate instigator reenters and the comment is non-hateful. Both datasets are split into $80\%$ for training and $20\%$ for testing, with the testing portion used to evaluate the performance of the classifiers.
134
+
135
+ Classification Model and Performance As this study is not aimed at the best performance in the classification tasks, we use the RoBERTa model (Liu et al., 2019) to train outcome classifiers. The hate speech/counterspeech pairs are used to predict the incivility level and the hater reentry behavior. The detailed classification results can be seen in Table 5 and 6 in A.4. Although the classification results are somewhat low, these suboptimal classifiers are enough to defeat the baseline and differentiate counterspeech that will lead to high or low incivility in the follow-up conversation, as shown by (Yu et al., 2024). The accuracy for identifying non-hateful reentry is the highest.
136
+
137
+ # 4.2 Generating Counter Speech
138
+
139
+ Dataset We use the benchmark-Reddit dataset (Qian et al., 2019) for counterspeech generation and evaluation. The data contains hate comments from Reddit and counterspeech written by crowdsourcing workers. As we plan to explore the effect of this data in the finetuning and RL method, the data is split randomly into $80\%$ for training and $20\%$ for evaluation.
140
+
141
+ Instruction Prompts We use the Llama2-7b-chat model in our experiments to compare different methods, as we cannot train larger models like Llama2-13b-chat for finetuning and $RL$ due to limited computing capacity. We run a baseline inference with Llama2-13b-chat to demonstrate the impact of model size on results. As the generation and evaluation are based on the benchmark-Redit data, we apply the same system-level guideline: "Please generate a response in Reddit style" for all generations. The parameters are set to be the same in the generation of replies with no expected outcomes (baseline), low conversation incivility (civility), and non-hateful hater reentry (reentry). For Generate and Select, the number of responses is set to $k = 1$ , $k = 5$ , and $k = 10$ , the temperature to 0.7, and the maximum length of reply to 512. For $k = 5$ and $k = 10$ , we apply the incivility classifier and hater reentry classifier to select candidates with the targeted labels (i.e., low conversation incivility or non-hateful hater reentry) with the highest confidence. A random candidate is selected if there are no candidates with the targeted label in the generated replies.
142
+
143
+ Finetuning The Llama2-7b-chat model is finetuned with hate speech/counterspeech pairs that are followed with low conversation incivility or
144
+
145
+ non-hateful reentry in the training data. The fine-tuned models are expected to generate texts that share similar linguistic patterns and lead to desired conversation outcomes. Additionally, we fine-tune models with several reference datasets, including benchmark-Reddit, benchmark-Gab, CONAN, and MultiCONAN (see model details in A.2). This is to compare whether models built on existing counterspeech datasets can generate effective counterspeech and how these datasets influence the generation process.
146
+
147
+ Reinforcement Learning We use the Llama2-7b-chat as the base model for the RL process. The reward for the RL process is calculated based on the outcome classifiers: for the predicted categories of conversation incivility low, medium, and high, corresponding discrete rewards are assigned in descending order, namely 2, 1, and 0; for hater reentry classification, the reward for non-hateful reentry, no reentry, and hateful reentry is 2, 1, and 0, respectively. We also use the Llama-2-7b-chat finetuned with the benchmark-Reddit dataset, so that the model trained with RL can generate counterspeech that has similar linguistic patterns with counterspeech in the benchmark-Reddit dataset while having a higher probability of leading to expected conversation outcomes. The hyperparameters are shown in A.2. We leave exploring RL with other finetuned models for future work.
148
+
149
+ # 5 Results and Analysis
150
+
151
+ All methods are evaluated with the same test set from the benchmark-Reddit. The Llama2-7b-chat sometimes avoids responding to queries the model determines to be inappropriate and generates empty responses. Table 2 shows the ratio of non-empty, noted as valid, responses by each method. Except for instruction prompts, all the trained models, including the finetuning and RL models, have $100\%$ of valid responses. In instruction prompts, the valid response rate increases when using a more powerful model (Llama2-13b-chat), forcing the model to generate more candidates, or asking the model to generate counterspeech with constrained queries.
152
+
153
+ Expected Outcomes In the task of generating texts with low conversation incivility, we observe the following insights: (i) The counterspeech generated by a more powerful model (Llama2-13b-chat) has a higher proportion of samples leading to low incivility. (ii) Prompt queries with the constraint
154
+
155
+ of low incivility can increase the probability of generating counterspeech with low conversation incivility. (iii) The generate and select strategy leads to more counterspeech with the desired outcomes. The more candidates are generated (larger $k$ ), the higher the chances of getting replies with desired outcomes. (iv) The performance of finetuning methods in generating texts with expected outcomes is relatively inferior to others. (v) RL is a robust method to restrict text generation for desired outcomes. RL models generate more responses with desired outcomes than the baseline models and finetuning. (vi) Human-generated counterspeech in benchmark-Reddit, which disregards conversation outcomes, often fails to result in the desired outcomes in the follow-up conversations. Indeed, only 760 samples (27%) are classified as eliciting low conversation incivility.
156
+
157
+ The evaluation with the hater-reentry classifier further validates most insights. Larger models, prompts with desired outcomes, generate and select, and RL models generate more counterspeech with desired outcomes.
158
+
159
+ Similarity to Reference Texts We evaluate the similarity of generated texts to the counterspeech in the benchmark-Reddit data. We do not claim that the counterspeech in the benchmark-Reddit corpus is the gold standard. Instead, it serves as a baseline for us to understand whether the LLM-generated texts are different from human-generated ones and how different. We calculate multiple similarity metrics. Results show the metrics are highly correlated (Table 9 in the A.5). Hence, we only present the results of METEOR and BERTScore in Table 2.
160
+
161
+ METEOR values are low, with the average values ranging from 0.06 to 0.14. On the other hand, there is not much difference in the BERTScore by different methods, with values ranging from 0.80 to 0.86. The difference between METEOR and BERTScores indicates that LLM-generated replies have high semantic similarity to reference counterspeech, but the wording used in LLM-generated texts is different. Notably, even without finetuning or RL, LLMs are still capable of generating counterspeech with similar meanings to reference texts (baseline generation BERTScore 0.8).
162
+
163
+ Quality of Generated Counterspeech Table 3 presents the evaluation using stylistic metrics. Grammaticality scores measure grammatical correctness. Texts generated by language models gen
164
+
165
+ <table><tr><td rowspan="2"></td><td rowspan="2">Valid (%)</td><td colspan="2">Desired Outcomes</td><td colspan="2">Similarity</td></tr><tr><td>Civility (%)</td><td>Reentry (%)</td><td>METEOR</td><td>BERTScore</td></tr><tr><td colspan="6">Instruction Prompts</td></tr><tr><td colspan="6">Generate one based on (k=1)</td></tr><tr><td>Baseline</td><td>83%</td><td>23%</td><td>18%</td><td>0.07 (0.08)</td><td>0.80 (0.03)</td></tr><tr><td>Baseline(13b)</td><td>94%</td><td>27%</td><td>35%</td><td>0.12 (0.07)</td><td>0.81 (0.04)</td></tr><tr><td>Civility</td><td>92%</td><td>54%</td><td>49%</td><td>0.12 (0.05)</td><td>0.83 (0.02)</td></tr><tr><td>Reentry</td><td>94%</td><td>44%</td><td>45%</td><td>0.12 (0.06)</td><td>0.82 (0.02)</td></tr><tr><td colspan="6">Generate and select (k=5)</td></tr><tr><td>p=baseline, c=civility</td><td>84%</td><td>55%</td><td>32%</td><td>0.10 (0.07)</td><td>0.81 (0.03)</td></tr><tr><td>p=baseline, c=reentry</td><td>85%</td><td>34%</td><td>49%</td><td>0.11 (0.07)</td><td>0.82 (0.03)</td></tr><tr><td>p=civility, c=civility</td><td>92%</td><td>81%</td><td>53%</td><td>0.12 (0.05)</td><td>0.82 (0.02)</td></tr><tr><td>p=reentry, c=reentry</td><td>92%</td><td>49%</td><td>83%</td><td>0.13 (0.05)</td><td>0.83 (0.01)</td></tr><tr><td colspan="6">Generate and select (k=10)</td></tr><tr><td>p=baseline, c=civility</td><td>87%</td><td>69%</td><td>36%</td><td>0.11 (0.07)</td><td>0.82 (0.02)</td></tr><tr><td>p=baseline, c=reentry</td><td>86%</td><td>41%</td><td>61%</td><td>0.11 (0.07)</td><td>0.82 (0.02)</td></tr><tr><td>p=civility, c=civility</td><td>92%</td><td>86%</td><td>55%</td><td>0.12 (0.05)</td><td>0.82 (0.02)</td></tr><tr><td>p=reentry, c=reentry</td><td>92%</td><td>50%</td><td>86%</td><td>0.13 (0.05)</td><td>0.83 (0.01)</td></tr><tr><td colspan="6">Finetuning with Counterspeech Corpora</td></tr><tr><td>CONAN</td><td>100%</td><td>23%</td><td>48%</td><td>0.09 (0.06)</td><td>0.85 (0.02)</td></tr><tr><td>MultiCONAN</td><td>100%</td><td>22%</td><td>48%</td><td>0.11 (0.06)</td><td>0.85 (0.02)</td></tr><tr><td>Benchmark-Gab</td><td>100%</td><td>10%</td><td>43%</td><td>0.12 (0.10)</td><td>0.86 (0.02)</td></tr><tr><td>Benchmark-Reddit</td><td>100%</td><td>11%</td><td>42%</td><td>0.13 (0.11)</td><td>0.86 (0.02)</td></tr><tr><td colspan="6">Ours, with conversation outcomes</td></tr><tr><td>Reddit-CS-civility</td><td>100%</td><td>18%</td><td>35%</td><td>0.08 (0.05)</td><td>0.84 (0.02)</td></tr><tr><td>Reddit-CS-reentry</td><td>100%</td><td>19%</td><td>35%</td><td>0.08 (0.05)</td><td>0.84 (0.02)</td></tr><tr><td colspan="6">Reinforcement Learning (RL)</td></tr><tr><td>Civility</td><td>100%</td><td>77%</td><td>71%</td><td>0.14 (0.05)</td><td>0.83 (0.01)</td></tr><tr><td>Reentry</td><td>100%</td><td>67%</td><td>62%</td><td>0.14 (0.05)</td><td>0.83 (0.01)</td></tr><tr><td colspan="6">RL, finetuned LLM w/ Benchmark-Reddit</td></tr><tr><td>Civility</td><td>100%</td><td>30%</td><td>48%</td><td>0.13 (0.13)</td><td>0.85 (0.02)</td></tr><tr><td>Reentry</td><td>100%</td><td>18%</td><td>57%</td><td>0.07 (0.06)</td><td>0.86 (0.01)</td></tr><tr><td colspan="6">Reference</td></tr><tr><td>Benchmark-Reddit</td><td>100%</td><td>27%</td><td>37%</td><td>1.00 (0.00)</td><td>1.00 (0.00)</td></tr></table>
166
+
167
+ Table 2: Evaluation of (a) Desired Outcomes and (b) Similarity to the reference counterspeech in Benchmark-Reddit. METEOR and BERTScore are calculated per sample. Mean (SD) is reported. Generate and select and RL are better at generating more samples with desired outcomes. Although the wording differs from the Reference counterspeech (METEOR), the semantic relevance (BERTScore) is consistently high. All generations are based on Llama2-7b-chat, except Baseline(13b) is based on Llama2-13b-chat.
168
+
169
+ erally have higher grammatical scores than the reference (0.77), except the ones finetuned with Reddit conversation data: civility (0.77) and reentry (0.76). These finetuned models might have learned informal expressions on social media, thus they generate counterspeech with a lower grammaticality score. Counterspeech generated by LLMs without finetuning or RL is more redundant, indicated by lower scores in redundancy. After adding expected outcomes as constraints, LLM-generated counterspeech contains less redundancy. The focus
170
+
171
+ scores of counterspeech generated by instruction prompts are also much lower. In models with finetuning and $RL$ , the focus scores are much higher.
172
+
173
+ Overall, counterspeech generated by finetuning and $RL$ have higher quality, as reflected in the grammaticality, redundancy, focus, and overall GRUEN scores. In particular, the highest GRUEN scores are achieved by $RL$ models.
174
+
175
+ Diversity and Novelty The three diversity metrics (i.e., TTR, number of unique unigrams, and
176
+
177
+ <table><tr><td rowspan="2"></td><td colspan="4">Text Quality</td><td>Diversity</td><td>Novelty</td></tr><tr><td>Grammaticality</td><td>Focus</td><td>Redundancy</td><td>GRUEN</td><td>TTR</td><td>New Tokens</td></tr><tr><td colspan="7">Instruction Prompts</td></tr><tr><td colspan="7">Generate one based on</td></tr><tr><td>Baseline</td><td>0.73 (0.10)</td><td>-0.05 (0.05)</td><td>-1.14 (12.56)</td><td>0.60 (0.18)</td><td>0.06</td><td>5384</td></tr><tr><td>Baseline (13b)</td><td>0.80 (0.07)</td><td>-0.09 (0.03)</td><td>-1.33 (23.22)</td><td>0.60 (0.21)</td><td>0.06</td><td>9231</td></tr><tr><td>Civility</td><td>0.84 (0.04)</td><td>-0.10 (0.01)</td><td>-0.19 (0.56)</td><td>0.61 (0.22)</td><td>0.03</td><td>7019</td></tr><tr><td>Reentry</td><td>0.83 (0.07)</td><td>-0.10 (0.02)</td><td>-0.11 (0.39)</td><td>0.64 (0.18)</td><td>0.03</td><td>6407</td></tr><tr><td colspan="7">Generate and select (k=5)</td></tr><tr><td>p=baseline, c=civility</td><td>0.78 (0.10)</td><td>-0.08 (0.04)</td><td>-0.33 (4.37)</td><td>0.62 (0.19)</td><td>0.06</td><td>7220</td></tr><tr><td>p=baseline, c=reentry</td><td>0.78 (0.10)</td><td>-0.08 (0.04)</td><td>-0.34 (6.42)</td><td>0.63 (0.18)</td><td>0.05</td><td>6794</td></tr><tr><td>p=civility, c=civility</td><td>0.84 (0.03)</td><td>-0.10 (0.01)</td><td>-0.23 (2.35)</td><td>0.59 (0.23)</td><td>0.04</td><td>7668</td></tr><tr><td>p=reentry, c=reentry</td><td>0.84 (0.02)</td><td>-0.10 (0.00)</td><td>-0.07 (0.21)</td><td>0.68 (0.12)</td><td>0.03</td><td>5224</td></tr><tr><td colspan="7">Generate and select (k=10)</td></tr><tr><td>p=baseline, c=civility</td><td>0.79 (0.09)</td><td>-0.08 (0.04)</td><td>-0.27 (2.27)</td><td>0.62 (0.20)</td><td>0.06</td><td>8000</td></tr><tr><td>p=baseline, c=reentry</td><td>0.80 (0.09)</td><td>-0.08 (0.04)</td><td>-0.20 (2.02)</td><td>0.64 (0.18)</td><td>0.05</td><td>6908</td></tr><tr><td>p=civility, c=civility</td><td>0.84 (0.03)</td><td>-0.10 (0.00)</td><td>-0.23 (0.48)</td><td>0.57 (0.24)</td><td>0.04</td><td>8024</td></tr><tr><td>p=reentry, c=reentry</td><td>0.84 (0.02)</td><td>-0.10 (0.00)</td><td>-0.06 (0.12)</td><td>0.68 (0.11)</td><td>0.03</td><td>5198</td></tr><tr><td colspan="7">Finetuning w/ Counterspeech</td></tr><tr><td>CONAN</td><td>0.81 (0.09)</td><td>-0.02 (0.04)</td><td>0.00 (0.03)</td><td>0.78 (0.11)</td><td>0.11</td><td>1982</td></tr><tr><td>MultiCONAN</td><td>0.83 (0.07)</td><td>-0.05 (0.05)</td><td>-0.12 (2.93)</td><td>0.76 (0.13)</td><td>0.09</td><td>2448</td></tr><tr><td>Benchmark-Gab</td><td>0.85 (0.06)</td><td>-0.01 (0.03)</td><td>0.00 (0.00)</td><td>0.83 (0.08)</td><td>0.02</td><td>111</td></tr><tr><td>Benchmark-Redit</td><td>0.80 (0.09)</td><td>-0.04 (0.05)</td><td>0.00 (0.01)</td><td>0.77 (0.12)</td><td>0.03</td><td>147</td></tr><tr><td colspan="7">Ours, w/ conv. outcomes</td></tr><tr><td>Reddit-CS-civility</td><td>0.78 (0.09)</td><td>-0.04 (0.05)</td><td>-0.70 (7.78)</td><td>0.71 (0.17)</td><td>0.12</td><td>2858</td></tr><tr><td>Reddit-CS-reentry</td><td>0.78 (0.09)</td><td>-0.04 (0.05)</td><td>-0.70 (7.56)</td><td>0.71 (0.17)</td><td>0.11</td><td>2643</td></tr><tr><td colspan="7">Reinforcement Learning (RL)</td></tr><tr><td>Civility</td><td>0.85 (0.03)</td><td>-0.10 (0.00)</td><td>-0.04 (0.12)</td><td>0.71 (0.11)</td><td>0.03</td><td>5575</td></tr><tr><td>Reentry</td><td>0.84 (0.04)</td><td>-0.10 (0.00)</td><td>-0.06 (0.18)</td><td>0.69 (0.13)</td><td>0.03</td><td>6574</td></tr><tr><td colspan="7">RL, finetuned LLM w/ B-Redit</td></tr><tr><td>Civility</td><td>0.80 (0.02)</td><td>0.00 (0.00)</td><td>0.00 (0.00)</td><td>0.80 (0.02)</td><td>0.00</td><td>0</td></tr><tr><td>Reentry</td><td>0.87 (0.03)</td><td>0.00 (0.00)</td><td>0.00 (0.00)</td><td>0.87 (0.03)</td><td>0.01</td><td>12</td></tr><tr><td colspan="7">Reference</td></tr><tr><td>Benchmark-Redit</td><td>0.77 (0.12)</td><td>-0.03 (0.05)</td><td>0.00 (0.01)</td><td>0.74 (0.13)</td><td>0.09</td><td>0</td></tr></table>
178
+
179
+ Table 3: Evaluation of Quality and Diversity. GRUEN and BERTScore are calculated per sample. Mean (SD) are reported. The quality of counterspeech by Instruction prompts is relatively low. LLM finetuning with Reddit-counterspeech generate texts with high diversity. RL with finetuned LLMs generate texts with reduced novelty. All generations are based on Llama2-7b-chat, except Baseline(13b) is based on Llama2-13b-chat.
180
+
181
+ number of unique bigrams) are highly correlated (Table 8 in A.5). TTR and the novelty metric (i.e., number of new unigrams) are presented in Table 3. The TTR of generated counterspeech significantly decreases with models that use expected outcomes constraints in instruction prompts and RL. The highest TTRs are achieved by the LLM finetuned with real Reddit conversation data. Note that this data usually contains diverse and informal language.
182
+
183
+ The novelty of generated texts is higher when conversation outcomes are considered in the generation. The number of new unigrams generated by
184
+
185
+ untrained LLMs in the instruction prompt method is substantially higher than trained models with finetuning and RL.
186
+
187
+ Human Evaluation We choose generated texts constrained with low conversation incivility for human evaluation. The model with the highest number of samples predicted as having low conversation incivility from each method is selected for further evaluation. Hence, we randomly select 50 pairs of hate comments and counterspeech from the instruction prompts with $p = \text{civility}$ , $k = 10$
188
+
189
+ <table><tr><td>Method</td><td>Suitability</td><td>Relevance</td><td>Effectiveness</td></tr><tr><td>Prompt</td><td>0.50</td><td>0.88</td><td>0.54</td></tr><tr><td>Finetuning</td><td>0.80</td><td>0.68</td><td>0.80</td></tr><tr><td>RL</td><td>0.74</td><td>0.76</td><td>0.72</td></tr></table>
190
+
191
+ Table 4: Proportion of samples labeled as Yes for each evaluation dimension by methods.
192
+
193
+ and $c =$ civility, finetuning with CONAN, and RL with low incivility, respectively. Then, we mix the samples and ask annotators to label yes or no to three criteria: suitability, relevance, and effectiveness. The agreement percentages for initial labels are 0.78, 0.92, and 0.64 respectively for suitability, quality, and effectiveness. For the samples in which annotators disagree, the annotators discuss and finalize an agreed annotation. Table 4 presents the results. The instruction prompts methods tend to generate long responses with high relevance. However, the answers vary as replies, essays, letters, or conversation scripts with multiple users. Many samples are in a format not appropriate for social media platforms. Although the desired outcome metric shows finetuning is relatively inferior to other methods, the human evaluation shows the generated counterspeech by finetuning and RL are usually suitable and effective. Further investigation into the reasons that explain the differences in desired outcomes and human assessment is needed.
194
+
195
+ # 6 Conclusions
196
+
197
+ We present an initial exploration of methods for constrained generation of counterspeech controlled by potential conversation outcomes. We incorporate the desired outcomes (i.e., low conversation incivility and non-hateful hyster reentry) into the text generation process through three methods: instruction prompts, LLM finetuning, and LLM RL. The text generation results are evaluated with desired conversation metrics, stylistic metrics, and human assessment. Results show that instruction prompts and RL generate counterspeech with a higher probability of eliciting desired outcomes based on the prediction of outcome classifiers, while finetuning and RL generate more effective counterspeech based on human assessments. The LLMs-generated texts consistently show high relevance to hate speech, but the wording differs.
198
+
199
+ The generated texts present different characteristics. The counterspeech generated by LLM without further training tends to be long, not suitable for
200
+
201
+ the conversation context on social media, and with low quality based on GRUEN metrics and human assessment. Both finetuning and RL models generate high-quality counterspeech with styles suitable for social media platforms. The experiments highlight the strengths and weaknesses of each method, enabling stakeholders to choose the method most appropriate for their needs and preferences.
202
+
203
+ # Limitations
204
+
205
+ The conversation outcome classifiers are not perfect, as the texts of hate comments and replies only partially contribute to the conversation outcomes. Other factors include the context of the conversation and users' positions and identities. While the outcome classifiers provide a convenient method for evaluation, they may introduce bias into the evaluation process. Therefore, interpretations and conclusions drawn from these evaluations should be considered with caution. Future work will explore more accurate and unbiased classifiers to enhance text generation and evaluation. We use computing-based metrics for evaluating similarity, text quality, diversity, and novelty. Although these metrics are widely used, they may present bias. More sophisticated evaluation methods and comprehensive human assessments are needed to fully capture the multidimensional quality of the generated text. Text generation is influenced by numerous factors, including the formulation of prompt queries, settings of LLMs for text generation, fine-tuning language models with different datasets, variations in fine-tuning and reinforcement learning settings, and size of language models. Further experiments are needed to better understand the impact of these factors on text generation. The outcome classifiers are based on Reddit conversation data, which may not transfer to other platforms. Experiments with different data are to be done to understand communication patterns across platforms and the guiding effect of cross-domain data.
206
+
207
+ # Ethics Statement
208
+
209
+ The study has been through careful consideration of benefits and risks. First, we used data from Reddit, which is considered a public space. Users consent to make their data available to third parties. Second, user names and identities are encrypted to avoid the identification of users. Third, student collaborators working on the data have been warned of the potential hateful content and are encouraged to stop their
210
+
211
+ work at any time. Fourth, the data will be shared for research purposes only. Although releasing the dataset may raise risks, we believe the benefits of contributing to effective methods to counter online hate outweighs the potential risks. Finally, the models developed may not be directly applicable to the generation of counterspeech to online hate. Instead, they could serve as valuable tools to assist content moderation in crafting counterspeech. Human judgments are crucial in assessing the suitability and appropriateness of replies to HS.
212
+
213
+ # Acknowledgement
214
+
215
+ Dr. Lingzi Hong and Xiaoying Song gratefully acknowledge financial support from the Institute of Museum and Library Services (US) under Grants LG-256661-OLS-24 and LG-256666-OLS-24.
216
+
217
+ # References
218
+
219
+ Fabienne Baider. 2023. Accountability issues, online covert hate speech, and the efficacy of counter-speech. Politics and Governance, 11(2):249-260.
220
+ Satanjeev Banerjee and Alon Lavie. 2005. Meteor: An automatic metric for mt evaluation with improved correlation with human judgments. In Proceedings of the acl workshop on intrinsic and extrinsic evaluation measures for machine translation and/or summarization, pages 65-72.
221
+ Siqi Bao, Huang He, Fan Wang, Hua Wu, and Haifeng Wang. 2020. Plato: Pre-trained dialogue generation model with discrete latent variable. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 85-96.
222
+ Catherine Blaya. 2019. Cyberhate: A review and content analysis of intervention strategies. Aggression and violent behavior, 45:163-172.
223
+ Helena Bonaldi, Yi-Ling Chung, Gavin Abercrombie, and Marco Guerini. 2024. Nlp for counterspeech against hate: A survey and how-to guide. arXiv preprint arXiv:2403.20103.
224
+ Catherine Buerger. 2021. # iamhere: Collective counterspeech and the quest to improve online discourse. Social Media+ Society, 7(4):20563051211063843.
225
+ Boxing Chen and Colin Cherry. 2014. A systematic comparison of smoothing techniques for sentence-level bleu. In Proceedings of the ninth workshop on statistical machine translation, pages 362-367.
226
+ Yi-Ling Chung, Elizaveta Kuzmenko, Serra Sinem Tekiroglu, and Marco Guerini. 2019. Conan-counter narratives through nichesourcing: a multilingual dataset of responses to fight online hate speech. In
227
+
228
+ Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2819-2829.
229
+ Yi-Ling Chung, Serra Sinem Tekiroglu, and Marco Guerini. 2020. Italian counter narrative generation to fight online hate speech. In Proceedings of the Seventh Italian Conference on Computational Linguistics (CLIC-it 2020), volume 2769.
230
+ Yi-Ling Chung, Serra Sinem Tekiroglu, and Marco Guerini. 2021. Towards knowledge-grounded counter narrative generation for hate speech. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 899-914.
231
+ Margherita Fanton, Helena Bonaldi, Serra Sinem Tekiroglu, and Marco Guerini. 2021. Human-in-the-loop for data collection: a multi-target counter narrative dataset to fight online hate speech. 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 3226-3240.
232
+ Kathleen C Fraser, Svetlana Kiritchenko, Isar Nejadgholi, and Anna Kerkhof. 2023. What makes a good counter-stereotype? evaluating strategies for automated responses to stereotypical text. In Proceedings of the First Workshop on Social Influence in Conversations (SICON 2023), pages 25-38.
233
+ Rishabh Gupta, Shaily Desai, Manvi Goel, Anil Bandhakavi, Tanmoy Chakraborty, and Md Shad Akhtar. 2023. Counterspeeches up my sleeve! intent distribution learning and persistent fusion for intent-conditioned counterspeech generation. arXiv preprint arXiv:2305.13776.
234
+ Sadaf MD Halim, Saqib Irtiza, Yibo Hu, Latifur Khan, and Bhavani Thuraisingham. 2023. Wokegpt: Improving counterspeech generation against online hate speech by intelligently augmenting datasets using a novel metric. In 2023 International Joint Conference on Neural Networks (IJCNN), pages 1-10. IEEE.
235
+ Sabit Hassan and Malihe Alikhani. 2023. Discgen: A framework for discourse-informed counterspeech generation. In Proceedings of the 13th International Joint Conference on Natural Language Processing and the 3rd Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics (Volume 1: Long Papers), pages 420-429.
236
+ Sameera Horawalavithana, Nazim Choudhury, John Skvoretz, and Adriana Iamnitchi. 2022. Online discussion threads as conversation pools: predicting the growth of discussion threads on reddit. Computational and Mathematical Organization Theory, pages 1-29.
237
+ Edward J Hu, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, Weizhu Chen, et al. 2021. Lora: Low-rank adaptation of large language models. In International Conference on Learning Representations.
238
+
239
+ Di Jin, Zhijing Jin, Zhiting Hu, Olga Vechtomova, and Rada Mihalcea. 2022. Deep learning for text style transfer: A survey. Computational Linguistics, 48(1):155-205.
240
+ 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.
241
+ Sachin Kumar, Eric Malmi, Aliaksei Severyn, and Yulia Tsvetkov. 2021. Controlled text generation as continuous optimization with multiple constraints. Advances in Neural Information Processing Systems, 34:14542-14554.
242
+ Chin-Yew Lin. 2004. Rouge: A package for automatic evaluation of summaries. In Text summarization branches out, pages 74-81.
243
+ Ping Liu, Joshua Guberman, Libby Hemphill, and Aron Culotta. 2018. Forecasting the presence and intensity of hostility on instagram using linguistic and social features. In Proceedings of the International AAAI Conference on Web and Social Media, volume 12.
244
+ 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.
245
+ Ximing Lu, Sean Welleck, Peter West, Liwei Jiang, Jungo Kasai, Daniel Khashabi, Ronan Le Bras, Lianhui Qin, Youngjae Yu, Rowan Zellers, et al. 2022. Neurologic a* esque decoding: Constrained text generation with lookahead heuristics. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 780-799.
246
+ Jozef Miskolci, Lucia Kováčová, and Edita Rigóva. 2020. Countering hate speech on facebook: The case of the roma minority in slovakia. Social Science Computer Review, 38(2):128-146.
247
+ Lili Mou and Olga Vechtomova. 2020. Stylized text generation: Approaches and applications. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: Tutorial Abstracts, pages 19-22.
248
+ Jimin Mun, Cathy Buerger, Jenny T Liang, Joshua Garland, and Maarten Sap. 2024. Counterspeakers' perspectives: Unveiling barriers and ai needs in the fight against online hate. In Proceedings of the CHI Conference on Human Factors in Computing Systems, pages 1-22.
249
+ Jing Qian, Anna Bethke, Yinyin Liu, Elizabeth Belding, and William Yang Wang. 2019. A benchmark dataset for learning to intervene in online hate speech. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th
250
+
251
+ International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 4755-4764.
252
+ Punyajoy Saha, Kanishk Singh, Adarsh Kumar, Binny Mathew, and Animesh Mukherjee. 2022. Counteredi: A controllable approach to generate polite, detoxified and emotional counterspeech. arXiv preprint arXiv:2205.04304.
253
+ Timo Schick, Sahana Udupa, and Hinrich Schütze. 2021. Self-diagnosis and self-debiasing: A proposal for reducing corpus-based bias in nlp. Transactions of the Association for Computational Linguistics, 9:1408-1424.
254
+ John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. 2017. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347.
255
+ Serra Sinem Tekiroğlu, Helena Bonaldi, Margherita Fanton, and Marco Guerini. 2022. Using pre-trained language models for producing counter narratives against hate speech: a comparative study. In *Findings of the Association for Computational Linguistics: ACL* 2022, pages 3099-3114.
256
+ Serra Sinem Tekiroglu, Yi-Ling Chung, and Marco Guerini. 2020. Generating counter narratives against online hate speech: Data and strategies. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1177-1190.
257
+ Bertie Vidgen, Dong Nguyen, Helen Margetts, Patricia Rossini, and Rebekah Tromble. 2021. Introducing cad: the contextual abuse dataset. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2289-2303.
258
+ Ke Wang and Xiaojun Wan. 2018. Sentigan: Generating sentimental texts via mixture adversarial networks. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence (IJCAI-18), pages 4446-4452.
259
+ Lingzhi Wang, Xingshan Zeng, Huang Hu, Kam-Fai Wong, and Daxin Jiang. 2021. Re-entry prediction for online conversations via self-supervised learning. In Findings of the Association for Computational Linguistics: EMNLP 2021, pages 2127-2137.
260
+ Wenhao Yu, Chenguang Zhu, Zaitang Li, Zhiting Hu, Qingyun Wang, Heng Ji, and Meng Jiang. 2022a. A survey of knowledge-enhanced text generation. ACM Computing Surveys, 54(11s):1-38.
261
+ Xinchen Yu, Eduardo Blanco, and Lingzi Hong. 2022b. Hate speech and counter speech detection: Conversational context does matter. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5918-5930.
262
+
263
+ Xinchen Yu, Eduardo Blanco, and Lingzi Hong. 2024. Hate cannot drive out hate: Forecasting conversation incivility following replies to hate speech. In Proceedings of the International AAAI Conference on Web and Social Media, volume 18, pages 1740-1752.
264
+ Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q Weinberger, and Yoav Artzi. 2019. Bertscore: Evaluating text generation with bert. In International Conference on Learning Representations.
265
+ Wanzheng Zhu and Suma Bhat. 2020. Gruen for evaluating linguistic quality of generated text. In *Findings of the Association for Computational Linguistics: EMNLP* 2020, pages 94-108.
266
+ Wanzheng Zhu and Suma Bhat. 2021. Generate, prune, select: A pipeline for counterspeech generation against online hate speech. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 134-149.
267
+
268
+ # A Appendices
269
+
270
+ # A.1 Computing Resources
271
+
272
+ The computational resources used in this research include a high-performance server equipped with three Quadro RTX 8000 GPUs, 128G memory, and a 4T disk.
273
+
274
+ # A.2 Hyperparameters
275
+
276
+ LLM Finetuning: We use PEFT LoRA for the finetuning process. The LoRA configuration has $r = 16$ , alpha $= 32$ , dropout $= 0.05$ , and bias is "none". The hyperparameters are as follows: the learning rate is 1e-4, the number of epochs is 1, and the warmup ratio is 0.1.
277
+
278
+ LLM RL: The reward trainer uses the RoBERTa base model, the learning rate is 1e-5, the batch size is 16, and the number of epochs is 5. In the PPO process, the generation component has $top\_k = 0$ , $top\_p = 1.0$ , $do\_sample = True$ , and the max length is 256. The PPO configuration has a learning rate of 1.41e-5, a batch size of 32, and an initial KL coefficient of 0.1.
279
+
280
+ # A.3 Dataset License and Use
281
+
282
+ The Benchmark dataset by Qian et al. (2019) is under the Creative Commons Attribution-NonCommercial 4.0 International Public License. The CONAN and MultiCONAN datasets can be used for research purposes with proper citation (Chung et al., 2019; Fanton et al., 2021). The benchmark-Reddit data contains 5,020 unique conversations with hate speech identified. Each hate speech comment has multiple responses. We extracted the hate speech from conversations and
283
+
284
+ their counterspeech responses, generating 14,208 valid hate speech/counterspeech pairs, noted as the benchmark-Reddit data. The testing data includes 2,843 pairs of hate speech/counterspeech.
285
+
286
+ # A.4 Evaluation Results of Conversation Outcome Classifiers
287
+
288
+ Table 5 presents the evaluation of the conversation incivility classifier. The baseline is calculated assuming all test samples are assigned with the majority label, Medium. Although the classification results are somewhat low, these suboptimal classifiers are enough to defeat the baseline and differentiate counterspeech that will lead to high or low incivility in the follow-up conversation (Yu et al., 2024, binary classification, F1=0.66–0.75). Table 6 presents the evaluation of the hater reentry classifier. The baseline is calculated assuming all test samples are assigned with the majority label, non-hateful reentry. The non-hateful reentry class has the highest F1 of 0.61.
289
+
290
+ # A.5 Evaluation Metrics
291
+
292
+ Table 7 shows the number of samples in each class based on the prediction of the conversation incivility classifier and the hate re-entry classifier.
293
+
294
+ Table 8 presents the correlation coefficients between diversity metrics (i.e., type-token ratio, distinct-1, and distinct-2) and novelty metrics (i.e., number of new unigrams and bigrams) using the reference texts in Benchmark-Reddit.
295
+
296
+ Table 9 presents the correlation of metrics that evaluate the relevance of generated texts to reference texts in Benchmark-Reddit.
297
+
298
+ Table 10 presents relatively good and bad examples of generated texts by different methods<sup>1</sup>. Counterspeech replies annotated by the human annotators as bad either are not suitable to the conversation context (e.g., example(2)), not a counterspeech (e.g., example(4)), or are very generic and do not address the specific hateful content (e.g., example(6)).
299
+
300
+ # A.6 AI Use
301
+
302
+ We acknowledge the use of code-writing assistance GitHub Copilot. While the tool aided in generating code snippets and providing insights, the final implementation and decisions were made by the authors.
303
+
304
+ <table><tr><td></td><td colspan="3">High</td><td colspan="3">Medium</td><td colspan="3">Low</td><td colspan="3">Weighted Average</td></tr><tr><td></td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td></tr><tr><td>Baseline</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.49</td><td>1.00</td><td>0.66</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.24</td><td>0.49</td><td>0.32</td></tr><tr><td>Incivility</td><td>0.43</td><td>0.32</td><td>0.36</td><td>0.55</td><td>0.66</td><td>0.60</td><td>0.32</td><td>0.27</td><td>0.29</td><td>0.46</td><td>0.48</td><td>0.46</td></tr></table>
305
+
306
+ Table 5: Evaluation results of the conversation incivility classifier.
307
+
308
+ <table><tr><td rowspan="2"></td><td colspan="3">Hate reentry</td><td colspan="3">No reentry</td><td colspan="3">Non-hate reentry</td><td colspan="3">Weighted Average</td></tr><tr><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td></tr><tr><td>Baseline</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.49</td><td>1.00</td><td>0.66</td><td>0.16</td><td>0.33</td><td>0.22</td></tr><tr><td>Reentry</td><td>0.32</td><td>0.20</td><td>0.25</td><td>0.52</td><td>0.41</td><td>0.46</td><td>0.54</td><td>0.70</td><td>0.61</td><td>0.49</td><td>0.51</td><td>0.46</td></tr></table>
309
+
310
+ Table 6: Evaluation results of the hater reentry classifier.
311
+
312
+ <table><tr><td rowspan="2">Category</td><td rowspan="2">Model</td><td colspan="3">Conversation Incivility</td><td colspan="3">Hater Reentry</td></tr><tr><td>High</td><td>Medium</td><td>Low</td><td>No reentry</td><td>Hateful</td><td>Non-hateful</td></tr><tr><td rowspan="4">Generation</td><td>baseline</td><td>291</td><td>1733</td><td>652</td><td>1422</td><td>748</td><td>506</td></tr><tr><td>baseline(13B)</td><td>686</td><td>1214</td><td>776</td><td>752</td><td>937</td><td>987</td></tr><tr><td>civility</td><td>412</td><td>657</td><td>1547</td><td>876</td><td>346</td><td>1394</td></tr><tr><td>reentry</td><td>629</td><td>794</td><td>1253</td><td>910</td><td>476</td><td>1290</td></tr><tr><td rowspan="8">Prompt and Select</td><td>p=baseline k=5 c=civility</td><td>195</td><td>855</td><td>1566</td><td>1117</td><td>595</td><td>904</td></tr><tr><td>p=civility k=5 c=civility</td><td>134</td><td>176</td><td>2306</td><td>849</td><td>253</td><td>1514</td></tr><tr><td>p=baseline k=5 c=reentry</td><td>415</td><td>1240</td><td>961</td><td>771</td><td>443</td><td>1402</td></tr><tr><td>p=reentry k=5 c=reentry</td><td>914</td><td>312</td><td>1390</td><td>64</td><td>186</td><td>2366</td></tr><tr><td>p=baseline k=10 c=civility</td><td>114</td><td>537</td><td>1965</td><td>1070</td><td>511</td><td>1035</td></tr><tr><td>p=civility k=10 c=civility</td><td>73</td><td>100</td><td>2443</td><td>828</td><td>222</td><td>1566</td></tr><tr><td>p=baseline k=10 c=reentry</td><td>444</td><td>994</td><td>1178</td><td>511</td><td>371</td><td>1734</td></tr><tr><td>p=reentry k=10 c=reentry</td><td>890</td><td>295</td><td>1431</td><td>25</td><td>160</td><td>2431</td></tr><tr><td rowspan="6">LLM Finetune</td><td>civility</td><td>953</td><td>1298</td><td>592</td><td>881</td><td>954</td><td>1008</td></tr><tr><td>reentry</td><td>939</td><td>1417</td><td>487</td><td>731</td><td>1152</td><td>960</td></tr><tr><td>CONAN</td><td>1429</td><td>752</td><td>662</td><td>438</td><td>1031</td><td>1374</td></tr><tr><td>MultiCONAN</td><td>1386</td><td>835</td><td>622</td><td>559</td><td>931</td><td>1353</td></tr><tr><td>Benchmark-Reddit</td><td>1775</td><td>757</td><td>311</td><td>510</td><td>1149</td><td>1184</td></tr><tr><td>Benchmark-Gab</td><td>1974</td><td>585</td><td>284</td><td>533</td><td>1076</td><td>1234</td></tr><tr><td rowspan="4">LLM TRL</td><td>civility</td><td>239</td><td>423</td><td>2181</td><td>292</td><td>540</td><td>2011</td></tr><tr><td>reentry</td><td>481</td><td>461</td><td>1901</td><td>408</td><td>661</td><td>1774</td></tr><tr><td>bm_reddit_ft_civility</td><td>66</td><td>1917</td><td>860</td><td>448</td><td>1036</td><td>1359</td></tr><tr><td>bm_reddit_ft_reentry</td><td>1212</td><td>1130</td><td>501</td><td>222</td><td>992</td><td>1629</td></tr><tr><td>Reference</td><td>benchmark_reddit</td><td>1245</td><td>838</td><td>760</td><td>683</td><td>1117</td><td>1043</td></tr></table>
313
+
314
+ Table 7: Evaluation results of conversation incivility and hater reentry classifiers.
315
+
316
+ <table><tr><td></td><td>TTR</td><td>distinct-1</td><td>distinct-2</td><td>#new_unigram</td><td>#new_bigram</td></tr><tr><td>TTR</td><td>1</td><td>0.990</td><td>0.971</td><td>-0.219</td><td>-0.298</td></tr><tr><td>distinct-1</td><td></td><td>1</td><td>0.972</td><td>-0.287</td><td>-0.364</td></tr><tr><td>distinct-2</td><td></td><td></td><td>1</td><td>-0.086</td><td>-0.160</td></tr><tr><td>#new_unigram</td><td></td><td></td><td></td><td>1</td><td>0.980</td></tr><tr><td>#new_bigram</td><td></td><td></td><td></td><td></td><td>1</td></tr></table>
317
+
318
+ Table 8: Correlation coefficients of diversity metrics. TTR (type-token ratio) highly correlates with distinct-1 and distinct-2. Using the texts in benchmark-Reddit, the number of new unigrams is highly correlated with the number of bigrams.
319
+
320
+ <table><tr><td></td><td>BLEU</td><td>ROUGE-r</td><td>ROUGE-p</td><td>ROUGE-f</td><td>METEOR</td><td>BERT-p</td><td>BERT-r</td><td>BERT-f</td></tr><tr><td>BLEU</td><td>1</td><td>0.799</td><td>0.997</td><td>0.990</td><td>0.973</td><td>0.870</td><td>0.983</td><td>0.952</td></tr><tr><td>ROUGE-r</td><td></td><td>1</td><td>0.829</td><td>0.874</td><td>0.916</td><td>0.466</td><td>0.866</td><td>0.649</td></tr><tr><td>ROUGE-p</td><td></td><td></td><td>1</td><td>0.996</td><td>0.983</td><td>0.848</td><td>0.985</td><td>0.939</td></tr><tr><td>ROUGE-f</td><td></td><td></td><td></td><td>1</td><td>0.995</td><td>0.806</td><td>0.99</td><td>0.914</td></tr><tr><td>METEOR</td><td></td><td></td><td></td><td></td><td>1</td><td>0.759</td><td>0.988</td><td>0.884</td></tr><tr><td>BERT-p</td><td></td><td></td><td></td><td></td><td></td><td>1</td><td>0.835</td><td>0.974</td></tr><tr><td>BERT-r</td><td></td><td></td><td></td><td></td><td></td><td></td><td>1</td><td>0.938</td></tr><tr><td>BERT-f</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>1</td></tr></table>
321
+
322
+ Table 9: Correlation coefficients of similarity metrics. Almost all metrics are highly correlated.
323
+
324
+ <table><tr><td>ID</td><td>Method</td><td>Evaluation</td><td>Hate Comment</td><td>Generated Reply</td></tr><tr><td>1</td><td>Instruction Prompts</td><td>Good</td><td>Wow. Can&#x27;t believe anyone would actually vote for that cunt.</td><td>I understand that many people are upset about the election results, but let&#x27;s try to approach this in a constructive way. Instead of resorting to insults or name-calling, let&#x27;s focus on the issues that matter most to us. What are the most pressing problems facing our country, and how can we work together to address them? For example, I&#x27;m concerned about the rising cost of healthcare and the impact it&#x27;s having on families and small businesses. I think we need to work towards a more affordable and sustainable healthcare system that prioritizes the needs of everyone, not just the wealthy and powerful.</td></tr><tr><td>2</td><td>Instruction Prompts</td><td>Bad</td><td>what was this dumb cunt thinking? &quot;oh yeah I&#x27;ll just slap on this wig, call my-self Pauline &amp; wander into the woman&#x27;s changing room? Cunt needs section-ing, trans people have mental illness or some deep laying issues they need to deal with.</td><td>Title: Challenging Harmful Stereotypes and Promoting Inclusivity for Trans-gender Individuals. Introduction: Hello fellow Reditors, I&#x27;m here to address a concerning comment that was recently made on this platform. The comment in question perpetuates harmful stereotypes and discrimination against transgender individuals. As a community, it&#x27;s important that we challenge these stereotypes and promote inclusivity for all individuals, regardless of their gender identity...</td></tr><tr><td>3</td><td>Finetune</td><td>Good</td><td>Why are these companies so retarded that they think this kind of PR is gonna help them? Women aren&#x27;t the target gaming demographic and probably never will be.</td><td>If you really think that women will never be the target demographic for video games, then you are living in a fantasy world.</td></tr><tr><td>4</td><td>Finetune</td><td>Bad</td><td>What a faggot bot. Tell me to use the less bigoted and universally accepted term &quot;--BrushYourTeeth&quot; if you suck big black robo cock.</td><td>What is wrong with the word &#x27;faggot&#x27;?</td></tr><tr><td>5</td><td>RL</td><td>Good</td><td>Allo, ya queer bitch! &#x27;Ow&#x27;s yer sex life?</td><td>It is important to treat everyone with respect and dignity, regardless of their background or identity. Using offensive language or making inappropriate comments is not acceptable and can cause harm to others. Let&#x27;s focus on having respectful and meaningful conversations instead.</td></tr><tr><td>6</td><td>RL</td><td>Bad</td><td>Nathan Grayson wrote that retarded article, but to be fair Kotaku&#x27;s hands on preview of the game didn&#x27;t have much good to say about it.</td><td>I apologize, but I cannot engage in discussions that use derogatory language or perpetuate harmful stereotypes. The term &quot;retarded&quot; is a hurtful and offensive slur that has been used to demean and dehumanize people with intellectual disabilities. Using this term to describe someone&#x27;s work or a game preview is not only disrespectful, but it also contributes to a culture of ableism and discrimination...</td></tr></table>
325
+
326
+ Table 10: Sample Generated Replies by Instruction Prompts, LLM Finetune, and LLM RL.
2024/Outcome-Constrained Large Language Models for Countering Hate Speech/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a19467900d03ba53c0816d12d2cc570eea569d9f510bad1fd67c58457ecd07bb
3
+ size 1043042
2024/Outcome-Constrained Large Language Models for Countering Hate Speech/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Overcome Noise and Bias_ Segmentation-Aided Multi-Granularity Denoising and Debiasing for Enhanced Quarduples Extraction in Dialogue/3176c8b9-a49d-4ec0-8717-d3ee041a0fdf_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Overcome Noise and Bias_ Segmentation-Aided Multi-Granularity Denoising and Debiasing for Enhanced Quarduples Extraction in Dialogue/3176c8b9-a49d-4ec0-8717-d3ee041a0fdf_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Overcome Noise and Bias_ Segmentation-Aided Multi-Granularity Denoising and Debiasing for Enhanced Quarduples Extraction in Dialogue/3176c8b9-a49d-4ec0-8717-d3ee041a0fdf_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d095230750643e95cbcfd6e54fd7f6193eeaa7c016efa19e8e0222847ef7365d
3
+ size 1053987
2024/Overcome Noise and Bias_ Segmentation-Aided Multi-Granularity Denoising and Debiasing for Enhanced Quarduples Extraction in Dialogue/full.md ADDED
@@ -0,0 +1,541 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Overcome Noise and Bias: Segmentation-Aided Multi-Granularity Denoising and Debiasing for Enhanced Quartuples Extraction in Dialogue
2
+
3
+ Xianlong Luo $^{1,2}$ Meng Yang $^{1,2*}$ Yihao Wang $^{1,2}$
4
+
5
+ <sup>1</sup>School of Computer Science and Engineering, Sun Yat-Sen University
6
+
7
+ $^{2}$ Key Laboratory of Machine Intelligence and Advanced Computing (SYSU), Ministry of Education, China
8
+
9
+ luoxlong@mail2.sysu.edu.cn, yangm6@mail.sysu.edu.cn,
10
+
11
+ wangyh357@mail2.sysu.edu.cn
12
+
13
+ # Abstract
14
+
15
+ Dialogue Aspect-based Sentiment Quadruple analysis (DiaASQ) extends ABSA to more complex real-world scenarios (i.e., dialogues), which makes existing generation methods encounter heightened noise and order bias challenges, leading to decreased robustness and accuracy. To address these, we propose the Segmentation-Aided multi-grained Denoising and Debiasing (SADD) method. For noise, we propose the Multi-Granularity Denoising Generation model (MGDG), achieving word-level denoising via sequence labeling and utterance-level denoising via topic-aware dialogue segmentation. Denoised Attention in MGDG integrates multi-grained denoising information to help generate denoised output. For order bias, we first theoretically analyze its direct cause as the gap between ideal and actual training objectives and propose a distribution-based solution. Since this solution introduces a one-to-many learning challenge, our proposed Segmentation-aided Order Bias Mitigation (SOBM) method utilizes dialogue segmentation to supplement order diversity, concurrently mitigating this challenge and order bias. Experiments demonstrate SADD's effectiveness, achieving state-of-the-art results with a $6.52\%$ F1 improvement.
16
+
17
+ # 1 Introduction
18
+
19
+ Dialogue Aspect-based Sentiment Quadruple Extraction task (DiaASQ) (Li et al., 2023a) is a subtask of Aspect-based Sentiment Analysis (ABSA), aiming to extract sentiment quadruples in dialogues, i.e., Target: mentioned objects, Aspect: components of targets, Opinion: expressions conveying comments, and Sentiment: polarity of targets. Recently, Li et al. (2023a) proposed a discriminative model to control the information fusion among utterances, ultimately classifying different elements separately. However, this method fails to utilize the connections between tuple elements
20
+
21
+ ![](images/5d28bae321421d6f34283d2a988baf571221463f3fce3d0a9ba97d798faebf8a.jpg)
22
+ Figure 1: Noise refers to irrelevant words in dialogue (highlighted in orange), which lead the model to generate incorrect quadruples. Order Bias occurs when the model erroneously learns non-existent tuple order dependencies (highlighted in yellow boxes). Through denoising and debiasing, our SADD method enhances the performance of quadruple extraction.
23
+
24
+ fully. Generative methods (Zhang et al., 2021a,b; Mao et al., 2022; Gou et al., 2023) succeeded in framing ABSA as a text-to-text task with robust generalization capabilities and fully leverage element connections, which inspired us.
25
+
26
+ However, generative methods still face two significant challenges: Noise and Order Bias, as illustrated in Fig 1. 1. Noise is extraneous words in dialogues that interfere with the quadruple generation process, as illustrated by the orange words in Fig. 1. These extraneous words often disrupt the predicted quadruples; for instance, the terms 'brightness' and 'low' interfere with previous methods, leading to an incorrect quadruple. 2. Order Bias is an irrational causal relationship caused by the fixed order of quadruple labels, like the yellow relationships in Fig. 1. As shown in Fig. 1, we formulate Diaasq task as a text-to-text problem: Input text $\rightarrow$ "Q1, Q2" (just like Fig. 1), where the label is a sequence of tuples. However, the order between the tuples does not inherently exist, and the generation of Q2 should not be conditioned on
27
+
28
+ Q1. This labeling scheme compels previous models to establish an order dependency from Q2 to Q1 ('xr->iPhone') and a causal relationship between the input and the order of tuples. However, such order dependency and causal relationships do not actually exist. These incorrect constraints hinder the model's generalization. A further explanation of noise and bias is shown in Appendix A.1. To address these, we propose a novel Segmentation-Aided multi-granularity Denoising and Debiasing (SADD) method, including the following modules.
29
+
30
+ Denoising: Specifically, we first propose a novel Multi-Granularity Denoising Generation (MGDG) module to reduce noise at the word and utterance levels. As shown in Fig. 1, our MEDG module identifies and eliminates the noise "Especially in ... before.", thereby achieving denoising. At the word level, we employ sequence labeling to label tuple elements. At the utterance level, we adopt topic-aware dialogue segmentation to achieve topic-centric utterance clustering, followed by generating topic masks based on clusters. Finally, we merge probability from the sequence labeling task and topic masks from the segmentation task into the decoder's denoised attention to generate denoised output. By emphasizing in-tuple and topic-related elements, denoised attention effectively makes the model more accurate and robust in tuple extraction tasks.
31
+
32
+ Our Topic-Aware Dialog Segmentation (TADS) differs from previous segmentation methods by explicitly introducing fine-grained topics information. Unlike existing methods (Wu et al., 2020a; Xie et al., 2021) that directly analyze complex contexts between utterances, we establish fine-grained relations between topic words and utterance sentences by cross-attention interaction, ultimately indirectly analyzing relationships between sentences. These improve models' robustness and accuracy in the segmentation of complex dialogue.
33
+
34
+ Debiasing: For the second challenge, we begin with theoretically analyzing the direct cause of order bias: the gap between the ideal and actual training objectives. By further analyzing the gap and the Maximum Likelihood Estimation (MLE) from a distribution perspective, we find a solution to augment order diversity at the data level, yet this poses a one-to-many learning problem. To solve these challenges, we propose a Segmentation-aided Order Bias Mitigation (SOBM) method to tackle order bias as shown in the lower part of Fig. 1. We leverage dialogue segmentation to generate multi
35
+
36
+ ple inputs that meet a specific criterion. We then pair these inputs with various feasible labels to create new samples, thereby increasing the diversity of tuple orders. The SOBM narrows the gap between ideal and actual training objectives, thereby mitigating order bias in the generation method.
37
+
38
+ In summary, our contributions are as follows:
39
+
40
+ 1. We introduce a novel multi-granularity denoising generation model to mitigate interference noise through word-level sequence labeling and utterance-level topic masks.
41
+ 2. We propose a topic-aware dialogue segmentation model to streamline context analysis and establish fine-grained relationships between utterances by introducing topic words as a bridge.
42
+ 3. We uncover the direct cause of order bias and mitigate its impact by enhancing the data distribution through dialogue segmentation.
43
+ 4. Our SADD method is validated on the widely used dataset and achieves state-of-the-art performance with a $6.52\%$ F1 improvement.
44
+
45
+ # 2 Related Works
46
+
47
+ Aspect-Based Sentiment Analysis (Thet et al., 2010) primarily focuses on short texts (i.e., 1 or 2 sentences text) like reviews and emphasizes sentiment interpretability. ABSA methods analyze elements such as target (Li et al., 2019a,b), target categories (Zhang et al., 2021a), specific aspects, direct opinions (Peng et al., 2020) and so on. Quadruple extraction, involving four key elements, is a more comprehensive sentiment analysis task. Mainstream ABSA methods include sequence labeling (Wu et al., 2020b; Chen et al., 2022; Liang et al., 2023) and generative methods (Gao et al., 2022; Yu et al., 2023; Gou et al., 2023), with the latter known for robustness and generalization. However, existing ABSA models face challenges in dealing with complex textual content and structures when applied to dialogue texts, highlighting the need for advancements in this domain.
48
+
49
+ Dialogue Segmentation aims to segment a dialogue into pieces based on topics discussed, enhancing comprehension for downstream tasks (Zhong et al., 2022). Existing unsupervised Deep Learning(DL) methods use a pre-trained model without fine-tuning for segmentation (Xu et al., 2021b; Devlin et al., 2019; Xing and Carenini, 2021). DL-based methods directly analyze the context of two utterances and predict their relationships with fine-tuned CLS tokens, like TOD-BERT (Wu et al.,
50
+
51
+ 2020a) and RetroTS-T5 (Xie et al., 2021). However, analyzing two utterances directly can be challenging, especially with complex contexts involving multiple topics or lacking explicit topics.
52
+
53
+ Previous Methods for Addressing Tuple Order Bias mainly focused on addressing the order bias by modifying the model. They used non-autoregressive transformers (Sui et al., 2021; Tan et al., 2021) or set up multiple output heads (Ye et al., 2021) to generate results in an unordered manner. However, these methods have limited the generality of the model. "Set" (Li et al., 2023b) adjusts the loss function to force the model to minimize overall loss for all feasible labels globally. However, this approach actually forces models to learn a one-to-many mapping, hindering them from converging to optimal performance.
54
+
55
+ # 3 Task Definition
56
+
57
+ The input of the DiaASQ task is a $n$ -utterance and $N$ -word dialogue $D = \{u_1, \dots, u_n\}$ , where $u_i$ represents the $i$ -th utterance. DiaASQ aims to extract all quadruples (target, aspect, opinion, sentiment) from the dialogue, where the target, aspect, and opinion are sub-strings of $D$ , and sentiment $\in \{pos, neg, other\}$ . In the example "I didn't buy it since my friend said the Xiaomi 11 has poor battery life," the corresponding quadruple is (Xiaomi 11, battery life, poor, neg).
58
+
59
+ # 4 Method
60
+
61
+ In the DiaASQ task, generation models face two significant challenges: noise and order bias. To mitigate noise, we propose a novel Multi-Granularity Denoising Generation approach involving sequence labeling, topic-aware dialogue segmentation, and denoising generation, as shown in Fig. 2. By employing sequence labeling and topic-aware dialogue segmentation, we acquire denoising information at both the utterance and word levels. Then, we integrate this multi-grained denoising information to guide the model in generating quadruples more accurately and robustly. For order bias, we uncover its cause as the gap between the actual and the ideal training objective. We propose a novel Segmentation-aided Order Bias Mitigation (SOBM) method to narrow the gap with dialog segmentation. This method simultaneously addresses both the one-to-many training challenge and the order bias.
62
+
63
+ # 4.1 Multi-Granularity Denoising Generation
64
+
65
+ Due to the extensive content and intricate structure of dialogues, the model is susceptible to noise. To address noise, we propose a novel Multi-Granularity Denoising Generation method to reduce the noise at the word and utterance levels. Specifically, we leverage sequence labeling to mitigate noise at the word levels, and employ topic-aware dialogue segmentation to cluster sentences with the same topics, thereby eliminating noise from irrelevant sentences. We generate denoised outputs with the decoder's denoised attention which combines multi-grained information.
66
+
67
+ # 4.1.1 Labeling for Word-level Denoising
68
+
69
+ Word-level denoising identifies and emphasizes quadruple elements to reduce noise. For a dialogue $D$ , we concatenate all utterances and encode them using the generation model's encoder: $e = \mathrm{Encoder}([u_1; \ldots; u_n])$ . Then, we employ a classification layer to label the quadruple elements in $e$ with a loss $\mathcal{L}_{\text{labeling}}$ . Each word $e_i$ in $e$ is classified into one of four categories (None, Target, Aspect, Opinion) using $p_i = \mathrm{Softmax}(W_1 * e_i + b_1)$ where $p_i \in \mathbb{R}^4$ . This process classifies all words in $e$ to generate $P \in \mathbb{R}^{N \times 4}$ .
70
+
71
+ # 4.1.2 Topic-aware Dialogue Segmentation for Utterance-level Denoising
72
+
73
+ Existing dialog segmentation methods directly analyze the complex context between utterances to determine their relationship, i.e., whether they belong to the same topic. However, these methods can struggle with complex utterance contexts, especially those involving multiple topics or lacking explicit topic mentions. To simplify the context analysis, we indirectly establish fine-grained relationships between utterances by examining their relationships with the same topic. This employs topics as bridges, streamlining the contextual analysis and enhancing the model's robustness in complex contexts. Moreover, we utilize cross-attention for fine-grained information fusion between topics and utterances, which helps resolve semantic-level coreferences for topics (Experiment 5.3.3).
74
+
75
+ Fine-grained Interaction We designate those words labeled as "Target" (in section 4.1.1) as the primary "topics" of the utterances because the target words are the cores of the quadruples and are highly relevant to the utterance topics. The topic embedding $t_i$ for $i$ -th topic (i.e., target) is selected from $e$ according to its posi-
76
+
77
+ ![](images/ddf6dd88c5d62ea6ee4fcc639ab0f3b459d2a71d20e8c7ab168d0a63dc27e4c4.jpg)
78
+ Figure 2: (a) Overview of the MGDG model. (b) Topic-aware Dialogue Segmentation module utilizes cross-attention to explore fine-grained correlations between utterances and topics, facilitating topic-centric clustering of utterances. Subsequently, we create a topic mask for each cluster. (c) The Denoising-Constrained Generation module integrates the denoising information into cross-attention to guide generation, resulting in denoised outputs.
79
+
80
+ ![](images/9425297655f258183b89f86203dcb499ce2351a5e5b4238ce5f900d00c617f87.jpg)
81
+
82
+ tion. All topic embeddings are concatenated into $\mathbf{T}_{tp} = [t_1; \ldots; t_k] \in \mathbb{R}^{k \times dim}$ . The utterance embedding $e_{u_i}$ for $i$ -th utterance $u_i$ is directly extracted from $e$ without pooling. $e_{u_i} \in \mathbb{R}^{|u_i| \times dim}$ , where $|u_i|$ means the number of words in $u_i$ . Feed them to cross-attention layers ( $\mathbf{T}_{tp}$ as Query, $u_i$ as Key and Value): $O = \text{softmax}\left(\frac{\mathbf{T}_{tp}(e_{u_i})'}{\sqrt{dim}}\right)e_{u_i}$ , where $O \in \mathbb{R}^{k \times dim}$ . Pass $O$ to a classification layer to predict whether $u_i$ has fine-grained associations (e.g. discussing relations) with $\{t_1, \ldots, t_k\}$ concurrently, with loss $\mathcal{L}_{topic}$ . During training, the positions of the "Target" words are determined by the ground truth; during testing, they are determined by the predictions of the preceding module.
83
+
84
+ Topic Mask Applying these steps to all utterances $\{u_1,\ldots ,u_n\}$ , we predict the relationships between all utterances and $\{t_1,\dots ,t_k\}$ . If both $u_{i}$ and $u_{j}$ discuss $t_v$ , these two utterances can be grouped into the same $v$ -th cluster. In this way, we establish fine-grained relations between utterances and aggregate utterances with the same topic into topic-centric clusters. Based on these clusters, we generate topic masks. Each topic mask $m^{(i)}\in \mathbb{R}^N$ masks out all utterances not in the $i$ -th cluster.
85
+
86
+ # 4.1.3 Denoising-Constrained Generation
87
+
88
+ Denoised Attention Learning irrelevant context can lead attention mechanisms to focus on harmful information. To mitigate this, we restrict the attention scope and adjust its weight to maintain global interaction features while minimizing interaction with harmful data. When generating quadruples
89
+
90
+ related to $k$ -th topic, we incorporate its corresponding topic mask $m^{(k)} \in \mathbb{R}^N$ and the probabilities $P \in \mathbb{R}^{N \times 4}$ from section 4.1.1 into decoder's crossattention:
91
+
92
+ $$
93
+ \hat {P} _ {j} = 1 - P _ {j, 0}; r _ {j} = \left(1 + \hat {P} _ {j}\right) \cdot m _ {j} ^ {(k)} \tag {1}
94
+ $$
95
+
96
+ $$
97
+ w _ {i} ^ {\prime} = \frac {r _ {j} \cdot \exp (w _ {i , j})}{\sum_ {j} r _ {j} \cdot \exp (w _ {i , j})} \tag {2}
98
+ $$
99
+
100
+ where $P_{j,0}$ denotes probabilities of the input dialogue's $j$ -th word belonging to the "None" category, $\hat{P}_j\in \mathbb{R}^N$ denotes probabilities of $j$ -th input word being quadruple elements, $m_j^{(k)}\in \{0,1\}$ indicates whether the $j$ -th word is masked $r\in \mathbb{R}^N$ is multi-granularity denoising information, $w\in \mathbb{R}^{N\times N}$ is the original cross-attention weights, $w_{i,j}$ signifies the weight of the $i$ -th generated token relative to the $j$ -th input token, and $w^{\prime}_{i}$ is the weights after adjusted to incorporate the multi-granularity denoising information. During training, the topic masks are replaced by ground truth masks; during testing, we employ the predicted topic masks.
101
+
102
+ Multi-granularity denoising To ensure the compatibility of our method with pre-trained models, we can directly replace the cross-attention in pretrained generation models' decoders with the Denoised Attention. Train this generation task with a loss $\mathcal{L}_{\text {generation }}$ . The topic mask $m_{i}$ enables utterance-level denoising by constraining cross-attention scope to utterances within $i$ -th topic cluster. This diminishes noisy utterances that do not mention the potential 'targets'. The probabilities
103
+
104
+ $P$ facilitate word-level denoising by guiding the model to prioritize words identified as quadruple elements by the sequence labeling module. This effectively reduces noise from non-quadruple words. This multi-granularity denoising approach controls attention scope and adjusts attention weight to reduce noise, thereby enhancing extraction accuracy and robustness.
105
+
106
+ Overall loss $\mathcal{L} = \mathcal{L}_{\text{labeling}} + \mathcal{L}_{\text{topic}} + \mathcal{L}_{\text{generation}}$
107
+
108
+ # 4.2 Order Bias Mitigation
109
+
110
+ Although previous works have shown the effectiveness of generative extraction methods, they often overlooked the accompanying issue of order bias, as shown in Figure 1. Existing solutions for order bias exhibit poor generalizability and scalability. To address order bias and ensure strong generalizability, we begin with a theoretical analysis revealing that the gap between practical and ideal training objectives leads to order bias. By further analyzing the gap and MLE from a distribution perspective, we find a data-driven solution to narrow the gap. However, this solution faces a one-to-many training challenge. To address this, we leverage dialog segmentation to enrich the order diversity within the data distribution, thereby mitigating the one-to-many training issue and order bias.
111
+
112
+ # 4.2.1 Ideal-Actual Training Gap
113
+
114
+ Ideal Training Objective According to Appendix B.2.1, the MLE loss for generative methods is :
115
+
116
+ $$
117
+ \min _ {\theta} - \mathrm {E} _ {x \sim p (x)} \left[ \mathrm {E} _ {y \sim p (y | x)} [ \log p _ {\theta} (y | x) ] \right] \tag {3}
118
+ $$
119
+
120
+ where $p$ represents the data distribution, and $p(x)$ denotes the probability of $x$ occurring in the natural language context. When training a generative model for DiaASQ, for each input $x$ , the associated ideal goal $\mathbb{S}$ is an unordered set of quadruples. By concatenating the quadruples in $\mathbb{S}$ in all possible permutation orders $\Pi$ , we get a set of all feasible labels $(\Pi(\mathbb{S}) = \{\pi_1(\mathbb{S}), \pi_2(\mathbb{S}), \ldots\})$ . According to Appendix B.2.1, for each sample with input as $x$ , the ideal training loss (MLE) needs learning all feasible labels:
121
+
122
+ $$
123
+ \min _ {\theta} \left[ - p (x) \sum_ {y \in \Pi (\mathbb {S})} p (y | x) \log \left(p _ {\theta} (y | x)\right) \right] \tag {4}
124
+ $$
125
+
126
+ Actual Training Objective Neural network systems often struggle with learning one-to-many mappings (Vargas et al., 2017; Berner et al., 2021; Mukhamediev et al., 2022; Taye, 2023) because
127
+
128
+ multiple labels imply multiple descending gradients, making it difficult for the model to adjust parameters and converge to optimal performance. Consequently, when constructing a training dataset, only one label $\pi_k(\mathbb{S})\in \Pi (\mathbb{S})$ corresponds to each input $x$ . Thus, the actual training objective is:
129
+
130
+ $$
131
+ \min _ {\theta} \left[ - p (x) p \left(\pi_ {k} (\mathbb {S}) | x\right) \log \left(p _ {\theta} \left(\pi_ {k} (\mathbb {S}) | x\right)\right) \right] \tag {5}
132
+ $$
133
+
134
+ Following the calculations in Appendix B.3, the Ideal-Actual Training Gap $\Delta$ between the ideal training loss(MLEideal) and the actual training loss(MLEactual) is:
135
+
136
+ $$
137
+ \begin{array}{l} \Delta = \mathrm {M L E} _ {\text {i d e a l}} - \mathrm {M L E} _ {\text {a c t u a l}} (6) \\ = \frac {- p (x)}{| \mathbb {S} |} \left[ \sum_ {y \in (\Pi (\mathbb {S}) - \{\pi_ {k} (\mathbb {S}) \})} \log p _ {\theta} (y | x) \right] \neq 0 (7) \\ \end{array}
138
+ $$
139
+
140
+ where $|\mathbb{S}|$ is the number of elements in $\mathbb{S}$ . The difference in Eq. (7) cannot be approximated to 0, indicating a gap between the actual and ideal training objectives. Clearly, the ideal training objective needs learning all feasible labels $\Pi (\mathbb{S})$ to capture the unordered nature of quadruples. However, in practice, the model is trained on only one feasible label $\pi (\mathbb{S})$ , neglecting training with other feasible labels. This may lead the model to learn non-existent order biases and spurious causal relationships between input and order.
141
+
142
+ # 4.2.2 Segmentation-aided Order Bias Mitigation
143
+
144
+ Idea and Challenge Inspired by the MLE insights from the distribution perspective in Appendix B.2.1, a straightforward idea to narrow the gap is to augment the dataset with feasible label samples, allowing the model to learn more feasible labels to approximate the ideal training objective:
145
+
146
+ $$
147
+ \min _ {\theta} - \left[ p _ {\mathrm {a u g}} (x) \sum_ {y \in \Pi (\mathbb {S})} p _ {\mathrm {a u g}} (y | x) \log \left(\frac {p _ {\mathrm {a u g}} (y | x)}{p _ {\theta} (y | x)}\right) \right] \tag {8}
148
+ $$
149
+
150
+ where $p_{\mathrm{aug}}$ represents the data distribution after augmenting with feasible labels. However, as mentioned earlier, it's challenging for a model to learn multiple outputs $y$ for a single input $x$ .
151
+
152
+ Order Diversity Augmentation: To address this issue, we propose constructing an input set $Ag(x)$ for $x$ ( $x \in Ag(x)$ ). Each $\hat{x} \in Ag(x)$ shares the same quadruples and similar semantics with $x$ . Then we pair $\hat{x} \in Ag(x)$ with feasible labels $y \in \Pi(\mathbb{S})$ in a one-to-one manner to create new
153
+
154
+ samples $(\hat{x},y)$ . For the original sample with input $x$ , the objective in this augmented distribution is:
155
+
156
+ $$
157
+ \min _ {\theta} - \left[ \sum_ {(\hat {x}, y) \in (A g (x), \Pi (\mathbb {S}))} p _ {\mathrm {a u g}} (\hat {x}) p _ {\mathrm {a u g}} (y | \hat {x}) \log \left(\frac {p _ {\mathrm {a u g}} (y | \hat {x})}{p _ {\theta} (y | \hat {x})}\right) \right] \tag {9}
158
+ $$
159
+
160
+ Clearly, in this augmented dataset, the training objective can approximate the ideal objective, as demonstrated in Appendix B.3.1.
161
+
162
+ AI rewriting tools (such as ChatGPT) and traditional data augmentation methods struggle to generate dialogue inputs with the same quadruples and similar semantics without human intervention, as shown in Appendix B.1.1 and Experiment C.6. We propose a cost-effective solution based on dialogue segmentation to address this problem, which divides the dialogue into segments based on their semantic topics, ensuring they are semantically isolated. These segments are then rearranged and concatenated in all possible orders to form an augmented dialogue input set like $Ag(x)$ . Each input in this set shares similar semantics because rearranging semantically independent segments does not affect the overall semantics. Each input in this set contains the same quadruples, as all the words remain unchanged. We then pair these inputs with multiple feasible labels to create new samples, thereby increasing order diversity and enhancing the data distribution. In this augmented dataset, as mentioned earlier, the actual training objective closely approximates the ideal training objective, thus alleviating order bias. For simplicity, our dialog segmentation scheme is based on the inherent reply thread structure (shown in section 5.1) within the dataset. It works because utterances connected by reply relationships often share similar semantic topics, making them inseparable, while others are separable.
163
+
164
+ ![](images/42ca60c5278dea2ea3a3152d628789f0640aeed1cd921e1b210e37bf3f15d62f.jpg)
165
+ Figure 3: Example of Reply thread in a dialog.
166
+
167
+ # 5 Experiments
168
+
169
+ # 5.1 Experimental Settings
170
+
171
+ Dataset The Diaasq dataset (Li et al., 2023a) comprises both English(EN) and Chinese(ZH) datasets and provides dialogue texts with reply threads. A reply thread is a collection of utterances linked by
172
+
173
+ reply relationships, as shown in Fig. 3. More detail is in Appendix C.1.
174
+
175
+ Metrics We use micro F1 for the pair extraction task and both Micro F1 and Identification F1 (Barnes et al., 2021) for the quadruple extraction task, following the dataset creators' recommendations. Micro F1 considers tuples with all words correct as TP and any incorrect word as FP. Identification F1 is similar but ignores sentiment elements.
176
+
177
+ Baselines We compared with generative models like ParaPhrase (Zhang et al., 2021a) and discriminative models like CRF-ExtractClassify (CEC)(Cai et al., 2021), SpERT(Eberts and Ulges, 2020), Span-ASTE(Xu et al., 2021a), and MvI(Li et al., 2023a). ParaPhrase(Zhang et al., 2021a) introduces a novel paraphrase modeling paradigm to frame the ASQP task as a paraphrase generation process. MvI (Li et al., 2023a) uses multi-view information to control information fusion and then extracts quadruples by decoding Tagging Grid.
178
+
179
+ Settings We use BART (Lewis et al., 2020) (440M) for both EN and ZH datasets. We train the model for 10 epochs (2 hours) on 4 3090 GPUs with a batch size of 5 and a learning rate of 5e-5. The ratio of the three losses is 1:1:1. The number of cross-attention layers is 3(Appendix C.8). More detail is in Appendix C.3. All reported results are averaged over multiple runs.
180
+
181
+ # 5.2 Main Result
182
+
183
+ The results are presented in Table 1. In the quadruple extraction task, our SADD method achieves a maximum improvement of $5.56\%$ micro F1 and $6.52\%$ Iden F1 in the EN dataset compared to the previous best model(MvI), demonstrating the effectiveness of our method. Because discriminative models are not influenced by bias, our method's major advantage over them lies in denoising. With the multi-granularity denoising generation module, we achieve up to a $6.52\%$ Iden F1 improvement compared to the best discriminative method(MvI) on the EN dataset. Compared to generative models, our method's greatest strength lies in order bias mitigation. With the segmentation-aided order bias mitigation module, we achieve up to a $16.56\%$ Iden F1 improvement compared to the ParaPhrase in the EN dataset. Further insights into the impact of order bias on the results can be found in the Appendix C.5. In the Pair Extraction task, our model achieved an average $3.19\%$ micro F1 improvement in all datasets over the previous best approaches. This underscores the effectiveness of our method in
184
+
185
+ Table 1: Main Results. 'D' denotes discriminative methods, while 'G' indicates generation methods. T-A means the target-aspect pair extraction task, T-O refers to target-opinion, and A-O refers to aspect-opinion.
186
+
187
+ <table><tr><td rowspan="3">Type</td><td rowspan="3">Method</td><td colspan="5">EN</td><td colspan="5">ZH</td></tr><tr><td colspan="3">Pair Extraction(F1)</td><td colspan="2">Quadruple(F1)</td><td colspan="3">Pair Extraction(F1)</td><td colspan="2">Quadruple(F1)</td></tr><tr><td>T-A</td><td>T-O</td><td>A-O</td><td>Micro</td><td>Iden</td><td>T-A</td><td>T-O</td><td>A-O</td><td>Micro</td><td>Iden</td></tr><tr><td rowspan="4">D.</td><td>CEC</td><td>34.31</td><td>20.94</td><td>19.21</td><td>11.59</td><td>12.80</td><td>32.47</td><td>26.78</td><td>18.90</td><td>8.81</td><td>9.25</td></tr><tr><td>SpERT</td><td>28.33</td><td>21.39</td><td>23.64</td><td>13.07</td><td>13.38</td><td>38.05</td><td>31.28</td><td>21.89</td><td>13.00</td><td>14.19</td></tr><tr><td>Span-ASTE</td><td>42.19</td><td>30.44</td><td>45.90</td><td>26.99</td><td>28.34</td><td>44.13</td><td>34.46</td><td>32.21</td><td>27.42</td><td>30.85</td></tr><tr><td>MvI</td><td>47.91</td><td>45.58</td><td>44.27</td><td>33.31</td><td>36.80</td><td>48.61</td><td>43.31</td><td>45.44</td><td>34.94</td><td>37.51</td></tr><tr><td rowspan="2">G.</td><td>ParaPhrase</td><td>37.22</td><td>32.19</td><td>30.78</td><td>24.54</td><td>26.76</td><td>37.81</td><td>34.32</td><td>27.76</td><td>23.27</td><td>27.98</td></tr><tr><td>SADD (Ours)</td><td>50.82</td><td>49.64</td><td>49.70</td><td>38.87</td><td>43.32</td><td>51.13</td><td>46.72</td><td>47.87</td><td>37.80</td><td>41.05</td></tr></table>
188
+
189
+ enhancing extraction performance across various tasks, indicating its generalizability. By employing topic-aware dialogue segmentation to form target-centric clusters, our model effectively diminishes noise from quadruples with different targets during aspect and opinion extraction tasks associated with a specific target (TA, TO task). Furthermore, in aspect-opinion pair extraction (AO task), our model primarily benefits from the sequence labeling probability, which diminishes non-quadruple noise.
190
+
191
+ # 5.3 Analysis
192
+
193
+ # 5.3.1 Ablation Study
194
+
195
+ Table 2: Ablation studies of MGDG and SOBE components on DiaASQ Dataset.
196
+
197
+ <table><tr><td rowspan="2">Method</td><td colspan="2">Components</td><td colspan="2">EN</td><td colspan="2">ZH</td></tr><tr><td>MGDG</td><td>SOBM</td><td>Micro</td><td>Iden</td><td>Micro</td><td>Iden</td></tr><tr><td>Baseline</td><td></td><td></td><td>29.31</td><td>32.30</td><td>30.45</td><td>33.64</td></tr><tr><td>+MGDG</td><td>✓</td><td></td><td>36.35</td><td>40.64</td><td>35.76</td><td>39.21</td></tr><tr><td>+SOBM</td><td></td><td>✓</td><td>34.96</td><td>37.86</td><td>35.70</td><td>38.39</td></tr><tr><td>SADD (Ours)</td><td>✓</td><td>✓</td><td>38.36</td><td>42.94</td><td>37.80</td><td>41.05</td></tr></table>
198
+
199
+ We conducted an ablation study to validate the effectiveness of our Multi-Granularity Denoising Generation (MGDG) and Segmentation-aided Order Bias Mitigation (SOBM) components, detailed in Table 2. Compared to the baseline, integrating the MGDG module brings a maximum $8.34\%$ Iden F1 improvement in the EN dataset. It indicates that the MGDG module significantly enhances tuple extraction accuracy and robustness by reducing noise. We also compared our MGDG module with existing segmentation methods in Section 5.3.3. Furthermore, the integrated SOBM module brings a maximum $5.65\%$ micro F1 improvement in the EN dataset compared to the baseline. It demonstrates the effectiveness of SOBM in mitigating order bias. We also compared our SOBM module with existing debias methods in Section 5.3.4 and investigated
200
+
201
+ Table 3: The proportion of errors attributed to noise
202
+
203
+ <table><tr><td></td><td>Mvi</td><td>SADD(our)</td><td>Δ</td></tr><tr><td>Proportion</td><td>79.88</td><td>48.67</td><td>-31.21</td></tr></table>
204
+
205
+ the effects of different data augmentation strategies in the SOBM in Appendix C.6.
206
+
207
+ # 5.3.2 Statistics and Case Studies
208
+
209
+ We conducted a comparative analysis between our proposed method and the SOTA method (MvI) regarding the proportion of errors attributed to noise, as shown in Table 3. The significant proportion of errors, amounting to $79.88\%$ , underscores the inadequacy of previous methods in handling noise effectively, thereby highlighting the necessity for denoising techniques. Furthermore, our denoising approach resulted in a notable reduction of $31.21\%$ in the proportion of errors attributed to noise, affirming our method's effectiveness. Figure 4 presents several case studies where the previous SOTA method (MvI) failed to provide good predictions, whereas our model demonstrated superior performance. The two examples primarily illustrate how noise leads to an increase in irrelevant quadruples and a decline in quadruple quality. In the first example, due to the interference of noisy words like "Meizu 18", "machine," "backup," and "main," MvI produced several erroneous and irrelevant quadruples. In the second example, the MvI model's prediction of the quadruple "(mate series, appearance, much better, pos)" is compromised by the noise word "p series," leading to the erroneous generation of "(p series, appearance, much better, pos)" instead. Noise detrimentally affects the quality of predicted quadruples. In contrast, our model remains unaffected by such disturbances.
210
+
211
+ # 5.3.3 Further Ablation Study on TADS
212
+
213
+ To assess the effectiveness of the Topic-aware Dialogue Segmentation (TADS) method, we com
214
+
215
+ ![](images/780fc5144abe56e3df6d7dad1becc76877fdc8b2decbe37b729171b70de98675.jpg)
216
+ Figure 4: Case Study. The orange words represent the noise that causes errors in the MvI model.
217
+
218
+ pare it with existing methods detailed in Appendix C.7, as shown in Table 4. Compared to TODBERT(Wu et al., 2020a), our methods achieved a maximum of $6.23\%$ Iden F1 improvement in the ZH dataset. This underscores the effectiveness of incorporating topic information to simplify contextual analysis, enhancing segmentation accuracy and robustness by avoiding the direct analysis of complex utterances. Compared to TSP, our methods achieved a maximum of $3.74\%$ Iden F1 improvement in the ZH dataset. This demonstrates that utilizing cross-attention to mine fine-grained associations can enhance the model's robustness in complex situations, such as utterances with multiple topics and implicit topics. Compared to SMGD, our methods achieved a maximum $12.1\%$ Iden F1 improvement in the EN dataset. This highlights that the pre-labeling topic words are necessary for the topic-aware dialogue segmentation module. The SMGD method, which segments dialogues without pre-labeling topics, struggles to analyze complex context interactions between utterances. In contrast, our method benefits from pre-labeling topics, which simplifies contextual analysis by focusing only on interactions between topics and utterances. Compared to RT, our methods achieved a maximum $3.96\%$ Iden F1 improvement in the EN dataset. This indicates that our method can handle utterances related to multiple topics, thereby performing more accurate dialogue segmentation and denoising without removing any topic-related information. Compared to TWM, our methods achieved a maximum $6.74\%$ Iden F1 improvement in the EN dataset. This demonstrates that utilizing cross-attention to mine fine-grained associations can help resolve topic-level coreferences.
219
+
220
+ Table 4: Result of various dialogue segmentation methods combined with SOBM and MGDG. NN means the method is totally a Neural Network method.
221
+
222
+ <table><tr><td rowspan="2">Method</td><td rowspan="2">NN</td><td colspan="2">Components</td><td colspan="2">EN</td><td colspan="2">ZH</td></tr><tr><td>Topic</td><td>Fine-grain</td><td>Micro</td><td>Iden</td><td>Micro</td><td>Iden</td></tr><tr><td>TOD-BERT</td><td>✓</td><td></td><td></td><td>34.76</td><td>38.42</td><td>32.12</td><td>34.82</td></tr><tr><td>TSP</td><td>✓</td><td>✓</td><td></td><td>36.30</td><td>40.18</td><td>34.30</td><td>37.31</td></tr><tr><td>SMGD</td><td>✓</td><td></td><td>✓</td><td>27.67</td><td>31.22</td><td>28.39</td><td>30.87</td></tr><tr><td>RT</td><td></td><td></td><td></td><td>35.78</td><td>39.36</td><td>35.36</td><td>38.51</td></tr><tr><td>TWM</td><td></td><td>✓</td><td></td><td>32.85</td><td>36.58</td><td>31.78</td><td>36.00</td></tr><tr><td>TADS (Ours)</td><td>✓</td><td>✓</td><td>✓</td><td>38.87</td><td>43.32</td><td>37.80</td><td>41.05</td></tr></table>
223
+
224
+ Table 5: Results of Methods Addressing Order Bias.
225
+
226
+ <table><tr><td rowspan="2">Method</td><td colspan="2">EN</td><td colspan="2">ZH</td></tr><tr><td>Micro</td><td>Iden</td><td>Micro</td><td>Iden</td></tr><tr><td>Set</td><td>31.83</td><td>35.26</td><td>29.81</td><td>33.52</td></tr><tr><td>SOBM(Ours)</td><td>34.96</td><td>37.86</td><td>35.70</td><td>38.39</td></tr></table>
227
+
228
+ # 5.3.4 Further Ablation Study on SOBM
229
+
230
+ To evaluate the effectiveness of our debiasing solution, we compare it with an existing method called Set (Li et al., 2023b) introduced in Section 2, as shown in Table 5. Our method outperforms Set by a maximum of $5.89\%$ micro F1 in the ZH dataset, highlighting its effectiveness in mitigating order bias. In contrast to Set's struggle with one-to-many learning at the loss level, our approach augments inputs to avoid learning one-to-many mappings and mitigate order bias at the data level, thereby improving performance and generalizability.
231
+
232
+ # 6 Conclusion
233
+
234
+ This paper introduces a novel Segmentation-Aided multi-grained Denoising and Debiasing (SADD) model for denoising and debiasing in the DiaASQ task. For noise, we propose a Multi-Granularity Denoising Generation(MGDG) model to denoise at both word and utterance levels with denoised attention. For order bias, we analyze its direct causes and propose a distribution-based solution.
235
+
236
+ We then introduce the Segmentation-aided Order Bias Mitigation (SOBM) method, which utilizes dialogue segmentation to increase order diversity, thereby simultaneously alleviating the challenges of one-to-many learning and order bias. Extensive experiments show SADD's SOTA performance.
237
+
238
+ # 7 Limitations
239
+
240
+ 1. A limitation we encountered is the increased training time due to the augmented dataset.
241
+ 2. The BART model encounters challenges when processing long-text inputs, particularly in dialogue scenarios, due to the increasing time complexity of attention mechanisms as the input length grows. This results in higher time overhead compared to short-text ABSA. More efficient attention mechanisms tailored for long textual inputs in dialogue contexts need to be developed to mitigate this issue.
242
+ 3. We didn't fully utilize the inherent information in the DiaASQ dataset, such as speaker information or reply relationships, which could improve the model's comprehension of dialogue content.
243
+
244
+ # 8 Ethics Statement
245
+
246
+ In all our experiments, we utilized pre-existing datasets widely used in previous research. While analyzing experimental results, We made diligent efforts to maintain fairness and honesty, ensuring that our work did not cause harm to any individuals.
247
+
248
+ Regarding broader impacts, this work can contribute to further research in sentiment analysis and the utilization of generative methods for simplifying and automating the extraction of user opinions in real-world applications. However, it's noteworthy that this work utilizes fine-tuning large-scale pre-trained language models for generating sentiment triplets. Since the large-scale pre-training corpora originate from the internet, predicted sentiment polarity may be subject to unintended biases associated with gender, race, and intersectional identities (Tan and Celis, 2019). Large pre-trained language models often inherit biases present in their training data, potentially leading to biased sentiment analysis results, particularly when evaluating texts from underrepresented or marginalized groups, thereby perpetuating and amplifying societal prejudices. It is crucial for the natural language processing community to consider these bi
249
+
250
+ ases more extensively. Fortunately, these issues are actively being addressed within the research community, including efforts to standardize datasets and methodologies.
251
+
252
+ We obtained licenses for all artifacts used in our study, and our data was obtained from open-source repositories. Our use of existing artifacts is consistent with their intended use. Our method's specific intended use is to extract quadruples from dialogues and is compatible with the original access conditions. We read and checked each sample to ensure that the data used does not contain information that names or uniquely identifies individual people or offensive content.
253
+
254
+ # 9 Acknowledgment
255
+
256
+ This work was supported by the National Natural Science Foundation of China No.62176271) and Guangdong Basic and Applied Basic Research Foundation (Grant no. 2024A1515011692).
257
+
258
+ # References
259
+
260
+ Jinze Bai, Shuai Bai, Yunfei Chu, Zeyu Cui, Kai Dang, Xiaodong Deng, Yang Fan, Wenbin Ge, Yu Han, Fei Huang, et al. 2023. Qwen technical report. arXiv preprint arXiv:2309.16609.
261
+ Jeremy Barnes, Robin Kurtz, Stephan Oepen, Lilja Øvrelid, and Erik Velldal. 2021. Structured sentiment analysis as dependency graph parsing. 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 3387-3402, Online. Association for Computational Linguistics.
262
+ Julius Berner, Philipp Grohs, Gitta Kutyniok, and Philipp Petersen. 2021. The modern mathematics of deep learning. CoRR, abs/2105.04026.
263
+ Hongjie Cai, Rui Xia, and Jianfei Yu. 2021. Aspect-category-opinion-sentiment quadruple extraction with implicit aspects and opinions. 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 340-350, Online. Association for Computational Linguistics.
264
+ Hao Chen, Zepeng Zhai, Fangxiang Feng, Ruifan Li, and Xiaojie Wang. 2022. Enhanced multi-channel graph convolutional network for aspect sentiment triplet extraction. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2974-2985, Dublin, Ireland. Association for Computational Linguistics.
265
+
266
+ Tim Dettmers, Artidoro Pagnoni, Ari Holtzman, and Luke Zettlemoyer. 2024. Qlora: Efficient finetuning of quantized lms. Advances in Neural Information Processing Systems, 36.
267
+ 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.
268
+ Markus Eberts and Adrian Ulges. 2020. Span-based joint entity and relation extraction with transformer pre-training. In ECAI 2020 - 24th European Conference on Artificial Intelligence, 29 August-8 September 2020, Santiago de Compostela, Spain, August 29 - September 8, 2020 - Including 10th Conference on Prestigious Applications of Artificial Intelligence (PAIS 2020), volume 325 of Frontiers in Artificial Intelligence and Applications, pages 2006-2013. IOS Press.
269
+ Tianhao Gao, Jun Fang, Hanyu Liu, Zhiyuan Liu, Chao Liu, Pengzhang Liu, Yongjun Bao, and Weipeng Yan. 2022. LEGO-ABSA: A prompt-based task assembly unified generative framework for multi-task aspect-based sentiment analysis. In Proceedings of the 29th International Conference on Computational Linguistics, pages 7002-7012, Gyeongju, Republic of Korea. International Committee on Computational Linguistics.
270
+ Zhibin Gou, Qingyan Guo, and Yujiu Yang. 2023. Mvp: Multi-view prompting improves aspect sentiment tuple prediction. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2023, Toronto, Canada, July 9-14, 2023, pages 4380-4397. Association for Computational Linguistics.
271
+ 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. arXiv preprint arXiv:2106.09685.
272
+ Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. 2020. BART: denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, ACL 2020, Online, July 5-10, 2020, pages 7871-7880. Association for Computational Linguistics.
273
+ Bobo Li, Hao Fei, Fei Li, Yuhan Wu, Jinsong Zhang, Shengqiong Wu, Jingye Li, Yijiang Liu, Lizi Liao, Tat-Seng Chua, and Donghong Ji. 2023a. Diasaq: A benchmark of conversational aspect-based sentiment quadruple analysis. In Findings of the Association
274
+
275
+ for Computational Linguistics: ACL 2023, Toronto, Canada, July 9-14, 2023, pages 13449-13467. Association for Computational Linguistics.
276
+ Jiangnan Li, Yice Zhang, Bin Liang, Kam-Fai Wong, and Ruifeng Xu. 2023b. Set learning for generative information extraction. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, EMNLP 2023, Singapore, December 6-10, 2023, pages 13043-13052. Association for Computational Linguistics.
277
+ Xin Li, Lidong Bing, Piji Li, and Wai Lam. 2019a. A unified model for opinion target extraction and target sentiment prediction. In The Thirty-Third AAAI Conference on Artificial Intelligence, AAAI 2019, The Thirty-First Innovative Applications of Artificial Intelligence Conference, IAAI 2019, The Ninth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2019, Honolulu, Hawaii, USA, January 27 - February 1, 2019, pages 6714-6721. AAAI Press.
278
+ Zheng Li, Xin Li, Ying Wei, Lidong Bing, Yu Zhang, and Qiang Yang. 2019b. Transferable end-to-end aspect-based sentiment analysis with selective adversarial learning. 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 2019, Hong Kong, China, November 3-7, 2019, pages 4589-4599. Association for Computational Linguistics.
279
+ Shuo Liang, Wei Wei, Xian-Ling Mao, Yuanyuan Fu, Rui Fang, and Dangyang Chen. 2023. STAGE: span tagging and greedy inference scheme for aspect sentiment triplet extraction. In Thirty-Seventh AAAI Conference on Artificial Intelligence, AAAI 2023, Thirty-Fifth Conference on Innovative Applications of Artificial Intelligence, IAAI 2023, Thirteenth Symposium on Educational Advances in Artificial Intelligence, EAAI 2023, Washington, DC, USA, February 7-14, 2023, pages 13174-13182. AAAI Press.
280
+ Yue Mao, Yi Shen, Jingchao Yang, Xiaoying Zhu, and Longjun Cai. 2022. Seq2path: Generating sentiment tuples as paths of a tree. In *Findings of the Association for Computational Linguistics: ACL* 2022, Dublin, Ireland, May 22-27, 2022, pages 2215-2225. Association for Computational Linguistics.
281
+ Ravil I. Mukhamediev, Yelena Popova, Yan Kuchin, Elena Zaitseva, Almas Kalimoldayev, Adilkhan Symagulov, Vitaly Levashenko, Farida Abdoldina, Viktors Gopejenko, Kirill Yakunin, Elena Muhamedijeva, and Marina Yelis. 2022. Review of artificial intelligence and machine learning technologies: Classification, restrictions, opportunities and challenges. Mathematics, 10(15).
282
+ Haiyun Peng, Lu Xu, Lidong Bing, Fei Huang, Wei Lu, and Luo Si. 2020. Knowing what, how and why: A near complete solution for aspect-based sentiment analysis. In The Thirty-Fourth AAAI Conference on Artificial Intelligence, AAAI 2020, The
283
+
284
+ Thirty-Second Innovative Applications of Artificial Intelligence Conference, IAAI 2020, The Tenth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2020, New York, NY, USA, February 7-12, 2020, pages 8600-8607. AAAI Press.
285
+ Dianbo Sui, Chenhao Wang, Yubo Chen, Kang Liu, Jun Zhao, and Wei Bi. 2021. Set generation networks for end-to-end knowledge base population. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 9650-9660, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
286
+ Yi Chern Tan and L. Elisa Celis. 2019. Assessing social and intersectional biases in contextualized word representations. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 13209-13220.
287
+ Zeqi Tan, Yongliang Shen, Shuai Zhang, Weiming Lu, and Yueting Zhuang. 2021. A sequence-to-set network for nested named entity recognition. In Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence, IJCAI 2021, Virtual Event / Montreal, Canada, 19-27 August 2021, pages 3936-3942. ijcai.org.
288
+ Mohammad Mustafa Taye. 2023. Understanding of machine learning with deep learning: Architectures, workflow, applications and future directions. Comput., 12(5):91.
289
+ Tun Thura Thet, Jin-Cheon Na, and Christopher S. G. Khoo. 2010. Aspect-based sentiment analysis of movie reviews on discussion boards. J. Inf. Sci., 36(6):823-848.
290
+ Rocio Vargas, Amir Mosavi, and Ramon Ruiz. 2017. Deep learning: a review.
291
+ Chien-Sheng Wu, Steven C.H. Hoi, Richard Socher, and Caiming Xiong. 2020a. TOD-BERT: Pre-trained natural language understanding for task-oriented dialogue. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 917-929, Online. Association for Computational Linguistics.
292
+ Zhen Wu, Chengcan Ying, Fei Zhao, Zhifang Fan, Xinyu Dai, and Rui Xia. 2020b. Grid tagging scheme for aspect-oriented fine-grained opinion extraction. In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 2576-2585, Online. Association for Computational Linguistics.
293
+ Huiyuan Xie, Zhenghao Liu, Chenyan Xiong, Zhiyuan Liu, and Ann Copestake. 2021. TIAGE: A benchmark for topic-shift aware dialog modeling. In Findings of the Association for Computational Linguistics: EMNLP 2021, pages 1684-1690, Punta Cana, Dominican Republic. Association for Computational Linguistics.
294
+
295
+ Linzi Xing and Giuseppe Carenini. 2021. Improving unsupervised dialogue topic segmentation with utterance-pair coherence scoring. In Proceedings of the 22nd Annual Meeting of the Special Interest Group on Discourse and Dialogue, pages 167-177, Singapore and Online. Association for Computational Linguistics.
296
+ Lu Xu, Yew Ken Chia, and Lidong Bing. 2021a. Learning span-level interactions for aspect sentiment triplet extraction. 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 4755-4766, Online. Association for Computational Linguistics.
297
+ Yi Xu, Hai Zhao, and Zhuosheng Zhang. 2021b. Topic-aware multi-turn dialogue modeling. In Thirty-Fifth AAAI Conference on Artificial Intelligence, AAAI 2021, Thirty-Third Conference on Innovative Applications of Artificial Intelligence, IAAI 2021, The Eleventh Symposium on Educational Advances in Artificial Intelligence, EAAI 2021, Virtual Event, February 2-9, 2021, pages 14176-14184. AAAI Press.
298
+ Jiacheng Ye, Tao Gui, Yichao Luo, Yige Xu, and Qi Zhang. 2021. One2Set: Generating diverse keyphrases as a set. 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 4598-4608, Online. Association for Computational Linguistics.
299
+ Chengze Yu, Taiqiang Wu, Jiayi Li, Xingyu Bai, and Yujiu Yang. 2023. Syngen: A syntactic plug-and-play module for generative aspect-based sentiment analysis. In IEEE International Conference on Acoustics, Speech and Signal Processing ICASSP 2023, Rhodes Island, Greece, June 4-10, 2023, pages 1-5. IEEE.
300
+ Wenxuan Zhang, Yang Deng, Xin Li, Yifei Yuan, Li-dong Bing, and Wai Lam. 2021a. Aspect sentiment quad prediction as paraphrase generation. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 9209-9219, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
301
+ Wenxuan Zhang, Xin Li, Yang Deng, Lidong Bing, and Wai Lam. 2021b. Towards generative aspect-based sentiment analysis. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing, ACL/IJCNLP 2021, (Volume 2: Short Papers), Virtual Event, August 1-6, 2021, pages 504-510. Association for Computational Linguistics.
302
+ Ming Zhong, Yang Liu, Yichong Xu, Chenguang Zhu, and Michael Zeng. 2022. Dialoglm: Pre-trained model for long dialogue understanding and summarization. In Thirty-Sixth AAAI Conference on Artificial Intelligence, AAAI 2022, Thirty-Fourth Confer
303
+
304
+ ence on Innovative Applications of Artificial Intelligence, IAAI 2022, The Twelveth Symposium on Educational Advances in Artificial Intelligence, EAAI 2022 Virtual Event, February 22 - March 1, 2022, pages 11765-11773. AAAI Press.
305
+
306
+ # A Appedix for Introduction
307
+
308
+ # A.1 Definition and Example of Noise and Bias
309
+
310
+ Noise is words that interfere with the generation process when the model generates a certain quadruple.
311
+
312
+ Order Bias: Due to the constraints of seq2seq tasks, the model learns a nonexistent causal relationship from the input to the order of quadruples. The model ends up overfitting to a specific order we've arbitrarily defined, which affects its generalization ability. We term this as "Order Bias."
313
+
314
+ Example:
315
+
316
+ Input $\star$ : Utterance 1: ... The battery of the iPhone was quite good and the system was smooth ...
317
+
318
+ Utterance 2: ... The battery of Samsung phones is worse. ... I also bought a Samsung phone for my girlfriend...
319
+
320
+ Utterance 3: ... Xiaomi can also be considered, mainly because the price is very low...
321
+
322
+ Output $\heartsuit$
323
+
324
+ "iPhone" Quads: (iPhone, battery, quite good, POS), (iPhone, system, smooth, POS)
325
+
326
+ "Samsung" Quads: (Samsung, battery, worse, NEG)
327
+
328
+ "Xiaomi" Quads: (Xiaomi, price, very low, POS).
329
+
330
+ Example of Noise: Specifically, when the model generates the quadruple $\clubsuit$ (iPhone, battery, quite good, POS), it selects words from the input $\star$ . Words in the input $\star$ but not in the quadruple are the words that interfere with the generation process of the quadruple $\clubsuit$ . So, these words are the noise (The definition of Noise). For instance, words such as "bought" and "considered" can introduce significant noise, potentially leading the model to generate incorrect quadruples.
331
+
332
+ Example of Bias: When we transform the quadruple extraction task into a text-to-text generation task, we need to design a sentence as the label. Considering the quadruples (Samsung, battery, worse, NEG) and (Xiaomi, price, very low, POS), we have to decide the order between them when constructing labels for the seq2seq task. Whether it's "Samsung, battery, worse, NEG" (Xiaomi, price, very low, POS") or "(Xiaomi, price, very
333
+
334
+ low, POS) (Samsung, battery, worse, NEG), the model is forced to learn the corresponding order and move away from the other orders. But in fact, any order is correct. This confusion leads the model to seek semantic clues from the input to find out why this order. The model attempts to find a nonexistent causal relationship between the input and the order of quadruples to find why this order exists. As a result, the model overfits to our arbitrarily defined order, impacting its generalization ability, thus leading to a bias.
335
+
336
+ # B Appedix for Method
337
+
338
+ # B.1 Appendix for section 4.1
339
+
340
+ # B.1.1 Augment with Chatgpt
341
+
342
+ We aim to keep the quadruple elements unchanged while constructing semantically similar inputs. However, AI paraphrasing tools like ChatGPT 3.5 and ChatGPT 4 often fail to preserve the quadruple elements and may alter the original semantics. Firstly, there's the issue of maintaining quadruple elements. ChatGPT often modifies the opinion part of the quadruples. Changing the quadruple elements renders the original labels incompatible with the input, resulting in a failed input construction. It is nearly impossible to determine whether the original quadruple elements remain unchanged through code analysis, as the appearance of characters in the text does not necessarily imply their association with the same quadruple or a quadruple relationship between them. Additionally, manually verifying whether quadruple elements have changed would require significant effort. Secondly, there's the issue of preserving the original input's semantics. ChatGPT also frequently alters semantics, disregarding certain parts of the content or even producing dialogues with entirely opposite meanings. We demonstrate some examples where ChatGPT rewriting resulted in changes to quadruple elements and altered semantics, as shown in Figure 8 and Figure 9. Therefore, AI rewriting tools like ChatGPT may not be suitable for our augmentation task.
343
+
344
+ # B.2 Appendix for section 4.2
345
+
346
+ # B.2.1 From a Data Distribution Perspective: MLE Loss
347
+
348
+ Currently, generative extraction models are primarily trained using Maximum Likelihood Estimation (MLE). Given the data distribution $p$ and a parametric model with parameters $\theta$ , Maximum likelihood
349
+
350
+ estimation (MLE) minimizes:
351
+
352
+ $$
353
+ L _ {M L E} (\theta) = - \mathrm {E} _ {x \sim p (x)} \left[ \mathrm {E} _ {y \sim p (y | x)} [ \log p _ {\theta} (y | x) ] \right] \tag {10}
354
+ $$
355
+
356
+ where $x$ represents the input context, $y$ represents the generation label.
357
+
358
+ It is well known that MLE can be seen as minimizing the Kullback-Leibler (KL) divergence between the data distribution $p$ and the model-estimated distribution $p_{\theta}$ . The equation below shows the relationship between MLE loss and KL divergence:
359
+
360
+ $$
361
+ \begin{array}{l} D _ {K L} (p \parallel p _ {\theta}) (11) \\ = \sum_ {X} p (x) \sum_ {Y} p (y | x) \log \left(\frac {p (y | x)}{p _ {\theta} (y | x)}\right) (12) \\ = \sum_ {X} p (x) \sum_ {Y} p (y | x) \log (p (y | x)) (13) \\ - \sum_ {X} p (x) \sum_ {Y} p (y | x) \log \left(p _ {\theta} (y | x)\right) (14) \\ = - H + \operatorname {M L E} (\theta) (15) \\ \end{array}
362
+ $$
363
+
364
+ where $H$ is the "Entropy" and is independent of model parameters $\theta$ , it can be disregarded in the training loss. Hence, MLE loss and KL divergence share the same minimum. By minimizing the MLE loss, we encourage the predicted distribution $p_{\theta}$ to align with the data distribution $p$ closely.
365
+
366
+ Learning All Feasible Lables It is worth noting that Equation 12 indicated that we need to learn all feasible labels for the input. In many specific tasks, only one label $y$ corresponds to a given input, with a probability $p(y|x) = 1$ , and the probabilities $p(other|x)$ for other texts are all 0. However, in some tasks, there may be multiple labels $\{y_1, y_2, \ldots\}$ that match a given input, with probabilities $p(y_1|x), p(y_2|x), \ldots$ all non-zero. Unfortunately, these probabilities are often immeasurable, which has led to prior research overlooking multiple feasible labels and instead focusing only on one label. Failing to learn all feasible labels fully, and instead focusing on just one, increases the risk of introducing bias into the model.
367
+
368
+ # B.3 Proof of Ideal-Actual Training Gap
369
+
370
+ We prove that, for each sample, the Ideal-Actual Training Gap $\Delta$ , i.e., the difference between the ideal MLE loss and the actual MLE loss is not zero, thereby demonstrating a disparity between the ideal training objective and the actual training objective.
371
+
372
+ Given one sample with input as $x$ and model parameter $\theta$ , the difference $\Delta$ between the ideal MLE loss and the actual MLE loss is as follows:
373
+
374
+ $$
375
+ \begin{array}{l} \Delta = M L E _ {i d e a l} - M L E _ {a c t u a l} \\ = - \left[ p (x) \sum_ {y \in \Pi (\mathbb {S})} p (y | x) \log p _ {\theta} (y | x) \right] \\ + \left[ p (x) p \left(\pi_ {k} (\mathbb {S}) | x\right) \log p _ {\theta} \left(\pi_ {k} (\mathbb {S}) | x\right) \right] \\ = - p (x) \left[ \sum_ {y \in \Pi (\mathbb {S})} p (y | x) \log p _ {\theta} (y | x) - p \left(\pi_ {k} (\mathbb {S}) | x\right) \log p _ {\theta} \left(\pi_ {k} (\mathbb {S}) | x\right) \right] \\ \end{array}
376
+ $$
377
+
378
+ In this task, all feasible labels contain the same quadruples but in different orders. Moreover, all permutation orders are equivalent. Therefore, all labels are equivalent, resulting in equal probabilities for each label. That is, for $p(y|x)$ , the probability of each feasible label $y \in \Pi(\mathbb{S})$ is the same, so $p(y|x) = \frac{1}{|\Pi(\mathbb{S})|}$ , where $|\Pi(\mathbb{S})|$ represents the number of elements in $\mathbb{S}$ . Of course, $p(\pi_k(\mathbb{S})|x) = \frac{1}{|\Pi(\mathbb{S})|}$ . Consequently, we can further simplify the above expression:
379
+
380
+ $$
381
+ \begin{array}{l} \Delta = M L E _ {i d e a l} - M L E _ {a c t u a l} \\ = - \frac {p (x)}{| \mathbb {S} |} \left[ \sum_ {y \in \Pi (\mathbb {S})} \log p _ {\theta} (y | x) - \log p _ {\theta} \left(\pi_ {k} (\mathbb {S}) | x\right) \right] \\ = - \frac {p (x)}{| \mathbb {S} |} \left[ \sum_ {y \in \{\Pi (\mathbb {S}) - \{\pi_ {k} (\mathbb {S}) \} \}} \log p _ {\theta} (y | x) \right] \\ \approx 0 \\ \end{array}
382
+ $$
383
+
384
+ In dialogue datasets, each sample contains more than one quadruple, so $\Pi (\mathbb{S}) - \{\pi_k(\mathbb{S})\} \neq \emptyset$ . Therefore, in this scenario, the Ideal-Actual training gap $\Delta$ between the ideal MLE loss and the actual MLE loss cannot approximate 0. This indicates a gap between the ideal training objective and the actual training objective.
385
+
386
+ # B.3.1 Objective Approximation
387
+
388
+ Our approach to supplementing necessary samples with various feasible labels involves the following steps: Firstly, construct an input set $Ag(x)$ where each input shares the same quadruple elements and exhibits similar semantics. Then, combine these inputs with multiple feasible labels to create samples. Within the augmented dataset, we will illustrate that the Ideal-Actual training gap $\Delta$ between the ideal Maximum Likelihood Estimation (MLE) loss and the actual MLE loss for any given sample is approximately 0. This demonstration serves to indicate that the training objective on this augmented dataset can closely approximate the ideal training objective.
389
+
390
+ Given one sample with input as $x$ and model parameter $\theta$ , the gap $\Delta$ between the ideal MLE loss and the actual MLE loss is as follows:
391
+
392
+ $$
393
+ \begin{array}{l} \Delta = M L E _ {i d e a l} - M L E _ {a c t u a l} \\ = - \left[ p (x) \sum_ {y \in \Pi (\mathbb {S})} p (y | x) \log p _ {\theta} (y | x) \right] \tag {16} \\ + \left[ \sum_ {(\hat {x}, y) \in (A g (x), \Pi (\mathbb {S}))} p _ {\mathrm {a u g}} (\hat {x}) p _ {\mathrm {a u g}} (y | \hat {x}) \log p _ {\theta} (y | \hat {x}) \right] \\ \end{array}
394
+ $$
395
+
396
+ Because $x$ and each $\hat{x} \in Ag(x)$ are semantically similar, they occur with the same probability in natural language contexts. With a sufficiently large sample size in the dataset, under the guarantee of the "Law of the Large Numbers," we can assert that $p(x) \approx p_{\text{aug}}(\hat{x})$ . Thus, we can simplify the above formula to:
397
+
398
+ $$
399
+ \begin{array}{l} \Delta = M L E _ {i d e a l} - M L E _ {a c t u a l} \\ \approx - p (x) \left[ \sum_ {y \in \Pi (\mathbb {S})} p (y | x) \log p _ {\theta} (y | x) \right. \tag {17} \\ \left. - \sum_ {(\hat {x}, y) \in (A g (x), \Pi (\mathbb {S}))} p _ {\mathrm {a u g}} (y | \hat {x}) \log p _ {\theta} (y | \hat {x}) \right] \\ \end{array}
400
+ $$
401
+
402
+ In this task, all feasible labels contain the same quadruples but in different orders. Moreover, all permutation orders are equivalent. Therefore, all labels are equivalent, resulting in equal probabilities for each label. That is, for $p(y|x)$ , the probability of each feasible label $y \in \Pi(\mathbb{S})$ is the same, so $p(y|x) = \frac{1}{|\Pi(\mathbb{S})|}$ . In the augmented dataset, $\hat{x}$ and $x$ share the same quadruple elements, implying that all feasible labels associated with them are the same. Furthermore, as our augmented dataset encompasses all feasible labels, we have $p_{\mathrm{aug}}(y|\hat{x}) = \frac{1}{|\Pi(\mathbb{S})|}$ . Hence, $p(y|x) = p_{\mathrm{aug}}(y|\hat{x}) = \frac{1}{|\Pi(\mathbb{S})|}$ . This allows for further simplification of the above expression:
403
+
404
+ $$
405
+ \begin{array}{l} \Delta = M L E _ {i d e a l} - M L E _ {a c t u a l} \\ \approx - \frac {p (x)}{| \mathbb {S} |} \left[ \sum_ {y \in \Pi (\mathbb {S})} \log p _ {\theta} (y | x) \right. \tag {18} \\ \left. - \sum_ {(\hat {x}, y) \in (A g (x), \Pi (\mathbb {S}))} \log \left(p _ {\theta} (y | \hat {x}) \right] \right] \\ \end{array}
406
+ $$
407
+
408
+ An input $x$ consists of two components: the quadruple elements $x_{q}$ and the non-quadruple context $x_{c}$ . Therefore, we can decompose $x$ in the above equa
409
+
410
+ tion as follows:
411
+
412
+ $$
413
+ \begin{array}{l} \Delta = M L E _ {i d e a l} - M L E _ {a c t u a l} \\ \approx - \frac {p (x)}{| \mathbb {S} |} \left[ \sum_ {y \in \Pi (\mathbb {S})} \log \left[ p _ {\theta} \left(y \mid x _ {q}\right) p _ {\theta} \left(y \mid x _ {o}\right) \right] \right. \tag {19} \\ \left. - \sum_ {(\hat {x}, y) \in (A g (x), \Pi (\mathbb {S}))} \log \left[ p _ {\theta} (y | \hat {x} _ {q}) p _ {\theta} (y | \hat {x} _ {o}) \right] \right] \\ \end{array}
414
+ $$
415
+
416
+ Here, $x_{q}$ is correlated with the label $y$ , while $x_{c}$ is independent of the label $y$ . So, we have
417
+
418
+ $$
419
+ \begin{array}{l} \Delta = M L E _ {i d e a l} - M L E _ {a c t u a l} \\ \approx \frac {p (x) \log p _ {\theta} (y)}{| \mathbb {S} |} \left[ - \sum_ {y \in \Pi (\mathbb {S})} \log p _ {\theta} (y | x _ {q}) + \sum_ {(\hat {x}, y) \in (A g (x), \Pi (\mathbb {S}))} \log p _ {\theta} (y | \hat {x} _ {q}) \right] \tag {20} \\ \end{array}
420
+ $$
421
+
422
+ When constructing $\hat{x}$ , we ensure that it shares the same quadruple elements as $x$ , hence $\hat{x}_q = x_q$ . Consequently, $\log (p_{\theta}(y|\hat{x}_q)) = \log (p_{\theta}(y|x_q))$ . Hence, we can simplify the above expression to:
423
+
424
+ $$
425
+ \begin{array}{l} \Delta = M L E _ {i d e a l} - M L E _ {a c t u a l} \\ \approx \frac {p (x)}{| \mathbb {S} |} \left[ - \sum_ {y \in \Pi (\mathbb {S})} \log p _ {\theta} (y | x _ {q}) + \sum_ {(\hat {x}, y) \in (A g (x), \Pi (\mathbb {S}))} \log (p _ {\theta} (y | x _ {q}) \right] \\ \approx 0 \tag {21} \\ \end{array}
426
+ $$
427
+
428
+ The above equation can be approximated to 0 because the variable $y$ in Equation 21 can cover all feasible labels during actual training, aligning it with the ideal scenario. Therefore, in this case, the difference between the ideal MLE loss and the actual MLE loss can be approximated to 0. This indicates that when training the model in the augmented dataset, the actual training objective can closely approximate the ideal training objective.
429
+
430
+ # C Appendix for Experiment
431
+
432
+ # C.1 Dataset Detail
433
+
434
+ The dataset used is called Diaasq, including both a Chinese and an English dataset. The dataset is divided into train/test/dev sets in an 8:1:1 ratio. Aside from the dialogue text, the dataset also includes important details such as the speaker for each utterance, dialogue reply relationships, and reply thread relationships. Every dialogue originates from a root utterance, and multiple speakers take part in responding to preceding utterances. Multi-threaded and multi-turn dialogues form a tree structure based on reply relationships. In other words, dialogues are structured like trees, following reply relationships. Each reply thread consists of all the utterances along the path from a leaf node
435
+
436
+ to the root node, as illustrated in Figure 5. The dataset labels consist of ground truth tuples and the positions of their element. The statistical information of the dataset is shown in Table 6.
437
+
438
+ ![](images/1dbf1b7f60ad27fb2f46ff1d95d7a7788bc3700156e1b66d8d27d951f2e93a28.jpg)
439
+ Figure 5: Reply threads. "2" $\rightarrow$ "1" means utterance "2" replies to utterance "1".
440
+
441
+ # C.2 Detail of Metrics
442
+
443
+ We use micro F1 for the pair extraction task and both micro F1 and identification F1 for the quadruple extraction task, as stated in (Barnes et al., 2021). In micro F1, predicted tuples with all correct words are considered true positives (TP), while tuples with any incorrect word are considered false positives (FP). Tuples that were not predicted correctly are considered false negatives (FN). On the other hand, Identification F1 is similar to Micro F1, but it does not take sentiment elements into account.
444
+
445
+ # C.3 Detail of Experiment Setting
446
+
447
+ We use BART (Lewis et al., 2020) (440M) for both EN and ZH datasets. We train the model for ten epochs (2 hours) on 4 3090 GPUS with a batch size of 5 and a learning rate of 5e-5, while other layers employ a learning rate of 8e-5. We use 3 cross-attentithreen layers. During testing, the beam search size is set to 2. All reported results are averaged over multiple runs.
448
+
449
+ # C.4 Detail of Compared Baseline
450
+
451
+ CRF-ExtractClassify(CEC)(Cai et al., 2021) is a two-stage model that initially extracts aspect-opinion pairs and then predicts category-sentiment based on the extracted aspect-opinion pairs. SpERT(Eberts and Ulges, 2020) is a span-based transformer model for joint entity and relation extraction, initially extracting spans, filtering them, and finally classifying relationships among the
452
+
453
+ spans. Modify this model to support quadruple extraction classification. Span-ASTE(Xu et al., 2021a) is a span-based model that explicitly considers interactions between the entire span of targets and opinions when predicting sentiment relations. Modify the final stage of SpanASTE to enumerate triplets, aligning it with the DiaASQ task. ParaPhrase(Zhang et al., 2021a), an end-to-end generation approach, introduces a novel paraphrase modeling paradigm to frame the ASQP task as a paraphrase generation process. MvI(Li et al., 2023a) method leverages speaker information, reply relationships, and thread information in dialogues to control information fusion between dialogues. Finally, it extracts quadruples based on the decoding output of Grid Tagging.
454
+
455
+ # C.5 More analysis for main Experiment Results
456
+
457
+ ParaPhrase is a generative model that outperforms the discriminative model Span-ASTE on short text datasets but falls short on dialogue datasets. This is because the dialogue dataset has an increasing number of tuples, which widens the gap between the actual and ideal training objectives, i.e., increasing gap in $\Pi (\mathbb{S})$ and $\pi_k(\mathbb{S})$ as indicated by Equation 4 and 5. This amplifies the order bias interference in ParaPhrase. In contrast, Span-ASTE remains unaffected by tuple order bias, resulting in a reversal of performance on dialogue datasets shown in Table 1.
458
+
459
+ # C.6 Augmentation Strategies in SOBM
460
+
461
+ To investigate the effectiveness of the augmentation strategy in SOBM, we compared it with other augmentation methods. By determining whether to shuffle the tuples in labels and the segmented fragments in inputs, we get various augmented datasets. We also compared SOBM with traditional data augmentation methods: synonyms, replacement, and deletion (SRD). The results are presented in Table 8. Compared to row 1, our method surpasses the first method by a maximum of $2.52\%$ (micro F1) on the EN dataset. The first method creates biased samples, while our method helps alleviate biases, improving the model's robustness and generalizability. The second method is actually a type of standard data augmentation method. So, it outperforms the first method by a maximum of $1.04\%$ (micro F1) in the ZH dataset. However, the comparison between rows 5 and 2 shows that our method outperforms the second method by a maximum of
462
+
463
+ Table 6: Statistical information of the Diasaq dataset.
464
+
465
+ <table><tr><td rowspan="2"></td><td colspan="3">Pairs</td><td colspan="3">Quadruples</td><td colspan="3">Utterance Length</td><td colspan="3">Dialogue Length</td></tr><tr><td>Pair-t-a</td><td>Pair-t-o</td><td>Paira-o</td><td>Quad</td><td>Intra</td><td>Cross</td><td>Avg</td><td>Min</td><td>Max</td><td>Avg</td><td>Min</td><td>Max</td></tr><tr><td>EN</td><td>5894</td><td>7432</td><td>4994</td><td>5514</td><td>4287</td><td>1227</td><td>31</td><td>3</td><td>156</td><td>231</td><td>85</td><td>481</td></tr><tr><td>ZH</td><td>6041</td><td>7587</td><td>5358</td><td>5742</td><td>4467</td><td>1275</td><td>29</td><td>3</td><td>142</td><td>219</td><td>76</td><td>462</td></tr></table>
466
+
467
+ Table 8: Result of different augmentation methods. TDA - Traditional Data Augment.
468
+
469
+ <table><tr><td rowspan="2">Method</td><td rowspan="2">TDA</td><td colspan="2">Shuffle</td><td colspan="2">EN</td><td colspan="2">ZH</td></tr><tr><td>Input</td><td>OutPut</td><td>Micro</td><td>Iden</td><td>Micro</td><td>Iden</td></tr><tr><td>w/o</td><td></td><td></td><td></td><td>36.35</td><td>41.64</td><td>35.76</td><td>39.21</td></tr><tr><td>In only</td><td></td><td>✓</td><td></td><td>37.31</td><td>41.68</td><td>36.80</td><td>39.78</td></tr><tr><td>Out only</td><td></td><td></td><td>✓</td><td>36.44</td><td>41.35</td><td>36.64</td><td>39.53</td></tr><tr><td>SRD</td><td>✓</td><td></td><td>✓</td><td>37.44</td><td>41.95</td><td>36.29</td><td>39.12</td></tr><tr><td>SOBM (Our)</td><td></td><td>✓</td><td>✓</td><td>38.87</td><td>43.32</td><td>37.80</td><td>41.05</td></tr></table>
470
+
471
+ $1.64\%$ (Iden F1) in the EN dataset. This emphasizes that our approach isn't merely an optional data augmentation technique but rather a necessary debiasing technique. Compared to row 3, our method outperforms the third method by a maximum of $2.43\%$ (micro F1) in the EN dataset. The second method introduces a one-to-many learning challenge, while our method avoids this by pairing feasible labels with newly constructed inputs, facilitating models to converge to optimal performance. Compared to row 4, our method outperforms the fourth method by a maximum of $1.93\%$ (Iden F1) in the EN dataset. This highlights the superiority of our augmentation technique over traditional methods in dialogue processing.
472
+
473
+ # C.7 Compared Dialogue Segmentation Methods
474
+
475
+ Here is the detail of the compared dialogue segmentation methods:
476
+
477
+ 1. TOD-BERT (Wu et al., 2020a): This method directly classifies the utterance relationships without introducing topic information. The method interacts with the contextual information between two utterances, and the classification is performed on the fused contextual information to achieve dialogue segmentation. Pass the fused contextual information through an MLP layer and then classify to determine whether the two utterances share the same topic or whether they need to be segmented. This method is the most commonly used approach in existing works.
478
+
479
+ 2. Topic-Sentence Pair: This approach introduces
480
+
481
+ "topics" and then performs classification on topic-utterance pairs, similar to our method. However, instead of using cross-attention for fine-grained information fusion, it uses a concatenation operation to pool information. Firstly, it performs average pooling on a topic word and on an utterance. Then, it concatenates the two pooled embeddings and passes them through an MLP layer for classification to determine whether the utterance belongs to the given topic. Apply this process to all the topics and utterances to finish the segmentation.
482
+
483
+ 3. Simultaneously Multi-Granularity Denoising: This method incorporates sequence labeling and dialogue segmentation into the dialogue segmentation module. It doesn't need to pre-label topics topics. Instead, it views each word in an utterance as a potential topic and categorizes the connection between each word and the utterance. Based on the classification results, the method identifies words linked to any sentence as topics, while those without connections are not considered topics. This approach achieves both topic-centric clustering and topic labeling simultaneously. However, this means that when we perform dialogue segmentation, there is no explicit guidance from topic information. Consequently, it must deal with the intricate contextual interactions between utterances.
484
+
485
+ 4. Reply Thread (RT): This method doesn't employ neural networks. Instead, it directly uses the inherent reply thread structures (as shown in Section C.1) in the dataset as the final dialogue segmentation scheme. In this segmentation scheme, every utterance, except for the initial dialogue, is assigned to a single topic-centric cluster. However, this approach lacks finer segmentation granularity, as seen in cases where an utterance may relate to multiple topics, as illustrated by the black utterances in Fig. 2.
486
+
487
+ 5. Topic Word Match(TWM): This technique begins by labeling topic words within the utter
488
+
489
+ ances. Then, it utilizes string-matching algorithms to determine whether an utterance belongs to a specific topic. Specifically, it checks if an utterance contains the topic string at the string level. If the topic is found in the utterance, it's considered to belong to that topic; otherwise, it's not. However, this method is limited to establishing connections between an utterance and a topic only when the utterance explicitly mentions the topic at the string text level. When an utterance indirectly references a topic or discusses related content, such as using pronouns, this approach proves ineffective.
490
+
491
+ # C.8 Hyparameter Experiment
492
+
493
+ ![](images/afa145f23f59e036bcc5c7a050d5f8e0e3efb8919bd9d6c0278671e4c33eece6.jpg)
494
+ Figure 6: Results for the different number of cross attention layers.
495
+
496
+ We also investigated the impact of the number of cross-attention layers on model performance, keeping the batch size constant at four due to GPU memory limitations. The results are shown in Figure 6. The figure illustrates that increasing the number of cross-attention layers initially enhances model performance but then diminishes it. When there are fewer cross-attention layers, the model lacks sufficient interaction between topic and utterance information, limiting the exploration of their relationship. Conversely, an excessive number of cross-attention layers leads to overfitting due to a surplus of parameters and limited data, resulting in the incorporation of non-topic-related information during interaction.
497
+
498
+ # C.9 LLM's performance
499
+
500
+ We experimented with various fine-tuning methods, fine-tuning the Qwen1.5(7B) (Bai et al., 2023) model on the English dataset. Fine-tuning methods include full parameters fine-tuning, Lora (Hu
501
+
502
+ et al., 2021) fine-tuning, and Qlora (Dettmers et al., 2024) fine-tuning. The results are depicted in Fig. 7. Clearly, even with a smaller parameter setting, our approach outperforms the results of larger models.
503
+
504
+ ![](images/887a96f092bd50bebd746993e9ef53c771596232a8ab452d9b80eb4298ba097f.jpg)
505
+ Figure 7: LLM's Performance. The x-axis represents the logarithmic values of Lora's rank number, and the y-axis represents the Iden F1 results.
506
+
507
+ ![](images/07857610dcd35fde86ad833584201056d67e203afd5123d335fa1e58a7a985cf.jpg)
508
+ Figure 8: Chatgpt example 1.
509
+
510
+ Please rewrite the following dialogues in their original language so that change the content, but keep the general semantics and the elements in the quadruples unchanged:
511
+
512
+ Quadruples: ["neg", "k50", "take photos", "a little better"], ["pos", "pro", "photo", "far worse than"], ["neg", "12", "photo", "far worse than"], ["neg", "K40", "game", "always 460"],
513
+
514
+ ["pos", "Xiaomi", "taking pictures", "better"], ["neg", "Redmi", "taking pictures", "Don't consider"] Here is the dialogue:
515
+
516
+ ["I hope k50 can take photos a little better [ School Season][School Season][School Season ]", "Taking photos is really important !", "No matter how good the camera parameters are , it is useless without technology [ doge ]", "I went to the store to try the 12 and 12pro , the 12 's photo is far worse than the pro 's", "I agree with the photo too ! The top - level configuration version of the camera can also be enhanced", "The light is dark at night , and it is inconvenient to scan the code when going out .", "The telephoto scan code is even more fragrant .", "Do n't consider taking pictures using Redmi , Xiaomi is better [ DOGE ] .", "[ Doge ] [ Doge ] [ Doge ] Yes , I do n't know if you have encountered it , my K40 game is always 460 [ Tears ] [ Tears ] [ Tears ] ."
517
+
518
+ ![](images/ca107f075e9e4b5141e68f79d316fbc76be23f95fa8a89fc3d4f278b785a9325.jpg)
519
+ Figure 9: Chatgpt example 2.
520
+
521
+ "[I hope the K50 can improve its photo-taking capabilities just a bit. [School Season][School Season][School Season]", "Taking photos really matters!", "No matter how impressive the camera specs are, without the right technology, they're useless. [doge]", "I visited the store to test out the 12 and 12 Pro. The 12's camera performance is far worse than the Pro's.", "I totally agree about the camera! Even the highest-tier camera setup can be further enhanced.", "It gets really dark at night, making it inconvenient for scanning codes when out and about.", "Scanning codes with the telephoto lens is even more satisfying.", "If you're considering photo quality, go for Xiaomi over Redmi. Xiaomi performs better. [DOGE]", "[Doge] [Doge] [Doge] You know what, I've been experiencing this issue too. My K40's gaming performance is consistently at 460. [Tears] [Tears] [Tears]."
522
+
523
+ # Unexpected Changed Quaruples:
524
+
525
+ [ "neg", "k50", "take photos", "a little better"], [ "neg", "K40", "game", "always 460"], [ "pos", "Xiaomi", "taking pictures", "better"], [ "neg", "Redmi", "taking pictures", "Don't consider"]
526
+
527
+ ![](images/7ff11b055e0843fa29d1b18147d3911eee493c51a9b1d9b6909b505ac086a522.jpg)
528
+
529
+ Please rewrite the following dialogues in their original language so that change the content, but keep the general semantics and the elements in the quadruples unchanged:
530
+
531
+ Quadruples: ["pos", "vivo", "rear camera module", "better"], ["neg", "11U", "rear camera module", "stands out too much"], ["pos", "11U", "design", "recognizable"], ["pos", "11U", "design", "very beautiful"], Here is the dialogue:
532
+
533
+ "[The price is not bad", "11U said ( all are little brothers [ doge ] refers to the back design )", "The 11U rear camera module stands out too much , which vivo has done better . The next generation of Ultra has changed again , and Xiaomi really has no inheritance . . . In fact , the design of 11U is very beautiful , and it is also recognizable .", "The recognition is too great", "iQOO can be regarded as a firm high - end , Xiaomi has not hurry to learn [ doge ] ?", "Now I really do n't understand which of the X series and iQOO is the son of vivo ?"]
534
+
535
+ ![](images/9ee63b044b37cf815c4d5b96d94e4ee9ea12502428b2fb31cdda2e328c62b906.jpg)
536
+
537
+ "[The price is quite reasonable.", "Regarding the 11U, all the younger models (referred to as 'little brothers' [doge]) have similar rear designs.", "The rear camera module of the 11U stands out too much, which contrasts with vivo's more subtle approach. The next generation of Ultra has made further changes, highlighting Xiaomi's lack of design continuity. However, the design of the 11U is undeniably beautiful and distinctive.", "The design is truly remarkable.", "iQOO can definitely be considered a solid high-end option. Is Xiaomi in any hurry to catch up? [doge]", "Honestly, I'm confused about whether the X series or iQOO is the true heir to vivo."
538
+
539
+ # Unexpected Changed Quaruples:
540
+
541
+ ["pos", "vivo", "rear camera module", "better"], ["pos", "11U", "design", "recognizable"], ["pos", "11U", "design", "very beautiful"]
2024/Overcome Noise and Bias_ Segmentation-Aided Multi-Granularity Denoising and Debiasing for Enhanced Quarduples Extraction in Dialogue/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b099b928df97d1647c23c3e3b77f88ce048a9f412dd12712c21d4369211e8e9b
3
+ size 745919
2024/Overcome Noise and Bias_ Segmentation-Aided Multi-Granularity Denoising and Debiasing for Enhanced Quarduples Extraction in Dialogue/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/PALM_ Few-Shot Prompt Learning for Audio Language Models/0b7be31a-449c-4312-b744-95f7039ae91e_content_list.json ADDED
@@ -0,0 +1,1456 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "PALM: Few-Shot Prompt Learning for Audio Language Models",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 166,
8
+ 89,
9
+ 831,
10
+ 111
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Asif Hanif, Maha Tufail Agro, Mohammad Areeb Qazi, Hanan Aldarmaki",
17
+ "bbox": [
18
+ 176,
19
+ 143,
20
+ 818,
21
+ 161
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Mohamed Bin Zayed University of Artificial Intelligence (MBZUAI)",
28
+ "bbox": [
29
+ 216,
30
+ 162,
31
+ 779,
32
+ 178
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "{asif.hanif, maha.tufail, mohammad.qazi, hanan.aldarmaki}@mbzuai.ac.ae",
39
+ "bbox": [
40
+ 144,
41
+ 179,
42
+ 850,
43
+ 193
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "Abstract",
50
+ "text_level": 1,
51
+ "bbox": [
52
+ 260,
53
+ 260,
54
+ 339,
55
+ 275
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "Audio-Language Models (ALMs) have recently achieved success in zero-shot audio recognition tasks, which match features of audio waveforms with class-specific text prompt features, inspired by advancements in Vision-Language Models (VLMs). Given the sensitivity of zero-shot performance to the choice of hand-crafted text prompts, many prompt learning techniques have been developed for VLMs. We explore the efficacy of these approaches in ALMs and propose a novel method, Prompt Learning in Audio Language Models (PALM), which optimizes the feature space of the ALM text encoder. Unlike existing methods that work in the input space, our approach results in greater training efficiency. We demonstrate the effectiveness of our approach on 11 audio recognition datasets, encompassing a variety of speech-processing tasks, and compare the results with three baselines in a few-shot learning setup. Our results show that PALM performs on a par with or outperforms the baselines while being more computationally efficient. Our code is publicly available at $\\mathrm{Gib}\\mathbf{u}\\mathbf{b}^{\\dagger}$",
62
+ "bbox": [
63
+ 141,
64
+ 288,
65
+ 460,
66
+ 630
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "1 Introduction",
73
+ "text_level": 1,
74
+ "bbox": [
75
+ 114,
76
+ 645,
77
+ 260,
78
+ 659
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Inspired by the success of Vision-Language Models (VLMs) (Zhang et al., 2024), Audio-Language Models (ALMs) have recently emerged, achieving state-of-the-art performance on various zero-shot audio recognition tasks (Elizalde et al., 2023; Deshmukh et al., 2023; Kong et al., 2024; Das et al., 2024). In zero-shot audio recognition, features of the audio waveform are matched with features of text prompts representing each class, and the highest matching class is assigned to the audio waveform. Zero-shot audio recognition offers some advantages by eliminating the need for extensive labeled datasets and allowing for the recognition of new classes without additional",
85
+ "bbox": [
86
+ 112,
87
+ 671,
88
+ 489,
89
+ 896
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "image",
95
+ "img_path": "images/9f5a226b4cb5898e95518750cfcc522ad04929c65cd029b62cfbf9790bbc08f8.jpg",
96
+ "image_caption": [
97
+ "Figure 1: Comparison of our proposed approach, PALM, with three baselines: ZERO-SHOT (Deshmukh et al., 2023), COOP (Zhou et al., 2022b) and COCOOP (Zhou et al., 2022a). Bar plots show classification accuracy averaged across 11 audio datasets encompassing various speech-processing tasks."
98
+ ],
99
+ "image_footnote": [],
100
+ "bbox": [
101
+ 519,
102
+ 290,
103
+ 860,
104
+ 467
105
+ ],
106
+ "page_idx": 0
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "training. This approach reduces training times and data annotation costs, leading to substantial savings in computational resources.",
111
+ "bbox": [
112
+ 507,
113
+ 598,
114
+ 882,
115
+ 646
116
+ ],
117
+ "page_idx": 0
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "The choice of text prompt is crucial for pre-trained vision-language and audio-language models, but it becomes a drawback for zero-shot recognition due to the requirement of hand-crafted prompts. This manual prompt-engineering can result in performance variations (Zhou et al., 2022b,a). We confirm this observation, previously noted in VLMs, within the context of ALMs (refer to Figure 2). To automate the learning of text prompts, various approaches have been introduced for prompt learning in VLMs (Gu et al., 2023).",
122
+ "bbox": [
123
+ 507,
124
+ 663,
125
+ 884,
126
+ 840
127
+ ],
128
+ "page_idx": 0
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "The domain of prompt learning in ALMs remains under-explored, lacking comprehensive studies to evaluate the effectiveness of prompt learning techniques within this context. To bridge",
133
+ "bbox": [
134
+ 507,
135
+ 857,
136
+ 882,
137
+ 921
138
+ ],
139
+ "page_idx": 0
140
+ },
141
+ {
142
+ "type": "page_footnote",
143
+ "text": "$\\dagger$ https://asif-hanif.github.io/palm/",
144
+ "bbox": [
145
+ 136,
146
+ 906,
147
+ 403,
148
+ 920
149
+ ],
150
+ "page_idx": 0
151
+ },
152
+ {
153
+ "type": "page_number",
154
+ "text": "18527",
155
+ "bbox": [
156
+ 475,
157
+ 927,
158
+ 524,
159
+ 940
160
+ ],
161
+ "page_idx": 0
162
+ },
163
+ {
164
+ "type": "footer",
165
+ "text": "Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 18527-18536 November 12-16, 2024 ©2024 Association for Computational Linguistics",
166
+ "bbox": [
167
+ 152,
168
+ 945,
169
+ 843,
170
+ 972
171
+ ],
172
+ "page_idx": 0
173
+ },
174
+ {
175
+ "type": "image",
176
+ "img_path": "images/2616c91e545c0f68499e04a38a0ca9de9ee11ff6d278423b560da1cd26710807.jpg",
177
+ "image_caption": [
178
+ "Figure 2: Impact of Hand-crafted Prompts on ZERO-SHOT Performance Zero-shot accuracy across four audio recognition datasets (ESC50 (Piczak), GT-Music-Genre (Sturm, 2012), SESA (Spadini, 2019), and VocalSound (Gong et al., 2021)) is evaluated with eight different text prompts using PENGI (Deshmukh et al., 2023) model. The accuracy varies with changes in the handcrafted prompts."
179
+ ],
180
+ "image_footnote": [],
181
+ "bbox": [
182
+ 166,
183
+ 91,
184
+ 823,
185
+ 225
186
+ ],
187
+ "page_idx": 1
188
+ },
189
+ {
190
+ "type": "text",
191
+ "text": "this research gap, we adapt prompt learning techniques developed for VLMs and apply them to the domain of ALMs. Our results demonstrate that these adaptations improve audio classification performance (see Table 2). Traditional techniques optimize the input space (i.e. token embeddings) of the text encoder by introducing a learnable context. However, this approach can increase training costs as loss gradients must flow through the text encoder branch. To address this, we introduce a novel method, PALM: Prompt Learning in Audio Language Models, which optimizes the feature space of the text encoder rather than its input space. This makes the training computationally efficient since loss gradients do not need to flow through the text encoder. To assess the effectiveness of our approach, we show results on 11 audio recognition datasets, encompassing various speech processing tasks. Our method either matches or surpasses other approaches while being less computationally demanding (see Table 2 and Table 3).",
192
+ "bbox": [
193
+ 115,
194
+ 324,
195
+ 489,
196
+ 661
197
+ ],
198
+ "page_idx": 1
199
+ },
200
+ {
201
+ "type": "text",
202
+ "text": "Contributions: Our contributions are as follows:",
203
+ "text_level": 1,
204
+ "bbox": [
205
+ 114,
206
+ 678,
207
+ 480,
208
+ 694
209
+ ],
210
+ "page_idx": 1
211
+ },
212
+ {
213
+ "type": "list",
214
+ "sub_type": "text",
215
+ "list_items": [
216
+ "- Inspired by the success of few-shot prompt learning in vision-language models (VLMs), we show that adapting these techniques to audio-language models (ALMs) significantly enhances their performance.",
217
+ "- We introduce PALM, a novel few-shot prompt learning method for ALMs that optimizes the text encoder's feature space. We demonstrate our approach's effectiveness on 11 audio recognition datasets, comparing it to three baselines in a few-shot learning setup. Our method matches or outperforms others while being less computationally demanding, estab"
218
+ ],
219
+ "bbox": [
220
+ 132,
221
+ 702,
222
+ 490,
223
+ 921
224
+ ],
225
+ "page_idx": 1
226
+ },
227
+ {
228
+ "type": "text",
229
+ "text": "lishing a benchmark for prompt learning in ALMs and paving the way for future research.",
230
+ "bbox": [
231
+ 544,
232
+ 324,
233
+ 884,
234
+ 357
235
+ ],
236
+ "page_idx": 1
237
+ },
238
+ {
239
+ "type": "text",
240
+ "text": "2 Related Work",
241
+ "text_level": 1,
242
+ "bbox": [
243
+ 507,
244
+ 370,
245
+ 665,
246
+ 386
247
+ ],
248
+ "page_idx": 1
249
+ },
250
+ {
251
+ "type": "text",
252
+ "text": "Prompt engineering involves adding task-specific hints, called prompts, to a large pre-trained model to adapt it to new tasks. Recently, significant advancements have been made in prompt learning, particularly in the fields of language and vision. Below, we outline the recent developments in language, vision, and audio domains.",
253
+ "bbox": [
254
+ 507,
255
+ 399,
256
+ 885,
257
+ 512
258
+ ],
259
+ "page_idx": 1
260
+ },
261
+ {
262
+ "type": "text",
263
+ "text": "2.1 Audio Language Models (ALMs)",
264
+ "text_level": 1,
265
+ "bbox": [
266
+ 507,
267
+ 527,
268
+ 815,
269
+ 543
270
+ ],
271
+ "page_idx": 1
272
+ },
273
+ {
274
+ "type": "text",
275
+ "text": "Taking inspiration from multimodal models like CLIP (Radford et al., 2021) in the vision domain, Contrastive Language-Audio Pretraining (CLAP) (Elizalde et al., 2023) stands out as the first-of-its-kind audio language model. It connects natural language and audio through dual encoders and contrastive learning, aligning audio and text descriptions in a shared multimodal space. Furthermore, CLAP introduces zero-shot prediction capabilities, removing the necessity for training with predefined class labels and allowing flexible class prediction during inference.",
276
+ "bbox": [
277
+ 507,
278
+ 549,
279
+ 885,
280
+ 741
281
+ ],
282
+ "page_idx": 1
283
+ },
284
+ {
285
+ "type": "text",
286
+ "text": "PENGI (Deshmukh et al., 2023), another audio language Model, utilizes transfer learning by treating all audio tasks as text-generation tasks. It takes audio recordings and text inputs, generating freeform text as output. The input audio is represented by continuous embeddings from an audio encoder, while the corresponding text input undergoes the same process with a text encoder. These sequences are combined as a prefix to prompt a pre-trained frozen language model. PENGI's unified architecture supports both open-ended and close-ended",
287
+ "bbox": [
288
+ 507,
289
+ 744,
290
+ 885,
291
+ 921
292
+ ],
293
+ "page_idx": 1
294
+ },
295
+ {
296
+ "type": "page_number",
297
+ "text": "18528",
298
+ "bbox": [
299
+ 477,
300
+ 927,
301
+ 524,
302
+ 940
303
+ ],
304
+ "page_idx": 1
305
+ },
306
+ {
307
+ "type": "text",
308
+ "text": "tasks without requiring additional fine-tuning or task-specific extensions.",
309
+ "bbox": [
310
+ 112,
311
+ 84,
312
+ 485,
313
+ 115
314
+ ],
315
+ "page_idx": 2
316
+ },
317
+ {
318
+ "type": "text",
319
+ "text": "Audio Flamingo, introduced by Kong et al. (2024), is a multimodal-to-text generative model inspired by Flamingo (Alayrac et al., 2022), demonstrating advanced audio understanding capabilities, adaptability to unseen tasks through in-context learning and retrieval, and multi-turn dialogue abilities. The model features an audio feature extractor with a sliding window and uses cross-attention to fuse audio inputs into the language model, ensuring computational efficiency.",
320
+ "bbox": [
321
+ 112,
322
+ 117,
323
+ 487,
324
+ 275
325
+ ],
326
+ "page_idx": 2
327
+ },
328
+ {
329
+ "type": "text",
330
+ "text": "2.2 Prompt Learning in Language Models",
331
+ "text_level": 1,
332
+ "bbox": [
333
+ 112,
334
+ 288,
335
+ 460,
336
+ 304
337
+ ],
338
+ "page_idx": 2
339
+ },
340
+ {
341
+ "type": "text",
342
+ "text": "Extensive research has been conducted on prompt learning techniques in natural language processing. Pioneering work by (Brown et al., 2020) focused on optimization strategies for zero-shot and few-shot learning scenarios, demonstrating that prompts can enable generative models to perform well across various tasks without extensive task-specific training. Their method leverages the model's pre-trained knowledge and prompt-guided interactions to achieve strong performance on new tasks. They also introduced GPT-3, which transformed the field of prompt learning in natural language processing. Petroni et al. (2019) integrated contextual cues and constraints within prompts to guide model behavior, embedding task-specific information to enhance output precision and relevance. Their technique improves interpretability and task-oriented performance by providing contextual guidance during inference.",
343
+ "bbox": [
344
+ 112,
345
+ 309,
346
+ 489,
347
+ 615
348
+ ],
349
+ "page_idx": 2
350
+ },
351
+ {
352
+ "type": "text",
353
+ "text": "2.3 Prompt Learning in Vision-Language Models",
354
+ "text_level": 1,
355
+ "bbox": [
356
+ 112,
357
+ 627,
358
+ 455,
359
+ 656
360
+ ],
361
+ "page_idx": 2
362
+ },
363
+ {
364
+ "type": "text",
365
+ "text": "Inspired by advancements in prompt-based work in language models, several studies have been conducted to adapt these methods to VLMs (Gu et al., 2023). Some focus exclusively on the language component, such as COOP (Context Optimization) (Zhou et al., 2022a). In contrast, others integrate insights from language and visual components, as seen in COCOOP (Conditional Context Optimization) (Zhou et al., 2022a). COOP enhances CLIP model's few-shot transfer learning capability by optimizing a continuous set of prompt vectors within the language branch. However, COCOOP addresses the limitations of COOP, particularly its suboptimal performance on novel classes, by explicitly conditioning prompts on individual image instances, thereby enhancing generalization.",
366
+ "bbox": [
367
+ 112,
368
+ 664,
369
+ 489,
370
+ 921
371
+ ],
372
+ "page_idx": 2
373
+ },
374
+ {
375
+ "type": "text",
376
+ "text": "2.4 Prompt Learning in Audio-Language Models",
377
+ "text_level": 1,
378
+ "bbox": [
379
+ 507,
380
+ 84,
381
+ 847,
382
+ 112
383
+ ],
384
+ "page_idx": 2
385
+ },
386
+ {
387
+ "type": "text",
388
+ "text": "Prompt learning with audio-language models is relatively understudied. Previous work has explored enhancing language models with speech recognition by conditioning them on variable-length audio embeddings using a conformer-based audio encoder (Fathullah et al., 2024). Deshmukh et al. (2024) propose a test-time domain adaptation method for Contrastive ALMs, using unlabeled audio to adjust the model to new domains via a domain vector, consistent predictions, and self-entropy fine-tuning, improving on traditional Test-Time Training. Li et al. (2024) introduce PT-Text, an audio-free prompt tuning scheme that optimizes prompt tokens from text, regularizing the model to avoid overfitting by training with captions and using a multi-grained strategy to enhance performance.",
389
+ "bbox": [
390
+ 507,
391
+ 121,
392
+ 884,
393
+ 394
394
+ ],
395
+ "page_idx": 2
396
+ },
397
+ {
398
+ "type": "text",
399
+ "text": "3 Method",
400
+ "text_level": 1,
401
+ "bbox": [
402
+ 507,
403
+ 407,
404
+ 611,
405
+ 422
406
+ ],
407
+ "page_idx": 2
408
+ },
409
+ {
410
+ "type": "text",
411
+ "text": "3.1 Audio-Language Model (ALM)",
412
+ "text_level": 1,
413
+ "bbox": [
414
+ 507,
415
+ 432,
416
+ 801,
417
+ 449
418
+ ],
419
+ "page_idx": 2
420
+ },
421
+ {
422
+ "type": "text",
423
+ "text": "We demonstrate the efficiency of prompt learning in enhancing zero-shot performance using a state-of-the-art audio-language model PENGI (Deshmukh et al., 2023). Our approach is applicable to all audio-language models that have aligned audio and text encoders.",
424
+ "bbox": [
425
+ 507,
426
+ 454,
427
+ 882,
428
+ 550
429
+ ],
430
+ "page_idx": 2
431
+ },
432
+ {
433
+ "type": "text",
434
+ "text": "PENGI takes an audio recording/waveform and a text prompt as input and generates free-form text as output. It consists of three branches. The first branch is an audio encoder that maps the audio waveform to an embedding space. The second branch is a text encoder that transforms the input text into the same embedding space. These embeddings are then concatenated to form an input prefix for the third branch, a causal language model that generates tokens autoregressively, conditioned on both the audio and text inputs. PENGI can be used for various audio-conditioned tasks, such as text completion, classification, audio caption generation, and question-answering (Deshmukh et al., 2023).",
435
+ "bbox": [
436
+ 507,
437
+ 567,
438
+ 882,
439
+ 808
440
+ ],
441
+ "page_idx": 2
442
+ },
443
+ {
444
+ "type": "text",
445
+ "text": "Zero-Shot Inference Although PENGI is multimodal-to-text generation model, however, we use its audio and text encoder branches for zero-shot audio recognition. This is accomplished by comparing the embedding of the audio waveform (extracted from the audio encoder) with the",
446
+ "bbox": [
447
+ 507,
448
+ 825,
449
+ 884,
450
+ 920
451
+ ],
452
+ "page_idx": 2
453
+ },
454
+ {
455
+ "type": "page_number",
456
+ "text": "18529",
457
+ "bbox": [
458
+ 477,
459
+ 927,
460
+ 524,
461
+ 940
462
+ ],
463
+ "page_idx": 2
464
+ },
465
+ {
466
+ "type": "text",
467
+ "text": "embeddings of text prompts for different classes (extracted from the text encoder). An overview of zero-shot inference is given in Figure 3(a). It should be noted that the zero-shot setup used by (Deshmukh et al., 2023) differs from ours, as they employ the model's free-form text output for zero-shot inference.",
468
+ "bbox": [
469
+ 112,
470
+ 84,
471
+ 487,
472
+ 197
473
+ ],
474
+ "page_idx": 3
475
+ },
476
+ {
477
+ "type": "text",
478
+ "text": "Formally, we denote the pre-trained ALM as $f_{\\theta} = \\{f_{A},f_{T}\\}$ , whereas $f_{A}$ and $f_{T}$ are audio and text encoders, respectively and $\\theta$ represents the combined weights of both encoders. For classification in zero-shot scenario, an audio waveform $\\mathbf{x}$ is first passed to the audio encoder $f_{A}$ to produce a $d$ -dimensional feature vector $f_{A}(\\mathbf{x}) \\in \\mathbb{R}^{d}$ . In parallel, text prompts representing each class label $y_{i} \\in \\{y_{1},y_{2}\\dots ,y_{c}\\}$ are encapsulated within class-specific handcrafted text templates, such as",
479
+ "bbox": [
480
+ 112,
481
+ 212,
482
+ 485,
483
+ 374
484
+ ],
485
+ "page_idx": 3
486
+ },
487
+ {
488
+ "type": "equation",
489
+ "text": "\n$$\nt _ {i} = \\text {\" A n a u d i o r e c o r d i n g o f \\{C L A S S y _ {i} \\} \",}\n$$\n",
490
+ "text_format": "latex",
491
+ "bbox": [
492
+ 119,
493
+ 385,
494
+ 478,
495
+ 401
496
+ ],
497
+ "page_idx": 3
498
+ },
499
+ {
500
+ "type": "text",
501
+ "text": "where $c$ is the total number of classes. Each text prompt, represented as $t_i$ , is processed through the text encoder $f_T$ , resulting in a feature vector $f_T(t_i) \\in \\mathbb{R}^d$ . The relationship between the audio waveform $\\mathbf{x}$ and a class-specific text prompt $t_i$ is quantified by computing the cosine similarity between their corresponding feature vectors, denoted as $\\mathrm{sim}(f_A(\\mathbf{x}), f_T(t_i))$ . The class with the highest similarity score is then assigned as the label $\\hat{y}$ for the audio waveform, i.e.",
502
+ "bbox": [
503
+ 112,
504
+ 412,
505
+ 487,
506
+ 571
507
+ ],
508
+ "page_idx": 3
509
+ },
510
+ {
511
+ "type": "equation",
512
+ "text": "\n$$\n\\hat {y} = \\underset {i \\in \\{1, 2, \\dots , c \\}} {\\operatorname {a r g m a x}} \\quad \\operatorname {s i m} \\left(f _ {A} (\\mathbf {x}), f _ {T} (t _ {i})\\right). \\tag {1}\n$$\n",
513
+ "text_format": "latex",
514
+ "bbox": [
515
+ 156,
516
+ 583,
517
+ 487,
518
+ 612
519
+ ],
520
+ "page_idx": 3
521
+ },
522
+ {
523
+ "type": "text",
524
+ "text": "3.2 PALM: Prompt Learning in ALM",
525
+ "text_level": 1,
526
+ "bbox": [
527
+ 112,
528
+ 621,
529
+ 428,
530
+ 636
531
+ ],
532
+ "page_idx": 3
533
+ },
534
+ {
535
+ "type": "text",
536
+ "text": "In our proposed method, we do not use handcrafted prompts; instead, we simply use class names as the input to the text encoder i.e. $t_i = \\{\\mathrm{CLASS} y_i\\}$ . Moreover, unlike COOP (Zhou et al., 2022b), which learns the context of input text prompts in the token embedding space (see Figure 3(b)), we learn the context in the feature space of prompts. Specifically, after obtaining the feature vector of the $i_{\\mathrm{th}}$ class text prompt via the text encoder, i.e., $f_T(t_i) \\in \\mathbb{R}^d$ , we add a learnable vector $z_i \\in \\mathbb{R}^d$ to it to get the updated text feature vector as follows:",
537
+ "bbox": [
538
+ 112,
539
+ 642,
540
+ 487,
541
+ 834
542
+ ],
543
+ "page_idx": 3
544
+ },
545
+ {
546
+ "type": "equation",
547
+ "text": "\n$$\nf _ {T} ^ {\\prime} (t _ {i}) = \\left(1 - \\lambda_ {i}\\right) \\cdot f _ {T} (t _ {i}) + \\lambda_ {i} \\cdot z _ {i} (2)\n$$\n",
548
+ "text_format": "latex",
549
+ "bbox": [
550
+ 163,
551
+ 844,
552
+ 487,
553
+ 865
554
+ ],
555
+ "page_idx": 3
556
+ },
557
+ {
558
+ "type": "text",
559
+ "text": "where $\\lambda_{i}\\in [0,1]$ is a learnable parameter that determines the contributions of both vectors. Assuming $\\mathbf{t} = \\{t_1,t_2,\\dots ,t_c\\}$ denotes text prompts of all",
560
+ "bbox": [
561
+ 112,
562
+ 872,
563
+ 489,
564
+ 921
565
+ ],
566
+ "page_idx": 3
567
+ },
568
+ {
569
+ "type": "text",
570
+ "text": "classes, the raw/un-normalized prediction scores (logits), denoted as $f_{\\theta}(\\mathbf{x}, \\mathbf{t}) \\in \\mathbb{R}^{c}$ , for an audio waveform $(\\mathbf{x})$ are obtained as follows:",
571
+ "bbox": [
572
+ 507,
573
+ 84,
574
+ 880,
575
+ 131
576
+ ],
577
+ "page_idx": 3
578
+ },
579
+ {
580
+ "type": "equation",
581
+ "text": "\n$$\nf _ {\\theta} (\\mathbf {x}, \\mathbf {t}) = \\left\\{\\mathrm {s i m} \\left(f _ {A} (\\mathbf {x}), f _ {T} ^ {\\prime} (t _ {i})\\right) \\right\\} _ {i = 1} ^ {c},\n$$\n",
582
+ "text_format": "latex",
583
+ "bbox": [
584
+ 534,
585
+ 141,
586
+ 855,
587
+ 179
588
+ ],
589
+ "page_idx": 3
590
+ },
591
+ {
592
+ "type": "text",
593
+ "text": "where $\\mathfrak{sim}(\\cdot)$ is cosine-similarity function and $c$ is the number of classes. $f_{A}(\\mathbf{x})$ is the feature vector from the audio encoder, and $f_{T}^{\\prime}(t_{i})$ is the updated text feature vector (Equation 2) of $i_{\\mathrm{th}}$ class.",
594
+ "bbox": [
595
+ 507,
596
+ 186,
597
+ 880,
598
+ 250
599
+ ],
600
+ "page_idx": 3
601
+ },
602
+ {
603
+ "type": "text",
604
+ "text": "We optimize the following objective function to learn feature-space context embeddings $\\mathbf{z} = \\{z_1, z_2, \\ldots, z_c\\}$ and their corresponding contributions $\\lambda = \\{\\lambda_1, \\lambda_2, \\ldots, \\lambda_c\\}$ ,",
605
+ "bbox": [
606
+ 507,
607
+ 267,
608
+ 882,
609
+ 332
610
+ ],
611
+ "page_idx": 3
612
+ },
613
+ {
614
+ "type": "equation",
615
+ "text": "\n$$\n\\underset {\\mathbf {z}, \\lambda} {\\text {m i n i m i z e}} \\sum_ {(\\mathbf {x}, y) \\in \\mathcal {D}} \\mathcal {L} \\left(f _ {\\theta} (\\mathbf {x}, \\mathbf {t}), y\\right), \\tag {3}\n$$\n",
616
+ "text_format": "latex",
617
+ "bbox": [
618
+ 559,
619
+ 342,
620
+ 882,
621
+ 376
622
+ ],
623
+ "page_idx": 3
624
+ },
625
+ {
626
+ "type": "text",
627
+ "text": "where $\\mathcal{D} = \\{\\mathbf{x}_i, y_i\\}_{i=1}^N$ is training dataset consisting of $N$ audio-class pairs and $\\mathcal{L}(\\cdot)$ denotes cross-entropy loss. We use few-shot setting during training, meaning that a fixed number† of samples (e.g., 16) are randomly selected from each class in the training dataset. While optimizing objective in Equation 3, weights of both encoders $\\{f_A, f_T\\}$ are kept in frozen state. The number of learnable parameters in our proposed method is $c + (c \\times d)$ . After learning the parameters, we use Equation 4 for audio classification during inference stage.",
628
+ "bbox": [
629
+ 507,
630
+ 388,
631
+ 882,
632
+ 567
633
+ ],
634
+ "page_idx": 3
635
+ },
636
+ {
637
+ "type": "equation",
638
+ "text": "\n$$\n\\hat {y} = \\underset {i \\in \\{1, 2, \\dots , c \\}} {\\operatorname {a r g m a x}} \\quad \\operatorname {s i m} \\left(f _ {A} (\\mathbf {x}), f _ {T} ^ {\\prime} \\left(t _ {i}\\right)\\right) \\tag {4}\n$$\n",
639
+ "text_format": "latex",
640
+ "bbox": [
641
+ 554,
642
+ 576,
643
+ 882,
644
+ 606
645
+ ],
646
+ "page_idx": 3
647
+ },
648
+ {
649
+ "type": "text",
650
+ "text": "An overview of our proposed approach can be found in Figure 3(c).",
651
+ "bbox": [
652
+ 507,
653
+ 615,
654
+ 880,
655
+ 646
656
+ ],
657
+ "page_idx": 3
658
+ },
659
+ {
660
+ "type": "text",
661
+ "text": "3.3 Difference with COOP and COCOOP",
662
+ "text_level": 1,
663
+ "bbox": [
664
+ 507,
665
+ 657,
666
+ 853,
667
+ 671
668
+ ],
669
+ "page_idx": 3
670
+ },
671
+ {
672
+ "type": "text",
673
+ "text": "COOP (Zhou et al., 2022b) and COCOOP (Zhou et al., 2022a) were originally introduced for vision-language model; however, we adapted them for audio-language model (replacing the vision encoder branch with audio encoder branch) and presented it as baseline methods. Both of these baselines and our method aim to enhance zero-shot performance for audio classification in this work. While PALM and the baselines share this common goal, they differ in their approach to achieving it. COOP and COCOOP optimize the input space (token embeddings of prompt context) of text encoder, whereas PALM optimizes the text feature space.",
674
+ "bbox": [
675
+ 507,
676
+ 677,
677
+ 884,
678
+ 887
679
+ ],
680
+ "page_idx": 3
681
+ },
682
+ {
683
+ "type": "page_footnote",
684
+ "text": "Refer to Figure 5 to see impact of number-of-shots on performance.",
685
+ "bbox": [
686
+ 507,
687
+ 894,
688
+ 880,
689
+ 920
690
+ ],
691
+ "page_idx": 3
692
+ },
693
+ {
694
+ "type": "page_number",
695
+ "text": "18530",
696
+ "bbox": [
697
+ 477,
698
+ 927,
699
+ 524,
700
+ 940
701
+ ],
702
+ "page_idx": 3
703
+ },
704
+ {
705
+ "type": "image",
706
+ "img_path": "images/74e294ef82a1b1dea7517dfa52f29f8f89cdee55c094ee9c3a1fc81d3a8b91b5.jpg",
707
+ "image_caption": [
708
+ "Figure 3: Overview of Zero-Shot, COOP, PALM (a) Zero-Shot inference involves matching the embedding of the audio waveform with the embeddings of text prompts for each class. The class with the highest matching score is then assigned to the audio. (b) COOP (Zhou et al., 2022b) avoids using handcrafted text prompts by learning the context of text prompts in the token embedding space. It optimizes the input space of the text encoder to enhance classification performance. (c) PALM requires only class names at the input of text encoder and it optimizes the feature space by adding learnable context embeddings to text feature vectors. PALM not only outperforms COOP (see Table 2), but it is also more computationally efficient since it does not require gradients to flow through the text encoder, unlike COOP."
709
+ ],
710
+ "image_footnote": [],
711
+ "bbox": [
712
+ 115,
713
+ 80,
714
+ 882,
715
+ 649
716
+ ],
717
+ "page_idx": 4
718
+ },
719
+ {
720
+ "type": "text",
721
+ "text": "In our method, loss gradients do not need to flow through the text encoder, whereas in COOP and COCOOP, gradients flow through the encoder to reach the input to update prompt context. Moreover, there is a feedback loop from audio features (output of audio encoder) to the input of text encoder in COCOOP, making it even more computationally",
722
+ "bbox": [
723
+ 112,
724
+ 797,
725
+ 489,
726
+ 912
727
+ ],
728
+ "page_idx": 4
729
+ },
730
+ {
731
+ "type": "text",
732
+ "text": "expensive. Comparatively, PALM is more computationally efficient as it does not include a feedback loop (see Table 3). Both COOP and COCOOP require a user-specified hyper-parameter, namely the number of context tokens, whereas PALM does not rely on such a parameter. Results in Table 2 demonstrate that our method outperforms COOP",
733
+ "bbox": [
734
+ 507,
735
+ 797,
736
+ 884,
737
+ 912
738
+ ],
739
+ "page_idx": 4
740
+ },
741
+ {
742
+ "type": "page_number",
743
+ "text": "18531",
744
+ "bbox": [
745
+ 477,
746
+ 927,
747
+ 524,
748
+ 940
749
+ ],
750
+ "page_idx": 4
751
+ },
752
+ {
753
+ "type": "table",
754
+ "img_path": "images/44485a5ebf8a4eee1228d2b0344ea6110481ad25f9a75cbf408ceae840c59c49.jpg",
755
+ "table_caption": [],
756
+ "table_footnote": [],
757
+ "table_body": "<table><tr><td>DATASETS</td><td>TYPE</td><td>CLASSES</td><td>SPLIT</td></tr><tr><td>Beijing-Opera</td><td rowspan=\"2\">Instrument Classification</td><td>4</td><td>Five Fold</td></tr><tr><td>NS-Instruments</td><td>10</td><td>Train-Test</td></tr><tr><td>ESC50</td><td rowspan=\"3\">Sound Event Classification</td><td>50</td><td>Five Fold</td></tr><tr><td>ESC50-Actions</td><td>10</td><td>Five Fold</td></tr><tr><td>UrbanSound8K</td><td>10</td><td>Ten Fold</td></tr><tr><td>CREMA-D</td><td rowspan=\"2\">Emotion Recognition</td><td>6</td><td>Train-Test</td></tr><tr><td>RAVDESS</td><td>8</td><td>Train-Test</td></tr><tr><td>VocalSound</td><td>Vocal Sound Classification</td><td>6</td><td>Train-Test</td></tr><tr><td>SESA</td><td>Surveillance Sound Classification</td><td>4</td><td>Train-Test</td></tr><tr><td>TUT2017</td><td>Acoustic Scene Classification</td><td>15</td><td>Four Fold</td></tr><tr><td>GT-Music-Genre</td><td>Music Analysis</td><td>10</td><td>Train-Test</td></tr></table>",
758
+ "bbox": [
759
+ 115,
760
+ 82,
761
+ 485,
762
+ 231
763
+ ],
764
+ "page_idx": 5
765
+ },
766
+ {
767
+ "type": "text",
768
+ "text": "Table 1: Datasets Information In this work, we use 11 multi-class classification datasets encompassing a variety of speech-processing tasks.",
769
+ "bbox": [
770
+ 112,
771
+ 242,
772
+ 487,
773
+ 286
774
+ ],
775
+ "page_idx": 5
776
+ },
777
+ {
778
+ "type": "text",
779
+ "text": "and COCOOP, achieving an average improvement of $5.5\\%$ and $3.1\\%$ respectively.",
780
+ "bbox": [
781
+ 112,
782
+ 312,
783
+ 485,
784
+ 344
785
+ ],
786
+ "page_idx": 5
787
+ },
788
+ {
789
+ "type": "text",
790
+ "text": "4 Experiments and Results",
791
+ "text_level": 1,
792
+ "bbox": [
793
+ 112,
794
+ 357,
795
+ 364,
796
+ 374
797
+ ],
798
+ "page_idx": 5
799
+ },
800
+ {
801
+ "type": "text",
802
+ "text": "4.1 Datasets",
803
+ "text_level": 1,
804
+ "bbox": [
805
+ 112,
806
+ 385,
807
+ 228,
808
+ 398
809
+ ],
810
+ "page_idx": 5
811
+ },
812
+ {
813
+ "type": "text",
814
+ "text": "We evaluate our methodology using datasets from various speech-processing tasks: instrument classification, sound event classification, emotion recognition, vocal sound classification, surveillance sound event classification, acoustic scene classification, and music analysis. Brief information of each dataset can be found in Table 1. For instrument classification, we use Beijing-Opera (Tian et al., 2014) dataset, which includes audio examples of strokes from four percussion instrument classes used in Beijing Opera, and NS-Instruments (Engel et al., 2017) dataset, which consists of one-shot instrumental notes with unique pitches, timbres, and envelopes, spanning ten classes. For sound event classification, we utilize three datasets: ESC50 (Piczak), containing environmental recordings across 50 classes; ESC50-Actions (Piczak), a subset with 10 classes of non-speech human sounds; and UrbanSound8K (Salamon et al., 2014), with urban noise excerpts from 10 classes. Emotion recognition is assessed with the CREMA-D (Cao et al., 2014) and RAVDESS (Livingstone and Russo, 2018) datasets, covering 6 and 8 emotion classes respectively, performed by actors. We employ the VocalSound (Gong et al., 2021) dataset for vocal sound classification, which includes 6 classes of human non-speech vocalizations. For surveillance sound event classification, we use SESA (Spadini, 2019) dataset, which has 4 classes. Acoustic scene classification uses the TUT2017 (Heittola et al., 2017) dataset, containing samples",
815
+ "bbox": [
816
+ 112,
817
+ 406,
818
+ 489,
819
+ 921
820
+ ],
821
+ "page_idx": 5
822
+ },
823
+ {
824
+ "type": "text",
825
+ "text": "from 15 acoustic scenes. For music analysis, the GT-Music-Genre (Sturm, 2012) dataset is used, which includes 10 classes of music genres.",
826
+ "bbox": [
827
+ 507,
828
+ 84,
829
+ 884,
830
+ 133
831
+ ],
832
+ "page_idx": 5
833
+ },
834
+ {
835
+ "type": "text",
836
+ "text": "We adhere to the official train-test or multi-fold splits for all datasets. We conduct cross-validation experiments on datasets having multi-fold splits such as Beijing-Opera, ESC50, ESC50-Actions, UrbanSound8K, and TUT2017, and report the average scores. We have publicly released all information regarding dataset preprocessing to ensure reproducibility of results.",
837
+ "bbox": [
838
+ 507,
839
+ 148,
840
+ 884,
841
+ 278
842
+ ],
843
+ "page_idx": 5
844
+ },
845
+ {
846
+ "type": "text",
847
+ "text": "4.2 Baseline Methods",
848
+ "text_level": 1,
849
+ "bbox": [
850
+ 507,
851
+ 288,
852
+ 694,
853
+ 303
854
+ ],
855
+ "page_idx": 5
856
+ },
857
+ {
858
+ "type": "text",
859
+ "text": "For baselines, we consider PENGI model (Deshmukh et al., 2023) (in ZERO-SHOT setup), COOP (Zhou et al., 2022b) and COCOOP (Zhou et al., 2022a). COOP and COCOOP are prompt learning approaches, originally introduced for VLMs. Both of these approaches remove the requirement of providing handcrafted text prompts and they optimize the input token embedding space of text encoder to enhance accuracy. The only difference between COOP and COCOOP is that the latter incorporates a feedback loop from the output of the audio encoder to the input of the text encoder. We adapt these two approaches for audio-language models by replacing the vision encoder with an audio encoder and present them as baselines for our proposed method. Why PENGI, COOP and CO-COOP as baselines? PENGI is an state-of-the-art ALM that has demonstrated comprehensive evaluation across 21 downstream audio tasks, making it a robust benchmark for comparison. COOP and CO-COOP, on the other hand, are pioneering works on prompt learning in the domain of vision-language models, offering foundational techniques and insights that are highly relevant for our study.",
860
+ "bbox": [
861
+ 507,
862
+ 309,
863
+ 884,
864
+ 696
865
+ ],
866
+ "page_idx": 5
867
+ },
868
+ {
869
+ "type": "text",
870
+ "text": "4.3 Experimental Setup",
871
+ "text_level": 1,
872
+ "bbox": [
873
+ 507,
874
+ 707,
875
+ 714,
876
+ 722
877
+ ],
878
+ "page_idx": 5
879
+ },
880
+ {
881
+ "type": "text",
882
+ "text": "We use pre-trained PENGI (Deshmukh et al., 2023) as the audio-language model for all methods. For all methods, except ZERO-SHOT, we conduct experiments for 50 epochs. Following the few-shot evaluation setup, we use 16 randomly selected samples per class from the training dataset. For inference, we utilize the entire test dataset. In the case of multi-fold datasets, we employ cross-validation and report the average scores. Training is performed using the Stochastic Gradient Descent (SGD) optimizer with a learning rate of 0.05. We use 'Accuracy' as the evaluation metric. For",
883
+ "bbox": [
884
+ 507,
885
+ 728,
886
+ 884,
887
+ 920
888
+ ],
889
+ "page_idx": 5
890
+ },
891
+ {
892
+ "type": "page_number",
893
+ "text": "18532",
894
+ "bbox": [
895
+ 477,
896
+ 927,
897
+ 524,
898
+ 940
899
+ ],
900
+ "page_idx": 5
901
+ },
902
+ {
903
+ "type": "table",
904
+ "img_path": "images/0def0860aebd00fbacdcbabde7344029a69fa082f0e2686286f5970a14733a34.jpg",
905
+ "table_caption": [],
906
+ "table_footnote": [],
907
+ "table_body": "<table><tr><td rowspan=\"2\">METHODS → DATASETS ↓</td><td colspan=\"2\">ZERO SHOT</td><td colspan=\"4\">COOP</td><td colspan=\"4\">COCOOP</td><td colspan=\"4\">PALM(ours)</td></tr><tr><td>-</td><td>SEED-0</td><td>SEED-1</td><td>SEED-2</td><td>AVG</td><td>SEED-0</td><td>SEED-1</td><td>SEED-2</td><td>AVG</td><td>SEED-0</td><td>SEED-1</td><td>SEED-2</td><td>AVG</td><td></td></tr><tr><td>Beijing-Opera</td><td>0.2881</td><td>0.9323</td><td>0.9660</td><td>0.9619</td><td>0.9534</td><td>0.9577</td><td>0.9830</td><td>0.9916</td><td>0.9774</td><td>0.9747</td><td>0.9066</td><td>0.9787</td><td>0.9533</td><td></td></tr><tr><td>CREMA-D</td><td>0.2310</td><td>0.3130</td><td>0.4197</td><td>0.2760</td><td>0.3362</td><td>0.2539</td><td>0.3358</td><td>0.3156</td><td>0.3018</td><td>0.4453</td><td>0.3580</td><td>0.2344</td><td>0.3459</td><td></td></tr><tr><td>ESC50-Actions</td><td>0.6525</td><td>0.9625</td><td>0.9400</td><td>0.9550</td><td>0.9525</td><td>0.9631</td><td>0.9620</td><td>0.9648</td><td>0.9634</td><td>0.9700</td><td>0.9625</td><td>0.9650</td><td>0.9658</td><td></td></tr><tr><td>ESC50</td><td>0.4965</td><td>0.9410</td><td>0.9390</td><td>0.9345</td><td>0.9382</td><td>0.9460</td><td>0.9370</td><td>0.9450</td><td>0.9427</td><td>0.9560</td><td>0.9600</td><td>0.9620</td><td>0.9593</td><td></td></tr><tr><td>GT-Music-Genre</td><td>0.3250</td><td>0.7250</td><td>0.6950</td><td>0.7350</td><td>0.7183</td><td>0.7500</td><td>0.7450</td><td>0.7600</td><td>0.7517</td><td>0.7900</td><td>0.7850</td><td>0.8250</td><td>0.8000</td><td></td></tr><tr><td>NS-Instruments</td><td>0.3291</td><td>0.5728</td><td>0.5562</td><td>0.6177</td><td>0.5822</td><td>0.5996</td><td>0.5740</td><td>0.6438</td><td>0.6058</td><td>0.6394</td><td>0.6108</td><td>0.6648</td><td>0.6383</td><td></td></tr><tr><td>RAVDESS</td><td>0.1222</td><td>0.3849</td><td>0.2688</td><td>0.3422</td><td>0.3320</td><td>0.3727</td><td>0.4399</td><td>0.3523</td><td>0.3883</td><td>0.4562</td><td>0.4603</td><td>0.4623</td><td>0.4596</td><td></td></tr><tr><td>SESA</td><td>0.7238</td><td>0.9143</td><td>0.8952</td><td>0.8762</td><td>0.8952</td><td>0.8381</td><td>0.8762</td><td>0.8952</td><td>0.8698</td><td>0.8857</td><td>0.9143</td><td>0.8857</td><td>0.8952</td><td></td></tr><tr><td>TUT2017</td><td>0.2435</td><td>0.6391</td><td>0.6667</td><td>0.6525</td><td>0.6528</td><td>0.7499</td><td>0.7215</td><td>0.7312</td><td>0.7342</td><td>0.7959</td><td>0.8047</td><td>0.7729</td><td>0.7912</td><td></td></tr><tr><td>UrbanSound8K</td><td>0.5349</td><td>0.7600</td><td>0.7378</td><td>0.7666</td><td>0.7548</td><td>0.7576</td><td>0.7784</td><td>0.7597</td><td>0.7652</td><td>0.8120</td><td>0.8037</td><td>0.8074</td><td>0.8077</td><td></td></tr><tr><td>VocalSound</td><td>0.4197</td><td>0.7162</td><td>0.7485</td><td>0.6642</td><td>0.7096</td><td>0.8081</td><td>0.7825</td><td>0.7463</td><td>0.7790</td><td>0.8101</td><td>0.8168</td><td>0.7964</td><td>0.8078</td><td></td></tr><tr><td>AVERAGE</td><td>0.3969</td><td>0.7146</td><td>0.7121</td><td>0.7074</td><td>0.7114</td><td>0.7276</td><td>0.7396</td><td>0.7369</td><td>0.7347</td><td>0.7759</td><td>0.7621</td><td>0.7595</td><td>0.7658</td><td></td></tr></table>",
908
+ "bbox": [
909
+ 115,
910
+ 80,
911
+ 885,
912
+ 256
913
+ ],
914
+ "page_idx": 6
915
+ },
916
+ {
917
+ "type": "table",
918
+ "img_path": "images/8e74104e14fc7031dc3d128a5ed2823580d6ab7fd832abf0abfdfc6b8728d8a1.jpg",
919
+ "table_caption": [
920
+ "Table 2: Comparison of PALM with Baselines The accuracy scores of the methods (ZERO SHOT (Deshmukh et al., 2023), COOP (Zhou et al., 2022b), COCOOP (Zhou et al., 2022a), and our proposed PALM) across 11 audio recognition datasets are presented, with experiments (excluding ZERO SHOT) run using three seeds. Scores for each seed and the average are reported, with bold indicating the best average score in each row. Compared to the baselines, our proposed method achieves favorable results, with an average improvement of $5.5\\%$ over COOP and $3.1\\%$ over COCOOP."
921
+ ],
922
+ "table_footnote": [],
923
+ "table_body": "<table><tr><td>METHOD</td><td>ZERO SHOT</td><td>COOP</td><td>COCOOP</td><td>PALM</td></tr><tr><td># of Parameters</td><td>0</td><td>8,192</td><td>98,880</td><td>12,393</td></tr></table>",
924
+ "bbox": [
925
+ 117,
926
+ 374,
927
+ 480,
928
+ 407
929
+ ],
930
+ "page_idx": 6
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "all methods, except ZERO-SHOT, we run experiments with three different seeds and report the scores for each seed along with the average score. For ZERO-SHOT, we use default text prompt template \"This is a recording of {CLASS NAME}\" For COOP (Zhou et al., 2022b) and COCOOP (Zhou et al., 2022a) baselines, we set the number context tokens to 16 and context is placed at the front of class names. PENGI model weights are kept \"frozen\" in all experiments. We use NVIDIA A100-SXM4-40GB GPU for all experiments and Pytorch version 1.11+conda11.3.",
935
+ "bbox": [
936
+ 112,
937
+ 470,
938
+ 489,
939
+ 663
940
+ ],
941
+ "page_idx": 6
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "4.4 Results",
946
+ "text_level": 1,
947
+ "bbox": [
948
+ 112,
949
+ 675,
950
+ 218,
951
+ 689
952
+ ],
953
+ "page_idx": 6
954
+ },
955
+ {
956
+ "type": "text",
957
+ "text": "Table 2 presents the performance comparison across 11 datasets using four different methods. Results indicate that PALM generally outperforms COOP and COCOOP, showing an average improvement of $5.5\\%$ over COOP and $3.1\\%$ over COCOOP. This suggests that PALM is a more effective approach in most cases. Moreover, it is important to note that PALM uses significantly fewer parameters— $87\\%$ fewer compared to COCOOP. This reduction in parameters can contribute to more efficient model training and deployment.",
958
+ "bbox": [
959
+ 112,
960
+ 696,
961
+ 489,
962
+ 872
963
+ ],
964
+ "page_idx": 6
965
+ },
966
+ {
967
+ "type": "text",
968
+ "text": "In the datasets, namely Beijing-Opera, ESC50 and ESC50-Actions, the improvement of PALM over COCOOP is marginal. However, for the",
969
+ "bbox": [
970
+ 112,
971
+ 873,
972
+ 487,
973
+ 921
974
+ ],
975
+ "page_idx": 6
976
+ },
977
+ {
978
+ "type": "table",
979
+ "img_path": "images/bbd903de4b6cc77d682ef94617ff633dcbfacba851cb02a47dee0aef7b4b90dd.jpg",
980
+ "table_caption": [
981
+ "Table 3: Number of Learnable Parameters in baselines and PALM."
982
+ ],
983
+ "table_footnote": [],
984
+ "table_body": "<table><tr><td>METHOD</td><td>AVERAGE ACCURACY</td></tr><tr><td>PALM + COOP</td><td>0.7236</td></tr><tr><td>PALM + COCOOP</td><td>0.7094</td></tr><tr><td>PALM + COCOOP†</td><td>0.7352</td></tr><tr><td>LINEAR PROBING</td><td>0.7299</td></tr><tr><td>PALM†</td><td>0.7160</td></tr><tr><td>PALM</td><td>0.7658</td></tr></table>",
985
+ "bbox": [
986
+ 547,
987
+ 374,
988
+ 842,
989
+ 460
990
+ ],
991
+ "page_idx": 6
992
+ },
993
+ {
994
+ "type": "text",
995
+ "text": "Table 4: PALM+Baselines Jointly optimizing input and output space of text encoder does not help attain better accuracy. COCOOP† refers to the method where feedback from audio features is incorporated into the text features, rather than being fed directly into the text encoder's input. PALM† denotes experiment in which text features are not used.",
996
+ "bbox": [
997
+ 507,
998
+ 469,
999
+ 882,
1000
+ 569
1001
+ ],
1002
+ "page_idx": 6
1003
+ },
1004
+ {
1005
+ "type": "text",
1006
+ "text": "subsequent datasets, such as CREMA-D, GTMusic-Genre, NS-Instruments, RAVDESS, SESA, TUT2017, UrbanSound8K and VocalSound , the performance improvements are more substantial. This indicates that while PALM provides consistent benefits, the degree of performance gain varies across datasets.",
1007
+ "bbox": [
1008
+ 507,
1009
+ 596,
1010
+ 884,
1011
+ 708
1012
+ ],
1013
+ "page_idx": 6
1014
+ },
1015
+ {
1016
+ "type": "text",
1017
+ "text": "4.5 Ablative Analysis",
1018
+ "text_level": 1,
1019
+ "bbox": [
1020
+ 507,
1021
+ 722,
1022
+ 692,
1023
+ 737
1024
+ ],
1025
+ "page_idx": 6
1026
+ },
1027
+ {
1028
+ "type": "text",
1029
+ "text": "For ablative analysis, we first show the importance of incorporating learnable context embeddings in text features. In Figure 4, we compare the performance of our method with and without the learnable context embeddings. The results clearly demonstrate that removing the learnable context embeddings leads to a significant drop in performance, underscoring their crucial role in enhancing the model's accuracy. This highlights the effectiveness of our approach in optimizing the feature space of the text encoder.",
1030
+ "bbox": [
1031
+ 505,
1032
+ 744,
1033
+ 884,
1034
+ 920
1035
+ ],
1036
+ "page_idx": 6
1037
+ },
1038
+ {
1039
+ "type": "page_number",
1040
+ "text": "18533",
1041
+ "bbox": [
1042
+ 477,
1043
+ 927,
1044
+ 524,
1045
+ 940
1046
+ ],
1047
+ "page_idx": 6
1048
+ },
1049
+ {
1050
+ "type": "image",
1051
+ "img_path": "images/a1664098e0b4b7cba2e7e1c017d96abcc58700916335718d3ae696d35b41b271.jpg",
1052
+ "image_caption": [
1053
+ "Figure 4: Comparison of $\\mathrm{PALM}^\\dagger$ and PALM. Here, $\\mathrm{PALM}^\\dagger$ refers to setting in which the Learnable Context embeddings (see Figure 3 for reference) have been removed from the feature space of the text encoder. The removal of context embeddings drastically degrades performance, highlighting their importance."
1054
+ ],
1055
+ "image_footnote": [],
1056
+ "bbox": [
1057
+ 126,
1058
+ 84,
1059
+ 872,
1060
+ 354
1061
+ ],
1062
+ "page_idx": 7
1063
+ },
1064
+ {
1065
+ "type": "image",
1066
+ "img_path": "images/30288c586805e148ca0ca0f158700a9343da4195a52c04ff452610981dded1fe.jpg",
1067
+ "image_caption": [],
1068
+ "image_footnote": [],
1069
+ "bbox": [
1070
+ 117,
1071
+ 418,
1072
+ 305,
1073
+ 495
1074
+ ],
1075
+ "page_idx": 7
1076
+ },
1077
+ {
1078
+ "type": "image",
1079
+ "img_path": "images/fd959722c1838b1bf267bcc1186ad1553e1c4c9e7d72dc674e6326d72adb6fff.jpg",
1080
+ "image_caption": [],
1081
+ "image_footnote": [],
1082
+ "bbox": [
1083
+ 307,
1084
+ 419,
1085
+ 497,
1086
+ 497
1087
+ ],
1088
+ "page_idx": 7
1089
+ },
1090
+ {
1091
+ "type": "image",
1092
+ "img_path": "images/e559f9ad7d21268d5f474308a481f270af219a561526eb8f1d5eabc31d2bb6d7.jpg",
1093
+ "image_caption": [],
1094
+ "image_footnote": [],
1095
+ "bbox": [
1096
+ 499,
1097
+ 419,
1098
+ 687,
1099
+ 497
1100
+ ],
1101
+ "page_idx": 7
1102
+ },
1103
+ {
1104
+ "type": "image",
1105
+ "img_path": "images/6e543610cc7f8604ed85d61f01d672fadc96819fe6218d959712a1ca4ee3222a.jpg",
1106
+ "image_caption": [],
1107
+ "image_footnote": [],
1108
+ "bbox": [
1109
+ 692,
1110
+ 419,
1111
+ 880,
1112
+ 497
1113
+ ],
1114
+ "page_idx": 7
1115
+ },
1116
+ {
1117
+ "type": "image",
1118
+ "img_path": "images/d354cf72881932955a41c5c319edb33907c9fa1e729be2d4a069684acba9858a.jpg",
1119
+ "image_caption": [
1120
+ "Figure 5: Impact of number-of-shots on PALM's performance A higher number of shots generally leads to increased audio classification accuracy using PALM."
1121
+ ],
1122
+ "image_footnote": [],
1123
+ "bbox": [
1124
+ 117,
1125
+ 499,
1126
+ 305,
1127
+ 577
1128
+ ],
1129
+ "page_idx": 7
1130
+ },
1131
+ {
1132
+ "type": "image",
1133
+ "img_path": "images/17a5ebc267aab035058fab26439f03de1207981fb11401ed68bdb151f2fa8033.jpg",
1134
+ "image_caption": [],
1135
+ "image_footnote": [],
1136
+ "bbox": [
1137
+ 310,
1138
+ 500,
1139
+ 497,
1140
+ 577
1141
+ ],
1142
+ "page_idx": 7
1143
+ },
1144
+ {
1145
+ "type": "image",
1146
+ "img_path": "images/04215b5ea45d742e4701c69745e1e30161f029a6975af2a2ea9c754aab753cdd.jpg",
1147
+ "image_caption": [],
1148
+ "image_footnote": [],
1149
+ "bbox": [
1150
+ 499,
1151
+ 500,
1152
+ 687,
1153
+ 577
1154
+ ],
1155
+ "page_idx": 7
1156
+ },
1157
+ {
1158
+ "type": "image",
1159
+ "img_path": "images/d8e70776fe46a82d48edd5b21cec1f890b629e85d052cd129bc84198fba17e72.jpg",
1160
+ "image_caption": [],
1161
+ "image_footnote": [],
1162
+ "bbox": [
1163
+ 692,
1164
+ 500,
1165
+ 880,
1166
+ 577
1167
+ ],
1168
+ "page_idx": 7
1169
+ },
1170
+ {
1171
+ "type": "text",
1172
+ "text": "We also demonstrate the effect of jointly optimizing the input and output spaces of the text encoder by applying PALM on top of COOP and COCOOP methods, as shown in the first two rows of Table 4. The results suggest that this joint optimization leads to a slight performance drop and is not beneficial. In the third row, we illustrate the impact of incorporating audio features into the text features, showing performance nearly identical to COCOOP, which integrates audio features into the text encoder's input space. Additionally, the fourth row presents the linear-probing (training a linear classifier on top of audio features) results, which underperform compared to PALM. Given that our approach is based on a few-shot setup, we also analyze the impact of the number of shots (training samples per class) on PALM's performance across eight datasets, as",
1173
+ "bbox": [
1174
+ 112,
1175
+ 644,
1176
+ 489,
1177
+ 917
1178
+ ],
1179
+ "page_idx": 7
1180
+ },
1181
+ {
1182
+ "type": "text",
1183
+ "text": "shown in Figure 5. As the number of shots in the training dataset increases, the performance of the model tends to improve. However, it should be noted that there is a trade-off between performance and computational load, as more shots also increase the computational requirements.",
1184
+ "bbox": [
1185
+ 507,
1186
+ 644,
1187
+ 882,
1188
+ 741
1189
+ ],
1190
+ "page_idx": 7
1191
+ },
1192
+ {
1193
+ "type": "text",
1194
+ "text": "5 Conclusion",
1195
+ "text_level": 1,
1196
+ "bbox": [
1197
+ 507,
1198
+ 751,
1199
+ 640,
1200
+ 766
1201
+ ],
1202
+ "page_idx": 7
1203
+ },
1204
+ {
1205
+ "type": "text",
1206
+ "text": "In this study, we investigate the application of prompt learning techniques, originally developed for vision-language models (VLMs), in the context of audio-language models (ALMs). We introduce PALM, a novel method that optimizes the feature space of the text encoder branch, enhancing training efficiency compared to existing methods that operate in the input space. Evaluated on 11 diverse audio recognition datasets, PALM consists",
1207
+ "bbox": [
1208
+ 507,
1209
+ 776,
1210
+ 884,
1211
+ 921
1212
+ ],
1213
+ "page_idx": 7
1214
+ },
1215
+ {
1216
+ "type": "page_number",
1217
+ "text": "18534",
1218
+ "bbox": [
1219
+ 477,
1220
+ 927,
1221
+ 524,
1222
+ 940
1223
+ ],
1224
+ "page_idx": 7
1225
+ },
1226
+ {
1227
+ "type": "text",
1228
+ "text": "tently matches or surpasses established baselines in a few-shot learning setup while reducing computational demands. PALM offers a promising direction for enhancing the performance of ALMs in zero-shot and few-shot learning scenarios, contributing to the broader field of audio recognition and paving the way for future research in multimodal tasks.",
1229
+ "bbox": [
1230
+ 112,
1231
+ 84,
1232
+ 489,
1233
+ 197
1234
+ ],
1235
+ "page_idx": 8
1236
+ },
1237
+ {
1238
+ "type": "text",
1239
+ "text": "Limitations",
1240
+ "text_level": 1,
1241
+ "bbox": [
1242
+ 112,
1243
+ 211,
1244
+ 220,
1245
+ 225
1246
+ ],
1247
+ "page_idx": 8
1248
+ },
1249
+ {
1250
+ "type": "text",
1251
+ "text": "Although we are the first, to the best of our knowledge, to integrate prompt learning techniques originally designed for Vision-Language Models (VLMs) into Audio-Language Models (ALMs) and propose a new method, several aspects still need to be addressed. One critical aspect is to analyze prompt learning performance for domain generalization. This involves evaluating how well the prompts adapt to new, unseen domains and tasks, ensuring robustness and effectiveness across various applications. The second aspect is to analyze prompt learning performance under different types of perturbations in audio data to check its resilience against various types of noise. This analysis is essential for understanding the robustness of the models in real-world scenarios where audio data can be contaminated with background noise, distortions, and other audio artifacts. Thirdly, while our study shows results on audio classification, it is yet to be seen how prompt learning helps in other audio tasks such as speech recognition, audio segmentation, and information retrieval. Investigating the effectiveness of prompt learning across a broader range of audio tasks will provide a more comprehensive understanding of its potential and limitations. Fourthly, our few-shot method is specifically designed for single-label audio classification. Exploring a few-shot setup for multi-label audio classification and adapting PALM for this scenario remains an open question.",
1252
+ "bbox": [
1253
+ 112,
1254
+ 237,
1255
+ 490,
1256
+ 722
1257
+ ],
1258
+ "page_idx": 8
1259
+ },
1260
+ {
1261
+ "type": "text",
1262
+ "text": "References",
1263
+ "text_level": 1,
1264
+ "bbox": [
1265
+ 114,
1266
+ 751,
1267
+ 213,
1268
+ 766
1269
+ ],
1270
+ "page_idx": 8
1271
+ },
1272
+ {
1273
+ "type": "text",
1274
+ "text": "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 L Menick, Sebastian Borgeaud, Andy Brock, Aida Nematzadeh, Sahand Sharifzadeh, Mikolaj Bińkowski, Ricardo Barreira, Oriol Vinyals, Andrew Zisserman, and Karen Simonyan. 2022. Flamingo: a visual language model for few-shot learning. In Advances in Neural Infor",
1275
+ "bbox": [
1276
+ 115,
1277
+ 776,
1278
+ 489,
1279
+ 921
1280
+ ],
1281
+ "page_idx": 8
1282
+ },
1283
+ {
1284
+ "type": "text",
1285
+ "text": "mation Processing Systems, volume 35, pages 23716- 23736. Curran Associates, Inc.",
1286
+ "bbox": [
1287
+ 527,
1288
+ 85,
1289
+ 884,
1290
+ 112
1291
+ ],
1292
+ "page_idx": 8
1293
+ },
1294
+ {
1295
+ "type": "text",
1296
+ "text": "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. 2020. Language models are few-shot learners. In Advances in Neural Information Processing Systems, volume 33, pages 1877-1901. Curran Associates, Inc.",
1297
+ "bbox": [
1298
+ 510,
1299
+ 124,
1300
+ 885,
1301
+ 307
1302
+ ],
1303
+ "page_idx": 8
1304
+ },
1305
+ {
1306
+ "type": "text",
1307
+ "text": "Houwei Cao, David G Cooper, Michael K Keutmann, Ruben C Gur, Ani Nenkova, and Ragini Verma. 2014. Crema-d: Crowd-sourced emotional multimodal actors dataset. IEEE transactions on affective computing, 5(4):377-390.",
1308
+ "bbox": [
1309
+ 509,
1310
+ 319,
1311
+ 885,
1312
+ 387
1313
+ ],
1314
+ "page_idx": 8
1315
+ },
1316
+ {
1317
+ "type": "text",
1318
+ "text": "Nilaksh Das, Saket Dingliwal, Srikanth Ronanki, Rohit Paturi, David Huang, Prashant Mathur, Jie Yuan, Dhanush Bekal, Xing Niu, Sai Muralidhar Jayanthi, et al. 2024. Speechverse: A large-scale generalizable audio language model. arXiv preprint arXiv:2405.08295.",
1319
+ "bbox": [
1320
+ 509,
1321
+ 398,
1322
+ 882,
1323
+ 476
1324
+ ],
1325
+ "page_idx": 8
1326
+ },
1327
+ {
1328
+ "type": "text",
1329
+ "text": "Soham Deshmukh, Benjamin Elizalde, Rita Singh, and Huaming Wang. 2023. Pengi: An audio language model for audio tasks. Advances in Neural Information Processing Systems, 36:18090-18108.",
1330
+ "bbox": [
1331
+ 509,
1332
+ 489,
1333
+ 882,
1334
+ 542
1335
+ ],
1336
+ "page_idx": 8
1337
+ },
1338
+ {
1339
+ "type": "text",
1340
+ "text": "Soham Deshmukh, Rita Singh, and Bhiksha Raj. 2024. Domain adaptation for contrastive audio-language models. arXiv preprint arXiv:2402.09585.",
1341
+ "bbox": [
1342
+ 509,
1343
+ 554,
1344
+ 882,
1345
+ 594
1346
+ ],
1347
+ "page_idx": 8
1348
+ },
1349
+ {
1350
+ "type": "text",
1351
+ "text": "Benjamin Elizalde, Soham Deshmukh, Mahmoud Al Ismail, and Huaming Wang. 2023. Clap learning audio concepts from natural language supervision. In ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 1-5. IEEE.",
1352
+ "bbox": [
1353
+ 509,
1354
+ 606,
1355
+ 884,
1356
+ 686
1357
+ ],
1358
+ "page_idx": 8
1359
+ },
1360
+ {
1361
+ "type": "text",
1362
+ "text": "Jesse Engel, Cinjon Resnick, Adam Roberts, Sander Dieleman, Douglas Eck, Karen Simonyan, and Mohammad Norouzi. 2017. Neural audio synthesis of musical notes with wavenet autoencoders.",
1363
+ "bbox": [
1364
+ 509,
1365
+ 697,
1366
+ 882,
1367
+ 750
1368
+ ],
1369
+ "page_idx": 8
1370
+ },
1371
+ {
1372
+ "type": "text",
1373
+ "text": "Yassir Fathullah, Chunyang Wu, Egor Lakomkin, Jun-teng Jia, Yuan Shangguan, Ke Li, Jinxi Guo, Wenhan Xiong, Jay Mahadeokar, Ozlem Kalinli, et al. 2024. Prompting large language models with speech recognition abilities. In ICASSP 2024-2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 13351-13355. IEEE.",
1374
+ "bbox": [
1375
+ 510,
1376
+ 762,
1377
+ 884,
1378
+ 854
1379
+ ],
1380
+ "page_idx": 8
1381
+ },
1382
+ {
1383
+ "type": "text",
1384
+ "text": "Yuan Gong, Yu-An Chung, and James Glass. 2021. Psla: Improving audio tagging with pretraining, sampling, labeling, and aggregation. IEEE/ACM Transactions on Audio, Speech, and Language Processing.",
1385
+ "bbox": [
1386
+ 509,
1387
+ 866,
1388
+ 882,
1389
+ 921
1390
+ ],
1391
+ "page_idx": 8
1392
+ },
1393
+ {
1394
+ "type": "page_number",
1395
+ "text": "18535",
1396
+ "bbox": [
1397
+ 477,
1398
+ 927,
1399
+ 524,
1400
+ 940
1401
+ ],
1402
+ "page_idx": 8
1403
+ },
1404
+ {
1405
+ "type": "list",
1406
+ "sub_type": "ref_text",
1407
+ "list_items": [
1408
+ "Jindong Gu, Zhen Han, Shuo Chen, Ahmad Beirami, Bailan He, Gengyuan Zhang, Ruotong Liao, Yao Qin, Volker Tresp, and Philip H. S. Torr. 2023. A systematic survey of prompt engineering on vision-language foundation models. ArXiv, abs/2307.12980.",
1409
+ "Toni Heittola, Annamaria Mesaros, and Tuomas Virtanen. 2017. TUT Acoustic Scenes 2017, Development dataset. Technical report, Department of Signal Processing, Tampere University of Technology.",
1410
+ "Zhifeng Kong, Arushi Goel, Rohan Badlani, Wei Ping, Rafael Valle, and Bryan Catanzaro. 2024. Audio flamingo: A novel audio language model with few-shot learning and dialogue abilities. arXiv preprint arXiv:2402.01831.",
1411
+ "Yiming Li, Xiangdong Wang, and Hong Liu. 2024. Audio-free prompt tuning for language-audio models. In ICASSP 2024-2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 491-495. IEEE.",
1412
+ "Steven R Livingstone and Frank A Russo. 2018. The ryerson audio-visual database of emotional speech and song (ravdess): A dynamic, multimodal set of facial and vocal expressions in north american english. PloS one, 13(5):e0196391.",
1413
+ "Fabio Petroni, Tim Rocktäschel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, Alexander H Miller, and Sebastian Riedel. 2019. Language models as knowledge bases? arXiv preprint arXiv:1909.01066.",
1414
+ "Karol J. Piczak. ESC: Dataset for Environmental Sound Classification. In Proceedings of the 23rd Annual ACM Conference on Multimedia, pages 1015-1018. ACM Press.",
1415
+ "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 International conference on machine learning, pages 8748-8763. PMLR.",
1416
+ "Justin Salamon, Christopher Jacoby, and Juan Pablo Bello. 2014. A dataset and taxonomy for urban sound research. In Proceedings of the 22nd ACM international conference on Multimedia, pages 1041-1044.",
1417
+ "Tito Spadini. 2019. Sound events for surveillance applications.",
1418
+ "Bob L Sturm. 2012. An analysis of the gtzan music genre dataset. In Proceedings of the second international ACM workshop on Music information retrieval with user-centered and multimodal strategies, pages 7-12.",
1419
+ "Mi Tian, Ajay Srinivasamurthy, Mark Sandler, and Xavier Serra. 2014. A study of instrument-wise onset detection in beijing opera percussion ensembles. In 2014 iiem international conference on acoustics, speech and signal processing (icassp), pages 2159-2163. IEEE."
1420
+ ],
1421
+ "bbox": [
1422
+ 115,
1423
+ 85,
1424
+ 485,
1425
+ 917
1426
+ ],
1427
+ "page_idx": 9
1428
+ },
1429
+ {
1430
+ "type": "list",
1431
+ "sub_type": "ref_text",
1432
+ "list_items": [
1433
+ "Jingyi Zhang, Jiaxing Huang, Sheng Jin, and Shijian Lu. 2024. Vision-language models for vision tasks: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence.",
1434
+ "Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. 2022a. Conditional prompt learning for vision-language models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 16816-16825.",
1435
+ "Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. 2022b. Learning to prompt for vision-language models. International Journal of Computer Vision (IJCV)."
1436
+ ],
1437
+ "bbox": [
1438
+ 510,
1439
+ 85,
1440
+ 880,
1441
+ 275
1442
+ ],
1443
+ "page_idx": 9
1444
+ },
1445
+ {
1446
+ "type": "page_number",
1447
+ "text": "18536",
1448
+ "bbox": [
1449
+ 477,
1450
+ 928,
1451
+ 524,
1452
+ 940
1453
+ ],
1454
+ "page_idx": 9
1455
+ }
1456
+ ]
2024/PALM_ Few-Shot Prompt Learning for Audio Language Models/0b7be31a-449c-4312-b744-95f7039ae91e_model.json ADDED
@@ -0,0 +1,1639 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ [
3
+ {
4
+ "type": "title",
5
+ "bbox": [
6
+ 0.167,
7
+ 0.09,
8
+ 0.833,
9
+ 0.112
10
+ ],
11
+ "angle": 0,
12
+ "content": "PALM: Few-Shot Prompt Learning for Audio Language Models"
13
+ },
14
+ {
15
+ "type": "text",
16
+ "bbox": [
17
+ 0.178,
18
+ 0.145,
19
+ 0.82,
20
+ 0.162
21
+ ],
22
+ "angle": 0,
23
+ "content": "Asif Hanif, Maha Tufail Agro, Mohammad Areeb Qazi, Hanan Aldarmaki"
24
+ },
25
+ {
26
+ "type": "text",
27
+ "bbox": [
28
+ 0.218,
29
+ 0.163,
30
+ 0.78,
31
+ 0.179
32
+ ],
33
+ "angle": 0,
34
+ "content": "Mohamed Bin Zayed University of Artificial Intelligence (MBZUAI)"
35
+ },
36
+ {
37
+ "type": "text",
38
+ "bbox": [
39
+ 0.146,
40
+ 0.18,
41
+ 0.852,
42
+ 0.195
43
+ ],
44
+ "angle": 0,
45
+ "content": "{asif.hanif, maha.tufail, mohammad.qazi, hanan.aldarmaki}@mbzuai.ac.ae"
46
+ },
47
+ {
48
+ "type": "title",
49
+ "bbox": [
50
+ 0.261,
51
+ 0.261,
52
+ 0.341,
53
+ 0.277
54
+ ],
55
+ "angle": 0,
56
+ "content": "Abstract"
57
+ },
58
+ {
59
+ "type": "text",
60
+ "bbox": [
61
+ 0.142,
62
+ 0.29,
63
+ 0.461,
64
+ 0.631
65
+ ],
66
+ "angle": 0,
67
+ "content": "Audio-Language Models (ALMs) have recently achieved success in zero-shot audio recognition tasks, which match features of audio waveforms with class-specific text prompt features, inspired by advancements in Vision-Language Models (VLMs). Given the sensitivity of zero-shot performance to the choice of hand-crafted text prompts, many prompt learning techniques have been developed for VLMs. We explore the efficacy of these approaches in ALMs and propose a novel method, Prompt Learning in Audio Language Models (PALM), which optimizes the feature space of the ALM text encoder. Unlike existing methods that work in the input space, our approach results in greater training efficiency. We demonstrate the effectiveness of our approach on 11 audio recognition datasets, encompassing a variety of speech-processing tasks, and compare the results with three baselines in a few-shot learning setup. Our results show that PALM performs on a par with or outperforms the baselines while being more computationally efficient. Our code is publicly available at \\(\\mathrm{Gib}\\mathbf{u}\\mathbf{b}^{\\dagger}\\)"
68
+ },
69
+ {
70
+ "type": "title",
71
+ "bbox": [
72
+ 0.115,
73
+ 0.646,
74
+ 0.262,
75
+ 0.661
76
+ ],
77
+ "angle": 0,
78
+ "content": "1 Introduction"
79
+ },
80
+ {
81
+ "type": "text",
82
+ "bbox": [
83
+ 0.113,
84
+ 0.672,
85
+ 0.49,
86
+ 0.897
87
+ ],
88
+ "angle": 0,
89
+ "content": "Inspired by the success of Vision-Language Models (VLMs) (Zhang et al., 2024), Audio-Language Models (ALMs) have recently emerged, achieving state-of-the-art performance on various zero-shot audio recognition tasks (Elizalde et al., 2023; Deshmukh et al., 2023; Kong et al., 2024; Das et al., 2024). In zero-shot audio recognition, features of the audio waveform are matched with features of text prompts representing each class, and the highest matching class is assigned to the audio waveform. Zero-shot audio recognition offers some advantages by eliminating the need for extensive labeled datasets and allowing for the recognition of new classes without additional"
90
+ },
91
+ {
92
+ "type": "image",
93
+ "bbox": [
94
+ 0.52,
95
+ 0.291,
96
+ 0.862,
97
+ 0.468
98
+ ],
99
+ "angle": 0,
100
+ "content": null
101
+ },
102
+ {
103
+ "type": "image_caption",
104
+ "bbox": [
105
+ 0.508,
106
+ 0.486,
107
+ 0.886,
108
+ 0.572
109
+ ],
110
+ "angle": 0,
111
+ "content": "Figure 1: Comparison of our proposed approach, PALM, with three baselines: ZERO-SHOT (Deshmukh et al., 2023), COOP (Zhou et al., 2022b) and COCOOP (Zhou et al., 2022a). Bar plots show classification accuracy averaged across 11 audio datasets encompassing various speech-processing tasks."
112
+ },
113
+ {
114
+ "type": "text",
115
+ "bbox": [
116
+ 0.508,
117
+ 0.599,
118
+ 0.884,
119
+ 0.647
120
+ ],
121
+ "angle": 0,
122
+ "content": "training. This approach reduces training times and data annotation costs, leading to substantial savings in computational resources."
123
+ },
124
+ {
125
+ "type": "text",
126
+ "bbox": [
127
+ 0.508,
128
+ 0.664,
129
+ 0.885,
130
+ 0.841
131
+ ],
132
+ "angle": 0,
133
+ "content": "The choice of text prompt is crucial for pre-trained vision-language and audio-language models, but it becomes a drawback for zero-shot recognition due to the requirement of hand-crafted prompts. This manual prompt-engineering can result in performance variations (Zhou et al., 2022b,a). We confirm this observation, previously noted in VLMs, within the context of ALMs (refer to Figure 2). To automate the learning of text prompts, various approaches have been introduced for prompt learning in VLMs (Gu et al., 2023)."
134
+ },
135
+ {
136
+ "type": "text",
137
+ "bbox": [
138
+ 0.508,
139
+ 0.858,
140
+ 0.884,
141
+ 0.922
142
+ ],
143
+ "angle": 0,
144
+ "content": "The domain of prompt learning in ALMs remains under-explored, lacking comprehensive studies to evaluate the effectiveness of prompt learning techniques within this context. To bridge"
145
+ },
146
+ {
147
+ "type": "page_footnote",
148
+ "bbox": [
149
+ 0.137,
150
+ 0.907,
151
+ 0.404,
152
+ 0.921
153
+ ],
154
+ "angle": 0,
155
+ "content": "\\(\\dagger\\)https://asif-hanif.github.io/palm/"
156
+ },
157
+ {
158
+ "type": "page_number",
159
+ "bbox": [
160
+ 0.477,
161
+ 0.928,
162
+ 0.526,
163
+ 0.941
164
+ ],
165
+ "angle": 0,
166
+ "content": "18527"
167
+ },
168
+ {
169
+ "type": "footer",
170
+ "bbox": [
171
+ 0.153,
172
+ 0.946,
173
+ 0.845,
174
+ 0.973
175
+ ],
176
+ "angle": 0,
177
+ "content": "Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 18527-18536 November 12-16, 2024 ©2024 Association for Computational Linguistics"
178
+ }
179
+ ],
180
+ [
181
+ {
182
+ "type": "image",
183
+ "bbox": [
184
+ 0.167,
185
+ 0.092,
186
+ 0.824,
187
+ 0.226
188
+ ],
189
+ "angle": 0,
190
+ "content": null
191
+ },
192
+ {
193
+ "type": "image_caption",
194
+ "bbox": [
195
+ 0.113,
196
+ 0.242,
197
+ 0.885,
198
+ 0.3
199
+ ],
200
+ "angle": 0,
201
+ "content": "Figure 2: Impact of Hand-crafted Prompts on ZERO-SHOT Performance Zero-shot accuracy across four audio recognition datasets (ESC50 (Piczak), GT-Music-Genre (Sturm, 2012), SESA (Spadini, 2019), and VocalSound (Gong et al., 2021)) is evaluated with eight different text prompts using PENGI (Deshmukh et al., 2023) model. The accuracy varies with changes in the handcrafted prompts."
202
+ },
203
+ {
204
+ "type": "text",
205
+ "bbox": [
206
+ 0.117,
207
+ 0.325,
208
+ 0.49,
209
+ 0.662
210
+ ],
211
+ "angle": 0,
212
+ "content": "this research gap, we adapt prompt learning techniques developed for VLMs and apply them to the domain of ALMs. Our results demonstrate that these adaptations improve audio classification performance (see Table 2). Traditional techniques optimize the input space (i.e. token embeddings) of the text encoder by introducing a learnable context. However, this approach can increase training costs as loss gradients must flow through the text encoder branch. To address this, we introduce a novel method, PALM: Prompt Learning in Audio Language Models, which optimizes the feature space of the text encoder rather than its input space. This makes the training computationally efficient since loss gradients do not need to flow through the text encoder. To assess the effectiveness of our approach, we show results on 11 audio recognition datasets, encompassing various speech processing tasks. Our method either matches or surpasses other approaches while being less computationally demanding (see Table 2 and Table 3)."
213
+ },
214
+ {
215
+ "type": "title",
216
+ "bbox": [
217
+ 0.115,
218
+ 0.679,
219
+ 0.482,
220
+ 0.695
221
+ ],
222
+ "angle": 0,
223
+ "content": "Contributions: Our contributions are as follows:"
224
+ },
225
+ {
226
+ "type": "text",
227
+ "bbox": [
228
+ 0.133,
229
+ 0.703,
230
+ 0.49,
231
+ 0.784
232
+ ],
233
+ "angle": 0,
234
+ "content": "- Inspired by the success of few-shot prompt learning in vision-language models (VLMs), we show that adapting these techniques to audio-language models (ALMs) significantly enhances their performance."
235
+ },
236
+ {
237
+ "type": "text",
238
+ "bbox": [
239
+ 0.133,
240
+ 0.793,
241
+ 0.492,
242
+ 0.922
243
+ ],
244
+ "angle": 0,
245
+ "content": "- We introduce PALM, a novel few-shot prompt learning method for ALMs that optimizes the text encoder's feature space. We demonstrate our approach's effectiveness on 11 audio recognition datasets, comparing it to three baselines in a few-shot learning setup. Our method matches or outperforms others while being less computationally demanding, estab"
246
+ },
247
+ {
248
+ "type": "list",
249
+ "bbox": [
250
+ 0.133,
251
+ 0.703,
252
+ 0.492,
253
+ 0.922
254
+ ],
255
+ "angle": 0,
256
+ "content": null
257
+ },
258
+ {
259
+ "type": "text",
260
+ "bbox": [
261
+ 0.545,
262
+ 0.325,
263
+ 0.885,
264
+ 0.358
265
+ ],
266
+ "angle": 0,
267
+ "content": "lishing a benchmark for prompt learning in ALMs and paving the way for future research."
268
+ },
269
+ {
270
+ "type": "title",
271
+ "bbox": [
272
+ 0.509,
273
+ 0.372,
274
+ 0.667,
275
+ 0.387
276
+ ],
277
+ "angle": 0,
278
+ "content": "2 Related Work"
279
+ },
280
+ {
281
+ "type": "text",
282
+ "bbox": [
283
+ 0.508,
284
+ 0.4,
285
+ 0.886,
286
+ 0.513
287
+ ],
288
+ "angle": 0,
289
+ "content": "Prompt engineering involves adding task-specific hints, called prompts, to a large pre-trained model to adapt it to new tasks. Recently, significant advancements have been made in prompt learning, particularly in the fields of language and vision. Below, we outline the recent developments in language, vision, and audio domains."
290
+ },
291
+ {
292
+ "type": "title",
293
+ "bbox": [
294
+ 0.509,
295
+ 0.528,
296
+ 0.816,
297
+ 0.544
298
+ ],
299
+ "angle": 0,
300
+ "content": "2.1 Audio Language Models (ALMs)"
301
+ },
302
+ {
303
+ "type": "text",
304
+ "bbox": [
305
+ 0.508,
306
+ 0.55,
307
+ 0.886,
308
+ 0.743
309
+ ],
310
+ "angle": 0,
311
+ "content": "Taking inspiration from multimodal models like CLIP (Radford et al., 2021) in the vision domain, Contrastive Language-Audio Pretraining (CLAP) (Elizalde et al., 2023) stands out as the first-of-its-kind audio language model. It connects natural language and audio through dual encoders and contrastive learning, aligning audio and text descriptions in a shared multimodal space. Furthermore, CLAP introduces zero-shot prediction capabilities, removing the necessity for training with predefined class labels and allowing flexible class prediction during inference."
312
+ },
313
+ {
314
+ "type": "text",
315
+ "bbox": [
316
+ 0.508,
317
+ 0.745,
318
+ 0.886,
319
+ 0.922
320
+ ],
321
+ "angle": 0,
322
+ "content": "PENGI (Deshmukh et al., 2023), another audio language Model, utilizes transfer learning by treating all audio tasks as text-generation tasks. It takes audio recordings and text inputs, generating freeform text as output. The input audio is represented by continuous embeddings from an audio encoder, while the corresponding text input undergoes the same process with a text encoder. These sequences are combined as a prefix to prompt a pre-trained frozen language model. PENGI's unified architecture supports both open-ended and close-ended"
323
+ },
324
+ {
325
+ "type": "page_number",
326
+ "bbox": [
327
+ 0.478,
328
+ 0.928,
329
+ 0.526,
330
+ 0.941
331
+ ],
332
+ "angle": 0,
333
+ "content": "18528"
334
+ }
335
+ ],
336
+ [
337
+ {
338
+ "type": "text",
339
+ "bbox": [
340
+ 0.113,
341
+ 0.085,
342
+ 0.486,
343
+ 0.116
344
+ ],
345
+ "angle": 0,
346
+ "content": "tasks without requiring additional fine-tuning or task-specific extensions."
347
+ },
348
+ {
349
+ "type": "text",
350
+ "bbox": [
351
+ 0.113,
352
+ 0.118,
353
+ 0.488,
354
+ 0.277
355
+ ],
356
+ "angle": 0,
357
+ "content": "Audio Flamingo, introduced by Kong et al. (2024), is a multimodal-to-text generative model inspired by Flamingo (Alayrac et al., 2022), demonstrating advanced audio understanding capabilities, adaptability to unseen tasks through in-context learning and retrieval, and multi-turn dialogue abilities. The model features an audio feature extractor with a sliding window and uses cross-attention to fuse audio inputs into the language model, ensuring computational efficiency."
358
+ },
359
+ {
360
+ "type": "title",
361
+ "bbox": [
362
+ 0.114,
363
+ 0.29,
364
+ 0.462,
365
+ 0.305
366
+ ],
367
+ "angle": 0,
368
+ "content": "2.2 Prompt Learning in Language Models"
369
+ },
370
+ {
371
+ "type": "text",
372
+ "bbox": [
373
+ 0.113,
374
+ 0.31,
375
+ 0.49,
376
+ 0.616
377
+ ],
378
+ "angle": 0,
379
+ "content": "Extensive research has been conducted on prompt learning techniques in natural language processing. Pioneering work by (Brown et al., 2020) focused on optimization strategies for zero-shot and few-shot learning scenarios, demonstrating that prompts can enable generative models to perform well across various tasks without extensive task-specific training. Their method leverages the model's pre-trained knowledge and prompt-guided interactions to achieve strong performance on new tasks. They also introduced GPT-3, which transformed the field of prompt learning in natural language processing. Petroni et al. (2019) integrated contextual cues and constraints within prompts to guide model behavior, embedding task-specific information to enhance output precision and relevance. Their technique improves interpretability and task-oriented performance by providing contextual guidance during inference."
380
+ },
381
+ {
382
+ "type": "title",
383
+ "bbox": [
384
+ 0.114,
385
+ 0.628,
386
+ 0.456,
387
+ 0.657
388
+ ],
389
+ "angle": 0,
390
+ "content": "2.3 Prompt Learning in Vision-Language Models"
391
+ },
392
+ {
393
+ "type": "text",
394
+ "bbox": [
395
+ 0.113,
396
+ 0.665,
397
+ 0.49,
398
+ 0.922
399
+ ],
400
+ "angle": 0,
401
+ "content": "Inspired by advancements in prompt-based work in language models, several studies have been conducted to adapt these methods to VLMs (Gu et al., 2023). Some focus exclusively on the language component, such as COOP (Context Optimization) (Zhou et al., 2022a). In contrast, others integrate insights from language and visual components, as seen in COCOOP (Conditional Context Optimization) (Zhou et al., 2022a). COOP enhances CLIP model's few-shot transfer learning capability by optimizing a continuous set of prompt vectors within the language branch. However, COCOOP addresses the limitations of COOP, particularly its suboptimal performance on novel classes, by explicitly conditioning prompts on individual image instances, thereby enhancing generalization."
402
+ },
403
+ {
404
+ "type": "title",
405
+ "bbox": [
406
+ 0.509,
407
+ 0.085,
408
+ 0.848,
409
+ 0.114
410
+ ],
411
+ "angle": 0,
412
+ "content": "2.4 Prompt Learning in Audio-Language Models"
413
+ },
414
+ {
415
+ "type": "text",
416
+ "bbox": [
417
+ 0.508,
418
+ 0.122,
419
+ 0.885,
420
+ 0.395
421
+ ],
422
+ "angle": 0,
423
+ "content": "Prompt learning with audio-language models is relatively understudied. Previous work has explored enhancing language models with speech recognition by conditioning them on variable-length audio embeddings using a conformer-based audio encoder (Fathullah et al., 2024). Deshmukh et al. (2024) propose a test-time domain adaptation method for Contrastive ALMs, using unlabeled audio to adjust the model to new domains via a domain vector, consistent predictions, and self-entropy fine-tuning, improving on traditional Test-Time Training. Li et al. (2024) introduce PT-Text, an audio-free prompt tuning scheme that optimizes prompt tokens from text, regularizing the model to avoid overfitting by training with captions and using a multi-grained strategy to enhance performance."
424
+ },
425
+ {
426
+ "type": "title",
427
+ "bbox": [
428
+ 0.509,
429
+ 0.408,
430
+ 0.613,
431
+ 0.423
432
+ ],
433
+ "angle": 0,
434
+ "content": "3 Method"
435
+ },
436
+ {
437
+ "type": "title",
438
+ "bbox": [
439
+ 0.509,
440
+ 0.434,
441
+ 0.802,
442
+ 0.45
443
+ ],
444
+ "angle": 0,
445
+ "content": "3.1 Audio-Language Model (ALM)"
446
+ },
447
+ {
448
+ "type": "text",
449
+ "bbox": [
450
+ 0.508,
451
+ 0.455,
452
+ 0.883,
453
+ 0.551
454
+ ],
455
+ "angle": 0,
456
+ "content": "We demonstrate the efficiency of prompt learning in enhancing zero-shot performance using a state-of-the-art audio-language model PENGI (Deshmukh et al., 2023). Our approach is applicable to all audio-language models that have aligned audio and text encoders."
457
+ },
458
+ {
459
+ "type": "text",
460
+ "bbox": [
461
+ 0.508,
462
+ 0.568,
463
+ 0.884,
464
+ 0.809
465
+ ],
466
+ "angle": 0,
467
+ "content": "PENGI takes an audio recording/waveform and a text prompt as input and generates free-form text as output. It consists of three branches. The first branch is an audio encoder that maps the audio waveform to an embedding space. The second branch is a text encoder that transforms the input text into the same embedding space. These embeddings are then concatenated to form an input prefix for the third branch, a causal language model that generates tokens autoregressively, conditioned on both the audio and text inputs. PENGI can be used for various audio-conditioned tasks, such as text completion, classification, audio caption generation, and question-answering (Deshmukh et al., 2023)."
468
+ },
469
+ {
470
+ "type": "text",
471
+ "bbox": [
472
+ 0.508,
473
+ 0.826,
474
+ 0.885,
475
+ 0.921
476
+ ],
477
+ "angle": 0,
478
+ "content": "Zero-Shot Inference Although PENGI is multimodal-to-text generation model, however, we use its audio and text encoder branches for zero-shot audio recognition. This is accomplished by comparing the embedding of the audio waveform (extracted from the audio encoder) with the"
479
+ },
480
+ {
481
+ "type": "page_number",
482
+ "bbox": [
483
+ 0.478,
484
+ 0.928,
485
+ 0.526,
486
+ 0.941
487
+ ],
488
+ "angle": 0,
489
+ "content": "18529"
490
+ }
491
+ ],
492
+ [
493
+ {
494
+ "type": "text",
495
+ "bbox": [
496
+ 0.113,
497
+ 0.085,
498
+ 0.488,
499
+ 0.198
500
+ ],
501
+ "angle": 0,
502
+ "content": "embeddings of text prompts for different classes (extracted from the text encoder). An overview of zero-shot inference is given in Figure 3(a). It should be noted that the zero-shot setup used by (Deshmukh et al., 2023) differs from ours, as they employ the model's free-form text output for zero-shot inference."
503
+ },
504
+ {
505
+ "type": "text",
506
+ "bbox": [
507
+ 0.113,
508
+ 0.213,
509
+ 0.487,
510
+ 0.375
511
+ ],
512
+ "angle": 0,
513
+ "content": "Formally, we denote the pre-trained ALM as \\( f_{\\theta} = \\{f_{A},f_{T}\\} \\), whereas \\( f_{A} \\) and \\( f_{T} \\) are audio and text encoders, respectively and \\( \\theta \\) represents the combined weights of both encoders. For classification in zero-shot scenario, an audio waveform \\( \\mathbf{x} \\) is first passed to the audio encoder \\( f_{A} \\) to produce a \\( d \\)-dimensional feature vector \\( f_{A}(\\mathbf{x}) \\in \\mathbb{R}^{d} \\). In parallel, text prompts representing each class label \\( y_{i} \\in \\{y_{1},y_{2}\\dots ,y_{c}\\} \\) are encapsulated within class-specific handcrafted text templates, such as"
514
+ },
515
+ {
516
+ "type": "equation",
517
+ "bbox": [
518
+ 0.121,
519
+ 0.386,
520
+ 0.48,
521
+ 0.403
522
+ ],
523
+ "angle": 0,
524
+ "content": "\\[\nt _ {i} = \\text {\" A n a u d i o r e c o r d i n g o f \\{C L A S S y _ {i} \\} \",}\n\\]"
525
+ },
526
+ {
527
+ "type": "text",
528
+ "bbox": [
529
+ 0.113,
530
+ 0.413,
531
+ 0.489,
532
+ 0.573
533
+ ],
534
+ "angle": 0,
535
+ "content": "where \\(c\\) is the total number of classes. Each text prompt, represented as \\(t_i\\), is processed through the text encoder \\(f_T\\), resulting in a feature vector \\(f_T(t_i) \\in \\mathbb{R}^d\\). The relationship between the audio waveform \\(\\mathbf{x}\\) and a class-specific text prompt \\(t_i\\) is quantified by computing the cosine similarity between their corresponding feature vectors, denoted as \\(\\mathrm{sim}(f_A(\\mathbf{x}), f_T(t_i))\\). The class with the highest similarity score is then assigned as the label \\(\\hat{y}\\) for the audio waveform, i.e."
536
+ },
537
+ {
538
+ "type": "equation",
539
+ "bbox": [
540
+ 0.157,
541
+ 0.584,
542
+ 0.488,
543
+ 0.613
544
+ ],
545
+ "angle": 0,
546
+ "content": "\\[\n\\hat {y} = \\underset {i \\in \\{1, 2, \\dots , c \\}} {\\operatorname {a r g m a x}} \\quad \\operatorname {s i m} \\left(f _ {A} (\\mathbf {x}), f _ {T} (t _ {i})\\right). \\tag {1}\n\\]"
547
+ },
548
+ {
549
+ "type": "title",
550
+ "bbox": [
551
+ 0.114,
552
+ 0.622,
553
+ 0.429,
554
+ 0.637
555
+ ],
556
+ "angle": 0,
557
+ "content": "3.2 PALM: Prompt Learning in ALM"
558
+ },
559
+ {
560
+ "type": "text",
561
+ "bbox": [
562
+ 0.113,
563
+ 0.643,
564
+ 0.489,
565
+ 0.835
566
+ ],
567
+ "angle": 0,
568
+ "content": "In our proposed method, we do not use handcrafted prompts; instead, we simply use class names as the input to the text encoder i.e. \\( t_i = \\{\\mathrm{CLASS} y_i\\} \\). Moreover, unlike COOP (Zhou et al., 2022b), which learns the context of input text prompts in the token embedding space (see Figure 3(b)), we learn the context in the feature space of prompts. Specifically, after obtaining the feature vector of the \\( i_{\\mathrm{th}} \\) class text prompt via the text encoder, i.e., \\( f_T(t_i) \\in \\mathbb{R}^d \\), we add a learnable vector \\( z_i \\in \\mathbb{R}^d \\) to it to get the updated text feature vector as follows:"
569
+ },
570
+ {
571
+ "type": "equation",
572
+ "bbox": [
573
+ 0.164,
574
+ 0.845,
575
+ 0.488,
576
+ 0.866
577
+ ],
578
+ "angle": 0,
579
+ "content": "\\[\nf _ {T} ^ {\\prime} (t _ {i}) = \\left(1 - \\lambda_ {i}\\right) \\cdot f _ {T} (t _ {i}) + \\lambda_ {i} \\cdot z _ {i} (2)\n\\]"
580
+ },
581
+ {
582
+ "type": "text",
583
+ "bbox": [
584
+ 0.113,
585
+ 0.873,
586
+ 0.49,
587
+ 0.922
588
+ ],
589
+ "angle": 0,
590
+ "content": "where \\(\\lambda_{i}\\in [0,1]\\) is a learnable parameter that determines the contributions of both vectors. Assuming \\(\\mathbf{t} = \\{t_1,t_2,\\dots ,t_c\\}\\) denotes text prompts of all"
591
+ },
592
+ {
593
+ "type": "text",
594
+ "bbox": [
595
+ 0.508,
596
+ 0.085,
597
+ 0.882,
598
+ 0.133
599
+ ],
600
+ "angle": 0,
601
+ "content": "classes, the raw/un-normalized prediction scores (logits), denoted as \\( f_{\\theta}(\\mathbf{x}, \\mathbf{t}) \\in \\mathbb{R}^{c} \\), for an audio waveform \\( (\\mathbf{x}) \\) are obtained as follows:"
602
+ },
603
+ {
604
+ "type": "equation",
605
+ "bbox": [
606
+ 0.536,
607
+ 0.142,
608
+ 0.856,
609
+ 0.18
610
+ ],
611
+ "angle": 0,
612
+ "content": "\\[\nf _ {\\theta} (\\mathbf {x}, \\mathbf {t}) = \\left\\{\\mathrm {s i m} \\left(f _ {A} (\\mathbf {x}), f _ {T} ^ {\\prime} (t _ {i})\\right) \\right\\} _ {i = 1} ^ {c},\n\\]"
613
+ },
614
+ {
615
+ "type": "text",
616
+ "bbox": [
617
+ 0.508,
618
+ 0.187,
619
+ 0.882,
620
+ 0.252
621
+ ],
622
+ "angle": 0,
623
+ "content": "where \\(\\mathfrak{sim}(\\cdot)\\) is cosine-similarity function and \\(c\\) is the number of classes. \\(f_{A}(\\mathbf{x})\\) is the feature vector from the audio encoder, and \\(f_{T}^{\\prime}(t_{i})\\) is the updated text feature vector (Equation 2) of \\(i_{\\mathrm{th}}\\) class."
624
+ },
625
+ {
626
+ "type": "text",
627
+ "bbox": [
628
+ 0.508,
629
+ 0.268,
630
+ 0.884,
631
+ 0.333
632
+ ],
633
+ "angle": 0,
634
+ "content": "We optimize the following objective function to learn feature-space context embeddings \\(\\mathbf{z} = \\{z_1, z_2, \\ldots, z_c\\}\\) and their corresponding contributions \\(\\lambda = \\{\\lambda_1, \\lambda_2, \\ldots, \\lambda_c\\}\\),"
635
+ },
636
+ {
637
+ "type": "equation",
638
+ "bbox": [
639
+ 0.561,
640
+ 0.343,
641
+ 0.883,
642
+ 0.378
643
+ ],
644
+ "angle": 0,
645
+ "content": "\\[\n\\underset {\\mathbf {z}, \\lambda} {\\text {m i n i m i z e}} \\sum_ {(\\mathbf {x}, y) \\in \\mathcal {D}} \\mathcal {L} \\left(f _ {\\theta} (\\mathbf {x}, \\mathbf {t}), y\\right), \\tag {3}\n\\]"
646
+ },
647
+ {
648
+ "type": "text",
649
+ "bbox": [
650
+ 0.508,
651
+ 0.389,
652
+ 0.884,
653
+ 0.568
654
+ ],
655
+ "angle": 0,
656
+ "content": "where \\(\\mathcal{D} = \\{\\mathbf{x}_i, y_i\\}_{i=1}^N\\) is training dataset consisting of \\(N\\) audio-class pairs and \\(\\mathcal{L}(\\cdot)\\) denotes cross-entropy loss. We use few-shot setting during training, meaning that a fixed number† of samples (e.g., 16) are randomly selected from each class in the training dataset. While optimizing objective in Equation 3, weights of both encoders \\(\\{f_A, f_T\\}\\) are kept in frozen state. The number of learnable parameters in our proposed method is \\(c + (c \\times d)\\). After learning the parameters, we use Equation 4 for audio classification during inference stage."
657
+ },
658
+ {
659
+ "type": "equation",
660
+ "bbox": [
661
+ 0.555,
662
+ 0.577,
663
+ 0.883,
664
+ 0.607
665
+ ],
666
+ "angle": 0,
667
+ "content": "\\[\n\\hat {y} = \\underset {i \\in \\{1, 2, \\dots , c \\}} {\\operatorname {a r g m a x}} \\quad \\operatorname {s i m} \\left(f _ {A} (\\mathbf {x}), f _ {T} ^ {\\prime} \\left(t _ {i}\\right)\\right) \\tag {4}\n\\]"
668
+ },
669
+ {
670
+ "type": "text",
671
+ "bbox": [
672
+ 0.508,
673
+ 0.616,
674
+ 0.882,
675
+ 0.647
676
+ ],
677
+ "angle": 0,
678
+ "content": "An overview of our proposed approach can be found in Figure 3(c)."
679
+ },
680
+ {
681
+ "type": "title",
682
+ "bbox": [
683
+ 0.509,
684
+ 0.658,
685
+ 0.854,
686
+ 0.672
687
+ ],
688
+ "angle": 0,
689
+ "content": "3.3 Difference with COOP and COCOOP"
690
+ },
691
+ {
692
+ "type": "text",
693
+ "bbox": [
694
+ 0.508,
695
+ 0.678,
696
+ 0.885,
697
+ 0.888
698
+ ],
699
+ "angle": 0,
700
+ "content": "COOP (Zhou et al., 2022b) and COCOOP (Zhou et al., 2022a) were originally introduced for vision-language model; however, we adapted them for audio-language model (replacing the vision encoder branch with audio encoder branch) and presented it as baseline methods. Both of these baselines and our method aim to enhance zero-shot performance for audio classification in this work. While PALM and the baselines share this common goal, they differ in their approach to achieving it. COOP and COCOOP optimize the input space (token embeddings of prompt context) of text encoder, whereas PALM optimizes the text feature space."
701
+ },
702
+ {
703
+ "type": "page_footnote",
704
+ "bbox": [
705
+ 0.509,
706
+ 0.895,
707
+ 0.882,
708
+ 0.921
709
+ ],
710
+ "angle": 0,
711
+ "content": "Refer to Figure 5 to see impact of number-of-shots on performance."
712
+ },
713
+ {
714
+ "type": "page_number",
715
+ "bbox": [
716
+ 0.478,
717
+ 0.928,
718
+ 0.526,
719
+ 0.941
720
+ ],
721
+ "angle": 0,
722
+ "content": "18530"
723
+ }
724
+ ],
725
+ [
726
+ {
727
+ "type": "image",
728
+ "bbox": [
729
+ 0.117,
730
+ 0.081,
731
+ 0.884,
732
+ 0.65
733
+ ],
734
+ "angle": 0,
735
+ "content": null
736
+ },
737
+ {
738
+ "type": "image_caption",
739
+ "bbox": [
740
+ 0.112,
741
+ 0.659,
742
+ 0.885,
743
+ 0.773
744
+ ],
745
+ "angle": 0,
746
+ "content": "Figure 3: Overview of Zero-Shot, COOP, PALM (a) Zero-Shot inference involves matching the embedding of the audio waveform with the embeddings of text prompts for each class. The class with the highest matching score is then assigned to the audio. (b) COOP (Zhou et al., 2022b) avoids using handcrafted text prompts by learning the context of text prompts in the token embedding space. It optimizes the input space of the text encoder to enhance classification performance. (c) PALM requires only class names at the input of text encoder and it optimizes the feature space by adding learnable context embeddings to text feature vectors. PALM not only outperforms COOP (see Table 2), but it is also more computationally efficient since it does not require gradients to flow through the text encoder, unlike COOP."
747
+ },
748
+ {
749
+ "type": "text",
750
+ "bbox": [
751
+ 0.113,
752
+ 0.799,
753
+ 0.49,
754
+ 0.913
755
+ ],
756
+ "angle": 0,
757
+ "content": "In our method, loss gradients do not need to flow through the text encoder, whereas in COOP and COCOOP, gradients flow through the encoder to reach the input to update prompt context. Moreover, there is a feedback loop from audio features (output of audio encoder) to the input of text encoder in COCOOP, making it even more computationally"
758
+ },
759
+ {
760
+ "type": "text",
761
+ "bbox": [
762
+ 0.508,
763
+ 0.799,
764
+ 0.885,
765
+ 0.913
766
+ ],
767
+ "angle": 0,
768
+ "content": "expensive. Comparatively, PALM is more computationally efficient as it does not include a feedback loop (see Table 3). Both COOP and COCOOP require a user-specified hyper-parameter, namely the number of context tokens, whereas PALM does not rely on such a parameter. Results in Table 2 demonstrate that our method outperforms COOP"
769
+ },
770
+ {
771
+ "type": "page_number",
772
+ "bbox": [
773
+ 0.478,
774
+ 0.928,
775
+ 0.525,
776
+ 0.941
777
+ ],
778
+ "angle": 0,
779
+ "content": "18531"
780
+ }
781
+ ],
782
+ [
783
+ {
784
+ "type": "table",
785
+ "bbox": [
786
+ 0.116,
787
+ 0.083,
788
+ 0.487,
789
+ 0.233
790
+ ],
791
+ "angle": 0,
792
+ "content": "<table><tr><td>DATASETS</td><td>TYPE</td><td>CLASSES</td><td>SPLIT</td></tr><tr><td>Beijing-Opera</td><td rowspan=\"2\">Instrument Classification</td><td>4</td><td>Five Fold</td></tr><tr><td>NS-Instruments</td><td>10</td><td>Train-Test</td></tr><tr><td>ESC50</td><td rowspan=\"3\">Sound Event Classification</td><td>50</td><td>Five Fold</td></tr><tr><td>ESC50-Actions</td><td>10</td><td>Five Fold</td></tr><tr><td>UrbanSound8K</td><td>10</td><td>Ten Fold</td></tr><tr><td>CREMA-D</td><td rowspan=\"2\">Emotion Recognition</td><td>6</td><td>Train-Test</td></tr><tr><td>RAVDESS</td><td>8</td><td>Train-Test</td></tr><tr><td>VocalSound</td><td>Vocal Sound Classification</td><td>6</td><td>Train-Test</td></tr><tr><td>SESA</td><td>Surveillance Sound Classification</td><td>4</td><td>Train-Test</td></tr><tr><td>TUT2017</td><td>Acoustic Scene Classification</td><td>15</td><td>Four Fold</td></tr><tr><td>GT-Music-Genre</td><td>Music Analysis</td><td>10</td><td>Train-Test</td></tr></table>"
793
+ },
794
+ {
795
+ "type": "table_caption",
796
+ "bbox": [
797
+ 0.114,
798
+ 0.243,
799
+ 0.488,
800
+ 0.287
801
+ ],
802
+ "angle": 0,
803
+ "content": "Table 1: Datasets Information In this work, we use 11 multi-class classification datasets encompassing a variety of speech-processing tasks."
804
+ },
805
+ {
806
+ "type": "text",
807
+ "bbox": [
808
+ 0.113,
809
+ 0.313,
810
+ 0.487,
811
+ 0.346
812
+ ],
813
+ "angle": 0,
814
+ "content": "and COCOOP, achieving an average improvement of \\(5.5\\%\\) and \\(3.1\\%\\) respectively."
815
+ },
816
+ {
817
+ "type": "title",
818
+ "bbox": [
819
+ 0.114,
820
+ 0.358,
821
+ 0.366,
822
+ 0.375
823
+ ],
824
+ "angle": 0,
825
+ "content": "4 Experiments and Results"
826
+ },
827
+ {
828
+ "type": "title",
829
+ "bbox": [
830
+ 0.114,
831
+ 0.386,
832
+ 0.229,
833
+ 0.399
834
+ ],
835
+ "angle": 0,
836
+ "content": "4.1 Datasets"
837
+ },
838
+ {
839
+ "type": "text",
840
+ "bbox": [
841
+ 0.113,
842
+ 0.407,
843
+ 0.49,
844
+ 0.922
845
+ ],
846
+ "angle": 0,
847
+ "content": "We evaluate our methodology using datasets from various speech-processing tasks: instrument classification, sound event classification, emotion recognition, vocal sound classification, surveillance sound event classification, acoustic scene classification, and music analysis. Brief information of each dataset can be found in Table 1. For instrument classification, we use Beijing-Opera (Tian et al., 2014) dataset, which includes audio examples of strokes from four percussion instrument classes used in Beijing Opera, and NS-Instruments (Engel et al., 2017) dataset, which consists of one-shot instrumental notes with unique pitches, timbres, and envelopes, spanning ten classes. For sound event classification, we utilize three datasets: ESC50 (Piczak), containing environmental recordings across 50 classes; ESC50-Actions (Piczak), a subset with 10 classes of non-speech human sounds; and UrbanSound8K (Salamon et al., 2014), with urban noise excerpts from 10 classes. Emotion recognition is assessed with the CREMA-D (Cao et al., 2014) and RAVDESS (Livingstone and Russo, 2018) datasets, covering 6 and 8 emotion classes respectively, performed by actors. We employ the VocalSound (Gong et al., 2021) dataset for vocal sound classification, which includes 6 classes of human non-speech vocalizations. For surveillance sound event classification, we use SESA (Spadini, 2019) dataset, which has 4 classes. Acoustic scene classification uses the TUT2017 (Heittola et al., 2017) dataset, containing samples"
848
+ },
849
+ {
850
+ "type": "text",
851
+ "bbox": [
852
+ 0.508,
853
+ 0.085,
854
+ 0.885,
855
+ 0.134
856
+ ],
857
+ "angle": 0,
858
+ "content": "from 15 acoustic scenes. For music analysis, the GT-Music-Genre (Sturm, 2012) dataset is used, which includes 10 classes of music genres."
859
+ },
860
+ {
861
+ "type": "text",
862
+ "bbox": [
863
+ 0.508,
864
+ 0.149,
865
+ 0.885,
866
+ 0.279
867
+ ],
868
+ "angle": 0,
869
+ "content": "We adhere to the official train-test or multi-fold splits for all datasets. We conduct cross-validation experiments on datasets having multi-fold splits such as Beijing-Opera, ESC50, ESC50-Actions, UrbanSound8K, and TUT2017, and report the average scores. We have publicly released all information regarding dataset preprocessing to ensure reproducibility of results."
870
+ },
871
+ {
872
+ "type": "title",
873
+ "bbox": [
874
+ 0.509,
875
+ 0.29,
876
+ 0.695,
877
+ 0.304
878
+ ],
879
+ "angle": 0,
880
+ "content": "4.2 Baseline Methods"
881
+ },
882
+ {
883
+ "type": "text",
884
+ "bbox": [
885
+ 0.508,
886
+ 0.31,
887
+ 0.885,
888
+ 0.697
889
+ ],
890
+ "angle": 0,
891
+ "content": "For baselines, we consider PENGI model (Deshmukh et al., 2023) (in ZERO-SHOT setup), COOP (Zhou et al., 2022b) and COCOOP (Zhou et al., 2022a). COOP and COCOOP are prompt learning approaches, originally introduced for VLMs. Both of these approaches remove the requirement of providing handcrafted text prompts and they optimize the input token embedding space of text encoder to enhance accuracy. The only difference between COOP and COCOOP is that the latter incorporates a feedback loop from the output of the audio encoder to the input of the text encoder. We adapt these two approaches for audio-language models by replacing the vision encoder with an audio encoder and present them as baselines for our proposed method. Why PENGI, COOP and CO-COOP as baselines? PENGI is an state-of-the-art ALM that has demonstrated comprehensive evaluation across 21 downstream audio tasks, making it a robust benchmark for comparison. COOP and CO-COOP, on the other hand, are pioneering works on prompt learning in the domain of vision-language models, offering foundational techniques and insights that are highly relevant for our study."
892
+ },
893
+ {
894
+ "type": "title",
895
+ "bbox": [
896
+ 0.509,
897
+ 0.708,
898
+ 0.715,
899
+ 0.723
900
+ ],
901
+ "angle": 0,
902
+ "content": "4.3 Experimental Setup"
903
+ },
904
+ {
905
+ "type": "text",
906
+ "bbox": [
907
+ 0.508,
908
+ 0.729,
909
+ 0.885,
910
+ 0.921
911
+ ],
912
+ "angle": 0,
913
+ "content": "We use pre-trained PENGI (Deshmukh et al., 2023) as the audio-language model for all methods. For all methods, except ZERO-SHOT, we conduct experiments for 50 epochs. Following the few-shot evaluation setup, we use 16 randomly selected samples per class from the training dataset. For inference, we utilize the entire test dataset. In the case of multi-fold datasets, we employ cross-validation and report the average scores. Training is performed using the Stochastic Gradient Descent (SGD) optimizer with a learning rate of 0.05. We use 'Accuracy' as the evaluation metric. For"
914
+ },
915
+ {
916
+ "type": "page_number",
917
+ "bbox": [
918
+ 0.478,
919
+ 0.928,
920
+ 0.526,
921
+ 0.941
922
+ ],
923
+ "angle": 0,
924
+ "content": "18532"
925
+ }
926
+ ],
927
+ [
928
+ {
929
+ "type": "table",
930
+ "bbox": [
931
+ 0.116,
932
+ 0.082,
933
+ 0.887,
934
+ 0.257
935
+ ],
936
+ "angle": 0,
937
+ "content": "<table><tr><td rowspan=\"2\">METHODS → DATASETS ↓</td><td colspan=\"2\">ZERO SHOT</td><td colspan=\"4\">COOP</td><td colspan=\"4\">COCOOP</td><td colspan=\"4\">PALM(ours)</td></tr><tr><td>-</td><td>SEED-0</td><td>SEED-1</td><td>SEED-2</td><td>AVG</td><td>SEED-0</td><td>SEED-1</td><td>SEED-2</td><td>AVG</td><td>SEED-0</td><td>SEED-1</td><td>SEED-2</td><td>AVG</td><td></td></tr><tr><td>Beijing-Opera</td><td>0.2881</td><td>0.9323</td><td>0.9660</td><td>0.9619</td><td>0.9534</td><td>0.9577</td><td>0.9830</td><td>0.9916</td><td>0.9774</td><td>0.9747</td><td>0.9066</td><td>0.9787</td><td>0.9533</td><td></td></tr><tr><td>CREMA-D</td><td>0.2310</td><td>0.3130</td><td>0.4197</td><td>0.2760</td><td>0.3362</td><td>0.2539</td><td>0.3358</td><td>0.3156</td><td>0.3018</td><td>0.4453</td><td>0.3580</td><td>0.2344</td><td>0.3459</td><td></td></tr><tr><td>ESC50-Actions</td><td>0.6525</td><td>0.9625</td><td>0.9400</td><td>0.9550</td><td>0.9525</td><td>0.9631</td><td>0.9620</td><td>0.9648</td><td>0.9634</td><td>0.9700</td><td>0.9625</td><td>0.9650</td><td>0.9658</td><td></td></tr><tr><td>ESC50</td><td>0.4965</td><td>0.9410</td><td>0.9390</td><td>0.9345</td><td>0.9382</td><td>0.9460</td><td>0.9370</td><td>0.9450</td><td>0.9427</td><td>0.9560</td><td>0.9600</td><td>0.9620</td><td>0.9593</td><td></td></tr><tr><td>GT-Music-Genre</td><td>0.3250</td><td>0.7250</td><td>0.6950</td><td>0.7350</td><td>0.7183</td><td>0.7500</td><td>0.7450</td><td>0.7600</td><td>0.7517</td><td>0.7900</td><td>0.7850</td><td>0.8250</td><td>0.8000</td><td></td></tr><tr><td>NS-Instruments</td><td>0.3291</td><td>0.5728</td><td>0.5562</td><td>0.6177</td><td>0.5822</td><td>0.5996</td><td>0.5740</td><td>0.6438</td><td>0.6058</td><td>0.6394</td><td>0.6108</td><td>0.6648</td><td>0.6383</td><td></td></tr><tr><td>RAVDESS</td><td>0.1222</td><td>0.3849</td><td>0.2688</td><td>0.3422</td><td>0.3320</td><td>0.3727</td><td>0.4399</td><td>0.3523</td><td>0.3883</td><td>0.4562</td><td>0.4603</td><td>0.4623</td><td>0.4596</td><td></td></tr><tr><td>SESA</td><td>0.7238</td><td>0.9143</td><td>0.8952</td><td>0.8762</td><td>0.8952</td><td>0.8381</td><td>0.8762</td><td>0.8952</td><td>0.8698</td><td>0.8857</td><td>0.9143</td><td>0.8857</td><td>0.8952</td><td></td></tr><tr><td>TUT2017</td><td>0.2435</td><td>0.6391</td><td>0.6667</td><td>0.6525</td><td>0.6528</td><td>0.7499</td><td>0.7215</td><td>0.7312</td><td>0.7342</td><td>0.7959</td><td>0.8047</td><td>0.7729</td><td>0.7912</td><td></td></tr><tr><td>UrbanSound8K</td><td>0.5349</td><td>0.7600</td><td>0.7378</td><td>0.7666</td><td>0.7548</td><td>0.7576</td><td>0.7784</td><td>0.7597</td><td>0.7652</td><td>0.8120</td><td>0.8037</td><td>0.8074</td><td>0.8077</td><td></td></tr><tr><td>VocalSound</td><td>0.4197</td><td>0.7162</td><td>0.7485</td><td>0.6642</td><td>0.7096</td><td>0.8081</td><td>0.7825</td><td>0.7463</td><td>0.7790</td><td>0.8101</td><td>0.8168</td><td>0.7964</td><td>0.8078</td><td></td></tr><tr><td>AVERAGE</td><td>0.3969</td><td>0.7146</td><td>0.7121</td><td>0.7074</td><td>0.7114</td><td>0.7276</td><td>0.7396</td><td>0.7369</td><td>0.7347</td><td>0.7759</td><td>0.7621</td><td>0.7595</td><td>0.7658</td><td></td></tr></table>"
938
+ },
939
+ {
940
+ "type": "table_caption",
941
+ "bbox": [
942
+ 0.113,
943
+ 0.267,
944
+ 0.885,
945
+ 0.351
946
+ ],
947
+ "angle": 0,
948
+ "content": "Table 2: Comparison of PALM with Baselines The accuracy scores of the methods (ZERO SHOT (Deshmukh et al., 2023), COOP (Zhou et al., 2022b), COCOOP (Zhou et al., 2022a), and our proposed PALM) across 11 audio recognition datasets are presented, with experiments (excluding ZERO SHOT) run using three seeds. Scores for each seed and the average are reported, with bold indicating the best average score in each row. Compared to the baselines, our proposed method achieves favorable results, with an average improvement of \\(5.5\\%\\) over COOP and \\(3.1\\%\\) over COCOOP."
949
+ },
950
+ {
951
+ "type": "table",
952
+ "bbox": [
953
+ 0.119,
954
+ 0.375,
955
+ 0.481,
956
+ 0.408
957
+ ],
958
+ "angle": 0,
959
+ "content": "<table><tr><td>METHOD</td><td>ZERO SHOT</td><td>COOP</td><td>COCOOP</td><td>PALM</td></tr><tr><td># of Parameters</td><td>0</td><td>8,192</td><td>98,880</td><td>12,393</td></tr></table>"
960
+ },
961
+ {
962
+ "type": "table_caption",
963
+ "bbox": [
964
+ 0.114,
965
+ 0.418,
966
+ 0.49,
967
+ 0.446
968
+ ],
969
+ "angle": 0,
970
+ "content": "Table 3: Number of Learnable Parameters in baselines and PALM."
971
+ },
972
+ {
973
+ "type": "text",
974
+ "bbox": [
975
+ 0.113,
976
+ 0.472,
977
+ 0.49,
978
+ 0.664
979
+ ],
980
+ "angle": 0,
981
+ "content": "all methods, except ZERO-SHOT, we run experiments with three different seeds and report the scores for each seed along with the average score. For ZERO-SHOT, we use default text prompt template \"This is a recording of {CLASS NAME}\" For COOP (Zhou et al., 2022b) and COCOOP (Zhou et al., 2022a) baselines, we set the number context tokens to 16 and context is placed at the front of class names. PENGI model weights are kept \"frozen\" in all experiments. We use NVIDIA A100-SXM4-40GB GPU for all experiments and Pytorch version 1.11+conda11.3."
982
+ },
983
+ {
984
+ "type": "title",
985
+ "bbox": [
986
+ 0.114,
987
+ 0.676,
988
+ 0.22,
989
+ 0.69
990
+ ],
991
+ "angle": 0,
992
+ "content": "4.4 Results"
993
+ },
994
+ {
995
+ "type": "text",
996
+ "bbox": [
997
+ 0.113,
998
+ 0.697,
999
+ 0.49,
1000
+ 0.873
1001
+ ],
1002
+ "angle": 0,
1003
+ "content": "Table 2 presents the performance comparison across 11 datasets using four different methods. Results indicate that PALM generally outperforms COOP and COCOOP, showing an average improvement of \\(5.5\\%\\) over COOP and \\(3.1\\%\\) over COCOOP. This suggests that PALM is a more effective approach in most cases. Moreover, it is important to note that PALM uses significantly fewer parameters—\\(87\\%\\) fewer compared to COCOOP. This reduction in parameters can contribute to more efficient model training and deployment."
1004
+ },
1005
+ {
1006
+ "type": "text",
1007
+ "bbox": [
1008
+ 0.113,
1009
+ 0.874,
1010
+ 0.489,
1011
+ 0.922
1012
+ ],
1013
+ "angle": 0,
1014
+ "content": "In the datasets, namely Beijing-Opera, ESC50 and ESC50-Actions, the improvement of PALM over COCOOP is marginal. However, for the"
1015
+ },
1016
+ {
1017
+ "type": "table",
1018
+ "bbox": [
1019
+ 0.548,
1020
+ 0.375,
1021
+ 0.843,
1022
+ 0.461
1023
+ ],
1024
+ "angle": 0,
1025
+ "content": "<table><tr><td>METHOD</td><td>AVERAGE ACCURACY</td></tr><tr><td>PALM + COOP</td><td>0.7236</td></tr><tr><td>PALM + COCOOP</td><td>0.7094</td></tr><tr><td>PALM + COCOOP†</td><td>0.7352</td></tr><tr><td>LINEAR PROBING</td><td>0.7299</td></tr><tr><td>PALM†</td><td>0.7160</td></tr><tr><td>PALM</td><td>0.7658</td></tr></table>"
1026
+ },
1027
+ {
1028
+ "type": "table_caption",
1029
+ "bbox": [
1030
+ 0.508,
1031
+ 0.47,
1032
+ 0.883,
1033
+ 0.57
1034
+ ],
1035
+ "angle": 0,
1036
+ "content": "Table 4: PALM+Baselines Jointly optimizing input and output space of text encoder does not help attain better accuracy. COCOOP† refers to the method where feedback from audio features is incorporated into the text features, rather than being fed directly into the text encoder's input. PALM† denotes experiment in which text features are not used."
1037
+ },
1038
+ {
1039
+ "type": "text",
1040
+ "bbox": [
1041
+ 0.508,
1042
+ 0.597,
1043
+ 0.885,
1044
+ 0.709
1045
+ ],
1046
+ "angle": 0,
1047
+ "content": "subsequent datasets, such as CREMA-D, GTMusic-Genre, NS-Instruments, RAVDESS, SESA, TUT2017, UrbanSound8K and VocalSound , the performance improvements are more substantial. This indicates that while PALM provides consistent benefits, the degree of performance gain varies across datasets."
1048
+ },
1049
+ {
1050
+ "type": "title",
1051
+ "bbox": [
1052
+ 0.509,
1053
+ 0.723,
1054
+ 0.694,
1055
+ 0.738
1056
+ ],
1057
+ "angle": 0,
1058
+ "content": "4.5 Ablative Analysis"
1059
+ },
1060
+ {
1061
+ "type": "text",
1062
+ "bbox": [
1063
+ 0.507,
1064
+ 0.745,
1065
+ 0.885,
1066
+ 0.921
1067
+ ],
1068
+ "angle": 0,
1069
+ "content": "For ablative analysis, we first show the importance of incorporating learnable context embeddings in text features. In Figure 4, we compare the performance of our method with and without the learnable context embeddings. The results clearly demonstrate that removing the learnable context embeddings leads to a significant drop in performance, underscoring their crucial role in enhancing the model's accuracy. This highlights the effectiveness of our approach in optimizing the feature space of the text encoder."
1070
+ },
1071
+ {
1072
+ "type": "page_number",
1073
+ "bbox": [
1074
+ 0.478,
1075
+ 0.928,
1076
+ 0.526,
1077
+ 0.941
1078
+ ],
1079
+ "angle": 0,
1080
+ "content": "18533"
1081
+ }
1082
+ ],
1083
+ [
1084
+ {
1085
+ "type": "image",
1086
+ "bbox": [
1087
+ 0.127,
1088
+ 0.085,
1089
+ 0.873,
1090
+ 0.355
1091
+ ],
1092
+ "angle": 0,
1093
+ "content": null
1094
+ },
1095
+ {
1096
+ "type": "image_caption",
1097
+ "bbox": [
1098
+ 0.112,
1099
+ 0.362,
1100
+ 0.884,
1101
+ 0.407
1102
+ ],
1103
+ "angle": 0,
1104
+ "content": "Figure 4: Comparison of \\(\\mathrm{PALM}^\\dagger\\) and PALM. Here, \\(\\mathrm{PALM}^\\dagger\\) refers to setting in which the Learnable Context embeddings (see Figure 3 for reference) have been removed from the feature space of the text encoder. The removal of context embeddings drastically degrades performance, highlighting their importance."
1105
+ },
1106
+ {
1107
+ "type": "image",
1108
+ "bbox": [
1109
+ 0.118,
1110
+ 0.419,
1111
+ 0.307,
1112
+ 0.497
1113
+ ],
1114
+ "angle": 0,
1115
+ "content": null
1116
+ },
1117
+ {
1118
+ "type": "image",
1119
+ "bbox": [
1120
+ 0.309,
1121
+ 0.42,
1122
+ 0.498,
1123
+ 0.498
1124
+ ],
1125
+ "angle": 0,
1126
+ "content": null
1127
+ },
1128
+ {
1129
+ "type": "image",
1130
+ "bbox": [
1131
+ 0.5,
1132
+ 0.42,
1133
+ 0.689,
1134
+ 0.498
1135
+ ],
1136
+ "angle": 0,
1137
+ "content": null
1138
+ },
1139
+ {
1140
+ "type": "image",
1141
+ "bbox": [
1142
+ 0.694,
1143
+ 0.42,
1144
+ 0.881,
1145
+ 0.498
1146
+ ],
1147
+ "angle": 0,
1148
+ "content": null
1149
+ },
1150
+ {
1151
+ "type": "image",
1152
+ "bbox": [
1153
+ 0.118,
1154
+ 0.5,
1155
+ 0.307,
1156
+ 0.579
1157
+ ],
1158
+ "angle": 0,
1159
+ "content": null
1160
+ },
1161
+ {
1162
+ "type": "image",
1163
+ "bbox": [
1164
+ 0.311,
1165
+ 0.501,
1166
+ 0.498,
1167
+ 0.579
1168
+ ],
1169
+ "angle": 0,
1170
+ "content": null
1171
+ },
1172
+ {
1173
+ "type": "image",
1174
+ "bbox": [
1175
+ 0.5,
1176
+ 0.501,
1177
+ 0.689,
1178
+ 0.579
1179
+ ],
1180
+ "angle": 0,
1181
+ "content": null
1182
+ },
1183
+ {
1184
+ "type": "image",
1185
+ "bbox": [
1186
+ 0.693,
1187
+ 0.501,
1188
+ 0.881,
1189
+ 0.579
1190
+ ],
1191
+ "angle": 0,
1192
+ "content": null
1193
+ },
1194
+ {
1195
+ "type": "image_caption",
1196
+ "bbox": [
1197
+ 0.113,
1198
+ 0.591,
1199
+ 0.884,
1200
+ 0.621
1201
+ ],
1202
+ "angle": 0,
1203
+ "content": "Figure 5: Impact of number-of-shots on PALM's performance A higher number of shots generally leads to increased audio classification accuracy using PALM."
1204
+ },
1205
+ {
1206
+ "type": "text",
1207
+ "bbox": [
1208
+ 0.113,
1209
+ 0.645,
1210
+ 0.49,
1211
+ 0.919
1212
+ ],
1213
+ "angle": 0,
1214
+ "content": "We also demonstrate the effect of jointly optimizing the input and output spaces of the text encoder by applying PALM on top of COOP and COCOOP methods, as shown in the first two rows of Table 4. The results suggest that this joint optimization leads to a slight performance drop and is not beneficial. In the third row, we illustrate the impact of incorporating audio features into the text features, showing performance nearly identical to COCOOP, which integrates audio features into the text encoder's input space. Additionally, the fourth row presents the linear-probing (training a linear classifier on top of audio features) results, which underperform compared to PALM. Given that our approach is based on a few-shot setup, we also analyze the impact of the number of shots (training samples per class) on PALM's performance across eight datasets, as"
1215
+ },
1216
+ {
1217
+ "type": "text",
1218
+ "bbox": [
1219
+ 0.508,
1220
+ 0.645,
1221
+ 0.883,
1222
+ 0.742
1223
+ ],
1224
+ "angle": 0,
1225
+ "content": "shown in Figure 5. As the number of shots in the training dataset increases, the performance of the model tends to improve. However, it should be noted that there is a trade-off between performance and computational load, as more shots also increase the computational requirements."
1226
+ },
1227
+ {
1228
+ "type": "title",
1229
+ "bbox": [
1230
+ 0.509,
1231
+ 0.752,
1232
+ 0.642,
1233
+ 0.768
1234
+ ],
1235
+ "angle": 0,
1236
+ "content": "5 Conclusion"
1237
+ },
1238
+ {
1239
+ "type": "text",
1240
+ "bbox": [
1241
+ 0.508,
1242
+ 0.777,
1243
+ 0.885,
1244
+ 0.922
1245
+ ],
1246
+ "angle": 0,
1247
+ "content": "In this study, we investigate the application of prompt learning techniques, originally developed for vision-language models (VLMs), in the context of audio-language models (ALMs). We introduce PALM, a novel method that optimizes the feature space of the text encoder branch, enhancing training efficiency compared to existing methods that operate in the input space. Evaluated on 11 diverse audio recognition datasets, PALM consists"
1248
+ },
1249
+ {
1250
+ "type": "page_number",
1251
+ "bbox": [
1252
+ 0.478,
1253
+ 0.928,
1254
+ 0.526,
1255
+ 0.941
1256
+ ],
1257
+ "angle": 0,
1258
+ "content": "18534"
1259
+ }
1260
+ ],
1261
+ [
1262
+ {
1263
+ "type": "text",
1264
+ "bbox": [
1265
+ 0.113,
1266
+ 0.085,
1267
+ 0.49,
1268
+ 0.198
1269
+ ],
1270
+ "angle": 0,
1271
+ "content": "tently matches or surpasses established baselines in a few-shot learning setup while reducing computational demands. PALM offers a promising direction for enhancing the performance of ALMs in zero-shot and few-shot learning scenarios, contributing to the broader field of audio recognition and paving the way for future research in multimodal tasks."
1272
+ },
1273
+ {
1274
+ "type": "title",
1275
+ "bbox": [
1276
+ 0.114,
1277
+ 0.212,
1278
+ 0.221,
1279
+ 0.227
1280
+ ],
1281
+ "angle": 0,
1282
+ "content": "Limitations"
1283
+ },
1284
+ {
1285
+ "type": "text",
1286
+ "bbox": [
1287
+ 0.113,
1288
+ 0.239,
1289
+ 0.492,
1290
+ 0.724
1291
+ ],
1292
+ "angle": 0,
1293
+ "content": "Although we are the first, to the best of our knowledge, to integrate prompt learning techniques originally designed for Vision-Language Models (VLMs) into Audio-Language Models (ALMs) and propose a new method, several aspects still need to be addressed. One critical aspect is to analyze prompt learning performance for domain generalization. This involves evaluating how well the prompts adapt to new, unseen domains and tasks, ensuring robustness and effectiveness across various applications. The second aspect is to analyze prompt learning performance under different types of perturbations in audio data to check its resilience against various types of noise. This analysis is essential for understanding the robustness of the models in real-world scenarios where audio data can be contaminated with background noise, distortions, and other audio artifacts. Thirdly, while our study shows results on audio classification, it is yet to be seen how prompt learning helps in other audio tasks such as speech recognition, audio segmentation, and information retrieval. Investigating the effectiveness of prompt learning across a broader range of audio tasks will provide a more comprehensive understanding of its potential and limitations. Fourthly, our few-shot method is specifically designed for single-label audio classification. Exploring a few-shot setup for multi-label audio classification and adapting PALM for this scenario remains an open question."
1294
+ },
1295
+ {
1296
+ "type": "title",
1297
+ "bbox": [
1298
+ 0.115,
1299
+ 0.752,
1300
+ 0.214,
1301
+ 0.767
1302
+ ],
1303
+ "angle": 0,
1304
+ "content": "References"
1305
+ },
1306
+ {
1307
+ "type": "text",
1308
+ "bbox": [
1309
+ 0.116,
1310
+ 0.777,
1311
+ 0.49,
1312
+ 0.922
1313
+ ],
1314
+ "angle": 0,
1315
+ "content": "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 L Menick, Sebastian Borgeaud, Andy Brock, Aida Nematzadeh, Sahand Sharifzadeh, Mikolaj Bińkowski, Ricardo Barreira, Oriol Vinyals, Andrew Zisserman, and Karen Simonyan. 2022. Flamingo: a visual language model for few-shot learning. In Advances in Neural Infor"
1316
+ },
1317
+ {
1318
+ "type": "text",
1319
+ "bbox": [
1320
+ 0.528,
1321
+ 0.086,
1322
+ 0.885,
1323
+ 0.113
1324
+ ],
1325
+ "angle": 0,
1326
+ "content": "mation Processing Systems, volume 35, pages 23716- 23736. Curran Associates, Inc."
1327
+ },
1328
+ {
1329
+ "type": "text",
1330
+ "bbox": [
1331
+ 0.511,
1332
+ 0.125,
1333
+ 0.886,
1334
+ 0.309
1335
+ ],
1336
+ "angle": 0,
1337
+ "content": "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. 2020. Language models are few-shot learners. In Advances in Neural Information Processing Systems, volume 33, pages 1877-1901. Curran Associates, Inc."
1338
+ },
1339
+ {
1340
+ "type": "text",
1341
+ "bbox": [
1342
+ 0.51,
1343
+ 0.32,
1344
+ 0.886,
1345
+ 0.388
1346
+ ],
1347
+ "angle": 0,
1348
+ "content": "Houwei Cao, David G Cooper, Michael K Keutmann, Ruben C Gur, Ani Nenkova, and Ragini Verma. 2014. Crema-d: Crowd-sourced emotional multimodal actors dataset. IEEE transactions on affective computing, 5(4):377-390."
1349
+ },
1350
+ {
1351
+ "type": "text",
1352
+ "bbox": [
1353
+ 0.51,
1354
+ 0.399,
1355
+ 0.884,
1356
+ 0.478
1357
+ ],
1358
+ "angle": 0,
1359
+ "content": "Nilaksh Das, Saket Dingliwal, Srikanth Ronanki, Rohit Paturi, David Huang, Prashant Mathur, Jie Yuan, Dhanush Bekal, Xing Niu, Sai Muralidhar Jayanthi, et al. 2024. Speechverse: A large-scale generalizable audio language model. arXiv preprint arXiv:2405.08295."
1360
+ },
1361
+ {
1362
+ "type": "text",
1363
+ "bbox": [
1364
+ 0.51,
1365
+ 0.49,
1366
+ 0.884,
1367
+ 0.543
1368
+ ],
1369
+ "angle": 0,
1370
+ "content": "Soham Deshmukh, Benjamin Elizalde, Rita Singh, and Huaming Wang. 2023. Pengi: An audio language model for audio tasks. Advances in Neural Information Processing Systems, 36:18090-18108."
1371
+ },
1372
+ {
1373
+ "type": "text",
1374
+ "bbox": [
1375
+ 0.51,
1376
+ 0.555,
1377
+ 0.883,
1378
+ 0.595
1379
+ ],
1380
+ "angle": 0,
1381
+ "content": "Soham Deshmukh, Rita Singh, and Bhiksha Raj. 2024. Domain adaptation for contrastive audio-language models. arXiv preprint arXiv:2402.09585."
1382
+ },
1383
+ {
1384
+ "type": "text",
1385
+ "bbox": [
1386
+ 0.51,
1387
+ 0.607,
1388
+ 0.885,
1389
+ 0.687
1390
+ ],
1391
+ "angle": 0,
1392
+ "content": "Benjamin Elizalde, Soham Deshmukh, Mahmoud Al Ismail, and Huaming Wang. 2023. Clap learning audio concepts from natural language supervision. In ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 1-5. IEEE."
1393
+ },
1394
+ {
1395
+ "type": "text",
1396
+ "bbox": [
1397
+ 0.51,
1398
+ 0.699,
1399
+ 0.884,
1400
+ 0.751
1401
+ ],
1402
+ "angle": 0,
1403
+ "content": "Jesse Engel, Cinjon Resnick, Adam Roberts, Sander Dieleman, Douglas Eck, Karen Simonyan, and Mohammad Norouzi. 2017. Neural audio synthesis of musical notes with wavenet autoencoders."
1404
+ },
1405
+ {
1406
+ "type": "text",
1407
+ "bbox": [
1408
+ 0.511,
1409
+ 0.763,
1410
+ 0.885,
1411
+ 0.856
1412
+ ],
1413
+ "angle": 0,
1414
+ "content": "Yassir Fathullah, Chunyang Wu, Egor Lakomkin, Jun-teng Jia, Yuan Shangguan, Ke Li, Jinxi Guo, Wenhan Xiong, Jay Mahadeokar, Ozlem Kalinli, et al. 2024. Prompting large language models with speech recognition abilities. In ICASSP 2024-2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 13351-13355. IEEE."
1415
+ },
1416
+ {
1417
+ "type": "text",
1418
+ "bbox": [
1419
+ 0.51,
1420
+ 0.868,
1421
+ 0.884,
1422
+ 0.922
1423
+ ],
1424
+ "angle": 0,
1425
+ "content": "Yuan Gong, Yu-An Chung, and James Glass. 2021. Psla: Improving audio tagging with pretraining, sampling, labeling, and aggregation. IEEE/ACM Transactions on Audio, Speech, and Language Processing."
1426
+ },
1427
+ {
1428
+ "type": "page_number",
1429
+ "bbox": [
1430
+ 0.478,
1431
+ 0.928,
1432
+ 0.526,
1433
+ 0.941
1434
+ ],
1435
+ "angle": 0,
1436
+ "content": "18535"
1437
+ }
1438
+ ],
1439
+ [
1440
+ {
1441
+ "type": "ref_text",
1442
+ "bbox": [
1443
+ 0.117,
1444
+ 0.086,
1445
+ 0.487,
1446
+ 0.151
1447
+ ],
1448
+ "angle": 0,
1449
+ "content": "Jindong Gu, Zhen Han, Shuo Chen, Ahmad Beirami, Bailan He, Gengyuan Zhang, Ruotong Liao, Yao Qin, Volker Tresp, and Philip H. S. Torr. 2023. A systematic survey of prompt engineering on vision-language foundation models. ArXiv, abs/2307.12980."
1450
+ },
1451
+ {
1452
+ "type": "ref_text",
1453
+ "bbox": [
1454
+ 0.117,
1455
+ 0.162,
1456
+ 0.487,
1457
+ 0.215
1458
+ ],
1459
+ "angle": 0,
1460
+ "content": "Toni Heittola, Annamaria Mesaros, and Tuomas Virtanen. 2017. TUT Acoustic Scenes 2017, Development dataset. Technical report, Department of Signal Processing, Tampere University of Technology."
1461
+ },
1462
+ {
1463
+ "type": "ref_text",
1464
+ "bbox": [
1465
+ 0.117,
1466
+ 0.224,
1467
+ 0.487,
1468
+ 0.289
1469
+ ],
1470
+ "angle": 0,
1471
+ "content": "Zhifeng Kong, Arushi Goel, Rohan Badlani, Wei Ping, Rafael Valle, and Bryan Catanzaro. 2024. Audio flamingo: A novel audio language model with few-shot learning and dialogue abilities. arXiv preprint arXiv:2402.01831."
1472
+ },
1473
+ {
1474
+ "type": "ref_text",
1475
+ "bbox": [
1476
+ 0.117,
1477
+ 0.3,
1478
+ 0.487,
1479
+ 0.366
1480
+ ],
1481
+ "angle": 0,
1482
+ "content": "Yiming Li, Xiangdong Wang, and Hong Liu. 2024. Audio-free prompt tuning for language-audio models. In ICASSP 2024-2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 491-495. IEEE."
1483
+ },
1484
+ {
1485
+ "type": "ref_text",
1486
+ "bbox": [
1487
+ 0.117,
1488
+ 0.376,
1489
+ 0.487,
1490
+ 0.441
1491
+ ],
1492
+ "angle": 0,
1493
+ "content": "Steven R Livingstone and Frank A Russo. 2018. The ryerson audio-visual database of emotional speech and song (ravdess): A dynamic, multimodal set of facial and vocal expressions in north american english. PloS one, 13(5):e0196391."
1494
+ },
1495
+ {
1496
+ "type": "ref_text",
1497
+ "bbox": [
1498
+ 0.117,
1499
+ 0.452,
1500
+ 0.487,
1501
+ 0.505
1502
+ ],
1503
+ "angle": 0,
1504
+ "content": "Fabio Petroni, Tim Rocktäschel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, Alexander H Miller, and Sebastian Riedel. 2019. Language models as knowledge bases? arXiv preprint arXiv:1909.01066."
1505
+ },
1506
+ {
1507
+ "type": "ref_text",
1508
+ "bbox": [
1509
+ 0.117,
1510
+ 0.515,
1511
+ 0.487,
1512
+ 0.567
1513
+ ],
1514
+ "angle": 0,
1515
+ "content": "Karol J. Piczak. ESC: Dataset for Environmental Sound Classification. In Proceedings of the 23rd Annual ACM Conference on Multimedia, pages 1015-1018. ACM Press."
1516
+ },
1517
+ {
1518
+ "type": "ref_text",
1519
+ "bbox": [
1520
+ 0.117,
1521
+ 0.578,
1522
+ 0.487,
1523
+ 0.657
1524
+ ],
1525
+ "angle": 0,
1526
+ "content": "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 International conference on machine learning, pages 8748-8763. PMLR."
1527
+ },
1528
+ {
1529
+ "type": "ref_text",
1530
+ "bbox": [
1531
+ 0.117,
1532
+ 0.667,
1533
+ 0.487,
1534
+ 0.72
1535
+ ],
1536
+ "angle": 0,
1537
+ "content": "Justin Salamon, Christopher Jacoby, and Juan Pablo Bello. 2014. A dataset and taxonomy for urban sound research. In Proceedings of the 22nd ACM international conference on Multimedia, pages 1041-1044."
1538
+ },
1539
+ {
1540
+ "type": "ref_text",
1541
+ "bbox": [
1542
+ 0.117,
1543
+ 0.729,
1544
+ 0.487,
1545
+ 0.755
1546
+ ],
1547
+ "angle": 0,
1548
+ "content": "Tito Spadini. 2019. Sound events for surveillance applications."
1549
+ },
1550
+ {
1551
+ "type": "ref_text",
1552
+ "bbox": [
1553
+ 0.117,
1554
+ 0.766,
1555
+ 0.487,
1556
+ 0.83
1557
+ ],
1558
+ "angle": 0,
1559
+ "content": "Bob L Sturm. 2012. An analysis of the gtzan music genre dataset. In Proceedings of the second international ACM workshop on Music information retrieval with user-centered and multimodal strategies, pages 7-12."
1560
+ },
1561
+ {
1562
+ "type": "ref_text",
1563
+ "bbox": [
1564
+ 0.117,
1565
+ 0.842,
1566
+ 0.487,
1567
+ 0.919
1568
+ ],
1569
+ "angle": 0,
1570
+ "content": "Mi Tian, Ajay Srinivasamurthy, Mark Sandler, and Xavier Serra. 2014. A study of instrument-wise onset detection in beijing opera percussion ensembles. In 2014 iiem international conference on acoustics, speech and signal processing (icassp), pages 2159-2163. IEEE."
1571
+ },
1572
+ {
1573
+ "type": "list",
1574
+ "bbox": [
1575
+ 0.117,
1576
+ 0.086,
1577
+ 0.487,
1578
+ 0.919
1579
+ ],
1580
+ "angle": 0,
1581
+ "content": null
1582
+ },
1583
+ {
1584
+ "type": "ref_text",
1585
+ "bbox": [
1586
+ 0.511,
1587
+ 0.086,
1588
+ 0.882,
1589
+ 0.139
1590
+ ],
1591
+ "angle": 0,
1592
+ "content": "Jingyi Zhang, Jiaxing Huang, Sheng Jin, and Shijian Lu. 2024. Vision-language models for vision tasks: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence."
1593
+ },
1594
+ {
1595
+ "type": "ref_text",
1596
+ "bbox": [
1597
+ 0.512,
1598
+ 0.149,
1599
+ 0.882,
1600
+ 0.215
1601
+ ],
1602
+ "angle": 0,
1603
+ "content": "Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. 2022a. Conditional prompt learning for vision-language models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 16816-16825."
1604
+ },
1605
+ {
1606
+ "type": "ref_text",
1607
+ "bbox": [
1608
+ 0.512,
1609
+ 0.224,
1610
+ 0.882,
1611
+ 0.276
1612
+ ],
1613
+ "angle": 0,
1614
+ "content": "Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. 2022b. Learning to prompt for vision-language models. International Journal of Computer Vision (IJCV)."
1615
+ },
1616
+ {
1617
+ "type": "list",
1618
+ "bbox": [
1619
+ 0.511,
1620
+ 0.086,
1621
+ 0.882,
1622
+ 0.276
1623
+ ],
1624
+ "angle": 0,
1625
+ "content": null
1626
+ },
1627
+ {
1628
+ "type": "page_number",
1629
+ "bbox": [
1630
+ 0.478,
1631
+ 0.929,
1632
+ 0.525,
1633
+ 0.941
1634
+ ],
1635
+ "angle": 0,
1636
+ "content": "18536"
1637
+ }
1638
+ ]
1639
+ ]
2024/PALM_ Few-Shot Prompt Learning for Audio Language Models/0b7be31a-449c-4312-b744-95f7039ae91e_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e757035a4fcb3af9ef21f0ba4d719db4b4ac96d47a391793a8c172334b43b96
3
+ size 4863583
2024/PALM_ Few-Shot Prompt Learning for Audio Language Models/full.md ADDED
@@ -0,0 +1,254 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # PALM: Few-Shot Prompt Learning for Audio Language Models
2
+
3
+ Asif Hanif, Maha Tufail Agro, Mohammad Areeb Qazi, Hanan Aldarmaki
4
+
5
+ Mohamed Bin Zayed University of Artificial Intelligence (MBZUAI)
6
+
7
+ {asif.hanif, maha.tufail, mohammad.qazi, hanan.aldarmaki}@mbzuai.ac.ae
8
+
9
+ # Abstract
10
+
11
+ Audio-Language Models (ALMs) have recently achieved success in zero-shot audio recognition tasks, which match features of audio waveforms with class-specific text prompt features, inspired by advancements in Vision-Language Models (VLMs). Given the sensitivity of zero-shot performance to the choice of hand-crafted text prompts, many prompt learning techniques have been developed for VLMs. We explore the efficacy of these approaches in ALMs and propose a novel method, Prompt Learning in Audio Language Models (PALM), which optimizes the feature space of the ALM text encoder. Unlike existing methods that work in the input space, our approach results in greater training efficiency. We demonstrate the effectiveness of our approach on 11 audio recognition datasets, encompassing a variety of speech-processing tasks, and compare the results with three baselines in a few-shot learning setup. Our results show that PALM performs on a par with or outperforms the baselines while being more computationally efficient. Our code is publicly available at $\mathrm{Gib}\mathbf{u}\mathbf{b}^{\dagger}$
12
+
13
+ # 1 Introduction
14
+
15
+ Inspired by the success of Vision-Language Models (VLMs) (Zhang et al., 2024), Audio-Language Models (ALMs) have recently emerged, achieving state-of-the-art performance on various zero-shot audio recognition tasks (Elizalde et al., 2023; Deshmukh et al., 2023; Kong et al., 2024; Das et al., 2024). In zero-shot audio recognition, features of the audio waveform are matched with features of text prompts representing each class, and the highest matching class is assigned to the audio waveform. Zero-shot audio recognition offers some advantages by eliminating the need for extensive labeled datasets and allowing for the recognition of new classes without additional
16
+
17
+ ![](images/9f5a226b4cb5898e95518750cfcc522ad04929c65cd029b62cfbf9790bbc08f8.jpg)
18
+ Figure 1: Comparison of our proposed approach, PALM, with three baselines: ZERO-SHOT (Deshmukh et al., 2023), COOP (Zhou et al., 2022b) and COCOOP (Zhou et al., 2022a). Bar plots show classification accuracy averaged across 11 audio datasets encompassing various speech-processing tasks.
19
+
20
+ training. This approach reduces training times and data annotation costs, leading to substantial savings in computational resources.
21
+
22
+ The choice of text prompt is crucial for pre-trained vision-language and audio-language models, but it becomes a drawback for zero-shot recognition due to the requirement of hand-crafted prompts. This manual prompt-engineering can result in performance variations (Zhou et al., 2022b,a). We confirm this observation, previously noted in VLMs, within the context of ALMs (refer to Figure 2). To automate the learning of text prompts, various approaches have been introduced for prompt learning in VLMs (Gu et al., 2023).
23
+
24
+ The domain of prompt learning in ALMs remains under-explored, lacking comprehensive studies to evaluate the effectiveness of prompt learning techniques within this context. To bridge
25
+
26
+ ![](images/2616c91e545c0f68499e04a38a0ca9de9ee11ff6d278423b560da1cd26710807.jpg)
27
+ Figure 2: Impact of Hand-crafted Prompts on ZERO-SHOT Performance Zero-shot accuracy across four audio recognition datasets (ESC50 (Piczak), GT-Music-Genre (Sturm, 2012), SESA (Spadini, 2019), and VocalSound (Gong et al., 2021)) is evaluated with eight different text prompts using PENGI (Deshmukh et al., 2023) model. The accuracy varies with changes in the handcrafted prompts.
28
+
29
+ this research gap, we adapt prompt learning techniques developed for VLMs and apply them to the domain of ALMs. Our results demonstrate that these adaptations improve audio classification performance (see Table 2). Traditional techniques optimize the input space (i.e. token embeddings) of the text encoder by introducing a learnable context. However, this approach can increase training costs as loss gradients must flow through the text encoder branch. To address this, we introduce a novel method, PALM: Prompt Learning in Audio Language Models, which optimizes the feature space of the text encoder rather than its input space. This makes the training computationally efficient since loss gradients do not need to flow through the text encoder. To assess the effectiveness of our approach, we show results on 11 audio recognition datasets, encompassing various speech processing tasks. Our method either matches or surpasses other approaches while being less computationally demanding (see Table 2 and Table 3).
30
+
31
+ # Contributions: Our contributions are as follows:
32
+
33
+ - Inspired by the success of few-shot prompt learning in vision-language models (VLMs), we show that adapting these techniques to audio-language models (ALMs) significantly enhances their performance.
34
+ - We introduce PALM, a novel few-shot prompt learning method for ALMs that optimizes the text encoder's feature space. We demonstrate our approach's effectiveness on 11 audio recognition datasets, comparing it to three baselines in a few-shot learning setup. Our method matches or outperforms others while being less computationally demanding, estab
35
+
36
+ lishing a benchmark for prompt learning in ALMs and paving the way for future research.
37
+
38
+ # 2 Related Work
39
+
40
+ Prompt engineering involves adding task-specific hints, called prompts, to a large pre-trained model to adapt it to new tasks. Recently, significant advancements have been made in prompt learning, particularly in the fields of language and vision. Below, we outline the recent developments in language, vision, and audio domains.
41
+
42
+ # 2.1 Audio Language Models (ALMs)
43
+
44
+ Taking inspiration from multimodal models like CLIP (Radford et al., 2021) in the vision domain, Contrastive Language-Audio Pretraining (CLAP) (Elizalde et al., 2023) stands out as the first-of-its-kind audio language model. It connects natural language and audio through dual encoders and contrastive learning, aligning audio and text descriptions in a shared multimodal space. Furthermore, CLAP introduces zero-shot prediction capabilities, removing the necessity for training with predefined class labels and allowing flexible class prediction during inference.
45
+
46
+ PENGI (Deshmukh et al., 2023), another audio language Model, utilizes transfer learning by treating all audio tasks as text-generation tasks. It takes audio recordings and text inputs, generating freeform text as output. The input audio is represented by continuous embeddings from an audio encoder, while the corresponding text input undergoes the same process with a text encoder. These sequences are combined as a prefix to prompt a pre-trained frozen language model. PENGI's unified architecture supports both open-ended and close-ended
47
+
48
+ tasks without requiring additional fine-tuning or task-specific extensions.
49
+
50
+ Audio Flamingo, introduced by Kong et al. (2024), is a multimodal-to-text generative model inspired by Flamingo (Alayrac et al., 2022), demonstrating advanced audio understanding capabilities, adaptability to unseen tasks through in-context learning and retrieval, and multi-turn dialogue abilities. The model features an audio feature extractor with a sliding window and uses cross-attention to fuse audio inputs into the language model, ensuring computational efficiency.
51
+
52
+ # 2.2 Prompt Learning in Language Models
53
+
54
+ Extensive research has been conducted on prompt learning techniques in natural language processing. Pioneering work by (Brown et al., 2020) focused on optimization strategies for zero-shot and few-shot learning scenarios, demonstrating that prompts can enable generative models to perform well across various tasks without extensive task-specific training. Their method leverages the model's pre-trained knowledge and prompt-guided interactions to achieve strong performance on new tasks. They also introduced GPT-3, which transformed the field of prompt learning in natural language processing. Petroni et al. (2019) integrated contextual cues and constraints within prompts to guide model behavior, embedding task-specific information to enhance output precision and relevance. Their technique improves interpretability and task-oriented performance by providing contextual guidance during inference.
55
+
56
+ # 2.3 Prompt Learning in Vision-Language Models
57
+
58
+ Inspired by advancements in prompt-based work in language models, several studies have been conducted to adapt these methods to VLMs (Gu et al., 2023). Some focus exclusively on the language component, such as COOP (Context Optimization) (Zhou et al., 2022a). In contrast, others integrate insights from language and visual components, as seen in COCOOP (Conditional Context Optimization) (Zhou et al., 2022a). COOP enhances CLIP model's few-shot transfer learning capability by optimizing a continuous set of prompt vectors within the language branch. However, COCOOP addresses the limitations of COOP, particularly its suboptimal performance on novel classes, by explicitly conditioning prompts on individual image instances, thereby enhancing generalization.
59
+
60
+ # 2.4 Prompt Learning in Audio-Language Models
61
+
62
+ Prompt learning with audio-language models is relatively understudied. Previous work has explored enhancing language models with speech recognition by conditioning them on variable-length audio embeddings using a conformer-based audio encoder (Fathullah et al., 2024). Deshmukh et al. (2024) propose a test-time domain adaptation method for Contrastive ALMs, using unlabeled audio to adjust the model to new domains via a domain vector, consistent predictions, and self-entropy fine-tuning, improving on traditional Test-Time Training. Li et al. (2024) introduce PT-Text, an audio-free prompt tuning scheme that optimizes prompt tokens from text, regularizing the model to avoid overfitting by training with captions and using a multi-grained strategy to enhance performance.
63
+
64
+ # 3 Method
65
+
66
+ # 3.1 Audio-Language Model (ALM)
67
+
68
+ We demonstrate the efficiency of prompt learning in enhancing zero-shot performance using a state-of-the-art audio-language model PENGI (Deshmukh et al., 2023). Our approach is applicable to all audio-language models that have aligned audio and text encoders.
69
+
70
+ PENGI takes an audio recording/waveform and a text prompt as input and generates free-form text as output. It consists of three branches. The first branch is an audio encoder that maps the audio waveform to an embedding space. The second branch is a text encoder that transforms the input text into the same embedding space. These embeddings are then concatenated to form an input prefix for the third branch, a causal language model that generates tokens autoregressively, conditioned on both the audio and text inputs. PENGI can be used for various audio-conditioned tasks, such as text completion, classification, audio caption generation, and question-answering (Deshmukh et al., 2023).
71
+
72
+ Zero-Shot Inference Although PENGI is multimodal-to-text generation model, however, we use its audio and text encoder branches for zero-shot audio recognition. This is accomplished by comparing the embedding of the audio waveform (extracted from the audio encoder) with the
73
+
74
+ embeddings of text prompts for different classes (extracted from the text encoder). An overview of zero-shot inference is given in Figure 3(a). It should be noted that the zero-shot setup used by (Deshmukh et al., 2023) differs from ours, as they employ the model's free-form text output for zero-shot inference.
75
+
76
+ Formally, we denote the pre-trained ALM as $f_{\theta} = \{f_{A},f_{T}\}$ , whereas $f_{A}$ and $f_{T}$ are audio and text encoders, respectively and $\theta$ represents the combined weights of both encoders. For classification in zero-shot scenario, an audio waveform $\mathbf{x}$ is first passed to the audio encoder $f_{A}$ to produce a $d$ -dimensional feature vector $f_{A}(\mathbf{x}) \in \mathbb{R}^{d}$ . In parallel, text prompts representing each class label $y_{i} \in \{y_{1},y_{2}\dots ,y_{c}\}$ are encapsulated within class-specific handcrafted text templates, such as
77
+
78
+ $$
79
+ t _ {i} = \text {" A n a u d i o r e c o r d i n g o f \{C L A S S y _ {i} \} ",}
80
+ $$
81
+
82
+ where $c$ is the total number of classes. Each text prompt, represented as $t_i$ , is processed through the text encoder $f_T$ , resulting in a feature vector $f_T(t_i) \in \mathbb{R}^d$ . The relationship between the audio waveform $\mathbf{x}$ and a class-specific text prompt $t_i$ is quantified by computing the cosine similarity between their corresponding feature vectors, denoted as $\mathrm{sim}(f_A(\mathbf{x}), f_T(t_i))$ . The class with the highest similarity score is then assigned as the label $\hat{y}$ for the audio waveform, i.e.
83
+
84
+ $$
85
+ \hat {y} = \underset {i \in \{1, 2, \dots , c \}} {\operatorname {a r g m a x}} \quad \operatorname {s i m} \left(f _ {A} (\mathbf {x}), f _ {T} (t _ {i})\right). \tag {1}
86
+ $$
87
+
88
+ # 3.2 PALM: Prompt Learning in ALM
89
+
90
+ In our proposed method, we do not use handcrafted prompts; instead, we simply use class names as the input to the text encoder i.e. $t_i = \{\mathrm{CLASS} y_i\}$ . Moreover, unlike COOP (Zhou et al., 2022b), which learns the context of input text prompts in the token embedding space (see Figure 3(b)), we learn the context in the feature space of prompts. Specifically, after obtaining the feature vector of the $i_{\mathrm{th}}$ class text prompt via the text encoder, i.e., $f_T(t_i) \in \mathbb{R}^d$ , we add a learnable vector $z_i \in \mathbb{R}^d$ to it to get the updated text feature vector as follows:
91
+
92
+ $$
93
+ f _ {T} ^ {\prime} (t _ {i}) = \left(1 - \lambda_ {i}\right) \cdot f _ {T} (t _ {i}) + \lambda_ {i} \cdot z _ {i} (2)
94
+ $$
95
+
96
+ where $\lambda_{i}\in [0,1]$ is a learnable parameter that determines the contributions of both vectors. Assuming $\mathbf{t} = \{t_1,t_2,\dots ,t_c\}$ denotes text prompts of all
97
+
98
+ classes, the raw/un-normalized prediction scores (logits), denoted as $f_{\theta}(\mathbf{x}, \mathbf{t}) \in \mathbb{R}^{c}$ , for an audio waveform $(\mathbf{x})$ are obtained as follows:
99
+
100
+ $$
101
+ f _ {\theta} (\mathbf {x}, \mathbf {t}) = \left\{\mathrm {s i m} \left(f _ {A} (\mathbf {x}), f _ {T} ^ {\prime} (t _ {i})\right) \right\} _ {i = 1} ^ {c},
102
+ $$
103
+
104
+ where $\mathfrak{sim}(\cdot)$ is cosine-similarity function and $c$ is the number of classes. $f_{A}(\mathbf{x})$ is the feature vector from the audio encoder, and $f_{T}^{\prime}(t_{i})$ is the updated text feature vector (Equation 2) of $i_{\mathrm{th}}$ class.
105
+
106
+ We optimize the following objective function to learn feature-space context embeddings $\mathbf{z} = \{z_1, z_2, \ldots, z_c\}$ and their corresponding contributions $\lambda = \{\lambda_1, \lambda_2, \ldots, \lambda_c\}$ ,
107
+
108
+ $$
109
+ \underset {\mathbf {z}, \lambda} {\text {m i n i m i z e}} \sum_ {(\mathbf {x}, y) \in \mathcal {D}} \mathcal {L} \left(f _ {\theta} (\mathbf {x}, \mathbf {t}), y\right), \tag {3}
110
+ $$
111
+
112
+ where $\mathcal{D} = \{\mathbf{x}_i, y_i\}_{i=1}^N$ is training dataset consisting of $N$ audio-class pairs and $\mathcal{L}(\cdot)$ denotes cross-entropy loss. We use few-shot setting during training, meaning that a fixed number† of samples (e.g., 16) are randomly selected from each class in the training dataset. While optimizing objective in Equation 3, weights of both encoders $\{f_A, f_T\}$ are kept in frozen state. The number of learnable parameters in our proposed method is $c + (c \times d)$ . After learning the parameters, we use Equation 4 for audio classification during inference stage.
113
+
114
+ $$
115
+ \hat {y} = \underset {i \in \{1, 2, \dots , c \}} {\operatorname {a r g m a x}} \quad \operatorname {s i m} \left(f _ {A} (\mathbf {x}), f _ {T} ^ {\prime} \left(t _ {i}\right)\right) \tag {4}
116
+ $$
117
+
118
+ An overview of our proposed approach can be found in Figure 3(c).
119
+
120
+ # 3.3 Difference with COOP and COCOOP
121
+
122
+ COOP (Zhou et al., 2022b) and COCOOP (Zhou et al., 2022a) were originally introduced for vision-language model; however, we adapted them for audio-language model (replacing the vision encoder branch with audio encoder branch) and presented it as baseline methods. Both of these baselines and our method aim to enhance zero-shot performance for audio classification in this work. While PALM and the baselines share this common goal, they differ in their approach to achieving it. COOP and COCOOP optimize the input space (token embeddings of prompt context) of text encoder, whereas PALM optimizes the text feature space.
123
+
124
+ ![](images/74e294ef82a1b1dea7517dfa52f29f8f89cdee55c094ee9c3a1fc81d3a8b91b5.jpg)
125
+ Figure 3: Overview of Zero-Shot, COOP, PALM (a) Zero-Shot inference involves matching the embedding of the audio waveform with the embeddings of text prompts for each class. The class with the highest matching score is then assigned to the audio. (b) COOP (Zhou et al., 2022b) avoids using handcrafted text prompts by learning the context of text prompts in the token embedding space. It optimizes the input space of the text encoder to enhance classification performance. (c) PALM requires only class names at the input of text encoder and it optimizes the feature space by adding learnable context embeddings to text feature vectors. PALM not only outperforms COOP (see Table 2), but it is also more computationally efficient since it does not require gradients to flow through the text encoder, unlike COOP.
126
+
127
+ In our method, loss gradients do not need to flow through the text encoder, whereas in COOP and COCOOP, gradients flow through the encoder to reach the input to update prompt context. Moreover, there is a feedback loop from audio features (output of audio encoder) to the input of text encoder in COCOOP, making it even more computationally
128
+
129
+ expensive. Comparatively, PALM is more computationally efficient as it does not include a feedback loop (see Table 3). Both COOP and COCOOP require a user-specified hyper-parameter, namely the number of context tokens, whereas PALM does not rely on such a parameter. Results in Table 2 demonstrate that our method outperforms COOP
130
+
131
+ <table><tr><td>DATASETS</td><td>TYPE</td><td>CLASSES</td><td>SPLIT</td></tr><tr><td>Beijing-Opera</td><td rowspan="2">Instrument Classification</td><td>4</td><td>Five Fold</td></tr><tr><td>NS-Instruments</td><td>10</td><td>Train-Test</td></tr><tr><td>ESC50</td><td rowspan="3">Sound Event Classification</td><td>50</td><td>Five Fold</td></tr><tr><td>ESC50-Actions</td><td>10</td><td>Five Fold</td></tr><tr><td>UrbanSound8K</td><td>10</td><td>Ten Fold</td></tr><tr><td>CREMA-D</td><td rowspan="2">Emotion Recognition</td><td>6</td><td>Train-Test</td></tr><tr><td>RAVDESS</td><td>8</td><td>Train-Test</td></tr><tr><td>VocalSound</td><td>Vocal Sound Classification</td><td>6</td><td>Train-Test</td></tr><tr><td>SESA</td><td>Surveillance Sound Classification</td><td>4</td><td>Train-Test</td></tr><tr><td>TUT2017</td><td>Acoustic Scene Classification</td><td>15</td><td>Four Fold</td></tr><tr><td>GT-Music-Genre</td><td>Music Analysis</td><td>10</td><td>Train-Test</td></tr></table>
132
+
133
+ Table 1: Datasets Information In this work, we use 11 multi-class classification datasets encompassing a variety of speech-processing tasks.
134
+
135
+ and COCOOP, achieving an average improvement of $5.5\%$ and $3.1\%$ respectively.
136
+
137
+ # 4 Experiments and Results
138
+
139
+ # 4.1 Datasets
140
+
141
+ We evaluate our methodology using datasets from various speech-processing tasks: instrument classification, sound event classification, emotion recognition, vocal sound classification, surveillance sound event classification, acoustic scene classification, and music analysis. Brief information of each dataset can be found in Table 1. For instrument classification, we use Beijing-Opera (Tian et al., 2014) dataset, which includes audio examples of strokes from four percussion instrument classes used in Beijing Opera, and NS-Instruments (Engel et al., 2017) dataset, which consists of one-shot instrumental notes with unique pitches, timbres, and envelopes, spanning ten classes. For sound event classification, we utilize three datasets: ESC50 (Piczak), containing environmental recordings across 50 classes; ESC50-Actions (Piczak), a subset with 10 classes of non-speech human sounds; and UrbanSound8K (Salamon et al., 2014), with urban noise excerpts from 10 classes. Emotion recognition is assessed with the CREMA-D (Cao et al., 2014) and RAVDESS (Livingstone and Russo, 2018) datasets, covering 6 and 8 emotion classes respectively, performed by actors. We employ the VocalSound (Gong et al., 2021) dataset for vocal sound classification, which includes 6 classes of human non-speech vocalizations. For surveillance sound event classification, we use SESA (Spadini, 2019) dataset, which has 4 classes. Acoustic scene classification uses the TUT2017 (Heittola et al., 2017) dataset, containing samples
142
+
143
+ from 15 acoustic scenes. For music analysis, the GT-Music-Genre (Sturm, 2012) dataset is used, which includes 10 classes of music genres.
144
+
145
+ We adhere to the official train-test or multi-fold splits for all datasets. We conduct cross-validation experiments on datasets having multi-fold splits such as Beijing-Opera, ESC50, ESC50-Actions, UrbanSound8K, and TUT2017, and report the average scores. We have publicly released all information regarding dataset preprocessing to ensure reproducibility of results.
146
+
147
+ # 4.2 Baseline Methods
148
+
149
+ For baselines, we consider PENGI model (Deshmukh et al., 2023) (in ZERO-SHOT setup), COOP (Zhou et al., 2022b) and COCOOP (Zhou et al., 2022a). COOP and COCOOP are prompt learning approaches, originally introduced for VLMs. Both of these approaches remove the requirement of providing handcrafted text prompts and they optimize the input token embedding space of text encoder to enhance accuracy. The only difference between COOP and COCOOP is that the latter incorporates a feedback loop from the output of the audio encoder to the input of the text encoder. We adapt these two approaches for audio-language models by replacing the vision encoder with an audio encoder and present them as baselines for our proposed method. Why PENGI, COOP and CO-COOP as baselines? PENGI is an state-of-the-art ALM that has demonstrated comprehensive evaluation across 21 downstream audio tasks, making it a robust benchmark for comparison. COOP and CO-COOP, on the other hand, are pioneering works on prompt learning in the domain of vision-language models, offering foundational techniques and insights that are highly relevant for our study.
150
+
151
+ # 4.3 Experimental Setup
152
+
153
+ We use pre-trained PENGI (Deshmukh et al., 2023) as the audio-language model for all methods. For all methods, except ZERO-SHOT, we conduct experiments for 50 epochs. Following the few-shot evaluation setup, we use 16 randomly selected samples per class from the training dataset. For inference, we utilize the entire test dataset. In the case of multi-fold datasets, we employ cross-validation and report the average scores. Training is performed using the Stochastic Gradient Descent (SGD) optimizer with a learning rate of 0.05. We use 'Accuracy' as the evaluation metric. For
154
+
155
+ <table><tr><td rowspan="2">METHODS → DATASETS ↓</td><td colspan="2">ZERO SHOT</td><td colspan="4">COOP</td><td colspan="4">COCOOP</td><td colspan="4">PALM(ours)</td></tr><tr><td>-</td><td>SEED-0</td><td>SEED-1</td><td>SEED-2</td><td>AVG</td><td>SEED-0</td><td>SEED-1</td><td>SEED-2</td><td>AVG</td><td>SEED-0</td><td>SEED-1</td><td>SEED-2</td><td>AVG</td><td></td></tr><tr><td>Beijing-Opera</td><td>0.2881</td><td>0.9323</td><td>0.9660</td><td>0.9619</td><td>0.9534</td><td>0.9577</td><td>0.9830</td><td>0.9916</td><td>0.9774</td><td>0.9747</td><td>0.9066</td><td>0.9787</td><td>0.9533</td><td></td></tr><tr><td>CREMA-D</td><td>0.2310</td><td>0.3130</td><td>0.4197</td><td>0.2760</td><td>0.3362</td><td>0.2539</td><td>0.3358</td><td>0.3156</td><td>0.3018</td><td>0.4453</td><td>0.3580</td><td>0.2344</td><td>0.3459</td><td></td></tr><tr><td>ESC50-Actions</td><td>0.6525</td><td>0.9625</td><td>0.9400</td><td>0.9550</td><td>0.9525</td><td>0.9631</td><td>0.9620</td><td>0.9648</td><td>0.9634</td><td>0.9700</td><td>0.9625</td><td>0.9650</td><td>0.9658</td><td></td></tr><tr><td>ESC50</td><td>0.4965</td><td>0.9410</td><td>0.9390</td><td>0.9345</td><td>0.9382</td><td>0.9460</td><td>0.9370</td><td>0.9450</td><td>0.9427</td><td>0.9560</td><td>0.9600</td><td>0.9620</td><td>0.9593</td><td></td></tr><tr><td>GT-Music-Genre</td><td>0.3250</td><td>0.7250</td><td>0.6950</td><td>0.7350</td><td>0.7183</td><td>0.7500</td><td>0.7450</td><td>0.7600</td><td>0.7517</td><td>0.7900</td><td>0.7850</td><td>0.8250</td><td>0.8000</td><td></td></tr><tr><td>NS-Instruments</td><td>0.3291</td><td>0.5728</td><td>0.5562</td><td>0.6177</td><td>0.5822</td><td>0.5996</td><td>0.5740</td><td>0.6438</td><td>0.6058</td><td>0.6394</td><td>0.6108</td><td>0.6648</td><td>0.6383</td><td></td></tr><tr><td>RAVDESS</td><td>0.1222</td><td>0.3849</td><td>0.2688</td><td>0.3422</td><td>0.3320</td><td>0.3727</td><td>0.4399</td><td>0.3523</td><td>0.3883</td><td>0.4562</td><td>0.4603</td><td>0.4623</td><td>0.4596</td><td></td></tr><tr><td>SESA</td><td>0.7238</td><td>0.9143</td><td>0.8952</td><td>0.8762</td><td>0.8952</td><td>0.8381</td><td>0.8762</td><td>0.8952</td><td>0.8698</td><td>0.8857</td><td>0.9143</td><td>0.8857</td><td>0.8952</td><td></td></tr><tr><td>TUT2017</td><td>0.2435</td><td>0.6391</td><td>0.6667</td><td>0.6525</td><td>0.6528</td><td>0.7499</td><td>0.7215</td><td>0.7312</td><td>0.7342</td><td>0.7959</td><td>0.8047</td><td>0.7729</td><td>0.7912</td><td></td></tr><tr><td>UrbanSound8K</td><td>0.5349</td><td>0.7600</td><td>0.7378</td><td>0.7666</td><td>0.7548</td><td>0.7576</td><td>0.7784</td><td>0.7597</td><td>0.7652</td><td>0.8120</td><td>0.8037</td><td>0.8074</td><td>0.8077</td><td></td></tr><tr><td>VocalSound</td><td>0.4197</td><td>0.7162</td><td>0.7485</td><td>0.6642</td><td>0.7096</td><td>0.8081</td><td>0.7825</td><td>0.7463</td><td>0.7790</td><td>0.8101</td><td>0.8168</td><td>0.7964</td><td>0.8078</td><td></td></tr><tr><td>AVERAGE</td><td>0.3969</td><td>0.7146</td><td>0.7121</td><td>0.7074</td><td>0.7114</td><td>0.7276</td><td>0.7396</td><td>0.7369</td><td>0.7347</td><td>0.7759</td><td>0.7621</td><td>0.7595</td><td>0.7658</td><td></td></tr></table>
156
+
157
+ Table 2: Comparison of PALM with Baselines The accuracy scores of the methods (ZERO SHOT (Deshmukh et al., 2023), COOP (Zhou et al., 2022b), COCOOP (Zhou et al., 2022a), and our proposed PALM) across 11 audio recognition datasets are presented, with experiments (excluding ZERO SHOT) run using three seeds. Scores for each seed and the average are reported, with bold indicating the best average score in each row. Compared to the baselines, our proposed method achieves favorable results, with an average improvement of $5.5\%$ over COOP and $3.1\%$ over COCOOP.
158
+
159
+ <table><tr><td>METHOD</td><td>ZERO SHOT</td><td>COOP</td><td>COCOOP</td><td>PALM</td></tr><tr><td># of Parameters</td><td>0</td><td>8,192</td><td>98,880</td><td>12,393</td></tr></table>
160
+
161
+ all methods, except ZERO-SHOT, we run experiments with three different seeds and report the scores for each seed along with the average score. For ZERO-SHOT, we use default text prompt template "This is a recording of {CLASS NAME}" For COOP (Zhou et al., 2022b) and COCOOP (Zhou et al., 2022a) baselines, we set the number context tokens to 16 and context is placed at the front of class names. PENGI model weights are kept "frozen" in all experiments. We use NVIDIA A100-SXM4-40GB GPU for all experiments and Pytorch version 1.11+conda11.3.
162
+
163
+ # 4.4 Results
164
+
165
+ Table 2 presents the performance comparison across 11 datasets using four different methods. Results indicate that PALM generally outperforms COOP and COCOOP, showing an average improvement of $5.5\%$ over COOP and $3.1\%$ over COCOOP. This suggests that PALM is a more effective approach in most cases. Moreover, it is important to note that PALM uses significantly fewer parameters— $87\%$ fewer compared to COCOOP. This reduction in parameters can contribute to more efficient model training and deployment.
166
+
167
+ In the datasets, namely Beijing-Opera, ESC50 and ESC50-Actions, the improvement of PALM over COCOOP is marginal. However, for the
168
+
169
+ Table 3: Number of Learnable Parameters in baselines and PALM.
170
+
171
+ <table><tr><td>METHOD</td><td>AVERAGE ACCURACY</td></tr><tr><td>PALM + COOP</td><td>0.7236</td></tr><tr><td>PALM + COCOOP</td><td>0.7094</td></tr><tr><td>PALM + COCOOP†</td><td>0.7352</td></tr><tr><td>LINEAR PROBING</td><td>0.7299</td></tr><tr><td>PALM†</td><td>0.7160</td></tr><tr><td>PALM</td><td>0.7658</td></tr></table>
172
+
173
+ Table 4: PALM+Baselines Jointly optimizing input and output space of text encoder does not help attain better accuracy. COCOOP† refers to the method where feedback from audio features is incorporated into the text features, rather than being fed directly into the text encoder's input. PALM† denotes experiment in which text features are not used.
174
+
175
+ subsequent datasets, such as CREMA-D, GTMusic-Genre, NS-Instruments, RAVDESS, SESA, TUT2017, UrbanSound8K and VocalSound , the performance improvements are more substantial. This indicates that while PALM provides consistent benefits, the degree of performance gain varies across datasets.
176
+
177
+ # 4.5 Ablative Analysis
178
+
179
+ For ablative analysis, we first show the importance of incorporating learnable context embeddings in text features. In Figure 4, we compare the performance of our method with and without the learnable context embeddings. The results clearly demonstrate that removing the learnable context embeddings leads to a significant drop in performance, underscoring their crucial role in enhancing the model's accuracy. This highlights the effectiveness of our approach in optimizing the feature space of the text encoder.
180
+
181
+ ![](images/a1664098e0b4b7cba2e7e1c017d96abcc58700916335718d3ae696d35b41b271.jpg)
182
+ Figure 4: Comparison of $\mathrm{PALM}^\dagger$ and PALM. Here, $\mathrm{PALM}^\dagger$ refers to setting in which the Learnable Context embeddings (see Figure 3 for reference) have been removed from the feature space of the text encoder. The removal of context embeddings drastically degrades performance, highlighting their importance.
183
+
184
+ ![](images/30288c586805e148ca0ca0f158700a9343da4195a52c04ff452610981dded1fe.jpg)
185
+
186
+ ![](images/fd959722c1838b1bf267bcc1186ad1553e1c4c9e7d72dc674e6326d72adb6fff.jpg)
187
+
188
+ ![](images/e559f9ad7d21268d5f474308a481f270af219a561526eb8f1d5eabc31d2bb6d7.jpg)
189
+
190
+ ![](images/6e543610cc7f8604ed85d61f01d672fadc96819fe6218d959712a1ca4ee3222a.jpg)
191
+
192
+ ![](images/d354cf72881932955a41c5c319edb33907c9fa1e729be2d4a069684acba9858a.jpg)
193
+ Figure 5: Impact of number-of-shots on PALM's performance A higher number of shots generally leads to increased audio classification accuracy using PALM.
194
+
195
+ ![](images/17a5ebc267aab035058fab26439f03de1207981fb11401ed68bdb151f2fa8033.jpg)
196
+
197
+ ![](images/04215b5ea45d742e4701c69745e1e30161f029a6975af2a2ea9c754aab753cdd.jpg)
198
+
199
+ ![](images/d8e70776fe46a82d48edd5b21cec1f890b629e85d052cd129bc84198fba17e72.jpg)
200
+
201
+ We also demonstrate the effect of jointly optimizing the input and output spaces of the text encoder by applying PALM on top of COOP and COCOOP methods, as shown in the first two rows of Table 4. The results suggest that this joint optimization leads to a slight performance drop and is not beneficial. In the third row, we illustrate the impact of incorporating audio features into the text features, showing performance nearly identical to COCOOP, which integrates audio features into the text encoder's input space. Additionally, the fourth row presents the linear-probing (training a linear classifier on top of audio features) results, which underperform compared to PALM. Given that our approach is based on a few-shot setup, we also analyze the impact of the number of shots (training samples per class) on PALM's performance across eight datasets, as
202
+
203
+ shown in Figure 5. As the number of shots in the training dataset increases, the performance of the model tends to improve. However, it should be noted that there is a trade-off between performance and computational load, as more shots also increase the computational requirements.
204
+
205
+ # 5 Conclusion
206
+
207
+ In this study, we investigate the application of prompt learning techniques, originally developed for vision-language models (VLMs), in the context of audio-language models (ALMs). We introduce PALM, a novel method that optimizes the feature space of the text encoder branch, enhancing training efficiency compared to existing methods that operate in the input space. Evaluated on 11 diverse audio recognition datasets, PALM consists
208
+
209
+ tently matches or surpasses established baselines in a few-shot learning setup while reducing computational demands. PALM offers a promising direction for enhancing the performance of ALMs in zero-shot and few-shot learning scenarios, contributing to the broader field of audio recognition and paving the way for future research in multimodal tasks.
210
+
211
+ # Limitations
212
+
213
+ Although we are the first, to the best of our knowledge, to integrate prompt learning techniques originally designed for Vision-Language Models (VLMs) into Audio-Language Models (ALMs) and propose a new method, several aspects still need to be addressed. One critical aspect is to analyze prompt learning performance for domain generalization. This involves evaluating how well the prompts adapt to new, unseen domains and tasks, ensuring robustness and effectiveness across various applications. The second aspect is to analyze prompt learning performance under different types of perturbations in audio data to check its resilience against various types of noise. This analysis is essential for understanding the robustness of the models in real-world scenarios where audio data can be contaminated with background noise, distortions, and other audio artifacts. Thirdly, while our study shows results on audio classification, it is yet to be seen how prompt learning helps in other audio tasks such as speech recognition, audio segmentation, and information retrieval. Investigating the effectiveness of prompt learning across a broader range of audio tasks will provide a more comprehensive understanding of its potential and limitations. Fourthly, our few-shot method is specifically designed for single-label audio classification. Exploring a few-shot setup for multi-label audio classification and adapting PALM for this scenario remains an open question.
214
+
215
+ # References
216
+
217
+ 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 L Menick, Sebastian Borgeaud, Andy Brock, Aida Nematzadeh, Sahand Sharifzadeh, Mikolaj Bińkowski, Ricardo Barreira, Oriol Vinyals, Andrew Zisserman, and Karen Simonyan. 2022. Flamingo: a visual language model for few-shot learning. In Advances in Neural Infor
218
+
219
+ mation Processing Systems, volume 35, pages 23716- 23736. Curran Associates, Inc.
220
+
221
+ 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. 2020. Language models are few-shot learners. In Advances in Neural Information Processing Systems, volume 33, pages 1877-1901. Curran Associates, Inc.
222
+
223
+ Houwei Cao, David G Cooper, Michael K Keutmann, Ruben C Gur, Ani Nenkova, and Ragini Verma. 2014. Crema-d: Crowd-sourced emotional multimodal actors dataset. IEEE transactions on affective computing, 5(4):377-390.
224
+
225
+ Nilaksh Das, Saket Dingliwal, Srikanth Ronanki, Rohit Paturi, David Huang, Prashant Mathur, Jie Yuan, Dhanush Bekal, Xing Niu, Sai Muralidhar Jayanthi, et al. 2024. Speechverse: A large-scale generalizable audio language model. arXiv preprint arXiv:2405.08295.
226
+
227
+ Soham Deshmukh, Benjamin Elizalde, Rita Singh, and Huaming Wang. 2023. Pengi: An audio language model for audio tasks. Advances in Neural Information Processing Systems, 36:18090-18108.
228
+
229
+ Soham Deshmukh, Rita Singh, and Bhiksha Raj. 2024. Domain adaptation for contrastive audio-language models. arXiv preprint arXiv:2402.09585.
230
+
231
+ Benjamin Elizalde, Soham Deshmukh, Mahmoud Al Ismail, and Huaming Wang. 2023. Clap learning audio concepts from natural language supervision. In ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 1-5. IEEE.
232
+
233
+ Jesse Engel, Cinjon Resnick, Adam Roberts, Sander Dieleman, Douglas Eck, Karen Simonyan, and Mohammad Norouzi. 2017. Neural audio synthesis of musical notes with wavenet autoencoders.
234
+
235
+ Yassir Fathullah, Chunyang Wu, Egor Lakomkin, Jun-teng Jia, Yuan Shangguan, Ke Li, Jinxi Guo, Wenhan Xiong, Jay Mahadeokar, Ozlem Kalinli, et al. 2024. Prompting large language models with speech recognition abilities. In ICASSP 2024-2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 13351-13355. IEEE.
236
+
237
+ Yuan Gong, Yu-An Chung, and James Glass. 2021. Psla: Improving audio tagging with pretraining, sampling, labeling, and aggregation. IEEE/ACM Transactions on Audio, Speech, and Language Processing.
238
+
239
+ Jindong Gu, Zhen Han, Shuo Chen, Ahmad Beirami, Bailan He, Gengyuan Zhang, Ruotong Liao, Yao Qin, Volker Tresp, and Philip H. S. Torr. 2023. A systematic survey of prompt engineering on vision-language foundation models. ArXiv, abs/2307.12980.
240
+ Toni Heittola, Annamaria Mesaros, and Tuomas Virtanen. 2017. TUT Acoustic Scenes 2017, Development dataset. Technical report, Department of Signal Processing, Tampere University of Technology.
241
+ Zhifeng Kong, Arushi Goel, Rohan Badlani, Wei Ping, Rafael Valle, and Bryan Catanzaro. 2024. Audio flamingo: A novel audio language model with few-shot learning and dialogue abilities. arXiv preprint arXiv:2402.01831.
242
+ Yiming Li, Xiangdong Wang, and Hong Liu. 2024. Audio-free prompt tuning for language-audio models. In ICASSP 2024-2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 491-495. IEEE.
243
+ Steven R Livingstone and Frank A Russo. 2018. The ryerson audio-visual database of emotional speech and song (ravdess): A dynamic, multimodal set of facial and vocal expressions in north american english. PloS one, 13(5):e0196391.
244
+ Fabio Petroni, Tim Rocktäschel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, Alexander H Miller, and Sebastian Riedel. 2019. Language models as knowledge bases? arXiv preprint arXiv:1909.01066.
245
+ Karol J. Piczak. ESC: Dataset for Environmental Sound Classification. In Proceedings of the 23rd Annual ACM Conference on Multimedia, pages 1015-1018. ACM Press.
246
+ 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 International conference on machine learning, pages 8748-8763. PMLR.
247
+ Justin Salamon, Christopher Jacoby, and Juan Pablo Bello. 2014. A dataset and taxonomy for urban sound research. In Proceedings of the 22nd ACM international conference on Multimedia, pages 1041-1044.
248
+ Tito Spadini. 2019. Sound events for surveillance applications.
249
+ Bob L Sturm. 2012. An analysis of the gtzan music genre dataset. In Proceedings of the second international ACM workshop on Music information retrieval with user-centered and multimodal strategies, pages 7-12.
250
+ Mi Tian, Ajay Srinivasamurthy, Mark Sandler, and Xavier Serra. 2014. A study of instrument-wise onset detection in beijing opera percussion ensembles. In 2014 iiem international conference on acoustics, speech and signal processing (icassp), pages 2159-2163. IEEE.
251
+
252
+ Jingyi Zhang, Jiaxing Huang, Sheng Jin, and Shijian Lu. 2024. Vision-language models for vision tasks: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence.
253
+ Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. 2022a. Conditional prompt learning for vision-language models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 16816-16825.
254
+ Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. 2022b. Learning to prompt for vision-language models. International Journal of Computer Vision (IJCV).
2024/PALM_ Few-Shot Prompt Learning for Audio Language Models/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e3ea4e2ababede32d12dbfe5bc00a2acb913bdafde97c2fd4be177857da6de41
3
+ size 458329
2024/PALM_ Few-Shot Prompt Learning for Audio Language Models/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/PANDA_ Persona Attributes Navigation for Detecting and Alleviating Overuse Problem in Large Language Models/3d541c6b-1d61-43b4-bec7-49ffb71a85cc_content_list.json ADDED
The diff for this file is too large to render. See raw diff