Chelsea707 commited on
Commit
8cb9d99
·
verified ·
1 Parent(s): 7c45343

Add Batch af63a86b-1ad6-492f-80a9-30f4c0341546 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. 2025/CLIPErase_ Efficient Unlearning of Visual-Textual Associations in CLIP/f7b2d98a-d7ad-4832-8457-0c054ab8093c_content_list.json +0 -0
  3. 2025/CLIPErase_ Efficient Unlearning of Visual-Textual Associations in CLIP/f7b2d98a-d7ad-4832-8457-0c054ab8093c_model.json +0 -0
  4. 2025/CLIPErase_ Efficient Unlearning of Visual-Textual Associations in CLIP/f7b2d98a-d7ad-4832-8457-0c054ab8093c_origin.pdf +3 -0
  5. 2025/CLIPErase_ Efficient Unlearning of Visual-Textual Associations in CLIP/full.md +528 -0
  6. 2025/CLIPErase_ Efficient Unlearning of Visual-Textual Associations in CLIP/images.zip +3 -0
  7. 2025/CLIPErase_ Efficient Unlearning of Visual-Textual Associations in CLIP/layout.json +0 -0
  8. 2025/CLaSp_ In-Context Layer Skip for Self-Speculative Decoding/ef9ee0d8-c50a-4f5c-9b72-baac0ef1de40_content_list.json +1612 -0
  9. 2025/CLaSp_ In-Context Layer Skip for Self-Speculative Decoding/ef9ee0d8-c50a-4f5c-9b72-baac0ef1de40_model.json +2191 -0
  10. 2025/CLaSp_ In-Context Layer Skip for Self-Speculative Decoding/ef9ee0d8-c50a-4f5c-9b72-baac0ef1de40_origin.pdf +3 -0
  11. 2025/CLaSp_ In-Context Layer Skip for Self-Speculative Decoding/full.md +303 -0
  12. 2025/CLaSp_ In-Context Layer Skip for Self-Speculative Decoding/images.zip +3 -0
  13. 2025/CLaSp_ In-Context Layer Skip for Self-Speculative Decoding/layout.json +0 -0
  14. 2025/CMHKF_ Cross-Modality Heterogeneous Knowledge Fusion for Weakly Supervised Video Anomaly Detection/c44ffe7f-774e-48fe-b25c-5ae80f879f1d_content_list.json +1869 -0
  15. 2025/CMHKF_ Cross-Modality Heterogeneous Knowledge Fusion for Weakly Supervised Video Anomaly Detection/c44ffe7f-774e-48fe-b25c-5ae80f879f1d_model.json +0 -0
  16. 2025/CMHKF_ Cross-Modality Heterogeneous Knowledge Fusion for Weakly Supervised Video Anomaly Detection/c44ffe7f-774e-48fe-b25c-5ae80f879f1d_origin.pdf +3 -0
  17. 2025/CMHKF_ Cross-Modality Heterogeneous Knowledge Fusion for Weakly Supervised Video Anomaly Detection/full.md +371 -0
  18. 2025/CMHKF_ Cross-Modality Heterogeneous Knowledge Fusion for Weakly Supervised Video Anomaly Detection/images.zip +3 -0
  19. 2025/CMHKF_ Cross-Modality Heterogeneous Knowledge Fusion for Weakly Supervised Video Anomaly Detection/layout.json +0 -0
  20. 2025/CONFETTI_ Conversational Function-Calling Evaluation Through Turn-Level Interactions/30ac32e0-3901-4494-8422-c9487e1d3e1e_content_list.json +2028 -0
  21. 2025/CONFETTI_ Conversational Function-Calling Evaluation Through Turn-Level Interactions/30ac32e0-3901-4494-8422-c9487e1d3e1e_model.json +2494 -0
  22. 2025/CONFETTI_ Conversational Function-Calling Evaluation Through Turn-Level Interactions/30ac32e0-3901-4494-8422-c9487e1d3e1e_origin.pdf +3 -0
  23. 2025/CONFETTI_ Conversational Function-Calling Evaluation Through Turn-Level Interactions/full.md +356 -0
  24. 2025/CONFETTI_ Conversational Function-Calling Evaluation Through Turn-Level Interactions/images.zip +3 -0
  25. 2025/CONFETTI_ Conversational Function-Calling Evaluation Through Turn-Level Interactions/layout.json +0 -0
  26. 2025/CORAL_ Learning Consistent Representations across Multi-step Training with Lighter Speculative Drafter/3f20cb7c-16b0-4d8d-932f-156e46539381_content_list.json +0 -0
  27. 2025/CORAL_ Learning Consistent Representations across Multi-step Training with Lighter Speculative Drafter/3f20cb7c-16b0-4d8d-932f-156e46539381_model.json +0 -0
  28. 2025/CORAL_ Learning Consistent Representations across Multi-step Training with Lighter Speculative Drafter/3f20cb7c-16b0-4d8d-932f-156e46539381_origin.pdf +3 -0
  29. 2025/CORAL_ Learning Consistent Representations across Multi-step Training with Lighter Speculative Drafter/full.md +438 -0
  30. 2025/CORAL_ Learning Consistent Representations across Multi-step Training with Lighter Speculative Drafter/images.zip +3 -0
  31. 2025/CORAL_ Learning Consistent Representations across Multi-step Training with Lighter Speculative Drafter/layout.json +0 -0
  32. 2025/CORDIAL_ Can Multimodal Large Language Models Effectively Understand Coherence Relationships_/475b6b13-7e46-4586-a8fa-36edeef9226c_content_list.json +0 -0
  33. 2025/CORDIAL_ Can Multimodal Large Language Models Effectively Understand Coherence Relationships_/475b6b13-7e46-4586-a8fa-36edeef9226c_model.json +0 -0
  34. 2025/CORDIAL_ Can Multimodal Large Language Models Effectively Understand Coherence Relationships_/475b6b13-7e46-4586-a8fa-36edeef9226c_origin.pdf +3 -0
  35. 2025/CORDIAL_ Can Multimodal Large Language Models Effectively Understand Coherence Relationships_/full.md +609 -0
  36. 2025/CORDIAL_ Can Multimodal Large Language Models Effectively Understand Coherence Relationships_/images.zip +3 -0
  37. 2025/CORDIAL_ Can Multimodal Large Language Models Effectively Understand Coherence Relationships_/layout.json +0 -0
  38. 2025/COSMMIC_ Comment-Sensitive Multimodal Multilingual Indian Corpus for Summarization and Headline Generation/c75c13af-c009-4e64-acf0-2df9fea2af96_content_list.json +0 -0
  39. 2025/COSMMIC_ Comment-Sensitive Multimodal Multilingual Indian Corpus for Summarization and Headline Generation/c75c13af-c009-4e64-acf0-2df9fea2af96_model.json +0 -0
  40. 2025/COSMMIC_ Comment-Sensitive Multimodal Multilingual Indian Corpus for Summarization and Headline Generation/c75c13af-c009-4e64-acf0-2df9fea2af96_origin.pdf +3 -0
  41. 2025/COSMMIC_ Comment-Sensitive Multimodal Multilingual Indian Corpus for Summarization and Headline Generation/full.md +0 -0
  42. 2025/COSMMIC_ Comment-Sensitive Multimodal Multilingual Indian Corpus for Summarization and Headline Generation/images.zip +3 -0
  43. 2025/COSMMIC_ Comment-Sensitive Multimodal Multilingual Indian Corpus for Summarization and Headline Generation/layout.json +0 -0
  44. 2025/CRUXEVAL-X_ A Benchmark for Multilingual Code Reasoning, Understanding and Execution/c417d4e9-7396-4bb9-816a-1fb652465a1c_content_list.json +0 -0
  45. 2025/CRUXEVAL-X_ A Benchmark for Multilingual Code Reasoning, Understanding and Execution/c417d4e9-7396-4bb9-816a-1fb652465a1c_model.json +0 -0
  46. 2025/CRUXEVAL-X_ A Benchmark for Multilingual Code Reasoning, Understanding and Execution/c417d4e9-7396-4bb9-816a-1fb652465a1c_origin.pdf +3 -0
  47. 2025/CRUXEVAL-X_ A Benchmark for Multilingual Code Reasoning, Understanding and Execution/full.md +732 -0
  48. 2025/CRUXEVAL-X_ A Benchmark for Multilingual Code Reasoning, Understanding and Execution/images.zip +3 -0
  49. 2025/CRUXEVAL-X_ A Benchmark for Multilingual Code Reasoning, Understanding and Execution/layout.json +0 -0
  50. 2025/CRiskEval_ A Chinese Multi-Level Risk Evaluation Benchmark Dataset for Large Language Models/a84299f5-3d1c-44be-a92a-894c465d8ec7_content_list.json +0 -0
.gitattributes CHANGED
@@ -1653,3 +1653,67 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
1653
  2025/CKnowEdit_[[:space:]]A[[:space:]]New[[:space:]]Chinese[[:space:]]Knowledge[[:space:]]Editing[[:space:]]Dataset[[:space:]]for[[:space:]]Linguistics,[[:space:]]Facts,[[:space:]]and[[:space:]]Logic[[:space:]]Error[[:space:]]Correction[[:space:]]in[[:space:]]LLMs/9c46e22b-11dc-4988-9112-9c5e78bbf429_origin.pdf filter=lfs diff=lfs merge=lfs -text
1654
  2025/CLAIM_[[:space:]]Mitigating[[:space:]]Multilingual[[:space:]]Object[[:space:]]Hallucination[[:space:]]in[[:space:]]Large[[:space:]]Vision-Language[[:space:]]Models[[:space:]]with[[:space:]]Cross-Lingual[[:space:]]Attention[[:space:]]Intervention/9b3bd558-6763-4bec-b149-4a11b5a9f340_origin.pdf filter=lfs diff=lfs merge=lfs -text
1655
  2025/CLEME2.0_[[:space:]]Towards[[:space:]]Interpretable[[:space:]]Evaluation[[:space:]]by[[:space:]]Disentangling[[:space:]]Edits[[:space:]]for[[:space:]]Grammatical[[:space:]]Error[[:space:]]Correction/c37b87e5-7244-4693-aedb-74b1ec43aca2_origin.pdf filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1653
  2025/CKnowEdit_[[:space:]]A[[:space:]]New[[:space:]]Chinese[[:space:]]Knowledge[[:space:]]Editing[[:space:]]Dataset[[:space:]]for[[:space:]]Linguistics,[[:space:]]Facts,[[:space:]]and[[:space:]]Logic[[:space:]]Error[[:space:]]Correction[[:space:]]in[[:space:]]LLMs/9c46e22b-11dc-4988-9112-9c5e78bbf429_origin.pdf filter=lfs diff=lfs merge=lfs -text
1654
  2025/CLAIM_[[:space:]]Mitigating[[:space:]]Multilingual[[:space:]]Object[[:space:]]Hallucination[[:space:]]in[[:space:]]Large[[:space:]]Vision-Language[[:space:]]Models[[:space:]]with[[:space:]]Cross-Lingual[[:space:]]Attention[[:space:]]Intervention/9b3bd558-6763-4bec-b149-4a11b5a9f340_origin.pdf filter=lfs diff=lfs merge=lfs -text
1655
  2025/CLEME2.0_[[:space:]]Towards[[:space:]]Interpretable[[:space:]]Evaluation[[:space:]]by[[:space:]]Disentangling[[:space:]]Edits[[:space:]]for[[:space:]]Grammatical[[:space:]]Error[[:space:]]Correction/c37b87e5-7244-4693-aedb-74b1ec43aca2_origin.pdf filter=lfs diff=lfs merge=lfs -text
1656
+ 2025/CLIPErase_[[:space:]]Efficient[[:space:]]Unlearning[[:space:]]of[[:space:]]Visual-Textual[[:space:]]Associations[[:space:]]in[[:space:]]CLIP/f7b2d98a-d7ad-4832-8457-0c054ab8093c_origin.pdf filter=lfs diff=lfs merge=lfs -text
1657
+ 2025/CLaSp_[[:space:]]In-Context[[:space:]]Layer[[:space:]]Skip[[:space:]]for[[:space:]]Self-Speculative[[:space:]]Decoding/ef9ee0d8-c50a-4f5c-9b72-baac0ef1de40_origin.pdf filter=lfs diff=lfs merge=lfs -text
1658
+ 2025/CMHKF_[[:space:]]Cross-Modality[[:space:]]Heterogeneous[[:space:]]Knowledge[[:space:]]Fusion[[:space:]]for[[:space:]]Weakly[[:space:]]Supervised[[:space:]]Video[[:space:]]Anomaly[[:space:]]Detection/c44ffe7f-774e-48fe-b25c-5ae80f879f1d_origin.pdf filter=lfs diff=lfs merge=lfs -text
1659
+ 2025/CONFETTI_[[:space:]]Conversational[[:space:]]Function-Calling[[:space:]]Evaluation[[:space:]]Through[[:space:]]Turn-Level[[:space:]]Interactions/30ac32e0-3901-4494-8422-c9487e1d3e1e_origin.pdf filter=lfs diff=lfs merge=lfs -text
1660
+ 2025/CORAL_[[:space:]]Learning[[:space:]]Consistent[[:space:]]Representations[[:space:]]across[[:space:]]Multi-step[[:space:]]Training[[:space:]]with[[:space:]]Lighter[[:space:]]Speculative[[:space:]]Drafter/3f20cb7c-16b0-4d8d-932f-156e46539381_origin.pdf filter=lfs diff=lfs merge=lfs -text
1661
+ 2025/CORDIAL_[[:space:]]Can[[:space:]]Multimodal[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]Effectively[[:space:]]Understand[[:space:]]Coherence[[:space:]]Relationships_/475b6b13-7e46-4586-a8fa-36edeef9226c_origin.pdf filter=lfs diff=lfs merge=lfs -text
1662
+ 2025/COSMMIC_[[:space:]]Comment-Sensitive[[:space:]]Multimodal[[:space:]]Multilingual[[:space:]]Indian[[:space:]]Corpus[[:space:]]for[[:space:]]Summarization[[:space:]]and[[:space:]]Headline[[:space:]]Generation/c75c13af-c009-4e64-acf0-2df9fea2af96_origin.pdf filter=lfs diff=lfs merge=lfs -text
1663
+ 2025/CRUXEVAL-X_[[:space:]]A[[:space:]]Benchmark[[:space:]]for[[:space:]]Multilingual[[:space:]]Code[[:space:]]Reasoning,[[:space:]]Understanding[[:space:]]and[[:space:]]Execution/c417d4e9-7396-4bb9-816a-1fb652465a1c_origin.pdf filter=lfs diff=lfs merge=lfs -text
1664
+ 2025/CRiskEval_[[:space:]]A[[:space:]]Chinese[[:space:]]Multi-Level[[:space:]]Risk[[:space:]]Evaluation[[:space:]]Benchmark[[:space:]]Dataset[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models/a84299f5-3d1c-44be-a92a-894c465d8ec7_origin.pdf filter=lfs diff=lfs merge=lfs -text
1665
+ 2025/CSTree-SRI_[[:space:]]Introspection-Driven[[:space:]]Cognitive[[:space:]]Semantic[[:space:]]Tree[[:space:]]for[[:space:]]Multi-Turn[[:space:]]Question[[:space:]]Answering[[:space:]]over[[:space:]]Extra-Long[[:space:]]Contexts/85211e4f-b591-4d03-abc1-d848646681c8_origin.pdf filter=lfs diff=lfs merge=lfs -text
1666
+ 2025/CU-MAM_[[:space:]]Coherence-Driven[[:space:]]Unified[[:space:]]Macro-Structures[[:space:]]for[[:space:]]Argument[[:space:]]Mining/dc85df86-28dc-4e90-83e0-0b69167f0bdf_origin.pdf filter=lfs diff=lfs merge=lfs -text
1667
+ 2025/CULEMO_[[:space:]]Cultural[[:space:]]Lenses[[:space:]]on[[:space:]]Emotion[[:space:]]-[[:space:]]Benchmarking[[:space:]]LLMs[[:space:]]for[[:space:]]Cross-Cultural[[:space:]]Emotion[[:space:]]Understanding/071310ba-78b5-41e3-a7e7-f4d9379f2eee_origin.pdf filter=lfs diff=lfs merge=lfs -text
1668
+ 2025/CaLMQA_[[:space:]]Exploring[[:space:]]culturally[[:space:]]specific[[:space:]]long-form[[:space:]]question[[:space:]]answering[[:space:]]across[[:space:]]23[[:space:]]languages/fc667d34-6119-44dd-9ee8-5c9246194868_origin.pdf filter=lfs diff=lfs merge=lfs -text
1669
+ 2025/CalibraEval_[[:space:]]Calibrating[[:space:]]Prediction[[:space:]]Distribution[[:space:]]to[[:space:]]Mitigate[[:space:]]Selection[[:space:]]Bias[[:space:]]in[[:space:]]LLMs-as-Judges/303e7ae6-a482-4782-8dd8-90b05d89cc83_origin.pdf filter=lfs diff=lfs merge=lfs -text
1670
+ 2025/Can[[:space:]]External[[:space:]]Validation[[:space:]]Tools[[:space:]]Improve[[:space:]]Annotation[[:space:]]Quality[[:space:]]for[[:space:]]LLM-as-a-Judge_/bbcf6095-5270-4763-a499-f54dccdb303c_origin.pdf filter=lfs diff=lfs merge=lfs -text
1671
+ 2025/Can[[:space:]]Graph[[:space:]]Descriptive[[:space:]]Order[[:space:]]Affect[[:space:]]Solving[[:space:]]Graph[[:space:]]Problems[[:space:]]with[[:space:]]LLMs_/934d083c-7e77-4cf6-a4ed-54b8f1596f29_origin.pdf filter=lfs diff=lfs merge=lfs -text
1672
+ 2025/Can[[:space:]]Graph[[:space:]]Neural[[:space:]]Networks[[:space:]]Learn[[:space:]]Language[[:space:]]with[[:space:]]Extremely[[:space:]]Weak[[:space:]]Text[[:space:]]Supervision_/c269b086-4674-48db-929a-1d4242219229_origin.pdf filter=lfs diff=lfs merge=lfs -text
1673
+ 2025/Can[[:space:]]Indirect[[:space:]]Prompt[[:space:]]Injection[[:space:]]Attacks[[:space:]]Be[[:space:]]Detected[[:space:]]and[[:space:]]Removed_/b752ca84-a948-4f68-b7fe-8f4a799ace32_origin.pdf filter=lfs diff=lfs merge=lfs -text
1674
+ 2025/Can[[:space:]]Knowledge[[:space:]]Graphs[[:space:]]Make[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]More[[:space:]]Trustworthy_[[:space:]]An[[:space:]]Empirical[[:space:]]Study[[:space:]]Over[[:space:]]Open-ended[[:space:]]Question[[:space:]]Answering/6556c690-3a25-498a-b325-7faad22a54d5_origin.pdf filter=lfs diff=lfs merge=lfs -text
1675
+ 2025/Can[[:space:]]LLM[[:space:]]Watermarks[[:space:]]Robustly[[:space:]]Prevent[[:space:]]Unauthorized[[:space:]]Knowledge[[:space:]]Distillation_/72389f15-6a63-40de-a121-763ebb45adfc_origin.pdf filter=lfs diff=lfs merge=lfs -text
1676
+ 2025/Can[[:space:]]LLMs[[:space:]]Deceive[[:space:]]CLIP_[[:space:]]Benchmarking[[:space:]]Adversarial[[:space:]]Compositionality[[:space:]]of[[:space:]]Pre-trained[[:space:]]Multimodal[[:space:]]Representation[[:space:]]via[[:space:]]Text[[:space:]]Updates/c2af92cc-e490-4b4b-ba70-a8029a7532f0_origin.pdf filter=lfs diff=lfs merge=lfs -text
1677
+ 2025/Can[[:space:]]LLMs[[:space:]]Evaluate[[:space:]]Complex[[:space:]]Attribution[[:space:]]in[[:space:]]QA_[[:space:]]Automatic[[:space:]]Benchmarking[[:space:]]using[[:space:]]Knowledge[[:space:]]Graphs/f7c99293-ae19-47ef-9c02-21ab740fa334_origin.pdf filter=lfs diff=lfs merge=lfs -text
1678
+ 2025/Can[[:space:]]LLMs[[:space:]]Ground[[:space:]]when[[:space:]]they[[:space:]](Don’t)[[:space:]]Know_[[:space:]]A[[:space:]]Study[[:space:]]on[[:space:]]Direct[[:space:]]and[[:space:]]Loaded[[:space:]]Political[[:space:]]Questions/80ba5518-d845-4047-be2e-ecea7567714b_origin.pdf filter=lfs diff=lfs merge=lfs -text
1679
+ 2025/Can[[:space:]]LLMs[[:space:]]Help[[:space:]]Uncover[[:space:]]Insights[[:space:]]about[[:space:]]LLMs_[[:space:]]A[[:space:]]Large-Scale,[[:space:]]Evolving[[:space:]]Literature[[:space:]]Analysis[[:space:]]of[[:space:]]Frontier[[:space:]]LLMs/9984d2a3-3a48-41c9-8ddd-f67b58b22d66_origin.pdf filter=lfs diff=lfs merge=lfs -text
1680
+ 2025/Can[[:space:]]LLMs[[:space:]]Identify[[:space:]]Critical[[:space:]]Limitations[[:space:]]within[[:space:]]Scientific[[:space:]]Research_[[:space:]]A[[:space:]]Systematic[[:space:]]Evaluation[[:space:]]on[[:space:]]AI[[:space:]]Research[[:space:]]Papers/d28ce0c3-ecb3-4364-b65b-20474d633c62_origin.pdf filter=lfs diff=lfs merge=lfs -text
1681
+ 2025/Can[[:space:]]LLMs[[:space:]]Reason[[:space:]]About[[:space:]]Program[[:space:]]Semantics_[[:space:]]A[[:space:]]Comprehensive[[:space:]]Evaluation[[:space:]]of[[:space:]]LLMs[[:space:]]on[[:space:]]Formal[[:space:]]Specification[[:space:]]Inference/bc6b282c-4183-48ee-b22b-057b4ef252b5_origin.pdf filter=lfs diff=lfs merge=lfs -text
1682
+ 2025/Can[[:space:]]LLMs[[:space:]]Simulate[[:space:]]L2-English[[:space:]]Dialogue_[[:space:]]An[[:space:]]Information-Theoretic[[:space:]]Analysis[[:space:]]of[[:space:]]L1-Dependent[[:space:]]Biases/ea9a911d-f908-4da5-9508-2d2164d4b229_origin.pdf filter=lfs diff=lfs merge=lfs -text
1683
+ 2025/Can[[:space:]]Language[[:space:]]Models[[:space:]]Reason[[:space:]]about[[:space:]]Individualistic[[:space:]]Human[[:space:]]Values[[:space:]]and[[:space:]]Preferences_/c84b1421-4d95-486f-9ae9-e63ddc0eb616_origin.pdf filter=lfs diff=lfs merge=lfs -text
1684
+ 2025/Can[[:space:]]Language[[:space:]]Models[[:space:]]Replace[[:space:]]Programmers[[:space:]]for[[:space:]]Coding_[[:space:]]REPOCOD[[:space:]]Says[[:space:]]‘Not[[:space:]]Yet’/db95e03c-ef4b-446a-8e86-6b32e7d1ace2_origin.pdf filter=lfs diff=lfs merge=lfs -text
1685
+ 2025/Can[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]Detect[[:space:]]Errors[[:space:]]in[[:space:]]Long[[:space:]]Chain-of-Thought[[:space:]]Reasoning_/dac24fef-7a89-4363-9abc-567fecc359dd_origin.pdf filter=lfs diff=lfs merge=lfs -text
1686
+ 2025/Can[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]Understand[[:space:]]Internet[[:space:]]Buzzwords[[:space:]]Through[[:space:]]User-Generated[[:space:]]Content/d5436b9d-e546-4d8b-bf73-74e6caae8a06_origin.pdf filter=lfs diff=lfs merge=lfs -text
1687
+ 2025/Can[[:space:]]MLLMs[[:space:]]Understand[[:space:]]the[[:space:]]Deep[[:space:]]Implication[[:space:]]Behind[[:space:]]Chinese[[:space:]]Images_/842c499a-e620-412f-8a00-d5743ba91e7f_origin.pdf filter=lfs diff=lfs merge=lfs -text
1688
+ 2025/Can[[:space:]]Multimodal[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]Understand[[:space:]]Spatial[[:space:]]Relations_/003911b7-74c2-4680-bab4-07374707aa38_origin.pdf filter=lfs diff=lfs merge=lfs -text
1689
+ 2025/Can[[:space:]]Third[[:space:]]Parties[[:space:]]Read[[:space:]]Our[[:space:]]Emotions_/8e92ef14-f7ea-4c34-8052-3fbc907cff36_origin.pdf filter=lfs diff=lfs merge=lfs -text
1690
+ 2025/Can[[:space:]]Vision-Language[[:space:]]Models[[:space:]]Evaluate[[:space:]]Handwritten[[:space:]]Math_/fd1c1748-7200-435d-9bda-bebb1aaf1696_origin.pdf filter=lfs diff=lfs merge=lfs -text
1691
+ 2025/Can[[:space:]]We[[:space:]]Further[[:space:]]Elicit[[:space:]]Reasoning[[:space:]]in[[:space:]]LLMs_[[:space:]]Critic-Guided[[:space:]]Planning[[:space:]]with[[:space:]]Retrieval-Augmentation[[:space:]]for[[:space:]]Solving[[:space:]]Challenging[[:space:]]Tasks/e6a70b23-144a-4d16-a7c6-9b24b720e356_origin.pdf filter=lfs diff=lfs merge=lfs -text
1692
+ 2025/Can[[:space:]]You[[:space:]]Really[[:space:]]Trust[[:space:]]Code[[:space:]]Copilot_[[:space:]]Evaluating[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]from[[:space:]]a[[:space:]]Code[[:space:]]Security[[:space:]]Perspective/e9d017ea-7019-41bf-b7fe-ac1589bef76e_origin.pdf filter=lfs diff=lfs merge=lfs -text
1693
+ 2025/Can[[:space:]]a[[:space:]]Single[[:space:]]Model[[:space:]]Master[[:space:]]Both[[:space:]]Multi-turn[[:space:]]Conversations[[:space:]]and[[:space:]]Tool[[:space:]]Use_[[:space:]]CoALM_[[:space:]]A[[:space:]]Unified[[:space:]]Conversational[[:space:]]Agentic[[:space:]]Language[[:space:]]Model/d4fdada6-ef83-4df3-9d9a-0a5effb5b32b_origin.pdf filter=lfs diff=lfs merge=lfs -text
1694
+ 2025/Can[[:space:]]we[[:space:]]Retrieve[[:space:]]Everything[[:space:]]All[[:space:]]at[[:space:]]Once_[[:space:]]ARM_[[:space:]]An[[:space:]]Alignment-Oriented[[:space:]]LLM-based[[:space:]]Retrieval[[:space:]]Method/d899d0c4-5a78-40fb-9ec7-1180a7dccd7e_origin.pdf filter=lfs diff=lfs merge=lfs -text
1695
+ 2025/Can’t[[:space:]]See[[:space:]]the[[:space:]]Forest[[:space:]]for[[:space:]]the[[:space:]]Trees_[[:space:]]Benchmarking[[:space:]]Multimodal[[:space:]]Safety[[:space:]]Awareness[[:space:]]for[[:space:]]Multimodal[[:space:]]LLMs/c367e3e0-2aaa-494d-b561-00f34cfc854a_origin.pdf filter=lfs diff=lfs merge=lfs -text
1696
+ 2025/Capability[[:space:]]Salience[[:space:]]Vector_[[:space:]]Fine-grained[[:space:]]Alignment[[:space:]]of[[:space:]]Loss[[:space:]]and[[:space:]]Capabilities[[:space:]]for[[:space:]]Downstream[[:space:]]Task[[:space:]]Scaling[[:space:]]Law/3b1c48cb-0fbd-40aa-84ea-485101050084_origin.pdf filter=lfs diff=lfs merge=lfs -text
1697
+ 2025/Capture[[:space:]]the[[:space:]]Key[[:space:]]in[[:space:]]Reasoning[[:space:]]to[[:space:]]Enhance[[:space:]]CoT[[:space:]]Distillation[[:space:]]Generalization/807d4d91-9a51-4dff-9fa5-abe5c3193170_origin.pdf filter=lfs diff=lfs merge=lfs -text
1698
+ 2025/Capturing[[:space:]]Author[[:space:]]Self[[:space:]]Beliefs[[:space:]]in[[:space:]]Social[[:space:]]Media[[:space:]]Language/33725851-018a-4d8c-aea3-492413c9f7f6_origin.pdf filter=lfs diff=lfs merge=lfs -text
1699
+ 2025/Causal[[:space:]]Estimation[[:space:]]of[[:space:]]Tokenisation[[:space:]]Bias/9f543582-414c-4ce8-be4e-c4e2499063b5_origin.pdf filter=lfs diff=lfs merge=lfs -text
1700
+ 2025/Causal[[:space:]]Graph[[:space:]]based[[:space:]]Event[[:space:]]Reasoning[[:space:]]using[[:space:]]Semantic[[:space:]]Relation[[:space:]]Experts/016d25ab-f769-42dc-8ec1-583cd73eea85_origin.pdf filter=lfs diff=lfs merge=lfs -text
1701
+ 2025/Caution[[:space:]]for[[:space:]]the[[:space:]]Environment_[[:space:]]Multimodal[[:space:]]LLM[[:space:]]Agents[[:space:]]are[[:space:]]Susceptible[[:space:]]to[[:space:]]Environmental[[:space:]]Distractions/7cc8138e-1450-40fc-9c99-d4fa69996778_origin.pdf filter=lfs diff=lfs merge=lfs -text
1702
+ 2025/Centurio_[[:space:]]On[[:space:]]Drivers[[:space:]]of[[:space:]]Multilingual[[:space:]]Ability[[:space:]]of[[:space:]]Large[[:space:]]Vision-Language[[:space:]]Model/0c2b46cb-ea5a-413e-be04-6426ec7d8b74_origin.pdf filter=lfs diff=lfs merge=lfs -text
1703
+ 2025/Chain-of-Reasoning_[[:space:]]Towards[[:space:]]Unified[[:space:]]Mathematical[[:space:]]Reasoning[[:space:]]in[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]via[[:space:]]a[[:space:]]Multi-Paradigm[[:space:]]Perspective/d57a5a87-2d52-4381-8247-21238dbcf629_origin.pdf filter=lfs diff=lfs merge=lfs -text
1704
+ 2025/ChainEdit_[[:space:]]Propagating[[:space:]]Ripple[[:space:]]Effects[[:space:]]in[[:space:]]LLM[[:space:]]Knowledge[[:space:]]Editing[[:space:]]through[[:space:]]Logical[[:space:]]Rule-Guided[[:space:]]Chains/939b6bd0-895b-4f5f-97bf-48363c52c7bd_origin.pdf filter=lfs diff=lfs merge=lfs -text
1705
+ 2025/ChartCoder_[[:space:]]Advancing[[:space:]]Multimodal[[:space:]]Large[[:space:]]Language[[:space:]]Model[[:space:]]for[[:space:]]Chart-to-Code[[:space:]]Generation/b1a5d413-3ba0-4f61-80c5-bac4836512fb_origin.pdf filter=lfs diff=lfs merge=lfs -text
1706
+ 2025/ChartLens_[[:space:]]Fine-grained[[:space:]]Visual[[:space:]]Attribution[[:space:]]in[[:space:]]Charts/73cc1c48-95b7-485b-b3d5-18aadda7ff65_origin.pdf filter=lfs diff=lfs merge=lfs -text
1707
+ 2025/ChatBench_[[:space:]]From[[:space:]]Static[[:space:]]Benchmarks[[:space:]]to[[:space:]]Human-AI[[:space:]]Evaluation/c66b2e64-a68a-4d4c-b3dd-b4bdb4c11ea2_origin.pdf filter=lfs diff=lfs merge=lfs -text
1708
+ 2025/ChatSOP_[[:space:]]An[[:space:]]SOP-Guided[[:space:]]MCTS[[:space:]]Planning[[:space:]]Framework[[:space:]]for[[:space:]]Controllable[[:space:]]LLM[[:space:]]Dialogue[[:space:]]Agents/271d739d-c765-4bbb-80ad-401a6e34c068_origin.pdf filter=lfs diff=lfs merge=lfs -text
1709
+ 2025/CheXalign_[[:space:]]Preference[[:space:]]fine-tuning[[:space:]]in[[:space:]]chest[[:space:]]X-ray[[:space:]]interpretation[[:space:]]models[[:space:]]without[[:space:]]human[[:space:]]feedback/0accb37d-210b-43da-ad59-614144008375_origin.pdf filter=lfs diff=lfs merge=lfs -text
1710
+ 2025/Cheems_[[:space:]]A[[:space:]]Practical[[:space:]]Guidance[[:space:]]for[[:space:]]Building[[:space:]]and[[:space:]]Evaluating[[:space:]]Chinese[[:space:]]Reward[[:space:]]Models[[:space:]]from[[:space:]]Scratch/e48714c8-74ac-4e08-abd6-a826b150cb53_origin.pdf filter=lfs diff=lfs merge=lfs -text
1711
+ 2025/ChemActor_[[:space:]]Enhancing[[:space:]]Automated[[:space:]]Extraction[[:space:]]of[[:space:]]Chemical[[:space:]]Synthesis[[:space:]]Actions[[:space:]]with[[:space:]]LLM-Generated[[:space:]]Data/18602786-2159-40a0-ac89-f2befa075bc2_origin.pdf filter=lfs diff=lfs merge=lfs -text
1712
+ 2025/ChildMandarin_[[:space:]]A[[:space:]]Comprehensive[[:space:]]Mandarin[[:space:]]Speech[[:space:]]Dataset[[:space:]]for[[:space:]]Young[[:space:]]Children[[:space:]]Aged[[:space:]]3-5/8cb4a899-318b-416b-8bc3-065085a96660_origin.pdf filter=lfs diff=lfs merge=lfs -text
1713
+ 2025/Chinese[[:space:]]Inertial[[:space:]]GAN[[:space:]]for[[:space:]]Handwriting[[:space:]]Signal[[:space:]]Generation[[:space:]]and[[:space:]]Recognition/d00d0819-86e5-4232-af00-ac048c1db331_origin.pdf filter=lfs diff=lfs merge=lfs -text
1714
+ 2025/Chinese[[:space:]]SafetyQA_[[:space:]]A[[:space:]]Safety[[:space:]]Short-form[[:space:]]Factuality[[:space:]]Benchmark[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models/c1997928-5376-4e2d-a3f8-6a5849a9fe06_origin.pdf filter=lfs diff=lfs merge=lfs -text
1715
+ 2025/Chinese[[:space:]]SimpleQA_[[:space:]]A[[:space:]]Chinese[[:space:]]Factuality[[:space:]]Evaluation[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models/67b76823-6ab8-4b95-acea-a866bf436db2_origin.pdf filter=lfs diff=lfs merge=lfs -text
1716
+ 2025/Circuit[[:space:]]Compositions_[[:space:]]Exploring[[:space:]]Modular[[:space:]]Structures[[:space:]]in[[:space:]]Transformer-Based[[:space:]]Language[[:space:]]Models/2cbe8f97-980a-4116-8ae3-2e5c39354c3f_origin.pdf filter=lfs diff=lfs merge=lfs -text
1717
+ 2025/Circuit[[:space:]]Stability[[:space:]]Characterizes[[:space:]]Language[[:space:]]Model[[:space:]]Generalization/5f754489-a22e-45ab-b212-701f2fa00977_origin.pdf filter=lfs diff=lfs merge=lfs -text
1718
+ 2025/CiteEval_[[:space:]]Principle-Driven[[:space:]]Citation[[:space:]]Evaluation[[:space:]]for[[:space:]]Source[[:space:]]Attribution/19b6fd86-c2e8-472c-97d7-d6634e8f328a_origin.pdf filter=lfs diff=lfs merge=lfs -text
1719
+ 2025/CityNavAgent_[[:space:]]Aerial[[:space:]]Vision-and-Language[[:space:]]Navigation[[:space:]]with[[:space:]]Hierarchical[[:space:]]Semantic[[:space:]]Planning[[:space:]]and[[:space:]]Global[[:space:]]Memory/bdd8193e-1f9a-4b9b-8ac6-494089d4594e_origin.pdf filter=lfs diff=lfs merge=lfs -text
2025/CLIPErase_ Efficient Unlearning of Visual-Textual Associations in CLIP/f7b2d98a-d7ad-4832-8457-0c054ab8093c_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/CLIPErase_ Efficient Unlearning of Visual-Textual Associations in CLIP/f7b2d98a-d7ad-4832-8457-0c054ab8093c_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/CLIPErase_ Efficient Unlearning of Visual-Textual Associations in CLIP/f7b2d98a-d7ad-4832-8457-0c054ab8093c_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:885fb59d760a3802526ed8c85356598fefeebdb4aab3bb3cecb467c42e295757
3
+ size 15277105
2025/CLIPErase_ Efficient Unlearning of Visual-Textual Associations in CLIP/full.md ADDED
@@ -0,0 +1,528 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CLIPrase: Efficient Unlearning of Visual-Textual Associations in CLIP
2
+
3
+ Tianyu Yang $^{1}$ , Lisen Dai $^{2}$ , Xiangqi Wang $^{1}$ , Minhao Cheng $^{3}$ , Yapeng Tian $^{4}$ , Xiangliang Zhang $^{1*}$
4
+
5
+ <sup>1</sup>University of Notre Dame
6
+
7
+ $^{2}$ Columbia University
8
+
9
+ 3Pennsylvania State University
10
+
11
+ <sup>4</sup>University of Texas at Dallas
12
+
13
+ # Abstract
14
+
15
+ Machine unlearning (MU) has gained significant attention as a means to remove the influence of specific data from a trained model without requiring full retraining. While progress has been made in unimodal domains like text and image classification, unlearning in multimodal models remains relatively underexplored. In this work, we address the unique challenges of unlearning in CLIP, a prominent multimodal model that aligns visual and textual representations. We introduce CIPErase, a novel approach that disentangles and selectively forgets both visual and textual associations, ensuring that unlearning does not compromise model performance. CIPErase consists of three key modules: a Forgetting Module that disrupts the associations in the forget set, a Retention Module that preserves performance on the retain set, and a Consistency Module that maintains consistency with the original model. Extensive experiments on CIFAR-100, Flickr30K, and Conceptual 12M across five CLIP downstream tasks, as well as an evaluation on diffusion models, demonstrate that CIPErase effectively removes designated associations from multimodal samples in downstream tasks, while preserving the model's performance on the retain set after unlearning. The project's code is available at: https://tianuyang-anna.github.io/ClipErase-ACL/.
16
+
17
+ # 1 Introduction
18
+
19
+ Multimodal models (Kim et al., 2021; Liu et al., 2024a; Yuan et al., 2021; Zhai et al., 2022; Li et al., 2023, 2022) such as CLIP have shown powerful representational capabilities in tasks such as imagetext retrieval and text-to-image generation. However, as these models continue to evolve and expand their applicability, the need for multimodal machine unlearning (MU) becomes increasingly urgent. This is because large-scale multimodal training datasets often contain sensitive or copyrighted
20
+
21
+ ![](images/01f20ed14279c7b344fe9cbea5c257402ef5b4637117b94d5052d00c10a0e2dc.jpg)
22
+ Figure 1: Comparison of Stable Diffusion results using original CLIP, unimodal unlearned CLIP (with Gradient Ascent on the text modality), and our CLIPErase shows that unimodal unlearning introduces distortions and fails to remove targeted concepts, whereas CLIPErase selectively erases them and preserves other details.
23
+
24
+ content whose influence must be removed from the model's learned representations, whether to comply with new regulations, protect user privacy, or address intellectual property concerns.
25
+
26
+ While MU has made notable progress in removing or altering features within single-modality domains like images and text. However, its application to multimodal models remains largely unexplored. These multimodal models learn from interconnected modalities, such as images and text, and represent them in a shared embedding space. Consequently, unimodal MU approaches, which perturb features in only one modality, can unintentionally disrupt crucial cross-modal relationships. This disruption negatively impacts downstream tasks, particularly those relying on precisely learned text-image alignment, and can even render the resulting embeddings unusable. As shown in the first three rows of Figure 1, applying unimodal unlearning to CLIP can compromise embeddings for tasks like image generation with diffusion models, resulting in either a failure to generate meaningful images or
27
+
28
+ an inability to remove the targeted concept.
29
+
30
+ Moreover, multimodal data often exhibits complex associations, where a single word may correspond to multiple concepts across different modalities. For example, the word "apple" could refer to either the tech company or the fruit. Unimodal unlearning methods lack the precision to selectively forget a dedicated concept. Given "apple" as the unlearning target, these approaches would erase all meanings associated with "apple," as shown in Row 4 of Figure 1, instead of targeting a specific sense, such as the fruit.
31
+
32
+ To address these challenges, we introduce CLIPErase, a novel multimodal unlearning framework specifically designed for pretrained CLIP models. Instead of indiscriminately erasing entire concepts, CLIPErase selectively removes specific associations while preserving other learned cross-modal semantic correspondences, thereby preventing disruption of the shared embedding space. This approach offers two key advantages, as demonstrated in Figure 1. First, CLIPErase can "forget" designated concepts without harming unrelated ones like "chairs" or "Teddy Bears". This contrasts with unimodal methods, which often remove these unrelated concepts inadvertently or even fail to generate any concepts. Second, CLIPErase can selectively remove specific associations within multiple mappings. For instance, it can remove the association of "apple" with the fruit while preserving its association with Apple products like iPhones.
33
+
34
+ To precisely refine and control the knowledge stored within CLIP models, CLIPErase consists of three core components: (1) Forgetting Module disrupts the associations between images and text in the forget set by minimizing their cross-modal similarity, effectively removing the targeted connections; (2) Retention Module preserves performance on the retain set by maintaining contrastive alignment, preventing unintended damage to the shared embedding space; (3) Consistency Module maintains consistency by penalizing deviations in the unimodal (text and image) distributions compared to the original model. These three modules work together to efficiently perform unlearning, eliminating the need for retraining from scratch. Our key contributions are highlighted as follows:
35
+
36
+ - We introduce CLIPErase, an innovative framework designed for unlearning pretrained CLIP models, enabling efficient removal of specific multimodal associations without retraining.
37
+
38
+ - CLIPErase utilizes three modules to disrupt multimodal data alignment for targeted unlearning while preserving performance on the retain set.
39
+ - We demonstrate the impact and applicability of CLIPErase through extensive experiments across five downstream tasks, including zero-shot prediction, retrieval, and integration with diffusion models for image generation.
40
+
41
+ # 2 Related Works
42
+
43
+ As machine learning models continue to grow in size and their training datasets become increasingly vast and complex, the concept of MU has garnered significant attention in academic and industry (McConnon, 2024; Pedregosa and Triantafillou, 2023) to promoting AI for social welfare. MU aims to selectively remove specific information—such as private data (Zhang et al., 2023), outdated knowledge (Wang et al., 2023), and harmful content (Liu et al., 2024b) from a trained model without necessitating a complete retraining from scratch (Bourtoule et al., 2019). We next discuss these techniques in the context of text and image modalities.
44
+
45
+ Machine Unlearning in Text: MU has been extensively studied in the text domain. Gupta et al. (2021) first explored adaptive parameter tuning, while Maini et al. (2024), Chen and Yang (2023), and Jia et al. (2024) leveraged gradient-based methods, including second-order optimization and KL-Divergence descent. Eldan and Russinovich (2023) focused on preference optimization. To address high computational costs, Kurmanji et al. (2024) proposed scalable methods to approximate the unlearning process, while Chen et al. (2023) aimed to directly reduce overhead. Ullah et al. (2021) employed differential privacy to enhance trust in MU and derived theoretical guarantees.
46
+
47
+ Machine Unlearning in Vision: Previous works on MU in vision focus on eliminating the influence of specific visual data in classification models (Kurmanji et al., 2024) and unlearning visual patterns in diffusion models (Zhang et al., 2024; Gandikota et al., 2024, 2023; Fuchi and Takagi, 2024).
48
+
49
+ Recently, a few studies emerged to study how to unlearn multimodal embedding models. Cheng and Amiri (2023) introduced a multi-deletion mechanism via modality decoupling, but it relies on randomly sampled unrelated pairs, which can fail on small or imbalanced datasets. Similarly, Kravets and Namboodiri (2024) used Lipschitz regularization and synthetic data for zero-shot forgetting, but
50
+
51
+ ![](images/47f1b37e777bf3c07114c178530558b96df48bb10798e5e948c6646f4cb535c6.jpg)
52
+ Figure 2: Overview of the CLIPErase framework, consisting of three key modules: (a) Forgetting Module: disrupts cross-modal associations within the forget set to weaken the undesired image and text associations; (b) Retention Module: preserves cross-modal associations within the retain set; (c) Consistency Module: maintains consistency with the original model by aligning unimodal representations.
53
+
54
+ face high computational costs and data quality issues. However, both methods are task-specific, focusing on either retrieval or zero-shot tasks. In contrast, our approach unlearns the targeted visual and textual associations within CLIP itself, allowing a wider range of downstream tasks to benefit, such as zero-shot image classification, image/text retrieval, and diffusion-based image generation.
55
+
56
+ # 3 Preliminary
57
+
58
+ The CLIP Model. CLIP is a multimodal pretrained model that learns to align images and their text descriptions in a shared embedding space. It consists of an image encoder $f_{\mathrm{img}}$ and a text encoder $f_{\mathrm{txt}}$ . Given a training dataset $\{(x_i^n, x_t^n)\}_{n=1}^N$ , where $x_i^n$ represents the $n$ -th image and $x_t^n$ its corresponding textual description, CLIP projects these inputs into a common latent space: $f_{\mathrm{img}}(x_i^n) \in \mathbb{R}^d$ and $f_{\mathrm{txt}}(x_t^n) \in \mathbb{R}^d$ , which are normalized feature embeddings for images and texts, respectively.
59
+
60
+ CLIP is trained using a contrastive loss that optimizes alignment between matched image-text pairs while pushing apart mismatched pairs. For a batch of $N$ image-text pairs, the loss is defined as:
61
+
62
+ $$
63
+ \mathcal {L} = - \frac {1}{N} \sum_ {n = 1} ^ {N} \log \operatorname {s o f t m a x} \left(f _ {\mathrm {i m g}} \left(x _ {i} ^ {n}\right) \cdot f _ {\mathrm {t x t}} \left(x _ {t} ^ {n}\right) / \tau\right) \tag {1}
64
+ $$
65
+
66
+ where $\tau$ is a temperature parameter, and the softmax function normalizes the similarity scores across all text samples in the batch, converting them into a probability distribution.
67
+
68
+ Problem Definition. Consider a pre-trained CLIP model $\Theta$ trained on a dataset $D$ . Our goal is to
69
+
70
+ design an unlearning algorithm that removes the influence of a specified forget set $D_f$ from $\Theta$ without degrading the model's performance on the remaining data, referred to as the retain set $D_r = D - D_f$ . Let $\Theta_u$ be the model undergoing this unlearning process. We aim to achieve that in the unlearned model $\Theta_u$ , images and their corresponding text descriptions in $D_f$ should no longer be aligned. This means that in downstream tasks like image retrieval, an image from $D_f$ will no longer be retrieved by its original associated text description, and vice versa. Meanwhile, the unlearning process should not compromise the model's ability to effectively align images and text from the retain set $D_r$ .
71
+
72
+ # 4 Proposed Method CLIPErase
73
+
74
+ Unlearning in multimodal models like CLIP presents unique challenges. Unlike unimodal models, where information is encoded in a single modality, CLIP relies on the intricate interplay between visual and textual features within a shared embedding space. Consequently, removing the influence of specific data necessitates more than simply adjusting one encoder in isolation. We need a mechanism to precisely disrupt the cross-modal associations learned from the forget set $D_{f}$ while leaving the associations from the retain set $D_{r}$ intact. Traditional MU methods, primarily designed for unimodal settings, are ill-equipped for this task, as they fail to account for the complex relationship between image and text representations in CLIP.
75
+
76
+ To address the unique challenges of unlearning
77
+
78
+ in CLIP, we introduce CLIPErase, a novel unlearning algorithm designed specifically for pre-trained CLIP models. As illustrated in Figure 2, CLIPErase modifies both the image and text encoders of the original CLIP model, $\Theta$ , by integrating three core modules: Forgetting Module, Retention Module, and Consistency Module.
79
+
80
+ # 4.1 Forgetting Module
81
+
82
+ Pre-trained CLIP models capture rich semantic relationships between images and text, making it challenging to induce forgetting of specific concepts without disrupting other learned associations. To address this, we introduce a forget module designed to selectively weaken the image-text binding within the forget set $D_{f}$ . This module operates intentionally by misaligning the visual and textual representations corresponding to $D_{f}$ , ensuring that the model no longer recognizes the cross-modal relationships present in the discarded data.
83
+
84
+ The forget module is guided by the following optimization objective, $\mathcal{L}_{\mathrm{FM}}$ , which minimizes the similarity between image and text features within the forget set. Specifically, $\mathcal{L}_{\mathrm{FM}}$ is defined as:
85
+
86
+ $$
87
+ \mathcal {L} _ {\mathrm {F M}} = \frac {1}{N _ {f}} \sum_ {n = 1} ^ {N _ {f}} \left(f _ {\mathrm {i m g}} \left(x _ {i} ^ {n}\right) \cdot f _ {\mathrm {t x t}} \left(x _ {t} ^ {n}\right)\right) \tag {2}
88
+ $$
89
+
90
+ where $N_{f}$ is the number of samples in $D_{f}$ . By minimizing the raw dot product between the image and text embeddings, we directly disrupt their alignment. This simple approach effectively drives the dot product towards zero or negative values, ensuring that images and text from $D_{f}$ no longer retrieve each other in downstream tasks.
91
+
92
+ # 4.2 Retention Module
93
+
94
+ While the forget module focuses on disrupting the alignment of image-text pairs in the forget set, this process can inadvertently affect the model's performance on the retain set $D_r$ . This is because adjustments to the model's parameters can affect the overall cross-modal representation space, influencing the model's understanding and processing of the retain set.
95
+
96
+ To mitigate this, we introduce a retention module designed to preserve the model's performance on $D_r$ during the unlearning process by minimizing the alignment loss:
97
+
98
+ $$
99
+ \mathcal {L} _ {\mathrm {R M}} = - \frac {1}{N _ {r}} \sum_ {n = 1} ^ {N _ {r}} \log \operatorname {s o f t m a x} \left(f _ {\mathrm {i m g}} \left(x _ {i} ^ {n}\right) \cdot f _ {\mathrm {t x t}} \left(x _ {t} ^ {n}\right) / \tau\right) \tag {3}
100
+ $$
101
+
102
+ where $N_{r}$ is the number of samples in $D_{r}$ . This is the same as the original CLIP contrastive loss function. This choice is motivated by the fact that the contrastive loss effectively maintains the desired image-text alignments within $D_{r}$ . Other loss functions, such as mean squared error (MSE) on the embeddings, would not adequately preserve the structured, pairwise relationships that are fundamental to CLIP's functionality. With contrastive loss, we ensure that each image in $D_{r}$ remains closely aligned with its corresponding text, while being distinct from other image-text pairs. This strategy effectively preserves the model's intended behavior on the retain set. Furthermore, by leveraging CLIP's original training objective, we avoid introducing conflicting learning signals that could hinder the retention of the desired associations.
103
+
104
+ # 4.3 Consistency Module
105
+
106
+ The distinct optimization objectives applied to the forget set $D_{f}$ and the retain set $D_{r}$ may introduce unexpected errors or biases in the model's predictions on $D_{r}$ . To mitigate this risk, we introduce a consistency module that encourages the unlearned model $\Theta_{u}$ to maintain similar behavior to the original model $\Theta$ on the retain set. This is achieved by adding a consistency regularization term, $\mathcal{L}_{\mathrm{CM}}$ , defined as the Kullback-Leibler (KL) divergence between the output distributions of $\Theta_{u}$ and $\Theta$ on $D_{r}$ :
107
+
108
+ $$
109
+ \mathcal {L} _ {\mathrm {C M}} = \frac {1}{N _ {r}} \sum_ {n = 1} ^ {N _ {r}} \left[ \mathrm {K L} \left(\mathbf {p} _ {o} ^ {\mathrm {i m g}} \| \mathbf {p} _ {u} ^ {\mathrm {i m g}}\right) + \mathrm {K L} \left(\mathbf {p} _ {o} ^ {\mathrm {t x t}} \| \mathbf {p} _ {u} ^ {\mathrm {t x t}}\right) \right] \tag {4}
110
+ $$
111
+
112
+ where $\mathbf{p}_o^{\mathrm{img}}$ and $\mathbf{p}_u^{\mathrm{img}}$ are the probability distributions derived from the image embeddings produced by the original model $\Theta$ and the unlearned model $\Theta_u$ after the softmax, respectively. Similarly, $\mathbf{p}_o^{\mathrm{txt}}$ and $\mathbf{p}_u^{\mathrm{txt}}$ represent the distributions derived from the text embeddings of $\Theta$ and $\Theta_u$ , respectively.
113
+
114
+ Combing these three modules, our overall unlearning loss is:
115
+
116
+ $$
117
+ \mathcal {L} = \lambda_ {1} \mathcal {L} _ {\mathrm {R M}} + \lambda_ {2} \mathcal {L} _ {\mathrm {F M}} + \lambda_ {3} \mathcal {L} _ {\mathrm {C M}} \tag {5}
118
+ $$
119
+
120
+ where $\lambda_{1},\lambda_{2}$ , and $\lambda_{3}$ are hyperparameters control the relative importance of each module in the overall unlearning process. These hyperparameters allow us to fine-tune the balance between forgetting the information in $D_{f}$ , retaining performance on $D_{r}$ , and ensuring consistency between the original and unlearned models.
121
+
122
+ <table><tr><td>Task</td><td>Dataset</td><td>Metric</td></tr><tr><td>Zero-shot Prediction &amp; Retrieval</td><td>CIFAR-100,Conceptual 12M</td><td>Accuracy of Df↓, Dr↑</td></tr><tr><td>Image &amp; Text Retrieval</td><td>Flickr30k</td><td>Recall (R@1, R@5, R@10) of Df↓, Dr↑</td></tr><tr><td>Diffusion</td><td>Flickr30k</td><td>Detection Rate</td></tr></table>
123
+
124
+ Table 1: Experimental Setup: Evaluation Tasks, Datasets, Metrics
125
+
126
+ <table><tr><td rowspan="2">Dataset</td><td rowspan="2">Method</td><td colspan="2">ZS Prediction (%)</td><td colspan="2">ZS Retrieval (%)</td></tr><tr><td>Acc.Df↓</td><td>Acc.Dr↑</td><td>Acc.Df↓</td><td>Acc.Dr↑</td></tr><tr><td rowspan="6">CIFAR-100</td><td>CLIP</td><td>86.08</td><td>72.85</td><td>88.61</td><td>73.43</td></tr><tr><td>CLIP+GA</td><td>4.43</td><td>5.22</td><td>0.63</td><td>5.39</td></tr><tr><td>CLIP+GradDiff</td><td>0.00</td><td>89.96</td><td>0.00</td><td>90.64</td></tr><tr><td>CLIP+KL</td><td>91.88</td><td>80.88</td><td>91.77</td><td>81.51</td></tr><tr><td>CLIP+ENMN</td><td>0.00</td><td>12.46</td><td>0.00</td><td>17.94</td></tr><tr><td>CLIPErase (ours)</td><td>0.00</td><td>90.99</td><td>0.00</td><td>91.85</td></tr><tr><td rowspan="5">Conceptual 12M</td><td>CLIP</td><td>96.20</td><td>93.60</td><td>94.48</td><td>92.77</td></tr><tr><td>CLIP+GA</td><td>38.22</td><td>4.15</td><td>1.17</td><td>5.38</td></tr><tr><td>CLIP+GradDiff</td><td>4.96</td><td>97.01</td><td>5.64</td><td>97.46</td></tr><tr><td>CLIP+KL</td><td>99.04</td><td>98.41</td><td>98.83</td><td>98.02</td></tr><tr><td>CLIPErase (ours)</td><td>0.74</td><td>97.10</td><td>0.74</td><td>97.62</td></tr></table>
127
+
128
+ Table 2: Experiment results on CIFAR-100 and Conceptual 12M datasets for Zero-shot (ZS) Prediction and Retrieval tasks.
129
+
130
+ # 5 Experimental Evaluation
131
+
132
+ # 5.1 Experiments Setting
133
+
134
+ Table 1 summarizes our experimental settings, including tasks, datasets, and evaluation metrics. We refer readers to Appendix A for more experiments setting details.
135
+
136
+ Tasks: To evaluate the effectiveness of our method, we conducted experiments on five tasks:
137
+
138
+ 1. Zero-shot Image Prediction: CLIP predicts images by comparing their embeddings with text embeddings of class names and selecting the most similar one. The unlearned model should misclassify images from $D_{f}$ , demonstrating its forgetting ability.
139
+ 2. Zero-shot Text Retrieval: Given an image, CLIP retrieves the most relevant text from a predefined set of class names or concepts based on similarity scores, evaluating its zero-shot semantic alignment.
140
+ 3. Image Retrieval (IR): Given a text query, CLIP retrieves images by ranking them based on similarity to the text embedding.
141
+ 4. Text Retrieval (TR): Given an image, CLIP retrieves text descriptions by ranking them based on similarity to the image embedding.
142
+ 5. Diffusion-based Image Generation: Using Stable Diffusion (Rombach et al., 2022), CLIP's text encoder should fail to generate images containing forgotten content while preserving accuracy for retained elements.
143
+
144
+ Implementation Details: In our experiments, we use three datasets: CIFAR-100 (Krizhevsky et al.,
145
+
146
+ 2009), Conceptual 12M (Changpinyo et al., 2021) and Flickr30K (Bojchevski and Gunnemann, 2017). For CIFAR-100 and Conceptual 12M, we randomly select one or more classes as the forget set. The model is trained for 20 epochs with a batch size of 16, using the Adam optimizer and an initial learning rate of $1 \times 10^{-6}$ . For Flickr30K, the forget set consists of all image-text pairs containing a specific concept (approximately $1\%$ of the dataset). The same training setup is used, except with a lower learning rate of $1 \times 10^{-8}$ . All datasets are split into $70\%$ training and $30\%$ testing. The balance hyperparameters are set as $\lambda_1 = 1$ , $\lambda_2 = \lambda_3 = 3$ . Experiments use the best checkpoint from the validation set. Our model is implemented in PyTorch and trained on an NVIDIA V100.
147
+
148
+ Metrics: Following prior work (Kim et al., 2021), we use two metrics to assess MU efficacy: (1) Retain Set Performance $(D_r\uparrow)$ : evaluates the accuracy for Zero-shot tasks and the Image Diffusion task, as well as recall@1, @5, and @10 for Retrieval tasks. Higher values indicate minimal impact on the retain set after unlearning. (2) Forget Set Performance $(D_f\downarrow)$ : evaluates the same accuracy with (1) but in forget set $D_{f}$ . Lower values indicate more effective unlearning.
149
+
150
+ Baselines: Besides the original CLIP model (Kim et al., 2021), we include the following unlearning methods for comparison:
151
+
152
+ 1. Gradient Ascent (GA) (Yao et al., 2023): Increases prediction errors on the forget set, forcing the model away from its original predictions.
153
+ 2. Gradient Difference (GradDiff) (Liu et al., 2022): Increases errors on the forget set while preserving performance on the retain set.
154
+ 3. KL Minimization (KL) (Maini et al., 2024): Aligns prediction distributions between unlearned and original models for the retain set while increasing errors on the forget set.
155
+ 4. Error Minimization-Maximization Noise (EMMN) (Chundawat et al., 2023): Removes class information using noise-based minimization and maximization of prediction errors.
156
+
157
+ <table><tr><td rowspan="2">Task</td><td rowspan="2">Method</td><td colspan="2">R@1 (%)</td><td colspan="2">R@5 (%)</td><td colspan="2">R@10 (%)</td></tr><tr><td>Df↓</td><td>Dr↑</td><td>Df↓</td><td>Dr↑</td><td>Df↓</td><td>Dr↑</td></tr><tr><td rowspan="6">Image Retrieval</td><td>CLIP</td><td>28.61</td><td>22.76</td><td>56.75</td><td>50.14</td><td>66.73</td><td>60.67</td></tr><tr><td>CLIP+GA</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></tr><tr><td>CLIP+GradDiff</td><td>2.67</td><td>16.26</td><td>6.21</td><td>37.49</td><td>7.82</td><td>47.13</td></tr><tr><td>CLIP+KL</td><td>26.30</td><td>22.94</td><td>53.63</td><td>48.56</td><td>63.17</td><td>58.52</td></tr><tr><td>CLIP+ENMN</td><td>12.54</td><td>19.00</td><td>24.81</td><td>33.23</td><td>49.72</td><td>38.64</td></tr><tr><td>CLIPErase (ours)</td><td>3.37</td><td>17.71</td><td>8.36</td><td>40.24</td><td>10.55</td><td>50.35</td></tr><tr><td rowspan="6">Text Retrieval</td><td>CLIP</td><td>25.04</td><td>19.11</td><td>58.87</td><td>48.82</td><td>68.33</td><td>59.17</td></tr><tr><td>CLIP+GA</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.01</td></tr><tr><td>CLIP+GradDiff</td><td>2.05</td><td>14.10</td><td>6.05</td><td>37.58</td><td>7.28</td><td>47.19</td></tr><tr><td>CLIP+KL</td><td>19.91</td><td>17.17</td><td>49.81</td><td>44.85</td><td>59.52</td><td>54.85</td></tr><tr><td>CLIP+ENMN</td><td>13.53</td><td>14.90</td><td>24.50</td><td>30.01</td><td>29.31</td><td>35.66</td></tr><tr><td>CLIPErase (ours)</td><td>2.35</td><td>13.82</td><td>7.21</td><td>37.06</td><td>8.84</td><td>46.52</td></tr></table>
158
+
159
+ # 5.2 Zero-shot Prediction and Retrieval
160
+
161
+ As shown in Table 2, CLIPErase preserves CLIP's robust performance and achieves superior results after accurately deleting specific information. On the Forget Set, it attains $0\%$ accuracy in both tasks, confirming complete unlearning. $\mathrm{CLIP + GA}$ , $\mathrm{CLIP + GradDiff}$ , and $\mathrm{CLIP + KL}$ leave residual accuracy, while $\mathrm{CLIP + ENMN}$ also reaches $0\%$ , but drastically reduces retention performance to $12.46\%$ in prediction and $17.94\%$ in retrieval. In contrast, CLIPErase excels on the Retain Set with $90.99\%$ in prediction and $91.85\%$ in retrieval, an improvement of $18.14\%$ and $18.42\%$ over the original CLIP. This success arises from CLIPErase's Retention and Consistency Modules, which safeguard knowledge of retained data and enhance alignment between visual and textual features.
162
+
163
+ To achieve finer-grained unlearning on larger, open-domain datasets, we test CLIPErase on Conceptual 12M. Table 2 shows that CLIPErase reduces the Forget Set accuracy to $0.3\%$ in prediction and $0.4\%$ in retrieval, while preserving strong performance on the Retain Set at $94.78\%$ in prediction and $94.81\%$ in retrieval. These findings confirm CLIPErase's ability to generalize to open-domain data, deliver precise unlearning for the Forget Set, and maintain robust performance on the Retain Set, underscoring its potential for broader applications across diverse datasets. In Appendix B, we analyze forget set classes by computing mean and variance, confirming CLIPErase's consistent unlearning.
164
+
165
+ # 5.3 Image Retrieval and Text Retrieval
166
+
167
+ As shown in Table 3, CLIPErase delivers strong performance in both image and text retrieval tasks for multimodal unlearning, surpassing prior methods on the Flickr30K dataset. In image retrieval, CLIPErase significantly outperforms $\mathrm{CLIP + GA}$ , $\mathrm{CLIP + GradDiff}$ , and $\mathrm{CLIP + KL}$ , with notable gains
168
+
169
+ Table 3: Experiment results on the Flickr30K dataset for Retrieval tasks.
170
+
171
+ <table><tr><td rowspan="2">FM</td><td rowspan="2">RM</td><td rowspan="2">CM</td><td colspan="2">Accuracy (%)</td><td colspan="2">Improvement (%)</td></tr><tr><td>↓Df</td><td>↑Dr</td><td>↓Df</td><td>↑Dr</td></tr><tr><td>X</td><td>X</td><td>X</td><td>86.08</td><td>72.85</td><td>-</td><td>-</td></tr><tr><td>✓</td><td>X</td><td>X</td><td>18.57</td><td>64.12</td><td>↓67.5</td><td>↓8.73</td></tr><tr><td>✓</td><td>✓</td><td>X</td><td>9.40</td><td>73.14</td><td>↓76.68</td><td>↑0.56</td></tr><tr><td>✓</td><td>✓</td><td>✓</td><td>0</td><td>90.80</td><td>↓86.08</td><td>↑17.95</td></tr></table>
172
+
173
+ Table 4: Ablation studies on the Forgetting Module (FM), Retention Module (RM), and Consistency Module (CM).
174
+
175
+ in R@1 (17.71%), R@5 (40.24%), and R@10 (50.35%). Similarly, it achieves competitive results in text retrieval, reaching 46.52% in R@10, which is 8.33% higher than CLIP+KL.
176
+
177
+ These results highlight the effectiveness of CLIPErase's Forgetting, Retention, and Consistency Modules. The Forgetting Module successfully reduces model reliance on forgotten data, while the Retention and Consistency Modules preserve performance on the retain set, ensuring robust multimodal unlearning without retraining.
178
+
179
+ # 5.4 Ablation Studies
180
+
181
+ As shown in Table 4, we performed ablation studies on the CIFAR-100 dataset to quantitatively evaluate the impact of the Forgetting Module (FM), Retention Module (RM), and Consistency Module (CM) on the zero-shot prediction task.
182
+
183
+ Effectiveness of FM: Activating the Forgetting Module led to a significant drop in accuracy on the forget set, from $86.08\%$ to $18.57\%$ , indicating that FM effectively disrupted the correspondence between images and texts in the forget set. However, relying solely on FM negatively impacted the retain set performance, reducing its accuracy from $72.85\%$ to $64.12\%$ .
184
+
185
+ Effectiveness of RM: When both the Forgetting Module and Retention Module were activated, the accuracy on the retain set recovered to $73.14\%$ , demonstrating that RM successfully protected the retain set's performance. Simultaneously, the model's accuracy on the forget set further decreased to $9.40\%$ , showing that RM plays a critical role in balancing the task of forgetting specific data while preserving the retain set performance.
186
+
187
+ Effectiveness of CM: When the Consistency Module (CM) was activated alongside FM and RM, the retain set accuracy significantly improved to $90.80\%$ , while the accuracy on the forget set dropped to $0\%$ . This indicates that the model successfully forgot the specified data while maintain
188
+
189
+ ![](images/3d9f641a30bc7ca4216eb61af88b92e5148d714896d6f7c29951d680ff8e330d.jpg)
190
+ Figure 3: Performance across different numbers of Forget Set classes.
191
+
192
+ ing high performance on the retain set. Consistency Module ensures consistency throughout the unlearning process, preventing potential errors or biases introduced by the unlearning process.
193
+
194
+ # 5.5 Robustness and Utility
195
+
196
+ Figure 3 shows experiments with CLIPErase, GradDiff, GA, and the original CLIP across various proportions of forget classes (0%, 3%, 10%, 20%, 30%) on the CIFAR-100 dataset for the zero-shot image classification task. Figure 3 (left) shows the forget accuracy, where CLIPErase demonstrates a significant unlearning effect at different proportions of forget classes. However, for GradDiff and GA, forget accuracy increases as the number of forget classes grows, indicating a worsening unlearning effect. Figure 3 (right) presents the retain accuracy, where CLIPErase maintains performance comparable to CLIP, particularly at lower proportions, while GA shows a sharp decline in retain accuracy as the forget proportion increases. Overall, CLIPErase exhibits strong robustness and utility against the number of forget classes, effectively balancing both forget accuracy and retain accuracy. We further validate CLIPErase's robustness with experiments on Conceptual 12M, detailed in Appendix D.
197
+
198
+ # 5.6 Extending CLIPErase to Other VLMs
199
+
200
+ Although our main study focuses on CLIP, CLIPErase is designed to be modular and model-agnostic, without relying on any CLIP-specific components. To demonstrate its extensibility, we further applied CLIPErase to other vision-language models, including BLIP (Li et al., 2022, 2023), ALBEF (Li et al., 2021), and other transformer-based architectures.
201
+
202
+ To validate this generalizability, we implemented CLIPErase on BLIP-1 (Li et al., 2022) and conducted additional experiments on the CIFAR-100 dataset for the zero-shot prediction task shown on Table 5. We applied our Forgetting, Retention,
203
+
204
+ <table><tr><td>Model</td><td>Acc.Df↓</td><td>Acc.Dr↑</td></tr><tr><td>BLIP</td><td>100.00</td><td>97.07</td></tr><tr><td>BLIP + GA</td><td>0.00</td><td>42.89</td></tr><tr><td>BLIP + GradDiff</td><td>89.73</td><td>40.41</td></tr><tr><td>BLIP + CLIPerase</td><td>0.00</td><td>83.12</td></tr></table>
205
+
206
+ Table 5: Experiment results on CIFAR-100 for Zeroshot (ZS) Prediction task using BLIP.
207
+
208
+ and Consistency Modules without requiring any changes to BLIP's original architecture.
209
+
210
+ We further evaluated the effectiveness of CLIPErase on BLIP and compared it with baseline methods, as shown in Table 5. The original BLIP model retains all information in the forget set with an accuracy of $100.00\%$ and achieves $97.07\%$ on the retain set, indicating no unlearning effect. While $\mathrm{BLIP} + \mathrm{GA}$ and $\mathrm{BLIP} + \mathrm{GradDiff}$ reduce forget-set accuracy to $0.00\%$ and $89.73\%$ respectively, they also lead to a substantial drop in retain-set performance, with accuracies of $42.89\%$ and $40.41\%$ . In contrast, CLIPErase reduces the forget-set accuracy to $0.00\%$ and maintains a strong retain set accuracy of $83.12\%$ . These results demonstrate that CLIPErase enables effective unlearning on BLIP with minimal impact on retained knowledge, highlighting its generalizability beyond CLIP.
211
+
212
+ # 6 Diffusion Model with CLIPErase
213
+
214
+ To further demonstrate the practical impact of CLIPErase and its ability to remove specific associations while preserving other knowledge, we apply it to a text-to-image diffusion model (Rombach et al., 2022). Our goal is to selectively erase targeted object concepts from generated images while maintaining other details. We conduct this experiment using captions from the Flickr30k dataset, which contains real-world images and complex textual descriptions, providing a challenging testbed for evaluating the precision of our unlearning approach. For instance, consider the caption: "A woman holding an apple standing next to a display of oranges, apples, and melons." This caption includes multiple coexisting concepts (woman, apple, oranges, melons). If apple is designated as the target for removal, we assess whether CLIPErase can effectively erase it from the generated image while ensuring that other elements, such as the woman, oranges, and melons, remain present.
215
+
216
+ We generate images using two models: (1) one with the standard CLIP text encoder and (2) another with the CLIP text encoder modified by CLIPErase.
217
+
218
+ ![](images/8507fbc23692f4302379e14de72e5e2f2baa0bacc7e08656ad6c3130e96c842f.jpg)
219
+ Prompt: A girl holding a candy apple and a Stitch from Disney's Lilo and Stitch.
220
+
221
+ ![](images/e3b7782f4437c974e1b67f45627e530a05d45d4ece363ff9a9492b64a570a8bc.jpg)
222
+ Prompt: A bicye is crossing a street.
223
+
224
+ ![](images/0b4aced9dd7d4b5b680cfdb79240f61692d5cc163fb63982b5faca3756b9e5bc.jpg)
225
+ Prompt: A man is sitting on a chair holding a large stuffed animal.
226
+
227
+ ![](images/2b55e35406674aa1f482bc0d5e90a9553339fffb2b5a261b6c2e381fb7318b41.jpg)
228
+ Prompt: A happy baby is waring an elephant costume.
229
+
230
+ ![](images/66f5d86c24c8136240dbb1959cae8aa424fa62132807f0c6ddd25d28169130f6.jpg)
231
+ Figure 5: Attention Heatmaps before unlearning (CLIP) and after unlearning (CLIPErase) on apple images.
232
+
233
+ <table><tr><td>Unlearned Concept</td><td>CLIP(%)</td><td>CLIPerase (%)</td></tr><tr><td>Apple</td><td>100.00</td><td>2.00</td></tr><tr><td>Bicycle</td><td>90.00</td><td>8.00</td></tr><tr><td>Chair</td><td>84.00</td><td>6.00</td></tr><tr><td>Elephant</td><td>88.00</td><td>6.00</td></tr></table>
234
+
235
+ Table 6: Detection rate $(\%)$ of different unlearned concepts in generated images. Lower values indicate more effective removal.
236
+
237
+ We select 50 captions per target concept and generate 400 images per model. For evaluation, we then use a pretrained YOLOv5 (Zhang et al., 2022) detector to identify the presence of the target object in the generated images. The detection rate serves as a metric for evaluating concept removal effectiveness: Detection Rate $= \frac{N_d}{N_g}$ , where $N_{d}$ is the number of images where the target concept is detected, and $N_{g}$ is the total number of generated images. A lower detection rate indicates more effective concept removal.
238
+
239
+ As shown in Figure 4, CLIPerase effectively removes specific target concepts while preserving other relevant concepts in the generated images. Table 6 shows that CLIPerase significantly reduces target concept presence. For example, the detection rate for apple drops from $100.00\%$ (standard CLIP) to $2.00\%$ (CLIPerase), and bicycle from $90.00\%$ to $8.00\%$ , demonstrating successful selective unlearning. We present additional results in Appendix E.
240
+
241
+ ![](images/ec6445711a60b17695faf0ed1bfd5a6b6f342e79f61b753ec1104ac2270e199d.jpg)
242
+ (a) Apple
243
+
244
+ ![](images/166084da891122687ee846038f6c8a0d1c133a7751d9521755a8563f11500ac5.jpg)
245
+ (b) Heatmap before unlearning
246
+
247
+ ![](images/5e21a83eab2f231420efd791ba0b3dea72893f45bc182f6ee266fed85a655f16.jpg)
248
+ (c) Heatmap after unlearning
249
+
250
+ ![](images/22529922ecbcb019add8e5330b1d532ff477eb6880c21436cd53f790f034297f.jpg)
251
+ Figure 4: Comparison of image generation results using the original CLIP and our CLIPErase model in Stable Diffusion with multi-concept prompts. The prompt represents the input to the diffusion model. Blue text denotes concepts unlearned by CLIPErase, while red text highlights concepts that should be retained.
252
+ Figure 6: t-SNE visualizations of text and visual embeddings from the CLIP model (before unlearning, left) and the CLIPErase model (after unlearning, right) on CIFAR-100. The unlearned category is "apple." We use $\circ$ and $\triangle$ to represent visual and text modalities, respectively, with different colors indicating different categories.
253
+
254
+ # 7 Visualization
255
+
256
+ Attention Visualization: In Fig. 5, we visualized the attention heatmaps of the "forget set" before and after the unlearning process. Using "apple" from CIFAR-100 as an example, we presented the original images, the heatmaps generated by the CLIP model, and the heatmaps after unlearning with CIPErase. In the CLIP heatmaps, attention is highly focused on the object, displaying strong visual-semantic alignment. This indicates that CLIP successfully establishes a robust connection between textual and visual semantics. In contrast, after machine unlearning with CIPErase, the heatmaps show that attention becomes more random and dispersed across each patch, no longer concentrated on the relevant object. This suggests that CIPErase effectively disrupts the alignment between text and visual semantics for the data to be unlearned, thus achieving the intended unlearning objective.
257
+
258
+ **Embedding Visualization:** To further investigate the impact of CLIPErase on the retain set within the cross-modal shared representation space, we conducted t-SNE visualizations (Van der Maaten
259
+
260
+ and Hinton, 2008) of the textual and visual embeddings from both the original CLIP model and the CLIPrase model. Specifically, we selected 10 classes from the CIFAR-100 dataset, with the "apple" class serving as the forget set and the remaining classes as the retain set.
261
+
262
+ From the CLIPErase results, we observed that the distance between the textual and visual embeddings of the "apple" class significantly increased, while the embeddings of the other classes remained tightly clustered within their respective categories. This suggests that CLIPErase effectively weakens the association between the textual and visual modalities in the forget set, with minimal impact on the modality associations of the retain set. In summary, CLIPErase can effectively decouple the connection between the textual and visual embeddings of the forget set without affecting the visual-textual associations of the retain set, thus achieving the intended goal of machine unlearning.
263
+
264
+ # 8 Conclusion
265
+
266
+ In this paper, we introduce CLIPErase, a novel machine unlearning framework for multimodal models that selectively removes undesired associations while preserving overall model performance. CLIPErase achieves this by disrupting cross-modal associations for the specified data, effectively "forgetting" the targeted information without compromising the model's ability to perform other tasks. The effectiveness of CLIPErase is demonstrated through extensive experiments on various tasks, including zero-shot prediction, image-text retrieval, and text-to-image generation with diffusion models. The results consistently show that CLIPErase successfully removes targeted associations while maintaining performance on other tasks and data. This highlights CLIPErase's potential for addressing real-world challenges related to privacy preservation, intellectual property protection, and bias mitigation in multimodal learning.
267
+
268
+ # Acknowledgement
269
+
270
+ The authors would like to thank Zheyuan Liu and Professor Meng Jiang from the University of Notre Dame for their valuable feedback and discussions on early versions of this work. This work was supported by NSF Award No. 2333795.
271
+
272
+ # Limitation
273
+
274
+ A key limitation of CLIPErase is the lack of dedicated datasets and benchmarks designed for multimodal machine unlearning. Existing benchmarks are not explicitly constructed to evaluate the effectiveness of multimodal unlearning, limiting comprehensive assessment. Moreover, our work only focus on unlearning multimodel embedding models. We plan to extend our framework to multimodal generative models such as Vision Language Models (VLMs), enabling more direct and effective unlearning of visual-textual associations for privacy preservation, intellectual property protection, and bias mitigation. Further discussions on future directions are provided in Appendix F.
275
+
276
+ # References
277
+
278
+ Aleksandar Bojchevski and Stephan Gunnemann. 2017. Deep gaussian embedding of graphs: Unsupervised inductive learning via ranking. arXiv preprint arXiv:1707.03815.
279
+ Lucas Bourtoule, Varun Chandrasekaran, Christopher A. Choquette-Choo, Hengrui Jia, Adelin Travers, Baiwu Zhang, David Lie, and Nicolas Papernot. 2019. Machine unlearning. 2021 IEEE Symposium on Security and Privacy (SP), pages 141-159.
280
+ Soravit Changpinyo, Piyush Sharma, Nan Ding, and Radu Soricut. 2021. Conceptual $12\mathrm{m}$ : Pushing web-scale image-text pre-training to recognize long-tail visual concepts. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 3558-3568.
281
+ Jiaao Chen and Diyi Yang. 2023. Unlearn what you want to forget: Efficient unlearning for llms. arXiv preprint arXiv:2310.20150.
282
+ Min Chen, Weizhuo Gao, Gaoyang Liu, Kai Peng, and Chen Wang. 2023. Boundary unlearning: Rapid forgetting of deep networks via shifting the decision boundary. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7766-7775.
283
+ Jiali Cheng and Hadi Amiri. 2023. Multidelete for multimodal machine unlearning. arXiv preprint arXiv:2311.12047.
284
+ Vikram S Chundawat, Ayush K Tarun, Murari Mandal, and Mohan Kankanhalli. 2023. Zero-shot machine unlearning. IEEE Transactions on Information Forensics and Security, 18:2345-2354.
285
+ Ronen Eldan and Mark Russinovich. 2023. Who's harry potter? approximate unlearning in llms. arXiv preprint arXiv:2310.02238.
286
+
287
+ Masane Fuchi and Tomohiro Takagi. 2024. Erasing concepts from text-to-image diffusion models with few-shot unlearning. arXiv preprint arXiv:2405.07288.
288
+ Rohit Gandikota, Joanna Materzynska, Jaden Fiotto-Kaufman, and David Bau. 2023. Erasing concepts from diffusion models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 2426-2436.
289
+ Rohit Gandikota, Hadas Orgad, Yonatan Belinkov, Joanna Materzynska, and David Bau. 2024. Unified concept editing in diffusion models. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 5111-5120.
290
+ Varun Gupta, Christopher Jung, Seth Neel, Aaron Roth, Saeed Sharifi-Malvajerdi, and Chris Waites. 2021. Adaptive machine unlearning. Advances in Neural Information Processing Systems, 34:16319-16330.
291
+ Jinghan Jia, Yihua Zhang, Yimeng Zhang, Jiancheng Liu, Bharat Runwal, James Diffenderfer, Bhavya Kailkhura, and Sijia Liu. 2024. Soul: Unlocking the power of second-order optimization for llm unlearning. arXiv preprint arXiv:2404.18239.
292
+ Gwanghyun Kim, Taesung Kwon, and Jong-Chul Ye. 2021. Diffusionclip: Text-guided diffusion models for robust image manipulation. 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 2416-2425.
293
+ Alexey Kravets and Vinay Namboodiri. 2024. Zero-shot class unlearning in clip with synthetic samples. arXiv preprint arXiv:2407.07485.
294
+ Alex Krizhevsky, Geoffrey Hinton, et al. 2009. Learning multiple layers of features from tiny images.
295
+ Meghdad Kurmanji, Peter Triantafillou, Jamie Hayes, and Eleni Triantafillou. 2024. Towards unbounded machine unlearning. Advances in neural information processing systems, 36.
296
+ Junnan Li, Dongxu Li, Silvio Savarese, and Steven Hoi. 2023. Blip-2: Bootstrapping language-image pretraining with frozen image encoders and large language models. In International conference on machine learning, pages 19730-19742. PMLR.
297
+ Junnan Li, Dongxu Li, Caiming Xiong, and Steven Hoi. 2022. Blip: Bootstrapping language-image pretraining for unified vision-language understanding and generation. In International conference on machine learning, pages 12888-12900. PMLR.
298
+ Junnan Li, Ramprasaath Selvaraju, Akhilesh Gotmare, Shafiq Joty, Caiming Xiong, and Steven Chu Hong Hoi. 2021. Align before fuse: Vision and language representation learning with momentum distillation. Advances in neural information processing systems, 34:9694-9705.
299
+ Bo Liu, Qiang Liu, and Peter Stone. 2022. Continual learning and private unlearning. In Conference on Lifelong Learning Agents, pages 243-254. PMLR.
300
+
301
+ Haotian Liu, Chunyuan Li, Qingyang Wu, and Yong Jae Lee. 2024a. Visual instruction tuning. Advances in neural information processing systems, 36.
302
+ Zheyuan Liu, Guangyao Dou, Zhaoxuan Tan, Yijun Tian, and Meng Jiang. 2024b. Towards safer large language models through machine unlearning. ArXiv, abs/2402.10058.
303
+ Pratyush Maini, Zhili Feng, Avi Schwarzschild, Zachary Chase Lipton, and J Zico Kolter. 2024. TOFU: A task of fictitious unlearning for LLMs. In First Conference on Language Modeling.
304
+ Anthony McConnon. 2024. Teaching large language models to "forget" unwanted content. Accessed: 2024-10-09.
305
+ Fabian Pedregosa and Eleni Triantafillou. 2023. Announcing the first machine unlearning challenge. Accessed: 2024-10-09.
306
+ Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. 2022. High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 10684-10695.
307
+ Enayat Ullah, Tung Mai, Anup Rao, Ryan A Rossi, and Raman Arora. 2021. Machine unlearning via algorithmic stability. In Conference on Learning Theory, pages 4126-4142. PMLR.
308
+ Laurens Van der Maaten and Geoffrey Hinton. 2008. Visualizing data using t-sne. Journal of machine learning research, 9(11).
309
+ Lingzhi Wang, Tong Chen, Wei Yuan, Xingshan Zeng, Kam-Fai Wong, and Hongzhi Yin. 2023. Kga: A general machine unlearning framework based on knowledge gap alignment. ArXiv, abs/2305.06535.
310
+ Yuanshun Yao, Xiaojun Xu, and Yang Liu. 2023. Large language model unlearning. arXiv preprint arXiv:2310.10683.
311
+ Lu Yuan, Dongdong Chen, Yi-Ling Chen, Noel Codella, Xiyang Dai, Jianfeng Gao, Houdong Hu, Xuedong Huang, Boxin Li, Chunyuan Li, et al. 2021. Florence: A new foundation model for computer vision. arXiv preprint arXiv:2111.11432.
312
+ Xiaohua Zhai, Xiao Wang, Basil Mustafa, Andreas Steiner, Daniel Keysers, Alexander Kolesnikov, and Lucas Beyer. 2022. Lit: Zero-shot transfer with locked-image text tuning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 18123-18133.
313
+ Gong Zhang, Kai Wang, Xingqian Xu, Zhangyang Wang, and Humphrey Shi. 2024. Forget-me-not: Learning to forget in text-to-image diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1755-1764.
314
+
315
+ Lefeng Zhang, Tianqing Zhu, Haibin Zhang, Ping Xiong, and Wanlei Zhou. 2023. Fedrecovery: Differentially private machine unlearning for federated learning frameworks. IEEE Transactions on Information Forensics and Security, 18:4732-4746.
316
+
317
+ Yu Zhang, Zhongyin Guo, Jianqing Wu, Yuan Tian, Haotian Tang, and Xinming Guo. 2022. Real-time vehicle detection based on improved yolo v5. Sustainability, 14(19):12274.
318
+
319
+ # Appendix
320
+
321
+ In these supplementary materials, we provide details on our experimental settings in Appendix A, and different patch size model results in Appendix B.1. We further analyze variance effects in Appendix C, scalability in Appendix D, additional diffusion model results in Appendix E, and future directions in Appendix F.
322
+
323
+ # A Experiments Setting
324
+
325
+ # A.1 Tasks:
326
+
327
+ 1. Zero-shot Prediction: CLIP is employed to classify images based on a given category label (e.g., "cat," "dog") without training data. The unlearned CLIP is expected to predict a mismatch between the label "dog" and the image of a dog if it belongs to the forget set $(D_f)$ , demonstrating its ability to "forget" specific learned associations.
328
+ 2. Zero-Shot Prediction: CLIP is used to retrieve images matching a text description (e.g., "red car") without task-specific training. In the unlearning scenario, the unlearned CLIP should fail to retrieve images that belong to the forget set, such as cars described as "red car" if they are part of $D_{f}$ , demonstrating its ability to forget these specific multimodal associations without further training.
329
+ 3. Image Retrieval (IR): Given a text query, CLIP retrieves the top- $k$ relevant images. The unlearned CLIP should avoid retrieving images in the forget set, demonstrating the selective forgetting capability while maintaining performance on the retain set.
330
+ 4. Text Retrieval (TR): Given an image query, CLIP retrieves the top- $k$ relevant text descriptions. In the unlearning context, CLIP should fail to retrieve relevant text descriptions for images in the forget set.
331
+ 5. Image Diffusion: We utilize Stable Diffusion, whose text encoder is based on CLIP, to generate images from textual prompts. Under the unlearning scenario, this CLIP-based encoder is expected to
332
+
333
+ "forget" all content in the forget set $(D_f)$ . Consequently, when given a prompt that references any forgotten content, the unlearned model should fail to produce images containing those elements, thus illustrating the selective forgetting capability while still maintaining accurate generation for all other retained content.
334
+
335
+ # A.2 Datasets:
336
+
337
+ For the zero-shot prediction and retrieval tasks, we use the CIFAR-100 dataset (Krizhevsky et al., 2009). CIFAR-100 is an image classification dataset containing 100 categories. It consists of a total of 60,000 images, with 50,000 used for training and 10,000 for testing.
338
+
339
+ Similarly, we also extend our experiments to the Conceptual 12M dataset (Changpinyo et al., 2021), a large-scale, open-domain dataset comprising approximately 12 million image-text pairs sourced from the web. Conceptual 12M provides diverse and natural text descriptions, making it particularly suitable for training multimodal models across various tasks, which allows us to explore whether the CLIPErase can generalize to larger class sets or more diverse real-world data.
340
+
341
+ For the Image Retrieval (IR) and Text Retrieval (TR) tasks, we use the Flickr30K dataset (Bojchevski and Gunnemann, 2017). The dataset contains 31,783 images, each paired with five natural language captions. These images primarily depict daily life scenes. Additionally, for the Image Diffusion task, we generate images using the captions provided in Flickr30K.
342
+
343
+ # A.3 Settings:
344
+
345
+ For CIFAR-100, we randomly select one or multiple classes as the forget set. The model is trained for 20 epochs with a batch size of 16, using Adam and an initial learning rate of $1 \times 10^{-6}$ . The loss weights are set to $\lambda_1 = 1$ , $\lambda_2 = \lambda_3 = 3$ .
346
+
347
+ For CC12M, although it contains 12 million real-world text-image pairs, we faced practical challenges such as broken image links and the extensive time required for data collection. On our servers, the download and cleaning pipeline processes approximately 1,000 text-image pairs per hour, implying that collecting the full dataset would take over 12,000 hours. Due to these constraints, we randomly sampled 120,000 vision-language pairs (1% of CC12M), comprising a Forget Set with 2,284 images and a Retain Set with 117,716 images. For this experiment, we designated the concepts woman and
348
+
349
+ women as the forget targets, and performed Zero-Shot Image and Text Retrieval tasks. The model was trained for 5 epochs with a batch size of 16, using a $70\% -30\%$ train-validation split. We set the learning rate to $1\times 10^{-6}$ , weight decay to $1\times 10^{-5}$ and loss weights to $\lambda_1 = 1,\lambda_2 = \lambda_3 = 3$
350
+
351
+ For Flickr30k, the forget set includes all imagetext pairs containing one concept, comprising $1\%$ of the dataset. The same setup is used, except with an initial learning rate of $1 \times 10^{-8}$ . The loss weights are set to $\lambda_{1} = 1$ , $\lambda_{2} = \lambda_{3} = 3$ .
352
+
353
+ Each experiment use the best checkpoint from the validation set. Our model and code are implemented in PyTorch, with training and evaluation on an NVIDIA Tesla V100-SXM2.
354
+
355
+ # A.4 Evaluation:
356
+
357
+ Following prior work (Kim et al., 2021), we use two metrics to assess MU efficacy: (1) Retain Set Performance $(D_r\uparrow)$ : This metric evaluates the accuracy for Zero-shot tasks and the Image Diffusion task, as well as recall@1, @5, and @10 for Retrieval tasks. Higher values indicate minimal impact on the retain set after unlearning. (2) Forget Set Performance $(D_f\downarrow)$ : Uses the same metrics as $D_r$ . Lower values indicate more effective unlearning.
358
+
359
+ # A.5 Comparison to Prior Work
360
+
361
+ Besides the original CLIP model, we compare our method CLIPErase with commonly known unimodal MU methods when directly applied to CLIP. We omit using prior work (Kravets and Namboodiri, 2024) as a baseline because their code and detailed experimental settings were not released, making it challenging to replicate their results. Especially without access to their synthetic image generation code, it is unable to conduct CLIP unlearning in their setting.
362
+
363
+ Original CLIP Model (Kim et al., 2021): We use the original CLIP model as a baseline to assess the impact of unlearning, ensuring that the model's performance on the retain set remains unaffected.
364
+
365
+ Gradient Ascent (GA) (Yao et al., 2023): This method aims to degrade the model's performance on the forget set by increasing prediction errors, forcing the model behave away from its original predictions.
366
+
367
+ Gradient Difference (GradDiff) (Liu et al., 2022): This method increases errors on the forgetting data while preserving performance on the retain set,
368
+
369
+ achieving the goal of unlearning specific information without impacting retained data.
370
+
371
+ KL Minimization (KL) (Maini et al., 2024): The method ensures consistency on the retain set by comparing the prediction distributions of the unlearned and original models, while increasing errors on the forgetting data.
372
+
373
+ Error Minimization-Maximization Noise (EMMN) (Chundawat et al., 2023): It deletes specific class information from the model using noise-based error minimization and maximization techniques.
374
+
375
+ # A.6 Computational Efficiency
376
+
377
+ We also evaluated the computational burden and scalability of our method, CLIPErase. The average training time per epoch is approximately 39 minutes for CIFAR-100, 98.7 minutes for Conceptual 12M, and 146.88 minutes for Flickr30K on an NVIDIA Tesla V100-SXM2 GPU. Since we did not profile the time consumption across different components of the training pipeline, there may be further opportunities to reduce overhead and improve efficiency.
378
+
379
+ # B Performance Stability and Variance
380
+
381
+ To ensure that CLIPErase consistently performs effective unlearning across various forget sets, it is essential to evaluate not only the average performance but also the variability of the results. To achieve this, we conducted experiments and calculated the mean and variance. A low variance indicates that the method performs uniformly well across different forget sets, while a high variance may suggest sensitivity to specific classes.
382
+
383
+ We conducted experiments on the CIFAR-100 dataset using five randomly selected forget classes: Apple, Camel, Mountain, Porcupine, and Television. For each forget class, we measured the performance of CLIPErase in Zero-Shot Text Retrieval and Zero-Shot Prediction tasks. The performance metrics, including the mean and variance of the results, are summarized in Table 7.
384
+
385
+ The experimental results demonstrate that Zero-Shot Prediction exhibits the most stable forgetting performance, as indicated by the low variance in the forget set performance (0.038%). This suggests that CLIPerase consistently forgets across various classes in this task. In contrast, Zero-Shot Text Retrieval shows a higher variance (13.11%) for the forget set, which reflects the inherent complexity and variability of text-image associations in certain
386
+
387
+ <table><tr><td rowspan="2">Class</td><td colspan="2">ZS Retrieval (%)</td><td colspan="2">ZS Prediction (%)</td></tr><tr><td>Df</td><td>Dr</td><td>Df</td><td>Dr</td></tr><tr><td>Apple</td><td>0.00</td><td>89.41</td><td>0.00</td><td>91.38</td></tr><tr><td>Camel</td><td>0.00</td><td>80.61</td><td>0.00</td><td>78.36</td></tr><tr><td>Mountain</td><td>8.19</td><td>80.81</td><td>0.44</td><td>78.60</td></tr><tr><td>Porcupine</td><td>0.00</td><td>80.28</td><td>0.00</td><td>77.71</td></tr><tr><td>Television</td><td>0.41</td><td>81.72</td><td>0.00</td><td>78.41</td></tr><tr><td>Mean</td><td>1.72</td><td>82.57</td><td>0.09</td><td>80.89</td></tr><tr><td>Variance</td><td>13.11</td><td>14.92</td><td>0.04</td><td>34.48</td></tr></table>
388
+
389
+ Table 7: Performance of CLIPErase on different forget classes in Zero-Shot Prediction and Retrieval tasks. Metrics are reported for Forget Set $(D_{f})$ and Retain Set $(D_{r})$ .
390
+
391
+ classes like Mountain. Despite this variability, the overall mean performance remains low $(1.72\%)$ , indicating effective forgetting.
392
+
393
+ Furthermore, the retain set performance maintains relatively low variance for both tasks (14.92% for Text Retrieval and 34.48% for Image Retrieval), demonstrating that the model consistently retains unrelated concepts across different forget sets. This robustness highlights CLIPErase's ability to perform unlearning reliably without compromising the retention of non-forget classes.
394
+
395
+ Overall, the variance analysis confirms that while different forget sets can influence unlearning performance to some extent, CLIPerase maintains strong stability and low variance across varied forget sets.
396
+
397
+ B.1 More results of different Patch size
398
+
399
+ <table><tr><td rowspan="2">Class</td><td colspan="2">ZS Prediction (%)</td><td colspan="2">ZS Retrieval (%)</td></tr><tr><td>Df</td><td>Dr</td><td>Df</td><td>Dr</td></tr><tr><td>Apple</td><td>00.00</td><td>92.25</td><td>00.00</td><td>91.12</td></tr><tr><td>Baby</td><td>00.00</td><td>92.21</td><td>00.00</td><td>91.08</td></tr><tr><td>Bicycle</td><td>00.00</td><td>92.03</td><td>00.00</td><td>91.23</td></tr><tr><td>Chair</td><td>00.00</td><td>92.14</td><td>00.00</td><td>91.04</td></tr><tr><td>Elephant</td><td>00.00</td><td>92.06</td><td>00.00</td><td>91.10</td></tr></table>
400
+
401
+ Table 8: Performance of CLIPErase on different patch size CLIP.
402
+
403
+ We conducted additional experiments using the Patch-14 size of CLIP to further evaluate CLIPErase's effectiveness in forgetting specific concepts while preserving other concept in the retain set. The evaluation was performed on multiple forget sets using Zero-Shot Retrieval and Zero-Shot Prediction tasks, measuring performance on both the forget set $(D_{f})$ and the retain set $(D_{r})$ .
404
+
405
+ As shown in Table 8, CLIPerase achieves per
406
+
407
+ fect forgetting across all selected forget classes in both retrieval tasks, demonstrating its capability to fully remove targeted concepts. Meanwhile, the accuracy of the retain set remains stable, averaging $0.9214\%$ for text retrieval and $0.9111\%$ for image retrieval. The low variance observed in these results further confirms the robustness of CLIPErase, ensuring reliable and consistent unlearning performance across different patch size CLIP.
408
+
409
+ These findings highlight that CLIPErase effectively eliminates undesired multimodal associations while maintaining generalization for nontargeted concepts, making it a strong and reliable approach for machine unlearning in multimodal models.
410
+
411
+ # C Variance Analysis of Consistency Module
412
+
413
+ To further analyze the impact of Consistency Module (CM), we conducted variance analysis using the results from different forget set classes shown at Table 7. The variance of the forget set performance across classes demonstrates the challenges in forgetting certain classes due to their complexity or dependency with other classes. For example, in Zero-Shot Retrieval, the forget set variance is 13.11, compared to the retain set variance of 14.92. In Zero-Shot Prediction, the forget set variance is much lower at 0.038, while the retain set variance is 34.48. These results highlight that CLIPErase performs consistently across various settings, but certain classes like "Mountain," which appear in complex backgrounds or share features with other classes, are harder to forget completely (e.g., $8.19\%$ accuracy for the forget set in text retrieval). In contrast, more independent classes like "Apple" or "Camel" achieve near-complete forgetting. In summary, RM balances retention and forgetting by prioritizing $D_{r}$ , while Consistency Module stabilizes optimization and strengthens feature separation, leading to improved performance for both $D_{f}$ and $D_{r}$ . The variance analysis further validates the robustness of CLIPErase in handling diverse class types and highlights the importance of Consistency Module in achieving consistent performance.
414
+
415
+ # D Scalability and Robustness
416
+
417
+ To demonstrate the scalability and robustness of CLIPErase, we conducted a series of experiments on the Conceptual 12M (CC12M) dataset with varying sizes and complexities of forget sets. These
418
+
419
+ experiments aimed to evaluate CLIPErase's ability to handle single-class, multi-class, and fine-grained forget sets, as well as its performance on larger datasets.
420
+
421
+ Single-Class Forget Set: First, we evaluated CLIPErase on a single-class forget set to establish baseline performance. We selected "woman" as the forget set target and measured the forgetting performance while maintaining retention for other concepts. The results are shown in Table 9.
422
+
423
+ <table><tr><td rowspan="2">Model</td><td colspan="2">ZS Prediction (%)</td><td colspan="2">ZS Retrieval (%)</td></tr><tr><td>Df</td><td>Dr</td><td>Df</td><td>Dr</td></tr><tr><td>CLIP</td><td>95.32</td><td>93.90</td><td>93.32</td><td>92.96</td></tr><tr><td>CLIP+GA</td><td>0.00</td><td>1.44</td><td>0.11</td><td>0.02</td></tr><tr><td>CLIP+GradDiff</td><td>90.87</td><td>93.92</td><td>91.76</td><td>93.07</td></tr><tr><td>CLIPErase</td><td>0.33</td><td>94.19</td><td>0.42</td><td>93.19</td></tr></table>
424
+
425
+ CLIPErase significantly outperforms other methods in forgetting the target class while maintaining high retention performance, highlighting its effectiveness in single-class unlearning scenarios.
426
+
427
+ Multi-Class Forget Set: To further assess scalability on more complex datasets, we conducted additional experiments using a larger and more diverse forget set. Specifically, we selected keywords such as "woman," "man," "girl," "boy," and "person," resulting in 42,577 samples in the Forget Set and 77,423 samples in the Retain Set. The unlearning process for this larger dataset was completed within 7 hours on an NVIDIA Tesla V100-SXM2 GPU.
428
+
429
+ The results of these experiments are summarized in Table 10. This table compares the performance of the original CLIP model and CLIPErase on both Zero-Shot Retrieval and Zero-Shot Prediction tasks. The comparison demonstrates that CLIPErase effectively forgets the specified set while maintaining high performance on the retain set.
430
+
431
+ Table 9: Performance comparison across models for Zero-Shot Text and Image Retrieval tasks with a single-class forget set.
432
+
433
+ <table><tr><td rowspan="2">Model</td><td colspan="2">ZS Prediction (%)</td><td colspan="2">ZS Retrieval (%)</td></tr><tr><td>Df</td><td>Dr</td><td>Df</td><td>Dr</td></tr><tr><td>CLIP</td><td>93.14</td><td>94.09</td><td>90.43</td><td>93.96</td></tr><tr><td>CLIPErase</td><td>5.75</td><td>92.67</td><td>7.08</td><td>92.38</td></tr></table>
434
+
435
+ Fine-Grained Forget Targets: Additionally,
436
+
437
+ we conducted experiments to simulate more realistic and fine-grained forgetting scenarios. We set "woman" as the forget set target and evaluated the forgetting performance while maintaining retention for other concepts. The results are shown in Table 11.
438
+
439
+ Table 10: Performance of CLIP and CLIPErase on Zero-Shot Text and Image Retrieval tasks with a larger forget set.
440
+
441
+ <table><tr><td rowspan="2">Model</td><td colspan="2">ZS Prediction (%)</td><td colspan="2">ZS Retrieval (%)</td></tr><tr><td>Df</td><td>Dr</td><td>Df</td><td>Dr</td></tr><tr><td>CLIP</td><td>95.32</td><td>93.90</td><td>93.32</td><td>92.96</td></tr><tr><td>CLIP+GA</td><td>0.00</td><td>1.44</td><td>0.11</td><td>0.02</td></tr><tr><td>CLIP+GradDiff</td><td>90.87</td><td>93.92</td><td>91.76</td><td>93.07</td></tr><tr><td>CLIPErase</td><td>0.33</td><td>94.19</td><td>0.42</td><td>93.19</td></tr></table>
442
+
443
+ Table 11: Performance comparison across models for Zero-Shot Text and Image Retrieval tasks with fine-grained forget targets.
444
+
445
+ These experiments demonstrate that CLIPErase maintains computational efficiency and effectively scales to larger and more complex datasets with diverse forget sets. Whether dealing with single-class or multi-class forget sets, CLIPErase consistently achieves robust forgetting while preserving high performance on the retain set. This underscores CLIPErase's practicality and scalability for real-world applications involving large-scale and multifaceted unlearning tasks.
446
+
447
+ # E More Results of Diffusion Models
448
+
449
+ As shown in Figure 7, we present additional results of images generated using diffusion models with two different encoders. CLIPerase successfully eliminates specific target concepts while retaining other relevant concepts in the generated images.
450
+
451
+ # F Discussion and Future Works
452
+
453
+ The proposed CLIPERase method has significant potential in practical applications, especially in addressing ethical and legal concerns related to harmful information and biases in multimodal datasets. In tasks like online antisemitism detection, individual components such as text or images may appear harmless on their own, but when combined, they can convey harmful messages. For example, in an image where the text "Even grandma can see what's going on" seems innocuous at first glance, when paired with an antisemitic image and stereotypical messaging, it transmits damaging, implicit bias. Such hidden biases are especially dangerous in multimodal data. CLIPERase caneffectively decouple these associations, to forget the harmful
454
+
455
+ ![](images/62789ee94c826d43471c0d0ae0d545d2690aca48afd1efe422edb679b0b10355.jpg)
456
+ Original Clip
457
+
458
+ ![](images/9c5e403ad8870b1178ebf533baae62d4d7b3fcbad5a2e2ef18cea9276c93b650.jpg)
459
+ CLIPerase
460
+ Prompt: A girl holding an apple on a stick and a stuff Stitch character.
461
+
462
+ ![](images/f6a50a2d0455be95ad0f37eb640b588940087fe866675ba6bfd870fb2da9ffbc.jpg)
463
+
464
+ ![](images/ff25f5d86ba5561e51d6d74a6a0b273529c4432c4d17bfb0cfef3ca673bf8a48.jpg)
465
+ Prompt: Two girls in metal chairs are laughing together.
466
+
467
+ ![](images/c52ae5338104c227d3136dd9ca2e300f6848df684e38b4945345a7d08d35aa9b.jpg)
468
+
469
+ ![](images/aec44dba65f3c0481f36f5d9d7fa653bb688dbed1ce55e28a6d0ae4bc823801e.jpg)
470
+ Prompt: A young girl about to feed a horse an apple with an older girl helping her.
471
+
472
+ ![](images/b92461d049bed9ff0da827064ef099f0a7ba060553aa15f253e57d789927d1e2.jpg)
473
+ Prompt: A man wearing a reflective vest sits on the sidewalk and holds up pamphlets with bicyeles on the cover.
474
+ Figure 7: Comparison of image generation results using the original CLIP and our CLIPErase model in Stable Diffusion with multi-concept prompts. The prompt represents the input to the diffusion model. Blue text denotes concepts unlearned by CLIPErase, while red text highlights concepts that should be retained.
475
+
476
+ ![](images/3086b9167fca7f54e30e36253cac1ec6d10626c24acf699fa1b4bd28230dc6b1.jpg)
477
+
478
+ ![](images/8336e05d5de0f8feae26bf4bcc8f98f126750afd2dcd1f72a763cdb3a7749081.jpg)
479
+ Original Clip
480
+ Prompt: A man sits in a public place eating an apple.
481
+
482
+ ![](images/abad6e88f626d82389dd09831b028442826f8f005062a1dc86b58caee0b5f1af.jpg)
483
+ CLIPerase
484
+
485
+ ![](images/d41623827a41383768df348ce2cb0551eecaa00efb4a30e5812f8c81270e8ddf.jpg)
486
+ Prompt: Man relaxing in a folding chair on the street.
487
+
488
+ ![](images/1880283614811e27eaf92533027eec4915f1a6c317ff69f9c522e5cd7b892fd0.jpg)
489
+
490
+ ![](images/078334eb2ccdda8fe535ab4a106486701036a6ab2d33f21fae0c4f5004bf7d6e.jpg)
491
+ Prompt: The little boy rides his bicycle in a race.
492
+
493
+ ![](images/440873d3300b59c5b947ee30823fe1d36eef32b99df943b05cf9474315d2cafd.jpg)
494
+
495
+ ![](images/d58cdf745fecdbfb74f1f963fc2b20349d86d037c898e0f4e653fd3b2378b655.jpg)
496
+ Prompt: A man and woman sitting on a bench eating an apple and enjoying the day.
497
+
498
+ ![](images/8820c380b5b3b98a2fde43229e512682096363514dabf084729954a56bdca2d7.jpg)
499
+
500
+ ![](images/298793c76387510235d6a8d29f5255985b8273deee22bff4cfe2746d0959e90d.jpg)
501
+ Original Clip
502
+
503
+ ![](images/e5d5368abb08f3fe66d549de2c198fb097c612ac6df280fba9f06e980b3ee65e.jpg)
504
+ CLIPerase
505
+
506
+ ![](images/09406ae7734877456cc538d6256af6b0204f13670fdce5f8a172ccefc1809bf2.jpg)
507
+ Prompt: A boy wearing a life jacket has an apple in his mouth.
508
+ Prompt: A woman sitting down with her stuff animal and candy apple.
509
+
510
+ ![](images/b025bbba75823c041a63cac8d9c95b67ca566e42c298fcfd538aed59e74a2255.jpg)
511
+
512
+ ![](images/f8ab1aef995b953ca41c1dd491b7707ddb16bee46bfe11df7e832bf330aeda6e.jpg)
513
+ Prompt: A lady laid her bicyele on the green lawn as she lies in a red blanket.
514
+
515
+ ![](images/054a627028ea3be2c81244c64dc1fb6b2b743a1e9e6ffd666de31e80b095fa13.jpg)
516
+
517
+ ![](images/431efa516c75438b6e98419faad79eba9f87a0d71130e1405a7b977475fed4bd.jpg)
518
+ Prompt: A man leans into a car to talk to the driver, as a man on a bicycle looks on.
519
+
520
+ ![](images/0a0ee66399f30843b614b2131e47b73027fe61e9a2ac676c70c08896508d4c73.jpg)
521
+
522
+ links between text and images, thereby mitigating the risk of perpetuating bias.
523
+
524
+ Additionally, CLIPErase holds great potential in safeguarding user privacy. When users request the deletion of specific personal data, CLIPErase can remove any associations between their personal information and multimodal content.
525
+
526
+ In the future, although our current implementation is focused on the CLIP model, the framework can be extended to any modality or multimodal pretrained model, not just CLIP. This broader applicability would enable flexible unlearning across a wide range of systems, making the approach more versatile. Additionally, we aim to apply CLIPErase to Generative AI systems, such as Multimodal Large Language Models (MLLMs), where CLIP-based encoders are widely used. By unlearning at the encoder level, CLIPErase can help address the growing challenges in Generative AI, including the generation of private, malicious, or illegal content, the continuation of biases, and even the risk
527
+
528
+ of weaponizing these models. Our approach can serve as a safeguard, correcting problematic associations and enhancing user privacy, thus providing a safer and more ethical experience in the future of AI development.
2025/CLIPErase_ Efficient Unlearning of Visual-Textual Associations in CLIP/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5238a140e2248f8b8b3ff9e05b36fcf4bf29affc1aeecf895bc55730aad3a577
3
+ size 725314
2025/CLIPErase_ Efficient Unlearning of Visual-Textual Associations in CLIP/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/CLaSp_ In-Context Layer Skip for Self-Speculative Decoding/ef9ee0d8-c50a-4f5c-9b72-baac0ef1de40_content_list.json ADDED
@@ -0,0 +1,1612 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "CLaSp: In-Context Layer Skip for Self-Speculative Decoding",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 181,
8
+ 90,
9
+ 816,
10
+ 112
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Longze Chen $^{1,2*}$ Renke Shan $^{2,5*}$ Huiming Wang $^{3*}$ Lu Wang $^{5}$ Ziqiang Liu $^{1,2}$ Run Luo $^{1,2}$ Jiawei Wang $^{2}$ Hamid Alinejad-Rokny $^{4}$ Min Yang $^{1\\dagger}$",
17
+ "bbox": [
18
+ 142,
19
+ 127,
20
+ 853,
21
+ 161
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "<sup>1</sup> Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences",
28
+ "bbox": [
29
+ 181,
30
+ 162,
31
+ 815,
32
+ 178
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "2 University of Chinese Academy of Sciences 3 Singapore University of Technology and Design",
39
+ "bbox": [
40
+ 102,
41
+ 178,
42
+ 892,
43
+ 195
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "$^{4}$ School of Biomedical Engineering, UNSW Sydney $^{5}$ Ritzz-AI",
50
+ "bbox": [
51
+ 231,
52
+ 195,
53
+ 764,
54
+ 211
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "{lz.chen2, min.yang}@siat.ac.cn",
61
+ "bbox": [
62
+ 341,
63
+ 212,
64
+ 655,
65
+ 227
66
+ ],
67
+ "page_idx": 0
68
+ },
69
+ {
70
+ "type": "text",
71
+ "text": "Abstract",
72
+ "text_level": 1,
73
+ "bbox": [
74
+ 260,
75
+ 261,
76
+ 339,
77
+ 275
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "Speculative decoding (SD) is a promising method for accelerating the decoding process of Large Language Models (LLMs). The efficiency of SD primarily hinges on the consistency between the draft model and the verify model. However, existing drafting approaches typically require additional modules to be trained, which can be challenging to implement and ensure compatibility across various LLMs. In this paper, we propose CLaSp, an in-context layer-skipping strategy for self-speculative decoding. Unlike prior methods, CLaSp does not require additional drafting modules or extra training. Instead, it employs a plug-and-play mechanism by skipping intermediate layers of the verify model to construct a compressed draft model. Specifically, we develop a dynamic programming algorithm that optimizes the layer-skipping process by leveraging the complete hidden states from the last verification stage as an objective. This enables CLaSp to dynamically adjust its layer-skipping strategy after each verification stage, without relying on pre-optimized sets of skipped layers. Experimental results across diverse downstream tasks demonstrate that CLaSp achieves a speedup of $1.3 \\times \\sim 1.7 \\times$ on LLaMA3 series models without altering the original distribution of the generated text.",
84
+ "bbox": [
85
+ 141,
86
+ 290,
87
+ 460,
88
+ 703
89
+ ],
90
+ "page_idx": 0
91
+ },
92
+ {
93
+ "type": "text",
94
+ "text": "1 Introduction",
95
+ "text_level": 1,
96
+ "bbox": [
97
+ 114,
98
+ 730,
99
+ 258,
100
+ 744
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Transformer-based Large Language Models (LLMs) have achieved remarkable success across a wide range of natural language processing applications (Brown et al., 2020; Achiam et al., 2023). Scaling the model size and extending the context window significantly enhance performance (Kaplan et al., 2020; Anil et al., 2023; Reid et al., 2024), but also leads to a rapid increase in",
107
+ "bbox": [
108
+ 112,
109
+ 756,
110
+ 487,
111
+ 885
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "image",
117
+ "img_path": "images/98515af9161ddfaff63c545ab22e6976370d304cbc3928e6cb4caaf1e53d26a8.jpg",
118
+ "image_caption": [
119
+ "Figure 1: Previous Self-SD method vs. CLaSp. Compared to the previous Self-SD method, which requires costly Bayesian optimization on training dataset to select a fixed set of skipped layers, CLaSp employs a dynamic layer-skipping strategy that adjusts in real-time based on context."
120
+ ],
121
+ "image_footnote": [],
122
+ "bbox": [
123
+ 524,
124
+ 267,
125
+ 870,
126
+ 506
127
+ ],
128
+ "page_idx": 0
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "inference latency. This latency primarily stems from the autoregressive nature of LLMs, where model parameters must be loaded into GPU SRAM for each token generation, resulting in underutilization of computational cores during the decoding stage (Patterson, 2004; Shazeer, 2019; Agrawal et al., 2023).",
133
+ "bbox": [
134
+ 507,
135
+ 643,
136
+ 882,
137
+ 755
138
+ ],
139
+ "page_idx": 0
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "Inspired by speculative execution in computer systems (Burton, 1985; Hennessy and Patterson, 2012), speculative decoding (SD) (Xia et al., 2023; Leviathan et al., 2023; Chen et al., 2023) is proposed as a lossless autoregressive decoding acceleration technique. SD accelerates autoregressive decoding by introducing an efficient draft model to pre-generate tokens, which are subsequently validated by a slower verify model in parallel. This technique significantly reduces the number",
144
+ "bbox": [
145
+ 507,
146
+ 760,
147
+ 884,
148
+ 920
149
+ ],
150
+ "page_idx": 0
151
+ },
152
+ {
153
+ "type": "page_footnote",
154
+ "text": "*Equal contribution.",
155
+ "bbox": [
156
+ 134,
157
+ 894,
158
+ 260,
159
+ 906
160
+ ],
161
+ "page_idx": 0
162
+ },
163
+ {
164
+ "type": "page_footnote",
165
+ "text": "† Corresponding author.",
166
+ "bbox": [
167
+ 136,
168
+ 906,
169
+ 280,
170
+ 920
171
+ ],
172
+ "page_idx": 0
173
+ },
174
+ {
175
+ "type": "page_number",
176
+ "text": "31608",
177
+ "bbox": [
178
+ 473,
179
+ 927,
180
+ 524,
181
+ 940
182
+ ],
183
+ "page_idx": 0
184
+ },
185
+ {
186
+ "type": "footer",
187
+ "text": "Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 31608-31618",
188
+ "bbox": [
189
+ 82,
190
+ 945,
191
+ 912,
192
+ 957
193
+ ],
194
+ "page_idx": 0
195
+ },
196
+ {
197
+ "type": "footer",
198
+ "text": "July 27 - August 1, 2025 ©2025 Association for Computational Linguistics",
199
+ "bbox": [
200
+ 268,
201
+ 958,
202
+ 727,
203
+ 971
204
+ ],
205
+ "page_idx": 0
206
+ },
207
+ {
208
+ "type": "text",
209
+ "text": "of forward passes required by the verify model, alleviating memory-bound inefficiencies caused by frequent parameter access. While effective, SD relies on finding or training a suitable draft model that can closely mimic the behavior of the verify model. This requirement is feasible for open-sourced model families, such as LLaMA series (Touvron et al., 2023a,b; Dubey et al., 2024; Yang et al., 2024), but becomes prohibitively difficult for specialized LLMs that lack pre-existing compatible draft model counterparts.",
210
+ "bbox": [
211
+ 112,
212
+ 84,
213
+ 489,
214
+ 261
215
+ ],
216
+ "page_idx": 1
217
+ },
218
+ {
219
+ "type": "text",
220
+ "text": "The difficulty lies in achieving consistency between the draft model and the verify model. For general-purpose models, lightweight modules have been proposed as substitutes for the draft model (Cai et al., 2024; Li et al., 2024b; Du et al., 2024; Liu et al., 2024). These modules are designed to avoid retraining from scratch, but they struggle to generalize across diverse tasks and contexts. As a result, their acceptance rates drop sharply when handling unseen tasks, making them unsuitable for applications requiring robust performance across varying scenarios.",
221
+ "bbox": [
222
+ 115,
223
+ 262,
224
+ 489,
225
+ 453
226
+ ],
227
+ "page_idx": 1
228
+ },
229
+ {
230
+ "type": "text",
231
+ "text": "Self-speculative decoding (Self-SD) (Zhang et al., 2024) addresses the challenge of compatibility by using parts of the verify model itself as a compressed draft model, bypassing the need for additional modules or training. This approach creates the draft model by sparsifying intermediate layers of the verify model, effectively skipping certain computations. Similar to methods that require training, it also lacks robust generalization and heavily relies on an time-consuming Bayesian optimization process. SWIFT (Xia et al., 2024a) extends Self-SD by dynamically optimizing skipped layers as the number of user requests increases, but its effectiveness diminishes when handling sparse or unique task data.",
232
+ "bbox": [
233
+ 115,
234
+ 455,
235
+ 489,
236
+ 695
237
+ ],
238
+ "page_idx": 1
239
+ },
240
+ {
241
+ "type": "text",
242
+ "text": "To bridge this gap, we propose CLaSp, a dynamic in-context layer-skipping method for self-speculative decoding. Unlike existing methods, CLaSp dynamically adjusts the skipped layer set at each decoding step based on the current context, eliminating the need for pre-optimization or retraining (see Figure 1). Our approach leverages the observation of slowly changing embeddings across layers (Liu et al., 2023) and employs a dynamic programming algorithm to identify the optimal skipped layers with minimal additional latency. By using the complete hidden states from the last verification step as ground truth, CLaSp predicts and adjusts the draft model's sparsity in real-time,",
243
+ "bbox": [
244
+ 115,
245
+ 696,
246
+ 489,
247
+ 920
248
+ ],
249
+ "page_idx": 1
250
+ },
251
+ {
252
+ "type": "text",
253
+ "text": "achieving high acceptance rates while maintaining acceleration benefits.",
254
+ "bbox": [
255
+ 509,
256
+ 84,
257
+ 880,
258
+ 115
259
+ ],
260
+ "page_idx": 1
261
+ },
262
+ {
263
+ "type": "text",
264
+ "text": "We evaluate CLaSp on the LLaMA3 series models using Spec-Bench (Xia et al., 2024b), a comprehensive benchmark for speculative decoding across diverse scenarios. CLaSp achieves $1.3 \\times \\sim 1.7 \\times$ wallclock time speedup compared to conventional autoregressive decoding while preserving the original distribution of generated text. Our contributions are summarized as follows:",
265
+ "bbox": [
266
+ 507,
267
+ 116,
268
+ 884,
269
+ 243
270
+ ],
271
+ "page_idx": 1
272
+ },
273
+ {
274
+ "type": "list",
275
+ "sub_type": "text",
276
+ "list_items": [
277
+ "- We introduce CLaSp, a self-speculative decoding framework that dynamically adjusts the layer-skipping strategy based on context.",
278
+ "- We propose performance optimization strategies in CLaSp to fully leverage GPU parallelism, making the extra latency from layer optimization almost negligible.",
279
+ "- We conduct extensive experiments on Spec-Bench, showing that CLaSp consistently achieves $1.3 \\times \\sim 1.7 \\times$ speedup without training, and provide a detailed analysis of its key hyper-parameters."
280
+ ],
281
+ "bbox": [
282
+ 531,
283
+ 254,
284
+ 884,
285
+ 464
286
+ ],
287
+ "page_idx": 1
288
+ },
289
+ {
290
+ "type": "text",
291
+ "text": "2 Related Work",
292
+ "text_level": 1,
293
+ "bbox": [
294
+ 509,
295
+ 478,
296
+ 665,
297
+ 493
298
+ ],
299
+ "page_idx": 1
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "Speculative Decoding. Speculative decoding (Xia et al., 2023; Leviathan et al., 2023; Chen et al., 2023) has been proposed as an effective strategy for lossless acceleration of LLM inference. Some approaches aim to reduce the high cost of training from scratch by introducing lightweight modules as draft model. Medusa (Cai et al., 2024) trains multiple decoding heads to predict the next $n$ tokens in parallel. EAGLE and EAGLE-2 (Li et al., 2024b,a) integrate a lightweight plug-in (a single transformer decoder layer) to existing LLMs. Glimpse Draft Model (Du et al., 2024) reuses the verify model's KV cache to generate candidate tokens that are more likely to be accepted by the verify model. However, these approaches rely heavily on pre-trained modules optimized for specific contexts, making them less effective for tasks with unseen data.",
304
+ "bbox": [
305
+ 507,
306
+ 502,
307
+ 882,
308
+ 790
309
+ ],
310
+ "page_idx": 1
311
+ },
312
+ {
313
+ "type": "text",
314
+ "text": "Retrieval-based methods, such as REST (He et al., 2024) and Prompt Lookup Decoding (Saxena, 2023), replace the draft model by retrieving relevant drafts from a text corpus or context based on input prompts. While these methods reduce reliance on explicit draft model models, their performance is highly sensitive to the quality and relevance of the retrieved drafts.",
315
+ "bbox": [
316
+ 507,
317
+ 791,
318
+ 884,
319
+ 919
320
+ ],
321
+ "page_idx": 1
322
+ },
323
+ {
324
+ "type": "page_number",
325
+ "text": "31609",
326
+ "bbox": [
327
+ 475,
328
+ 927,
329
+ 524,
330
+ 940
331
+ ],
332
+ "page_idx": 1
333
+ },
334
+ {
335
+ "type": "text",
336
+ "text": "To address the challenges of designing compatible draft model, Self-SD (Zhang et al., 2024) and SWIFT (Xia et al., 2024a) directly leverage parts of the verify model as a compressed draft model by skipping intermediate layers of the original LLM. Triforce (Sun et al., 2024) employs a partial KV cache as the draft model and a full KV cache as the verify model, reducing inference latency by minimizing I/O operations, especially in long-context tasks. Despite these innovations, static configurations for layer skipping prevent these methods from dynamically adapting to changing task requirements or contexts, limiting their efficiency and generalizability.",
337
+ "bbox": [
338
+ 112,
339
+ 84,
340
+ 489,
341
+ 309
342
+ ],
343
+ "page_idx": 2
344
+ },
345
+ {
346
+ "type": "text",
347
+ "text": "To further enhance speculative decoding, tree-based attention mechanisms (Miao et al., 2024; Cai et al., 2024; Chen et al., 2024; Svirschevski et al., 2024) extend the decoding process from generating a single candidate sequence to exploring a candidate tree. By providing the verify model with multiple options for validation, these methods improve the acceptance rate of speculative decoding.",
348
+ "bbox": [
349
+ 112,
350
+ 311,
351
+ 489,
352
+ 441
353
+ ],
354
+ "page_idx": 2
355
+ },
356
+ {
357
+ "type": "text",
358
+ "text": "Layer-wise Sparsity. Layer redundancy in LLMs has been extensively studied, with methods such as LayerDrop (Fan et al., 2020), LayerSkip (Elhoushi et al., 2024), structured pruning (Zhang and He, 2020), SkipDecode (Corro et al., 2023), and LayerSharing (Zhang et al., 2023) demonstrating that not all layers are equally important. These methods suggest that the importance of each layer varies depending on the task and context, and that certain layers can be skipped or removed without significantly affecting model performance. However, determining which layers to skip or optimize for different downstream tasks remains a substantial challenge.",
359
+ "bbox": [
360
+ 112,
361
+ 453,
362
+ 489,
363
+ 678
364
+ ],
365
+ "page_idx": 2
366
+ },
367
+ {
368
+ "type": "text",
369
+ "text": "Deja Vu (Liu et al., 2023) and LISA (pan, 2024) demonstrate the potential of leveraging sparsity to accelerate LLM inference, either by exploiting context sparsity or by optimizing a subset of layers during training. Although effective, these methods rely on lossy sparsification techniques, introducing discrepancies between the sparse and original distributions. Similarly, Glavas et al. (2024) explore dynamic inference methods such as layer skipping and early exiting, which enable task-dependent acceleration but lack compatibility with speculative decoding, limiting their potential for lossless acceleration. Thus, we aim to combine the strengths of layer-wise sparsity and speculative decoding to achieve lossless acceleration across diverse tasks.",
370
+ "bbox": [
371
+ 112,
372
+ 678,
373
+ 489,
374
+ 920
375
+ ],
376
+ "page_idx": 2
377
+ },
378
+ {
379
+ "type": "code",
380
+ "sub_type": "algorithm",
381
+ "code_caption": [],
382
+ "code_body": "Algorithm 1: CLaSp Skip Layer Strategy \nInput: Num hidden layers $L$ , num skip layers $M$ , hidden states $X = \\{x_0, x_1, \\ldots, x_{L-1}\\}$ , DecoderLayer $f_i$ , hidden size $d$ \nOutput: The optimal skipped layer set $S$ $g \\gets \\text{zeros}(L+1, M+1, d)$ , $g[0,0] \\gets x_0$ \n// Dynamic programming \nfor $i = 1$ to $L + 1$ do \n $\\begin{array}{l} g[i,0] \\gets x_i \\\\ \\ell \\gets \\min(i - 1, M) \\\\ \\mathcal{G} \\gets f_{i-1}(g[i - 1, 1 : \\ell + 1]) \\\\ \\mathcal{F} \\gets \\text{norm}(\\text{cat}(\\mathcal{G}, g[i - 1, : \\ell])) \\\\ \\sigma \\gets \\mathcal{F} \\cdot \\text{norm}(x_i) \\\\ \\text{if } \\sigma[: \\ell] > \\sigma[\\ell]: \\text{ then} \\\\ |g[i][1 : \\ell + 1] \\gets \\mathcal{G} \\\\ \\text{else} \\\\ |g[i][1 : \\ell + 1] \\gets g[i - 1, : \\ell] \\\\ \\text{if } i \\leq M \\text{ then} \\\\ |g[i, i] \\gets g[i - 1, i - 1] \\\\ S \\gets \\text{zeros}(L) \\\\ // \\text{Backtracking optimal skipped layer set } S \\\\ \\text{while } i > 0 \\text{ and } j > 0 \\text{ do} \\\\ \\text{if } g[i, j] = g[i - 1, j - 1] \\text{ then} \\\\ |S[i - 1] \\gets 1 \\\\ j \\gets j - 1 \\\\ i \\gets i - 1 \\\\ \\end{array}$",
383
+ "bbox": [
384
+ 517,
385
+ 87,
386
+ 882,
387
+ 410
388
+ ],
389
+ "page_idx": 2
390
+ },
391
+ {
392
+ "type": "text",
393
+ "text": "3 CLaSp",
394
+ "text_level": 1,
395
+ "bbox": [
396
+ 509,
397
+ 437,
398
+ 606,
399
+ 455
400
+ ],
401
+ "page_idx": 2
402
+ },
403
+ {
404
+ "type": "text",
405
+ "text": "In this section, we first introduce the pipeline of CLaSp from a global perspective. Then, we explore the main challenges (§3.2) faced by CLaSp and formulate the problem of layer skipping (§3.3). Subsequently, we provide a detailed description of the CLaSp algorithm (§3.4 and §3.5) and efficiency optimization strategies (§3.6 and §3.7).",
406
+ "bbox": [
407
+ 507,
408
+ 464,
409
+ 884,
410
+ 579
411
+ ],
412
+ "page_idx": 2
413
+ },
414
+ {
415
+ "type": "text",
416
+ "text": "3.1 Pipeline",
417
+ "text_level": 1,
418
+ "bbox": [
419
+ 507,
420
+ 592,
421
+ 618,
422
+ 608
423
+ ],
424
+ "page_idx": 2
425
+ },
426
+ {
427
+ "type": "text",
428
+ "text": "CLaSp can be explained as a three-stage process: (1) Drafting: The draft model autoregressively generates $K$ draft tokens from the given prompt sequence $x_{1},\\ldots ,x_{i}$ , denoted as $x_{i + 1},\\ldots ,x_{i + K}$ . (2) Verification: The verify model verifies the tokens generated during the drafting stage. This verification is performed in a single forward pass, where the LLM predicts the probability distribution for each draft token and evaluates whether they align with the full model's predictions. Once a draft token $x_{j}$ is rejected, the original LLM's prediction overwrites $x_{j}$ , and drafting resumes from token $x_{j + 1}$ in the next round. (3) Layer Optimization: Using the hidden states of the last accepted token $x_{j}$ as the optimization objective, the optimal skipped layer set $S^{*}$ is updated to guide the next round of drafting. As shown in Figure 2, before each round of drafting, the draft model can be updated to better adapt to the current context.",
429
+ "bbox": [
430
+ 507,
431
+ 615,
432
+ 884,
433
+ 921
434
+ ],
435
+ "page_idx": 2
436
+ },
437
+ {
438
+ "type": "page_number",
439
+ "text": "31610",
440
+ "bbox": [
441
+ 475,
442
+ 927,
443
+ 524,
444
+ 940
445
+ ],
446
+ "page_idx": 2
447
+ },
448
+ {
449
+ "type": "image",
450
+ "img_path": "images/4267b3b27e17376d209ed5f8788985284387549f58121722bf79660b9faa78f9.jpg",
451
+ "image_caption": [
452
+ "Figure 2: The overall framework of CLaSp consists of three stages: (1) Draft, (2) Verify, (3) Layer Optimization. After the Verify stage, CLaSp uses the information obtained to perform Layer Optimization, resulting in a new optimal layer skipping set $S^{*}$ . This set guides the next Draft round, repeating the entire process."
453
+ ],
454
+ "image_footnote": [],
455
+ "bbox": [
456
+ 127,
457
+ 86,
458
+ 872,
459
+ 357
460
+ ],
461
+ "page_idx": 3
462
+ },
463
+ {
464
+ "type": "text",
465
+ "text": "3.2 Main Challenges",
466
+ "text_level": 1,
467
+ "bbox": [
468
+ 112,
469
+ 438,
470
+ 294,
471
+ 454
472
+ ],
473
+ "page_idx": 3
474
+ },
475
+ {
476
+ "type": "text",
477
+ "text": "Compared to previous methods, CLaSp dynamically updates the skipped layer set before each drafting step, requiring solutions to two main challenges:",
478
+ "bbox": [
479
+ 112,
480
+ 461,
481
+ 489,
482
+ 524
483
+ ],
484
+ "page_idx": 3
485
+ },
486
+ {
487
+ "type": "list",
488
+ "sub_type": "text",
489
+ "list_items": [
490
+ "(1) How to determine which layers should be skipped? This is the most critical issue addressed by CLaSp, as it directly impacts drafting quality. An ideal layer-skipping strategy must adapt to the most recent context, ensuring that the drafted tokens are more likely to be accepted by the verify model.",
491
+ "(2) How to reduce the additional latency caused by layer optimization? The dynamic skipping strategy inevitably introduces computational delays due to the need for repeated searches to identify the current optimal layer subset. To ensure that layer optimization does not become the primary bottleneck, minimizing these additional delays is essential for maximizing the speedup benefits."
492
+ ],
493
+ "bbox": [
494
+ 112,
495
+ 527,
496
+ 489,
497
+ 770
498
+ ],
499
+ "page_idx": 3
500
+ },
501
+ {
502
+ "type": "text",
503
+ "text": "3.3 Problem Formulation of Layer Skip",
504
+ "text_level": 1,
505
+ "bbox": [
506
+ 112,
507
+ 785,
508
+ 442,
509
+ 800
510
+ ],
511
+ "page_idx": 3
512
+ },
513
+ {
514
+ "type": "text",
515
+ "text": "Let $\\mathcal{M}_v$ be the verify model and $\\mathcal{M}_d$ be the draft model obtained by skipping certain intermediate layers from the original LLM. $F_{\\mathcal{M}_v}(X)$ and $F_{\\mathcal{M}_d}(X)$ represent the output hidden states on the top of the last token of current input $X$ , passing through the verify model or the draft model respectively. Our goal is to find the optimal skipped layer",
516
+ "bbox": [
517
+ 112,
518
+ 808,
519
+ 489,
520
+ 921
521
+ ],
522
+ "page_idx": 3
523
+ },
524
+ {
525
+ "type": "text",
526
+ "text": "set $S$ that minimizes the cosine similarity between $F_{\\mathcal{M}_v}(X)$ and $F_{\\mathcal{M}_d}(X)$ :",
527
+ "bbox": [
528
+ 507,
529
+ 438,
530
+ 882,
531
+ 470
532
+ ],
533
+ "page_idx": 3
534
+ },
535
+ {
536
+ "type": "equation",
537
+ "text": "\n$$\n\\begin{array}{l} \\mathcal {S} ^ {*} = \\underset {\\mathcal {S}} {\\arg \\min} \\operatorname {c o s i n e} (F _ {\\mathcal {M} _ {V}} (X), F _ {\\mathcal {M} _ {D}} (X)), \\\\ \\begin{array}{l} \\text {s . t .} \\mathcal {S} \\in \\{0, 1 \\} ^ {L} \\\\ \\end{array} \\tag {1} \\\\ \\end{array}\n$$\n",
538
+ "text_format": "latex",
539
+ "bbox": [
540
+ 524,
541
+ 481,
542
+ 882,
543
+ 541
544
+ ],
545
+ "page_idx": 3
546
+ },
547
+ {
548
+ "type": "text",
549
+ "text": "where $L$ represents the number of transformer layers in the verify model.",
550
+ "bbox": [
551
+ 507,
552
+ 543,
553
+ 884,
554
+ 574
555
+ ],
556
+ "page_idx": 3
557
+ },
558
+ {
559
+ "type": "text",
560
+ "text": "3.4 Approximate Dynamic Programming",
561
+ "text_level": 1,
562
+ "bbox": [
563
+ 507,
564
+ 586,
565
+ 848,
566
+ 602
567
+ ],
568
+ "page_idx": 3
569
+ },
570
+ {
571
+ "type": "text",
572
+ "text": "The principle behind selecting information for layer optimization is to minimize additional computational overhead by utilizing information already obtained in previous steps. In speculative decoding, we observed that the hidden states of the last accepted token after each verification step are not fully utilized. To address this, we propose leveraging this feedback information to predict the draft model configuration for the next drafting stage. Specifically, let the input tokens to a Transformer model be denoted as $X$ , with an embedding layer that maps token indices to token embeddings $h_0$ . The Transformer model consists of $L$ layers, where the $l$ -th Transformer layer performs a transformation $f_l$ , evolving the embeddings as:",
573
+ "bbox": [
574
+ 505,
575
+ 606,
576
+ 884,
577
+ 847
578
+ ],
579
+ "page_idx": 3
580
+ },
581
+ {
582
+ "type": "equation",
583
+ "text": "\n$$\nh _ {l + 1} = f _ {l} \\left(h _ {l}\\right)\n$$\n",
584
+ "text_format": "latex",
585
+ "bbox": [
586
+ 640,
587
+ 860,
588
+ 749,
589
+ 876
590
+ ],
591
+ "page_idx": 3
592
+ },
593
+ {
594
+ "type": "text",
595
+ "text": "Let $\\mathcal{D}(i,j)$ represent the maximum cosine similarity between $h_i$ and the optimal hidden state",
596
+ "bbox": [
597
+ 507,
598
+ 889,
599
+ 882,
600
+ 921
601
+ ],
602
+ "page_idx": 3
603
+ },
604
+ {
605
+ "type": "page_number",
606
+ "text": "31611",
607
+ "bbox": [
608
+ 475,
609
+ 927,
610
+ 522,
611
+ 940
612
+ ],
613
+ "page_idx": 3
614
+ },
615
+ {
616
+ "type": "image",
617
+ "img_path": "images/ba2f22bb2916ed84259da4e2d97a6cb4f49eea6ff93ece1140dee19ceff1426a.jpg",
618
+ "image_caption": [
619
+ "(a)"
620
+ ],
621
+ "image_footnote": [],
622
+ "bbox": [
623
+ 119,
624
+ 84,
625
+ 366,
626
+ 218
627
+ ],
628
+ "page_idx": 4
629
+ },
630
+ {
631
+ "type": "image",
632
+ "img_path": "images/d24c6f7b0796dcd76744f18712acf0817e48261c71a28cf7cdc8281df2fca6c3.jpg",
633
+ "image_caption": [
634
+ "(b)"
635
+ ],
636
+ "image_footnote": [],
637
+ "bbox": [
638
+ 371,
639
+ 85,
640
+ 620,
641
+ 217
642
+ ],
643
+ "page_idx": 4
644
+ },
645
+ {
646
+ "type": "image",
647
+ "img_path": "images/8b8687464b566c47f01f0ca26ac88a6917f980d898310587c14af9be12db9479.jpg",
648
+ "image_caption": [
649
+ "(c)",
650
+ "Figure 3: (a) Sparse Persistence Observation: Skipped layer sets selected for adjacent tokens exhibit high similarity, with this similarity gradually decreasing as the token gap increases. This observation enables layer optimization on the current token to guide subsequent drafting processes. (b) Approximate Markov Property: Cosine similarity comparisons of hidden states obtained using Brute Force, Random, and CLaSp's dynamic programming configurations against the full forward pass demonstrate the approximate Markov property inherent to CLaSp. (c) Efficiency Optimization Strategies: Latency breakdown per query shows that Layer Optimization introduces only $4.8\\%$ additional delay, underscoring its negligible impact on overall latency."
651
+ ],
652
+ "image_footnote": [],
653
+ "bbox": [
654
+ 628,
655
+ 85,
656
+ 877,
657
+ 218
658
+ ],
659
+ "page_idx": 4
660
+ },
661
+ {
662
+ "type": "text",
663
+ "text": "$g(i,j)$ obtained by skipping $j$ layers among the first $i$ transformer layers. So we design a dynamic programming transition equation defined as:",
664
+ "bbox": [
665
+ 112,
666
+ 373,
667
+ 487,
668
+ 422
669
+ ],
670
+ "page_idx": 4
671
+ },
672
+ {
673
+ "type": "equation",
674
+ "text": "\n$$\n\\begin{array}{r} \\mathcal {D} (i, j) = \\max \\left\\{\\cos i n e (h _ {i}, g (i - 1, j - 1)), \\right. \\\\ \\left. \\cos i n e (h _ {i}, f _ {i - 1} (g (i - 1, j)))) \\right\\} \\end{array} \\tag {2}\n$$\n",
675
+ "text_format": "latex",
676
+ "bbox": [
677
+ 124,
678
+ 434,
679
+ 487,
680
+ 473
681
+ ],
682
+ "page_idx": 4
683
+ },
684
+ {
685
+ "type": "text",
686
+ "text": "where cosine is used to calculate the cosine similarity between two vectors. The CLaSp skip layer algorithm process is shown in Algorithm 1.",
687
+ "bbox": [
688
+ 112,
689
+ 483,
690
+ 489,
691
+ 533
692
+ ],
693
+ "page_idx": 4
694
+ },
695
+ {
696
+ "type": "text",
697
+ "text": "3.5 Approximate Markov Property",
698
+ "text_level": 1,
699
+ "bbox": [
700
+ 112,
701
+ 544,
702
+ 406,
703
+ 562
704
+ ],
705
+ "page_idx": 4
706
+ },
707
+ {
708
+ "type": "text",
709
+ "text": "A crucial prerequisite for dynamic programming algorithms is the \"no aftereffect\" property, which ensures that current decisions and state transitions are independent of previous states. However, when computing the optimal hidden states $g(i,j)$ , CLaSp does not strictly satisfy the Markov property, making it theoretically impossible to find an exact optimal solution using Algorithm 1.",
710
+ "bbox": [
711
+ 112,
712
+ 565,
713
+ 487,
714
+ 694
715
+ ],
716
+ "page_idx": 4
717
+ },
718
+ {
719
+ "type": "text",
720
+ "text": "Fortunately, due to the favorable property of slowly changing embeddings across layers, we observe that CLaSp's approximate algorithm closely aligns with the results of a brute force search for the optimal skipped layer set. To validate this, we fixed the first and last 10 layers of the 32-layer LLaMA3-8B model and compared the outcomes of brute force search, random layer selection, and CLaSp across the remaining 12 layers.",
721
+ "bbox": [
722
+ 112,
723
+ 696,
724
+ 487,
725
+ 840
726
+ ],
727
+ "page_idx": 4
728
+ },
729
+ {
730
+ "type": "text",
731
+ "text": "As shown in Figure 3b, the hidden states obtained by skipping the layers selected by CLaSp exhibit remarkable consistency with those from the brute force search, demonstrating a high cosine similarity with the hidden states of the original LLM.",
732
+ "bbox": [
733
+ 112,
734
+ 841,
735
+ 489,
736
+ 921
737
+ ],
738
+ "page_idx": 4
739
+ },
740
+ {
741
+ "type": "text",
742
+ "text": "In contrast, the results from randomly selected layers show relatively poor alignment.",
743
+ "bbox": [
744
+ 507,
745
+ 373,
746
+ 882,
747
+ 405
748
+ ],
749
+ "page_idx": 4
750
+ },
751
+ {
752
+ "type": "text",
753
+ "text": "These findings indicate that CLaSp approximates the Markov property effectively, allowing it to find near-optimal solutions within an acceptable error range.",
754
+ "bbox": [
755
+ 507,
756
+ 407,
757
+ 885,
758
+ 472
759
+ ],
760
+ "page_idx": 4
761
+ },
762
+ {
763
+ "type": "text",
764
+ "text": "3.6 Sequence Parallel",
765
+ "text_level": 1,
766
+ "bbox": [
767
+ 507,
768
+ 489,
769
+ 695,
770
+ 506
771
+ ],
772
+ "page_idx": 4
773
+ },
774
+ {
775
+ "type": "text",
776
+ "text": "Unlike previous methods, CLaSp requires multiple layer optimizations during a single inference process. Therefore, the optimization process must be both efficient and accurate to avoid introducing additional delays while ensuring precise drafting in subsequent decoding steps. To address this, we employ parallelization strategies to minimize the additional delay caused by the dynamic programming process.",
777
+ "bbox": [
778
+ 507,
779
+ 514,
780
+ 882,
781
+ 659
782
+ ],
783
+ "page_idx": 4
784
+ },
785
+ {
786
+ "type": "text",
787
+ "text": "When CLaSp performs dynamic programming, the updates for $\\mathcal{D}(i,j)$ and $g(i,j)$ are obtained through a double loop, resulting in a time complexity of $\\mathcal{O}(LM)$ . Importantly, when computing the state at $(i,j)$ , only the state at $(i - 1,\\cdot)$ is required. This dependency allows computations for different $j$ values with the same $i$ to be performed independently, enabling parallelization of the second loop.",
788
+ "bbox": [
789
+ 507,
790
+ 662,
791
+ 882,
792
+ 806
793
+ ],
794
+ "page_idx": 4
795
+ },
796
+ {
797
+ "type": "text",
798
+ "text": "To further reduce the GPU memory footprint, we avoid concatenating these states into a batch. Instead, we design a specialized mask matrix that enables parallelization of these states as a sequence. This approach reuses the same KV cache without duplicating it, significantly improving memory efficiency.",
799
+ "bbox": [
800
+ 507,
801
+ 808,
802
+ 885,
803
+ 921
804
+ ],
805
+ "page_idx": 4
806
+ },
807
+ {
808
+ "type": "page_number",
809
+ "text": "31612",
810
+ "bbox": [
811
+ 475,
812
+ 927,
813
+ 524,
814
+ 940
815
+ ],
816
+ "page_idx": 4
817
+ },
818
+ {
819
+ "type": "table",
820
+ "img_path": "images/7deb3cf1469c7dcfe43280c422dbe58d8c6b6c68f6a9b4fa26c7b35013415e60.jpg",
821
+ "table_caption": [],
822
+ "table_footnote": [],
823
+ "table_body": "<table><tr><td rowspan=\"2\">Models</td><td rowspan=\"2\">Methods</td><td colspan=\"2\">MT-bench</td><td colspan=\"2\">WMT14</td><td colspan=\"2\">CNN/DM</td><td colspan=\"2\">NQ</td><td colspan=\"2\">GSM8K</td><td colspan=\"2\">DPR</td><td>Overall Speedup</td></tr><tr><td>τ</td><td>Speedup</td><td>τ</td><td>Speedup</td><td>τ</td><td>Speedup</td><td>τ</td><td>Speedup</td><td>τ</td><td>Speedup</td><td>τ</td><td>Speedup</td><td>τ</td></tr><tr><td colspan=\"15\">Greedy Setting: Temperature=0</td></tr><tr><td rowspan=\"4\">LLaMA-3-70B</td><td>AUTOREGRESSIVE</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00×</td></tr><tr><td>SELF-SD</td><td>2.57</td><td>1.38×</td><td>4.10</td><td>1.55×</td><td>5.46</td><td>1.57×</td><td>2.60</td><td>1.42×</td><td>3.10</td><td>1.49×</td><td>3.59</td><td>1.43×</td><td>1.47×</td></tr><tr><td>SWIFT</td><td>3.13</td><td>1.26×</td><td>2.90</td><td>1.27×</td><td>3.93</td><td>1.35×</td><td>3.21</td><td>1.29×</td><td>2.86</td><td>1.27×</td><td>3.31</td><td>1.26×</td><td>1.28×</td></tr><tr><td>CLASP</td><td>4.55</td><td>1.64×</td><td>5.81</td><td>1.69×</td><td>7.19</td><td>1.66×</td><td>5.37</td><td>1.72×</td><td>6.77</td><td>1.75×</td><td>4.05</td><td>1.56×</td><td>1.67×</td></tr><tr><td rowspan=\"4\">LLaMA-3-70B -Chat</td><td>AUTOREGRESSIVE</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00×</td></tr><tr><td>SELF-SD</td><td>1.40</td><td>1.23×</td><td>2.27</td><td>1.33×</td><td>1.50</td><td>1.24×</td><td>1.59</td><td>1.26×</td><td>3.00</td><td>1.40×</td><td>2.56</td><td>1.37×</td><td>1.31×</td></tr><tr><td>SWIFT</td><td>4.41</td><td>1.15×</td><td>5.54</td><td>1.27×</td><td>4.52</td><td>1.22×</td><td>4.83</td><td>1.20×</td><td>6.19</td><td>1.31×</td><td>5.97</td><td>1.33×</td><td>1.25×</td></tr><tr><td>CLASP</td><td>2.61</td><td>1.35×</td><td>4.72</td><td>1.51×</td><td>3.48</td><td>1.39×</td><td>3.32</td><td>1.39×</td><td>5.28</td><td>1.53×</td><td>5.61</td><td>1.54×</td><td>1.45×</td></tr><tr><td rowspan=\"4\">LLaMA-3-8B</td><td>AUTOREGRESSIVE</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00×</td></tr><tr><td>SELF-SD</td><td>1.28</td><td>1.07×</td><td>1.35</td><td>1.13×</td><td>1.73</td><td>1.17×</td><td>1.45</td><td>1.13×</td><td>1.44</td><td>1.15×</td><td>2.33</td><td>1.21×</td><td>1.14×</td></tr><tr><td>SWIFT</td><td>2.75</td><td>1.07×</td><td>2.51</td><td>1.09×</td><td>2.76</td><td>1.13×</td><td>2.91</td><td>1.13×</td><td>2.72</td><td>1.10×</td><td>2.96</td><td>1.11×</td><td>1.11×</td></tr><tr><td>CLASP</td><td>3.68</td><td>1.24×</td><td>4.14</td><td>1.23×</td><td>6.22</td><td>1.22×</td><td>4.03</td><td>1.27×</td><td>5.26</td><td>1.26×</td><td>4.17</td><td>1.22×</td><td>1.24×</td></tr><tr><td colspan=\"15\">Non-Greedy Setting: Temperature=1</td></tr><tr><td rowspan=\"4\">LLaMA-3-70B</td><td>AUTOREGRESSIVE</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1,00×</td></tr><tr><td>SELF-SD</td><td>1.64</td><td>1.23×</td><td>2.53</td><td>1.39×</td><td>3.61</td><td>1.43×</td><td>1.53</td><td>1.24×</td><td>2.01</td><td>1.33×</td><td>2.17</td><td>1.24×</td><td>1.31×</td></tr><tr><td>SWIFT</td><td>2.06</td><td>1.10×</td><td>1.96</td><td>1.08×</td><td>1.97</td><td>1.09×</td><td>1.97</td><td>1.08×</td><td>1.98</td><td>1.09×</td><td>2.01</td><td>1.07×</td><td>1.09×</td></tr><tr><td>CLASP</td><td>3.13</td><td>1.49×</td><td>3.33</td><td>1.50×</td><td>5.38</td><td>1.54×</td><td>3.56</td><td>1.54×</td><td>4.32</td><td>1.59×</td><td>2.51</td><td>1.36×</td><td>1.50×</td></tr><tr><td rowspan=\"4\">LLaMA-3-70B -Chat</td><td>AUTOREGRESSIVE</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00×</td></tr><tr><td>SELF-SD</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SWIFT</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>CLASP</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan=\"4\">LLaMA-3-8B</td><td>AUTOREGRESSIVE</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00×</td></tr><tr><td>SELF-SD</td><td>0.98</td><td>0.89×</td><td>1.01</td><td>0.94×</td><td>1.36</td><td>1.02×</td><td>1.09</td><td>0.92×</td><td>1.09</td><td>0.96×</td><td>1.82</td><td>1.03×</td><td>0.96×</td></tr><tr><td>SWIFT</td><td>1.90</td><td>0.80×</td><td>1.92</td><td>0.85×</td><td>1.85</td><td>0.83×</td><td>1.97</td><td>0.84×</td><td>1.95</td><td>0.83×</td><td>1.90</td><td>0.80×</td><td>0.83×</td></tr><tr><td>CLASP</td><td>2.62</td><td>1.11×</td><td>2.78</td><td>1.08×</td><td>4.26</td><td>1.11×</td><td>2.70</td><td>1.08×</td><td>3.76</td><td>1.10×</td><td>2.35</td><td>1.02×</td><td>1.08×</td></tr></table>",
824
+ "bbox": [
825
+ 117,
826
+ 61,
827
+ 882,
828
+ 388
829
+ ],
830
+ "page_idx": 5
831
+ },
832
+ {
833
+ "type": "text",
834
+ "text": "Table 1: Comparison between CLaSp and prior plug-and-play methods. We report the average acceptance length $\\tau$ and speedup ratio under greedy (Temperature=0) and non-greedy (Temperature=1) settings. Bold numbers denote the best Speedup.",
835
+ "bbox": [
836
+ 112,
837
+ 398,
838
+ 882,
839
+ 444
840
+ ],
841
+ "page_idx": 5
842
+ },
843
+ {
844
+ "type": "text",
845
+ "text": "3.7 Lower Optimization Frequency",
846
+ "text_level": 1,
847
+ "bbox": [
848
+ 112,
849
+ 467,
850
+ 408,
851
+ 483
852
+ ],
853
+ "page_idx": 5
854
+ },
855
+ {
856
+ "type": "text",
857
+ "text": "CLaSp updates the optimal skipped layer set after each verification step, using the feedback from the last accepted token. However, the time cost of performing this update is comparable to that of a verification step, which introduces a bottleneck for CLaSp's inference latency. Fortunately, we observe a phenomenon we term Sparse Persistence: the skipped layer sets required by adjacent tokens tend to exhibit high similarity. To quantify this, we calculate the Jaccard similarity between the skipped layer sets of adjacent tokens. As shown in Figure 3a, the similarity remains high when the token distance is within a certain range and only decreases significantly as the distance between tokens increases.",
858
+ "bbox": [
859
+ 112,
860
+ 497,
861
+ 489,
862
+ 737
863
+ ],
864
+ "page_idx": 5
865
+ },
866
+ {
867
+ "type": "text",
868
+ "text": "Based on this observation, we further found that the optimal skipped layer set does not change drastically after every update. This allowed us to adjust the update frequency by accumulating several verification steps before performing an update, rather than updating after every single verification step. While adopting a lower update frequency slightly reduced the average acceptance rate of draft tokens, the reduction in update latency led to a substantial improvement in the overall speedup ratio. This trade-off highlights the efficiency benefits of",
869
+ "bbox": [
870
+ 112,
871
+ 744,
872
+ 489,
873
+ 921
874
+ ],
875
+ "page_idx": 5
876
+ },
877
+ {
878
+ "type": "text",
879
+ "text": "leveraging Sparse Persistence to optimize the layer update process.",
880
+ "bbox": [
881
+ 507,
882
+ 467,
883
+ 882,
884
+ 500
885
+ ],
886
+ "page_idx": 5
887
+ },
888
+ {
889
+ "type": "text",
890
+ "text": "4 Experiments",
891
+ "text_level": 1,
892
+ "bbox": [
893
+ 507,
894
+ 508,
895
+ 655,
896
+ 526
897
+ ],
898
+ "page_idx": 5
899
+ },
900
+ {
901
+ "type": "text",
902
+ "text": "This section evaluates CLaSp across various text generation tasks to demonstrate its efficiency and effectiveness.",
903
+ "bbox": [
904
+ 507,
905
+ 533,
906
+ 882,
907
+ 582
908
+ ],
909
+ "page_idx": 5
910
+ },
911
+ {
912
+ "type": "text",
913
+ "text": "Model and Testbed. We evaluate CLaSp using four different sizes of LLaMA models (Dubey et al., 2024): LLaMA3-8B, LLaMA2-13B, LLaMA3-70B, and LLaMA3.1-405B. The models are deployed on NVIDIA A800 GPUs with 80GB of memory. Specifically, the 8B and 13B models are deployed on a single A800 GPU, while the 70B and 405B models utilize 2 and 8 A800 GPUs, respectively, with pipeline parallelism enabled by Accelerate (Gugger et al., 2022). All models use FP16 precision, except for LLaMA3.1-405B, which employs INT8 quantization for improved memory efficiency. Unless otherwise specified, the batch size is set to 1 for all models.",
914
+ "bbox": [
915
+ 507,
916
+ 590,
917
+ 884,
918
+ 816
919
+ ],
920
+ "page_idx": 5
921
+ },
922
+ {
923
+ "type": "text",
924
+ "text": "Datasets. We benchmark the performance of CLaSp on Spec-Bench (Xia et al., 2024b), a comprehensive evaluation suite covering a wide range of datasets and tasks. Spec-Bench includes six subtasks: multi-turn conversation, translation, summarization, question answering, mathematical reason",
925
+ "bbox": [
926
+ 507,
927
+ 825,
928
+ 885,
929
+ 921
930
+ ],
931
+ "page_idx": 5
932
+ },
933
+ {
934
+ "type": "page_number",
935
+ "text": "31613",
936
+ "bbox": [
937
+ 475,
938
+ 927,
939
+ 524,
940
+ 940
941
+ ],
942
+ "page_idx": 5
943
+ },
944
+ {
945
+ "type": "image",
946
+ "img_path": "images/a8f68be26c917d45868191e8358f32113d0e9faffdfb2d240192fc47ef1a28d4.jpg",
947
+ "image_caption": [
948
+ "(a)"
949
+ ],
950
+ "image_footnote": [],
951
+ "bbox": [
952
+ 115,
953
+ 82,
954
+ 366,
955
+ 210
956
+ ],
957
+ "page_idx": 6
958
+ },
959
+ {
960
+ "type": "image",
961
+ "img_path": "images/a31c08c124dbb1f25133dd26055e119030d5200d18208eb8900b0901ee91a089.jpg",
962
+ "image_caption": [
963
+ "(b)",
964
+ "Figure 4: The impact of key hyper-parameters on speedup: (a) Number of Skipped Layers; (b) Layer Optimization Interval; (c) Draft-Existing Threshold. The experiment results were all obtained using the LLaMA-3-70B model on MT-Bench."
965
+ ],
966
+ "image_footnote": [],
967
+ "bbox": [
968
+ 371,
969
+ 80,
970
+ 623,
971
+ 211
972
+ ],
973
+ "page_idx": 6
974
+ },
975
+ {
976
+ "type": "image",
977
+ "img_path": "images/ad384b8c0cead4546e02e38cc45a332727d6b6658407b3f03c75b831e3344e75.jpg",
978
+ "image_caption": [
979
+ "(c)"
980
+ ],
981
+ "image_footnote": [],
982
+ "bbox": [
983
+ 628,
984
+ 80,
985
+ 882,
986
+ 211
987
+ ],
988
+ "page_idx": 6
989
+ },
990
+ {
991
+ "type": "text",
992
+ "text": "ing, and retrieval-augmented generation. Specifically, Spec-Bench consists of 80 randomly selected instances from each of MT-bench (Zheng et al., 2023), WMT14 DE-EN, CNN/Daily Mail (Nallapati et al., 2016), Natural Questions (Kwiatkowski et al., 2019), GSM8K (Cobbe et al., 2021), and DPR (Karpukhin et al., 2020). To control the generation length across tasks, we set the maximum sequence length to 1024 tokens, following prior experimental setups (Xia et al., 2024b).",
993
+ "bbox": [
994
+ 112,
995
+ 307,
996
+ 489,
997
+ 468
998
+ ],
999
+ "page_idx": 6
1000
+ },
1001
+ {
1002
+ "type": "text",
1003
+ "text": "Comparison. For our main experiments, we use vanilla autoregressive decoding as the baseline, serving as the benchmark for speedup ratios (1.00x). We compare CLaSp against existing training-free layer skip methods, including Self-Speculative Decoding (Zhang et al., 2024) and SWIFT (Xia et al., 2024a). Other speculative decoding (SD) methods are excluded from the comparison as they require additional modules or extensive training, which limits their generalizability. Since the speedup ratio is hardware-dependent, all methods were evaluated on the same devices to ensure a fair comparison.",
1004
+ "bbox": [
1005
+ 112,
1006
+ 478,
1007
+ 489,
1008
+ 687
1009
+ ],
1010
+ "page_idx": 6
1011
+ },
1012
+ {
1013
+ "type": "text",
1014
+ "text": "Performance Metrics. CLaSp is essentially still speculative sampling, which has been proven to enable lossless acceleration (Leviathan et al., 2023). Therefore, we focus solely on acceleration performance rather than generation quality. The following metrics are used for evaluation: Speedup Ratio: The actual test speedup ratio relative to vanilla autoregressive decoding, providing a direct measure of acceleration. Average Acceptance Length $(\\tau)$ : The average number of tokens generated per drafting-verification cycle, corresponding to the number of tokens accepted from the draft. This metric is independent of hardware and runtime environment, while its limitation is that it does not",
1015
+ "bbox": [
1016
+ 112,
1017
+ 696,
1018
+ 489,
1019
+ 920
1020
+ ],
1021
+ "page_idx": 6
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "reflect the overhead introduced by the draft model.",
1026
+ "bbox": [
1027
+ 507,
1028
+ 307,
1029
+ 882,
1030
+ 323
1031
+ ],
1032
+ "page_idx": 6
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "4.1 Experimental Result",
1037
+ "text_level": 1,
1038
+ "bbox": [
1039
+ 507,
1040
+ 335,
1041
+ 717,
1042
+ 350
1043
+ ],
1044
+ "page_idx": 6
1045
+ },
1046
+ {
1047
+ "type": "text",
1048
+ "text": "As shown in Table 1, we report the performance of CLaSp and prior plug-and-play methods on text generation tasks from Spec-Bench under both greedy (Temperature $= 0$ ) and non-greedy (Temperature $= 1$ ) settings. The experimental results reveal the following findings.",
1049
+ "bbox": [
1050
+ 507,
1051
+ 356,
1052
+ 882,
1053
+ 451
1054
+ ],
1055
+ "page_idx": 6
1056
+ },
1057
+ {
1058
+ "type": "text",
1059
+ "text": "CLaSp demonstrates superior efficiency compared to previous methods, achieving consistent speedups of $1.3 \\times \\sim 1.7 \\times$ over vanilla autoregressive decoding across various models and tasks. Prior methods relying on Bayesian optimization exhibit lower performance, particularly when data volume is limited.",
1060
+ "bbox": [
1061
+ 507,
1062
+ 454,
1063
+ 884,
1064
+ 565
1065
+ ],
1066
+ "page_idx": 6
1067
+ },
1068
+ {
1069
+ "type": "text",
1070
+ "text": "CLaSp consistently improves average acceptance length, acceptance rate, and speedups. This efficiency is primarily due to CLaSp's ability to leverage model layer sparsity effectively. By skipping $50\\%$ to $60\\%$ of layers during experiments, CLaSp maintains both a high average acceptance length and acceptance rate, contributing to superior acceleration. Generally, longer acceptance lengths lead to higher speedups. However, there are cases where speedups remain low despite long acceptance lengths, as drafting additional tokens increases time spent, reducing acceptance rates and overall speedups.",
1071
+ "bbox": [
1072
+ 507,
1073
+ 567,
1074
+ 882,
1075
+ 775
1076
+ ],
1077
+ "page_idx": 6
1078
+ },
1079
+ {
1080
+ "type": "text",
1081
+ "text": "The performance advantage of CLaSp is more pronounced on larger models, such as LLaMA3-70B, compared to smaller models like LLaMA2-13B and LLaMA3-8B. This suggests that CLaSp can better leverage the greater layer sparsity present in larger models, enhancing adaptability and efficiency.",
1082
+ "bbox": [
1083
+ 507,
1084
+ 776,
1085
+ 884,
1086
+ 887
1087
+ ],
1088
+ "page_idx": 6
1089
+ },
1090
+ {
1091
+ "type": "text",
1092
+ "text": "Overall, the robust performance of CLaSp across different models highlights its effectiveness as a",
1093
+ "bbox": [
1094
+ 507,
1095
+ 889,
1096
+ 882,
1097
+ 921
1098
+ ],
1099
+ "page_idx": 6
1100
+ },
1101
+ {
1102
+ "type": "page_number",
1103
+ "text": "31614",
1104
+ "bbox": [
1105
+ 475,
1106
+ 927,
1107
+ 524,
1108
+ 940
1109
+ ],
1110
+ "page_idx": 6
1111
+ },
1112
+ {
1113
+ "type": "image",
1114
+ "img_path": "images/5386092d09baf10b509b06bdf287dbfc6099c663a5616691e3f19d8e71051624.jpg",
1115
+ "image_caption": [
1116
+ "Figure 5: Model Size Scaling Laws of CLaSp."
1117
+ ],
1118
+ "image_footnote": [],
1119
+ "bbox": [
1120
+ 117,
1121
+ 84,
1122
+ 480,
1123
+ 247
1124
+ ],
1125
+ "page_idx": 7
1126
+ },
1127
+ {
1128
+ "type": "text",
1129
+ "text": "plug-and-play solution, offering a versatile method to enhance inference speed for a range of LLMs.",
1130
+ "bbox": [
1131
+ 112,
1132
+ 300,
1133
+ 487,
1134
+ 332
1135
+ ],
1136
+ "page_idx": 7
1137
+ },
1138
+ {
1139
+ "type": "text",
1140
+ "text": "5 Analysis",
1141
+ "text_level": 1,
1142
+ "bbox": [
1143
+ 112,
1144
+ 344,
1145
+ 223,
1146
+ 362
1147
+ ],
1148
+ "page_idx": 7
1149
+ },
1150
+ {
1151
+ "type": "text",
1152
+ "text": "We present an extensive analysis of CLaSp, focusing on three key aspects: the benefits of the parallel strategy (Section 5.1), compatibility with different LLMs (Section 5.2), and the impact of key hyperparameters (Section 5.3).",
1153
+ "bbox": [
1154
+ 112,
1155
+ 370,
1156
+ 489,
1157
+ 451
1158
+ ],
1159
+ "page_idx": 7
1160
+ },
1161
+ {
1162
+ "type": "text",
1163
+ "text": "5.1 Sequence Parallel",
1164
+ "text_level": 1,
1165
+ "bbox": [
1166
+ 112,
1167
+ 464,
1168
+ 302,
1169
+ 479
1170
+ ],
1171
+ "page_idx": 7
1172
+ },
1173
+ {
1174
+ "type": "text",
1175
+ "text": "As discussed in Section 3.6, our dynamic programming (DP) algorithm requires $\\mathcal{O}(LM)$ layer forward passes. To assess the time overhead, we conducted experiments on LLaMA3-70B using two NVIDIA A800 GPUs. Without any parallel strategy, a single DP run to filter half of the layers takes approximately 2.5 seconds, whereas a single round of verification only takes about 0.1 seconds. After implementing our parallel strategy, the time for a single DP run is reduced to 0.14 seconds, comparable to the time for a single verification. This significantly reduces the additional latency introduced by layer optimization.",
1176
+ "bbox": [
1177
+ 112,
1178
+ 485,
1179
+ 489,
1180
+ 693
1181
+ ],
1182
+ "page_idx": 7
1183
+ },
1184
+ {
1185
+ "type": "text",
1186
+ "text": "We further analyzed the per-query latency distribution of each stage, as illustrated in Figure 3c. The results show that the latency proportion of layer optimization is significantly reduced with the parallel strategy. Additionally, with a lower update frequency, the extra update latency of CLaSp becomes almost negligible.",
1187
+ "bbox": [
1188
+ 112,
1189
+ 695,
1190
+ 489,
1191
+ 807
1192
+ ],
1193
+ "page_idx": 7
1194
+ },
1195
+ {
1196
+ "type": "text",
1197
+ "text": "5.2 Model Size Scaling Laws",
1198
+ "text_level": 1,
1199
+ "bbox": [
1200
+ 112,
1201
+ 819,
1202
+ 356,
1203
+ 834
1204
+ ],
1205
+ "page_idx": 7
1206
+ },
1207
+ {
1208
+ "type": "text",
1209
+ "text": "To assess the scalability of CLaSp, we evaluated its performance across a range of model sizes, including LLaMA2-13B and LLaMA3.1-405B, in addition to LLaMA3-8B and LLaMA3-70B. For LLaMA2-13B, the model was deployed",
1210
+ "bbox": [
1211
+ 112,
1212
+ 841,
1213
+ 489,
1214
+ 921
1215
+ ],
1216
+ "page_idx": 7
1217
+ },
1218
+ {
1219
+ "type": "text",
1220
+ "text": "on an A800 GPU using FP16 precision, while for LLaMA3.1-405B, we used INT8 quantization (Dettmers et al., 2022) to deploy it on a single node with 8 A800 GPUs.",
1221
+ "bbox": [
1222
+ 507,
1223
+ 84,
1224
+ 884,
1225
+ 148
1226
+ ],
1227
+ "page_idx": 7
1228
+ },
1229
+ {
1230
+ "type": "text",
1231
+ "text": "As illustrated in Figure 5, the speedup increases with model size across various tasks. Specifically, on the MT-bench, speedups range from $1.24 \\times$ for LLaMA3-8B to $1.73 \\times$ for LLaMA3.1-405B. For the GSM8K benchmark, speedups increase from $1.26 \\times$ to $1.81 \\times$ , while on the Natural Questions benchmark, speedups range from $1.27 \\times$ to $1.82 \\times$ . These results indicate that larger models exhibit enhanced layer sparsity, enabling CLaSp to leverage its capabilities more effectively and achieve greater speedups.",
1232
+ "bbox": [
1233
+ 507,
1234
+ 149,
1235
+ 885,
1236
+ 326
1237
+ ],
1238
+ "page_idx": 7
1239
+ },
1240
+ {
1241
+ "type": "text",
1242
+ "text": "5.3 Key Hyper-Parameters",
1243
+ "text_level": 1,
1244
+ "bbox": [
1245
+ 507,
1246
+ 342,
1247
+ 739,
1248
+ 357
1249
+ ],
1250
+ "page_idx": 7
1251
+ },
1252
+ {
1253
+ "type": "text",
1254
+ "text": "We show the effect of key hyper-parameters on the acceleration benefits of CLaSp, where all experiments were performed using the LLaMA3-70B model on MT-Bench.",
1255
+ "bbox": [
1256
+ 507,
1257
+ 365,
1258
+ 882,
1259
+ 429
1260
+ ],
1261
+ "page_idx": 7
1262
+ },
1263
+ {
1264
+ "type": "text",
1265
+ "text": "5.3.1 Number of Skipped Layers",
1266
+ "text_level": 1,
1267
+ "bbox": [
1268
+ 507,
1269
+ 443,
1270
+ 781,
1271
+ 458
1272
+ ],
1273
+ "page_idx": 7
1274
+ },
1275
+ {
1276
+ "type": "text",
1277
+ "text": "Layer sparsity allows intermediate layers to be skipped, but the number of skipped layers directly influences performance. Adjusting this parameter involves a trade-off between draft quality and efficiency, both of which significantly impact the speedup.",
1278
+ "bbox": [
1279
+ 507,
1280
+ 464,
1281
+ 882,
1282
+ 561
1283
+ ],
1284
+ "page_idx": 7
1285
+ },
1286
+ {
1287
+ "type": "text",
1288
+ "text": "As shown in Figure 4a, for LLaMA3-70B, which consists of 80 layers, the speedup increases as the number of skipped layers rises, reaching an optimal value of $1.64 \\times$ when 44 layers are skipped. Beyond this point, the benefits of a longer average acceptance length are outweighed by the increased cost of generating high-quality drafts, resulting in a decline in speedup.",
1289
+ "bbox": [
1290
+ 507,
1291
+ 563,
1292
+ 882,
1293
+ 690
1294
+ ],
1295
+ "page_idx": 7
1296
+ },
1297
+ {
1298
+ "type": "text",
1299
+ "text": "5.3.2 Layer Optimization Interval",
1300
+ "text_level": 1,
1301
+ "bbox": [
1302
+ 507,
1303
+ 705,
1304
+ 794,
1305
+ 720
1306
+ ],
1307
+ "page_idx": 7
1308
+ },
1309
+ {
1310
+ "type": "text",
1311
+ "text": "Performing layer optimization after every verification step is computationally expensive, as noted in Section 3.7. Extending the Layer Optimization Interval (LOI) reduces the additional delays introduced by dynamic programming (DP) while having only a minor impact on the average acceptance length $\\tau$ .",
1312
+ "bbox": [
1313
+ 507,
1314
+ 727,
1315
+ 882,
1316
+ 839
1317
+ ],
1318
+ "page_idx": 7
1319
+ },
1320
+ {
1321
+ "type": "text",
1322
+ "text": "As illustrated in Figure 4b, the speedup initially increases with the LOI but begins to decline as the interval grows beyond 128. This decline is caused by a significant drop in $\\tau$ , which negatively impacts overall speedup.",
1323
+ "bbox": [
1324
+ 507,
1325
+ 841,
1326
+ 882,
1327
+ 921
1328
+ ],
1329
+ "page_idx": 7
1330
+ },
1331
+ {
1332
+ "type": "page_number",
1333
+ "text": "31615",
1334
+ "bbox": [
1335
+ 475,
1336
+ 927,
1337
+ 524,
1338
+ 940
1339
+ ],
1340
+ "page_idx": 7
1341
+ },
1342
+ {
1343
+ "type": "text",
1344
+ "text": "5.3.3 Draft-Exiting Threshold",
1345
+ "text_level": 1,
1346
+ "bbox": [
1347
+ 112,
1348
+ 84,
1349
+ 366,
1350
+ 99
1351
+ ],
1352
+ "page_idx": 8
1353
+ },
1354
+ {
1355
+ "type": "text",
1356
+ "text": "To balance draft efficiency and cost, skipping $40\\%$ to $60\\%$ of layers achieves an optimal trade-off, as noted in Section 5.3.1. However, the cost of a single draft remains high, necessitating a sufficiently high acceptance rate to maximize speedup.",
1357
+ "bbox": [
1358
+ 112,
1359
+ 104,
1360
+ 487,
1361
+ 184
1362
+ ],
1363
+ "page_idx": 8
1364
+ },
1365
+ {
1366
+ "type": "text",
1367
+ "text": "EAGLE-2 (Li et al., 2024a) suggests leveraging the draft model's confidence score to approximate the acceptance rate. By tuning the Draft-Exiting Threshold (DET), we can control the acceptance rate to optimize acceleration.",
1368
+ "bbox": [
1369
+ 112,
1370
+ 185,
1371
+ 485,
1372
+ 263
1373
+ ],
1374
+ "page_idx": 8
1375
+ },
1376
+ {
1377
+ "type": "text",
1378
+ "text": "As shown in Figure 4c, adjusting the DET around 0.7 results in the highest speedup. Even with higher DET values, high speedup is maintained, demonstrating the robustness of this parameter for achieving acceleration gains.",
1379
+ "bbox": [
1380
+ 112,
1381
+ 265,
1382
+ 487,
1383
+ 344
1384
+ ],
1385
+ "page_idx": 8
1386
+ },
1387
+ {
1388
+ "type": "text",
1389
+ "text": "6 Conclusion",
1390
+ "text_level": 1,
1391
+ "bbox": [
1392
+ 112,
1393
+ 357,
1394
+ 245,
1395
+ 372
1396
+ ],
1397
+ "page_idx": 8
1398
+ },
1399
+ {
1400
+ "type": "text",
1401
+ "text": "In this paper, we propose CLaSp, a novel self-speculative decoding framework that adaptively adjusts the layer-skipping strategy based on context. We discover the potential of context-aware layer sparsity for generating high-quality drafts. Leveraging this insight, CLaSp performs layer optimization before each draft stage with minimal additional latency, significantly increasing the decoding efficiency. Through extensive experiments across diverse text generation tasks, we demonstrated that CLaSp achieves consistent speedups of $1.3 \\times \\sim 1.7 \\times$ over vanilla autoregressive decoding. Furthermore, detailed analysis reveals that CLaSp generalizes well to different models and tasks. For future work, we aim to explore ways to better leverage the layer sparsity of LLMs to further reduce inference latency in larger models.",
1402
+ "bbox": [
1403
+ 112,
1404
+ 384,
1405
+ 489,
1406
+ 657
1407
+ ],
1408
+ "page_idx": 8
1409
+ },
1410
+ {
1411
+ "type": "text",
1412
+ "text": "Limitations",
1413
+ "text_level": 1,
1414
+ "bbox": [
1415
+ 112,
1416
+ 670,
1417
+ 218,
1418
+ 684
1419
+ ],
1420
+ "page_idx": 8
1421
+ },
1422
+ {
1423
+ "type": "text",
1424
+ "text": "The CLaSp framework dynamically adjusts the layer-skipping strategy based on context, making the self-speculative decoding process of LLMs more efficient. However, certain limitations exist. Our experiments are conducted solely on NVIDIA A800 GPUs with 80GB of memory and limited to LLaMA series models, leaving the potential of more powerful hardware and other models unexplored. Additionally, while CLaSp can function alongside many existing speculative decoding innovations, we do not investigate these integrations. We believe that addressing these limitations and exploring such combinations in future research could lead to significant advancements.",
1425
+ "bbox": [
1426
+ 112,
1427
+ 696,
1428
+ 489,
1429
+ 920
1430
+ ],
1431
+ "page_idx": 8
1432
+ },
1433
+ {
1434
+ "type": "text",
1435
+ "text": "Acknowledgments",
1436
+ "text_level": 1,
1437
+ "bbox": [
1438
+ 509,
1439
+ 84,
1440
+ 672,
1441
+ 99
1442
+ ],
1443
+ "page_idx": 8
1444
+ },
1445
+ {
1446
+ "type": "text",
1447
+ "text": "Min Yang was supported by National Key Research and Development Program of China (2022YFF0902100), National Natural Science Foundation of China (Grant No. 62376262), the Natural Science Foundation of Guangdong Province of China (2024A1515030166, 2025B1515020032), Shenzhen Science and Technology Innovation Program (KQTD20190929172835662).",
1448
+ "bbox": [
1449
+ 507,
1450
+ 109,
1451
+ 884,
1452
+ 253
1453
+ ],
1454
+ "page_idx": 8
1455
+ },
1456
+ {
1457
+ "type": "text",
1458
+ "text": "References",
1459
+ "text_level": 1,
1460
+ "bbox": [
1461
+ 509,
1462
+ 281,
1463
+ 608,
1464
+ 296
1465
+ ],
1466
+ "page_idx": 8
1467
+ },
1468
+ {
1469
+ "type": "list",
1470
+ "sub_type": "ref_text",
1471
+ "list_items": [
1472
+ "2024. Lisa: Layerwise importance sampling for memory-efficient large language model fine-tuning. arXiv preprint arXiv:2403.17919.",
1473
+ "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.",
1474
+ "Amey Agrawal, Ashish Panwar, Jayashree Mohan, Nipun Kwatra, Bhargav S Gulavani, and Ramachandran Ramjee. 2023. Sarathi: Efficient llm inference by piggybacking decodes with chunked prefixes. arXiv preprint arXiv:2308.16369.",
1475
+ "Rohan Anil, Andrew M Dai, Orhan Firat, Melvin Johnson, Dmitry Lepikhin, Alexandre Passos, Siamak Shakeri, Emanuel Taropa, Paige Bailey, Zhifeng Chen, et al. 2023. Palm 2 technical report. arXiv preprint arXiv:2305.10403.",
1476
+ "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.",
1477
+ "F. Warren Burton. 1985. Speculative computation, parallelism, and functional programming. IEEE Transactions on Computers, C-34(12):1190-1193.",
1478
+ "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. In *Forty-first International Conference on Machine Learning*, ICML 2024, Vienna, Austria, July 21-27, 2024. OpenReview.net."
1479
+ ],
1480
+ "bbox": [
1481
+ 509,
1482
+ 304,
1483
+ 885,
1484
+ 919
1485
+ ],
1486
+ "page_idx": 8
1487
+ },
1488
+ {
1489
+ "type": "page_number",
1490
+ "text": "31616",
1491
+ "bbox": [
1492
+ 475,
1493
+ 927,
1494
+ 524,
1495
+ 940
1496
+ ],
1497
+ "page_idx": 8
1498
+ },
1499
+ {
1500
+ "type": "list",
1501
+ "sub_type": "ref_text",
1502
+ "list_items": [
1503
+ "Charlie Chen, Sebastian Borgeaud, Geoffrey Irving, Jean-Baptiste Lespiau, Laurent Sifre, and John Jumper. 2023. Accelerating large language model decoding with speculative sampling. arXiv preprint arXiv:2302.01318.",
1504
+ "Zhuoming Chen, Avner May, Ruslan Svirschevski, Yuhsun Huang, Max Ryabinin, Zhihao Jia, and Beidi Chen. 2024. Sequoia: Scalable, robust, and hardware-aware speculative decoding. arXiv preprint arXiv:2402.12374.",
1505
+ "Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, et al. 2021. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168.",
1506
+ "Luciano Del Corro, Allie Del Giorno, Sahaj Agarwal, Bin Yu, Ahmed Awadallah, and Subhabrata Mukherjee. 2023. Skipdecode: Autoregressive skip decoding with batching and caching for efficient llm inference. arXiv preprint arXiv:2307.02628.",
1507
+ "Tim Dettmers, Mike Lewis, Younes Belkada, and Luke Zettlemoyer. 2022. Gpt3.int8(): 8-bit matrix multiplication for transformers at scale. In Advances in Neural Information Processing Systems, volume 35, pages 30318-30332. Curran Associates, Inc.",
1508
+ "Cunxiao Du, Jing Jiang, Yuanchen Xu, Jiawei Wu, Sicheng Yu, Yongqi Li, Shenggui Li, Kai Xu, Liqiang Nie, Zhaopeng Tu, and Yang You. 2024. Glide with a cape: A low-hassle method to accelerate speculative decoding. In *Forty-first International Conference on Machine Learning*, ICML 2024, Vienna, Austria, July 21-27, 2024. OpenReview.net.",
1509
+ "Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. 2024. The llama 3 herd of models. arXiv preprint arXiv:2407.21783.",
1510
+ "Mostafa Elhoushi, Akshit Shrivastava, Diana Liskovich, Basil Hosmer, Bram Wasti, Liangzhen Lai, Anas Mahmoud, Bilge Acun, Saurabh Agarwal, Ahmed Roman, Ahmed Aly, Beidi Chen, and Carole-Jean Wu. 2024. LayerSkip: Enabling early exit inference and self-speculative decoding. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 12622-12642, Bangkok, Thailand. Association for Computational Linguistics.",
1511
+ "Angela Fan, Edouard Grave, and Armand Joulin. 2020. Reducing transformer depth on demand with structured dropout. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net.",
1512
+ "Theodore Glavas, Joud Chataoui, Florence Regol, Wassim Jabbour, Antonios Valkanas, Boris N. Oreshkin, and Mark Coates. 2024. Dynamic layer selection in decoder-only transformers. arXiv preprint arXiv:2410.20022."
1513
+ ],
1514
+ "bbox": [
1515
+ 115,
1516
+ 85,
1517
+ 485,
1518
+ 919
1519
+ ],
1520
+ "page_idx": 9
1521
+ },
1522
+ {
1523
+ "type": "list",
1524
+ "sub_type": "ref_text",
1525
+ "list_items": [
1526
+ "Sylvain Gugger, Lysandre Debut, Thomas Wolf, Philipp Schmid, Zachary Mueller, Sourab Mangrulkar, Marc Sun, and Benjamin Bossan. 2022. Accelerate: Training and inference at scale made simple, efficient and adaptable. https://github.com/huggingface/accelerate.",
1527
+ "Zhenyu He, Zexuan Zhong, Tianle Cai, Jason Lee, and Di He. 2024. REST: Retrieval-based speculative decoding. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pages 1582-1595, Mexico City, Mexico. Association for Computational Linguistics.",
1528
+ "John L. Hennessy and David A. Patterson. 2012. Computer Architecture: A Quantitative Approach, 5 edition. Morgan Kaufmann, Amsterdam.",
1529
+ "Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. 2020. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361.",
1530
+ "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.",
1531
+ "Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, Kristina Toutanova, Llion Jones, Matthew Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. 2019. Natural questions: A benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:452-466.",
1532
+ "Yaniv Leviathan, Matan Kalman, and Yossi Matias. 2023. Fast inference from transformers via speculative decoding. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 19274-19286. PMLR.",
1533
+ "Yuhui Li, Fangyun Wei, Chao Zhang, and Hongyang Zhang. 2024a. EAGLE-2: Faster inference of language models with dynamic draft trees. arXiv preprint arXiv:2406.16858.",
1534
+ "Yuhui Li, Fangyun Wei, Chao Zhang, and Hongyang Zhang. 2024b. EAGLE: speculative sampling requires rethinking feature uncertainty. In *Forty-first International Conference on Machine Learning*, ICML 2024, Vienna, Austria, July 21-27, 2024. Open-Review.net.",
1535
+ "Fangcheng Liu, Yehui Tang, Zhenhua Liu, Yunsheng Ni, Kai Han, and Yunhe Wang. 2024. Kangaroo: Lossless self-speculative decoding via double early exiting. arXiv preprint arXiv:2404.18911."
1536
+ ],
1537
+ "bbox": [
1538
+ 510,
1539
+ 85,
1540
+ 880,
1541
+ 919
1542
+ ],
1543
+ "page_idx": 9
1544
+ },
1545
+ {
1546
+ "type": "page_number",
1547
+ "text": "31617",
1548
+ "bbox": [
1549
+ 475,
1550
+ 928,
1551
+ 524,
1552
+ 940
1553
+ ],
1554
+ "page_idx": 9
1555
+ },
1556
+ {
1557
+ "type": "list",
1558
+ "sub_type": "ref_text",
1559
+ "list_items": [
1560
+ "Zichang Liu, Jue Wang, Tri Dao, Tianyi Zhou, Binhang Yuan, Zhao Song, Anshumali Shrivastava, Ce Zhang, Yuandong Tian, Christopher Re, and Beidi Chen. 2023. Deja vu: Contextual sparsity for efficient LLMs at inference time. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 22137-22176. PMLR.",
1561
+ "Xupeng Miao, Gabriele Oliaro, Zhihao Zhang, Xinhao Cheng, Zeyu Wang, Zhengxin Zhang, Rae Ying Yee Wong, Alan Zhu, Lijie Yang, Xiaoxiang Shi, Chunan Shi, Zhuoming Chen, Daiyaan Arfeen, Reyna Abhyankar, and Zhihao Jia. 2024. Specinfer: Accelerating large language model serving with tree-based speculative inference and verification. In Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 3, ASPLOS '24, page 932-949, New York, NY, USA. Association for Computing Machinery.",
1562
+ "Ramesh Nallapati, Bowen Zhou, Cicero dos Santos, Caglar Gulcehre, and Bing Xiang. 2016. Abstractive text summarization using sequence-to-sequence RNNs and beyond. In Proceedings of the 20th SIGNLL Conference on Computational Natural Language Learning, pages 280-290, Berlin, Germany. Association for Computational Linguistics.",
1563
+ "David A. Patterson. 2004. Latency lags bandwidth. Commun. ACM, 47(10):71-75.",
1564
+ "Machel Reid, Nikolay Savinov, Denis Teptyashin, Dmitry Lepikhin, Timothy Lillicrap, Jean-baptiste Alayrac, Radu Soricut, Angeliki Lazaridou, Orhan Firat, Julian Schrittwieser, et al. 2024. Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context. arXiv preprint arXiv:2403.05530.",
1565
+ "Apoorv Saxena. 2023. Prompt lookup decoding.",
1566
+ "Noam Shazeer. 2019. Fast transformer decoding: One write-head is all you need. arXiv preprint arXiv:1911.02150.",
1567
+ "Hanshi Sun, Zhuoming Chen, Xinyu Yang, Yuandong Tian, and Beidi Chen. 2024. Triforce: Lossless acceleration of long sequence generation with hierarchical speculative decoding. arXiv preprint arXiv:2404.11912.",
1568
+ "Ruslan Svirschevski, Avner May, Zhuoming Chen, Beidi Chen, Zhihao Jia, and Max Ryabinin. 2024. Specexec: Massively parallel speculative decoding for interactive llm inference on consumer devices. arXiv preprint arXiv:2406.02532.",
1569
+ "Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, et al. 2023a. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971."
1570
+ ],
1571
+ "bbox": [
1572
+ 115,
1573
+ 85,
1574
+ 489,
1575
+ 917
1576
+ ],
1577
+ "page_idx": 10
1578
+ },
1579
+ {
1580
+ "type": "list",
1581
+ "sub_type": "ref_text",
1582
+ "list_items": [
1583
+ "Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023b. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288.",
1584
+ "Heming Xia, Tao Ge, Peiyi Wang, Si-Qing Chen, Furu Wei, and Zhifang Sui. 2023. Speculative decoding: Exploiting speculative execution for accelerating seq2seq generation. In *Findings of the Association for Computational Linguistics: EMNLP* 2023, pages 3909-3925, Singapore. Association for Computational Linguistics.",
1585
+ "Heming Xia, Yongqi Li, Jun Zhang, Cunxiao Du, and Wenjie Li. 2024a. Swift: On-the-fly self-speculative decoding for llm inference acceleration. arXiv preprint arXiv:2410.06916.",
1586
+ "Heming Xia, Zhe Yang, Qingxiu Dong, Peiyi Wang, Yongqi Li, Tao Ge, Tianyu Liu, Wenjie Li, and Zhifang Sui. 2024b. Unlocking efficiency in large language model inference: A comprehensive survey of speculative decoding. In Findings of the Association for Computational Linguistics ACL 2024, pages 7655-7671, Bangkok, Thailand and virtual meeting. Association for Computational Linguistics.",
1587
+ "An Yang, Baosong Yang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Zhou, Chengpeng Li, Chengyuan Li, Dayiheng Liu, Fei Huang, et al. 2024. Qwen2 technical report. arXiv preprint arXiv:2407.10671.",
1588
+ "Jun Zhang, Jue Wang, Huan Li, Lidan Shou, Ke Chen, Gang Chen, and Sharad Mehrotra. 2024. Draft & verify: Lossless large language model acceleration via self-speculative decoding. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 11263-11282, Bangkok, Thailand. Association for Computational Linguistics.",
1589
+ "Kaiyan Zhang, Ning Ding, Biqing Qi, Xuekai Zhu, Xinwei Long, and Bowen Zhou. 2023. CRaSh: Clustering, removing, and sharing enhance fine-tuning without full large language model. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 9612-9637, Singapore. Association for Computational Linguistics.",
1590
+ "Minjia Zhang and Yuxiong He. 2020. Accelerating training of transformer-based language models with progressive layer dropping. In Advances in Neural Information Processing Systems, volume 33, pages 14011-14023. Curran Associates, Inc.",
1591
+ "Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric Xing, Hao Zhang, Joseph E. Gonzalez, and Ion Stoica. 2023. Judging LLM-as-a-judge with MT-bench and chatbot arena. In Thirty-seventh Conference on Neural Information Processing Systems Datasets and Benchmarks Track."
1592
+ ],
1593
+ "bbox": [
1594
+ 510,
1595
+ 85,
1596
+ 884,
1597
+ 900
1598
+ ],
1599
+ "page_idx": 10
1600
+ },
1601
+ {
1602
+ "type": "page_number",
1603
+ "text": "31618",
1604
+ "bbox": [
1605
+ 475,
1606
+ 928,
1607
+ 524,
1608
+ 940
1609
+ ],
1610
+ "page_idx": 10
1611
+ }
1612
+ ]
2025/CLaSp_ In-Context Layer Skip for Self-Speculative Decoding/ef9ee0d8-c50a-4f5c-9b72-baac0ef1de40_model.json ADDED
@@ -0,0 +1,2191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ [
3
+ {
4
+ "type": "title",
5
+ "bbox": [
6
+ 0.182,
7
+ 0.091,
8
+ 0.817,
9
+ 0.113
10
+ ],
11
+ "angle": 0,
12
+ "content": "CLaSp: In-Context Layer Skip for Self-Speculative Decoding"
13
+ },
14
+ {
15
+ "type": "text",
16
+ "bbox": [
17
+ 0.143,
18
+ 0.128,
19
+ 0.854,
20
+ 0.162
21
+ ],
22
+ "angle": 0,
23
+ "content": "Longze Chen\\(^{1,2*}\\) Renke Shan\\(^{2,5*}\\) Huiming Wang\\(^{3*}\\) Lu Wang\\(^{5}\\) Ziqiang Liu\\(^{1,2}\\) Run Luo\\(^{1,2}\\) Jiawei Wang\\(^{2}\\) Hamid Alinejad-Rokny\\(^{4}\\) Min Yang\\(^{1\\dagger}\\)"
24
+ },
25
+ {
26
+ "type": "text",
27
+ "bbox": [
28
+ 0.182,
29
+ 0.163,
30
+ 0.816,
31
+ 0.179
32
+ ],
33
+ "angle": 0,
34
+ "content": "<sup>1</sup> Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences"
35
+ },
36
+ {
37
+ "type": "text",
38
+ "bbox": [
39
+ 0.104,
40
+ 0.179,
41
+ 0.894,
42
+ 0.196
43
+ ],
44
+ "angle": 0,
45
+ "content": "2 University of Chinese Academy of Sciences 3 Singapore University of Technology and Design"
46
+ },
47
+ {
48
+ "type": "text",
49
+ "bbox": [
50
+ 0.233,
51
+ 0.196,
52
+ 0.766,
53
+ 0.212
54
+ ],
55
+ "angle": 0,
56
+ "content": "\\(^{4}\\) School of Biomedical Engineering, UNSW Sydney \\(^{5}\\) Ritzz-AI"
57
+ },
58
+ {
59
+ "type": "text",
60
+ "bbox": [
61
+ 0.342,
62
+ 0.214,
63
+ 0.656,
64
+ 0.228
65
+ ],
66
+ "angle": 0,
67
+ "content": "{lz.chen2, min.yang}@siat.ac.cn"
68
+ },
69
+ {
70
+ "type": "title",
71
+ "bbox": [
72
+ 0.261,
73
+ 0.262,
74
+ 0.341,
75
+ 0.276
76
+ ],
77
+ "angle": 0,
78
+ "content": "Abstract"
79
+ },
80
+ {
81
+ "type": "text",
82
+ "bbox": [
83
+ 0.142,
84
+ 0.291,
85
+ 0.461,
86
+ 0.705
87
+ ],
88
+ "angle": 0,
89
+ "content": "Speculative decoding (SD) is a promising method for accelerating the decoding process of Large Language Models (LLMs). The efficiency of SD primarily hinges on the consistency between the draft model and the verify model. However, existing drafting approaches typically require additional modules to be trained, which can be challenging to implement and ensure compatibility across various LLMs. In this paper, we propose CLaSp, an in-context layer-skipping strategy for self-speculative decoding. Unlike prior methods, CLaSp does not require additional drafting modules or extra training. Instead, it employs a plug-and-play mechanism by skipping intermediate layers of the verify model to construct a compressed draft model. Specifically, we develop a dynamic programming algorithm that optimizes the layer-skipping process by leveraging the complete hidden states from the last verification stage as an objective. This enables CLaSp to dynamically adjust its layer-skipping strategy after each verification stage, without relying on pre-optimized sets of skipped layers. Experimental results across diverse downstream tasks demonstrate that CLaSp achieves a speedup of \\(1.3 \\times \\sim 1.7 \\times\\) on LLaMA3 series models without altering the original distribution of the generated text."
90
+ },
91
+ {
92
+ "type": "title",
93
+ "bbox": [
94
+ 0.115,
95
+ 0.731,
96
+ 0.259,
97
+ 0.745
98
+ ],
99
+ "angle": 0,
100
+ "content": "1 Introduction"
101
+ },
102
+ {
103
+ "type": "text",
104
+ "bbox": [
105
+ 0.113,
106
+ 0.757,
107
+ 0.489,
108
+ 0.886
109
+ ],
110
+ "angle": 0,
111
+ "content": "Transformer-based Large Language Models (LLMs) have achieved remarkable success across a wide range of natural language processing applications (Brown et al., 2020; Achiam et al., 2023). Scaling the model size and extending the context window significantly enhance performance (Kaplan et al., 2020; Anil et al., 2023; Reid et al., 2024), but also leads to a rapid increase in"
112
+ },
113
+ {
114
+ "type": "image",
115
+ "bbox": [
116
+ 0.526,
117
+ 0.268,
118
+ 0.871,
119
+ 0.507
120
+ ],
121
+ "angle": 0,
122
+ "content": null
123
+ },
124
+ {
125
+ "type": "image_caption",
126
+ "bbox": [
127
+ 0.508,
128
+ 0.524,
129
+ 0.884,
130
+ 0.608
131
+ ],
132
+ "angle": 0,
133
+ "content": "Figure 1: Previous Self-SD method vs. CLaSp. Compared to the previous Self-SD method, which requires costly Bayesian optimization on training dataset to select a fixed set of skipped layers, CLaSp employs a dynamic layer-skipping strategy that adjusts in real-time based on context."
134
+ },
135
+ {
136
+ "type": "text",
137
+ "bbox": [
138
+ 0.508,
139
+ 0.644,
140
+ 0.883,
141
+ 0.756
142
+ ],
143
+ "angle": 0,
144
+ "content": "inference latency. This latency primarily stems from the autoregressive nature of LLMs, where model parameters must be loaded into GPU SRAM for each token generation, resulting in underutilization of computational cores during the decoding stage (Patterson, 2004; Shazeer, 2019; Agrawal et al., 2023)."
145
+ },
146
+ {
147
+ "type": "text",
148
+ "bbox": [
149
+ 0.508,
150
+ 0.761,
151
+ 0.885,
152
+ 0.921
153
+ ],
154
+ "angle": 0,
155
+ "content": "Inspired by speculative execution in computer systems (Burton, 1985; Hennessy and Patterson, 2012), speculative decoding (SD) (Xia et al., 2023; Leviathan et al., 2023; Chen et al., 2023) is proposed as a lossless autoregressive decoding acceleration technique. SD accelerates autoregressive decoding by introducing an efficient draft model to pre-generate tokens, which are subsequently validated by a slower verify model in parallel. This technique significantly reduces the number"
156
+ },
157
+ {
158
+ "type": "page_footnote",
159
+ "bbox": [
160
+ 0.136,
161
+ 0.895,
162
+ 0.262,
163
+ 0.907
164
+ ],
165
+ "angle": 0,
166
+ "content": "*Equal contribution."
167
+ },
168
+ {
169
+ "type": "page_footnote",
170
+ "bbox": [
171
+ 0.137,
172
+ 0.907,
173
+ 0.281,
174
+ 0.921
175
+ ],
176
+ "angle": 0,
177
+ "content": "† Corresponding author."
178
+ },
179
+ {
180
+ "type": "list",
181
+ "bbox": [
182
+ 0.136,
183
+ 0.895,
184
+ 0.281,
185
+ 0.921
186
+ ],
187
+ "angle": 0,
188
+ "content": null
189
+ },
190
+ {
191
+ "type": "page_number",
192
+ "bbox": [
193
+ 0.475,
194
+ 0.928,
195
+ 0.526,
196
+ 0.941
197
+ ],
198
+ "angle": 0,
199
+ "content": "31608"
200
+ },
201
+ {
202
+ "type": "footer",
203
+ "bbox": [
204
+ 0.084,
205
+ 0.946,
206
+ 0.914,
207
+ 0.958
208
+ ],
209
+ "angle": 0,
210
+ "content": "Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 31608-31618"
211
+ },
212
+ {
213
+ "type": "footer",
214
+ "bbox": [
215
+ 0.269,
216
+ 0.959,
217
+ 0.729,
218
+ 0.972
219
+ ],
220
+ "angle": 0,
221
+ "content": "July 27 - August 1, 2025 ©2025 Association for Computational Linguistics"
222
+ }
223
+ ],
224
+ [
225
+ {
226
+ "type": "text",
227
+ "bbox": [
228
+ 0.113,
229
+ 0.085,
230
+ 0.49,
231
+ 0.262
232
+ ],
233
+ "angle": 0,
234
+ "content": "of forward passes required by the verify model, alleviating memory-bound inefficiencies caused by frequent parameter access. While effective, SD relies on finding or training a suitable draft model that can closely mimic the behavior of the verify model. This requirement is feasible for open-sourced model families, such as LLaMA series (Touvron et al., 2023a,b; Dubey et al., 2024; Yang et al., 2024), but becomes prohibitively difficult for specialized LLMs that lack pre-existing compatible draft model counterparts."
235
+ },
236
+ {
237
+ "type": "text",
238
+ "bbox": [
239
+ 0.117,
240
+ 0.263,
241
+ 0.49,
242
+ 0.454
243
+ ],
244
+ "angle": 0,
245
+ "content": "The difficulty lies in achieving consistency between the draft model and the verify model. For general-purpose models, lightweight modules have been proposed as substitutes for the draft model (Cai et al., 2024; Li et al., 2024b; Du et al., 2024; Liu et al., 2024). These modules are designed to avoid retraining from scratch, but they struggle to generalize across diverse tasks and contexts. As a result, their acceptance rates drop sharply when handling unseen tasks, making them unsuitable for applications requiring robust performance across varying scenarios."
246
+ },
247
+ {
248
+ "type": "text",
249
+ "bbox": [
250
+ 0.117,
251
+ 0.456,
252
+ 0.49,
253
+ 0.696
254
+ ],
255
+ "angle": 0,
256
+ "content": "Self-speculative decoding (Self-SD) (Zhang et al., 2024) addresses the challenge of compatibility by using parts of the verify model itself as a compressed draft model, bypassing the need for additional modules or training. This approach creates the draft model by sparsifying intermediate layers of the verify model, effectively skipping certain computations. Similar to methods that require training, it also lacks robust generalization and heavily relies on an time-consuming Bayesian optimization process. SWIFT (Xia et al., 2024a) extends Self-SD by dynamically optimizing skipped layers as the number of user requests increases, but its effectiveness diminishes when handling sparse or unique task data."
257
+ },
258
+ {
259
+ "type": "text",
260
+ "bbox": [
261
+ 0.117,
262
+ 0.697,
263
+ 0.49,
264
+ 0.921
265
+ ],
266
+ "angle": 0,
267
+ "content": "To bridge this gap, we propose CLaSp, a dynamic in-context layer-skipping method for self-speculative decoding. Unlike existing methods, CLaSp dynamically adjusts the skipped layer set at each decoding step based on the current context, eliminating the need for pre-optimization or retraining (see Figure 1). Our approach leverages the observation of slowly changing embeddings across layers (Liu et al., 2023) and employs a dynamic programming algorithm to identify the optimal skipped layers with minimal additional latency. By using the complete hidden states from the last verification step as ground truth, CLaSp predicts and adjusts the draft model's sparsity in real-time,"
268
+ },
269
+ {
270
+ "type": "text",
271
+ "bbox": [
272
+ 0.51,
273
+ 0.085,
274
+ 0.882,
275
+ 0.116
276
+ ],
277
+ "angle": 0,
278
+ "content": "achieving high acceptance rates while maintaining acceleration benefits."
279
+ },
280
+ {
281
+ "type": "text",
282
+ "bbox": [
283
+ 0.508,
284
+ 0.117,
285
+ 0.885,
286
+ 0.244
287
+ ],
288
+ "angle": 0,
289
+ "content": "We evaluate CLaSp on the LLaMA3 series models using Spec-Bench (Xia et al., 2024b), a comprehensive benchmark for speculative decoding across diverse scenarios. CLaSp achieves \\(1.3 \\times \\sim 1.7 \\times\\) wallclock time speedup compared to conventional autoregressive decoding while preserving the original distribution of generated text. Our contributions are summarized as follows:"
290
+ },
291
+ {
292
+ "type": "text",
293
+ "bbox": [
294
+ 0.532,
295
+ 0.255,
296
+ 0.883,
297
+ 0.303
298
+ ],
299
+ "angle": 0,
300
+ "content": "- We introduce CLaSp, a self-speculative decoding framework that dynamically adjusts the layer-skipping strategy based on context."
301
+ },
302
+ {
303
+ "type": "text",
304
+ "bbox": [
305
+ 0.532,
306
+ 0.313,
307
+ 0.885,
308
+ 0.377
309
+ ],
310
+ "angle": 0,
311
+ "content": "- We propose performance optimization strategies in CLaSp to fully leverage GPU parallelism, making the extra latency from layer optimization almost negligible."
312
+ },
313
+ {
314
+ "type": "text",
315
+ "bbox": [
316
+ 0.532,
317
+ 0.387,
318
+ 0.885,
319
+ 0.466
320
+ ],
321
+ "angle": 0,
322
+ "content": "- We conduct extensive experiments on Spec-Bench, showing that CLaSp consistently achieves \\(1.3 \\times \\sim 1.7 \\times\\) speedup without training, and provide a detailed analysis of its key hyper-parameters."
323
+ },
324
+ {
325
+ "type": "list",
326
+ "bbox": [
327
+ 0.532,
328
+ 0.255,
329
+ 0.885,
330
+ 0.466
331
+ ],
332
+ "angle": 0,
333
+ "content": null
334
+ },
335
+ {
336
+ "type": "title",
337
+ "bbox": [
338
+ 0.51,
339
+ 0.479,
340
+ 0.667,
341
+ 0.494
342
+ ],
343
+ "angle": 0,
344
+ "content": "2 Related Work"
345
+ },
346
+ {
347
+ "type": "text",
348
+ "bbox": [
349
+ 0.508,
350
+ 0.503,
351
+ 0.884,
352
+ 0.791
353
+ ],
354
+ "angle": 0,
355
+ "content": "Speculative Decoding. Speculative decoding (Xia et al., 2023; Leviathan et al., 2023; Chen et al., 2023) has been proposed as an effective strategy for lossless acceleration of LLM inference. Some approaches aim to reduce the high cost of training from scratch by introducing lightweight modules as draft model. Medusa (Cai et al., 2024) trains multiple decoding heads to predict the next \\( n \\) tokens in parallel. EAGLE and EAGLE-2 (Li et al., 2024b,a) integrate a lightweight plug-in (a single transformer decoder layer) to existing LLMs. Glimpse Draft Model (Du et al., 2024) reuses the verify model's KV cache to generate candidate tokens that are more likely to be accepted by the verify model. However, these approaches rely heavily on pre-trained modules optimized for specific contexts, making them less effective for tasks with unseen data."
356
+ },
357
+ {
358
+ "type": "text",
359
+ "bbox": [
360
+ 0.508,
361
+ 0.793,
362
+ 0.885,
363
+ 0.92
364
+ ],
365
+ "angle": 0,
366
+ "content": "Retrieval-based methods, such as REST (He et al., 2024) and Prompt Lookup Decoding (Saxena, 2023), replace the draft model by retrieving relevant drafts from a text corpus or context based on input prompts. While these methods reduce reliance on explicit draft model models, their performance is highly sensitive to the quality and relevance of the retrieved drafts."
367
+ },
368
+ {
369
+ "type": "page_number",
370
+ "bbox": [
371
+ 0.476,
372
+ 0.928,
373
+ 0.526,
374
+ 0.941
375
+ ],
376
+ "angle": 0,
377
+ "content": "31609"
378
+ }
379
+ ],
380
+ [
381
+ {
382
+ "type": "text",
383
+ "bbox": [
384
+ 0.113,
385
+ 0.085,
386
+ 0.49,
387
+ 0.31
388
+ ],
389
+ "angle": 0,
390
+ "content": "To address the challenges of designing compatible draft model, Self-SD (Zhang et al., 2024) and SWIFT (Xia et al., 2024a) directly leverage parts of the verify model as a compressed draft model by skipping intermediate layers of the original LLM. Triforce (Sun et al., 2024) employs a partial KV cache as the draft model and a full KV cache as the verify model, reducing inference latency by minimizing I/O operations, especially in long-context tasks. Despite these innovations, static configurations for layer skipping prevent these methods from dynamically adapting to changing task requirements or contexts, limiting their efficiency and generalizability."
391
+ },
392
+ {
393
+ "type": "text",
394
+ "bbox": [
395
+ 0.113,
396
+ 0.312,
397
+ 0.49,
398
+ 0.442
399
+ ],
400
+ "angle": 0,
401
+ "content": "To further enhance speculative decoding, tree-based attention mechanisms (Miao et al., 2024; Cai et al., 2024; Chen et al., 2024; Svirschevski et al., 2024) extend the decoding process from generating a single candidate sequence to exploring a candidate tree. By providing the verify model with multiple options for validation, these methods improve the acceptance rate of speculative decoding."
402
+ },
403
+ {
404
+ "type": "text",
405
+ "bbox": [
406
+ 0.113,
407
+ 0.454,
408
+ 0.49,
409
+ 0.679
410
+ ],
411
+ "angle": 0,
412
+ "content": "Layer-wise Sparsity. Layer redundancy in LLMs has been extensively studied, with methods such as LayerDrop (Fan et al., 2020), LayerSkip (Elhoushi et al., 2024), structured pruning (Zhang and He, 2020), SkipDecode (Corro et al., 2023), and LayerSharing (Zhang et al., 2023) demonstrating that not all layers are equally important. These methods suggest that the importance of each layer varies depending on the task and context, and that certain layers can be skipped or removed without significantly affecting model performance. However, determining which layers to skip or optimize for different downstream tasks remains a substantial challenge."
413
+ },
414
+ {
415
+ "type": "text",
416
+ "bbox": [
417
+ 0.113,
418
+ 0.68,
419
+ 0.49,
420
+ 0.921
421
+ ],
422
+ "angle": 0,
423
+ "content": "Deja Vu (Liu et al., 2023) and LISA (pan, 2024) demonstrate the potential of leveraging sparsity to accelerate LLM inference, either by exploiting context sparsity or by optimizing a subset of layers during training. Although effective, these methods rely on lossy sparsification techniques, introducing discrepancies between the sparse and original distributions. Similarly, Glavas et al. (2024) explore dynamic inference methods such as layer skipping and early exiting, which enable task-dependent acceleration but lack compatibility with speculative decoding, limiting their potential for lossless acceleration. Thus, we aim to combine the strengths of layer-wise sparsity and speculative decoding to achieve lossless acceleration across diverse tasks."
424
+ },
425
+ {
426
+ "type": "algorithm",
427
+ "bbox": [
428
+ 0.518,
429
+ 0.088,
430
+ 0.884,
431
+ 0.411
432
+ ],
433
+ "angle": 0,
434
+ "content": "Algorithm 1: CLaSp Skip Layer Strategy \nInput: Num hidden layers \\(L\\), num skip layers \\(M\\), hidden states \\(X = \\{x_0, x_1, \\ldots, x_{L-1}\\}\\), DecoderLayer \\(f_i\\), hidden size \\(d\\) \nOutput: The optimal skipped layer set \\(S\\) \n\\(g \\gets \\text{zeros}(L+1, M+1, d)\\), \\(g[0,0] \\gets x_0\\) \n// Dynamic programming \nfor \\(i = 1\\) to \\(L + 1\\) do \n\\(\\begin{array}{l} g[i,0] \\gets x_i \\\\ \\ell \\gets \\min(i - 1, M) \\\\ \\mathcal{G} \\gets f_{i-1}(g[i - 1, 1 : \\ell + 1]) \\\\ \\mathcal{F} \\gets \\text{norm}(\\text{cat}(\\mathcal{G}, g[i - 1, : \\ell])) \\\\ \\sigma \\gets \\mathcal{F} \\cdot \\text{norm}(x_i) \\\\ \\text{if } \\sigma[: \\ell] > \\sigma[\\ell]: \\text{ then} \\\\ |g[i][1 : \\ell + 1] \\gets \\mathcal{G} \\\\ \\text{else} \\\\ |g[i][1 : \\ell + 1] \\gets g[i - 1, : \\ell] \\\\ \\text{if } i \\leq M \\text{ then} \\\\ |g[i, i] \\gets g[i - 1, i - 1] \\\\ S \\gets \\text{zeros}(L) \\\\ // \\text{Backtracking optimal skipped layer set } S \\\\ \\text{while } i > 0 \\text{ and } j > 0 \\text{ do} \\\\ \\text{if } g[i, j] = g[i - 1, j - 1] \\text{ then} \\\\ |S[i - 1] \\gets 1 \\\\ j \\gets j - 1 \\\\ i \\gets i - 1 \\\\ \\end{array}\\)"
435
+ },
436
+ {
437
+ "type": "title",
438
+ "bbox": [
439
+ 0.51,
440
+ 0.438,
441
+ 0.607,
442
+ 0.456
443
+ ],
444
+ "angle": 0,
445
+ "content": "3 CLaSp"
446
+ },
447
+ {
448
+ "type": "text",
449
+ "bbox": [
450
+ 0.508,
451
+ 0.466,
452
+ 0.885,
453
+ 0.58
454
+ ],
455
+ "angle": 0,
456
+ "content": "In this section, we first introduce the pipeline of CLaSp from a global perspective. Then, we explore the main challenges (§3.2) faced by CLaSp and formulate the problem of layer skipping (§3.3). Subsequently, we provide a detailed description of the CLaSp algorithm (§3.4 and §3.5) and efficiency optimization strategies (§3.6 and §3.7)."
457
+ },
458
+ {
459
+ "type": "title",
460
+ "bbox": [
461
+ 0.509,
462
+ 0.593,
463
+ 0.62,
464
+ 0.609
465
+ ],
466
+ "angle": 0,
467
+ "content": "3.1 Pipeline"
468
+ },
469
+ {
470
+ "type": "text",
471
+ "bbox": [
472
+ 0.508,
473
+ 0.616,
474
+ 0.885,
475
+ 0.922
476
+ ],
477
+ "angle": 0,
478
+ "content": "CLaSp can be explained as a three-stage process: (1) Drafting: The draft model autoregressively generates \\( K \\) draft tokens from the given prompt sequence \\( x_{1},\\ldots ,x_{i} \\), denoted as \\( x_{i + 1},\\ldots ,x_{i + K} \\). (2) Verification: The verify model verifies the tokens generated during the drafting stage. This verification is performed in a single forward pass, where the LLM predicts the probability distribution for each draft token and evaluates whether they align with the full model's predictions. Once a draft token \\( x_{j} \\) is rejected, the original LLM's prediction overwrites \\( x_{j} \\), and drafting resumes from token \\( x_{j + 1} \\) in the next round. (3) Layer Optimization: Using the hidden states of the last accepted token \\( x_{j} \\) as the optimization objective, the optimal skipped layer set \\( S^{*} \\) is updated to guide the next round of drafting. As shown in Figure 2, before each round of drafting, the draft model can be updated to better adapt to the current context."
479
+ },
480
+ {
481
+ "type": "page_number",
482
+ "bbox": [
483
+ 0.476,
484
+ 0.928,
485
+ 0.526,
486
+ 0.941
487
+ ],
488
+ "angle": 0,
489
+ "content": "31610"
490
+ }
491
+ ],
492
+ [
493
+ {
494
+ "type": "image",
495
+ "bbox": [
496
+ 0.129,
497
+ 0.087,
498
+ 0.873,
499
+ 0.359
500
+ ],
501
+ "angle": 0,
502
+ "content": null
503
+ },
504
+ {
505
+ "type": "image_caption",
506
+ "bbox": [
507
+ 0.112,
508
+ 0.37,
509
+ 0.885,
510
+ 0.416
511
+ ],
512
+ "angle": 0,
513
+ "content": "Figure 2: The overall framework of CLaSp consists of three stages: (1) Draft, (2) Verify, (3) Layer Optimization. After the Verify stage, CLaSp uses the information obtained to perform Layer Optimization, resulting in a new optimal layer skipping set \\( S^{*} \\). This set guides the next Draft round, repeating the entire process."
514
+ },
515
+ {
516
+ "type": "title",
517
+ "bbox": [
518
+ 0.114,
519
+ 0.439,
520
+ 0.295,
521
+ 0.455
522
+ ],
523
+ "angle": 0,
524
+ "content": "3.2 Main Challenges"
525
+ },
526
+ {
527
+ "type": "text",
528
+ "bbox": [
529
+ 0.113,
530
+ 0.462,
531
+ 0.49,
532
+ 0.525
533
+ ],
534
+ "angle": 0,
535
+ "content": "Compared to previous methods, CLaSp dynamically updates the skipped layer set before each drafting step, requiring solutions to two main challenges:"
536
+ },
537
+ {
538
+ "type": "text",
539
+ "bbox": [
540
+ 0.113,
541
+ 0.528,
542
+ 0.49,
543
+ 0.639
544
+ ],
545
+ "angle": 0,
546
+ "content": "(1) How to determine which layers should be skipped? This is the most critical issue addressed by CLaSp, as it directly impacts drafting quality. An ideal layer-skipping strategy must adapt to the most recent context, ensuring that the drafted tokens are more likely to be accepted by the verify model."
547
+ },
548
+ {
549
+ "type": "text",
550
+ "bbox": [
551
+ 0.113,
552
+ 0.642,
553
+ 0.49,
554
+ 0.771
555
+ ],
556
+ "angle": 0,
557
+ "content": "(2) How to reduce the additional latency caused by layer optimization? The dynamic skipping strategy inevitably introduces computational delays due to the need for repeated searches to identify the current optimal layer subset. To ensure that layer optimization does not become the primary bottleneck, minimizing these additional delays is essential for maximizing the speedup benefits."
558
+ },
559
+ {
560
+ "type": "list",
561
+ "bbox": [
562
+ 0.113,
563
+ 0.528,
564
+ 0.49,
565
+ 0.771
566
+ ],
567
+ "angle": 0,
568
+ "content": null
569
+ },
570
+ {
571
+ "type": "title",
572
+ "bbox": [
573
+ 0.114,
574
+ 0.786,
575
+ 0.443,
576
+ 0.801
577
+ ],
578
+ "angle": 0,
579
+ "content": "3.3 Problem Formulation of Layer Skip"
580
+ },
581
+ {
582
+ "type": "text",
583
+ "bbox": [
584
+ 0.113,
585
+ 0.809,
586
+ 0.49,
587
+ 0.922
588
+ ],
589
+ "angle": 0,
590
+ "content": "Let \\(\\mathcal{M}_v\\) be the verify model and \\(\\mathcal{M}_d\\) be the draft model obtained by skipping certain intermediate layers from the original LLM. \\(F_{\\mathcal{M}_v}(X)\\) and \\(F_{\\mathcal{M}_d}(X)\\) represent the output hidden states on the top of the last token of current input \\(X\\), passing through the verify model or the draft model respectively. Our goal is to find the optimal skipped layer"
591
+ },
592
+ {
593
+ "type": "text",
594
+ "bbox": [
595
+ 0.509,
596
+ 0.439,
597
+ 0.883,
598
+ 0.472
599
+ ],
600
+ "angle": 0,
601
+ "content": "set \\(S\\) that minimizes the cosine similarity between \\(F_{\\mathcal{M}_v}(X)\\) and \\(F_{\\mathcal{M}_d}(X)\\):"
602
+ },
603
+ {
604
+ "type": "equation",
605
+ "bbox": [
606
+ 0.526,
607
+ 0.482,
608
+ 0.884,
609
+ 0.542
610
+ ],
611
+ "angle": 0,
612
+ "content": "\\[\n\\begin{array}{l} \\mathcal {S} ^ {*} = \\underset {\\mathcal {S}} {\\arg \\min} \\operatorname {c o s i n e} (F _ {\\mathcal {M} _ {V}} (X), F _ {\\mathcal {M} _ {D}} (X)), \\\\ \\begin{array}{l} \\text {s . t .} \\mathcal {S} \\in \\{0, 1 \\} ^ {L} \\\\ \\end{array} \\tag {1} \\\\ \\end{array}\n\\]"
613
+ },
614
+ {
615
+ "type": "text",
616
+ "bbox": [
617
+ 0.508,
618
+ 0.544,
619
+ 0.885,
620
+ 0.575
621
+ ],
622
+ "angle": 0,
623
+ "content": "where \\(L\\) represents the number of transformer layers in the verify model."
624
+ },
625
+ {
626
+ "type": "title",
627
+ "bbox": [
628
+ 0.509,
629
+ 0.587,
630
+ 0.85,
631
+ 0.603
632
+ ],
633
+ "angle": 0,
634
+ "content": "3.4 Approximate Dynamic Programming"
635
+ },
636
+ {
637
+ "type": "text",
638
+ "bbox": [
639
+ 0.507,
640
+ 0.607,
641
+ 0.885,
642
+ 0.848
643
+ ],
644
+ "angle": 0,
645
+ "content": "The principle behind selecting information for layer optimization is to minimize additional computational overhead by utilizing information already obtained in previous steps. In speculative decoding, we observed that the hidden states of the last accepted token after each verification step are not fully utilized. To address this, we propose leveraging this feedback information to predict the draft model configuration for the next drafting stage. Specifically, let the input tokens to a Transformer model be denoted as \\( X \\), with an embedding layer that maps token indices to token embeddings \\( h_0 \\). The Transformer model consists of \\( L \\) layers, where the \\( l \\)-th Transformer layer performs a transformation \\( f_l \\), evolving the embeddings as:"
646
+ },
647
+ {
648
+ "type": "equation",
649
+ "bbox": [
650
+ 0.641,
651
+ 0.861,
652
+ 0.75,
653
+ 0.877
654
+ ],
655
+ "angle": 0,
656
+ "content": "\\[\nh _ {l + 1} = f _ {l} \\left(h _ {l}\\right)\n\\]"
657
+ },
658
+ {
659
+ "type": "text",
660
+ "bbox": [
661
+ 0.509,
662
+ 0.89,
663
+ 0.884,
664
+ 0.922
665
+ ],
666
+ "angle": 0,
667
+ "content": "Let \\(\\mathcal{D}(i,j)\\) represent the maximum cosine similarity between \\(h_i\\) and the optimal hidden state"
668
+ },
669
+ {
670
+ "type": "page_number",
671
+ "bbox": [
672
+ 0.476,
673
+ 0.928,
674
+ 0.524,
675
+ 0.941
676
+ ],
677
+ "angle": 0,
678
+ "content": "31611"
679
+ }
680
+ ],
681
+ [
682
+ {
683
+ "type": "image",
684
+ "bbox": [
685
+ 0.12,
686
+ 0.085,
687
+ 0.368,
688
+ 0.219
689
+ ],
690
+ "angle": 0,
691
+ "content": null
692
+ },
693
+ {
694
+ "type": "image_caption",
695
+ "bbox": [
696
+ 0.232,
697
+ 0.224,
698
+ 0.254,
699
+ 0.238
700
+ ],
701
+ "angle": 0,
702
+ "content": "(a)"
703
+ },
704
+ {
705
+ "type": "image",
706
+ "bbox": [
707
+ 0.373,
708
+ 0.086,
709
+ 0.621,
710
+ 0.218
711
+ ],
712
+ "angle": 0,
713
+ "content": null
714
+ },
715
+ {
716
+ "type": "image_caption",
717
+ "bbox": [
718
+ 0.486,
719
+ 0.224,
720
+ 0.51,
721
+ 0.238
722
+ ],
723
+ "angle": 0,
724
+ "content": "(b)"
725
+ },
726
+ {
727
+ "type": "image",
728
+ "bbox": [
729
+ 0.629,
730
+ 0.086,
731
+ 0.878,
732
+ 0.219
733
+ ],
734
+ "angle": 0,
735
+ "content": null
736
+ },
737
+ {
738
+ "type": "image_caption",
739
+ "bbox": [
740
+ 0.741,
741
+ 0.224,
742
+ 0.764,
743
+ 0.238
744
+ ],
745
+ "angle": 0,
746
+ "content": "(c)"
747
+ },
748
+ {
749
+ "type": "image_caption",
750
+ "bbox": [
751
+ 0.112,
752
+ 0.248,
753
+ 0.886,
754
+ 0.351
755
+ ],
756
+ "angle": 0,
757
+ "content": "Figure 3: (a) Sparse Persistence Observation: Skipped layer sets selected for adjacent tokens exhibit high similarity, with this similarity gradually decreasing as the token gap increases. This observation enables layer optimization on the current token to guide subsequent drafting processes. (b) Approximate Markov Property: Cosine similarity comparisons of hidden states obtained using Brute Force, Random, and CLaSp's dynamic programming configurations against the full forward pass demonstrate the approximate Markov property inherent to CLaSp. (c) Efficiency Optimization Strategies: Latency breakdown per query shows that Layer Optimization introduces only \\(4.8\\%\\) additional delay, underscoring its negligible impact on overall latency."
758
+ },
759
+ {
760
+ "type": "text",
761
+ "bbox": [
762
+ 0.113,
763
+ 0.374,
764
+ 0.489,
765
+ 0.423
766
+ ],
767
+ "angle": 0,
768
+ "content": "\\(g(i,j)\\) obtained by skipping \\(j\\) layers among the first \\(i\\) transformer layers. So we design a dynamic programming transition equation defined as:"
769
+ },
770
+ {
771
+ "type": "equation",
772
+ "bbox": [
773
+ 0.125,
774
+ 0.435,
775
+ 0.488,
776
+ 0.474
777
+ ],
778
+ "angle": 0,
779
+ "content": "\\[\n\\begin{array}{r} \\mathcal {D} (i, j) = \\max \\left\\{\\cos i n e (h _ {i}, g (i - 1, j - 1)), \\right. \\\\ \\left. \\cos i n e (h _ {i}, f _ {i - 1} (g (i - 1, j)))) \\right\\} \\end{array} \\tag {2}\n\\]"
780
+ },
781
+ {
782
+ "type": "text",
783
+ "bbox": [
784
+ 0.113,
785
+ 0.485,
786
+ 0.49,
787
+ 0.534
788
+ ],
789
+ "angle": 0,
790
+ "content": "where cosine is used to calculate the cosine similarity between two vectors. The CLaSp skip layer algorithm process is shown in Algorithm 1."
791
+ },
792
+ {
793
+ "type": "title",
794
+ "bbox": [
795
+ 0.114,
796
+ 0.545,
797
+ 0.407,
798
+ 0.563
799
+ ],
800
+ "angle": 0,
801
+ "content": "3.5 Approximate Markov Property"
802
+ },
803
+ {
804
+ "type": "text",
805
+ "bbox": [
806
+ 0.113,
807
+ 0.567,
808
+ 0.489,
809
+ 0.695
810
+ ],
811
+ "angle": 0,
812
+ "content": "A crucial prerequisite for dynamic programming algorithms is the \"no aftereffect\" property, which ensures that current decisions and state transitions are independent of previous states. However, when computing the optimal hidden states \\( g(i,j) \\), CLaSp does not strictly satisfy the Markov property, making it theoretically impossible to find an exact optimal solution using Algorithm 1."
813
+ },
814
+ {
815
+ "type": "text",
816
+ "bbox": [
817
+ 0.113,
818
+ 0.697,
819
+ 0.489,
820
+ 0.841
821
+ ],
822
+ "angle": 0,
823
+ "content": "Fortunately, due to the favorable property of slowly changing embeddings across layers, we observe that CLaSp's approximate algorithm closely aligns with the results of a brute force search for the optimal skipped layer set. To validate this, we fixed the first and last 10 layers of the 32-layer LLaMA3-8B model and compared the outcomes of brute force search, random layer selection, and CLaSp across the remaining 12 layers."
824
+ },
825
+ {
826
+ "type": "text",
827
+ "bbox": [
828
+ 0.113,
829
+ 0.842,
830
+ 0.49,
831
+ 0.922
832
+ ],
833
+ "angle": 0,
834
+ "content": "As shown in Figure 3b, the hidden states obtained by skipping the layers selected by CLaSp exhibit remarkable consistency with those from the brute force search, demonstrating a high cosine similarity with the hidden states of the original LLM."
835
+ },
836
+ {
837
+ "type": "text",
838
+ "bbox": [
839
+ 0.508,
840
+ 0.374,
841
+ 0.884,
842
+ 0.406
843
+ ],
844
+ "angle": 0,
845
+ "content": "In contrast, the results from randomly selected layers show relatively poor alignment."
846
+ },
847
+ {
848
+ "type": "text",
849
+ "bbox": [
850
+ 0.508,
851
+ 0.409,
852
+ 0.886,
853
+ 0.473
854
+ ],
855
+ "angle": 0,
856
+ "content": "These findings indicate that CLaSp approximates the Markov property effectively, allowing it to find near-optimal solutions within an acceptable error range."
857
+ },
858
+ {
859
+ "type": "title",
860
+ "bbox": [
861
+ 0.509,
862
+ 0.491,
863
+ 0.696,
864
+ 0.507
865
+ ],
866
+ "angle": 0,
867
+ "content": "3.6 Sequence Parallel"
868
+ },
869
+ {
870
+ "type": "text",
871
+ "bbox": [
872
+ 0.508,
873
+ 0.515,
874
+ 0.884,
875
+ 0.66
876
+ ],
877
+ "angle": 0,
878
+ "content": "Unlike previous methods, CLaSp requires multiple layer optimizations during a single inference process. Therefore, the optimization process must be both efficient and accurate to avoid introducing additional delays while ensuring precise drafting in subsequent decoding steps. To address this, we employ parallelization strategies to minimize the additional delay caused by the dynamic programming process."
879
+ },
880
+ {
881
+ "type": "text",
882
+ "bbox": [
883
+ 0.508,
884
+ 0.663,
885
+ 0.884,
886
+ 0.807
887
+ ],
888
+ "angle": 0,
889
+ "content": "When CLaSp performs dynamic programming, the updates for \\(\\mathcal{D}(i,j)\\) and \\(g(i,j)\\) are obtained through a double loop, resulting in a time complexity of \\(\\mathcal{O}(LM)\\). Importantly, when computing the state at \\((i,j)\\), only the state at \\((i - 1,\\cdot)\\) is required. This dependency allows computations for different \\(j\\) values with the same \\(i\\) to be performed independently, enabling parallelization of the second loop."
890
+ },
891
+ {
892
+ "type": "text",
893
+ "bbox": [
894
+ 0.508,
895
+ 0.809,
896
+ 0.886,
897
+ 0.922
898
+ ],
899
+ "angle": 0,
900
+ "content": "To further reduce the GPU memory footprint, we avoid concatenating these states into a batch. Instead, we design a specialized mask matrix that enables parallelization of these states as a sequence. This approach reuses the same KV cache without duplicating it, significantly improving memory efficiency."
901
+ },
902
+ {
903
+ "type": "page_number",
904
+ "bbox": [
905
+ 0.476,
906
+ 0.928,
907
+ 0.526,
908
+ 0.941
909
+ ],
910
+ "angle": 0,
911
+ "content": "31612"
912
+ }
913
+ ],
914
+ [
915
+ {
916
+ "type": "table",
917
+ "bbox": [
918
+ 0.119,
919
+ 0.062,
920
+ 0.884,
921
+ 0.389
922
+ ],
923
+ "angle": 0,
924
+ "content": "<table><tr><td rowspan=\"2\">Models</td><td rowspan=\"2\">Methods</td><td colspan=\"2\">MT-bench</td><td colspan=\"2\">WMT14</td><td colspan=\"2\">CNN/DM</td><td colspan=\"2\">NQ</td><td colspan=\"2\">GSM8K</td><td colspan=\"2\">DPR</td><td>Overall Speedup</td></tr><tr><td>τ</td><td>Speedup</td><td>τ</td><td>Speedup</td><td>τ</td><td>Speedup</td><td>τ</td><td>Speedup</td><td>τ</td><td>Speedup</td><td>τ</td><td>Speedup</td><td>τ</td></tr><tr><td colspan=\"15\">Greedy Setting: Temperature=0</td></tr><tr><td rowspan=\"4\">LLaMA-3-70B</td><td>AUTOREGRESSIVE</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00×</td></tr><tr><td>SELF-SD</td><td>2.57</td><td>1.38×</td><td>4.10</td><td>1.55×</td><td>5.46</td><td>1.57×</td><td>2.60</td><td>1.42×</td><td>3.10</td><td>1.49×</td><td>3.59</td><td>1.43×</td><td>1.47×</td></tr><tr><td>SWIFT</td><td>3.13</td><td>1.26×</td><td>2.90</td><td>1.27×</td><td>3.93</td><td>1.35×</td><td>3.21</td><td>1.29×</td><td>2.86</td><td>1.27×</td><td>3.31</td><td>1.26×</td><td>1.28×</td></tr><tr><td>CLASP</td><td>4.55</td><td>1.64×</td><td>5.81</td><td>1.69×</td><td>7.19</td><td>1.66×</td><td>5.37</td><td>1.72×</td><td>6.77</td><td>1.75×</td><td>4.05</td><td>1.56×</td><td>1.67×</td></tr><tr><td rowspan=\"4\">LLaMA-3-70B -Chat</td><td>AUTOREGRESSIVE</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00×</td></tr><tr><td>SELF-SD</td><td>1.40</td><td>1.23×</td><td>2.27</td><td>1.33×</td><td>1.50</td><td>1.24×</td><td>1.59</td><td>1.26×</td><td>3.00</td><td>1.40×</td><td>2.56</td><td>1.37×</td><td>1.31×</td></tr><tr><td>SWIFT</td><td>4.41</td><td>1.15×</td><td>5.54</td><td>1.27×</td><td>4.52</td><td>1.22×</td><td>4.83</td><td>1.20×</td><td>6.19</td><td>1.31×</td><td>5.97</td><td>1.33×</td><td>1.25×</td></tr><tr><td>CLASP</td><td>2.61</td><td>1.35×</td><td>4.72</td><td>1.51×</td><td>3.48</td><td>1.39×</td><td>3.32</td><td>1.39×</td><td>5.28</td><td>1.53×</td><td>5.61</td><td>1.54×</td><td>1.45×</td></tr><tr><td rowspan=\"4\">LLaMA-3-8B</td><td>AUTOREGRESSIVE</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00×</td></tr><tr><td>SELF-SD</td><td>1.28</td><td>1.07×</td><td>1.35</td><td>1.13×</td><td>1.73</td><td>1.17×</td><td>1.45</td><td>1.13×</td><td>1.44</td><td>1.15×</td><td>2.33</td><td>1.21×</td><td>1.14×</td></tr><tr><td>SWIFT</td><td>2.75</td><td>1.07×</td><td>2.51</td><td>1.09×</td><td>2.76</td><td>1.13×</td><td>2.91</td><td>1.13×</td><td>2.72</td><td>1.10×</td><td>2.96</td><td>1.11×</td><td>1.11×</td></tr><tr><td>CLASP</td><td>3.68</td><td>1.24×</td><td>4.14</td><td>1.23×</td><td>6.22</td><td>1.22×</td><td>4.03</td><td>1.27×</td><td>5.26</td><td>1.26×</td><td>4.17</td><td>1.22×</td><td>1.24×</td></tr><tr><td colspan=\"15\">Non-Greedy Setting: Temperature=1</td></tr><tr><td rowspan=\"4\">LLaMA-3-70B</td><td>AUTOREGRESSIVE</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1,00×</td></tr><tr><td>SELF-SD</td><td>1.64</td><td>1.23×</td><td>2.53</td><td>1.39×</td><td>3.61</td><td>1.43×</td><td>1.53</td><td>1.24×</td><td>2.01</td><td>1.33×</td><td>2.17</td><td>1.24×</td><td>1.31×</td></tr><tr><td>SWIFT</td><td>2.06</td><td>1.10×</td><td>1.96</td><td>1.08×</td><td>1.97</td><td>1.09×</td><td>1.97</td><td>1.08×</td><td>1.98</td><td>1.09×</td><td>2.01</td><td>1.07×</td><td>1.09×</td></tr><tr><td>CLASP</td><td>3.13</td><td>1.49×</td><td>3.33</td><td>1.50×</td><td>5.38</td><td>1.54×</td><td>3.56</td><td>1.54×</td><td>4.32</td><td>1.59×</td><td>2.51</td><td>1.36×</td><td>1.50×</td></tr><tr><td rowspan=\"4\">LLaMA-3-70B -Chat</td><td>AUTOREGRESSIVE</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00×</td></tr><tr><td>SELF-SD</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SWIFT</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>CLASP</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan=\"4\">LLaMA-3-8B</td><td>AUTOREGRESSIVE</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00×</td></tr><tr><td>SELF-SD</td><td>0.98</td><td>0.89×</td><td>1.01</td><td>0.94×</td><td>1.36</td><td>1.02×</td><td>1.09</td><td>0.92×</td><td>1.09</td><td>0.96×</td><td>1.82</td><td>1.03×</td><td>0.96×</td></tr><tr><td>SWIFT</td><td>1.90</td><td>0.80×</td><td>1.92</td><td>0.85×</td><td>1.85</td><td>0.83×</td><td>1.97</td><td>0.84×</td><td>1.95</td><td>0.83×</td><td>1.90</td><td>0.80×</td><td>0.83×</td></tr><tr><td>CLASP</td><td>2.62</td><td>1.11×</td><td>2.78</td><td>1.08×</td><td>4.26</td><td>1.11×</td><td>2.70</td><td>1.08×</td><td>3.76</td><td>1.10×</td><td>2.35</td><td>1.02×</td><td>1.08×</td></tr></table>"
925
+ },
926
+ {
927
+ "type": "table_caption",
928
+ "bbox": [
929
+ 0.113,
930
+ 0.399,
931
+ 0.883,
932
+ 0.445
933
+ ],
934
+ "angle": 0,
935
+ "content": "Table 1: Comparison between CLaSp and prior plug-and-play methods. We report the average acceptance length \\(\\tau\\) and speedup ratio under greedy (Temperature=0) and non-greedy (Temperature=1) settings. Bold numbers denote the best Speedup."
936
+ },
937
+ {
938
+ "type": "title",
939
+ "bbox": [
940
+ 0.114,
941
+ 0.468,
942
+ 0.409,
943
+ 0.484
944
+ ],
945
+ "angle": 0,
946
+ "content": "3.7 Lower Optimization Frequency"
947
+ },
948
+ {
949
+ "type": "text",
950
+ "bbox": [
951
+ 0.113,
952
+ 0.498,
953
+ 0.49,
954
+ 0.738
955
+ ],
956
+ "angle": 0,
957
+ "content": "CLaSp updates the optimal skipped layer set after each verification step, using the feedback from the last accepted token. However, the time cost of performing this update is comparable to that of a verification step, which introduces a bottleneck for CLaSp's inference latency. Fortunately, we observe a phenomenon we term Sparse Persistence: the skipped layer sets required by adjacent tokens tend to exhibit high similarity. To quantify this, we calculate the Jaccard similarity between the skipped layer sets of adjacent tokens. As shown in Figure 3a, the similarity remains high when the token distance is within a certain range and only decreases significantly as the distance between tokens increases."
958
+ },
959
+ {
960
+ "type": "text",
961
+ "bbox": [
962
+ 0.113,
963
+ 0.745,
964
+ 0.49,
965
+ 0.922
966
+ ],
967
+ "angle": 0,
968
+ "content": "Based on this observation, we further found that the optimal skipped layer set does not change drastically after every update. This allowed us to adjust the update frequency by accumulating several verification steps before performing an update, rather than updating after every single verification step. While adopting a lower update frequency slightly reduced the average acceptance rate of draft tokens, the reduction in update latency led to a substantial improvement in the overall speedup ratio. This trade-off highlights the efficiency benefits of"
969
+ },
970
+ {
971
+ "type": "text",
972
+ "bbox": [
973
+ 0.509,
974
+ 0.468,
975
+ 0.883,
976
+ 0.501
977
+ ],
978
+ "angle": 0,
979
+ "content": "leveraging Sparse Persistence to optimize the layer update process."
980
+ },
981
+ {
982
+ "type": "title",
983
+ "bbox": [
984
+ 0.509,
985
+ 0.51,
986
+ 0.656,
987
+ 0.527
988
+ ],
989
+ "angle": 0,
990
+ "content": "4 Experiments"
991
+ },
992
+ {
993
+ "type": "text",
994
+ "bbox": [
995
+ 0.508,
996
+ 0.535,
997
+ 0.884,
998
+ 0.583
999
+ ],
1000
+ "angle": 0,
1001
+ "content": "This section evaluates CLaSp across various text generation tasks to demonstrate its efficiency and effectiveness."
1002
+ },
1003
+ {
1004
+ "type": "text",
1005
+ "bbox": [
1006
+ 0.508,
1007
+ 0.592,
1008
+ 0.885,
1009
+ 0.817
1010
+ ],
1011
+ "angle": 0,
1012
+ "content": "Model and Testbed. We evaluate CLaSp using four different sizes of LLaMA models (Dubey et al., 2024): LLaMA3-8B, LLaMA2-13B, LLaMA3-70B, and LLaMA3.1-405B. The models are deployed on NVIDIA A800 GPUs with 80GB of memory. Specifically, the 8B and 13B models are deployed on a single A800 GPU, while the 70B and 405B models utilize 2 and 8 A800 GPUs, respectively, with pipeline parallelism enabled by Accelerate (Gugger et al., 2022). All models use FP16 precision, except for LLaMA3.1-405B, which employs INT8 quantization for improved memory efficiency. Unless otherwise specified, the batch size is set to 1 for all models."
1013
+ },
1014
+ {
1015
+ "type": "text",
1016
+ "bbox": [
1017
+ 0.508,
1018
+ 0.826,
1019
+ 0.887,
1020
+ 0.922
1021
+ ],
1022
+ "angle": 0,
1023
+ "content": "Datasets. We benchmark the performance of CLaSp on Spec-Bench (Xia et al., 2024b), a comprehensive evaluation suite covering a wide range of datasets and tasks. Spec-Bench includes six subtasks: multi-turn conversation, translation, summarization, question answering, mathematical reason"
1024
+ },
1025
+ {
1026
+ "type": "page_number",
1027
+ "bbox": [
1028
+ 0.476,
1029
+ 0.928,
1030
+ 0.526,
1031
+ 0.941
1032
+ ],
1033
+ "angle": 0,
1034
+ "content": "31613"
1035
+ }
1036
+ ],
1037
+ [
1038
+ {
1039
+ "type": "image",
1040
+ "bbox": [
1041
+ 0.117,
1042
+ 0.083,
1043
+ 0.368,
1044
+ 0.211
1045
+ ],
1046
+ "angle": 0,
1047
+ "content": null
1048
+ },
1049
+ {
1050
+ "type": "image_caption",
1051
+ "bbox": [
1052
+ 0.232,
1053
+ 0.217,
1054
+ 0.252,
1055
+ 0.228
1056
+ ],
1057
+ "angle": 0,
1058
+ "content": "(a)"
1059
+ },
1060
+ {
1061
+ "type": "image",
1062
+ "bbox": [
1063
+ 0.373,
1064
+ 0.081,
1065
+ 0.624,
1066
+ 0.212
1067
+ ],
1068
+ "angle": 0,
1069
+ "content": null
1070
+ },
1071
+ {
1072
+ "type": "image_caption",
1073
+ "bbox": [
1074
+ 0.489,
1075
+ 0.217,
1076
+ 0.51,
1077
+ 0.228
1078
+ ],
1079
+ "angle": 0,
1080
+ "content": "(b)"
1081
+ },
1082
+ {
1083
+ "type": "image",
1084
+ "bbox": [
1085
+ 0.63,
1086
+ 0.082,
1087
+ 0.883,
1088
+ 0.212
1089
+ ],
1090
+ "angle": 0,
1091
+ "content": null
1092
+ },
1093
+ {
1094
+ "type": "image_caption",
1095
+ "bbox": [
1096
+ 0.747,
1097
+ 0.216,
1098
+ 0.767,
1099
+ 0.228
1100
+ ],
1101
+ "angle": 0,
1102
+ "content": "(c)"
1103
+ },
1104
+ {
1105
+ "type": "image_caption",
1106
+ "bbox": [
1107
+ 0.113,
1108
+ 0.24,
1109
+ 0.882,
1110
+ 0.281
1111
+ ],
1112
+ "angle": 0,
1113
+ "content": "Figure 4: The impact of key hyper-parameters on speedup: (a) Number of Skipped Layers; (b) Layer Optimization Interval; (c) Draft-Existing Threshold. The experiment results were all obtained using the LLaMA-3-70B model on MT-Bench."
1114
+ },
1115
+ {
1116
+ "type": "text",
1117
+ "bbox": [
1118
+ 0.113,
1119
+ 0.309,
1120
+ 0.49,
1121
+ 0.469
1122
+ ],
1123
+ "angle": 0,
1124
+ "content": "ing, and retrieval-augmented generation. Specifically, Spec-Bench consists of 80 randomly selected instances from each of MT-bench (Zheng et al., 2023), WMT14 DE-EN, CNN/Daily Mail (Nallapati et al., 2016), Natural Questions (Kwiatkowski et al., 2019), GSM8K (Cobbe et al., 2021), and DPR (Karpukhin et al., 2020). To control the generation length across tasks, we set the maximum sequence length to 1024 tokens, following prior experimental setups (Xia et al., 2024b)."
1125
+ },
1126
+ {
1127
+ "type": "text",
1128
+ "bbox": [
1129
+ 0.113,
1130
+ 0.479,
1131
+ 0.49,
1132
+ 0.688
1133
+ ],
1134
+ "angle": 0,
1135
+ "content": "Comparison. For our main experiments, we use vanilla autoregressive decoding as the baseline, serving as the benchmark for speedup ratios (1.00x). We compare CLaSp against existing training-free layer skip methods, including Self-Speculative Decoding (Zhang et al., 2024) and SWIFT (Xia et al., 2024a). Other speculative decoding (SD) methods are excluded from the comparison as they require additional modules or extensive training, which limits their generalizability. Since the speedup ratio is hardware-dependent, all methods were evaluated on the same devices to ensure a fair comparison."
1136
+ },
1137
+ {
1138
+ "type": "text",
1139
+ "bbox": [
1140
+ 0.113,
1141
+ 0.697,
1142
+ 0.49,
1143
+ 0.921
1144
+ ],
1145
+ "angle": 0,
1146
+ "content": "Performance Metrics. CLaSp is essentially still speculative sampling, which has been proven to enable lossless acceleration (Leviathan et al., 2023). Therefore, we focus solely on acceleration performance rather than generation quality. The following metrics are used for evaluation: Speedup Ratio: The actual test speedup ratio relative to vanilla autoregressive decoding, providing a direct measure of acceleration. Average Acceptance Length \\((\\tau)\\): The average number of tokens generated per drafting-verification cycle, corresponding to the number of tokens accepted from the draft. This metric is independent of hardware and runtime environment, while its limitation is that it does not"
1147
+ },
1148
+ {
1149
+ "type": "text",
1150
+ "bbox": [
1151
+ 0.509,
1152
+ 0.309,
1153
+ 0.884,
1154
+ 0.324
1155
+ ],
1156
+ "angle": 0,
1157
+ "content": "reflect the overhead introduced by the draft model."
1158
+ },
1159
+ {
1160
+ "type": "title",
1161
+ "bbox": [
1162
+ 0.509,
1163
+ 0.336,
1164
+ 0.719,
1165
+ 0.351
1166
+ ],
1167
+ "angle": 0,
1168
+ "content": "4.1 Experimental Result"
1169
+ },
1170
+ {
1171
+ "type": "text",
1172
+ "bbox": [
1173
+ 0.508,
1174
+ 0.357,
1175
+ 0.884,
1176
+ 0.453
1177
+ ],
1178
+ "angle": 0,
1179
+ "content": "As shown in Table 1, we report the performance of CLaSp and prior plug-and-play methods on text generation tasks from Spec-Bench under both greedy (Temperature \\(= 0\\)) and non-greedy (Temperature \\(= 1\\)) settings. The experimental results reveal the following findings."
1180
+ },
1181
+ {
1182
+ "type": "text",
1183
+ "bbox": [
1184
+ 0.508,
1185
+ 0.455,
1186
+ 0.885,
1187
+ 0.566
1188
+ ],
1189
+ "angle": 0,
1190
+ "content": "CLaSp demonstrates superior efficiency compared to previous methods, achieving consistent speedups of \\(1.3 \\times \\sim 1.7 \\times\\) over vanilla autoregressive decoding across various models and tasks. Prior methods relying on Bayesian optimization exhibit lower performance, particularly when data volume is limited."
1191
+ },
1192
+ {
1193
+ "type": "text",
1194
+ "bbox": [
1195
+ 0.508,
1196
+ 0.568,
1197
+ 0.884,
1198
+ 0.776
1199
+ ],
1200
+ "angle": 0,
1201
+ "content": "CLaSp consistently improves average acceptance length, acceptance rate, and speedups. This efficiency is primarily due to CLaSp's ability to leverage model layer sparsity effectively. By skipping \\(50\\%\\) to \\(60\\%\\) of layers during experiments, CLaSp maintains both a high average acceptance length and acceptance rate, contributing to superior acceleration. Generally, longer acceptance lengths lead to higher speedups. However, there are cases where speedups remain low despite long acceptance lengths, as drafting additional tokens increases time spent, reducing acceptance rates and overall speedups."
1202
+ },
1203
+ {
1204
+ "type": "text",
1205
+ "bbox": [
1206
+ 0.508,
1207
+ 0.777,
1208
+ 0.885,
1209
+ 0.888
1210
+ ],
1211
+ "angle": 0,
1212
+ "content": "The performance advantage of CLaSp is more pronounced on larger models, such as LLaMA3-70B, compared to smaller models like LLaMA2-13B and LLaMA3-8B. This suggests that CLaSp can better leverage the greater layer sparsity present in larger models, enhancing adaptability and efficiency."
1213
+ },
1214
+ {
1215
+ "type": "text",
1216
+ "bbox": [
1217
+ 0.509,
1218
+ 0.89,
1219
+ 0.884,
1220
+ 0.922
1221
+ ],
1222
+ "angle": 0,
1223
+ "content": "Overall, the robust performance of CLaSp across different models highlights its effectiveness as a"
1224
+ },
1225
+ {
1226
+ "type": "page_number",
1227
+ "bbox": [
1228
+ 0.476,
1229
+ 0.928,
1230
+ 0.526,
1231
+ 0.941
1232
+ ],
1233
+ "angle": 0,
1234
+ "content": "31614"
1235
+ }
1236
+ ],
1237
+ [
1238
+ {
1239
+ "type": "image",
1240
+ "bbox": [
1241
+ 0.118,
1242
+ 0.085,
1243
+ 0.481,
1244
+ 0.248
1245
+ ],
1246
+ "angle": 0,
1247
+ "content": null
1248
+ },
1249
+ {
1250
+ "type": "image_caption",
1251
+ "bbox": [
1252
+ 0.143,
1253
+ 0.26,
1254
+ 0.459,
1255
+ 0.275
1256
+ ],
1257
+ "angle": 0,
1258
+ "content": "Figure 5: Model Size Scaling Laws of CLaSp."
1259
+ },
1260
+ {
1261
+ "type": "text",
1262
+ "bbox": [
1263
+ 0.114,
1264
+ 0.301,
1265
+ 0.489,
1266
+ 0.334
1267
+ ],
1268
+ "angle": 0,
1269
+ "content": "plug-and-play solution, offering a versatile method to enhance inference speed for a range of LLMs."
1270
+ },
1271
+ {
1272
+ "type": "title",
1273
+ "bbox": [
1274
+ 0.114,
1275
+ 0.346,
1276
+ 0.224,
1277
+ 0.363
1278
+ ],
1279
+ "angle": 0,
1280
+ "content": "5 Analysis"
1281
+ },
1282
+ {
1283
+ "type": "text",
1284
+ "bbox": [
1285
+ 0.113,
1286
+ 0.372,
1287
+ 0.49,
1288
+ 0.453
1289
+ ],
1290
+ "angle": 0,
1291
+ "content": "We present an extensive analysis of CLaSp, focusing on three key aspects: the benefits of the parallel strategy (Section 5.1), compatibility with different LLMs (Section 5.2), and the impact of key hyperparameters (Section 5.3)."
1292
+ },
1293
+ {
1294
+ "type": "title",
1295
+ "bbox": [
1296
+ 0.114,
1297
+ 0.465,
1298
+ 0.303,
1299
+ 0.48
1300
+ ],
1301
+ "angle": 0,
1302
+ "content": "5.1 Sequence Parallel"
1303
+ },
1304
+ {
1305
+ "type": "text",
1306
+ "bbox": [
1307
+ 0.113,
1308
+ 0.486,
1309
+ 0.49,
1310
+ 0.694
1311
+ ],
1312
+ "angle": 0,
1313
+ "content": "As discussed in Section 3.6, our dynamic programming (DP) algorithm requires \\(\\mathcal{O}(LM)\\) layer forward passes. To assess the time overhead, we conducted experiments on LLaMA3-70B using two NVIDIA A800 GPUs. Without any parallel strategy, a single DP run to filter half of the layers takes approximately 2.5 seconds, whereas a single round of verification only takes about 0.1 seconds. After implementing our parallel strategy, the time for a single DP run is reduced to 0.14 seconds, comparable to the time for a single verification. This significantly reduces the additional latency introduced by layer optimization."
1314
+ },
1315
+ {
1316
+ "type": "text",
1317
+ "bbox": [
1318
+ 0.113,
1319
+ 0.696,
1320
+ 0.49,
1321
+ 0.808
1322
+ ],
1323
+ "angle": 0,
1324
+ "content": "We further analyzed the per-query latency distribution of each stage, as illustrated in Figure 3c. The results show that the latency proportion of layer optimization is significantly reduced with the parallel strategy. Additionally, with a lower update frequency, the extra update latency of CLaSp becomes almost negligible."
1325
+ },
1326
+ {
1327
+ "type": "title",
1328
+ "bbox": [
1329
+ 0.114,
1330
+ 0.82,
1331
+ 0.357,
1332
+ 0.835
1333
+ ],
1334
+ "angle": 0,
1335
+ "content": "5.2 Model Size Scaling Laws"
1336
+ },
1337
+ {
1338
+ "type": "text",
1339
+ "bbox": [
1340
+ 0.113,
1341
+ 0.842,
1342
+ 0.49,
1343
+ 0.922
1344
+ ],
1345
+ "angle": 0,
1346
+ "content": "To assess the scalability of CLaSp, we evaluated its performance across a range of model sizes, including LLaMA2-13B and LLaMA3.1-405B, in addition to LLaMA3-8B and LLaMA3-70B. For LLaMA2-13B, the model was deployed"
1347
+ },
1348
+ {
1349
+ "type": "text",
1350
+ "bbox": [
1351
+ 0.508,
1352
+ 0.085,
1353
+ 0.885,
1354
+ 0.149
1355
+ ],
1356
+ "angle": 0,
1357
+ "content": "on an A800 GPU using FP16 precision, while for LLaMA3.1-405B, we used INT8 quantization (Dettmers et al., 2022) to deploy it on a single node with 8 A800 GPUs."
1358
+ },
1359
+ {
1360
+ "type": "text",
1361
+ "bbox": [
1362
+ 0.508,
1363
+ 0.151,
1364
+ 0.886,
1365
+ 0.327
1366
+ ],
1367
+ "angle": 0,
1368
+ "content": "As illustrated in Figure 5, the speedup increases with model size across various tasks. Specifically, on the MT-bench, speedups range from \\(1.24 \\times\\) for LLaMA3-8B to \\(1.73 \\times\\) for LLaMA3.1-405B. For the GSM8K benchmark, speedups increase from \\(1.26 \\times\\) to \\(1.81 \\times\\), while on the Natural Questions benchmark, speedups range from \\(1.27 \\times\\) to \\(1.82 \\times\\). These results indicate that larger models exhibit enhanced layer sparsity, enabling CLaSp to leverage its capabilities more effectively and achieve greater speedups."
1369
+ },
1370
+ {
1371
+ "type": "title",
1372
+ "bbox": [
1373
+ 0.509,
1374
+ 0.343,
1375
+ 0.74,
1376
+ 0.358
1377
+ ],
1378
+ "angle": 0,
1379
+ "content": "5.3 Key Hyper-Parameters"
1380
+ },
1381
+ {
1382
+ "type": "text",
1383
+ "bbox": [
1384
+ 0.508,
1385
+ 0.366,
1386
+ 0.884,
1387
+ 0.43
1388
+ ],
1389
+ "angle": 0,
1390
+ "content": "We show the effect of key hyper-parameters on the acceleration benefits of CLaSp, where all experiments were performed using the LLaMA3-70B model on MT-Bench."
1391
+ },
1392
+ {
1393
+ "type": "title",
1394
+ "bbox": [
1395
+ 0.509,
1396
+ 0.444,
1397
+ 0.783,
1398
+ 0.46
1399
+ ],
1400
+ "angle": 0,
1401
+ "content": "5.3.1 Number of Skipped Layers"
1402
+ },
1403
+ {
1404
+ "type": "text",
1405
+ "bbox": [
1406
+ 0.508,
1407
+ 0.466,
1408
+ 0.884,
1409
+ 0.562
1410
+ ],
1411
+ "angle": 0,
1412
+ "content": "Layer sparsity allows intermediate layers to be skipped, but the number of skipped layers directly influences performance. Adjusting this parameter involves a trade-off between draft quality and efficiency, both of which significantly impact the speedup."
1413
+ },
1414
+ {
1415
+ "type": "text",
1416
+ "bbox": [
1417
+ 0.508,
1418
+ 0.564,
1419
+ 0.884,
1420
+ 0.692
1421
+ ],
1422
+ "angle": 0,
1423
+ "content": "As shown in Figure 4a, for LLaMA3-70B, which consists of 80 layers, the speedup increases as the number of skipped layers rises, reaching an optimal value of \\(1.64 \\times\\) when 44 layers are skipped. Beyond this point, the benefits of a longer average acceptance length are outweighed by the increased cost of generating high-quality drafts, resulting in a decline in speedup."
1424
+ },
1425
+ {
1426
+ "type": "title",
1427
+ "bbox": [
1428
+ 0.509,
1429
+ 0.706,
1430
+ 0.795,
1431
+ 0.721
1432
+ ],
1433
+ "angle": 0,
1434
+ "content": "5.3.2 Layer Optimization Interval"
1435
+ },
1436
+ {
1437
+ "type": "text",
1438
+ "bbox": [
1439
+ 0.508,
1440
+ 0.728,
1441
+ 0.884,
1442
+ 0.84
1443
+ ],
1444
+ "angle": 0,
1445
+ "content": "Performing layer optimization after every verification step is computationally expensive, as noted in Section 3.7. Extending the Layer Optimization Interval (LOI) reduces the additional delays introduced by dynamic programming (DP) while having only a minor impact on the average acceptance length \\(\\tau\\)."
1446
+ },
1447
+ {
1448
+ "type": "text",
1449
+ "bbox": [
1450
+ 0.508,
1451
+ 0.842,
1452
+ 0.884,
1453
+ 0.922
1454
+ ],
1455
+ "angle": 0,
1456
+ "content": "As illustrated in Figure 4b, the speedup initially increases with the LOI but begins to decline as the interval grows beyond 128. This decline is caused by a significant drop in \\(\\tau\\), which negatively impacts overall speedup."
1457
+ },
1458
+ {
1459
+ "type": "page_number",
1460
+ "bbox": [
1461
+ 0.476,
1462
+ 0.928,
1463
+ 0.526,
1464
+ 0.941
1465
+ ],
1466
+ "angle": 0,
1467
+ "content": "31615"
1468
+ }
1469
+ ],
1470
+ [
1471
+ {
1472
+ "type": "title",
1473
+ "bbox": [
1474
+ 0.114,
1475
+ 0.085,
1476
+ 0.367,
1477
+ 0.1
1478
+ ],
1479
+ "angle": 0,
1480
+ "content": "5.3.3 Draft-Exiting Threshold"
1481
+ },
1482
+ {
1483
+ "type": "text",
1484
+ "bbox": [
1485
+ 0.113,
1486
+ 0.105,
1487
+ 0.488,
1488
+ 0.185
1489
+ ],
1490
+ "angle": 0,
1491
+ "content": "To balance draft efficiency and cost, skipping \\(40\\%\\) to \\(60\\%\\) of layers achieves an optimal trade-off, as noted in Section 5.3.1. However, the cost of a single draft remains high, necessitating a sufficiently high acceptance rate to maximize speedup."
1492
+ },
1493
+ {
1494
+ "type": "text",
1495
+ "bbox": [
1496
+ 0.113,
1497
+ 0.186,
1498
+ 0.487,
1499
+ 0.265
1500
+ ],
1501
+ "angle": 0,
1502
+ "content": "EAGLE-2 (Li et al., 2024a) suggests leveraging the draft model's confidence score to approximate the acceptance rate. By tuning the Draft-Exiting Threshold (DET), we can control the acceptance rate to optimize acceleration."
1503
+ },
1504
+ {
1505
+ "type": "text",
1506
+ "bbox": [
1507
+ 0.113,
1508
+ 0.266,
1509
+ 0.489,
1510
+ 0.346
1511
+ ],
1512
+ "angle": 0,
1513
+ "content": "As shown in Figure 4c, adjusting the DET around 0.7 results in the highest speedup. Even with higher DET values, high speedup is maintained, demonstrating the robustness of this parameter for achieving acceleration gains."
1514
+ },
1515
+ {
1516
+ "type": "title",
1517
+ "bbox": [
1518
+ 0.114,
1519
+ 0.359,
1520
+ 0.247,
1521
+ 0.373
1522
+ ],
1523
+ "angle": 0,
1524
+ "content": "6 Conclusion"
1525
+ },
1526
+ {
1527
+ "type": "text",
1528
+ "bbox": [
1529
+ 0.113,
1530
+ 0.385,
1531
+ 0.49,
1532
+ 0.658
1533
+ ],
1534
+ "angle": 0,
1535
+ "content": "In this paper, we propose CLaSp, a novel self-speculative decoding framework that adaptively adjusts the layer-skipping strategy based on context. We discover the potential of context-aware layer sparsity for generating high-quality drafts. Leveraging this insight, CLaSp performs layer optimization before each draft stage with minimal additional latency, significantly increasing the decoding efficiency. Through extensive experiments across diverse text generation tasks, we demonstrated that CLaSp achieves consistent speedups of \\(1.3 \\times \\sim 1.7 \\times\\) over vanilla autoregressive decoding. Furthermore, detailed analysis reveals that CLaSp generalizes well to different models and tasks. For future work, we aim to explore ways to better leverage the layer sparsity of LLMs to further reduce inference latency in larger models."
1536
+ },
1537
+ {
1538
+ "type": "title",
1539
+ "bbox": [
1540
+ 0.114,
1541
+ 0.671,
1542
+ 0.22,
1543
+ 0.685
1544
+ ],
1545
+ "angle": 0,
1546
+ "content": "Limitations"
1547
+ },
1548
+ {
1549
+ "type": "text",
1550
+ "bbox": [
1551
+ 0.113,
1552
+ 0.697,
1553
+ 0.49,
1554
+ 0.921
1555
+ ],
1556
+ "angle": 0,
1557
+ "content": "The CLaSp framework dynamically adjusts the layer-skipping strategy based on context, making the self-speculative decoding process of LLMs more efficient. However, certain limitations exist. Our experiments are conducted solely on NVIDIA A800 GPUs with 80GB of memory and limited to LLaMA series models, leaving the potential of more powerful hardware and other models unexplored. Additionally, while CLaSp can function alongside many existing speculative decoding innovations, we do not investigate these integrations. We believe that addressing these limitations and exploring such combinations in future research could lead to significant advancements."
1558
+ },
1559
+ {
1560
+ "type": "title",
1561
+ "bbox": [
1562
+ 0.51,
1563
+ 0.085,
1564
+ 0.673,
1565
+ 0.1
1566
+ ],
1567
+ "angle": 0,
1568
+ "content": "Acknowledgments"
1569
+ },
1570
+ {
1571
+ "type": "text",
1572
+ "bbox": [
1573
+ 0.508,
1574
+ 0.11,
1575
+ 0.885,
1576
+ 0.254
1577
+ ],
1578
+ "angle": 0,
1579
+ "content": "Min Yang was supported by National Key Research and Development Program of China (2022YFF0902100), National Natural Science Foundation of China (Grant No. 62376262), the Natural Science Foundation of Guangdong Province of China (2024A1515030166, 2025B1515020032), Shenzhen Science and Technology Innovation Program (KQTD20190929172835662)."
1580
+ },
1581
+ {
1582
+ "type": "title",
1583
+ "bbox": [
1584
+ 0.51,
1585
+ 0.282,
1586
+ 0.61,
1587
+ 0.297
1588
+ ],
1589
+ "angle": 0,
1590
+ "content": "References"
1591
+ },
1592
+ {
1593
+ "type": "ref_text",
1594
+ "bbox": [
1595
+ 0.51,
1596
+ 0.305,
1597
+ 0.884,
1598
+ 0.346
1599
+ ],
1600
+ "angle": 0,
1601
+ "content": "2024. Lisa: Layerwise importance sampling for memory-efficient large language model fine-tuning. arXiv preprint arXiv:2403.17919."
1602
+ },
1603
+ {
1604
+ "type": "ref_text",
1605
+ "bbox": [
1606
+ 0.511,
1607
+ 0.356,
1608
+ 0.885,
1609
+ 0.422
1610
+ ],
1611
+ "angle": 0,
1612
+ "content": "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."
1613
+ },
1614
+ {
1615
+ "type": "ref_text",
1616
+ "bbox": [
1617
+ 0.511,
1618
+ 0.432,
1619
+ 0.884,
1620
+ 0.498
1621
+ ],
1622
+ "angle": 0,
1623
+ "content": "Amey Agrawal, Ashish Panwar, Jayashree Mohan, Nipun Kwatra, Bhargav S Gulavani, and Ramachandran Ramjee. 2023. Sarathi: Efficient llm inference by piggybacking decodes with chunked prefixes. arXiv preprint arXiv:2308.16369."
1624
+ },
1625
+ {
1626
+ "type": "ref_text",
1627
+ "bbox": [
1628
+ 0.511,
1629
+ 0.508,
1630
+ 0.884,
1631
+ 0.575
1632
+ ],
1633
+ "angle": 0,
1634
+ "content": "Rohan Anil, Andrew M Dai, Orhan Firat, Melvin Johnson, Dmitry Lepikhin, Alexandre Passos, Siamak Shakeri, Emanuel Taropa, Paige Bailey, Zhifeng Chen, et al. 2023. Palm 2 technical report. arXiv preprint arXiv:2305.10403."
1635
+ },
1636
+ {
1637
+ "type": "ref_text",
1638
+ "bbox": [
1639
+ 0.511,
1640
+ 0.585,
1641
+ 0.885,
1642
+ 0.768
1643
+ ],
1644
+ "angle": 0,
1645
+ "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."
1646
+ },
1647
+ {
1648
+ "type": "ref_text",
1649
+ "bbox": [
1650
+ 0.51,
1651
+ 0.779,
1652
+ 0.885,
1653
+ 0.819
1654
+ ],
1655
+ "angle": 0,
1656
+ "content": "F. Warren Burton. 1985. Speculative computation, parallelism, and functional programming. IEEE Transactions on Computers, C-34(12):1190-1193."
1657
+ },
1658
+ {
1659
+ "type": "ref_text",
1660
+ "bbox": [
1661
+ 0.51,
1662
+ 0.829,
1663
+ 0.887,
1664
+ 0.92
1665
+ ],
1666
+ "angle": 0,
1667
+ "content": "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. In *Forty-first International Conference on Machine Learning*, ICML 2024, Vienna, Austria, July 21-27, 2024. OpenReview.net."
1668
+ },
1669
+ {
1670
+ "type": "list",
1671
+ "bbox": [
1672
+ 0.51,
1673
+ 0.305,
1674
+ 0.887,
1675
+ 0.92
1676
+ ],
1677
+ "angle": 0,
1678
+ "content": null
1679
+ },
1680
+ {
1681
+ "type": "page_number",
1682
+ "bbox": [
1683
+ 0.476,
1684
+ 0.928,
1685
+ 0.526,
1686
+ 0.941
1687
+ ],
1688
+ "angle": 0,
1689
+ "content": "31616"
1690
+ }
1691
+ ],
1692
+ [
1693
+ {
1694
+ "type": "ref_text",
1695
+ "bbox": [
1696
+ 0.117,
1697
+ 0.086,
1698
+ 0.487,
1699
+ 0.151
1700
+ ],
1701
+ "angle": 0,
1702
+ "content": "Charlie Chen, Sebastian Borgeaud, Geoffrey Irving, Jean-Baptiste Lespiau, Laurent Sifre, and John Jumper. 2023. Accelerating large language model decoding with speculative sampling. arXiv preprint arXiv:2302.01318."
1703
+ },
1704
+ {
1705
+ "type": "ref_text",
1706
+ "bbox": [
1707
+ 0.117,
1708
+ 0.162,
1709
+ 0.487,
1710
+ 0.226
1711
+ ],
1712
+ "angle": 0,
1713
+ "content": "Zhuoming Chen, Avner May, Ruslan Svirschevski, Yuhsun Huang, Max Ryabinin, Zhihao Jia, and Beidi Chen. 2024. Sequoia: Scalable, robust, and hardware-aware speculative decoding. arXiv preprint arXiv:2402.12374."
1714
+ },
1715
+ {
1716
+ "type": "ref_text",
1717
+ "bbox": [
1718
+ 0.117,
1719
+ 0.237,
1720
+ 0.487,
1721
+ 0.303
1722
+ ],
1723
+ "angle": 0,
1724
+ "content": "Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, et al. 2021. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168."
1725
+ },
1726
+ {
1727
+ "type": "ref_text",
1728
+ "bbox": [
1729
+ 0.117,
1730
+ 0.313,
1731
+ 0.487,
1732
+ 0.377
1733
+ ],
1734
+ "angle": 0,
1735
+ "content": "Luciano Del Corro, Allie Del Giorno, Sahaj Agarwal, Bin Yu, Ahmed Awadallah, and Subhabrata Mukherjee. 2023. Skipdecode: Autoregressive skip decoding with batching and caching for efficient llm inference. arXiv preprint arXiv:2307.02628."
1736
+ },
1737
+ {
1738
+ "type": "ref_text",
1739
+ "bbox": [
1740
+ 0.117,
1741
+ 0.388,
1742
+ 0.487,
1743
+ 0.453
1744
+ ],
1745
+ "angle": 0,
1746
+ "content": "Tim Dettmers, Mike Lewis, Younes Belkada, and Luke Zettlemoyer. 2022. Gpt3.int8(): 8-bit matrix multiplication for transformers at scale. In Advances in Neural Information Processing Systems, volume 35, pages 30318-30332. Curran Associates, Inc."
1747
+ },
1748
+ {
1749
+ "type": "ref_text",
1750
+ "bbox": [
1751
+ 0.117,
1752
+ 0.463,
1753
+ 0.487,
1754
+ 0.554
1755
+ ],
1756
+ "angle": 0,
1757
+ "content": "Cunxiao Du, Jing Jiang, Yuanchen Xu, Jiawei Wu, Sicheng Yu, Yongqi Li, Shenggui Li, Kai Xu, Liqiang Nie, Zhaopeng Tu, and Yang You. 2024. Glide with a cape: A low-hassle method to accelerate speculative decoding. In *Forty-first International Conference on Machine Learning*, ICML 2024, Vienna, Austria, July 21-27, 2024. OpenReview.net."
1758
+ },
1759
+ {
1760
+ "type": "ref_text",
1761
+ "bbox": [
1762
+ 0.117,
1763
+ 0.565,
1764
+ 0.487,
1765
+ 0.63
1766
+ ],
1767
+ "angle": 0,
1768
+ "content": "Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. 2024. The llama 3 herd of models. arXiv preprint arXiv:2407.21783."
1769
+ },
1770
+ {
1771
+ "type": "ref_text",
1772
+ "bbox": [
1773
+ 0.117,
1774
+ 0.64,
1775
+ 0.487,
1776
+ 0.77
1777
+ ],
1778
+ "angle": 0,
1779
+ "content": "Mostafa Elhoushi, Akshit Shrivastava, Diana Liskovich, Basil Hosmer, Bram Wasti, Liangzhen Lai, Anas Mahmoud, Bilge Acun, Saurabh Agarwal, Ahmed Roman, Ahmed Aly, Beidi Chen, and Carole-Jean Wu. 2024. LayerSkip: Enabling early exit inference and self-speculative decoding. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 12622-12642, Bangkok, Thailand. Association for Computational Linguistics."
1780
+ },
1781
+ {
1782
+ "type": "ref_text",
1783
+ "bbox": [
1784
+ 0.117,
1785
+ 0.78,
1786
+ 0.487,
1787
+ 0.845
1788
+ ],
1789
+ "angle": 0,
1790
+ "content": "Angela Fan, Edouard Grave, and Armand Joulin. 2020. Reducing transformer depth on demand with structured dropout. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net."
1791
+ },
1792
+ {
1793
+ "type": "ref_text",
1794
+ "bbox": [
1795
+ 0.117,
1796
+ 0.855,
1797
+ 0.487,
1798
+ 0.92
1799
+ ],
1800
+ "angle": 0,
1801
+ "content": "Theodore Glavas, Joud Chataoui, Florence Regol, Wassim Jabbour, Antonios Valkanas, Boris N. Oreshkin, and Mark Coates. 2024. Dynamic layer selection in decoder-only transformers. arXiv preprint arXiv:2410.20022."
1802
+ },
1803
+ {
1804
+ "type": "list",
1805
+ "bbox": [
1806
+ 0.117,
1807
+ 0.086,
1808
+ 0.487,
1809
+ 0.92
1810
+ ],
1811
+ "angle": 0,
1812
+ "content": null
1813
+ },
1814
+ {
1815
+ "type": "ref_text",
1816
+ "bbox": [
1817
+ 0.511,
1818
+ 0.086,
1819
+ 0.882,
1820
+ 0.164
1821
+ ],
1822
+ "angle": 0,
1823
+ "content": "Sylvain Gugger, Lysandre Debut, Thomas Wolf, Philipp Schmid, Zachary Mueller, Sourab Mangrulkar, Marc Sun, and Benjamin Bossan. 2022. Accelerate: Training and inference at scale made simple, efficient and adaptable. https://github.com/huggingface/accelerate."
1824
+ },
1825
+ {
1826
+ "type": "ref_text",
1827
+ "bbox": [
1828
+ 0.511,
1829
+ 0.173,
1830
+ 0.882,
1831
+ 0.278
1832
+ ],
1833
+ "angle": 0,
1834
+ "content": "Zhenyu He, Zexuan Zhong, Tianle Cai, Jason Lee, and Di He. 2024. REST: Retrieval-based speculative decoding. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pages 1582-1595, Mexico City, Mexico. Association for Computational Linguistics."
1835
+ },
1836
+ {
1837
+ "type": "ref_text",
1838
+ "bbox": [
1839
+ 0.511,
1840
+ 0.286,
1841
+ 0.882,
1842
+ 0.325
1843
+ ],
1844
+ "angle": 0,
1845
+ "content": "John L. Hennessy and David A. Patterson. 2012. Computer Architecture: A Quantitative Approach, 5 edition. Morgan Kaufmann, Amsterdam."
1846
+ },
1847
+ {
1848
+ "type": "ref_text",
1849
+ "bbox": [
1850
+ 0.511,
1851
+ 0.334,
1852
+ 0.882,
1853
+ 0.4
1854
+ ],
1855
+ "angle": 0,
1856
+ "content": "Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. 2020. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361."
1857
+ },
1858
+ {
1859
+ "type": "ref_text",
1860
+ "bbox": [
1861
+ 0.511,
1862
+ 0.408,
1863
+ 0.882,
1864
+ 0.5
1865
+ ],
1866
+ "angle": 0,
1867
+ "content": "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."
1868
+ },
1869
+ {
1870
+ "type": "ref_text",
1871
+ "bbox": [
1872
+ 0.511,
1873
+ 0.508,
1874
+ 0.882,
1875
+ 0.625
1876
+ ],
1877
+ "angle": 0,
1878
+ "content": "Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, Kristina Toutanova, Llion Jones, Matthew Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. 2019. Natural questions: A benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:452-466."
1879
+ },
1880
+ {
1881
+ "type": "ref_text",
1882
+ "bbox": [
1883
+ 0.511,
1884
+ 0.633,
1885
+ 0.882,
1886
+ 0.712
1887
+ ],
1888
+ "angle": 0,
1889
+ "content": "Yaniv Leviathan, Matan Kalman, and Yossi Matias. 2023. Fast inference from transformers via speculative decoding. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 19274-19286. PMLR."
1890
+ },
1891
+ {
1892
+ "type": "ref_text",
1893
+ "bbox": [
1894
+ 0.511,
1895
+ 0.721,
1896
+ 0.882,
1897
+ 0.773
1898
+ ],
1899
+ "angle": 0,
1900
+ "content": "Yuhui Li, Fangyun Wei, Chao Zhang, and Hongyang Zhang. 2024a. EAGLE-2: Faster inference of language models with dynamic draft trees. arXiv preprint arXiv:2406.16858."
1901
+ },
1902
+ {
1903
+ "type": "ref_text",
1904
+ "bbox": [
1905
+ 0.511,
1906
+ 0.781,
1907
+ 0.882,
1908
+ 0.859
1909
+ ],
1910
+ "angle": 0,
1911
+ "content": "Yuhui Li, Fangyun Wei, Chao Zhang, and Hongyang Zhang. 2024b. EAGLE: speculative sampling requires rethinking feature uncertainty. In *Forty-first International Conference on Machine Learning*, ICML 2024, Vienna, Austria, July 21-27, 2024. Open-Review.net."
1912
+ },
1913
+ {
1914
+ "type": "ref_text",
1915
+ "bbox": [
1916
+ 0.511,
1917
+ 0.868,
1918
+ 0.882,
1919
+ 0.92
1920
+ ],
1921
+ "angle": 0,
1922
+ "content": "Fangcheng Liu, Yehui Tang, Zhenhua Liu, Yunsheng Ni, Kai Han, and Yunhe Wang. 2024. Kangaroo: Lossless self-speculative decoding via double early exiting. arXiv preprint arXiv:2404.18911."
1923
+ },
1924
+ {
1925
+ "type": "list",
1926
+ "bbox": [
1927
+ 0.511,
1928
+ 0.086,
1929
+ 0.882,
1930
+ 0.92
1931
+ ],
1932
+ "angle": 0,
1933
+ "content": null
1934
+ },
1935
+ {
1936
+ "type": "page_number",
1937
+ "bbox": [
1938
+ 0.476,
1939
+ 0.929,
1940
+ 0.525,
1941
+ 0.941
1942
+ ],
1943
+ "angle": 0,
1944
+ "content": "31617"
1945
+ }
1946
+ ],
1947
+ [
1948
+ {
1949
+ "type": "ref_text",
1950
+ "bbox": [
1951
+ 0.117,
1952
+ 0.086,
1953
+ 0.49,
1954
+ 0.191
1955
+ ],
1956
+ "angle": 0,
1957
+ "content": "Zichang Liu, Jue Wang, Tri Dao, Tianyi Zhou, Binhang Yuan, Zhao Song, Anshumali Shrivastava, Ce Zhang, Yuandong Tian, Christopher Re, and Beidi Chen. 2023. Deja vu: Contextual sparsity for efficient LLMs at inference time. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 22137-22176. PMLR."
1958
+ },
1959
+ {
1960
+ "type": "ref_text",
1961
+ "bbox": [
1962
+ 0.117,
1963
+ 0.203,
1964
+ 0.49,
1965
+ 0.361
1966
+ ],
1967
+ "angle": 0,
1968
+ "content": "Xupeng Miao, Gabriele Oliaro, Zhihao Zhang, Xinhao Cheng, Zeyu Wang, Zhengxin Zhang, Rae Ying Yee Wong, Alan Zhu, Lijie Yang, Xiaoxiang Shi, Chunan Shi, Zhuoming Chen, Daiyaan Arfeen, Reyna Abhyankar, and Zhihao Jia. 2024. Specinfer: Accelerating large language model serving with tree-based speculative inference and verification. In Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 3, ASPLOS '24, page 932-949, New York, NY, USA. Association for Computing Machinery."
1969
+ },
1970
+ {
1971
+ "type": "ref_text",
1972
+ "bbox": [
1973
+ 0.117,
1974
+ 0.373,
1975
+ 0.49,
1976
+ 0.464
1977
+ ],
1978
+ "angle": 0,
1979
+ "content": "Ramesh Nallapati, Bowen Zhou, Cicero dos Santos, Caglar Gulcehre, and Bing Xiang. 2016. Abstractive text summarization using sequence-to-sequence RNNs and beyond. In Proceedings of the 20th SIGNLL Conference on Computational Natural Language Learning, pages 280-290, Berlin, Germany. Association for Computational Linguistics."
1980
+ },
1981
+ {
1982
+ "type": "ref_text",
1983
+ "bbox": [
1984
+ 0.117,
1985
+ 0.477,
1986
+ 0.489,
1987
+ 0.504
1988
+ ],
1989
+ "angle": 0,
1990
+ "content": "David A. Patterson. 2004. Latency lags bandwidth. Commun. ACM, 47(10):71-75."
1991
+ },
1992
+ {
1993
+ "type": "ref_text",
1994
+ "bbox": [
1995
+ 0.117,
1996
+ 0.516,
1997
+ 0.49,
1998
+ 0.595
1999
+ ],
2000
+ "angle": 0,
2001
+ "content": "Machel Reid, Nikolay Savinov, Denis Teptyashin, Dmitry Lepikhin, Timothy Lillicrap, Jean-baptiste Alayrac, Radu Soricut, Angeliki Lazaridou, Orhan Firat, Julian Schrittwieser, et al. 2024. Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context. arXiv preprint arXiv:2403.05530."
2002
+ },
2003
+ {
2004
+ "type": "ref_text",
2005
+ "bbox": [
2006
+ 0.117,
2007
+ 0.607,
2008
+ 0.444,
2009
+ 0.622
2010
+ ],
2011
+ "angle": 0,
2012
+ "content": "Apoorv Saxena. 2023. Prompt lookup decoding."
2013
+ },
2014
+ {
2015
+ "type": "ref_text",
2016
+ "bbox": [
2017
+ 0.117,
2018
+ 0.633,
2019
+ 0.489,
2020
+ 0.672
2021
+ ],
2022
+ "angle": 0,
2023
+ "content": "Noam Shazeer. 2019. Fast transformer decoding: One write-head is all you need. arXiv preprint arXiv:1911.02150."
2024
+ },
2025
+ {
2026
+ "type": "ref_text",
2027
+ "bbox": [
2028
+ 0.117,
2029
+ 0.685,
2030
+ 0.489,
2031
+ 0.75
2032
+ ],
2033
+ "angle": 0,
2034
+ "content": "Hanshi Sun, Zhuoming Chen, Xinyu Yang, Yuandong Tian, and Beidi Chen. 2024. Triforce: Lossless acceleration of long sequence generation with hierarchical speculative decoding. arXiv preprint arXiv:2404.11912."
2035
+ },
2036
+ {
2037
+ "type": "ref_text",
2038
+ "bbox": [
2039
+ 0.117,
2040
+ 0.763,
2041
+ 0.49,
2042
+ 0.83
2043
+ ],
2044
+ "angle": 0,
2045
+ "content": "Ruslan Svirschevski, Avner May, Zhuoming Chen, Beidi Chen, Zhihao Jia, and Max Ryabinin. 2024. Specexec: Massively parallel speculative decoding for interactive llm inference on consumer devices. arXiv preprint arXiv:2406.02532."
2046
+ },
2047
+ {
2048
+ "type": "ref_text",
2049
+ "bbox": [
2050
+ 0.117,
2051
+ 0.842,
2052
+ 0.49,
2053
+ 0.919
2054
+ ],
2055
+ "angle": 0,
2056
+ "content": "Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, et al. 2023a. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971."
2057
+ },
2058
+ {
2059
+ "type": "list",
2060
+ "bbox": [
2061
+ 0.117,
2062
+ 0.086,
2063
+ 0.49,
2064
+ 0.919
2065
+ ],
2066
+ "angle": 0,
2067
+ "content": null
2068
+ },
2069
+ {
2070
+ "type": "ref_text",
2071
+ "bbox": [
2072
+ 0.512,
2073
+ 0.086,
2074
+ 0.885,
2075
+ 0.165
2076
+ ],
2077
+ "angle": 0,
2078
+ "content": "Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023b. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288."
2079
+ },
2080
+ {
2081
+ "type": "ref_text",
2082
+ "bbox": [
2083
+ 0.512,
2084
+ 0.175,
2085
+ 0.885,
2086
+ 0.268
2087
+ ],
2088
+ "angle": 0,
2089
+ "content": "Heming Xia, Tao Ge, Peiyi Wang, Si-Qing Chen, Furu Wei, and Zhifang Sui. 2023. Speculative decoding: Exploiting speculative execution for accelerating seq2seq generation. In *Findings of the Association for Computational Linguistics: EMNLP* 2023, pages 3909-3925, Singapore. Association for Computational Linguistics."
2090
+ },
2091
+ {
2092
+ "type": "ref_text",
2093
+ "bbox": [
2094
+ 0.512,
2095
+ 0.277,
2096
+ 0.885,
2097
+ 0.33
2098
+ ],
2099
+ "angle": 0,
2100
+ "content": "Heming Xia, Yongqi Li, Jun Zhang, Cunxiao Du, and Wenjie Li. 2024a. Swift: On-the-fly self-speculative decoding for llm inference acceleration. arXiv preprint arXiv:2410.06916."
2101
+ },
2102
+ {
2103
+ "type": "ref_text",
2104
+ "bbox": [
2105
+ 0.512,
2106
+ 0.339,
2107
+ 0.885,
2108
+ 0.445
2109
+ ],
2110
+ "angle": 0,
2111
+ "content": "Heming Xia, Zhe Yang, Qingxiu Dong, Peiyi Wang, Yongqi Li, Tao Ge, Tianyu Liu, Wenjie Li, and Zhifang Sui. 2024b. Unlocking efficiency in large language model inference: A comprehensive survey of speculative decoding. In Findings of the Association for Computational Linguistics ACL 2024, pages 7655-7671, Bangkok, Thailand and virtual meeting. Association for Computational Linguistics."
2112
+ },
2113
+ {
2114
+ "type": "ref_text",
2115
+ "bbox": [
2116
+ 0.512,
2117
+ 0.454,
2118
+ 0.885,
2119
+ 0.507
2120
+ ],
2121
+ "angle": 0,
2122
+ "content": "An Yang, Baosong Yang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Zhou, Chengpeng Li, Chengyuan Li, Dayiheng Liu, Fei Huang, et al. 2024. Qwen2 technical report. arXiv preprint arXiv:2407.10671."
2123
+ },
2124
+ {
2125
+ "type": "ref_text",
2126
+ "bbox": [
2127
+ 0.512,
2128
+ 0.517,
2129
+ 0.885,
2130
+ 0.622
2131
+ ],
2132
+ "angle": 0,
2133
+ "content": "Jun Zhang, Jue Wang, Huan Li, Lidan Shou, Ke Chen, Gang Chen, and Sharad Mehrotra. 2024. Draft & verify: Lossless large language model acceleration via self-speculative decoding. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 11263-11282, Bangkok, Thailand. Association for Computational Linguistics."
2134
+ },
2135
+ {
2136
+ "type": "ref_text",
2137
+ "bbox": [
2138
+ 0.512,
2139
+ 0.632,
2140
+ 0.885,
2141
+ 0.724
2142
+ ],
2143
+ "angle": 0,
2144
+ "content": "Kaiyan Zhang, Ning Ding, Biqing Qi, Xuekai Zhu, Xinwei Long, and Bowen Zhou. 2023. CRaSh: Clustering, removing, and sharing enhance fine-tuning without full large language model. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 9612-9637, Singapore. Association for Computational Linguistics."
2145
+ },
2146
+ {
2147
+ "type": "ref_text",
2148
+ "bbox": [
2149
+ 0.512,
2150
+ 0.733,
2151
+ 0.885,
2152
+ 0.799
2153
+ ],
2154
+ "angle": 0,
2155
+ "content": "Minjia Zhang and Yuxiong He. 2020. Accelerating training of transformer-based language models with progressive layer dropping. In Advances in Neural Information Processing Systems, volume 33, pages 14011-14023. Curran Associates, Inc."
2156
+ },
2157
+ {
2158
+ "type": "ref_text",
2159
+ "bbox": [
2160
+ 0.512,
2161
+ 0.81,
2162
+ 0.885,
2163
+ 0.901
2164
+ ],
2165
+ "angle": 0,
2166
+ "content": "Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric Xing, Hao Zhang, Joseph E. Gonzalez, and Ion Stoica. 2023. Judging LLM-as-a-judge with MT-bench and chatbot arena. In Thirty-seventh Conference on Neural Information Processing Systems Datasets and Benchmarks Track."
2167
+ },
2168
+ {
2169
+ "type": "list",
2170
+ "bbox": [
2171
+ 0.512,
2172
+ 0.086,
2173
+ 0.885,
2174
+ 0.901
2175
+ ],
2176
+ "angle": 0,
2177
+ "content": null
2178
+ },
2179
+ {
2180
+ "type": "page_number",
2181
+ "bbox": [
2182
+ 0.477,
2183
+ 0.929,
2184
+ 0.525,
2185
+ 0.941
2186
+ ],
2187
+ "angle": 0,
2188
+ "content": "31618"
2189
+ }
2190
+ ]
2191
+ ]
2025/CLaSp_ In-Context Layer Skip for Self-Speculative Decoding/ef9ee0d8-c50a-4f5c-9b72-baac0ef1de40_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4e6f433b0ceb16e09a8e4ae5413fd62e4372d3a1840c0b2a1f8049a85988035e
3
+ size 2155476
2025/CLaSp_ In-Context Layer Skip for Self-Speculative Decoding/full.md ADDED
@@ -0,0 +1,303 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CLaSp: In-Context Layer Skip for Self-Speculative Decoding
2
+
3
+ Longze Chen $^{1,2*}$ Renke Shan $^{2,5*}$ Huiming Wang $^{3*}$ Lu Wang $^{5}$ Ziqiang Liu $^{1,2}$ Run Luo $^{1,2}$ Jiawei Wang $^{2}$ Hamid Alinejad-Rokny $^{4}$ Min Yang $^{1\dagger}$
4
+
5
+ <sup>1</sup> Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences
6
+
7
+ 2 University of Chinese Academy of Sciences 3 Singapore University of Technology and Design
8
+
9
+ $^{4}$ School of Biomedical Engineering, UNSW Sydney $^{5}$ Ritzz-AI
10
+
11
+ {lz.chen2, min.yang}@siat.ac.cn
12
+
13
+ # Abstract
14
+
15
+ Speculative decoding (SD) is a promising method for accelerating the decoding process of Large Language Models (LLMs). The efficiency of SD primarily hinges on the consistency between the draft model and the verify model. However, existing drafting approaches typically require additional modules to be trained, which can be challenging to implement and ensure compatibility across various LLMs. In this paper, we propose CLaSp, an in-context layer-skipping strategy for self-speculative decoding. Unlike prior methods, CLaSp does not require additional drafting modules or extra training. Instead, it employs a plug-and-play mechanism by skipping intermediate layers of the verify model to construct a compressed draft model. Specifically, we develop a dynamic programming algorithm that optimizes the layer-skipping process by leveraging the complete hidden states from the last verification stage as an objective. This enables CLaSp to dynamically adjust its layer-skipping strategy after each verification stage, without relying on pre-optimized sets of skipped layers. Experimental results across diverse downstream tasks demonstrate that CLaSp achieves a speedup of $1.3 \times \sim 1.7 \times$ on LLaMA3 series models without altering the original distribution of the generated text.
16
+
17
+ # 1 Introduction
18
+
19
+ Transformer-based Large Language Models (LLMs) have achieved remarkable success across a wide range of natural language processing applications (Brown et al., 2020; Achiam et al., 2023). Scaling the model size and extending the context window significantly enhance performance (Kaplan et al., 2020; Anil et al., 2023; Reid et al., 2024), but also leads to a rapid increase in
20
+
21
+ ![](images/98515af9161ddfaff63c545ab22e6976370d304cbc3928e6cb4caaf1e53d26a8.jpg)
22
+ Figure 1: Previous Self-SD method vs. CLaSp. Compared to the previous Self-SD method, which requires costly Bayesian optimization on training dataset to select a fixed set of skipped layers, CLaSp employs a dynamic layer-skipping strategy that adjusts in real-time based on context.
23
+
24
+ inference latency. This latency primarily stems from the autoregressive nature of LLMs, where model parameters must be loaded into GPU SRAM for each token generation, resulting in underutilization of computational cores during the decoding stage (Patterson, 2004; Shazeer, 2019; Agrawal et al., 2023).
25
+
26
+ Inspired by speculative execution in computer systems (Burton, 1985; Hennessy and Patterson, 2012), speculative decoding (SD) (Xia et al., 2023; Leviathan et al., 2023; Chen et al., 2023) is proposed as a lossless autoregressive decoding acceleration technique. SD accelerates autoregressive decoding by introducing an efficient draft model to pre-generate tokens, which are subsequently validated by a slower verify model in parallel. This technique significantly reduces the number
27
+
28
+ of forward passes required by the verify model, alleviating memory-bound inefficiencies caused by frequent parameter access. While effective, SD relies on finding or training a suitable draft model that can closely mimic the behavior of the verify model. This requirement is feasible for open-sourced model families, such as LLaMA series (Touvron et al., 2023a,b; Dubey et al., 2024; Yang et al., 2024), but becomes prohibitively difficult for specialized LLMs that lack pre-existing compatible draft model counterparts.
29
+
30
+ The difficulty lies in achieving consistency between the draft model and the verify model. For general-purpose models, lightweight modules have been proposed as substitutes for the draft model (Cai et al., 2024; Li et al., 2024b; Du et al., 2024; Liu et al., 2024). These modules are designed to avoid retraining from scratch, but they struggle to generalize across diverse tasks and contexts. As a result, their acceptance rates drop sharply when handling unseen tasks, making them unsuitable for applications requiring robust performance across varying scenarios.
31
+
32
+ Self-speculative decoding (Self-SD) (Zhang et al., 2024) addresses the challenge of compatibility by using parts of the verify model itself as a compressed draft model, bypassing the need for additional modules or training. This approach creates the draft model by sparsifying intermediate layers of the verify model, effectively skipping certain computations. Similar to methods that require training, it also lacks robust generalization and heavily relies on an time-consuming Bayesian optimization process. SWIFT (Xia et al., 2024a) extends Self-SD by dynamically optimizing skipped layers as the number of user requests increases, but its effectiveness diminishes when handling sparse or unique task data.
33
+
34
+ To bridge this gap, we propose CLaSp, a dynamic in-context layer-skipping method for self-speculative decoding. Unlike existing methods, CLaSp dynamically adjusts the skipped layer set at each decoding step based on the current context, eliminating the need for pre-optimization or retraining (see Figure 1). Our approach leverages the observation of slowly changing embeddings across layers (Liu et al., 2023) and employs a dynamic programming algorithm to identify the optimal skipped layers with minimal additional latency. By using the complete hidden states from the last verification step as ground truth, CLaSp predicts and adjusts the draft model's sparsity in real-time,
35
+
36
+ achieving high acceptance rates while maintaining acceleration benefits.
37
+
38
+ We evaluate CLaSp on the LLaMA3 series models using Spec-Bench (Xia et al., 2024b), a comprehensive benchmark for speculative decoding across diverse scenarios. CLaSp achieves $1.3 \times \sim 1.7 \times$ wallclock time speedup compared to conventional autoregressive decoding while preserving the original distribution of generated text. Our contributions are summarized as follows:
39
+
40
+ - We introduce CLaSp, a self-speculative decoding framework that dynamically adjusts the layer-skipping strategy based on context.
41
+ - We propose performance optimization strategies in CLaSp to fully leverage GPU parallelism, making the extra latency from layer optimization almost negligible.
42
+ - We conduct extensive experiments on Spec-Bench, showing that CLaSp consistently achieves $1.3 \times \sim 1.7 \times$ speedup without training, and provide a detailed analysis of its key hyper-parameters.
43
+
44
+ # 2 Related Work
45
+
46
+ Speculative Decoding. Speculative decoding (Xia et al., 2023; Leviathan et al., 2023; Chen et al., 2023) has been proposed as an effective strategy for lossless acceleration of LLM inference. Some approaches aim to reduce the high cost of training from scratch by introducing lightweight modules as draft model. Medusa (Cai et al., 2024) trains multiple decoding heads to predict the next $n$ tokens in parallel. EAGLE and EAGLE-2 (Li et al., 2024b,a) integrate a lightweight plug-in (a single transformer decoder layer) to existing LLMs. Glimpse Draft Model (Du et al., 2024) reuses the verify model's KV cache to generate candidate tokens that are more likely to be accepted by the verify model. However, these approaches rely heavily on pre-trained modules optimized for specific contexts, making them less effective for tasks with unseen data.
47
+
48
+ Retrieval-based methods, such as REST (He et al., 2024) and Prompt Lookup Decoding (Saxena, 2023), replace the draft model by retrieving relevant drafts from a text corpus or context based on input prompts. While these methods reduce reliance on explicit draft model models, their performance is highly sensitive to the quality and relevance of the retrieved drafts.
49
+
50
+ To address the challenges of designing compatible draft model, Self-SD (Zhang et al., 2024) and SWIFT (Xia et al., 2024a) directly leverage parts of the verify model as a compressed draft model by skipping intermediate layers of the original LLM. Triforce (Sun et al., 2024) employs a partial KV cache as the draft model and a full KV cache as the verify model, reducing inference latency by minimizing I/O operations, especially in long-context tasks. Despite these innovations, static configurations for layer skipping prevent these methods from dynamically adapting to changing task requirements or contexts, limiting their efficiency and generalizability.
51
+
52
+ To further enhance speculative decoding, tree-based attention mechanisms (Miao et al., 2024; Cai et al., 2024; Chen et al., 2024; Svirschevski et al., 2024) extend the decoding process from generating a single candidate sequence to exploring a candidate tree. By providing the verify model with multiple options for validation, these methods improve the acceptance rate of speculative decoding.
53
+
54
+ Layer-wise Sparsity. Layer redundancy in LLMs has been extensively studied, with methods such as LayerDrop (Fan et al., 2020), LayerSkip (Elhoushi et al., 2024), structured pruning (Zhang and He, 2020), SkipDecode (Corro et al., 2023), and LayerSharing (Zhang et al., 2023) demonstrating that not all layers are equally important. These methods suggest that the importance of each layer varies depending on the task and context, and that certain layers can be skipped or removed without significantly affecting model performance. However, determining which layers to skip or optimize for different downstream tasks remains a substantial challenge.
55
+
56
+ Deja Vu (Liu et al., 2023) and LISA (pan, 2024) demonstrate the potential of leveraging sparsity to accelerate LLM inference, either by exploiting context sparsity or by optimizing a subset of layers during training. Although effective, these methods rely on lossy sparsification techniques, introducing discrepancies between the sparse and original distributions. Similarly, Glavas et al. (2024) explore dynamic inference methods such as layer skipping and early exiting, which enable task-dependent acceleration but lack compatibility with speculative decoding, limiting their potential for lossless acceleration. Thus, we aim to combine the strengths of layer-wise sparsity and speculative decoding to achieve lossless acceleration across diverse tasks.
57
+
58
+ Algorithm 1: CLaSp Skip Layer Strategy
59
+ Input: Num hidden layers $L$ , num skip layers $M$ , hidden states $X = \{x_0, x_1, \ldots, x_{L-1}\}$ , DecoderLayer $f_i$ , hidden size $d$
60
+ Output: The optimal skipped layer set $S$ $g \gets \text{zeros}(L+1, M+1, d)$ , $g[0,0] \gets x_0$
61
+ // Dynamic programming
62
+ for $i = 1$ to $L + 1$ do
63
+ $\begin{array}{l} g[i,0] \gets x_i \\ \ell \gets \min(i - 1, M) \\ \mathcal{G} \gets f_{i-1}(g[i - 1, 1 : \ell + 1]) \\ \mathcal{F} \gets \text{norm}(\text{cat}(\mathcal{G}, g[i - 1, : \ell])) \\ \sigma \gets \mathcal{F} \cdot \text{norm}(x_i) \\ \text{if } \sigma[: \ell] > \sigma[\ell]: \text{ then} \\ |g[i][1 : \ell + 1] \gets \mathcal{G} \\ \text{else} \\ |g[i][1 : \ell + 1] \gets g[i - 1, : \ell] \\ \text{if } i \leq M \text{ then} \\ |g[i, i] \gets g[i - 1, i - 1] \\ S \gets \text{zeros}(L) \\ // \text{Backtracking optimal skipped layer set } S \\ \text{while } i > 0 \text{ and } j > 0 \text{ do} \\ \text{if } g[i, j] = g[i - 1, j - 1] \text{ then} \\ |S[i - 1] \gets 1 \\ j \gets j - 1 \\ i \gets i - 1 \\ \end{array}$
64
+
65
+ # 3 CLaSp
66
+
67
+ In this section, we first introduce the pipeline of CLaSp from a global perspective. Then, we explore the main challenges (§3.2) faced by CLaSp and formulate the problem of layer skipping (§3.3). Subsequently, we provide a detailed description of the CLaSp algorithm (§3.4 and §3.5) and efficiency optimization strategies (§3.6 and §3.7).
68
+
69
+ # 3.1 Pipeline
70
+
71
+ CLaSp can be explained as a three-stage process: (1) Drafting: The draft model autoregressively generates $K$ draft tokens from the given prompt sequence $x_{1},\ldots ,x_{i}$ , denoted as $x_{i + 1},\ldots ,x_{i + K}$ . (2) Verification: The verify model verifies the tokens generated during the drafting stage. This verification is performed in a single forward pass, where the LLM predicts the probability distribution for each draft token and evaluates whether they align with the full model's predictions. Once a draft token $x_{j}$ is rejected, the original LLM's prediction overwrites $x_{j}$ , and drafting resumes from token $x_{j + 1}$ in the next round. (3) Layer Optimization: Using the hidden states of the last accepted token $x_{j}$ as the optimization objective, the optimal skipped layer set $S^{*}$ is updated to guide the next round of drafting. As shown in Figure 2, before each round of drafting, the draft model can be updated to better adapt to the current context.
72
+
73
+ ![](images/4267b3b27e17376d209ed5f8788985284387549f58121722bf79660b9faa78f9.jpg)
74
+ Figure 2: The overall framework of CLaSp consists of three stages: (1) Draft, (2) Verify, (3) Layer Optimization. After the Verify stage, CLaSp uses the information obtained to perform Layer Optimization, resulting in a new optimal layer skipping set $S^{*}$ . This set guides the next Draft round, repeating the entire process.
75
+
76
+ # 3.2 Main Challenges
77
+
78
+ Compared to previous methods, CLaSp dynamically updates the skipped layer set before each drafting step, requiring solutions to two main challenges:
79
+
80
+ (1) How to determine which layers should be skipped? This is the most critical issue addressed by CLaSp, as it directly impacts drafting quality. An ideal layer-skipping strategy must adapt to the most recent context, ensuring that the drafted tokens are more likely to be accepted by the verify model.
81
+ (2) How to reduce the additional latency caused by layer optimization? The dynamic skipping strategy inevitably introduces computational delays due to the need for repeated searches to identify the current optimal layer subset. To ensure that layer optimization does not become the primary bottleneck, minimizing these additional delays is essential for maximizing the speedup benefits.
82
+
83
+ # 3.3 Problem Formulation of Layer Skip
84
+
85
+ Let $\mathcal{M}_v$ be the verify model and $\mathcal{M}_d$ be the draft model obtained by skipping certain intermediate layers from the original LLM. $F_{\mathcal{M}_v}(X)$ and $F_{\mathcal{M}_d}(X)$ represent the output hidden states on the top of the last token of current input $X$ , passing through the verify model or the draft model respectively. Our goal is to find the optimal skipped layer
86
+
87
+ set $S$ that minimizes the cosine similarity between $F_{\mathcal{M}_v}(X)$ and $F_{\mathcal{M}_d}(X)$ :
88
+
89
+ $$
90
+ \begin{array}{l} \mathcal {S} ^ {*} = \underset {\mathcal {S}} {\arg \min} \operatorname {c o s i n e} (F _ {\mathcal {M} _ {V}} (X), F _ {\mathcal {M} _ {D}} (X)), \\ \begin{array}{l} \text {s . t .} \mathcal {S} \in \{0, 1 \} ^ {L} \\ \end{array} \tag {1} \\ \end{array}
91
+ $$
92
+
93
+ where $L$ represents the number of transformer layers in the verify model.
94
+
95
+ # 3.4 Approximate Dynamic Programming
96
+
97
+ The principle behind selecting information for layer optimization is to minimize additional computational overhead by utilizing information already obtained in previous steps. In speculative decoding, we observed that the hidden states of the last accepted token after each verification step are not fully utilized. To address this, we propose leveraging this feedback information to predict the draft model configuration for the next drafting stage. Specifically, let the input tokens to a Transformer model be denoted as $X$ , with an embedding layer that maps token indices to token embeddings $h_0$ . The Transformer model consists of $L$ layers, where the $l$ -th Transformer layer performs a transformation $f_l$ , evolving the embeddings as:
98
+
99
+ $$
100
+ h _ {l + 1} = f _ {l} \left(h _ {l}\right)
101
+ $$
102
+
103
+ Let $\mathcal{D}(i,j)$ represent the maximum cosine similarity between $h_i$ and the optimal hidden state
104
+
105
+ ![](images/ba2f22bb2916ed84259da4e2d97a6cb4f49eea6ff93ece1140dee19ceff1426a.jpg)
106
+ (a)
107
+
108
+ ![](images/d24c6f7b0796dcd76744f18712acf0817e48261c71a28cf7cdc8281df2fca6c3.jpg)
109
+ (b)
110
+
111
+ ![](images/8b8687464b566c47f01f0ca26ac88a6917f980d898310587c14af9be12db9479.jpg)
112
+ (c)
113
+ Figure 3: (a) Sparse Persistence Observation: Skipped layer sets selected for adjacent tokens exhibit high similarity, with this similarity gradually decreasing as the token gap increases. This observation enables layer optimization on the current token to guide subsequent drafting processes. (b) Approximate Markov Property: Cosine similarity comparisons of hidden states obtained using Brute Force, Random, and CLaSp's dynamic programming configurations against the full forward pass demonstrate the approximate Markov property inherent to CLaSp. (c) Efficiency Optimization Strategies: Latency breakdown per query shows that Layer Optimization introduces only $4.8\%$ additional delay, underscoring its negligible impact on overall latency.
114
+
115
+ $g(i,j)$ obtained by skipping $j$ layers among the first $i$ transformer layers. So we design a dynamic programming transition equation defined as:
116
+
117
+ $$
118
+ \begin{array}{r} \mathcal {D} (i, j) = \max \left\{\cos i n e (h _ {i}, g (i - 1, j - 1)), \right. \\ \left. \cos i n e (h _ {i}, f _ {i - 1} (g (i - 1, j)))) \right\} \end{array} \tag {2}
119
+ $$
120
+
121
+ where cosine is used to calculate the cosine similarity between two vectors. The CLaSp skip layer algorithm process is shown in Algorithm 1.
122
+
123
+ # 3.5 Approximate Markov Property
124
+
125
+ A crucial prerequisite for dynamic programming algorithms is the "no aftereffect" property, which ensures that current decisions and state transitions are independent of previous states. However, when computing the optimal hidden states $g(i,j)$ , CLaSp does not strictly satisfy the Markov property, making it theoretically impossible to find an exact optimal solution using Algorithm 1.
126
+
127
+ Fortunately, due to the favorable property of slowly changing embeddings across layers, we observe that CLaSp's approximate algorithm closely aligns with the results of a brute force search for the optimal skipped layer set. To validate this, we fixed the first and last 10 layers of the 32-layer LLaMA3-8B model and compared the outcomes of brute force search, random layer selection, and CLaSp across the remaining 12 layers.
128
+
129
+ As shown in Figure 3b, the hidden states obtained by skipping the layers selected by CLaSp exhibit remarkable consistency with those from the brute force search, demonstrating a high cosine similarity with the hidden states of the original LLM.
130
+
131
+ In contrast, the results from randomly selected layers show relatively poor alignment.
132
+
133
+ These findings indicate that CLaSp approximates the Markov property effectively, allowing it to find near-optimal solutions within an acceptable error range.
134
+
135
+ # 3.6 Sequence Parallel
136
+
137
+ Unlike previous methods, CLaSp requires multiple layer optimizations during a single inference process. Therefore, the optimization process must be both efficient and accurate to avoid introducing additional delays while ensuring precise drafting in subsequent decoding steps. To address this, we employ parallelization strategies to minimize the additional delay caused by the dynamic programming process.
138
+
139
+ When CLaSp performs dynamic programming, the updates for $\mathcal{D}(i,j)$ and $g(i,j)$ are obtained through a double loop, resulting in a time complexity of $\mathcal{O}(LM)$ . Importantly, when computing the state at $(i,j)$ , only the state at $(i - 1,\cdot)$ is required. This dependency allows computations for different $j$ values with the same $i$ to be performed independently, enabling parallelization of the second loop.
140
+
141
+ To further reduce the GPU memory footprint, we avoid concatenating these states into a batch. Instead, we design a specialized mask matrix that enables parallelization of these states as a sequence. This approach reuses the same KV cache without duplicating it, significantly improving memory efficiency.
142
+
143
+ <table><tr><td rowspan="2">Models</td><td rowspan="2">Methods</td><td colspan="2">MT-bench</td><td colspan="2">WMT14</td><td colspan="2">CNN/DM</td><td colspan="2">NQ</td><td colspan="2">GSM8K</td><td colspan="2">DPR</td><td>Overall Speedup</td></tr><tr><td>τ</td><td>Speedup</td><td>τ</td><td>Speedup</td><td>τ</td><td>Speedup</td><td>τ</td><td>Speedup</td><td>τ</td><td>Speedup</td><td>τ</td><td>Speedup</td><td>τ</td></tr><tr><td colspan="15">Greedy Setting: Temperature=0</td></tr><tr><td rowspan="4">LLaMA-3-70B</td><td>AUTOREGRESSIVE</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00×</td></tr><tr><td>SELF-SD</td><td>2.57</td><td>1.38×</td><td>4.10</td><td>1.55×</td><td>5.46</td><td>1.57×</td><td>2.60</td><td>1.42×</td><td>3.10</td><td>1.49×</td><td>3.59</td><td>1.43×</td><td>1.47×</td></tr><tr><td>SWIFT</td><td>3.13</td><td>1.26×</td><td>2.90</td><td>1.27×</td><td>3.93</td><td>1.35×</td><td>3.21</td><td>1.29×</td><td>2.86</td><td>1.27×</td><td>3.31</td><td>1.26×</td><td>1.28×</td></tr><tr><td>CLASP</td><td>4.55</td><td>1.64×</td><td>5.81</td><td>1.69×</td><td>7.19</td><td>1.66×</td><td>5.37</td><td>1.72×</td><td>6.77</td><td>1.75×</td><td>4.05</td><td>1.56×</td><td>1.67×</td></tr><tr><td rowspan="4">LLaMA-3-70B -Chat</td><td>AUTOREGRESSIVE</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00×</td></tr><tr><td>SELF-SD</td><td>1.40</td><td>1.23×</td><td>2.27</td><td>1.33×</td><td>1.50</td><td>1.24×</td><td>1.59</td><td>1.26×</td><td>3.00</td><td>1.40×</td><td>2.56</td><td>1.37×</td><td>1.31×</td></tr><tr><td>SWIFT</td><td>4.41</td><td>1.15×</td><td>5.54</td><td>1.27×</td><td>4.52</td><td>1.22×</td><td>4.83</td><td>1.20×</td><td>6.19</td><td>1.31×</td><td>5.97</td><td>1.33×</td><td>1.25×</td></tr><tr><td>CLASP</td><td>2.61</td><td>1.35×</td><td>4.72</td><td>1.51×</td><td>3.48</td><td>1.39×</td><td>3.32</td><td>1.39×</td><td>5.28</td><td>1.53×</td><td>5.61</td><td>1.54×</td><td>1.45×</td></tr><tr><td rowspan="4">LLaMA-3-8B</td><td>AUTOREGRESSIVE</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00×</td></tr><tr><td>SELF-SD</td><td>1.28</td><td>1.07×</td><td>1.35</td><td>1.13×</td><td>1.73</td><td>1.17×</td><td>1.45</td><td>1.13×</td><td>1.44</td><td>1.15×</td><td>2.33</td><td>1.21×</td><td>1.14×</td></tr><tr><td>SWIFT</td><td>2.75</td><td>1.07×</td><td>2.51</td><td>1.09×</td><td>2.76</td><td>1.13×</td><td>2.91</td><td>1.13×</td><td>2.72</td><td>1.10×</td><td>2.96</td><td>1.11×</td><td>1.11×</td></tr><tr><td>CLASP</td><td>3.68</td><td>1.24×</td><td>4.14</td><td>1.23×</td><td>6.22</td><td>1.22×</td><td>4.03</td><td>1.27×</td><td>5.26</td><td>1.26×</td><td>4.17</td><td>1.22×</td><td>1.24×</td></tr><tr><td colspan="15">Non-Greedy Setting: Temperature=1</td></tr><tr><td rowspan="4">LLaMA-3-70B</td><td>AUTOREGRESSIVE</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1,00×</td></tr><tr><td>SELF-SD</td><td>1.64</td><td>1.23×</td><td>2.53</td><td>1.39×</td><td>3.61</td><td>1.43×</td><td>1.53</td><td>1.24×</td><td>2.01</td><td>1.33×</td><td>2.17</td><td>1.24×</td><td>1.31×</td></tr><tr><td>SWIFT</td><td>2.06</td><td>1.10×</td><td>1.96</td><td>1.08×</td><td>1.97</td><td>1.09×</td><td>1.97</td><td>1.08×</td><td>1.98</td><td>1.09×</td><td>2.01</td><td>1.07×</td><td>1.09×</td></tr><tr><td>CLASP</td><td>3.13</td><td>1.49×</td><td>3.33</td><td>1.50×</td><td>5.38</td><td>1.54×</td><td>3.56</td><td>1.54×</td><td>4.32</td><td>1.59×</td><td>2.51</td><td>1.36×</td><td>1.50×</td></tr><tr><td rowspan="4">LLaMA-3-70B -Chat</td><td>AUTOREGRESSIVE</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00×</td></tr><tr><td>SELF-SD</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SWIFT</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>CLASP</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan="4">LLaMA-3-8B</td><td>AUTOREGRESSIVE</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00</td><td>1.00×</td><td>1.00×</td></tr><tr><td>SELF-SD</td><td>0.98</td><td>0.89×</td><td>1.01</td><td>0.94×</td><td>1.36</td><td>1.02×</td><td>1.09</td><td>0.92×</td><td>1.09</td><td>0.96×</td><td>1.82</td><td>1.03×</td><td>0.96×</td></tr><tr><td>SWIFT</td><td>1.90</td><td>0.80×</td><td>1.92</td><td>0.85×</td><td>1.85</td><td>0.83×</td><td>1.97</td><td>0.84×</td><td>1.95</td><td>0.83×</td><td>1.90</td><td>0.80×</td><td>0.83×</td></tr><tr><td>CLASP</td><td>2.62</td><td>1.11×</td><td>2.78</td><td>1.08×</td><td>4.26</td><td>1.11×</td><td>2.70</td><td>1.08×</td><td>3.76</td><td>1.10×</td><td>2.35</td><td>1.02×</td><td>1.08×</td></tr></table>
144
+
145
+ Table 1: Comparison between CLaSp and prior plug-and-play methods. We report the average acceptance length $\tau$ and speedup ratio under greedy (Temperature=0) and non-greedy (Temperature=1) settings. Bold numbers denote the best Speedup.
146
+
147
+ # 3.7 Lower Optimization Frequency
148
+
149
+ CLaSp updates the optimal skipped layer set after each verification step, using the feedback from the last accepted token. However, the time cost of performing this update is comparable to that of a verification step, which introduces a bottleneck for CLaSp's inference latency. Fortunately, we observe a phenomenon we term Sparse Persistence: the skipped layer sets required by adjacent tokens tend to exhibit high similarity. To quantify this, we calculate the Jaccard similarity between the skipped layer sets of adjacent tokens. As shown in Figure 3a, the similarity remains high when the token distance is within a certain range and only decreases significantly as the distance between tokens increases.
150
+
151
+ Based on this observation, we further found that the optimal skipped layer set does not change drastically after every update. This allowed us to adjust the update frequency by accumulating several verification steps before performing an update, rather than updating after every single verification step. While adopting a lower update frequency slightly reduced the average acceptance rate of draft tokens, the reduction in update latency led to a substantial improvement in the overall speedup ratio. This trade-off highlights the efficiency benefits of
152
+
153
+ leveraging Sparse Persistence to optimize the layer update process.
154
+
155
+ # 4 Experiments
156
+
157
+ This section evaluates CLaSp across various text generation tasks to demonstrate its efficiency and effectiveness.
158
+
159
+ Model and Testbed. We evaluate CLaSp using four different sizes of LLaMA models (Dubey et al., 2024): LLaMA3-8B, LLaMA2-13B, LLaMA3-70B, and LLaMA3.1-405B. The models are deployed on NVIDIA A800 GPUs with 80GB of memory. Specifically, the 8B and 13B models are deployed on a single A800 GPU, while the 70B and 405B models utilize 2 and 8 A800 GPUs, respectively, with pipeline parallelism enabled by Accelerate (Gugger et al., 2022). All models use FP16 precision, except for LLaMA3.1-405B, which employs INT8 quantization for improved memory efficiency. Unless otherwise specified, the batch size is set to 1 for all models.
160
+
161
+ Datasets. We benchmark the performance of CLaSp on Spec-Bench (Xia et al., 2024b), a comprehensive evaluation suite covering a wide range of datasets and tasks. Spec-Bench includes six subtasks: multi-turn conversation, translation, summarization, question answering, mathematical reason
162
+
163
+ ![](images/a8f68be26c917d45868191e8358f32113d0e9faffdfb2d240192fc47ef1a28d4.jpg)
164
+ (a)
165
+
166
+ ![](images/a31c08c124dbb1f25133dd26055e119030d5200d18208eb8900b0901ee91a089.jpg)
167
+ (b)
168
+ Figure 4: The impact of key hyper-parameters on speedup: (a) Number of Skipped Layers; (b) Layer Optimization Interval; (c) Draft-Existing Threshold. The experiment results were all obtained using the LLaMA-3-70B model on MT-Bench.
169
+
170
+ ![](images/ad384b8c0cead4546e02e38cc45a332727d6b6658407b3f03c75b831e3344e75.jpg)
171
+ (c)
172
+
173
+ ing, and retrieval-augmented generation. Specifically, Spec-Bench consists of 80 randomly selected instances from each of MT-bench (Zheng et al., 2023), WMT14 DE-EN, CNN/Daily Mail (Nallapati et al., 2016), Natural Questions (Kwiatkowski et al., 2019), GSM8K (Cobbe et al., 2021), and DPR (Karpukhin et al., 2020). To control the generation length across tasks, we set the maximum sequence length to 1024 tokens, following prior experimental setups (Xia et al., 2024b).
174
+
175
+ Comparison. For our main experiments, we use vanilla autoregressive decoding as the baseline, serving as the benchmark for speedup ratios (1.00x). We compare CLaSp against existing training-free layer skip methods, including Self-Speculative Decoding (Zhang et al., 2024) and SWIFT (Xia et al., 2024a). Other speculative decoding (SD) methods are excluded from the comparison as they require additional modules or extensive training, which limits their generalizability. Since the speedup ratio is hardware-dependent, all methods were evaluated on the same devices to ensure a fair comparison.
176
+
177
+ Performance Metrics. CLaSp is essentially still speculative sampling, which has been proven to enable lossless acceleration (Leviathan et al., 2023). Therefore, we focus solely on acceleration performance rather than generation quality. The following metrics are used for evaluation: Speedup Ratio: The actual test speedup ratio relative to vanilla autoregressive decoding, providing a direct measure of acceleration. Average Acceptance Length $(\tau)$ : The average number of tokens generated per drafting-verification cycle, corresponding to the number of tokens accepted from the draft. This metric is independent of hardware and runtime environment, while its limitation is that it does not
178
+
179
+ reflect the overhead introduced by the draft model.
180
+
181
+ # 4.1 Experimental Result
182
+
183
+ As shown in Table 1, we report the performance of CLaSp and prior plug-and-play methods on text generation tasks from Spec-Bench under both greedy (Temperature $= 0$ ) and non-greedy (Temperature $= 1$ ) settings. The experimental results reveal the following findings.
184
+
185
+ CLaSp demonstrates superior efficiency compared to previous methods, achieving consistent speedups of $1.3 \times \sim 1.7 \times$ over vanilla autoregressive decoding across various models and tasks. Prior methods relying on Bayesian optimization exhibit lower performance, particularly when data volume is limited.
186
+
187
+ CLaSp consistently improves average acceptance length, acceptance rate, and speedups. This efficiency is primarily due to CLaSp's ability to leverage model layer sparsity effectively. By skipping $50\%$ to $60\%$ of layers during experiments, CLaSp maintains both a high average acceptance length and acceptance rate, contributing to superior acceleration. Generally, longer acceptance lengths lead to higher speedups. However, there are cases where speedups remain low despite long acceptance lengths, as drafting additional tokens increases time spent, reducing acceptance rates and overall speedups.
188
+
189
+ The performance advantage of CLaSp is more pronounced on larger models, such as LLaMA3-70B, compared to smaller models like LLaMA2-13B and LLaMA3-8B. This suggests that CLaSp can better leverage the greater layer sparsity present in larger models, enhancing adaptability and efficiency.
190
+
191
+ Overall, the robust performance of CLaSp across different models highlights its effectiveness as a
192
+
193
+ ![](images/5386092d09baf10b509b06bdf287dbfc6099c663a5616691e3f19d8e71051624.jpg)
194
+ Figure 5: Model Size Scaling Laws of CLaSp.
195
+
196
+ plug-and-play solution, offering a versatile method to enhance inference speed for a range of LLMs.
197
+
198
+ # 5 Analysis
199
+
200
+ We present an extensive analysis of CLaSp, focusing on three key aspects: the benefits of the parallel strategy (Section 5.1), compatibility with different LLMs (Section 5.2), and the impact of key hyperparameters (Section 5.3).
201
+
202
+ # 5.1 Sequence Parallel
203
+
204
+ As discussed in Section 3.6, our dynamic programming (DP) algorithm requires $\mathcal{O}(LM)$ layer forward passes. To assess the time overhead, we conducted experiments on LLaMA3-70B using two NVIDIA A800 GPUs. Without any parallel strategy, a single DP run to filter half of the layers takes approximately 2.5 seconds, whereas a single round of verification only takes about 0.1 seconds. After implementing our parallel strategy, the time for a single DP run is reduced to 0.14 seconds, comparable to the time for a single verification. This significantly reduces the additional latency introduced by layer optimization.
205
+
206
+ We further analyzed the per-query latency distribution of each stage, as illustrated in Figure 3c. The results show that the latency proportion of layer optimization is significantly reduced with the parallel strategy. Additionally, with a lower update frequency, the extra update latency of CLaSp becomes almost negligible.
207
+
208
+ # 5.2 Model Size Scaling Laws
209
+
210
+ To assess the scalability of CLaSp, we evaluated its performance across a range of model sizes, including LLaMA2-13B and LLaMA3.1-405B, in addition to LLaMA3-8B and LLaMA3-70B. For LLaMA2-13B, the model was deployed
211
+
212
+ on an A800 GPU using FP16 precision, while for LLaMA3.1-405B, we used INT8 quantization (Dettmers et al., 2022) to deploy it on a single node with 8 A800 GPUs.
213
+
214
+ As illustrated in Figure 5, the speedup increases with model size across various tasks. Specifically, on the MT-bench, speedups range from $1.24 \times$ for LLaMA3-8B to $1.73 \times$ for LLaMA3.1-405B. For the GSM8K benchmark, speedups increase from $1.26 \times$ to $1.81 \times$ , while on the Natural Questions benchmark, speedups range from $1.27 \times$ to $1.82 \times$ . These results indicate that larger models exhibit enhanced layer sparsity, enabling CLaSp to leverage its capabilities more effectively and achieve greater speedups.
215
+
216
+ # 5.3 Key Hyper-Parameters
217
+
218
+ We show the effect of key hyper-parameters on the acceleration benefits of CLaSp, where all experiments were performed using the LLaMA3-70B model on MT-Bench.
219
+
220
+ # 5.3.1 Number of Skipped Layers
221
+
222
+ Layer sparsity allows intermediate layers to be skipped, but the number of skipped layers directly influences performance. Adjusting this parameter involves a trade-off between draft quality and efficiency, both of which significantly impact the speedup.
223
+
224
+ As shown in Figure 4a, for LLaMA3-70B, which consists of 80 layers, the speedup increases as the number of skipped layers rises, reaching an optimal value of $1.64 \times$ when 44 layers are skipped. Beyond this point, the benefits of a longer average acceptance length are outweighed by the increased cost of generating high-quality drafts, resulting in a decline in speedup.
225
+
226
+ # 5.3.2 Layer Optimization Interval
227
+
228
+ Performing layer optimization after every verification step is computationally expensive, as noted in Section 3.7. Extending the Layer Optimization Interval (LOI) reduces the additional delays introduced by dynamic programming (DP) while having only a minor impact on the average acceptance length $\tau$ .
229
+
230
+ As illustrated in Figure 4b, the speedup initially increases with the LOI but begins to decline as the interval grows beyond 128. This decline is caused by a significant drop in $\tau$ , which negatively impacts overall speedup.
231
+
232
+ # 5.3.3 Draft-Exiting Threshold
233
+
234
+ To balance draft efficiency and cost, skipping $40\%$ to $60\%$ of layers achieves an optimal trade-off, as noted in Section 5.3.1. However, the cost of a single draft remains high, necessitating a sufficiently high acceptance rate to maximize speedup.
235
+
236
+ EAGLE-2 (Li et al., 2024a) suggests leveraging the draft model's confidence score to approximate the acceptance rate. By tuning the Draft-Exiting Threshold (DET), we can control the acceptance rate to optimize acceleration.
237
+
238
+ As shown in Figure 4c, adjusting the DET around 0.7 results in the highest speedup. Even with higher DET values, high speedup is maintained, demonstrating the robustness of this parameter for achieving acceleration gains.
239
+
240
+ # 6 Conclusion
241
+
242
+ In this paper, we propose CLaSp, a novel self-speculative decoding framework that adaptively adjusts the layer-skipping strategy based on context. We discover the potential of context-aware layer sparsity for generating high-quality drafts. Leveraging this insight, CLaSp performs layer optimization before each draft stage with minimal additional latency, significantly increasing the decoding efficiency. Through extensive experiments across diverse text generation tasks, we demonstrated that CLaSp achieves consistent speedups of $1.3 \times \sim 1.7 \times$ over vanilla autoregressive decoding. Furthermore, detailed analysis reveals that CLaSp generalizes well to different models and tasks. For future work, we aim to explore ways to better leverage the layer sparsity of LLMs to further reduce inference latency in larger models.
243
+
244
+ # Limitations
245
+
246
+ The CLaSp framework dynamically adjusts the layer-skipping strategy based on context, making the self-speculative decoding process of LLMs more efficient. However, certain limitations exist. Our experiments are conducted solely on NVIDIA A800 GPUs with 80GB of memory and limited to LLaMA series models, leaving the potential of more powerful hardware and other models unexplored. Additionally, while CLaSp can function alongside many existing speculative decoding innovations, we do not investigate these integrations. We believe that addressing these limitations and exploring such combinations in future research could lead to significant advancements.
247
+
248
+ # Acknowledgments
249
+
250
+ Min Yang was supported by National Key Research and Development Program of China (2022YFF0902100), National Natural Science Foundation of China (Grant No. 62376262), the Natural Science Foundation of Guangdong Province of China (2024A1515030166, 2025B1515020032), Shenzhen Science and Technology Innovation Program (KQTD20190929172835662).
251
+
252
+ # References
253
+
254
+ 2024. Lisa: Layerwise importance sampling for memory-efficient large language model fine-tuning. arXiv preprint arXiv:2403.17919.
255
+ 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.
256
+ Amey Agrawal, Ashish Panwar, Jayashree Mohan, Nipun Kwatra, Bhargav S Gulavani, and Ramachandran Ramjee. 2023. Sarathi: Efficient llm inference by piggybacking decodes with chunked prefixes. arXiv preprint arXiv:2308.16369.
257
+ Rohan Anil, Andrew M Dai, Orhan Firat, Melvin Johnson, Dmitry Lepikhin, Alexandre Passos, Siamak Shakeri, Emanuel Taropa, Paige Bailey, Zhifeng Chen, et al. 2023. Palm 2 technical report. arXiv preprint arXiv:2305.10403.
258
+ 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.
259
+ F. Warren Burton. 1985. Speculative computation, parallelism, and functional programming. IEEE Transactions on Computers, C-34(12):1190-1193.
260
+ 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. In *Forty-first International Conference on Machine Learning*, ICML 2024, Vienna, Austria, July 21-27, 2024. OpenReview.net.
261
+
262
+ Charlie Chen, Sebastian Borgeaud, Geoffrey Irving, Jean-Baptiste Lespiau, Laurent Sifre, and John Jumper. 2023. Accelerating large language model decoding with speculative sampling. arXiv preprint arXiv:2302.01318.
263
+ Zhuoming Chen, Avner May, Ruslan Svirschevski, Yuhsun Huang, Max Ryabinin, Zhihao Jia, and Beidi Chen. 2024. Sequoia: Scalable, robust, and hardware-aware speculative decoding. arXiv preprint arXiv:2402.12374.
264
+ Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, et al. 2021. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168.
265
+ Luciano Del Corro, Allie Del Giorno, Sahaj Agarwal, Bin Yu, Ahmed Awadallah, and Subhabrata Mukherjee. 2023. Skipdecode: Autoregressive skip decoding with batching and caching for efficient llm inference. arXiv preprint arXiv:2307.02628.
266
+ Tim Dettmers, Mike Lewis, Younes Belkada, and Luke Zettlemoyer. 2022. Gpt3.int8(): 8-bit matrix multiplication for transformers at scale. In Advances in Neural Information Processing Systems, volume 35, pages 30318-30332. Curran Associates, Inc.
267
+ Cunxiao Du, Jing Jiang, Yuanchen Xu, Jiawei Wu, Sicheng Yu, Yongqi Li, Shenggui Li, Kai Xu, Liqiang Nie, Zhaopeng Tu, and Yang You. 2024. Glide with a cape: A low-hassle method to accelerate speculative decoding. In *Forty-first International Conference on Machine Learning*, ICML 2024, Vienna, Austria, July 21-27, 2024. OpenReview.net.
268
+ Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. 2024. The llama 3 herd of models. arXiv preprint arXiv:2407.21783.
269
+ Mostafa Elhoushi, Akshit Shrivastava, Diana Liskovich, Basil Hosmer, Bram Wasti, Liangzhen Lai, Anas Mahmoud, Bilge Acun, Saurabh Agarwal, Ahmed Roman, Ahmed Aly, Beidi Chen, and Carole-Jean Wu. 2024. LayerSkip: Enabling early exit inference and self-speculative decoding. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 12622-12642, Bangkok, Thailand. Association for Computational Linguistics.
270
+ Angela Fan, Edouard Grave, and Armand Joulin. 2020. Reducing transformer depth on demand with structured dropout. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net.
271
+ Theodore Glavas, Joud Chataoui, Florence Regol, Wassim Jabbour, Antonios Valkanas, Boris N. Oreshkin, and Mark Coates. 2024. Dynamic layer selection in decoder-only transformers. arXiv preprint arXiv:2410.20022.
272
+
273
+ Sylvain Gugger, Lysandre Debut, Thomas Wolf, Philipp Schmid, Zachary Mueller, Sourab Mangrulkar, Marc Sun, and Benjamin Bossan. 2022. Accelerate: Training and inference at scale made simple, efficient and adaptable. https://github.com/huggingface/accelerate.
274
+ Zhenyu He, Zexuan Zhong, Tianle Cai, Jason Lee, and Di He. 2024. REST: Retrieval-based speculative decoding. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pages 1582-1595, Mexico City, Mexico. Association for Computational Linguistics.
275
+ John L. Hennessy and David A. Patterson. 2012. Computer Architecture: A Quantitative Approach, 5 edition. Morgan Kaufmann, Amsterdam.
276
+ Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. 2020. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361.
277
+ 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.
278
+ Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, Kristina Toutanova, Llion Jones, Matthew Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. 2019. Natural questions: A benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:452-466.
279
+ Yaniv Leviathan, Matan Kalman, and Yossi Matias. 2023. Fast inference from transformers via speculative decoding. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 19274-19286. PMLR.
280
+ Yuhui Li, Fangyun Wei, Chao Zhang, and Hongyang Zhang. 2024a. EAGLE-2: Faster inference of language models with dynamic draft trees. arXiv preprint arXiv:2406.16858.
281
+ Yuhui Li, Fangyun Wei, Chao Zhang, and Hongyang Zhang. 2024b. EAGLE: speculative sampling requires rethinking feature uncertainty. In *Forty-first International Conference on Machine Learning*, ICML 2024, Vienna, Austria, July 21-27, 2024. Open-Review.net.
282
+ Fangcheng Liu, Yehui Tang, Zhenhua Liu, Yunsheng Ni, Kai Han, and Yunhe Wang. 2024. Kangaroo: Lossless self-speculative decoding via double early exiting. arXiv preprint arXiv:2404.18911.
283
+
284
+ Zichang Liu, Jue Wang, Tri Dao, Tianyi Zhou, Binhang Yuan, Zhao Song, Anshumali Shrivastava, Ce Zhang, Yuandong Tian, Christopher Re, and Beidi Chen. 2023. Deja vu: Contextual sparsity for efficient LLMs at inference time. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 22137-22176. PMLR.
285
+ Xupeng Miao, Gabriele Oliaro, Zhihao Zhang, Xinhao Cheng, Zeyu Wang, Zhengxin Zhang, Rae Ying Yee Wong, Alan Zhu, Lijie Yang, Xiaoxiang Shi, Chunan Shi, Zhuoming Chen, Daiyaan Arfeen, Reyna Abhyankar, and Zhihao Jia. 2024. Specinfer: Accelerating large language model serving with tree-based speculative inference and verification. In Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 3, ASPLOS '24, page 932-949, New York, NY, USA. Association for Computing Machinery.
286
+ Ramesh Nallapati, Bowen Zhou, Cicero dos Santos, Caglar Gulcehre, and Bing Xiang. 2016. Abstractive text summarization using sequence-to-sequence RNNs and beyond. In Proceedings of the 20th SIGNLL Conference on Computational Natural Language Learning, pages 280-290, Berlin, Germany. Association for Computational Linguistics.
287
+ David A. Patterson. 2004. Latency lags bandwidth. Commun. ACM, 47(10):71-75.
288
+ Machel Reid, Nikolay Savinov, Denis Teptyashin, Dmitry Lepikhin, Timothy Lillicrap, Jean-baptiste Alayrac, Radu Soricut, Angeliki Lazaridou, Orhan Firat, Julian Schrittwieser, et al. 2024. Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context. arXiv preprint arXiv:2403.05530.
289
+ Apoorv Saxena. 2023. Prompt lookup decoding.
290
+ Noam Shazeer. 2019. Fast transformer decoding: One write-head is all you need. arXiv preprint arXiv:1911.02150.
291
+ Hanshi Sun, Zhuoming Chen, Xinyu Yang, Yuandong Tian, and Beidi Chen. 2024. Triforce: Lossless acceleration of long sequence generation with hierarchical speculative decoding. arXiv preprint arXiv:2404.11912.
292
+ Ruslan Svirschevski, Avner May, Zhuoming Chen, Beidi Chen, Zhihao Jia, and Max Ryabinin. 2024. Specexec: Massively parallel speculative decoding for interactive llm inference on consumer devices. arXiv preprint arXiv:2406.02532.
293
+ Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, et al. 2023a. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971.
294
+
295
+ Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023b. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288.
296
+ Heming Xia, Tao Ge, Peiyi Wang, Si-Qing Chen, Furu Wei, and Zhifang Sui. 2023. Speculative decoding: Exploiting speculative execution for accelerating seq2seq generation. In *Findings of the Association for Computational Linguistics: EMNLP* 2023, pages 3909-3925, Singapore. Association for Computational Linguistics.
297
+ Heming Xia, Yongqi Li, Jun Zhang, Cunxiao Du, and Wenjie Li. 2024a. Swift: On-the-fly self-speculative decoding for llm inference acceleration. arXiv preprint arXiv:2410.06916.
298
+ Heming Xia, Zhe Yang, Qingxiu Dong, Peiyi Wang, Yongqi Li, Tao Ge, Tianyu Liu, Wenjie Li, and Zhifang Sui. 2024b. Unlocking efficiency in large language model inference: A comprehensive survey of speculative decoding. In Findings of the Association for Computational Linguistics ACL 2024, pages 7655-7671, Bangkok, Thailand and virtual meeting. Association for Computational Linguistics.
299
+ An Yang, Baosong Yang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Zhou, Chengpeng Li, Chengyuan Li, Dayiheng Liu, Fei Huang, et al. 2024. Qwen2 technical report. arXiv preprint arXiv:2407.10671.
300
+ Jun Zhang, Jue Wang, Huan Li, Lidan Shou, Ke Chen, Gang Chen, and Sharad Mehrotra. 2024. Draft & verify: Lossless large language model acceleration via self-speculative decoding. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 11263-11282, Bangkok, Thailand. Association for Computational Linguistics.
301
+ Kaiyan Zhang, Ning Ding, Biqing Qi, Xuekai Zhu, Xinwei Long, and Bowen Zhou. 2023. CRaSh: Clustering, removing, and sharing enhance fine-tuning without full large language model. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 9612-9637, Singapore. Association for Computational Linguistics.
302
+ Minjia Zhang and Yuxiong He. 2020. Accelerating training of transformer-based language models with progressive layer dropping. In Advances in Neural Information Processing Systems, volume 33, pages 14011-14023. Curran Associates, Inc.
303
+ Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric Xing, Hao Zhang, Joseph E. Gonzalez, and Ion Stoica. 2023. Judging LLM-as-a-judge with MT-bench and chatbot arena. In Thirty-seventh Conference on Neural Information Processing Systems Datasets and Benchmarks Track.
2025/CLaSp_ In-Context Layer Skip for Self-Speculative Decoding/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8e365b61a6ed9c74bd6ad90d0717d0f4388152b2ab4dbbcf6b10cbf167e6f41
3
+ size 430002
2025/CLaSp_ In-Context Layer Skip for Self-Speculative Decoding/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/CMHKF_ Cross-Modality Heterogeneous Knowledge Fusion for Weakly Supervised Video Anomaly Detection/c44ffe7f-774e-48fe-b25c-5ae80f879f1d_content_list.json ADDED
@@ -0,0 +1,1869 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "CMHKF: Cross-Modality Heterogeneous Knowledge Fusion for Weakly Supervised Video Anomaly Detection",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 127,
8
+ 89,
9
+ 870,
10
+ 130
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Guohua Wang $^{1*}$ , Shengping Song $^{1*}$ , Wuchun He $^{1}$ , Yongsen Zheng $^{2\\dagger}$",
17
+ "bbox": [
18
+ 208,
19
+ 145,
20
+ 786,
21
+ 164
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "$^{1}$ South China Agricultural University, China",
28
+ "bbox": [
29
+ 319,
30
+ 164,
31
+ 678,
32
+ 180
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "$^{2}$ Nanyang Technological University, Singapore",
39
+ "bbox": [
40
+ 307,
41
+ 180,
42
+ 689,
43
+ 197
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "wangguohua@scau.edu.cn, songshengping@stu.scau.edu.cn",
50
+ "bbox": [
51
+ 253,
52
+ 198,
53
+ 742,
54
+ 212
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "hewuchun@stu.scau.edu.cn, yongsen.zheng@ntu.edu.sg",
61
+ "bbox": [
62
+ 268,
63
+ 214,
64
+ 727,
65
+ 230
66
+ ],
67
+ "page_idx": 0
68
+ },
69
+ {
70
+ "type": "text",
71
+ "text": "Abstract",
72
+ "text_level": 1,
73
+ "bbox": [
74
+ 260,
75
+ 260,
76
+ 339,
77
+ 275
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "Weakly supervised video anomaly detection (WSVAD) presents a challenging task focused on detecting frame-level anomalies using only video-level labels. However, existing methods focus mainly on visual modalities, neglecting rich multi-modality information. This paper proposes a novel framework, Cross-Modality Heterogeneous Knowledge Fusion (CMHKF), that integrates cross-modality knowledge from video, audio, and text to improve anomaly detection and localization. To achieve adaptive cross-modality heterogeneous knowledge learning, we designed two components: Cross-Modality Video-Text Knowledge Alignment (CVKA) and Audio Modality Feature Adaptive Extraction (AFAE). They extract and aggregate features by exploring inter-modality correlations. By leveraging abundant cross-modality knowledge, our approach improves the discrimination between normal and anomalous segments. Extensive experiments on XD-Violence show our method significantly enhances accuracy and robustness in both coarse-grained and fine-grained anomaly detection.",
84
+ "bbox": [
85
+ 144,
86
+ 291,
87
+ 458,
88
+ 631
89
+ ],
90
+ "page_idx": 0
91
+ },
92
+ {
93
+ "type": "text",
94
+ "text": "1 Introduction",
95
+ "text_level": 1,
96
+ "bbox": [
97
+ 114,
98
+ 646,
99
+ 258,
100
+ 662
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Weakly supervised video anomaly detection (WSVAD) aims to use video-level labels (normal or abnormal) to evaluate frame-level anomaly scores, thereby reducing manual annotation costs. Most existing WSVAD methods (Feng et al., 2021; Cho et al., 2023; Karim et al., 2024) primarily distinguish between frame-level normal and abnormal events by learning information from a single modality, specifically the video modality. However, relying solely on video modality struggles to localize anomalies in ambiguous scenarios. Complementary modalities, such as audio and text, provide additional contextual cues that help disambiguate",
107
+ "bbox": [
108
+ 112,
109
+ 674,
110
+ 489,
111
+ 883
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "complex anomaly patterns. Thus, integrating multimodality information is essential for WSVAD.",
118
+ "bbox": [
119
+ 507,
120
+ 262,
121
+ 882,
122
+ 292
123
+ ],
124
+ "page_idx": 0
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "Current WSVAD methods consist of one-stage Multiple Instance Learning (MIL) methods (Karim et al., 2024; Sultani et al., 2018) and pseudo-label self-training two-stage methods (Li et al., 2022; Zhang et al., 2023). One-stage MIL methods use ranking loss to prioritize higher scores in abnormal segments. Nevertheless, they often miss minor anomalies, limiting detection completeness. Two-stage approaches use MIL for pseudo labels first, then train the classifier in the second stage. However, pseudo label accuracy is unreliable, potentially causing misdetections. Historically, most WSVAD methods relied on single-modality data. Recently, studies (Peng et al., 2023; Wu et al., 2024c) have attempted to leverage multi-modality information to enhance performance. However, they often superficially fuse multi-modality data without fully exploiting its potential.",
129
+ "bbox": [
130
+ 507,
131
+ 293,
132
+ 884,
133
+ 582
134
+ ],
135
+ "page_idx": 0
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "Despite some progress, existing methods still face two major challenges: 1) Single Modality. Currently, most of both single-stage and two-stage methods (Lv et al., 2023; Zhang et al., 2023) focus on learning from video data, emphasizing conspicuous visual anomalies. However, this strategy often falls short in visually ambiguous scenarios where the video modality lacks the sufficient discriminative power. For example, in a dust-filled scene, video data might struggle to distinguish between an anomalous event, such as an explosion, and a normal occurrence like strong winds stirring up dust. In these instances, audio and text modalities can provide critical supplementary information. Therefore, how to effectively fuse multi-modality knowledge, including video, audio, and text, plays an important role in these visual ambiguities. This not only enhances detection robustness but also improves system performance in complex or dynamic environments. 2) Fusion Strategy. While a few studies (Wu et al., 2020, 2022b) have started to",
140
+ "bbox": [
141
+ 507,
142
+ 583,
143
+ 884,
144
+ 920
145
+ ],
146
+ "page_idx": 0
147
+ },
148
+ {
149
+ "type": "page_footnote",
150
+ "text": "* Both authors contributed equally to this research.",
151
+ "bbox": [
152
+ 139,
153
+ 892,
154
+ 447,
155
+ 906
156
+ ],
157
+ "page_idx": 0
158
+ },
159
+ {
160
+ "type": "page_footnote",
161
+ "text": "† Corresponding author.",
162
+ "bbox": [
163
+ 142,
164
+ 906,
165
+ 287,
166
+ 920
167
+ ],
168
+ "page_idx": 0
169
+ },
170
+ {
171
+ "type": "page_number",
172
+ "text": "31594",
173
+ "bbox": [
174
+ 473,
175
+ 927,
176
+ 524,
177
+ 940
178
+ ],
179
+ "page_idx": 0
180
+ },
181
+ {
182
+ "type": "footer",
183
+ "text": "Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 31594-31607 July 27 - August 1, 2025 ©2025 Association for Computational Linguistics",
184
+ "bbox": [
185
+ 82,
186
+ 945,
187
+ 914,
188
+ 972
189
+ ],
190
+ "page_idx": 0
191
+ },
192
+ {
193
+ "type": "text",
194
+ "text": "harness the power of multi-modality knowledge, they predominantly rely on independently learning feature representations for each modality, achieving multi-modality fusion through straightforward feature concatenation. However, this concatenation fusion strategy only accomplishes a surface-level integration of modalities at the feature level, fundamentally overlooking the potential correlations between modalities. In contrast, the core principle behind adaptive cross-modality knowledge learning is to allow the model to autonomously adjust the interdependencies and contributions of each modality. By dynamically adapting these relationships based on the complexity of specific scenes and anomalous events, this method provides a multidimensional representation of anomalies, thus facilitating the learning of high-level features. Therefore, this more nuanced integration of cross-modal knowledge is essential for advancing WSVAD.",
195
+ "bbox": [
196
+ 115,
197
+ 84,
198
+ 489,
199
+ 388
200
+ ],
201
+ "page_idx": 1
202
+ },
203
+ {
204
+ "type": "text",
205
+ "text": "In this study, we propose CMHKF to address these challenges. To address the first challenge, we integrate video, audio, and text to jointly learn feature representations. This enhances the differentiation between normal and anomalous segments. To address the second challenge, we propose the Cross-Modality Video-Text Knowledge Alignment (CVKA) and the Audio Modality Feature Adaptive Extraction (AFAE). CVKA leverages CLIP to capture visual-semantic similarity, dynamically aligning and adaptively aggregating relevant text features. AFAE maps the visual-semantic similarity obtained from CVKA to the temporal saliency of audio features. To address temporal misalignment, AFAE uses a Top-k window to bridge the fine-grained feature distribution differences between video and audio. Finally, we propose Multi-Modality Knowledge Adaptive Fusion (MKAF) by extending Joint Cross-Attention Model (Praveen et al., 2022). MKAF effectively captures intra-modality and cross-modality correlations while reducing inter-modality heterogeneity.",
206
+ "bbox": [
207
+ 115,
208
+ 391,
209
+ 489,
210
+ 743
211
+ ],
212
+ "page_idx": 1
213
+ },
214
+ {
215
+ "type": "text",
216
+ "text": "Overall, our contributions are threefold:",
217
+ "bbox": [
218
+ 132,
219
+ 745,
220
+ 438,
221
+ 759
222
+ ],
223
+ "page_idx": 1
224
+ },
225
+ {
226
+ "type": "list",
227
+ "sub_type": "text",
228
+ "list_items": [
229
+ "- We propose CMHKF to adaptively fuse cross-modality heterogeneous knowledge from video, audio, and text in WSVAD.",
230
+ "- We propose CVKA, AFAE, and MKAF for adaptive modality adjustment and fusion.",
231
+ "- Experiments on XD-Violence show our method outperforms others in coarse-grained and fine-grained WSVAD tasks."
232
+ ],
233
+ "bbox": [
234
+ 132,
235
+ 771,
236
+ 487,
237
+ 920
238
+ ],
239
+ "page_idx": 1
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "2 Related Work",
244
+ "text_level": 1,
245
+ "bbox": [
246
+ 509,
247
+ 83,
248
+ 665,
249
+ 98
250
+ ],
251
+ "page_idx": 1
252
+ },
253
+ {
254
+ "type": "text",
255
+ "text": "2.1 Weakly Supervised Video Anomaly Detection",
256
+ "text_level": 1,
257
+ "bbox": [
258
+ 509,
259
+ 109,
260
+ 831,
261
+ 140
262
+ ],
263
+ "page_idx": 1
264
+ },
265
+ {
266
+ "type": "text",
267
+ "text": "Weakly supervised video anomaly detection (Cao et al., 2023; Majhi et al., 2024; AlMarri et al., 2024) has become a prominent research focus. Most WSVAD methods use MIL(Sultani et al., 2018) to learn features from weakly labeled data for frame-level detection. The pioneering work (Sultani et al., 2018) proposed a deep MIL model with ranking loss. Subsequently, Zhou et al. (Zhou et al., 2023) presented an Uncertainty Regulated Dual Memory Units model to improving the representation learning of normal and anomalous data. Since the aforementioned methods are constrained to single-modality anomaly detection, recent studies have proposed multi-modality approaches (Yang et al., 2024; Peng et al., 2023) that outperform their single-modality counterparts. However, these approaches primarily rely on basic multi-modality feature fusion, overlooking latent interdependencies among modalities. To address these limitations, we propose an adaptive cross-modal knowledge learning approach that integrates video, audio, and text modalities.",
268
+ "bbox": [
269
+ 507,
270
+ 147,
271
+ 884,
272
+ 501
273
+ ],
274
+ "page_idx": 1
275
+ },
276
+ {
277
+ "type": "text",
278
+ "text": "2.2 Vision-Text Multi-Modality Models",
279
+ "text_level": 1,
280
+ "bbox": [
281
+ 509,
282
+ 513,
283
+ 833,
284
+ 529
285
+ ],
286
+ "page_idx": 1
287
+ },
288
+ {
289
+ "type": "text",
290
+ "text": "Vision-text multi-modality has become a key research area for tasks like pre-training (Li et al., 2021; Lei et al., 2021) and vision-text retrieval (Tian et al., 2024; Deng et al., 2023). One influential work is Contrastive Language-Image Pretraining (CLIP) (Radford et al., 2021), which uses two encoders to map images and text into a shared space for contrastive learning. Trained on hundreds of millions of image-text pairs, CLIP demonstrates remarkable zero-shot transfer capabilities. Recently, several studies (Wu et al., 2024c; Sun et al., 2024) explored CLIP's application in WSVAD. These works are categorized into two types. The first type (Joo et al., 2023; Sharif et al., 2023) uses CLIP's image encoder as a strong initialization for the video encoder. The second type (Zanella et al., 2024; Wu et al., 2024c) extends CLIP to video-label matching for anomaly detection. However, these studies only superficially exploit CLIP's embedded knowledge. In contrast, our research explores the relationship between visual and semantic features, adaptively fuses text information, and maps CLIP's image-text alignment capabilities to audio, deeply mining its temporal saliency regions.",
291
+ "bbox": [
292
+ 507,
293
+ 535,
294
+ 884,
295
+ 921
296
+ ],
297
+ "page_idx": 1
298
+ },
299
+ {
300
+ "type": "page_number",
301
+ "text": "31595",
302
+ "bbox": [
303
+ 475,
304
+ 927,
305
+ 524,
306
+ 940
307
+ ],
308
+ "page_idx": 1
309
+ },
310
+ {
311
+ "type": "image",
312
+ "img_path": "images/858c5b7b30d69baef6afba3527faa03c153f5ae0f3250fb550b9b3fc9bc73f44.jpg",
313
+ "image_caption": [
314
+ "Figure 1: The overall architecture of our proposed CMHKF."
315
+ ],
316
+ "image_footnote": [],
317
+ "bbox": [
318
+ 112,
319
+ 84,
320
+ 872,
321
+ 357
322
+ ],
323
+ "page_idx": 2
324
+ },
325
+ {
326
+ "type": "text",
327
+ "text": "3 CMHKF",
328
+ "text_level": 1,
329
+ "bbox": [
330
+ 112,
331
+ 407,
332
+ 226,
333
+ 422
334
+ ],
335
+ "page_idx": 2
336
+ },
337
+ {
338
+ "type": "text",
339
+ "text": "This section begins by defining the task of WSVAD. Following this, we describe the overall architecture of CMHKF. Finally, we provide a detailed explanation of each module and its implementation.",
340
+ "bbox": [
341
+ 112,
342
+ 434,
343
+ 487,
344
+ 499
345
+ ],
346
+ "page_idx": 2
347
+ },
348
+ {
349
+ "type": "text",
350
+ "text": "3.1 Problem Statement",
351
+ "text_level": 1,
352
+ "bbox": [
353
+ 112,
354
+ 511,
355
+ 312,
356
+ 525
357
+ ],
358
+ "page_idx": 2
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "Given a dataset of $M$ videos and audios, $X = \\{x_{i}\\}_{i=1}^{M}$ , $Z = \\{z_{i}\\}_{i=1}^{M}$ , and video-level labels $Y = \\{y_{i}\\}_{i=1}^{M}$ , where $y_{i} \\in \\{0,1\\}$ . If $y_{i} = 0$ , the video is normal, meaning all its frames are free of anomalous events. If $y_{i} = 1$ , the video is anomalous, containing at least one anomalous frame. During training, only video-level labels are employed to supervise the model, whereas during testing, the model predicts frame-level anomaly confidence for precise temporal localization.",
363
+ "bbox": [
364
+ 112,
365
+ 533,
366
+ 487,
367
+ 694
368
+ ],
369
+ "page_idx": 2
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "3.2 Overall Architecture",
374
+ "text_level": 1,
375
+ "bbox": [
376
+ 112,
377
+ 706,
378
+ 322,
379
+ 721
380
+ ],
381
+ "page_idx": 2
382
+ },
383
+ {
384
+ "type": "text",
385
+ "text": "Figure 1 illustrates the overall workflow of CMHKF. Our method encodes videos, learnable class prompt texts, and audio into feature embeddings using CLIP's image and text encoders, along with the VGGish network (Hershey et al., 2017). This yields video features $F_{v} \\in \\mathcal{R}^{N \\times D_{v}}$ , text features $F_{t} \\in \\mathcal{R}^{C \\times D_{t}}$ and audio features $F_{a} \\in \\mathcal{R}^{N \\times D_{a}}$ . $D_{v}, D_{t}$ , and $D_{a}$ represent the feature dimensions of video, text, and audio, while $N$ and $C$ represent the number of frames and class prompt texts, respectively. Given CLIP is pretrained on large-scale image-text pairs, it exhibits limitations",
386
+ "bbox": [
387
+ 112,
388
+ 728,
389
+ 489,
390
+ 921
391
+ ],
392
+ "page_idx": 2
393
+ },
394
+ {
395
+ "type": "text",
396
+ "text": "in effectively modeling temporal dependencies. Inspired by (Wu et al., 2024c), we introduce Local Transformer Encoder (Local TE) and Global Graph Convolutional Network (Global GCN) to obtain temporally dependent video features $\\tilde{F}_v \\in \\mathcal{R}^{N \\times D_v}$ . We propose the Cross-Modality Video-Text Knowledge Alignment (CVKA) to leverage the correlation between visual and textual modalities in the CLIP feature space. CVKA dynamically aligns and adaptively aggregates text features most semantically similar to the video, yielding text features $\\tilde{F}_t \\in \\mathcal{R}^{N \\times D_t}$ . Concurrently, we employ Bidirectional Long Short-Term Memory (BiLSTM) (Huang et al., 2015) and Audio Modality Feature Adaptive Extraction (AFAE) to capture temporal saliency in audio features, yielding the audio feature $\\tilde{F}_a \\in \\mathcal{R}^{N \\times D_a}$ . Subsequently, we fuse $\\tilde{F}_v$ , $\\tilde{F}_t$ , and $\\tilde{F}_a$ using Multi-Modality Knowledge Adaptive Fusion (MKAF), resulting in the fused feature $F_{fused} \\in \\mathcal{R}^{N \\times D_f}$ . Finally, $F_{fused}$ is processed by a Binary Classifier to generate frame-level anomaly confidence, enabling coarse-grained anomaly detection (i.e., classifying frames as either normal or anomalous). Additionally, by weighting the video features with frame-level anomaly confidence and fusing them with all category text features, we obtain the feature $\\tilde{F}_{vt}$ . Then, by calculating the similarity between $\\tilde{F}_v$ and $\\tilde{F}_{vt}$ , we further achieve fine-grained anomaly classification (i.e., determining whether a video frame is normal or belongs to a specific type of anomaly).",
397
+ "bbox": [
398
+ 507,
399
+ 407,
400
+ 885,
401
+ 908
402
+ ],
403
+ "page_idx": 2
404
+ },
405
+ {
406
+ "type": "page_number",
407
+ "text": "31596",
408
+ "bbox": [
409
+ 475,
410
+ 927,
411
+ 524,
412
+ 940
413
+ ],
414
+ "page_idx": 2
415
+ },
416
+ {
417
+ "type": "text",
418
+ "text": "3.3 Multi-Modality Heterogeneous Knowledge",
419
+ "text_level": 1,
420
+ "bbox": [
421
+ 112,
422
+ 84,
423
+ 403,
424
+ 116
425
+ ],
426
+ "page_idx": 3
427
+ },
428
+ {
429
+ "type": "text",
430
+ "text": "In WSVAD, multi-modality heterogeneous knowledge integrates complementary information from video, audio, and text, each providing distinct insights into anomalous events. Specifically, the video modality offers spatial and temporal context for anomaly detection. Anomalies manifest through dynamic object interactions and scene transitions. However, when visual information is sparse or ambiguous, the audio modality provides a crucial complementary perspective. Unlike video, audio conveys auditory signals correspond to the environment and deliver explicit cues for anomalous events. Furthermore, the text modality enhances semantic understanding by associating category labels with video segments. By providing clear definitions and features for each anomaly type, the text modality ensures that the detection process accurately captures the true nature of anomalous events. Thus, by integrating knowledge from these modalities, the model gains a more comprehensive understanding of anomalous events.",
431
+ "bbox": [
432
+ 112,
433
+ 123,
434
+ 489,
435
+ 461
436
+ ],
437
+ "page_idx": 3
438
+ },
439
+ {
440
+ "type": "text",
441
+ "text": "3.4 Cross-Modality Knowledge Fusion for WSVAD",
442
+ "text_level": 1,
443
+ "bbox": [
444
+ 112,
445
+ 476,
446
+ 460,
447
+ 507
448
+ ],
449
+ "page_idx": 3
450
+ },
451
+ {
452
+ "type": "text",
453
+ "text": "To effectively integrate multi-modality heterogeneous knowledge, we propose two key components: CVKA and AFAE. CVKA modulates text features based on the semantic alignment between video frames and text, thereby enhancing text-to-video relevance. AFAE identifies temporally salient regions in audio, focusing on the most anomalous intervals to extract relevant audio features. These modules refine the fusion of cross-modality knowledge in our CMHKF framework.",
454
+ "bbox": [
455
+ 112,
456
+ 516,
457
+ 489,
458
+ 677
459
+ ],
460
+ "page_idx": 3
461
+ },
462
+ {
463
+ "type": "text",
464
+ "text": "Cross-Modality Video-Text Knowledge Alignment. This section discusses the dynamic alignment and adaptive fusion text features based on the visual-textual semantic correlation, which enhances the distinction between normal and anomalous segments. CVKA is illustrated in Figure 2.",
465
+ "bbox": [
466
+ 112,
467
+ 678,
468
+ 489,
469
+ 775
470
+ ],
471
+ "page_idx": 3
472
+ },
473
+ {
474
+ "type": "text",
475
+ "text": "To obtain the text features that are most semantically relevant to the video features, we employ text features as queries to precisely capture the correlation between text and video frames. Specifically, we encode the video frames and class label texts using the pretrained CLIP model, generating video frame features $F_{v} = \\{v_{n}\\}_{n = 1}^{N}$ and text features $F_{t} = \\{t_{c}\\}_{c = 1}^{C}$ . We compute the cosine similarity between each text and frame feature to create a",
476
+ "bbox": [
477
+ 112,
478
+ 776,
479
+ 489,
480
+ 920
481
+ ],
482
+ "page_idx": 3
483
+ },
484
+ {
485
+ "type": "image",
486
+ "img_path": "images/94d67a12263aa03bee5f12d9dd12db73083e502eb7fe0e7b31eaa7b0769b37be.jpg",
487
+ "image_caption": [
488
+ "Figure 2: Illustration of Cross-Modality Video-Text Knowledge Alignment (CVKA). CVKA computes the visual-semantic similarity matrix between video features $F_{v}$ and text features $F_{t}$ . It then applies the Top-k algorithm to dynamically select $k$ texts and their corresponding visual-semantic similarities. Finally, it adaptively aggregates the selected text features based on their Top-k visual-semantic similarity."
489
+ ],
490
+ "image_footnote": [],
491
+ "bbox": [
492
+ 517,
493
+ 84,
494
+ 884,
495
+ 200
496
+ ],
497
+ "page_idx": 3
498
+ },
499
+ {
500
+ "type": "text",
501
+ "text": "visual-semantic similarity matrix $s_{ij}\\in \\mathcal{R}^{N\\times C}$ capturing fine-grained correlations. Mathematically, this process can be expressed as:",
502
+ "bbox": [
503
+ 507,
504
+ 351,
505
+ 884,
506
+ 401
507
+ ],
508
+ "page_idx": 3
509
+ },
510
+ {
511
+ "type": "equation",
512
+ "text": "\n$$\ns _ {i j} = \\frac {v _ {i} t _ {j} ^ {\\top}}{\\| v _ {i} \\| \\| t _ {j} \\|} \\tag {1}\n$$\n",
513
+ "text_format": "latex",
514
+ "bbox": [
515
+ 635,
516
+ 409,
517
+ 882,
518
+ 449
519
+ ],
520
+ "page_idx": 3
521
+ },
522
+ {
523
+ "type": "text",
524
+ "text": "where $v_{i}$ represents the feature of the $i$ -th frame and $t_{j}$ represents the text feature of the $j$ -th class.",
525
+ "bbox": [
526
+ 507,
527
+ 456,
528
+ 882,
529
+ 488
530
+ ],
531
+ "page_idx": 3
532
+ },
533
+ {
534
+ "type": "text",
535
+ "text": "Next, we aggregate the similarity matrix along the temporal dimension $N$ to obtain the similarity score for each class text, resulting in the corresponding video-level similarity vector $S_{j}\\in \\mathcal{R}^{C}$ which represents the global relationship between feature of the $j$ -th class and the video. Subsequently, we apply the Top-k algorithm to dynamically select the top $k$ category texts most relevant to the video semantics, forming an index set $\\mathcal{K}$ . Top-k visual-semantic similarity can be obtained based on $\\mathcal{K}$ . The formulas are as follows:",
536
+ "bbox": [
537
+ 507,
538
+ 488,
539
+ 882,
540
+ 663
541
+ ],
542
+ "page_idx": 3
543
+ },
544
+ {
545
+ "type": "equation",
546
+ "text": "\n$$\nS _ {j} = \\sum_ {i = 1} ^ {N} s _ {i j}, \\quad j \\in \\{1, 2, \\dots , C \\} \\tag {2}\n$$\n",
547
+ "text_format": "latex",
548
+ "bbox": [
549
+ 566,
550
+ 671,
551
+ 882,
552
+ 715
553
+ ],
554
+ "page_idx": 3
555
+ },
556
+ {
557
+ "type": "equation",
558
+ "text": "\n$$\n\\mathcal {K} = \\arg \\operatorname {t o p} _ {k} (S) = \\left\\{c _ {1}, c _ {2}, \\dots , c _ {k} \\right\\} \\tag {3}\n$$\n",
559
+ "text_format": "latex",
560
+ "bbox": [
561
+ 557,
562
+ 724,
563
+ 882,
564
+ 741
565
+ ],
566
+ "page_idx": 3
567
+ },
568
+ {
569
+ "type": "text",
570
+ "text": "Finally, we perform adaptive aggregation of the selected $k$ class texts based on the Top-k visual-semantic similarity to achieve video-text knowledge alignment:",
571
+ "bbox": [
572
+ 507,
573
+ 747,
574
+ 884,
575
+ 812
576
+ ],
577
+ "page_idx": 3
578
+ },
579
+ {
580
+ "type": "equation",
581
+ "text": "\n$$\nF _ {i} = \\frac {1}{k} \\sum_ {j \\in \\mathcal {K}} \\frac {\\exp \\left(s _ {i j} / \\tau\\right)}{\\sum_ {i = 1} ^ {N} \\exp \\left(s _ {i j} / \\tau\\right)} t _ {j} \\tag {4}\n$$\n",
582
+ "text_format": "latex",
583
+ "bbox": [
584
+ 569,
585
+ 822,
586
+ 882,
587
+ 862
588
+ ],
589
+ "page_idx": 3
590
+ },
591
+ {
592
+ "type": "equation",
593
+ "text": "\n$$\n\\tilde {F} _ {t} = [ F _ {1}; F _ {2}; \\ldots ; F _ {N} ] \\in \\mathcal {R} ^ {N \\times D _ {t}}\n$$\n",
594
+ "text_format": "latex",
595
+ "bbox": [
596
+ 569,
597
+ 865,
598
+ 820,
599
+ 884
600
+ ],
601
+ "page_idx": 3
602
+ },
603
+ {
604
+ "type": "text",
605
+ "text": "where $\\tau$ is a temperature parameter that controls the distribution of similarity scores.",
606
+ "bbox": [
607
+ 507,
608
+ 890,
609
+ 880,
610
+ 921
611
+ ],
612
+ "page_idx": 3
613
+ },
614
+ {
615
+ "type": "page_number",
616
+ "text": "31597",
617
+ "bbox": [
618
+ 475,
619
+ 927,
620
+ 524,
621
+ 940
622
+ ],
623
+ "page_idx": 3
624
+ },
625
+ {
626
+ "type": "text",
627
+ "text": "Audio Modality Feature Adaptive Extraction. In the CVKA module, we performed semantic alignment between video and text along the temporal dimension. Next, we leverage video-text semantic relevance to capture the temporal saliency of audio features, mitigating audio noise interference. AFAE is shown in Figure 3. Leveraging the robust image-text alignment capabilities within the CLIP feature space, we project the Top-k visual-semantic similarity from CVKA onto the audio's temporal saliency. The projection method follows:",
628
+ "bbox": [
629
+ 110,
630
+ 84,
631
+ 489,
632
+ 261
633
+ ],
634
+ "page_idx": 4
635
+ },
636
+ {
637
+ "type": "equation",
638
+ "text": "\n$$\nS _ {a} ^ {(n)} = \\frac {1}{k} \\sum_ {j \\in \\mathcal {K}} \\frac {\\exp \\left(s _ {n j} / \\tau\\right)}{\\sum_ {i = 1} ^ {N} \\exp \\left(s _ {i j} / \\tau\\right)}, n \\in \\{1, 2, \\dots , N \\} \\tag {5}\n$$\n",
639
+ "text_format": "latex",
640
+ "bbox": [
641
+ 112,
642
+ 275,
643
+ 489,
644
+ 328
645
+ ],
646
+ "page_idx": 4
647
+ },
648
+ {
649
+ "type": "text",
650
+ "text": "where $S_{a}^{(n)}$ represents the temporal saliency of the $n$ -th audio frame. However, Top-k visual-semantic similarity follows the video's temporal sequence. Fine-grained misalignment between video and audio may lead to loss of crucial information if only temporal saliency is used. Moreover, preserving the continuity of anomalous events is essential. To address these challenges, we propose a Top-k window mechanism to mitigate the fine-grained temporal discrepancies between video and audio, ensuring more accurate extraction and retention of key event information. Specifically, we select the top $k$ salient frames from the audio, forming the index set $K = \\{K_1, K_2, \\ldots, K_k\\}$ . $k$ is chosen as $\\lfloor T / 16 \\rfloor + 1$ . For each $a_j$ ( $j \\in K$ ), we define a temporal window of size $2w + 1$ around $a_j$ . This window encompasses $a_j$ and its $w$ preceding and succeeding frames, forming the local region $W_j = \\{a_j - w, \\ldots, a_j, \\ldots, a_j + w\\}$ . We then extend the temporal saliency of the central frame $a_j$ to the other frames within the window, forming a continuous and accurate temporal saliency region. Mathematically, these can be formulated as:",
651
+ "bbox": [
652
+ 112,
653
+ 329,
654
+ 489,
655
+ 700
656
+ ],
657
+ "page_idx": 4
658
+ },
659
+ {
660
+ "type": "equation",
661
+ "text": "\n$$\n\\widetilde {S} _ {a} ^ {(n)} = \\left\\{ \\begin{array}{l l} S _ {a} ^ {(j)} + S _ {a} ^ {(n)}, & \\text {i f} \\exists j \\in K \\text {a n d} n \\in R _ {j} \\\\ S _ {a} ^ {(n)}, & \\text {o t h e r w i s e} \\end{array} \\right. \\tag {6}\n$$\n",
662
+ "text_format": "latex",
663
+ "bbox": [
664
+ 119,
665
+ 728,
666
+ 487,
667
+ 783
668
+ ],
669
+ "page_idx": 4
670
+ },
671
+ {
672
+ "type": "text",
673
+ "text": "where $R_{j}\\in [\\max (1,a_{j} - w),\\min (a_{j} + w,N)]$ Finally, we aggregate the audio features using $\\widetilde{S}_a^{(n)}$ as follows:",
674
+ "bbox": [
675
+ 112,
676
+ 784,
677
+ 487,
678
+ 833
679
+ ],
680
+ "page_idx": 4
681
+ },
682
+ {
683
+ "type": "equation",
684
+ "text": "\n$$\n\\tilde {F} _ {a} = \\sum_ {n = 1} ^ {N} F _ {a} \\widetilde {S} _ {a} ^ {(n)} \\tag {7}\n$$\n",
685
+ "text_format": "latex",
686
+ "bbox": [
687
+ 233,
688
+ 834,
689
+ 487,
690
+ 876
691
+ ],
692
+ "page_idx": 4
693
+ },
694
+ {
695
+ "type": "text",
696
+ "text": "where $\\tilde{F}_a$ represents the audio features extracted by adaptively focusing on temporal saliency regions.",
697
+ "bbox": [
698
+ 112,
699
+ 888,
700
+ 487,
701
+ 921
702
+ ],
703
+ "page_idx": 4
704
+ },
705
+ {
706
+ "type": "image",
707
+ "img_path": "images/a22a5516deda6b53ea5abf6767717897d5d9ae1f4a385f9dd1d069db67833f73.jpg",
708
+ "image_caption": [
709
+ "Figure 3: Illustration of the Audio Modality Feature Adaptive Extraction (AFAE). The AFAE is introduced to process audio features. Initially, AFAE projects the Top-k visual-semantic similarity onto the temporal saliency of the audio. This is followed by the application of the Top-k windowing mechanism to mine temporal saliency regions. Finally, the temporal saliency regions are aggregated with the audio features to yield enhanced audio features."
710
+ ],
711
+ "image_footnote": [],
712
+ "bbox": [
713
+ 526,
714
+ 85,
715
+ 870,
716
+ 209
717
+ ],
718
+ "page_idx": 4
719
+ },
720
+ {
721
+ "type": "text",
722
+ "text": "Multi-Modality Knowledge Adaptive Fusion. After obtaining cross-modal knowledge from video, text, and audio, we need to effectively fuse them for WSVAD.",
723
+ "bbox": [
724
+ 507,
725
+ 374,
726
+ 884,
727
+ 436
728
+ ],
729
+ "page_idx": 4
730
+ },
731
+ {
732
+ "type": "text",
733
+ "text": "At the outset, we merge the video features $\\tilde{F}_v$ , text features $\\tilde{F}_t$ , and audio features $\\tilde{F}_a$ to construct the multi-modality joint representation $J \\in \\mathcal{R}^{N \\times D}$ . Subsequently, each modality feature $\\tilde{F}_v$ , $\\tilde{F}_t$ , and $\\tilde{F}_a$ undergoes individual processing with $J$ through a cross-attention mechanism, followed by a feedforward layer to derive the interacted modality representations $F_v^{\\mathrm{int}}$ , $F_t^{\\mathrm{int}}$ , and $F_a^{\\mathrm{int}}$ . These interacted features are concatenated and then added with $J$ , and collectively passed through a linear projection layer to yield the ultimate fused multi-modality representation $F_{\\mathrm{fused}} \\in \\mathcal{R}^{N \\times D_f}$ . This holistic methodology effectively amalgamates the distinct modality features to form a cohesive representation that encapsulates the diverse multi-modality information inherent in the dataset.",
734
+ "bbox": [
735
+ 507,
736
+ 437,
737
+ 884,
738
+ 695
739
+ ],
740
+ "page_idx": 4
741
+ },
742
+ {
743
+ "type": "text",
744
+ "text": "3.5 Objective Function",
745
+ "text_level": 1,
746
+ "bbox": [
747
+ 507,
748
+ 707,
749
+ 705,
750
+ 722
751
+ ],
752
+ "page_idx": 4
753
+ },
754
+ {
755
+ "type": "text",
756
+ "text": "For coarse-grained binary classification, we use a Binary Classifier to project $F_{\\text{fused}}$ into category space, yielding a frame-level anomaly score. Following (Wu et al., 2022b), we average the top $k$ anomaly scores for the video-level prediction $p_c$ . We then compute the binary cross entropy between $p_c$ and ground-truth for classification loss $\\mathcal{L}_{BCE}$ .",
757
+ "bbox": [
758
+ 507,
759
+ 728,
760
+ 884,
761
+ 841
762
+ ],
763
+ "page_idx": 4
764
+ },
765
+ {
766
+ "type": "text",
767
+ "text": "For fine-grained multi-class classification, we introduce the MIL-Align mechanism (Wu et al., 2024c). We compute the alignment map $A$ by evaluating the similarity between video frame features and all category text features. The top $k$ similar",
768
+ "bbox": [
769
+ 507,
770
+ 841,
771
+ 884,
772
+ 921
773
+ ],
774
+ "page_idx": 4
775
+ },
776
+ {
777
+ "type": "page_number",
778
+ "text": "31598",
779
+ "bbox": [
780
+ 475,
781
+ 927,
782
+ 524,
783
+ 940
784
+ ],
785
+ "page_idx": 4
786
+ },
787
+ {
788
+ "type": "text",
789
+ "text": "ity scores for each category are averaged, yielding the vector $M = \\{m_1,\\dots ,m_C\\}$ . We then perform multi-class prediction to ensure that the similarity between the video and the correct text surpasses that of the incorrect texts. First, the procedure for computing the multi-class prediction is as follows:",
790
+ "bbox": [
791
+ 112,
792
+ 84,
793
+ 489,
794
+ 181
795
+ ],
796
+ "page_idx": 5
797
+ },
798
+ {
799
+ "type": "equation",
800
+ "text": "\n$$\np _ {f} ^ {i} = \\frac {\\exp (m _ {i} / \\tau)}{\\sum_ {j = 1} ^ {C} \\exp (m _ {j} / \\tau)} \\tag {8}\n$$\n",
801
+ "text_format": "latex",
802
+ "bbox": [
803
+ 203,
804
+ 192,
805
+ 487,
806
+ 231
807
+ ],
808
+ "page_idx": 5
809
+ },
810
+ {
811
+ "type": "text",
812
+ "text": "Next, we compute the binary cross entropy between the video prediction $p_f^i$ and ground-truth to obtain the loss $\\mathcal{L}_{NCE}$ .",
813
+ "bbox": [
814
+ 112,
815
+ 241,
816
+ 487,
817
+ 288
818
+ ],
819
+ "page_idx": 5
820
+ },
821
+ {
822
+ "type": "text",
823
+ "text": "In addition, we introduce a contrastive loss $\\mathcal{L}_{NA}$ based on normal and abnormal categories to distinguish between normal and abnormal text features. We propose a contrastive loss $\\mathcal{L}_{AA}$ based on abnormal categories to differentiate between features of different abnormal classes. The two loss functions are defined as follows:",
824
+ "bbox": [
825
+ 112,
826
+ 290,
827
+ 489,
828
+ 401
829
+ ],
830
+ "page_idx": 5
831
+ },
832
+ {
833
+ "type": "equation",
834
+ "text": "\n$$\n\\mathcal {L} _ {N A} = \\frac {1}{C - 1} \\sum_ {i = 2} ^ {C} \\left(1 + \\frac {t _ {n} \\cdot t _ {a _ {i}}}{\\| t _ {n} \\| \\| t _ {a _ {i}} \\|}\\right) \\tag {9}\n$$\n",
835
+ "text_format": "latex",
836
+ "bbox": [
837
+ 157,
838
+ 428,
839
+ 487,
840
+ 470
841
+ ],
842
+ "page_idx": 5
843
+ },
844
+ {
845
+ "type": "equation",
846
+ "text": "\n$$\n\\mathcal {L} _ {A A} = \\frac {2}{(C - 1) (C - 2)} \\sum_ {i = 2} ^ {C - 1} \\sum_ {j = i + 1} ^ {C} \\left| \\frac {t _ {a _ {i}} \\cdot t _ {a _ {j}}}{\\| t _ {a _ {i}} \\| \\| t _ {a _ {j}} \\|} \\right| \\tag {10}\n$$\n",
847
+ "text_format": "latex",
848
+ "bbox": [
849
+ 119,
850
+ 498,
851
+ 485,
852
+ 555
853
+ ],
854
+ "page_idx": 5
855
+ },
856
+ {
857
+ "type": "text",
858
+ "text": "where $i = 1$ corresponds to the text feature $t_n$ of the normal category, and $t_{a_j}$ represents the text feature for the $j$ -th anomalous category.",
859
+ "bbox": [
860
+ 112,
861
+ 557,
862
+ 487,
863
+ 604
864
+ ],
865
+ "page_idx": 5
866
+ },
867
+ {
868
+ "type": "text",
869
+ "text": "Overall, objective function $\\mathcal{L}$ as follows:",
870
+ "bbox": [
871
+ 131,
872
+ 605,
873
+ 435,
874
+ 621
875
+ ],
876
+ "page_idx": 5
877
+ },
878
+ {
879
+ "type": "equation",
880
+ "text": "\n$$\n\\mathcal {L} = \\mathcal {L} _ {B C E} + \\mathcal {L} _ {N C E} + \\lambda_ {1} \\mathcal {L} _ {N A} + \\lambda_ {2} \\mathcal {L} _ {A A} \\tag {11}\n$$\n",
881
+ "text_format": "latex",
882
+ "bbox": [
883
+ 129,
884
+ 634,
885
+ 487,
886
+ 651
887
+ ],
888
+ "page_idx": 5
889
+ },
890
+ {
891
+ "type": "text",
892
+ "text": "4 Experiments and Results",
893
+ "text_level": 1,
894
+ "bbox": [
895
+ 112,
896
+ 665,
897
+ 366,
898
+ 681
899
+ ],
900
+ "page_idx": 5
901
+ },
902
+ {
903
+ "type": "text",
904
+ "text": "4.1 Dataset and Evaluation Metric",
905
+ "text_level": 1,
906
+ "bbox": [
907
+ 112,
908
+ 690,
909
+ 401,
910
+ 705
911
+ ],
912
+ "page_idx": 5
913
+ },
914
+ {
915
+ "type": "text",
916
+ "text": "XD-Violence (Wu et al., 2020) is widely used in WSVAD and is the only dataset that includes both visual and auditory modalities. It consists of 4,757 untrimmed videos (totaling 217 hours) from real-world domains, including films, sports, online platforms, and surveillance, featuring six types of violent incidents. The dataset poses challenges due to its rich artistic content, such as perspective shifts and dynamic camera movements. Previous approaches used datasets (Sultani et al., 2018; Liu et al., 2018) as benchmarks, but these unimodal datasets are inadequate for evaluating cross-modal interactions.",
917
+ "bbox": [
918
+ 112,
919
+ 711,
920
+ 489,
921
+ 919
922
+ ],
923
+ "page_idx": 5
924
+ },
925
+ {
926
+ "type": "text",
927
+ "text": "Table 1: Coarse-grained comparisons on XD-Violence. Best result is **bolded** and second best result is **underlined**. * indicates re-implemented by fusing audio and visual features as inputs.",
928
+ "bbox": [
929
+ 507,
930
+ 82,
931
+ 882,
932
+ 139
933
+ ],
934
+ "page_idx": 5
935
+ },
936
+ {
937
+ "type": "table",
938
+ "img_path": "images/07ef7ae27b969906c7df166b17f556ae8000918e567c017cf6836186f0801d7c.jpg",
939
+ "table_caption": [],
940
+ "table_footnote": [],
941
+ "table_body": "<table><tr><td>Method</td><td>Publication</td><td>Modality</td><td>AP (%)</td></tr><tr><td colspan=\"4\">Unsupervised learning based methods</td></tr><tr><td>SVM baseline</td><td>NIPS&#x27;99</td><td>Video</td><td>50.78</td></tr><tr><td>Hasan et al. (Hasan et al., 2016)</td><td>CVPR&#x27;16</td><td>Video</td><td>30.77</td></tr><tr><td>GODS(Wang and Cherian, 2019)</td><td>ICCV&#x27;19</td><td>Video</td><td>61.56</td></tr><tr><td>CLAP (Al-Lahham et al., 2024)</td><td>CVPR&#x27;24</td><td>Video</td><td>77.65</td></tr><tr><td colspan=\"4\">Weakly supervised learning based methods</td></tr><tr><td>Sultani et al. (Sultani et al., 2018)</td><td>CVPR&#x27;18</td><td>Video</td><td>73.20</td></tr><tr><td>HL-Net(Wu et al., 2020)</td><td>ECCV&#x27;20</td><td>Video + Audio</td><td>78.64</td></tr><tr><td>RTFM (Tian et al., 2021)</td><td>ICCV&#x27;21</td><td>Video</td><td>77.81</td></tr><tr><td>RTFM* (Tian et al., 2021)</td><td>ICCV&#x27;21</td><td>Video + Audio</td><td>78.10</td></tr><tr><td>Li et al. (Li et al., 2022)</td><td>AAAI&#x27;22</td><td>Video</td><td>78.28</td></tr><tr><td>S3R (Wu et al., 2022a)</td><td>ECCV&#x27;22</td><td>Video</td><td>80.26</td></tr><tr><td>MACIL-SD (Yu et al., 2022)</td><td>ACMMM&#x27;22</td><td>Video + Audio</td><td>83.40</td></tr><tr><td>TEVAD (Chen et al., 2023a)</td><td>CVPR&#x27;23</td><td>Video + Text</td><td>79.80</td></tr><tr><td>Mgfn (Chen et al., 2023b)</td><td>AAAI&#x27;23</td><td>Video</td><td>80.11</td></tr><tr><td>Cho et al. (Cho et al., 2023)</td><td>CVPR&#x27;23</td><td>Video</td><td>81.30</td></tr><tr><td>UR-DMU (Zhou et al., 2023)</td><td>AAAI&#x27;23</td><td>Video</td><td>81.66</td></tr><tr><td>UR-DMU* (Zhou et al., 2023)</td><td>AAAI&#x27;23</td><td>Video + Audio</td><td>81.77</td></tr><tr><td>Zhang et al. (Zhang et al., 2023)</td><td>CVPR&#x27;23</td><td>Video + Audio</td><td>81.43</td></tr><tr><td>REWARD (Karim et al., 2024)</td><td>WACV&#x27;24</td><td>Video</td><td>77.71</td></tr><tr><td>Wu et al. (Wu et al., 2024a)</td><td>CVPR&#x27;24</td><td>Video + Text</td><td>76.03</td></tr><tr><td>TPWNG (Yang et al., 2024)</td><td>CVPR&#x27;24</td><td>Video + Text</td><td>83.68</td></tr><tr><td>VadCLIP (Wu et al., 2024c)</td><td>AAAI&#x27;24</td><td>Video + Text</td><td>84.51</td></tr><tr><td>Ours(light)</td><td>—</td><td>Video + Audio + Text</td><td>84.65</td></tr><tr><td>Ours(full)</td><td>—</td><td>Video + Audio + Text</td><td>86.57</td></tr></table>",
942
+ "bbox": [
943
+ 512,
944
+ 149,
945
+ 878,
946
+ 390
947
+ ],
948
+ "page_idx": 5
949
+ },
950
+ {
951
+ "type": "table",
952
+ "img_path": "images/a09decd44b908201602eabb8bf87e5115a5c0da911d9fc3e8390e68221ddbddc.jpg",
953
+ "table_caption": [
954
+ "Table 2: Fine-grained comparisons on XD-Violence. Best result is bolded and second best result is underlined."
955
+ ],
956
+ "table_footnote": [],
957
+ "table_body": "<table><tr><td rowspan=\"2\">Method</td><td colspan=\"6\">mAP@IoU (%)</td></tr><tr><td>0.1</td><td>0.2</td><td>0.3</td><td>0.4</td><td>0.5</td><td>AVG</td></tr><tr><td>Random Baseline</td><td>0.37</td><td>0.27</td><td>0.06</td><td>0.03</td><td>0.01</td><td>0.15</td></tr><tr><td>Sultani et al. (Sultani et al., 2018)</td><td>20.08</td><td>13.72</td><td>8.44</td><td>5.06</td><td>2.81</td><td>10.02</td></tr><tr><td>3C-Net (Narayanan et al., 2019)</td><td>23.77</td><td>17.78</td><td>11.90</td><td>8.28</td><td>5.87</td><td>13.52</td></tr><tr><td>W-TALC (Paul et al., 2018)</td><td>26.27</td><td>18.87</td><td>13.83</td><td>9.50</td><td>6.55</td><td>15.00</td></tr><tr><td>Wu et al. (Wu et al., 2022b)</td><td>35.35</td><td>28.02</td><td>20.94</td><td>15.01</td><td>10.33</td><td>21.93</td></tr><tr><td>VadCLIP (Wu et al., 2024c)</td><td>37.03</td><td>30.84</td><td>23.38</td><td>17.90</td><td>14.31</td><td>24.70</td></tr><tr><td>Ours(light)</td><td>37.74</td><td>29.98</td><td>24.09</td><td>18.67</td><td>13.84</td><td>24.86</td></tr><tr><td>Ours(full)</td><td>38.31</td><td>32.12</td><td>25.68</td><td>20.93</td><td>16.47</td><td>26.70</td></tr></table>",
958
+ "bbox": [
959
+ 514,
960
+ 458,
961
+ 878,
962
+ 552
963
+ ],
964
+ "page_idx": 5
965
+ },
966
+ {
967
+ "type": "text",
968
+ "text": "Evaluation Metrics. We follow standardized protocols for fair comparisons. For coarse-grained WSVAD, we use frame-level Average Precision (AP) as the evaluation metric (Chen et al., 2023b; Tan et al., 2024). For fine-grained WSVAD, we use mean Average Precision (mAP) under different Intersection over Union (IoU) thresholds, following video action detection protocols (Wu et al., 2023).",
969
+ "bbox": [
970
+ 507,
971
+ 580,
972
+ 882,
973
+ 708
974
+ ],
975
+ "page_idx": 5
976
+ },
977
+ {
978
+ "type": "text",
979
+ "text": "4.2 Implementation Details",
980
+ "text_level": 1,
981
+ "bbox": [
982
+ 507,
983
+ 722,
984
+ 741,
985
+ 737
986
+ ],
987
+ "page_idx": 5
988
+ },
989
+ {
990
+ "type": "text",
991
+ "text": "In our network architecture, the image and text encoders use pre-trained CLIP (ViT-B/16)(Radford et al., 2021), and VGGish for audio features(Hershey et al., 2017). Feature dimension $D$ is 512. Hyperparameters include $k = 2$ (Eq. 3), $w = 2$ (Eq. 6), $\\tau = 0.07$ (Eq. 8), $\\lambda_{1} = 1 \\times 10^{-3}$ and $\\lambda_{2} = 1 \\times 10^{-4}$ (Eq. 11). Video sequences are capped at 256 frames during training. The model was trained using PyTorch on an NVIDIA RTX 3090 GPU, with the AdamW optimizer for 10 epochs and learning rate of $1 \\times 10^{-5}$ .",
992
+ "bbox": [
993
+ 505,
994
+ 744,
995
+ 882,
996
+ 921
997
+ ],
998
+ "page_idx": 5
999
+ },
1000
+ {
1001
+ "type": "page_number",
1002
+ "text": "31599",
1003
+ "bbox": [
1004
+ 475,
1005
+ 927,
1006
+ 524,
1007
+ 940
1008
+ ],
1009
+ "page_idx": 5
1010
+ },
1011
+ {
1012
+ "type": "text",
1013
+ "text": "4.3 Comparison with State-of-the-Art Methods",
1014
+ "text_level": 1,
1015
+ "bbox": [
1016
+ 114,
1017
+ 84,
1018
+ 426,
1019
+ 115
1020
+ ],
1021
+ "page_idx": 6
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "Our method addresses both coarse-grained and fine-grained WSVAD tasks. We present its performance and compare it with state-of-the-art methods on both WSVAD tasks.",
1026
+ "bbox": [
1027
+ 112,
1028
+ 135,
1029
+ 487,
1030
+ 198
1031
+ ],
1032
+ "page_idx": 6
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "Coarse-grained WSVAD Results. We compare our method with state-of-the-art methods and present AP results on XD-Violence (Table 1). Our method achieves an AP of $86.57\\%$ , surpassing the best unsupervised method (Al-Lahham et al., 2024) by $8.92\\%$ and previous single-modality methods (Zhou et al., 2023) by $4.91\\%$ . Furthermore, compared to recent multi-modality weakly supervised methods, our approach outperforms the best-performing visual-audio method (Yu et al., 2022) by $3.17\\%$ , and exceeds the best video-text method (Wu et al., 2024c) by $2.06\\%$ . To further validate the effectiveness of our CVKA and AFAE, we performed light fusion of audio, video, and text features while retaining the structure of other modules. Without CVKA, we input all text features to demonstrate the performance of simple multimodality integration, resulting in a lower AP of $84.65\\%$ . Results indicate that superior performance arises not only from the richer combination of audio, video, and text modalities but also from CVKA and AFAE facilitating modality-aware interactions for more accurate detection. In conclusion, our method outperforms both identical input modality and other multimodal approaches, validating its effectiveness.",
1037
+ "bbox": [
1038
+ 112,
1039
+ 206,
1040
+ 489,
1041
+ 623
1042
+ ],
1043
+ "page_idx": 6
1044
+ },
1045
+ {
1046
+ "type": "text",
1047
+ "text": "Fine-grained WSVAD Results. Table 2 presents a comparison between CMHKF and other methods on the fine-grained task. As the data indicate, fine-grained WSVAD is evidently more challenging than coarse-grained WSVAD, as it requires considering both multi-class classification accuracy and the continuity of detected segments. From Table 2, it can be observed that our method significantly outperforms previous works on the XD-Violence dataset, achieving an AVG mAP of $26.70\\%$ , which is $2.00\\%$ higher than the best performance of previous works $(24.70\\%)$ . Similarly, we performed light fusion of the audio, video, and text features, resulting in a lower AVG mAP of $24.86\\%$ . This further demonstrates the effectiveness of our method in adaptive cross-modal knowledge learning, optimizing the utilization of multi-modality data for WSVAD tasks.",
1048
+ "bbox": [
1049
+ 112,
1050
+ 631,
1051
+ 489,
1052
+ 920
1053
+ ],
1054
+ "page_idx": 6
1055
+ },
1056
+ {
1057
+ "type": "table",
1058
+ "img_path": "images/a6aa67fef1059600d5720ae61b30868a8242d3ce00ea054edc722798b9b74ea7.jpg",
1059
+ "table_caption": [
1060
+ "Table 3: Effectiveness of the CVKA. Best result is bolded and second best result is underlined."
1061
+ ],
1062
+ "table_footnote": [],
1063
+ "table_body": "<table><tr><td rowspan=\"2\">Method</td><td colspan=\"8\">k</td></tr><tr><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td></tr><tr><td>w/o CVKA@AP(%)</td><td>83.65</td><td>—</td><td>—</td><td>—</td><td>—</td><td>—</td><td>—</td><td>—</td></tr><tr><td>w/ CVKA@AP(%)</td><td>—</td><td>85.26</td><td>86.57</td><td>86.24</td><td>85.86</td><td>85.72</td><td>85.49</td><td>85.41</td></tr><tr><td>w/o CVKA@AVG mAP(%)</td><td>22.49</td><td>—</td><td>—</td><td>—</td><td>—</td><td>—</td><td>—</td><td>—</td></tr><tr><td>w/ CVKA@AVG mAP(%)</td><td>—</td><td>25.48</td><td>26.70</td><td>26.13</td><td>25.74</td><td>25.45</td><td>25.37</td><td>25.19</td></tr></table>",
1064
+ "bbox": [
1065
+ 512,
1066
+ 121,
1067
+ 880,
1068
+ 173
1069
+ ],
1070
+ "page_idx": 6
1071
+ },
1072
+ {
1073
+ "type": "table",
1074
+ "img_path": "images/aebe255d7a7412835b3feb1d094ab0636b5d9b56cb7398e3d148cf7165d120ad.jpg",
1075
+ "table_caption": [
1076
+ "Table 4: Effectiveness of the AFAE. Best result is bolded and second best result is underlined."
1077
+ ],
1078
+ "table_footnote": [],
1079
+ "table_body": "<table><tr><td>Method</td><td>w/o Top-k window</td><td>w/ Top-k window</td><td>AP (%)</td><td>AVG mAP (%)</td></tr><tr><td>w/o AFAE</td><td>✓</td><td></td><td>85.06</td><td>25.15</td></tr><tr><td>w/ AFAE</td><td>✓</td><td></td><td>85.81</td><td>26.03</td></tr><tr><td>w/ AFAE</td><td></td><td>✓</td><td>86.57</td><td>26.70</td></tr></table>",
1080
+ "bbox": [
1081
+ 512,
1082
+ 229,
1083
+ 880,
1084
+ 269
1085
+ ],
1086
+ "page_idx": 6
1087
+ },
1088
+ {
1089
+ "type": "text",
1090
+ "text": "4.4 Ablation Study",
1091
+ "text_level": 1,
1092
+ "bbox": [
1093
+ 507,
1094
+ 298,
1095
+ 673,
1096
+ 313
1097
+ ],
1098
+ "page_idx": 6
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "Next, we conduct a series of ablation studies to investigate the contributions of each component.",
1103
+ "bbox": [
1104
+ 507,
1105
+ 322,
1106
+ 880,
1107
+ 354
1108
+ ],
1109
+ "page_idx": 6
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "Effectiveness of the CVKA. We evaluated CVKA's impact on performance (Table 3). Initially, without CVKA (i.e., $k = 0$ ), text features were not integrated. The model achieved only $83.65\\%$ AP and $22.49\\%$ AVG mAP. After integrating CVKA and fusing all text categories ( $k = 7$ ), model achieved $85.41\\%$ AP and $25.19\\%$ AVG mAP. This shows that semantically clear textual features complement WSVAD. Furthermore, experiments with $k$ values ( $k = 0, 1, 2, 3, 4, 5, 6, 7$ ) represented fusion of the top $k$ semantically relevant text categories. When $k = 2$ , the model achieved the highest AP of $86.57\\%$ and AVG mAP of $26.70\\%$ . This confirms that selectively processing specific text features in CVKA reduces interference from irrelevant texts, aiding the model in capturing the intrinsic characteristics of anomalous events.",
1114
+ "bbox": [
1115
+ 507,
1116
+ 356,
1117
+ 884,
1118
+ 627
1119
+ ],
1120
+ "page_idx": 6
1121
+ },
1122
+ {
1123
+ "type": "text",
1124
+ "text": "Effectiveness of AFAE. To demonstrate AFAE's effectiveness on audio features, we conducted an ablation study (Table 4). Results show that without AFAE, baseline method achieved $85.06\\%$ AP and $25.15\\%$ mAP. As described in Section 2.1, AFAE uses a Top-k window mechanism to mine audio temporal saliency regions. When AFAE is introduced with only visual-semantic similarity mapping for weighting audio features, excluding the Top-k window mechanism, yields $85.81\\%$ AP and $26.03\\%$ AVG mAP. Complete AFAE delivers the best performance. This demonstrates the effectiveness of focusing on temporal saliency regions for audio features, generating more compact and beneficial features. Additionally, we tested different window sizes in the Top-k mechanism (Table 5). Window sizes $W$ were set to 1, 3, 5, 7, 9, and 11. Optimal performance was achieved at $W = 5$ .",
1125
+ "bbox": [
1126
+ 507,
1127
+ 631,
1128
+ 884,
1129
+ 921
1130
+ ],
1131
+ "page_idx": 6
1132
+ },
1133
+ {
1134
+ "type": "page_number",
1135
+ "text": "31600",
1136
+ "bbox": [
1137
+ 475,
1138
+ 927,
1139
+ 524,
1140
+ 940
1141
+ ],
1142
+ "page_idx": 6
1143
+ },
1144
+ {
1145
+ "type": "image",
1146
+ "img_path": "images/1758d42641bb555973e032a7498b09249a0f9428979419079c872f3d84313d84.jpg",
1147
+ "image_caption": [],
1148
+ "image_footnote": [],
1149
+ "bbox": [
1150
+ 115,
1151
+ 79,
1152
+ 305,
1153
+ 167
1154
+ ],
1155
+ "page_idx": 7
1156
+ },
1157
+ {
1158
+ "type": "image",
1159
+ "img_path": "images/e3bc2bebdf3fd6d21195d1b81a0f63567956121bf223385f1578d1977465f1f6.jpg",
1160
+ "image_caption": [],
1161
+ "image_footnote": [],
1162
+ "bbox": [
1163
+ 310,
1164
+ 80,
1165
+ 497,
1166
+ 167
1167
+ ],
1168
+ "page_idx": 7
1169
+ },
1170
+ {
1171
+ "type": "image",
1172
+ "img_path": "images/7f354ded94889f9acf8a0aa08f784221d890dc39234ed89f612ffce637b3efd5.jpg",
1173
+ "image_caption": [],
1174
+ "image_footnote": [],
1175
+ "bbox": [
1176
+ 500,
1177
+ 80,
1178
+ 690,
1179
+ 168
1180
+ ],
1181
+ "page_idx": 7
1182
+ },
1183
+ {
1184
+ "type": "image",
1185
+ "img_path": "images/f7c158a42513cc3c421beddcdf670aa66cfd4d58a7316dec1ac423df6ec69e32.jpg",
1186
+ "image_caption": [],
1187
+ "image_footnote": [],
1188
+ "bbox": [
1189
+ 692,
1190
+ 80,
1191
+ 882,
1192
+ 168
1193
+ ],
1194
+ "page_idx": 7
1195
+ },
1196
+ {
1197
+ "type": "image",
1198
+ "img_path": "images/77b9829d9d78b3f7f8a5a5d220c7c60e87786779ae490f23bc7185777284bbb1.jpg",
1199
+ "image_caption": [
1200
+ "(a) Abuse",
1201
+ "(e) Riot",
1202
+ "Figure 4: The qualitative results of our method on the test videos of the XD-Violence dataset. The red line indicates anomaly score distribution. Blue shaded regions mark anomalous event segments, with anomaly scores on the Y-axis and video frame numbers on the X-axis. Frames with blue borders highlight anomalies, while gray-bordered frames indicate normal segments."
1203
+ ],
1204
+ "image_footnote": [],
1205
+ "bbox": [
1206
+ 115,
1207
+ 189,
1208
+ 305,
1209
+ 273
1210
+ ],
1211
+ "page_idx": 7
1212
+ },
1213
+ {
1214
+ "type": "image",
1215
+ "img_path": "images/ee5f9343655c45cf288a0897da60770a02fcaa6df392d82fe2d1f7b1c16d3c51.jpg",
1216
+ "image_caption": [
1217
+ "(b) Car accident",
1218
+ "(f) Shooting"
1219
+ ],
1220
+ "image_footnote": [],
1221
+ "bbox": [
1222
+ 310,
1223
+ 187,
1224
+ 497,
1225
+ 273
1226
+ ],
1227
+ "page_idx": 7
1228
+ },
1229
+ {
1230
+ "type": "image",
1231
+ "img_path": "images/c3584bcf967a4d1682e44c3b677a60c05edf424fa2f9a16114858673e157a094.jpg",
1232
+ "image_caption": [
1233
+ "(c) Explosion",
1234
+ "(g) Explosion"
1235
+ ],
1236
+ "image_footnote": [],
1237
+ "bbox": [
1238
+ 500,
1239
+ 187,
1240
+ 689,
1241
+ 273
1242
+ ],
1243
+ "page_idx": 7
1244
+ },
1245
+ {
1246
+ "type": "image",
1247
+ "img_path": "images/f07ff815cab1e85b6879cd0a0404ca5c4d951fadeb96543d53cca2fd396964e0.jpg",
1248
+ "image_caption": [
1249
+ "(d) Fighting",
1250
+ "(h) Normal"
1251
+ ],
1252
+ "image_footnote": [],
1253
+ "bbox": [
1254
+ 690,
1255
+ 187,
1256
+ 880,
1257
+ 273
1258
+ ],
1259
+ "page_idx": 7
1260
+ },
1261
+ {
1262
+ "type": "table",
1263
+ "img_path": "images/ed5c5fbff7a36b814fb4ee29f2c25b5d65da6d04b77102a56eaf3bf78f78d0bc.jpg",
1264
+ "table_caption": [
1265
+ "Table 5: The AP and mAP results of CMHKF under different window sizes $W$ ."
1266
+ ],
1267
+ "table_footnote": [],
1268
+ "table_body": "<table><tr><td rowspan=\"2\">Method</td><td colspan=\"6\">W</td></tr><tr><td>1</td><td>3</td><td>5</td><td>7</td><td>9</td><td>11</td></tr><tr><td>AP(%)</td><td>85.97</td><td>86.22</td><td>86.57</td><td>86.23</td><td>86.11</td><td>85.73</td></tr><tr><td>AVG mAP(%)</td><td>25.67</td><td>26.41</td><td>26.70</td><td>26.03</td><td>25.87</td><td>25.78</td></tr></table>",
1269
+ "bbox": [
1270
+ 119,
1271
+ 423,
1272
+ 482,
1273
+ 474
1274
+ ],
1275
+ "page_idx": 7
1276
+ },
1277
+ {
1278
+ "type": "table",
1279
+ "img_path": "images/9dc542bc167ff89c679d7ef245ebd96a9a1a7f9fb13a643b4365f2911a9cde96.jpg",
1280
+ "table_caption": [
1281
+ "Table 6: Effectiveness of the Multi-Modality. Best result is bolded and second best result is underlined."
1282
+ ],
1283
+ "table_footnote": [],
1284
+ "table_body": "<table><tr><td>Index</td><td>Video</td><td>Audio</td><td>Text</td><td>AP (%)</td><td>AVG mAP (%)</td></tr><tr><td>1</td><td>✓</td><td></td><td></td><td>81.59</td><td>21.13</td></tr><tr><td>2</td><td>✓</td><td>✓</td><td></td><td>83.65</td><td>22.49</td></tr><tr><td>3</td><td>✓</td><td></td><td>✓</td><td>84.81</td><td>24.32</td></tr><tr><td>4</td><td>✓</td><td>✓</td><td>✓</td><td>86.57</td><td>26.70</td></tr></table>",
1285
+ "bbox": [
1286
+ 119,
1287
+ 533,
1288
+ 482,
1289
+ 600
1290
+ ],
1291
+ "page_idx": 7
1292
+ },
1293
+ {
1294
+ "type": "text",
1295
+ "text": "Effectiveness of the Multi-Modality. Most video anomaly detection studies have traditionally focused on single modalities; only recently have researchers begun exploring dual-modality approaches, such as video-audio or video-text. In contrast, our approach integrates video, audio, and text. We tested four modality combinations: video-only, video-audio, video-text, and video-audio-text, as shown in Table 6. The absence of a modality can disable the corresponding processing module. Our experiments show that multi-modal combinations, particularly video-audio-text, outperform single-modal methods, improving AP and AVG mAP by $4.98\\%$ and $5.57\\%$ , respectively, compared to video alone, and by $1.76\\%$ and $2.38\\%$ compared to the best bimodal setup (video-text). These findings validate the efficacy of cross-modal knowledge integration in enhancing video anomaly detection.",
1296
+ "bbox": [
1297
+ 112,
1298
+ 631,
1299
+ 489,
1300
+ 921
1301
+ ],
1302
+ "page_idx": 7
1303
+ },
1304
+ {
1305
+ "type": "table",
1306
+ "img_path": "images/08205e86b11bbda9845f793a554a8ad3603736b08c3955d9592c2bc4bbd4ac93.jpg",
1307
+ "table_caption": [
1308
+ "Table 7: Evaluation on Abnormal Videos Only. * indicates the method was re-implemented for evaluating performance exclusively on anomalous videos."
1309
+ ],
1310
+ "table_footnote": [],
1311
+ "table_body": "<table><tr><td>Method</td><td>AP (%)</td><td>Ano-AP (%)</td><td>AVG mAP (%)</td><td>Ano-AVG mAP (%)</td></tr><tr><td>VadCLIP *</td><td>84.49</td><td>84.89</td><td>24.04</td><td>17.40</td></tr><tr><td>Ours</td><td>86.57</td><td>86.69</td><td>26.70</td><td>21.62</td></tr></table>",
1312
+ "bbox": [
1313
+ 512,
1314
+ 437,
1315
+ 878,
1316
+ 470
1317
+ ],
1318
+ "page_idx": 7
1319
+ },
1320
+ {
1321
+ "type": "text",
1322
+ "text": "Evaluation on Abnormal Videos Only. Previous methods evaluated overall performance using both normal and abnormal videos during testing. However, evaluating performance solely on abnormal videos is a crucial metric for assessing anomaly detection capabilities. Thus, we excluded normal videos from testing (see Table 7). Results show that this exclusion improves coarse-grained AP. We attribute this improvement to the more diverse and random distribution of multi-modal features (e.g., video and audio) in normal videos, which introduces cross-modal inconsistencies and increases uncertainty in the model's decision-making. In contrast, abnormal videos contain more consistent and salient anomaly cues. For example, explosions show visual flashes and loud audio, offering aligned signals. Such consistency facilitates anomaly detection. However, fine-grained AVG mAP declines. We believe that, although the consistency between modalities enables the model to excel in distinguishing normal and anomalous events, different types of anomalous events (e.g., car accidents and explosions) are often correlated and share certain similarities, posing a challenge in accurately identifying distinct anomalous events.",
1323
+ "bbox": [
1324
+ 507,
1325
+ 519,
1326
+ 884,
1327
+ 921
1328
+ ],
1329
+ "page_idx": 7
1330
+ },
1331
+ {
1332
+ "type": "page_number",
1333
+ "text": "31601",
1334
+ "bbox": [
1335
+ 475,
1336
+ 927,
1337
+ 522,
1338
+ 940
1339
+ ],
1340
+ "page_idx": 7
1341
+ },
1342
+ {
1343
+ "type": "image",
1344
+ "img_path": "images/00fbe6a5ce73a38de67f303f7c14f0072ee746e168b5c816edca5dd71667359b.jpg",
1345
+ "image_caption": [
1346
+ "(a) Pretrained CLIP Features"
1347
+ ],
1348
+ "image_footnote": [],
1349
+ "bbox": [
1350
+ 181,
1351
+ 86,
1352
+ 413,
1353
+ 225
1354
+ ],
1355
+ "page_idx": 8
1356
+ },
1357
+ {
1358
+ "type": "image",
1359
+ "img_path": "images/8cbfceebc716c13a4c5642db4408fbf8b19d9377c969b8af8c19951cb7cefc75.jpg",
1360
+ "image_caption": [
1361
+ "(b) CMHKF Features"
1362
+ ],
1363
+ "image_footnote": [],
1364
+ "bbox": [
1365
+ 509,
1366
+ 86,
1367
+ 868,
1368
+ 236
1369
+ ],
1370
+ "page_idx": 8
1371
+ },
1372
+ {
1373
+ "type": "image",
1374
+ "img_path": "images/1b16170bf141ab8d16105a6261be1397e2de20b5963e1060db2f9e65c9743600.jpg",
1375
+ "image_caption": [
1376
+ "Figure 5: The representations learned by (a) the original CLIP-based visual features and (b) the proposed CMHKF method are visualized using t-SNE on the XD-Violence dataset."
1377
+ ],
1378
+ "image_footnote": [],
1379
+ "bbox": [
1380
+ 122,
1381
+ 269,
1382
+ 872,
1383
+ 288
1384
+ ],
1385
+ "page_idx": 8
1386
+ },
1387
+ {
1388
+ "type": "text",
1389
+ "text": "4.5 Qualitative Results",
1390
+ "text_level": 1,
1391
+ "bbox": [
1392
+ 112,
1393
+ 357,
1394
+ 309,
1395
+ 372
1396
+ ],
1397
+ "page_idx": 8
1398
+ },
1399
+ {
1400
+ "type": "text",
1401
+ "text": "To fully evaluate our proposed CMHKF, we also conduct extensive qualitative experiments.",
1402
+ "bbox": [
1403
+ 112,
1404
+ 384,
1405
+ 485,
1406
+ 414
1407
+ ],
1408
+ "page_idx": 8
1409
+ },
1410
+ {
1411
+ "type": "text",
1412
+ "text": "Coarse-grained Qualitative Visualization. Figure 4 shows CMHKF's predicted anomaly scores on the XD-Violence dataset, demonstrating its effectiveness. In Figures 4a, 4e, and 4g, our method accurately localizes anomalous intervals and predicts precise scores for prolonged abnormal regions. Figures 4c, 4d, and 4f further demonstrate its capability to detect and score discontinuous anomalies. Notably, in the darker environment of Figure 4f, the method detects a shooting event, highlighting audio and text contributions. Figure 4b illustrates detection of anomalies spanning entire regions. Moreover, Figure 4h shows the method's capacity to minimize false positives in challenging normal videos. High anomaly sensitivity and low normal scores confirm the method's robustness.",
1413
+ "bbox": [
1414
+ 112,
1415
+ 419,
1416
+ 487,
1417
+ 675
1418
+ ],
1419
+ "page_idx": 8
1420
+ },
1421
+ {
1422
+ "type": "text",
1423
+ "text": "Embedding features. We used t-SNE (Van der Maaten and Hinton, 2008) to visualize the raw CLIP features and the representations learned by our CMHKF model. As shown in Figure 5, the learned representations from our model exhibit a more distinguishable and separable feature distribution than the raw input features extracted by the CLIP model. In the feature space generated by our model, normal and anomalous features are clearly separated, with a distinct boundary between them. Additionally, different types of anomalies are distinguishable, indicating that the CMHKF model excels in both coarse-grained detection of normal versus anomalous events and fine-grained differentiation between specific anomalous event types.",
1424
+ "bbox": [
1425
+ 112,
1426
+ 680,
1427
+ 489,
1428
+ 921
1429
+ ],
1430
+ "page_idx": 8
1431
+ },
1432
+ {
1433
+ "type": "text",
1434
+ "text": "5 Conclusions",
1435
+ "text_level": 1,
1436
+ "bbox": [
1437
+ 509,
1438
+ 356,
1439
+ 648,
1440
+ 370
1441
+ ],
1442
+ "page_idx": 8
1443
+ },
1444
+ {
1445
+ "type": "text",
1446
+ "text": "In this work, we propose a novel framework named CMHKF, aimed at effectively integrating cross-modality heterogeneous knowledge from video, audio, and text. To further enable adaptive cross-modality knowledge learning, we developed two key modules: CVKA and AFAE. Specifically, CVKA dynamically aligns and aggregates semantically relevant text features. In parallel, AFAE is engineered to mine temporally salient regions of audio features, focusing on capturing key characteristics within the audio. We conducted extensive evaluations on XD-Violence, the only large-scale audio-visual dataset, and the experimental results demonstrate its effectiveness. In the future, we plan to construct a new audio-visual dataset to further validate and benchmark the effectiveness of multi-modality approaches in this domain.",
1447
+ "bbox": [
1448
+ 507,
1449
+ 382,
1450
+ 884,
1451
+ 656
1452
+ ],
1453
+ "page_idx": 8
1454
+ },
1455
+ {
1456
+ "type": "text",
1457
+ "text": "6 Limitations",
1458
+ "text_level": 1,
1459
+ "bbox": [
1460
+ 507,
1461
+ 669,
1462
+ 643,
1463
+ 684
1464
+ ],
1465
+ "page_idx": 8
1466
+ },
1467
+ {
1468
+ "type": "text",
1469
+ "text": "While the CMHKF framework achieves significant results, there are still some limitations. Firstly, the evaluation of the model is currently limited to the XD-Violence dataset, which is the only available multimodal dataset for audio-visual violence detection. Future work will focus on constructing new multimodal datasets to more comprehensively validate and assess the performance of the method. Secondly, due to the limitations of weakly supervised learning, the text modality relies on learnable class labels. Future research will explore the use of large language models to generate richer textual descriptions for video data to enhance the expressive power of the text modality.",
1470
+ "bbox": [
1471
+ 507,
1472
+ 696,
1473
+ 884,
1474
+ 921
1475
+ ],
1476
+ "page_idx": 8
1477
+ },
1478
+ {
1479
+ "type": "page_number",
1480
+ "text": "31602",
1481
+ "bbox": [
1482
+ 475,
1483
+ 927,
1484
+ 524,
1485
+ 940
1486
+ ],
1487
+ "page_idx": 8
1488
+ },
1489
+ {
1490
+ "type": "text",
1491
+ "text": "7 Ethics Statement",
1492
+ "text_level": 1,
1493
+ "bbox": [
1494
+ 114,
1495
+ 84,
1496
+ 295,
1497
+ 98
1498
+ ],
1499
+ "page_idx": 9
1500
+ },
1501
+ {
1502
+ "type": "text",
1503
+ "text": "The data used in this paper are sourced from open-access repositories, and do not pose any privacy concerns. We are confident that our research adheres to the ethical standards set forth by ACL.",
1504
+ "bbox": [
1505
+ 112,
1506
+ 110,
1507
+ 489,
1508
+ 174
1509
+ ],
1510
+ "page_idx": 9
1511
+ },
1512
+ {
1513
+ "type": "text",
1514
+ "text": "References",
1515
+ "text_level": 1,
1516
+ "bbox": [
1517
+ 114,
1518
+ 200,
1519
+ 213,
1520
+ 216
1521
+ ],
1522
+ "page_idx": 9
1523
+ },
1524
+ {
1525
+ "type": "list",
1526
+ "sub_type": "ref_text",
1527
+ "list_items": [
1528
+ "Anas Al-Lahham, Muhammad Zaigham Zaheer, Nurbek Tastan, and Karthik Nandakumar. 2024. Collaborative learning of anomalies with privacy (clap) for unsupervised video anomaly detection: A new baseline. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12416-12425.",
1529
+ "Salem AlMarri, Muhammad Zaigham Zaheer, and Karthik Nandakumar. 2024. A multi-head approach with shuffled segments for weakly-supervised video anomaly detection. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 132-142.",
1530
+ "Congqi Cao, Xin Zhang, Shizhou Zhang, Peng Wang, and Yanning Zhang. 2023. Weakly supervised video anomaly detection based on cross-batch clustering guidance. In 2023 IEEE International Conference on Multimedia and Expo (ICME), pages 2723-2728. IEEE.",
1531
+ "Weiling Chen, Keng Teck Ma, Zi Jian Yew, Minhoe Hur, and David Aik-Aun Khoo. 2023a. Tevad: Improved video anomaly detection with captions. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5549-5559.",
1532
+ "Yingxian Chen, Zhengzhe Liu, Baoheng Zhang, Wilton Fok, Xiaojuan Qi, and Yik-Chung Wu. 2023b. Mgfn: Magnitude-contrastive glance-and-focus network for weakly-supervised video anomaly detection. In Proceedings of the AAAI conference on artificial intelligence, volume 37, pages 387-395.",
1533
+ "MyeongAh Cho, Minjung Kim, Sangwon Hwang, Chaewon Park, Kyungjae Lee, and Sangyoun Lee. 2023. Look around for anomalies: Weakly-supervised anomaly detection via context-motion relational learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 12137-12146.",
1534
+ "Chaorui Deng, Qi Chen, Pengda Qin, Da Chen, and Qi Wu. 2023. Prompt switch: Efficient clip adaptation for text-video retrieval. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 15648-15658.",
1535
+ "Jia-Chang Feng, Fa-Ting Hong, and Wei-Shi Zheng. 2021. Mist: Multiple instance self-training framework for video anomaly detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 14009-14018."
1536
+ ],
1537
+ "bbox": [
1538
+ 115,
1539
+ 225,
1540
+ 489,
1541
+ 921
1542
+ ],
1543
+ "page_idx": 9
1544
+ },
1545
+ {
1546
+ "type": "list",
1547
+ "sub_type": "ref_text",
1548
+ "list_items": [
1549
+ "Mahmudul Hasan, Jonghyun Choi, Jan Neumann, Amit K Roy-Chowdhury, and Larry S Davis. 2016. Learning temporal regularity in video sequences. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 733-742.",
1550
+ "Shawn Hershey, Sourish Chaudhuri, Daniel PW Ellis, Jort F Gemmeke, Aren Jansen, R Channing Moore, Manoj Plakal, Devin Platt, Rif A Saurous, Bryan Seybold, et al. 2017. CNN architectures for large-scale audio classification. In 2017 ieee international conference on acoustics, speech and signal processing (icassp), pages 131-135. IEEE.",
1551
+ "Zhiheng Huang, Wei Xu, and Kai Yu. 2015. Bidirectional lstm-crf models for sequence tagging. arXiv preprint arXiv:1508.01991.",
1552
+ "Hyekang Kevin Joo, Khoa Vo, Kashu Yamazaki, and Ngan Le. 2023. Clip-tsa: Clip-assisted temporal self-attention for weakly-supervised video anomaly detection. In 2023 IEEE International Conference on Image Processing (ICIP), pages 3230-3234. IEEE.",
1553
+ "Hamza Karim, Keval Doshi, and Yasin Yilmaz. 2024. Real-time weakly supervised video anomaly detection. In Proceedings of the IEEE/CVF winter conference on applications of computer vision, pages 6848-6856.",
1554
+ "Jie Lei, Linjie Li, Luowei Zhou, Zhe Gan, Tamara L Berg, Mohit Bansal, and Jingjing Liu. 2021. Less is more: Clipbert for video-and-language learning via sparse sampling. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 7331-7341.",
1555
+ "Junnan Li, Ramprasaath Selvaraju, Akhilesh Gotmare, Shafiq Joty, Caiming Xiong, and Steven Chu Hong Hoi. 2021. Align before fuse: Vision and language representation learning with momentum distillation. Advances in neural information processing systems, 34:9694-9705.",
1556
+ "Shuo Li, Fang Liu, and Licheng Jiao. 2022. Self-training multi-sequence learning with transformer for weakly supervised video anomaly detection. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pages 1395-1403.",
1557
+ "Wen Liu, Weixin Luo, Dongze Lian, and Shenghua Gao. 2018. Future frame prediction for anomaly detection—a new baseline. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6536-6545.",
1558
+ "Hui Lv, Zhongqi Yue, Qianru Sun, Bin Luo, Zhen Cui, and Hanwang Zhang. 2023. Unbiased multiple instance learning for weakly supervised video anomaly detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 8022-8031.",
1559
+ "Snehashis Majhi, Rui Dai, Quan Kong, Lorenzo Garattoni, Gianpiero Francesca, and François Brémond."
1560
+ ],
1561
+ "bbox": [
1562
+ 510,
1563
+ 85,
1564
+ 884,
1565
+ 921
1566
+ ],
1567
+ "page_idx": 9
1568
+ },
1569
+ {
1570
+ "type": "page_number",
1571
+ "text": "31603",
1572
+ "bbox": [
1573
+ 475,
1574
+ 927,
1575
+ 524,
1576
+ 940
1577
+ ],
1578
+ "page_idx": 9
1579
+ },
1580
+ {
1581
+ "type": "list",
1582
+ "sub_type": "ref_text",
1583
+ "list_items": [
1584
+ "2024. Oe-ctst: Outlier-embedded cross temporal scale transformer for weakly-supervised video anomaly detection. In Proceedings of the IEEE/CVF winter conference on applications of computer vision, pages 8574-8583.",
1585
+ "Sanath Narayan, Hisham Cholakkal, Fahad Shahbaz Khan, and Ling Shao. 2019. 3c-net: Category count and center loss for weakly-supervised action localization. In Proceedings of the IEEE/CVF international conference on computer vision, pages 8679-8687.",
1586
+ "Sujoy Paul, Sourya Roy, and Amit K Roy-Chowdhury. 2018. W-talc: Weakly-supervised temporal activity localization and classification. In Proceedings of the European conference on computer vision (ECCV), pages 563-579.",
1587
+ "Xiaogang Peng, Hao Wen, Yikai Luo, Xiao Zhou, Keyang Yu, Ping Yang, and Zizhao Wu. 2023. Learning weakly supervised audio-visual violence detection in hyperbolic space. arXiv preprint arXiv:2305.18797.",
1588
+ "R Gnana Praveen, Wheidima Carneiro de Melo, Nasib Ullah, Haseeb Aslam, Osama Zeeshan, Theo Denorme, Marco Pedersoli, Alessandro L Koerich, Simon Bacon, Patrick Cardinal, et al. 2022. A joint cross-attention model for audio-visual fusion in dimensional emotion recognition. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 2486-2495.",
1589
+ "Yujiang Pu, Xiaoyu Wu, Lulu Yang, and Shengjin Wang. 2024. Learning prompt-enhanced context features for weakly-supervised video anomaly detection. IEEE Transactions on Image Processing.",
1590
+ "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.",
1591
+ "Md Haidar Sharif, Lei Jiao, and Christian W Omlin. 2023. Cnn-vit supported weakly-supervised video segment level anomaly detection. Sensors, 23(18):7734.",
1592
+ "Waqas Sultani, Chen Chen, and Mubarak Shah. 2018. Real-world anomaly detection in surveillance videos. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6479-6488.",
1593
+ "Shengyang Sun, Jiashen Hua, Junyi Feng, Dongxu Wei, Baisheng Lai, and Xiaojin Gong. 2024. Tdsd: Text-driven scene-decoupled weakly supervised video anomaly detection. In Proceedings of the 32nd ACM International Conference on Multimedia, pages 5055-5064.",
1594
+ "Weijun Tan, Qi Yao, and Jingfeng Liu. 2024. Overlooked video classification in weakly supervised video anomaly detection. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 202-210."
1595
+ ],
1596
+ "bbox": [
1597
+ 115,
1598
+ 85,
1599
+ 487,
1600
+ 919
1601
+ ],
1602
+ "page_idx": 10
1603
+ },
1604
+ {
1605
+ "type": "list",
1606
+ "sub_type": "ref_text",
1607
+ "list_items": [
1608
+ "Kaibin Tian, Ruixiang Zhao, Zijie Xin, Bangxiang Lan, and Xirong Li. 2024. Holistic features are almost sufficient for text-to-video retrieval. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 17138-17147.",
1609
+ "Yu Tian, Guansong Pang, Yuanhong Chen, Rajvinder Singh, Johan W Verjans, and Gustavo Carneiro. 2021. Weakly-supervised video anomaly detection with robust temporal feature magnitude learning. In Proceedings of the IEEE/CVF international conference on computer vision, pages 4975-4986.",
1610
+ "Laurens Van der Maaten and Geoffrey Hinton. 2008. Visualizing data using t-sne. Journal of machine learning research, 9(11).",
1611
+ "Jue Wang and Anoop Cherian. 2019. Gods: Generalized one-class discriminative subspaces for anomaly detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 8201-8211.",
1612
+ "Jhih-Ciang Wu, He-Yen Hsieh, Ding-Jie Chen, Chiou-Shann Fuh, and Tyng-Luh Liu. 2022a. Self-supervised sparse representation for video anomaly detection. In European Conference on Computer Vision, pages 729-745. Springer.",
1613
+ "Peng Wu, Jing Liu, Yujia Shi, Yujia Sun, Fangtao Shao, Zhaoyang Wu, and Zhiwei Yang. 2020. Not only look, but also listen: Learning multimodal violence detection under weak supervision. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XXX 16, pages 322-339. Springer.",
1614
+ "Peng Wu, Xiaotao Liu, and Jing Liu. 2022b. Weakly supervised audio-visual violence detection. IEEE Transactions on Multimedia, 25:1674-1685.",
1615
+ "Peng Wu, Xuerong Zhou, Guansong Pang, Yujia Sun, Jing Liu, Peng Wang, and Yanning Zhang. 2024a. Open-vocabulary video anomaly detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 18297-18307.",
1616
+ "Peng Wu, Xuerong Zhou, Guansong Pang, Zhiwei Yang, Qingsen Yan, Peng Wang, and Yanning Zhang. 2024b. Weakly supervised video anomaly detection and localization with spatio-temporal prompts. In Proceedings of the 32nd ACM International Conference on Multimedia, pages 9301-9310.",
1617
+ "Peng Wu, Xuerong Zhou, Guansong Pang, Lingru Zhou, Qingsen Yan, Peng Wang, and Yanning Zhang. 2024c. Vadclip: Adapting vision-language models for weakly supervised video anomaly detection. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pages 6074-6082.",
1618
+ "Wenhao Wu, Xiaohan Wang, Haipeng Luo, Jingdong Wang, Yi Yang, and Wanli Ouyang. 2023. Bidirectional cross-modal knowledge exploration for video recognition with pre-trained vision-language models. In Proceedings of the IEEE/CVF conference"
1619
+ ],
1620
+ "bbox": [
1621
+ 510,
1622
+ 85,
1623
+ 880,
1624
+ 919
1625
+ ],
1626
+ "page_idx": 10
1627
+ },
1628
+ {
1629
+ "type": "page_number",
1630
+ "text": "31604",
1631
+ "bbox": [
1632
+ 475,
1633
+ 928,
1634
+ 524,
1635
+ 940
1636
+ ],
1637
+ "page_idx": 10
1638
+ },
1639
+ {
1640
+ "type": "list",
1641
+ "sub_type": "ref_text",
1642
+ "list_items": [
1643
+ "on computer vision and pattern recognition, pages 6620-6630.",
1644
+ "Zhiwei Yang, Jing Liu, and Peng Wu. 2024. Text prompt with normality guidance for weakly supervised video anomaly detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 18899-18908.",
1645
+ "Jiashuo Yu, Jinyu Liu, Ying Cheng, Rui Feng, and Yuejie Zhang. 2022. Modality-aware contrastive instance learning with self-distillation for weakly-supervised audio-visual violence detection. In Proceedings of the 30th ACM international conference on multimedia, pages 6278–6287.",
1646
+ "Luca Zanella, Benedetta Liberatori, Willi Menapace, Fabio Poiesi, Yiming Wang, and Elisa Ricci. 2024. Delving into clip latent space for video anomaly recognition. Computer Vision and Image Understanding, 249:104163.",
1647
+ "Chen Zhang, Guorong Li, Yuankai Qi, Shuhui Wang, Laiyun Qing, Qingming Huang, and Ming-Hsuan Yang. 2023. Exploiting completeness and uncertainty of pseudo labels for weakly supervised video anomaly detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 16271-16280.",
1648
+ "Jia-Xing Zhong, Nannan Li, Weijie Kong, Shan Liu, Thomas H Li, and Ge Li. 2019. Graph convolutional label noise cleaner: Train a plug-and-play action classifier for anomaly detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 1237-1246.",
1649
+ "Hang Zhou, Junqing Yu, and Wei Yang. 2023. Dual memory units with uncertainty regulation for weakly supervised video anomaly detection. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pages 3769-3777."
1650
+ ],
1651
+ "bbox": [
1652
+ 115,
1653
+ 86,
1654
+ 487,
1655
+ 618
1656
+ ],
1657
+ "page_idx": 11
1658
+ },
1659
+ {
1660
+ "type": "page_number",
1661
+ "text": "31605",
1662
+ "bbox": [
1663
+ 475,
1664
+ 928,
1665
+ 524,
1666
+ 940
1667
+ ],
1668
+ "page_idx": 11
1669
+ },
1670
+ {
1671
+ "type": "text",
1672
+ "text": "A Appendix",
1673
+ "text_level": 1,
1674
+ "bbox": [
1675
+ 114,
1676
+ 84,
1677
+ 238,
1678
+ 99
1679
+ ],
1680
+ "page_idx": 12
1681
+ },
1682
+ {
1683
+ "type": "text",
1684
+ "text": "A.1 Added Dataset and Result",
1685
+ "text_level": 1,
1686
+ "bbox": [
1687
+ 114,
1688
+ 110,
1689
+ 369,
1690
+ 124
1691
+ ],
1692
+ "page_idx": 12
1693
+ },
1694
+ {
1695
+ "type": "text",
1696
+ "text": "In this section, we evaluate our model on the UCF-Crime dataset, performing both coarse-grained and fine-grained WSVAD experiments, despite the lack of audio information, to demonstrate its effectiveness.",
1697
+ "bbox": [
1698
+ 112,
1699
+ 131,
1700
+ 487,
1701
+ 209
1702
+ ],
1703
+ "page_idx": 12
1704
+ },
1705
+ {
1706
+ "type": "text",
1707
+ "text": "UCF-Crime is a widely used, large-scale video surveillance anomaly detection dataset, spanning 128 hours of real-world footage. It comprises 1,900 untrimmed videos across 13 anomaly categories—such as explosions, arrests, and road accidents—providing diverse scenario coverage. The dataset is split into 800 normal and 810 anomalous videos for training, while 140 normal and 150 anomalous videos are used for testing.",
1708
+ "bbox": [
1709
+ 112,
1710
+ 212,
1711
+ 487,
1712
+ 356
1713
+ ],
1714
+ "page_idx": 12
1715
+ },
1716
+ {
1717
+ "type": "text",
1718
+ "text": "Implementation Details. The image and text encoders are based on the pre-trained CLIP model (ViT-B/16) (Radford et al., 2021), with a feature dimension of $D = 512$ . We set the following key hyperparameters: the Top-k selection parameter $k = 4$ in Eq. 3; temperature $\\tau = 0.07$ in Eq. 8; loss-balancing weights $\\lambda_1 = 1 \\times 10^{-3}$ and $\\lambda_2 = 1 \\times 10^{-4}$ in Eq. 11. We trained the model in PyTorch on a single NVIDIA RTX 3090 GPU, employing the AdamW optimizer for 20 epochs with a batch size of 32 and an initial learning rate of $2 \\times 10^{-5}$ .",
1719
+ "bbox": [
1720
+ 115,
1721
+ 357,
1722
+ 487,
1723
+ 548
1724
+ ],
1725
+ "page_idx": 12
1726
+ },
1727
+ {
1728
+ "type": "text",
1729
+ "text": "Coarse-grained WSVAD Results. We compare our method with state-of-the-art methods, presenting the AUC results on the UCF-Crime dataset in Table 8. Given that the UCF-Crime dataset lacks audio data, we omit audio-related modules in our framework and adapt the MKAF module to facilitate the fusion of video and text modalities. Despite operating with an incomplete model, our method achieves competitive performance, attaining an AUC score of $88.24\\%$ . This outperforms the best-performing video-text dual-modal method, STPrompt (Wu et al., 2024b), and surpasses the strongest single-modal approach, URDMU (Zhou et al., 2023), by $1.27\\%$ in AUC. The superior performance of our method underscores the effectiveness of the proposed architecture, particularly the CVKA and MKAF modules. These components demonstrate a robust ability to learn cross-modality heterogeneous knowledge between video and text, establishing our method as highly effective in coarse-grained anomaly detection, even under conditions with incomplete modality integration.",
1730
+ "bbox": [
1731
+ 115,
1732
+ 551,
1733
+ 489,
1734
+ 919
1735
+ ],
1736
+ "page_idx": 12
1737
+ },
1738
+ {
1739
+ "type": "table",
1740
+ "img_path": "images/4d1393aa56d4ae4b78f182aec07985bcd56022b91ed4b031edbe37a5d70f7756.jpg",
1741
+ "table_caption": [
1742
+ "Table 8: Coarse-grained comparisons on UCF-Crime. Best result is bolded and second best result is underlined."
1743
+ ],
1744
+ "table_footnote": [],
1745
+ "table_body": "<table><tr><td>Method</td><td>Publication</td><td>Modality</td><td>AUC (%)</td></tr><tr><td colspan=\"4\">Unsupervised learning based methods</td></tr><tr><td>SVM baseline</td><td>NIPS&#x27;99</td><td>Video</td><td>50.10</td></tr><tr><td>Conv-AE (Hasan et al., 2016)</td><td>CVPR&#x27;16</td><td>Video</td><td>50.60</td></tr><tr><td>CLAP (Al-Lahham et al., 2024)</td><td>CVPR&#x27;24</td><td>Video</td><td>78.02</td></tr><tr><td colspan=\"4\">Weakly supervised learning based methods</td></tr><tr><td>Sultani et al. (Sultani et al., 2018)</td><td>CVPR&#x27;18</td><td>Video</td><td>75.41</td></tr><tr><td>GCN (Zhong et al., 2019)</td><td>CVPR&#x27;19</td><td>Video</td><td>82.12</td></tr><tr><td>HL-Net(Wu et al., 2020)</td><td>ECCV&#x27;20</td><td>Video</td><td>82.44</td></tr><tr><td>MIST (Feng et al., 2021)</td><td>CVPR&#x27;21</td><td>Video</td><td>82.30</td></tr><tr><td>RTFM (Tian et al., 2021)</td><td>ICCV&#x27;21</td><td>Video</td><td>84.30</td></tr><tr><td>MSL (Li et al., 2022)</td><td>AAAI&#x27;22</td><td>Video</td><td>85.30</td></tr><tr><td>S3R (Wu et al., 2022a)</td><td>ECCV&#x27;22</td><td>Video</td><td>85.99</td></tr><tr><td>Cho et al. (Cho et al., 2023)</td><td>CVPR&#x27;23</td><td>Video</td><td>86.10</td></tr><tr><td>Zhang et al. (Zhang et al., 2023)</td><td>CVPR&#x27;23</td><td>Video</td><td>86.22</td></tr><tr><td>UMIL (Lv et al., 2023)</td><td>CVPR&#x27;23</td><td>Video</td><td>86.95</td></tr><tr><td>UR-DMU (Zhou et al., 2023)</td><td>AAAI&#x27;23</td><td>Video</td><td>86.97</td></tr><tr><td>Pu et al. (Pu et al., 2024)</td><td>TIP&#x27;24</td><td>Video + Text</td><td>86.76</td></tr><tr><td>TPWNG (Yang et al., 2024)</td><td>CVPR&#x27;24</td><td>Video + Text</td><td>87.79</td></tr><tr><td>VadCLIP (Wu et al., 2024c)</td><td>AAAI&#x27;24</td><td>Video + Text</td><td>88.02</td></tr><tr><td>STPrompt (Wu et al., 2024b)</td><td>ACMMM&#x27;24</td><td>Video + Text</td><td>88.08</td></tr><tr><td>Ours</td><td>—</td><td>Video + Text</td><td>88.24</td></tr></table>",
1746
+ "bbox": [
1747
+ 512,
1748
+ 135,
1749
+ 878,
1750
+ 357
1751
+ ],
1752
+ "page_idx": 12
1753
+ },
1754
+ {
1755
+ "type": "table",
1756
+ "img_path": "images/b24c03dc304f0cfb1606825cba662d267049c40cdafe23675ef6ec18b01bb9d0.jpg",
1757
+ "table_caption": [
1758
+ "Table 9: Fine-grained comparisons on UCF-Crime. Best result is bolded and second best result is underlined."
1759
+ ],
1760
+ "table_footnote": [],
1761
+ "table_body": "<table><tr><td rowspan=\"2\">Method</td><td colspan=\"6\">mAP@IoU (%)</td></tr><tr><td>0.1</td><td>0.2</td><td>0.3</td><td>0.4</td><td>0.5</td><td>AVG</td></tr><tr><td>Random Baseline</td><td>0.21</td><td>0.14</td><td>0.04</td><td>0.02</td><td>0.01</td><td>0.08</td></tr><tr><td>Sultani et al. (Sultani et al., 2018)</td><td>5.73</td><td>4.41</td><td>2.69</td><td>1.93</td><td>1.44</td><td>3.24</td></tr><tr><td>Wu et al. (Wu et al., 2022b)</td><td>10.27</td><td>7.01</td><td>6.25</td><td>3.42</td><td>3.29</td><td>6.05</td></tr><tr><td>VadCLIP (Wu et al., 2024c)</td><td>11.72</td><td>7.83</td><td>6.40</td><td>4.53</td><td>2.93</td><td>6.68</td></tr><tr><td>Ours</td><td>15.49</td><td>11.99</td><td>8.95</td><td>6.40</td><td>4.88</td><td>9.54</td></tr></table>",
1762
+ "bbox": [
1763
+ 512,
1764
+ 413,
1765
+ 878,
1766
+ 483
1767
+ ],
1768
+ "page_idx": 12
1769
+ },
1770
+ {
1771
+ "type": "text",
1772
+ "text": "Fine-grained WSVAD Results. Table 9 presents a comparison of CMHKF with other methods for the fine-grained task. Despite the absence of audio data and corresponding modules, our method achieves a notable AVG mAP score of $9.54\\%$ , surpassing the previously best-performing method (Wu et al., 2024c) by $2.86\\%$ . This result highlights the effectiveness of the CVKA module in semantically aligning video and text features. By incorporating text features that provide clearer and more precise definitions of anomalous events, our model effectively captures the intrinsic attributes of various anomaly types, thus enabling more accurate differentiation between distinct anomaly categories.",
1773
+ "bbox": [
1774
+ 507,
1775
+ 511,
1776
+ 882,
1777
+ 752
1778
+ ],
1779
+ "page_idx": 12
1780
+ },
1781
+ {
1782
+ "type": "text",
1783
+ "text": "A.2 Added Ablation Study",
1784
+ "text_level": 1,
1785
+ "bbox": [
1786
+ 507,
1787
+ 768,
1788
+ 736,
1789
+ 784
1790
+ ],
1791
+ "page_idx": 12
1792
+ },
1793
+ {
1794
+ "type": "text",
1795
+ "text": "Effectiveness of Loss. we conducted an ablation study on the contrastive losses $\\mathcal{L}_{\\mathrm{NA}}$ and $\\mathcal{L}_{\\mathrm{AA}}$ , as shown in Table 10. The results demonstrate that $\\mathcal{L}_{\\mathrm{NA}}$ effectively separates normal from anomalous textual features, while $\\mathcal{L}_{\\mathrm{AA}}$ distinguishes different anomaly types. These losses improve the separation of text embeddings, enabling the model to better identify normal events and anomalies.",
1796
+ "bbox": [
1797
+ 507,
1798
+ 791,
1799
+ 882,
1800
+ 920
1801
+ ],
1802
+ "page_idx": 12
1803
+ },
1804
+ {
1805
+ "type": "page_number",
1806
+ "text": "31606",
1807
+ "bbox": [
1808
+ 475,
1809
+ 927,
1810
+ 524,
1811
+ 940
1812
+ ],
1813
+ "page_idx": 12
1814
+ },
1815
+ {
1816
+ "type": "table",
1817
+ "img_path": "images/9671c8f2fd7196d7f0a7b849bb09b1e327b4775de2cf84a4689088cd92c14dfb.jpg",
1818
+ "table_caption": [
1819
+ "Table 10: Effectiveness of the contrastive loss based on anomaly categories $\\mathcal{L}_{\\mathrm{NA}}$ and $\\mathcal{L}_{\\mathrm{AA}}$ . Best result is bolded and second best result is underlined."
1820
+ ],
1821
+ "table_footnote": [],
1822
+ "table_body": "<table><tr><td>Index</td><td>\\( \\mathcal{L}_{BCE} \\)</td><td>\\( \\mathcal{L}_{NCE} \\)</td><td>\\( \\mathcal{L}_{NA} \\)</td><td>\\( \\mathcal{L}_{AA} \\)</td><td>AP(%)</td><td>AVG mAP(%)</td></tr><tr><td>1</td><td>✓</td><td>✓</td><td></td><td></td><td>86.15</td><td>25.98</td></tr><tr><td>2</td><td>✓</td><td>✓</td><td>✓</td><td></td><td>86.41</td><td>26.39</td></tr><tr><td>3</td><td>✓</td><td>✓</td><td></td><td>✓</td><td>86.34</td><td>26.18</td></tr><tr><td>4</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>86.57</td><td>26.70</td></tr></table>",
1823
+ "bbox": [
1824
+ 119,
1825
+ 134,
1826
+ 485,
1827
+ 197
1828
+ ],
1829
+ "page_idx": 13
1830
+ },
1831
+ {
1832
+ "type": "table",
1833
+ "img_path": "images/2a51e1c9fb6a3e4f4f498019cc54702540e79861b0a6bd0f06952e0be8405c61.jpg",
1834
+ "table_caption": [
1835
+ "Table 11: Effectiveness of Multi-Modality Fusion Methods. Best result is **bolded** and second best result is **underlined**."
1836
+ ],
1837
+ "table_footnote": [],
1838
+ "table_body": "<table><tr><td>Index</td><td>Method</td><td>AP (%)</td><td>AVG mAP (%)</td></tr><tr><td>1</td><td>Bilinear &amp; Concat</td><td>85.67</td><td>25.31</td></tr><tr><td>2</td><td>Bilinear &amp; Additive</td><td>86.19</td><td>25.73</td></tr><tr><td>3</td><td>Concat Fusion</td><td>86.34</td><td>26.38</td></tr><tr><td>4</td><td>MKAF</td><td>86.57</td><td>26.70</td></tr></table>",
1839
+ "bbox": [
1840
+ 119,
1841
+ 261,
1842
+ 484,
1843
+ 332
1844
+ ],
1845
+ "page_idx": 13
1846
+ },
1847
+ {
1848
+ "type": "text",
1849
+ "text": "Effectiveness of Multi-Modality Fusion Methods. We conducted ablation experiments to compare different multi-modality fusion methods on the XD-Violence dataset, with results presented in Table 11. The fusion methods include Bilinear & Concat, Bilinear & Additive, Concat Fusion, and the Multi-Modality Knowledge Adaptive Fusion (MKAF) method that we propose. Bilinear & Concat processes features through linear layers to ensure consistent dimensions, followed by concatenation. Bilinear & Additive through linear layers to ensure consistent dimensions, and combines modality information through element-wise summation. Concat Fusion concatenates features from the three modalities directly. The results demonstrate that MKAF outperforms other fusion methods, achieving $86.57\\%$ AP and $26.70\\%$ AVG mAP. This demonstrates the superiority of MKAF for multi-modality fusion.",
1850
+ "bbox": [
1851
+ 112,
1852
+ 356,
1853
+ 490,
1854
+ 661
1855
+ ],
1856
+ "page_idx": 13
1857
+ },
1858
+ {
1859
+ "type": "page_number",
1860
+ "text": "31607",
1861
+ "bbox": [
1862
+ 475,
1863
+ 927,
1864
+ 526,
1865
+ 940
1866
+ ],
1867
+ "page_idx": 13
1868
+ }
1869
+ ]
2025/CMHKF_ Cross-Modality Heterogeneous Knowledge Fusion for Weakly Supervised Video Anomaly Detection/c44ffe7f-774e-48fe-b25c-5ae80f879f1d_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/CMHKF_ Cross-Modality Heterogeneous Knowledge Fusion for Weakly Supervised Video Anomaly Detection/c44ffe7f-774e-48fe-b25c-5ae80f879f1d_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2144e5557a210c7ce4b2d4537e7f0651357292e9897550baefe65a54db69c354
3
+ size 5447054
2025/CMHKF_ Cross-Modality Heterogeneous Knowledge Fusion for Weakly Supervised Video Anomaly Detection/full.md ADDED
@@ -0,0 +1,371 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CMHKF: Cross-Modality Heterogeneous Knowledge Fusion for Weakly Supervised Video Anomaly Detection
2
+
3
+ Guohua Wang $^{1*}$ , Shengping Song $^{1*}$ , Wuchun He $^{1}$ , Yongsen Zheng $^{2\dagger}$
4
+
5
+ $^{1}$ South China Agricultural University, China
6
+
7
+ $^{2}$ Nanyang Technological University, Singapore
8
+
9
+ wangguohua@scau.edu.cn, songshengping@stu.scau.edu.cn
10
+
11
+ hewuchun@stu.scau.edu.cn, yongsen.zheng@ntu.edu.sg
12
+
13
+ # Abstract
14
+
15
+ Weakly supervised video anomaly detection (WSVAD) presents a challenging task focused on detecting frame-level anomalies using only video-level labels. However, existing methods focus mainly on visual modalities, neglecting rich multi-modality information. This paper proposes a novel framework, Cross-Modality Heterogeneous Knowledge Fusion (CMHKF), that integrates cross-modality knowledge from video, audio, and text to improve anomaly detection and localization. To achieve adaptive cross-modality heterogeneous knowledge learning, we designed two components: Cross-Modality Video-Text Knowledge Alignment (CVKA) and Audio Modality Feature Adaptive Extraction (AFAE). They extract and aggregate features by exploring inter-modality correlations. By leveraging abundant cross-modality knowledge, our approach improves the discrimination between normal and anomalous segments. Extensive experiments on XD-Violence show our method significantly enhances accuracy and robustness in both coarse-grained and fine-grained anomaly detection.
16
+
17
+ # 1 Introduction
18
+
19
+ Weakly supervised video anomaly detection (WSVAD) aims to use video-level labels (normal or abnormal) to evaluate frame-level anomaly scores, thereby reducing manual annotation costs. Most existing WSVAD methods (Feng et al., 2021; Cho et al., 2023; Karim et al., 2024) primarily distinguish between frame-level normal and abnormal events by learning information from a single modality, specifically the video modality. However, relying solely on video modality struggles to localize anomalies in ambiguous scenarios. Complementary modalities, such as audio and text, provide additional contextual cues that help disambiguate
20
+
21
+ complex anomaly patterns. Thus, integrating multimodality information is essential for WSVAD.
22
+
23
+ Current WSVAD methods consist of one-stage Multiple Instance Learning (MIL) methods (Karim et al., 2024; Sultani et al., 2018) and pseudo-label self-training two-stage methods (Li et al., 2022; Zhang et al., 2023). One-stage MIL methods use ranking loss to prioritize higher scores in abnormal segments. Nevertheless, they often miss minor anomalies, limiting detection completeness. Two-stage approaches use MIL for pseudo labels first, then train the classifier in the second stage. However, pseudo label accuracy is unreliable, potentially causing misdetections. Historically, most WSVAD methods relied on single-modality data. Recently, studies (Peng et al., 2023; Wu et al., 2024c) have attempted to leverage multi-modality information to enhance performance. However, they often superficially fuse multi-modality data without fully exploiting its potential.
24
+
25
+ Despite some progress, existing methods still face two major challenges: 1) Single Modality. Currently, most of both single-stage and two-stage methods (Lv et al., 2023; Zhang et al., 2023) focus on learning from video data, emphasizing conspicuous visual anomalies. However, this strategy often falls short in visually ambiguous scenarios where the video modality lacks the sufficient discriminative power. For example, in a dust-filled scene, video data might struggle to distinguish between an anomalous event, such as an explosion, and a normal occurrence like strong winds stirring up dust. In these instances, audio and text modalities can provide critical supplementary information. Therefore, how to effectively fuse multi-modality knowledge, including video, audio, and text, plays an important role in these visual ambiguities. This not only enhances detection robustness but also improves system performance in complex or dynamic environments. 2) Fusion Strategy. While a few studies (Wu et al., 2020, 2022b) have started to
26
+
27
+ harness the power of multi-modality knowledge, they predominantly rely on independently learning feature representations for each modality, achieving multi-modality fusion through straightforward feature concatenation. However, this concatenation fusion strategy only accomplishes a surface-level integration of modalities at the feature level, fundamentally overlooking the potential correlations between modalities. In contrast, the core principle behind adaptive cross-modality knowledge learning is to allow the model to autonomously adjust the interdependencies and contributions of each modality. By dynamically adapting these relationships based on the complexity of specific scenes and anomalous events, this method provides a multidimensional representation of anomalies, thus facilitating the learning of high-level features. Therefore, this more nuanced integration of cross-modal knowledge is essential for advancing WSVAD.
28
+
29
+ In this study, we propose CMHKF to address these challenges. To address the first challenge, we integrate video, audio, and text to jointly learn feature representations. This enhances the differentiation between normal and anomalous segments. To address the second challenge, we propose the Cross-Modality Video-Text Knowledge Alignment (CVKA) and the Audio Modality Feature Adaptive Extraction (AFAE). CVKA leverages CLIP to capture visual-semantic similarity, dynamically aligning and adaptively aggregating relevant text features. AFAE maps the visual-semantic similarity obtained from CVKA to the temporal saliency of audio features. To address temporal misalignment, AFAE uses a Top-k window to bridge the fine-grained feature distribution differences between video and audio. Finally, we propose Multi-Modality Knowledge Adaptive Fusion (MKAF) by extending Joint Cross-Attention Model (Praveen et al., 2022). MKAF effectively captures intra-modality and cross-modality correlations while reducing inter-modality heterogeneity.
30
+
31
+ Overall, our contributions are threefold:
32
+
33
+ - We propose CMHKF to adaptively fuse cross-modality heterogeneous knowledge from video, audio, and text in WSVAD.
34
+ - We propose CVKA, AFAE, and MKAF for adaptive modality adjustment and fusion.
35
+ - Experiments on XD-Violence show our method outperforms others in coarse-grained and fine-grained WSVAD tasks.
36
+
37
+ # 2 Related Work
38
+
39
+ # 2.1 Weakly Supervised Video Anomaly Detection
40
+
41
+ Weakly supervised video anomaly detection (Cao et al., 2023; Majhi et al., 2024; AlMarri et al., 2024) has become a prominent research focus. Most WSVAD methods use MIL(Sultani et al., 2018) to learn features from weakly labeled data for frame-level detection. The pioneering work (Sultani et al., 2018) proposed a deep MIL model with ranking loss. Subsequently, Zhou et al. (Zhou et al., 2023) presented an Uncertainty Regulated Dual Memory Units model to improving the representation learning of normal and anomalous data. Since the aforementioned methods are constrained to single-modality anomaly detection, recent studies have proposed multi-modality approaches (Yang et al., 2024; Peng et al., 2023) that outperform their single-modality counterparts. However, these approaches primarily rely on basic multi-modality feature fusion, overlooking latent interdependencies among modalities. To address these limitations, we propose an adaptive cross-modal knowledge learning approach that integrates video, audio, and text modalities.
42
+
43
+ # 2.2 Vision-Text Multi-Modality Models
44
+
45
+ Vision-text multi-modality has become a key research area for tasks like pre-training (Li et al., 2021; Lei et al., 2021) and vision-text retrieval (Tian et al., 2024; Deng et al., 2023). One influential work is Contrastive Language-Image Pretraining (CLIP) (Radford et al., 2021), which uses two encoders to map images and text into a shared space for contrastive learning. Trained on hundreds of millions of image-text pairs, CLIP demonstrates remarkable zero-shot transfer capabilities. Recently, several studies (Wu et al., 2024c; Sun et al., 2024) explored CLIP's application in WSVAD. These works are categorized into two types. The first type (Joo et al., 2023; Sharif et al., 2023) uses CLIP's image encoder as a strong initialization for the video encoder. The second type (Zanella et al., 2024; Wu et al., 2024c) extends CLIP to video-label matching for anomaly detection. However, these studies only superficially exploit CLIP's embedded knowledge. In contrast, our research explores the relationship between visual and semantic features, adaptively fuses text information, and maps CLIP's image-text alignment capabilities to audio, deeply mining its temporal saliency regions.
46
+
47
+ ![](images/858c5b7b30d69baef6afba3527faa03c153f5ae0f3250fb550b9b3fc9bc73f44.jpg)
48
+ Figure 1: The overall architecture of our proposed CMHKF.
49
+
50
+ # 3 CMHKF
51
+
52
+ This section begins by defining the task of WSVAD. Following this, we describe the overall architecture of CMHKF. Finally, we provide a detailed explanation of each module and its implementation.
53
+
54
+ # 3.1 Problem Statement
55
+
56
+ Given a dataset of $M$ videos and audios, $X = \{x_{i}\}_{i=1}^{M}$ , $Z = \{z_{i}\}_{i=1}^{M}$ , and video-level labels $Y = \{y_{i}\}_{i=1}^{M}$ , where $y_{i} \in \{0,1\}$ . If $y_{i} = 0$ , the video is normal, meaning all its frames are free of anomalous events. If $y_{i} = 1$ , the video is anomalous, containing at least one anomalous frame. During training, only video-level labels are employed to supervise the model, whereas during testing, the model predicts frame-level anomaly confidence for precise temporal localization.
57
+
58
+ # 3.2 Overall Architecture
59
+
60
+ Figure 1 illustrates the overall workflow of CMHKF. Our method encodes videos, learnable class prompt texts, and audio into feature embeddings using CLIP's image and text encoders, along with the VGGish network (Hershey et al., 2017). This yields video features $F_{v} \in \mathcal{R}^{N \times D_{v}}$ , text features $F_{t} \in \mathcal{R}^{C \times D_{t}}$ and audio features $F_{a} \in \mathcal{R}^{N \times D_{a}}$ . $D_{v}, D_{t}$ , and $D_{a}$ represent the feature dimensions of video, text, and audio, while $N$ and $C$ represent the number of frames and class prompt texts, respectively. Given CLIP is pretrained on large-scale image-text pairs, it exhibits limitations
61
+
62
+ in effectively modeling temporal dependencies. Inspired by (Wu et al., 2024c), we introduce Local Transformer Encoder (Local TE) and Global Graph Convolutional Network (Global GCN) to obtain temporally dependent video features $\tilde{F}_v \in \mathcal{R}^{N \times D_v}$ . We propose the Cross-Modality Video-Text Knowledge Alignment (CVKA) to leverage the correlation between visual and textual modalities in the CLIP feature space. CVKA dynamically aligns and adaptively aggregates text features most semantically similar to the video, yielding text features $\tilde{F}_t \in \mathcal{R}^{N \times D_t}$ . Concurrently, we employ Bidirectional Long Short-Term Memory (BiLSTM) (Huang et al., 2015) and Audio Modality Feature Adaptive Extraction (AFAE) to capture temporal saliency in audio features, yielding the audio feature $\tilde{F}_a \in \mathcal{R}^{N \times D_a}$ . Subsequently, we fuse $\tilde{F}_v$ , $\tilde{F}_t$ , and $\tilde{F}_a$ using Multi-Modality Knowledge Adaptive Fusion (MKAF), resulting in the fused feature $F_{fused} \in \mathcal{R}^{N \times D_f}$ . Finally, $F_{fused}$ is processed by a Binary Classifier to generate frame-level anomaly confidence, enabling coarse-grained anomaly detection (i.e., classifying frames as either normal or anomalous). Additionally, by weighting the video features with frame-level anomaly confidence and fusing them with all category text features, we obtain the feature $\tilde{F}_{vt}$ . Then, by calculating the similarity between $\tilde{F}_v$ and $\tilde{F}_{vt}$ , we further achieve fine-grained anomaly classification (i.e., determining whether a video frame is normal or belongs to a specific type of anomaly).
63
+
64
+ # 3.3 Multi-Modality Heterogeneous Knowledge
65
+
66
+ In WSVAD, multi-modality heterogeneous knowledge integrates complementary information from video, audio, and text, each providing distinct insights into anomalous events. Specifically, the video modality offers spatial and temporal context for anomaly detection. Anomalies manifest through dynamic object interactions and scene transitions. However, when visual information is sparse or ambiguous, the audio modality provides a crucial complementary perspective. Unlike video, audio conveys auditory signals correspond to the environment and deliver explicit cues for anomalous events. Furthermore, the text modality enhances semantic understanding by associating category labels with video segments. By providing clear definitions and features for each anomaly type, the text modality ensures that the detection process accurately captures the true nature of anomalous events. Thus, by integrating knowledge from these modalities, the model gains a more comprehensive understanding of anomalous events.
67
+
68
+ # 3.4 Cross-Modality Knowledge Fusion for WSVAD
69
+
70
+ To effectively integrate multi-modality heterogeneous knowledge, we propose two key components: CVKA and AFAE. CVKA modulates text features based on the semantic alignment between video frames and text, thereby enhancing text-to-video relevance. AFAE identifies temporally salient regions in audio, focusing on the most anomalous intervals to extract relevant audio features. These modules refine the fusion of cross-modality knowledge in our CMHKF framework.
71
+
72
+ Cross-Modality Video-Text Knowledge Alignment. This section discusses the dynamic alignment and adaptive fusion text features based on the visual-textual semantic correlation, which enhances the distinction between normal and anomalous segments. CVKA is illustrated in Figure 2.
73
+
74
+ To obtain the text features that are most semantically relevant to the video features, we employ text features as queries to precisely capture the correlation between text and video frames. Specifically, we encode the video frames and class label texts using the pretrained CLIP model, generating video frame features $F_{v} = \{v_{n}\}_{n = 1}^{N}$ and text features $F_{t} = \{t_{c}\}_{c = 1}^{C}$ . We compute the cosine similarity between each text and frame feature to create a
75
+
76
+ ![](images/94d67a12263aa03bee5f12d9dd12db73083e502eb7fe0e7b31eaa7b0769b37be.jpg)
77
+ Figure 2: Illustration of Cross-Modality Video-Text Knowledge Alignment (CVKA). CVKA computes the visual-semantic similarity matrix between video features $F_{v}$ and text features $F_{t}$ . It then applies the Top-k algorithm to dynamically select $k$ texts and their corresponding visual-semantic similarities. Finally, it adaptively aggregates the selected text features based on their Top-k visual-semantic similarity.
78
+
79
+ visual-semantic similarity matrix $s_{ij}\in \mathcal{R}^{N\times C}$ capturing fine-grained correlations. Mathematically, this process can be expressed as:
80
+
81
+ $$
82
+ s _ {i j} = \frac {v _ {i} t _ {j} ^ {\top}}{\| v _ {i} \| \| t _ {j} \|} \tag {1}
83
+ $$
84
+
85
+ where $v_{i}$ represents the feature of the $i$ -th frame and $t_{j}$ represents the text feature of the $j$ -th class.
86
+
87
+ Next, we aggregate the similarity matrix along the temporal dimension $N$ to obtain the similarity score for each class text, resulting in the corresponding video-level similarity vector $S_{j}\in \mathcal{R}^{C}$ which represents the global relationship between feature of the $j$ -th class and the video. Subsequently, we apply the Top-k algorithm to dynamically select the top $k$ category texts most relevant to the video semantics, forming an index set $\mathcal{K}$ . Top-k visual-semantic similarity can be obtained based on $\mathcal{K}$ . The formulas are as follows:
88
+
89
+ $$
90
+ S _ {j} = \sum_ {i = 1} ^ {N} s _ {i j}, \quad j \in \{1, 2, \dots , C \} \tag {2}
91
+ $$
92
+
93
+ $$
94
+ \mathcal {K} = \arg \operatorname {t o p} _ {k} (S) = \left\{c _ {1}, c _ {2}, \dots , c _ {k} \right\} \tag {3}
95
+ $$
96
+
97
+ Finally, we perform adaptive aggregation of the selected $k$ class texts based on the Top-k visual-semantic similarity to achieve video-text knowledge alignment:
98
+
99
+ $$
100
+ F _ {i} = \frac {1}{k} \sum_ {j \in \mathcal {K}} \frac {\exp \left(s _ {i j} / \tau\right)}{\sum_ {i = 1} ^ {N} \exp \left(s _ {i j} / \tau\right)} t _ {j} \tag {4}
101
+ $$
102
+
103
+ $$
104
+ \tilde {F} _ {t} = [ F _ {1}; F _ {2}; \ldots ; F _ {N} ] \in \mathcal {R} ^ {N \times D _ {t}}
105
+ $$
106
+
107
+ where $\tau$ is a temperature parameter that controls the distribution of similarity scores.
108
+
109
+ Audio Modality Feature Adaptive Extraction. In the CVKA module, we performed semantic alignment between video and text along the temporal dimension. Next, we leverage video-text semantic relevance to capture the temporal saliency of audio features, mitigating audio noise interference. AFAE is shown in Figure 3. Leveraging the robust image-text alignment capabilities within the CLIP feature space, we project the Top-k visual-semantic similarity from CVKA onto the audio's temporal saliency. The projection method follows:
110
+
111
+ $$
112
+ S _ {a} ^ {(n)} = \frac {1}{k} \sum_ {j \in \mathcal {K}} \frac {\exp \left(s _ {n j} / \tau\right)}{\sum_ {i = 1} ^ {N} \exp \left(s _ {i j} / \tau\right)}, n \in \{1, 2, \dots , N \} \tag {5}
113
+ $$
114
+
115
+ where $S_{a}^{(n)}$ represents the temporal saliency of the $n$ -th audio frame. However, Top-k visual-semantic similarity follows the video's temporal sequence. Fine-grained misalignment between video and audio may lead to loss of crucial information if only temporal saliency is used. Moreover, preserving the continuity of anomalous events is essential. To address these challenges, we propose a Top-k window mechanism to mitigate the fine-grained temporal discrepancies between video and audio, ensuring more accurate extraction and retention of key event information. Specifically, we select the top $k$ salient frames from the audio, forming the index set $K = \{K_1, K_2, \ldots, K_k\}$ . $k$ is chosen as $\lfloor T / 16 \rfloor + 1$ . For each $a_j$ ( $j \in K$ ), we define a temporal window of size $2w + 1$ around $a_j$ . This window encompasses $a_j$ and its $w$ preceding and succeeding frames, forming the local region $W_j = \{a_j - w, \ldots, a_j, \ldots, a_j + w\}$ . We then extend the temporal saliency of the central frame $a_j$ to the other frames within the window, forming a continuous and accurate temporal saliency region. Mathematically, these can be formulated as:
116
+
117
+ $$
118
+ \widetilde {S} _ {a} ^ {(n)} = \left\{ \begin{array}{l l} S _ {a} ^ {(j)} + S _ {a} ^ {(n)}, & \text {i f} \exists j \in K \text {a n d} n \in R _ {j} \\ S _ {a} ^ {(n)}, & \text {o t h e r w i s e} \end{array} \right. \tag {6}
119
+ $$
120
+
121
+ where $R_{j}\in [\max (1,a_{j} - w),\min (a_{j} + w,N)]$ Finally, we aggregate the audio features using $\widetilde{S}_a^{(n)}$ as follows:
122
+
123
+ $$
124
+ \tilde {F} _ {a} = \sum_ {n = 1} ^ {N} F _ {a} \widetilde {S} _ {a} ^ {(n)} \tag {7}
125
+ $$
126
+
127
+ where $\tilde{F}_a$ represents the audio features extracted by adaptively focusing on temporal saliency regions.
128
+
129
+ ![](images/a22a5516deda6b53ea5abf6767717897d5d9ae1f4a385f9dd1d069db67833f73.jpg)
130
+ Figure 3: Illustration of the Audio Modality Feature Adaptive Extraction (AFAE). The AFAE is introduced to process audio features. Initially, AFAE projects the Top-k visual-semantic similarity onto the temporal saliency of the audio. This is followed by the application of the Top-k windowing mechanism to mine temporal saliency regions. Finally, the temporal saliency regions are aggregated with the audio features to yield enhanced audio features.
131
+
132
+ Multi-Modality Knowledge Adaptive Fusion. After obtaining cross-modal knowledge from video, text, and audio, we need to effectively fuse them for WSVAD.
133
+
134
+ At the outset, we merge the video features $\tilde{F}_v$ , text features $\tilde{F}_t$ , and audio features $\tilde{F}_a$ to construct the multi-modality joint representation $J \in \mathcal{R}^{N \times D}$ . Subsequently, each modality feature $\tilde{F}_v$ , $\tilde{F}_t$ , and $\tilde{F}_a$ undergoes individual processing with $J$ through a cross-attention mechanism, followed by a feedforward layer to derive the interacted modality representations $F_v^{\mathrm{int}}$ , $F_t^{\mathrm{int}}$ , and $F_a^{\mathrm{int}}$ . These interacted features are concatenated and then added with $J$ , and collectively passed through a linear projection layer to yield the ultimate fused multi-modality representation $F_{\mathrm{fused}} \in \mathcal{R}^{N \times D_f}$ . This holistic methodology effectively amalgamates the distinct modality features to form a cohesive representation that encapsulates the diverse multi-modality information inherent in the dataset.
135
+
136
+ # 3.5 Objective Function
137
+
138
+ For coarse-grained binary classification, we use a Binary Classifier to project $F_{\text{fused}}$ into category space, yielding a frame-level anomaly score. Following (Wu et al., 2022b), we average the top $k$ anomaly scores for the video-level prediction $p_c$ . We then compute the binary cross entropy between $p_c$ and ground-truth for classification loss $\mathcal{L}_{BCE}$ .
139
+
140
+ For fine-grained multi-class classification, we introduce the MIL-Align mechanism (Wu et al., 2024c). We compute the alignment map $A$ by evaluating the similarity between video frame features and all category text features. The top $k$ similar
141
+
142
+ ity scores for each category are averaged, yielding the vector $M = \{m_1,\dots ,m_C\}$ . We then perform multi-class prediction to ensure that the similarity between the video and the correct text surpasses that of the incorrect texts. First, the procedure for computing the multi-class prediction is as follows:
143
+
144
+ $$
145
+ p _ {f} ^ {i} = \frac {\exp (m _ {i} / \tau)}{\sum_ {j = 1} ^ {C} \exp (m _ {j} / \tau)} \tag {8}
146
+ $$
147
+
148
+ Next, we compute the binary cross entropy between the video prediction $p_f^i$ and ground-truth to obtain the loss $\mathcal{L}_{NCE}$ .
149
+
150
+ In addition, we introduce a contrastive loss $\mathcal{L}_{NA}$ based on normal and abnormal categories to distinguish between normal and abnormal text features. We propose a contrastive loss $\mathcal{L}_{AA}$ based on abnormal categories to differentiate between features of different abnormal classes. The two loss functions are defined as follows:
151
+
152
+ $$
153
+ \mathcal {L} _ {N A} = \frac {1}{C - 1} \sum_ {i = 2} ^ {C} \left(1 + \frac {t _ {n} \cdot t _ {a _ {i}}}{\| t _ {n} \| \| t _ {a _ {i}} \|}\right) \tag {9}
154
+ $$
155
+
156
+ $$
157
+ \mathcal {L} _ {A A} = \frac {2}{(C - 1) (C - 2)} \sum_ {i = 2} ^ {C - 1} \sum_ {j = i + 1} ^ {C} \left| \frac {t _ {a _ {i}} \cdot t _ {a _ {j}}}{\| t _ {a _ {i}} \| \| t _ {a _ {j}} \|} \right| \tag {10}
158
+ $$
159
+
160
+ where $i = 1$ corresponds to the text feature $t_n$ of the normal category, and $t_{a_j}$ represents the text feature for the $j$ -th anomalous category.
161
+
162
+ Overall, objective function $\mathcal{L}$ as follows:
163
+
164
+ $$
165
+ \mathcal {L} = \mathcal {L} _ {B C E} + \mathcal {L} _ {N C E} + \lambda_ {1} \mathcal {L} _ {N A} + \lambda_ {2} \mathcal {L} _ {A A} \tag {11}
166
+ $$
167
+
168
+ # 4 Experiments and Results
169
+
170
+ # 4.1 Dataset and Evaluation Metric
171
+
172
+ XD-Violence (Wu et al., 2020) is widely used in WSVAD and is the only dataset that includes both visual and auditory modalities. It consists of 4,757 untrimmed videos (totaling 217 hours) from real-world domains, including films, sports, online platforms, and surveillance, featuring six types of violent incidents. The dataset poses challenges due to its rich artistic content, such as perspective shifts and dynamic camera movements. Previous approaches used datasets (Sultani et al., 2018; Liu et al., 2018) as benchmarks, but these unimodal datasets are inadequate for evaluating cross-modal interactions.
173
+
174
+ Table 1: Coarse-grained comparisons on XD-Violence. Best result is **bolded** and second best result is **underlined**. * indicates re-implemented by fusing audio and visual features as inputs.
175
+
176
+ <table><tr><td>Method</td><td>Publication</td><td>Modality</td><td>AP (%)</td></tr><tr><td colspan="4">Unsupervised learning based methods</td></tr><tr><td>SVM baseline</td><td>NIPS&#x27;99</td><td>Video</td><td>50.78</td></tr><tr><td>Hasan et al. (Hasan et al., 2016)</td><td>CVPR&#x27;16</td><td>Video</td><td>30.77</td></tr><tr><td>GODS(Wang and Cherian, 2019)</td><td>ICCV&#x27;19</td><td>Video</td><td>61.56</td></tr><tr><td>CLAP (Al-Lahham et al., 2024)</td><td>CVPR&#x27;24</td><td>Video</td><td>77.65</td></tr><tr><td colspan="4">Weakly supervised learning based methods</td></tr><tr><td>Sultani et al. (Sultani et al., 2018)</td><td>CVPR&#x27;18</td><td>Video</td><td>73.20</td></tr><tr><td>HL-Net(Wu et al., 2020)</td><td>ECCV&#x27;20</td><td>Video + Audio</td><td>78.64</td></tr><tr><td>RTFM (Tian et al., 2021)</td><td>ICCV&#x27;21</td><td>Video</td><td>77.81</td></tr><tr><td>RTFM* (Tian et al., 2021)</td><td>ICCV&#x27;21</td><td>Video + Audio</td><td>78.10</td></tr><tr><td>Li et al. (Li et al., 2022)</td><td>AAAI&#x27;22</td><td>Video</td><td>78.28</td></tr><tr><td>S3R (Wu et al., 2022a)</td><td>ECCV&#x27;22</td><td>Video</td><td>80.26</td></tr><tr><td>MACIL-SD (Yu et al., 2022)</td><td>ACMMM&#x27;22</td><td>Video + Audio</td><td>83.40</td></tr><tr><td>TEVAD (Chen et al., 2023a)</td><td>CVPR&#x27;23</td><td>Video + Text</td><td>79.80</td></tr><tr><td>Mgfn (Chen et al., 2023b)</td><td>AAAI&#x27;23</td><td>Video</td><td>80.11</td></tr><tr><td>Cho et al. (Cho et al., 2023)</td><td>CVPR&#x27;23</td><td>Video</td><td>81.30</td></tr><tr><td>UR-DMU (Zhou et al., 2023)</td><td>AAAI&#x27;23</td><td>Video</td><td>81.66</td></tr><tr><td>UR-DMU* (Zhou et al., 2023)</td><td>AAAI&#x27;23</td><td>Video + Audio</td><td>81.77</td></tr><tr><td>Zhang et al. (Zhang et al., 2023)</td><td>CVPR&#x27;23</td><td>Video + Audio</td><td>81.43</td></tr><tr><td>REWARD (Karim et al., 2024)</td><td>WACV&#x27;24</td><td>Video</td><td>77.71</td></tr><tr><td>Wu et al. (Wu et al., 2024a)</td><td>CVPR&#x27;24</td><td>Video + Text</td><td>76.03</td></tr><tr><td>TPWNG (Yang et al., 2024)</td><td>CVPR&#x27;24</td><td>Video + Text</td><td>83.68</td></tr><tr><td>VadCLIP (Wu et al., 2024c)</td><td>AAAI&#x27;24</td><td>Video + Text</td><td>84.51</td></tr><tr><td>Ours(light)</td><td>—</td><td>Video + Audio + Text</td><td>84.65</td></tr><tr><td>Ours(full)</td><td>—</td><td>Video + Audio + Text</td><td>86.57</td></tr></table>
177
+
178
+ Table 2: Fine-grained comparisons on XD-Violence. Best result is bolded and second best result is underlined.
179
+
180
+ <table><tr><td rowspan="2">Method</td><td colspan="6">mAP@IoU (%)</td></tr><tr><td>0.1</td><td>0.2</td><td>0.3</td><td>0.4</td><td>0.5</td><td>AVG</td></tr><tr><td>Random Baseline</td><td>0.37</td><td>0.27</td><td>0.06</td><td>0.03</td><td>0.01</td><td>0.15</td></tr><tr><td>Sultani et al. (Sultani et al., 2018)</td><td>20.08</td><td>13.72</td><td>8.44</td><td>5.06</td><td>2.81</td><td>10.02</td></tr><tr><td>3C-Net (Narayanan et al., 2019)</td><td>23.77</td><td>17.78</td><td>11.90</td><td>8.28</td><td>5.87</td><td>13.52</td></tr><tr><td>W-TALC (Paul et al., 2018)</td><td>26.27</td><td>18.87</td><td>13.83</td><td>9.50</td><td>6.55</td><td>15.00</td></tr><tr><td>Wu et al. (Wu et al., 2022b)</td><td>35.35</td><td>28.02</td><td>20.94</td><td>15.01</td><td>10.33</td><td>21.93</td></tr><tr><td>VadCLIP (Wu et al., 2024c)</td><td>37.03</td><td>30.84</td><td>23.38</td><td>17.90</td><td>14.31</td><td>24.70</td></tr><tr><td>Ours(light)</td><td>37.74</td><td>29.98</td><td>24.09</td><td>18.67</td><td>13.84</td><td>24.86</td></tr><tr><td>Ours(full)</td><td>38.31</td><td>32.12</td><td>25.68</td><td>20.93</td><td>16.47</td><td>26.70</td></tr></table>
181
+
182
+ Evaluation Metrics. We follow standardized protocols for fair comparisons. For coarse-grained WSVAD, we use frame-level Average Precision (AP) as the evaluation metric (Chen et al., 2023b; Tan et al., 2024). For fine-grained WSVAD, we use mean Average Precision (mAP) under different Intersection over Union (IoU) thresholds, following video action detection protocols (Wu et al., 2023).
183
+
184
+ # 4.2 Implementation Details
185
+
186
+ In our network architecture, the image and text encoders use pre-trained CLIP (ViT-B/16)(Radford et al., 2021), and VGGish for audio features(Hershey et al., 2017). Feature dimension $D$ is 512. Hyperparameters include $k = 2$ (Eq. 3), $w = 2$ (Eq. 6), $\tau = 0.07$ (Eq. 8), $\lambda_{1} = 1 \times 10^{-3}$ and $\lambda_{2} = 1 \times 10^{-4}$ (Eq. 11). Video sequences are capped at 256 frames during training. The model was trained using PyTorch on an NVIDIA RTX 3090 GPU, with the AdamW optimizer for 10 epochs and learning rate of $1 \times 10^{-5}$ .
187
+
188
+ # 4.3 Comparison with State-of-the-Art Methods
189
+
190
+ Our method addresses both coarse-grained and fine-grained WSVAD tasks. We present its performance and compare it with state-of-the-art methods on both WSVAD tasks.
191
+
192
+ Coarse-grained WSVAD Results. We compare our method with state-of-the-art methods and present AP results on XD-Violence (Table 1). Our method achieves an AP of $86.57\%$ , surpassing the best unsupervised method (Al-Lahham et al., 2024) by $8.92\%$ and previous single-modality methods (Zhou et al., 2023) by $4.91\%$ . Furthermore, compared to recent multi-modality weakly supervised methods, our approach outperforms the best-performing visual-audio method (Yu et al., 2022) by $3.17\%$ , and exceeds the best video-text method (Wu et al., 2024c) by $2.06\%$ . To further validate the effectiveness of our CVKA and AFAE, we performed light fusion of audio, video, and text features while retaining the structure of other modules. Without CVKA, we input all text features to demonstrate the performance of simple multimodality integration, resulting in a lower AP of $84.65\%$ . Results indicate that superior performance arises not only from the richer combination of audio, video, and text modalities but also from CVKA and AFAE facilitating modality-aware interactions for more accurate detection. In conclusion, our method outperforms both identical input modality and other multimodal approaches, validating its effectiveness.
193
+
194
+ Fine-grained WSVAD Results. Table 2 presents a comparison between CMHKF and other methods on the fine-grained task. As the data indicate, fine-grained WSVAD is evidently more challenging than coarse-grained WSVAD, as it requires considering both multi-class classification accuracy and the continuity of detected segments. From Table 2, it can be observed that our method significantly outperforms previous works on the XD-Violence dataset, achieving an AVG mAP of $26.70\%$ , which is $2.00\%$ higher than the best performance of previous works $(24.70\%)$ . Similarly, we performed light fusion of the audio, video, and text features, resulting in a lower AVG mAP of $24.86\%$ . This further demonstrates the effectiveness of our method in adaptive cross-modal knowledge learning, optimizing the utilization of multi-modality data for WSVAD tasks.
195
+
196
+ Table 3: Effectiveness of the CVKA. Best result is bolded and second best result is underlined.
197
+
198
+ <table><tr><td rowspan="2">Method</td><td colspan="8">k</td></tr><tr><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td></tr><tr><td>w/o CVKA@AP(%)</td><td>83.65</td><td>—</td><td>—</td><td>—</td><td>—</td><td>—</td><td>—</td><td>—</td></tr><tr><td>w/ CVKA@AP(%)</td><td>—</td><td>85.26</td><td>86.57</td><td>86.24</td><td>85.86</td><td>85.72</td><td>85.49</td><td>85.41</td></tr><tr><td>w/o CVKA@AVG mAP(%)</td><td>22.49</td><td>—</td><td>—</td><td>—</td><td>—</td><td>—</td><td>—</td><td>—</td></tr><tr><td>w/ CVKA@AVG mAP(%)</td><td>—</td><td>25.48</td><td>26.70</td><td>26.13</td><td>25.74</td><td>25.45</td><td>25.37</td><td>25.19</td></tr></table>
199
+
200
+ Table 4: Effectiveness of the AFAE. Best result is bolded and second best result is underlined.
201
+
202
+ <table><tr><td>Method</td><td>w/o Top-k window</td><td>w/ Top-k window</td><td>AP (%)</td><td>AVG mAP (%)</td></tr><tr><td>w/o AFAE</td><td>✓</td><td></td><td>85.06</td><td>25.15</td></tr><tr><td>w/ AFAE</td><td>✓</td><td></td><td>85.81</td><td>26.03</td></tr><tr><td>w/ AFAE</td><td></td><td>✓</td><td>86.57</td><td>26.70</td></tr></table>
203
+
204
+ # 4.4 Ablation Study
205
+
206
+ Next, we conduct a series of ablation studies to investigate the contributions of each component.
207
+
208
+ Effectiveness of the CVKA. We evaluated CVKA's impact on performance (Table 3). Initially, without CVKA (i.e., $k = 0$ ), text features were not integrated. The model achieved only $83.65\%$ AP and $22.49\%$ AVG mAP. After integrating CVKA and fusing all text categories ( $k = 7$ ), model achieved $85.41\%$ AP and $25.19\%$ AVG mAP. This shows that semantically clear textual features complement WSVAD. Furthermore, experiments with $k$ values ( $k = 0, 1, 2, 3, 4, 5, 6, 7$ ) represented fusion of the top $k$ semantically relevant text categories. When $k = 2$ , the model achieved the highest AP of $86.57\%$ and AVG mAP of $26.70\%$ . This confirms that selectively processing specific text features in CVKA reduces interference from irrelevant texts, aiding the model in capturing the intrinsic characteristics of anomalous events.
209
+
210
+ Effectiveness of AFAE. To demonstrate AFAE's effectiveness on audio features, we conducted an ablation study (Table 4). Results show that without AFAE, baseline method achieved $85.06\%$ AP and $25.15\%$ mAP. As described in Section 2.1, AFAE uses a Top-k window mechanism to mine audio temporal saliency regions. When AFAE is introduced with only visual-semantic similarity mapping for weighting audio features, excluding the Top-k window mechanism, yields $85.81\%$ AP and $26.03\%$ AVG mAP. Complete AFAE delivers the best performance. This demonstrates the effectiveness of focusing on temporal saliency regions for audio features, generating more compact and beneficial features. Additionally, we tested different window sizes in the Top-k mechanism (Table 5). Window sizes $W$ were set to 1, 3, 5, 7, 9, and 11. Optimal performance was achieved at $W = 5$ .
211
+
212
+ ![](images/1758d42641bb555973e032a7498b09249a0f9428979419079c872f3d84313d84.jpg)
213
+
214
+ ![](images/e3bc2bebdf3fd6d21195d1b81a0f63567956121bf223385f1578d1977465f1f6.jpg)
215
+
216
+ ![](images/7f354ded94889f9acf8a0aa08f784221d890dc39234ed89f612ffce637b3efd5.jpg)
217
+
218
+ ![](images/f7c158a42513cc3c421beddcdf670aa66cfd4d58a7316dec1ac423df6ec69e32.jpg)
219
+
220
+ ![](images/77b9829d9d78b3f7f8a5a5d220c7c60e87786779ae490f23bc7185777284bbb1.jpg)
221
+ (a) Abuse
222
+ (e) Riot
223
+ Figure 4: The qualitative results of our method on the test videos of the XD-Violence dataset. The red line indicates anomaly score distribution. Blue shaded regions mark anomalous event segments, with anomaly scores on the Y-axis and video frame numbers on the X-axis. Frames with blue borders highlight anomalies, while gray-bordered frames indicate normal segments.
224
+
225
+ ![](images/ee5f9343655c45cf288a0897da60770a02fcaa6df392d82fe2d1f7b1c16d3c51.jpg)
226
+ (b) Car accident
227
+ (f) Shooting
228
+
229
+ ![](images/c3584bcf967a4d1682e44c3b677a60c05edf424fa2f9a16114858673e157a094.jpg)
230
+ (c) Explosion
231
+ (g) Explosion
232
+
233
+ ![](images/f07ff815cab1e85b6879cd0a0404ca5c4d951fadeb96543d53cca2fd396964e0.jpg)
234
+ (d) Fighting
235
+ (h) Normal
236
+
237
+ Table 5: The AP and mAP results of CMHKF under different window sizes $W$ .
238
+
239
+ <table><tr><td rowspan="2">Method</td><td colspan="6">W</td></tr><tr><td>1</td><td>3</td><td>5</td><td>7</td><td>9</td><td>11</td></tr><tr><td>AP(%)</td><td>85.97</td><td>86.22</td><td>86.57</td><td>86.23</td><td>86.11</td><td>85.73</td></tr><tr><td>AVG mAP(%)</td><td>25.67</td><td>26.41</td><td>26.70</td><td>26.03</td><td>25.87</td><td>25.78</td></tr></table>
240
+
241
+ Table 6: Effectiveness of the Multi-Modality. Best result is bolded and second best result is underlined.
242
+
243
+ <table><tr><td>Index</td><td>Video</td><td>Audio</td><td>Text</td><td>AP (%)</td><td>AVG mAP (%)</td></tr><tr><td>1</td><td>✓</td><td></td><td></td><td>81.59</td><td>21.13</td></tr><tr><td>2</td><td>✓</td><td>✓</td><td></td><td>83.65</td><td>22.49</td></tr><tr><td>3</td><td>✓</td><td></td><td>✓</td><td>84.81</td><td>24.32</td></tr><tr><td>4</td><td>✓</td><td>✓</td><td>✓</td><td>86.57</td><td>26.70</td></tr></table>
244
+
245
+ Effectiveness of the Multi-Modality. Most video anomaly detection studies have traditionally focused on single modalities; only recently have researchers begun exploring dual-modality approaches, such as video-audio or video-text. In contrast, our approach integrates video, audio, and text. We tested four modality combinations: video-only, video-audio, video-text, and video-audio-text, as shown in Table 6. The absence of a modality can disable the corresponding processing module. Our experiments show that multi-modal combinations, particularly video-audio-text, outperform single-modal methods, improving AP and AVG mAP by $4.98\%$ and $5.57\%$ , respectively, compared to video alone, and by $1.76\%$ and $2.38\%$ compared to the best bimodal setup (video-text). These findings validate the efficacy of cross-modal knowledge integration in enhancing video anomaly detection.
246
+
247
+ Table 7: Evaluation on Abnormal Videos Only. * indicates the method was re-implemented for evaluating performance exclusively on anomalous videos.
248
+
249
+ <table><tr><td>Method</td><td>AP (%)</td><td>Ano-AP (%)</td><td>AVG mAP (%)</td><td>Ano-AVG mAP (%)</td></tr><tr><td>VadCLIP *</td><td>84.49</td><td>84.89</td><td>24.04</td><td>17.40</td></tr><tr><td>Ours</td><td>86.57</td><td>86.69</td><td>26.70</td><td>21.62</td></tr></table>
250
+
251
+ Evaluation on Abnormal Videos Only. Previous methods evaluated overall performance using both normal and abnormal videos during testing. However, evaluating performance solely on abnormal videos is a crucial metric for assessing anomaly detection capabilities. Thus, we excluded normal videos from testing (see Table 7). Results show that this exclusion improves coarse-grained AP. We attribute this improvement to the more diverse and random distribution of multi-modal features (e.g., video and audio) in normal videos, which introduces cross-modal inconsistencies and increases uncertainty in the model's decision-making. In contrast, abnormal videos contain more consistent and salient anomaly cues. For example, explosions show visual flashes and loud audio, offering aligned signals. Such consistency facilitates anomaly detection. However, fine-grained AVG mAP declines. We believe that, although the consistency between modalities enables the model to excel in distinguishing normal and anomalous events, different types of anomalous events (e.g., car accidents and explosions) are often correlated and share certain similarities, posing a challenge in accurately identifying distinct anomalous events.
252
+
253
+ ![](images/00fbe6a5ce73a38de67f303f7c14f0072ee746e168b5c816edca5dd71667359b.jpg)
254
+ (a) Pretrained CLIP Features
255
+
256
+ ![](images/8cbfceebc716c13a4c5642db4408fbf8b19d9377c969b8af8c19951cb7cefc75.jpg)
257
+ (b) CMHKF Features
258
+
259
+ ![](images/1b16170bf141ab8d16105a6261be1397e2de20b5963e1060db2f9e65c9743600.jpg)
260
+ Figure 5: The representations learned by (a) the original CLIP-based visual features and (b) the proposed CMHKF method are visualized using t-SNE on the XD-Violence dataset.
261
+
262
+ # 4.5 Qualitative Results
263
+
264
+ To fully evaluate our proposed CMHKF, we also conduct extensive qualitative experiments.
265
+
266
+ Coarse-grained Qualitative Visualization. Figure 4 shows CMHKF's predicted anomaly scores on the XD-Violence dataset, demonstrating its effectiveness. In Figures 4a, 4e, and 4g, our method accurately localizes anomalous intervals and predicts precise scores for prolonged abnormal regions. Figures 4c, 4d, and 4f further demonstrate its capability to detect and score discontinuous anomalies. Notably, in the darker environment of Figure 4f, the method detects a shooting event, highlighting audio and text contributions. Figure 4b illustrates detection of anomalies spanning entire regions. Moreover, Figure 4h shows the method's capacity to minimize false positives in challenging normal videos. High anomaly sensitivity and low normal scores confirm the method's robustness.
267
+
268
+ Embedding features. We used t-SNE (Van der Maaten and Hinton, 2008) to visualize the raw CLIP features and the representations learned by our CMHKF model. As shown in Figure 5, the learned representations from our model exhibit a more distinguishable and separable feature distribution than the raw input features extracted by the CLIP model. In the feature space generated by our model, normal and anomalous features are clearly separated, with a distinct boundary between them. Additionally, different types of anomalies are distinguishable, indicating that the CMHKF model excels in both coarse-grained detection of normal versus anomalous events and fine-grained differentiation between specific anomalous event types.
269
+
270
+ # 5 Conclusions
271
+
272
+ In this work, we propose a novel framework named CMHKF, aimed at effectively integrating cross-modality heterogeneous knowledge from video, audio, and text. To further enable adaptive cross-modality knowledge learning, we developed two key modules: CVKA and AFAE. Specifically, CVKA dynamically aligns and aggregates semantically relevant text features. In parallel, AFAE is engineered to mine temporally salient regions of audio features, focusing on capturing key characteristics within the audio. We conducted extensive evaluations on XD-Violence, the only large-scale audio-visual dataset, and the experimental results demonstrate its effectiveness. In the future, we plan to construct a new audio-visual dataset to further validate and benchmark the effectiveness of multi-modality approaches in this domain.
273
+
274
+ # 6 Limitations
275
+
276
+ While the CMHKF framework achieves significant results, there are still some limitations. Firstly, the evaluation of the model is currently limited to the XD-Violence dataset, which is the only available multimodal dataset for audio-visual violence detection. Future work will focus on constructing new multimodal datasets to more comprehensively validate and assess the performance of the method. Secondly, due to the limitations of weakly supervised learning, the text modality relies on learnable class labels. Future research will explore the use of large language models to generate richer textual descriptions for video data to enhance the expressive power of the text modality.
277
+
278
+ # 7 Ethics Statement
279
+
280
+ The data used in this paper are sourced from open-access repositories, and do not pose any privacy concerns. We are confident that our research adheres to the ethical standards set forth by ACL.
281
+
282
+ # References
283
+
284
+ Anas Al-Lahham, Muhammad Zaigham Zaheer, Nurbek Tastan, and Karthik Nandakumar. 2024. Collaborative learning of anomalies with privacy (clap) for unsupervised video anomaly detection: A new baseline. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12416-12425.
285
+ Salem AlMarri, Muhammad Zaigham Zaheer, and Karthik Nandakumar. 2024. A multi-head approach with shuffled segments for weakly-supervised video anomaly detection. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 132-142.
286
+ Congqi Cao, Xin Zhang, Shizhou Zhang, Peng Wang, and Yanning Zhang. 2023. Weakly supervised video anomaly detection based on cross-batch clustering guidance. In 2023 IEEE International Conference on Multimedia and Expo (ICME), pages 2723-2728. IEEE.
287
+ Weiling Chen, Keng Teck Ma, Zi Jian Yew, Minhoe Hur, and David Aik-Aun Khoo. 2023a. Tevad: Improved video anomaly detection with captions. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5549-5559.
288
+ Yingxian Chen, Zhengzhe Liu, Baoheng Zhang, Wilton Fok, Xiaojuan Qi, and Yik-Chung Wu. 2023b. Mgfn: Magnitude-contrastive glance-and-focus network for weakly-supervised video anomaly detection. In Proceedings of the AAAI conference on artificial intelligence, volume 37, pages 387-395.
289
+ MyeongAh Cho, Minjung Kim, Sangwon Hwang, Chaewon Park, Kyungjae Lee, and Sangyoun Lee. 2023. Look around for anomalies: Weakly-supervised anomaly detection via context-motion relational learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 12137-12146.
290
+ Chaorui Deng, Qi Chen, Pengda Qin, Da Chen, and Qi Wu. 2023. Prompt switch: Efficient clip adaptation for text-video retrieval. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 15648-15658.
291
+ Jia-Chang Feng, Fa-Ting Hong, and Wei-Shi Zheng. 2021. Mist: Multiple instance self-training framework for video anomaly detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 14009-14018.
292
+
293
+ Mahmudul Hasan, Jonghyun Choi, Jan Neumann, Amit K Roy-Chowdhury, and Larry S Davis. 2016. Learning temporal regularity in video sequences. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 733-742.
294
+ Shawn Hershey, Sourish Chaudhuri, Daniel PW Ellis, Jort F Gemmeke, Aren Jansen, R Channing Moore, Manoj Plakal, Devin Platt, Rif A Saurous, Bryan Seybold, et al. 2017. CNN architectures for large-scale audio classification. In 2017 ieee international conference on acoustics, speech and signal processing (icassp), pages 131-135. IEEE.
295
+ Zhiheng Huang, Wei Xu, and Kai Yu. 2015. Bidirectional lstm-crf models for sequence tagging. arXiv preprint arXiv:1508.01991.
296
+ Hyekang Kevin Joo, Khoa Vo, Kashu Yamazaki, and Ngan Le. 2023. Clip-tsa: Clip-assisted temporal self-attention for weakly-supervised video anomaly detection. In 2023 IEEE International Conference on Image Processing (ICIP), pages 3230-3234. IEEE.
297
+ Hamza Karim, Keval Doshi, and Yasin Yilmaz. 2024. Real-time weakly supervised video anomaly detection. In Proceedings of the IEEE/CVF winter conference on applications of computer vision, pages 6848-6856.
298
+ Jie Lei, Linjie Li, Luowei Zhou, Zhe Gan, Tamara L Berg, Mohit Bansal, and Jingjing Liu. 2021. Less is more: Clipbert for video-and-language learning via sparse sampling. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 7331-7341.
299
+ Junnan Li, Ramprasaath Selvaraju, Akhilesh Gotmare, Shafiq Joty, Caiming Xiong, and Steven Chu Hong Hoi. 2021. Align before fuse: Vision and language representation learning with momentum distillation. Advances in neural information processing systems, 34:9694-9705.
300
+ Shuo Li, Fang Liu, and Licheng Jiao. 2022. Self-training multi-sequence learning with transformer for weakly supervised video anomaly detection. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pages 1395-1403.
301
+ Wen Liu, Weixin Luo, Dongze Lian, and Shenghua Gao. 2018. Future frame prediction for anomaly detection—a new baseline. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6536-6545.
302
+ Hui Lv, Zhongqi Yue, Qianru Sun, Bin Luo, Zhen Cui, and Hanwang Zhang. 2023. Unbiased multiple instance learning for weakly supervised video anomaly detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 8022-8031.
303
+ Snehashis Majhi, Rui Dai, Quan Kong, Lorenzo Garattoni, Gianpiero Francesca, and François Brémond.
304
+
305
+ 2024. Oe-ctst: Outlier-embedded cross temporal scale transformer for weakly-supervised video anomaly detection. In Proceedings of the IEEE/CVF winter conference on applications of computer vision, pages 8574-8583.
306
+ Sanath Narayan, Hisham Cholakkal, Fahad Shahbaz Khan, and Ling Shao. 2019. 3c-net: Category count and center loss for weakly-supervised action localization. In Proceedings of the IEEE/CVF international conference on computer vision, pages 8679-8687.
307
+ Sujoy Paul, Sourya Roy, and Amit K Roy-Chowdhury. 2018. W-talc: Weakly-supervised temporal activity localization and classification. In Proceedings of the European conference on computer vision (ECCV), pages 563-579.
308
+ Xiaogang Peng, Hao Wen, Yikai Luo, Xiao Zhou, Keyang Yu, Ping Yang, and Zizhao Wu. 2023. Learning weakly supervised audio-visual violence detection in hyperbolic space. arXiv preprint arXiv:2305.18797.
309
+ R Gnana Praveen, Wheidima Carneiro de Melo, Nasib Ullah, Haseeb Aslam, Osama Zeeshan, Theo Denorme, Marco Pedersoli, Alessandro L Koerich, Simon Bacon, Patrick Cardinal, et al. 2022. A joint cross-attention model for audio-visual fusion in dimensional emotion recognition. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 2486-2495.
310
+ Yujiang Pu, Xiaoyu Wu, Lulu Yang, and Shengjin Wang. 2024. Learning prompt-enhanced context features for weakly-supervised video anomaly detection. IEEE Transactions on Image Processing.
311
+ 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.
312
+ Md Haidar Sharif, Lei Jiao, and Christian W Omlin. 2023. Cnn-vit supported weakly-supervised video segment level anomaly detection. Sensors, 23(18):7734.
313
+ Waqas Sultani, Chen Chen, and Mubarak Shah. 2018. Real-world anomaly detection in surveillance videos. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6479-6488.
314
+ Shengyang Sun, Jiashen Hua, Junyi Feng, Dongxu Wei, Baisheng Lai, and Xiaojin Gong. 2024. Tdsd: Text-driven scene-decoupled weakly supervised video anomaly detection. In Proceedings of the 32nd ACM International Conference on Multimedia, pages 5055-5064.
315
+ Weijun Tan, Qi Yao, and Jingfeng Liu. 2024. Overlooked video classification in weakly supervised video anomaly detection. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 202-210.
316
+
317
+ Kaibin Tian, Ruixiang Zhao, Zijie Xin, Bangxiang Lan, and Xirong Li. 2024. Holistic features are almost sufficient for text-to-video retrieval. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 17138-17147.
318
+ Yu Tian, Guansong Pang, Yuanhong Chen, Rajvinder Singh, Johan W Verjans, and Gustavo Carneiro. 2021. Weakly-supervised video anomaly detection with robust temporal feature magnitude learning. In Proceedings of the IEEE/CVF international conference on computer vision, pages 4975-4986.
319
+ Laurens Van der Maaten and Geoffrey Hinton. 2008. Visualizing data using t-sne. Journal of machine learning research, 9(11).
320
+ Jue Wang and Anoop Cherian. 2019. Gods: Generalized one-class discriminative subspaces for anomaly detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 8201-8211.
321
+ Jhih-Ciang Wu, He-Yen Hsieh, Ding-Jie Chen, Chiou-Shann Fuh, and Tyng-Luh Liu. 2022a. Self-supervised sparse representation for video anomaly detection. In European Conference on Computer Vision, pages 729-745. Springer.
322
+ Peng Wu, Jing Liu, Yujia Shi, Yujia Sun, Fangtao Shao, Zhaoyang Wu, and Zhiwei Yang. 2020. Not only look, but also listen: Learning multimodal violence detection under weak supervision. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XXX 16, pages 322-339. Springer.
323
+ Peng Wu, Xiaotao Liu, and Jing Liu. 2022b. Weakly supervised audio-visual violence detection. IEEE Transactions on Multimedia, 25:1674-1685.
324
+ Peng Wu, Xuerong Zhou, Guansong Pang, Yujia Sun, Jing Liu, Peng Wang, and Yanning Zhang. 2024a. Open-vocabulary video anomaly detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 18297-18307.
325
+ Peng Wu, Xuerong Zhou, Guansong Pang, Zhiwei Yang, Qingsen Yan, Peng Wang, and Yanning Zhang. 2024b. Weakly supervised video anomaly detection and localization with spatio-temporal prompts. In Proceedings of the 32nd ACM International Conference on Multimedia, pages 9301-9310.
326
+ Peng Wu, Xuerong Zhou, Guansong Pang, Lingru Zhou, Qingsen Yan, Peng Wang, and Yanning Zhang. 2024c. Vadclip: Adapting vision-language models for weakly supervised video anomaly detection. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pages 6074-6082.
327
+ Wenhao Wu, Xiaohan Wang, Haipeng Luo, Jingdong Wang, Yi Yang, and Wanli Ouyang. 2023. Bidirectional cross-modal knowledge exploration for video recognition with pre-trained vision-language models. In Proceedings of the IEEE/CVF conference
328
+
329
+ on computer vision and pattern recognition, pages 6620-6630.
330
+ Zhiwei Yang, Jing Liu, and Peng Wu. 2024. Text prompt with normality guidance for weakly supervised video anomaly detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 18899-18908.
331
+ Jiashuo Yu, Jinyu Liu, Ying Cheng, Rui Feng, and Yuejie Zhang. 2022. Modality-aware contrastive instance learning with self-distillation for weakly-supervised audio-visual violence detection. In Proceedings of the 30th ACM international conference on multimedia, pages 6278–6287.
332
+ Luca Zanella, Benedetta Liberatori, Willi Menapace, Fabio Poiesi, Yiming Wang, and Elisa Ricci. 2024. Delving into clip latent space for video anomaly recognition. Computer Vision and Image Understanding, 249:104163.
333
+ Chen Zhang, Guorong Li, Yuankai Qi, Shuhui Wang, Laiyun Qing, Qingming Huang, and Ming-Hsuan Yang. 2023. Exploiting completeness and uncertainty of pseudo labels for weakly supervised video anomaly detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 16271-16280.
334
+ Jia-Xing Zhong, Nannan Li, Weijie Kong, Shan Liu, Thomas H Li, and Ge Li. 2019. Graph convolutional label noise cleaner: Train a plug-and-play action classifier for anomaly detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 1237-1246.
335
+ Hang Zhou, Junqing Yu, and Wei Yang. 2023. Dual memory units with uncertainty regulation for weakly supervised video anomaly detection. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pages 3769-3777.
336
+
337
+ # A Appendix
338
+
339
+ # A.1 Added Dataset and Result
340
+
341
+ In this section, we evaluate our model on the UCF-Crime dataset, performing both coarse-grained and fine-grained WSVAD experiments, despite the lack of audio information, to demonstrate its effectiveness.
342
+
343
+ UCF-Crime is a widely used, large-scale video surveillance anomaly detection dataset, spanning 128 hours of real-world footage. It comprises 1,900 untrimmed videos across 13 anomaly categories—such as explosions, arrests, and road accidents—providing diverse scenario coverage. The dataset is split into 800 normal and 810 anomalous videos for training, while 140 normal and 150 anomalous videos are used for testing.
344
+
345
+ Implementation Details. The image and text encoders are based on the pre-trained CLIP model (ViT-B/16) (Radford et al., 2021), with a feature dimension of $D = 512$ . We set the following key hyperparameters: the Top-k selection parameter $k = 4$ in Eq. 3; temperature $\tau = 0.07$ in Eq. 8; loss-balancing weights $\lambda_1 = 1 \times 10^{-3}$ and $\lambda_2 = 1 \times 10^{-4}$ in Eq. 11. We trained the model in PyTorch on a single NVIDIA RTX 3090 GPU, employing the AdamW optimizer for 20 epochs with a batch size of 32 and an initial learning rate of $2 \times 10^{-5}$ .
346
+
347
+ Coarse-grained WSVAD Results. We compare our method with state-of-the-art methods, presenting the AUC results on the UCF-Crime dataset in Table 8. Given that the UCF-Crime dataset lacks audio data, we omit audio-related modules in our framework and adapt the MKAF module to facilitate the fusion of video and text modalities. Despite operating with an incomplete model, our method achieves competitive performance, attaining an AUC score of $88.24\%$ . This outperforms the best-performing video-text dual-modal method, STPrompt (Wu et al., 2024b), and surpasses the strongest single-modal approach, URDMU (Zhou et al., 2023), by $1.27\%$ in AUC. The superior performance of our method underscores the effectiveness of the proposed architecture, particularly the CVKA and MKAF modules. These components demonstrate a robust ability to learn cross-modality heterogeneous knowledge between video and text, establishing our method as highly effective in coarse-grained anomaly detection, even under conditions with incomplete modality integration.
348
+
349
+ Table 8: Coarse-grained comparisons on UCF-Crime. Best result is bolded and second best result is underlined.
350
+
351
+ <table><tr><td>Method</td><td>Publication</td><td>Modality</td><td>AUC (%)</td></tr><tr><td colspan="4">Unsupervised learning based methods</td></tr><tr><td>SVM baseline</td><td>NIPS&#x27;99</td><td>Video</td><td>50.10</td></tr><tr><td>Conv-AE (Hasan et al., 2016)</td><td>CVPR&#x27;16</td><td>Video</td><td>50.60</td></tr><tr><td>CLAP (Al-Lahham et al., 2024)</td><td>CVPR&#x27;24</td><td>Video</td><td>78.02</td></tr><tr><td colspan="4">Weakly supervised learning based methods</td></tr><tr><td>Sultani et al. (Sultani et al., 2018)</td><td>CVPR&#x27;18</td><td>Video</td><td>75.41</td></tr><tr><td>GCN (Zhong et al., 2019)</td><td>CVPR&#x27;19</td><td>Video</td><td>82.12</td></tr><tr><td>HL-Net(Wu et al., 2020)</td><td>ECCV&#x27;20</td><td>Video</td><td>82.44</td></tr><tr><td>MIST (Feng et al., 2021)</td><td>CVPR&#x27;21</td><td>Video</td><td>82.30</td></tr><tr><td>RTFM (Tian et al., 2021)</td><td>ICCV&#x27;21</td><td>Video</td><td>84.30</td></tr><tr><td>MSL (Li et al., 2022)</td><td>AAAI&#x27;22</td><td>Video</td><td>85.30</td></tr><tr><td>S3R (Wu et al., 2022a)</td><td>ECCV&#x27;22</td><td>Video</td><td>85.99</td></tr><tr><td>Cho et al. (Cho et al., 2023)</td><td>CVPR&#x27;23</td><td>Video</td><td>86.10</td></tr><tr><td>Zhang et al. (Zhang et al., 2023)</td><td>CVPR&#x27;23</td><td>Video</td><td>86.22</td></tr><tr><td>UMIL (Lv et al., 2023)</td><td>CVPR&#x27;23</td><td>Video</td><td>86.95</td></tr><tr><td>UR-DMU (Zhou et al., 2023)</td><td>AAAI&#x27;23</td><td>Video</td><td>86.97</td></tr><tr><td>Pu et al. (Pu et al., 2024)</td><td>TIP&#x27;24</td><td>Video + Text</td><td>86.76</td></tr><tr><td>TPWNG (Yang et al., 2024)</td><td>CVPR&#x27;24</td><td>Video + Text</td><td>87.79</td></tr><tr><td>VadCLIP (Wu et al., 2024c)</td><td>AAAI&#x27;24</td><td>Video + Text</td><td>88.02</td></tr><tr><td>STPrompt (Wu et al., 2024b)</td><td>ACMMM&#x27;24</td><td>Video + Text</td><td>88.08</td></tr><tr><td>Ours</td><td>—</td><td>Video + Text</td><td>88.24</td></tr></table>
352
+
353
+ Table 9: Fine-grained comparisons on UCF-Crime. Best result is bolded and second best result is underlined.
354
+
355
+ <table><tr><td rowspan="2">Method</td><td colspan="6">mAP@IoU (%)</td></tr><tr><td>0.1</td><td>0.2</td><td>0.3</td><td>0.4</td><td>0.5</td><td>AVG</td></tr><tr><td>Random Baseline</td><td>0.21</td><td>0.14</td><td>0.04</td><td>0.02</td><td>0.01</td><td>0.08</td></tr><tr><td>Sultani et al. (Sultani et al., 2018)</td><td>5.73</td><td>4.41</td><td>2.69</td><td>1.93</td><td>1.44</td><td>3.24</td></tr><tr><td>Wu et al. (Wu et al., 2022b)</td><td>10.27</td><td>7.01</td><td>6.25</td><td>3.42</td><td>3.29</td><td>6.05</td></tr><tr><td>VadCLIP (Wu et al., 2024c)</td><td>11.72</td><td>7.83</td><td>6.40</td><td>4.53</td><td>2.93</td><td>6.68</td></tr><tr><td>Ours</td><td>15.49</td><td>11.99</td><td>8.95</td><td>6.40</td><td>4.88</td><td>9.54</td></tr></table>
356
+
357
+ Fine-grained WSVAD Results. Table 9 presents a comparison of CMHKF with other methods for the fine-grained task. Despite the absence of audio data and corresponding modules, our method achieves a notable AVG mAP score of $9.54\%$ , surpassing the previously best-performing method (Wu et al., 2024c) by $2.86\%$ . This result highlights the effectiveness of the CVKA module in semantically aligning video and text features. By incorporating text features that provide clearer and more precise definitions of anomalous events, our model effectively captures the intrinsic attributes of various anomaly types, thus enabling more accurate differentiation between distinct anomaly categories.
358
+
359
+ # A.2 Added Ablation Study
360
+
361
+ Effectiveness of Loss. we conducted an ablation study on the contrastive losses $\mathcal{L}_{\mathrm{NA}}$ and $\mathcal{L}_{\mathrm{AA}}$ , as shown in Table 10. The results demonstrate that $\mathcal{L}_{\mathrm{NA}}$ effectively separates normal from anomalous textual features, while $\mathcal{L}_{\mathrm{AA}}$ distinguishes different anomaly types. These losses improve the separation of text embeddings, enabling the model to better identify normal events and anomalies.
362
+
363
+ Table 10: Effectiveness of the contrastive loss based on anomaly categories $\mathcal{L}_{\mathrm{NA}}$ and $\mathcal{L}_{\mathrm{AA}}$ . Best result is bolded and second best result is underlined.
364
+
365
+ <table><tr><td>Index</td><td>\( \mathcal{L}_{BCE} \)</td><td>\( \mathcal{L}_{NCE} \)</td><td>\( \mathcal{L}_{NA} \)</td><td>\( \mathcal{L}_{AA} \)</td><td>AP(%)</td><td>AVG mAP(%)</td></tr><tr><td>1</td><td>✓</td><td>✓</td><td></td><td></td><td>86.15</td><td>25.98</td></tr><tr><td>2</td><td>✓</td><td>✓</td><td>✓</td><td></td><td>86.41</td><td>26.39</td></tr><tr><td>3</td><td>✓</td><td>✓</td><td></td><td>✓</td><td>86.34</td><td>26.18</td></tr><tr><td>4</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>86.57</td><td>26.70</td></tr></table>
366
+
367
+ Table 11: Effectiveness of Multi-Modality Fusion Methods. Best result is **bolded** and second best result is **underlined**.
368
+
369
+ <table><tr><td>Index</td><td>Method</td><td>AP (%)</td><td>AVG mAP (%)</td></tr><tr><td>1</td><td>Bilinear &amp; Concat</td><td>85.67</td><td>25.31</td></tr><tr><td>2</td><td>Bilinear &amp; Additive</td><td>86.19</td><td>25.73</td></tr><tr><td>3</td><td>Concat Fusion</td><td>86.34</td><td>26.38</td></tr><tr><td>4</td><td>MKAF</td><td>86.57</td><td>26.70</td></tr></table>
370
+
371
+ Effectiveness of Multi-Modality Fusion Methods. We conducted ablation experiments to compare different multi-modality fusion methods on the XD-Violence dataset, with results presented in Table 11. The fusion methods include Bilinear & Concat, Bilinear & Additive, Concat Fusion, and the Multi-Modality Knowledge Adaptive Fusion (MKAF) method that we propose. Bilinear & Concat processes features through linear layers to ensure consistent dimensions, followed by concatenation. Bilinear & Additive through linear layers to ensure consistent dimensions, and combines modality information through element-wise summation. Concat Fusion concatenates features from the three modalities directly. The results demonstrate that MKAF outperforms other fusion methods, achieving $86.57\%$ AP and $26.70\%$ AVG mAP. This demonstrates the superiority of MKAF for multi-modality fusion.
2025/CMHKF_ Cross-Modality Heterogeneous Knowledge Fusion for Weakly Supervised Video Anomaly Detection/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:751082f4a3b638d3b62ad7a0db8293dc86b2730987edef5f63b530da69568c47
3
+ size 678576
2025/CMHKF_ Cross-Modality Heterogeneous Knowledge Fusion for Weakly Supervised Video Anomaly Detection/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/CONFETTI_ Conversational Function-Calling Evaluation Through Turn-Level Interactions/30ac32e0-3901-4494-8422-c9487e1d3e1e_content_list.json ADDED
@@ -0,0 +1,2028 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "CONFETTI: Conversational Function-Calling Evaluation Through Turn-Level Interactions",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 200,
8
+ 89,
9
+ 800,
10
+ 130
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Tamer Alkhouli, Katerina Margatina, James Gung, Raphael Shu, Claudia Zaghi, Monica Sunkara, Yi Zhang {alkhouli, katemarg, gungj, zhongzhu, sunkaral, yizhngn} $@$ amazon.com AWS AI Labs",
17
+ "bbox": [
18
+ 201,
19
+ 152,
20
+ 794,
21
+ 219
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 260,
31
+ 260,
32
+ 339,
33
+ 275
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "We introduce Conversational Function-Calling Evaluation Through Turn-Level Interactions (CONFETTI), a conversational benchmark designed to evaluate the function-calling capabilities and response quality of large language models (LLMs). Current benchmarks lack comprehensive assessment of LLMs in complex conversational scenarios. CONFETTI addresses this gap through 109 human-simulated conversations, comprising 313 user turns and covering 86 APIs. These conversations explicitly target various conversational complexities, such as follow-ups, goal correction and switching, ambiguous and implicit goals. We perform off-policy turn-level evaluation using this benchmark targeting function-calling. Our benchmark also incorporates dialog act annotations to assess agent responses. We evaluate a series of state-of-the-art LLMs and analyze their performance with respect to the number of available APIs, conversation lengths, and chained function calling. Our results reveal that while some models are able to handle long conversations, and leverage more than $20+$ APIs successfully, other models struggle with longer context or when increasing the number of APIs. We also report that the performance on chained function-calls is severely limited across the models. Overall, the top performing models on CONFETTI are Nova Pro $(40.01\\%)$ , Claude Sonnet v3.5 $(35.46\\%)$ and Llama 3.1 405B $(33.19\\%)$ followed by command-r-plus $(31.18\\%)$ and Mistral-Large-2407 $(30.07\\%)$ .",
40
+ "bbox": [
41
+ 115,
42
+ 311,
43
+ 489,
44
+ 810
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 Introduction",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 114,
54
+ 822,
55
+ 260,
56
+ 838
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Function-calling has emerged recently as one of the notable capabilities of large language models (LLMs) (Schick et al., 2023; Yao et al., 2023; Qin",
63
+ "bbox": [
64
+ 112,
65
+ 848,
66
+ 487,
67
+ 898
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "et al., 2024; Patil et al., 2024). To generate a function call, LLMs are provided with a list of available functions, including function descriptions, schema, parameter names and types. When provided with natural language input, LLMs can generate appropriate function calls to fulfill user requests. Our work specifically examines interactive conversational scenarios where the user and the system engage in dynamic dialogue. These conversations evolve through multiple turns, including follow-up questions, requests for clarification, and confirmation checks, creating what we define as a conversation trajectory.",
74
+ "bbox": [
75
+ 507,
76
+ 260,
77
+ 885,
78
+ 470
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "There can be multiple conversation trajectories that achieve the same user goals. This variation adds complexity to evaluating models in conversational multi-turn sessions. There are several ways to perform automatic evaluation in conversational settings. First, the evaluation setup can use a user simulator to automate interaction with the model dynamically, where user utterances are simulated online (Asri et al., 2016; Lu et al., 2024; Sekulic et al., 2024; Yoon et al., 2024). This adds flexibility to the evaluation to accommodate potential variations in the conversation trajectories. However, the evaluation will be subject to potential errors stemming from the user simulator itself, which can obscure the actual performance of the model. Alternatively, user utterances can be determined prior to the conversation session to achieve one or more user goals (Mao et al., 2024). This, however, assumes the trajectory will follow a certain path, with deviations ending up being penalized. A third approach is to evaluate conversations on the turn-level. This is done in offline mode where the history is set to the ground-truth trajectory up to the current turn in the conversation. Although it is done offline, it isolates the behavior of the model at each turn, and allows for a direct comparison between predictions and ground-truth labels. In this work, we follow the third approach.",
85
+ "bbox": [
86
+ 507,
87
+ 472,
88
+ 885,
89
+ 921
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "page_footnote",
95
+ "text": "<https://github.com/amazon-science/confetti>",
96
+ "bbox": [
97
+ 134,
98
+ 906,
99
+ 462,
100
+ 920
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "page_number",
106
+ "text": "7993",
107
+ "bbox": [
108
+ 480,
109
+ 927,
110
+ 519,
111
+ 940
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "footer",
117
+ "text": "Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 7993-8006 July 27 - August 1, 2025 ©2025 Association for Computational Linguistics",
118
+ "bbox": [
119
+ 90,
120
+ 945,
121
+ 907,
122
+ 971
123
+ ],
124
+ "page_idx": 0
125
+ },
126
+ {
127
+ "type": "image",
128
+ "img_path": "images/b32b905fc890fc89fbfe54024b8f1aacf3eef6965bc112dad7d989758e280493.jpg",
129
+ "image_caption": [
130
+ "Figure 1: CONFETTI comprises multi-turn conversations between a user and an agent. The agent has access to a set of APIs (tools) to assist the user with their request. The agent can invoke actions and receive observations from the environment. Each agent turn is annotated with a dialog act tag used to evaluate response quality. The figure illustrates the flow of a conversation, including user inputs, agent responses, API calls, and dialog act annotations."
131
+ ],
132
+ "image_footnote": [],
133
+ "bbox": [
134
+ 142,
135
+ 99,
136
+ 853,
137
+ 470
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "Our contributions are as follows:",
144
+ "bbox": [
145
+ 132,
146
+ 590,
147
+ 379,
148
+ 605
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "list",
154
+ "sub_type": "text",
155
+ "list_items": [
156
+ "- We introduce a conversational function-calling benchmark targeting conversation phenomena such as follow-ups, goal correction and switching, ambiguous and implicit goals, over- and underfilling of parameters, etc. Figure 1 illustrates an example.",
157
+ "- We propose response quality evaluation to evaluate both function-calling and non-function calling responses via dialog act classification, categorizing responses as seeking information, providing information, rejecting requests or calling functions.",
158
+ "- We compare state-of-the-art LLMs, from various model providers, showcasing their potentials and gaps on conversational function-calling."
159
+ ],
160
+ "bbox": [
161
+ 134,
162
+ 625,
163
+ 489,
164
+ 921
165
+ ],
166
+ "page_idx": 1
167
+ },
168
+ {
169
+ "type": "text",
170
+ "text": "2 Related Work",
171
+ "text_level": 1,
172
+ "bbox": [
173
+ 509,
174
+ 589,
175
+ 665,
176
+ 604
177
+ ],
178
+ "page_idx": 1
179
+ },
180
+ {
181
+ "type": "text",
182
+ "text": "ToolSandbox (Lu et al., 2024) offers an end-to-end evaluation approach, where the authors employ a dynamic user simulator with intermediate milestones to evaluate trajectories. The dataset lacks in domain diversity and complexity, focusing on productivity tools. API-Bank (Li et al., 2023) covers multi-turn dialog and performs API executions. Tooltalk (Farn and Shin, 2023) performs turn-level evaluations, and ToolEmu (Ruan et al., 2024) mocks API responses, similar to our approach. AgentsBench (Liu et al., 2023a) offers open-ended dialog evaluation of LLMs as Agents for Code, Gaming, and Web environments. PlatoLM (Kong et al., 2024) proposes to train a user simulator and synthesize conversations as training data.",
183
+ "bbox": [
184
+ 507,
185
+ 615,
186
+ 884,
187
+ 871
188
+ ],
189
+ "page_idx": 1
190
+ },
191
+ {
192
+ "type": "text",
193
+ "text": "BFCL v3 (Mao et al., 2024) targets evaluating function-calling capabilities in single- and multi-turn settings. Its multi-turn dataset is closely re",
194
+ "bbox": [
195
+ 507,
196
+ 873,
197
+ 884,
198
+ 921
199
+ ],
200
+ "page_idx": 1
201
+ },
202
+ {
203
+ "type": "page_number",
204
+ "text": "7994",
205
+ "bbox": [
206
+ 480,
207
+ 927,
208
+ 521,
209
+ 940
210
+ ],
211
+ "page_idx": 1
212
+ },
213
+ {
214
+ "type": "text",
215
+ "text": "lated to our work. There are however several differences. While the BFCL multi-turn data is model-generated and validated by a human, our data is completely generated by human annotators. This avoids potential bias towards certain model families. Second, our collection targeted multiple conversational complexities such as confirmations, follow-ups, and elicitation as part of the natural flow of the conversations. BFCL offers a subset where parameters are missing to induce elicitation. Third, we include 3-25 functions to predict from at each turn, aiming to reveal model capabilities under varying number of functions provided.",
216
+ "bbox": [
217
+ 110,
218
+ 84,
219
+ 489,
220
+ 294
221
+ ],
222
+ "page_idx": 2
223
+ },
224
+ {
225
+ "type": "text",
226
+ "text": "There have been numerous studies on dialog act modeling (Stolcke et al., 2000) and classification (Ahmadvand et al., 2019; Kim and Kim, 2018; Liu et al., 2017; Chakravarty et al., 2019; Duran et al., 2023). In this work, we use an LLM-based approach to classify agent dialog acts into 5 labels.",
227
+ "bbox": [
228
+ 112,
229
+ 294,
230
+ 489,
231
+ 391
232
+ ],
233
+ "page_idx": 2
234
+ },
235
+ {
236
+ "type": "text",
237
+ "text": "LLM as a judge (Wang et al., 2023; Pan et al., 2024; Liu et al., 2023b; Zheng et al., 2023) has been explored recently. In this work, we leverage LLMs as a means to detect parameter hallucinations.",
238
+ "bbox": [
239
+ 112,
240
+ 392,
241
+ 489,
242
+ 456
243
+ ],
244
+ "page_idx": 2
245
+ },
246
+ {
247
+ "type": "text",
248
+ "text": "3 CONFETTI",
249
+ "text_level": 1,
250
+ "bbox": [
251
+ 112,
252
+ 470,
253
+ 257,
254
+ 486
255
+ ],
256
+ "page_idx": 2
257
+ },
258
+ {
259
+ "type": "text",
260
+ "text": "3.1 Data Collection",
261
+ "text_level": 1,
262
+ "bbox": [
263
+ 112,
264
+ 500,
265
+ 282,
266
+ 514
267
+ ],
268
+ "page_idx": 2
269
+ },
270
+ {
271
+ "type": "text",
272
+ "text": "Complexities Following Gung et al. (2023), to ensure that the conversations in our benchmark cover a broad range of interaction patterns, we define a set of complexities that may be observed in real world interaction with conversational function calling systems. These complexities, defined in Table 1, are used as an input to the conversation authoring process with a target distribution enforced by requiring at least one complexity for each conversation. For example, if EXCEPTIONINEXECUTION is assigned as a required complexity in a conversation, at least one function call must have an error response for it to be considered valid. Annotators are also asked to label the complexities that appear in their conversations for tracking purposes.",
273
+ "bbox": [
274
+ 112,
275
+ 521,
276
+ 489,
277
+ 778
278
+ ],
279
+ "page_idx": 2
280
+ },
281
+ {
282
+ "type": "text",
283
+ "text": "APIs We curated a broad range of APIs across application areas such as issue tracking, travel booking, human resources, and meetings management. Each API contains a set of function definitions with schemas defining valid inputs and outputs for each function. APIs do not have explicit implementations in our benchmark, but instead have fixed outputs defined in each conversation.",
284
+ "bbox": [
285
+ 112,
286
+ 791,
287
+ 489,
288
+ 921
289
+ ],
290
+ "page_idx": 2
291
+ },
292
+ {
293
+ "type": "text",
294
+ "text": "Scenario Generation Each conversation is seeded with a set of required and optional APIs, a required complexity, a reference time the conversation is to take place, and a minimum number of turns. Based on these inputs, a scenario is defined that describes one or more user goals for the conversation in natural language. Authoring valid scenarios requires defining a realistic request that can be resolved given the available APIs and integrating the assigned complexity. Due to the difficulty of this task, we separated the authoring of scenarios from conversations, only allowing conversations to be instantiated for scenarios after they were reviewed by trusted annotators.",
295
+ "bbox": [
296
+ 507,
297
+ 84,
298
+ 884,
299
+ 309
300
+ ],
301
+ "page_idx": 2
302
+ },
303
+ {
304
+ "type": "text",
305
+ "text": "Conversation Generation Conversation authors play the role of both the user and the agent, enacting the pre-defined scenario by entering user turns, agent turns, and function calls that meet the required complexities and align with the scenario description. Authors use dynamically-generated forms in the annotation UI to create valid function calls, which are validated upon submission to ensure the authored values are valid for the function input schema at hand. Upon submission of a function call and selection of a desired response type (i.e. success code vs. error codes), the return value is simulated using an internal model based on the function description, input/output schema, and input values.",
306
+ "bbox": [
307
+ 507,
308
+ 319,
309
+ 884,
310
+ 561
311
+ ],
312
+ "page_idx": 2
313
+ },
314
+ {
315
+ "type": "text",
316
+ "text": "Dialog Acts Following conversation generation, we asked annotators to label agent turns using one or more of the following dialog acts:",
317
+ "bbox": [
318
+ 507,
319
+ 571,
320
+ 882,
321
+ 619
322
+ ],
323
+ "page_idx": 2
324
+ },
325
+ {
326
+ "type": "list",
327
+ "sub_type": "text",
328
+ "list_items": [
329
+ "- Agent seeking information (seek_info): targets responses that elicit information from the user, whether it is intent elicitation, parameter elicitation, or asking for clarification or confirmation.",
330
+ "- Agent informing user (inform): targets responses that provide information to the user, whether the information is general or specific to the function-calling results.",
331
+ "- Agent rejecting request (reject): targets responses that reject the user request.",
332
+ "- Other: any response that does not belong to the previous dialog acts."
333
+ ],
334
+ "bbox": [
335
+ 531,
336
+ 632,
337
+ 884,
338
+ 876
339
+ ],
340
+ "page_idx": 2
341
+ },
342
+ {
343
+ "type": "text",
344
+ "text": "Note that the agent response can including multiple dialog acts. We ensure that the annotators try",
345
+ "bbox": [
346
+ 507,
347
+ 889,
348
+ 882,
349
+ 921
350
+ ],
351
+ "page_idx": 2
352
+ },
353
+ {
354
+ "type": "page_number",
355
+ "text": "7995",
356
+ "bbox": [
357
+ 480,
358
+ 927,
359
+ 519,
360
+ 940
361
+ ],
362
+ "page_idx": 2
363
+ },
364
+ {
365
+ "type": "table",
366
+ "img_path": "images/9ef04f76d26652133df2e484d83b3682a81e62bf618dfbb536a0af8625048c71.jpg",
367
+ "table_caption": [],
368
+ "table_footnote": [],
369
+ "table_body": "<table><tr><td>COMPLEXITY</td><td># DIALOGS</td><td>DESCRIPTION</td></tr><tr><td>EXCEPTIONINEXECUTION</td><td>5</td><td>Errors or exceptions that occur during the execution of an action</td></tr><tr><td>FAILEDCONVERSATION</td><td>5</td><td>Interactions where the intended goal is not achieved</td></tr><tr><td>CONFIRMATION</td><td>6</td><td>Requesting user approval before executing an action</td></tr><tr><td>GOALSWITCHING</td><td>6</td><td>When the user changes their objective during the conversation</td></tr><tr><td>NOTARGETCOMPLEXITY</td><td>6</td><td>Conversations without specific complexity requirements</td></tr><tr><td>GOALCORRECTION</td><td>7</td><td>Adjusting or refining the user&#x27;s goal based on feedback</td></tr><tr><td>GOALSTACKING</td><td>7</td><td>Managing multiple user objectives simultaneously</td></tr><tr><td>AMBIGUOUSGOAL</td><td>9</td><td>When the user&#x27;s intention is unclear and requires clarification</td></tr><tr><td>FOLLOWUPQUESTION</td><td>10</td><td>Additional queries or requests for information after the initial response</td></tr><tr><td>IMPLICITDESCRIPTIVEGOAL</td><td>10</td><td>The user describes a problem/background without directly stating their goal</td></tr><tr><td>OVERFILL</td><td>11</td><td>Providing more information than required for an action</td></tr><tr><td>UNDERFILL</td><td>11</td><td>Missing required arguments or information for an action</td></tr><tr><td>GOALNOTSUPPORTED</td><td>15</td><td>The user&#x27;s request is not supported by the available tools or is out of scope</td></tr></table>",
370
+ "bbox": [
371
+ 122,
372
+ 80,
373
+ 873,
374
+ 253
375
+ ],
376
+ "page_idx": 3
377
+ },
378
+ {
379
+ "type": "text",
380
+ "text": "to assign a single label before opting for multiple labels.",
381
+ "bbox": [
382
+ 112,
383
+ 303,
384
+ 485,
385
+ 332
386
+ ],
387
+ "page_idx": 3
388
+ },
389
+ {
390
+ "type": "text",
391
+ "text": "3.2 Benchmark Design",
392
+ "text_level": 1,
393
+ "bbox": [
394
+ 114,
395
+ 350,
396
+ 310,
397
+ 366
398
+ ],
399
+ "page_idx": 3
400
+ },
401
+ {
402
+ "type": "text",
403
+ "text": "After the data collection, we convert the conversations into input/output pairs. We split the data into two benchmarks: function-calling benchmark, and response quality benchmark. The function-calling conversational benchmark is defined at the turn-level, where we truncate the conversations at each function-calling turn, and provide the preceding user turns, agent turns, function calls and function results as context. The output is set to be one or more function calls. We extract all function-calling turns from each conversation to construct the dataset. We also include the API schemas of the APIs the agent can choose from. The dataset has a total of 506 examples. Table 2 shows the data statistics.",
404
+ "bbox": [
405
+ 112,
406
+ 375,
407
+ 489,
408
+ 613
409
+ ],
410
+ "page_idx": 3
411
+ },
412
+ {
413
+ "type": "text",
414
+ "text": "Similarly, we define the response quality benchmark at the turn-level. However, instead of truncating conversations at function-calling turns, we extract all agent turns as output turns. The input is set to the preceding user turns, agent turns, and function calls and results, as in the conversational function-calling benchmark, and the API schema of available APIs to call is provided as well. However, the output turns can be function-calling turns or textual agent responses. We limit the number of function-calling turns to 200 to maintain label balance in this dataset. The statistics are given in Table 3.",
415
+ "bbox": [
416
+ 112,
417
+ 617,
418
+ 489,
419
+ 825
420
+ ],
421
+ "page_idx": 3
422
+ },
423
+ {
424
+ "type": "text",
425
+ "text": "4 Evaluation Metrics",
426
+ "text_level": 1,
427
+ "bbox": [
428
+ 112,
429
+ 844,
430
+ 314,
431
+ 859
432
+ ],
433
+ "page_idx": 3
434
+ },
435
+ {
436
+ "type": "text",
437
+ "text": "We leverage abstract syntax trees (AST) to evaluate function-calling turns similar to BFCL v2. For response quality, we resort to dialog acts.",
438
+ "bbox": [
439
+ 112,
440
+ 873,
441
+ 487,
442
+ 921
443
+ ],
444
+ "page_idx": 3
445
+ },
446
+ {
447
+ "type": "table",
448
+ "img_path": "images/5be061aa288edb95797ca107b2cabed7cad793501bae65c4d65722f597a99532.jpg",
449
+ "table_caption": [
450
+ "Table 1: The distribution and description of the complexities covered in the CONFETTI benchmark."
451
+ ],
452
+ "table_footnote": [],
453
+ "table_body": "<table><tr><td>DIMENSION</td><td>COUNT</td></tr><tr><td># conversations</td><td>109</td></tr><tr><td># APIs</td><td>86</td></tr><tr><td># user turns</td><td>313</td></tr><tr><td># agent turns w/ 1 action</td><td>220</td></tr><tr><td># agent turns w/ 2 actions</td><td>46</td></tr><tr><td># agent turns w/ 3+ actions</td><td>47</td></tr><tr><td>Avg turns per conversation</td><td>8.8</td></tr><tr><td># total turns</td><td>506</td></tr></table>",
454
+ "bbox": [
455
+ 569,
456
+ 299,
457
+ 823,
458
+ 419
459
+ ],
460
+ "page_idx": 3
461
+ },
462
+ {
463
+ "type": "table",
464
+ "img_path": "images/bd3a47f3e38dc059c34346398fa4d2d81cf3b6b754764d3e1b1966cb61f7a078.jpg",
465
+ "table_caption": [
466
+ "Table 2: Function-calling benchmark statistics."
467
+ ],
468
+ "table_footnote": [],
469
+ "table_body": "<table><tr><td>DIMENSION</td><td>COUNT</td></tr><tr><td># turns calling functions</td><td>200</td></tr><tr><td># turns informing user</td><td>331</td></tr><tr><td># turns seeking information</td><td>110</td></tr><tr><td># turns rejecting requests</td><td>32</td></tr><tr><td># other/misc. turns</td><td>25</td></tr><tr><td># total turns</td><td>663</td></tr></table>",
470
+ "bbox": [
471
+ 569,
472
+ 457,
473
+ 821,
474
+ 551
475
+ ],
476
+ "page_idx": 3
477
+ },
478
+ {
479
+ "type": "text",
480
+ "text": "Table 3: Response quality benchmark statistics: note a turn can have one or more dialog act labels.",
481
+ "bbox": [
482
+ 507,
483
+ 561,
484
+ 880,
485
+ 590
486
+ ],
487
+ "page_idx": 3
488
+ },
489
+ {
490
+ "type": "text",
491
+ "text": "4.1 Function-Calling Evaluation Metrics",
492
+ "text_level": 1,
493
+ "bbox": [
494
+ 507,
495
+ 615,
496
+ 843,
497
+ 631
498
+ ],
499
+ "page_idx": 3
500
+ },
501
+ {
502
+ "type": "text",
503
+ "text": "AST Soft AST evaluation parses the function name, parameter names and values as a tree, and matches each of the tree nodes to the ground-truth reference function call in a binary fashion. Since the dataset includes many APIs that accept string-type input, we use soft scoring to calculating parameter value matching for string types. We use AlignScore (Zha et al., 2023) to calculate the matching accuracy for string parameter values. All nonstring parameter values are evaluated in a binary fashion.",
504
+ "bbox": [
505
+ 505,
506
+ 637,
507
+ 882,
508
+ 813
509
+ ],
510
+ "page_idx": 3
511
+ },
512
+ {
513
+ "type": "text",
514
+ "text": "Parameter Hallucination We also perform an analysis on how often the models hallucinate parameters at the action calls. We use an off-the-shelf LLM to do hallucination detection. The prompt includes the conversation history, the predicted action call (or chain of action calls) and their schemas,",
515
+ "bbox": [
516
+ 507,
517
+ 825,
518
+ 884,
519
+ 920
520
+ ],
521
+ "page_idx": 3
522
+ },
523
+ {
524
+ "type": "page_number",
525
+ "text": "7996",
526
+ "bbox": [
527
+ 480,
528
+ 928,
529
+ 519,
530
+ 940
531
+ ],
532
+ "page_idx": 3
533
+ },
534
+ {
535
+ "type": "text",
536
+ "text": "and instruct the LLM judge to return a list of hallucinated parameters (if any) for each action call, along with a rationale. We use gpt-4o-mini as an LLM judge to avoid bias in the evaluation. The exact prompt is shown in the Appendix A.",
537
+ "bbox": [
538
+ 112,
539
+ 84,
540
+ 487,
541
+ 164
542
+ ],
543
+ "page_idx": 4
544
+ },
545
+ {
546
+ "type": "text",
547
+ "text": "Given a sequence of gold actions $\\mathcal{A}_{\\mathrm{g}}$ and predicted actions $\\tilde{\\mathcal{A}}$ corresponding to the input context sequence $\\mathcal{C}$ , and denoting $\\tilde{\\alpha}_t$ as the predicted action for the $t$ -th example, we calculate the parameter validity rate on the parameter level using the following formula.",
548
+ "bbox": [
549
+ 112,
550
+ 166,
551
+ 487,
552
+ 261
553
+ ],
554
+ "page_idx": 4
555
+ },
556
+ {
557
+ "type": "equation",
558
+ "text": "\n$$\n\\sum_ {(\\tilde {a} _ {t}, a _ {t}, c _ {t}) \\in (\\tilde {\\mathcal {A}}, \\mathcal {A} _ {g}, \\mathcal {C})} \\sum_ {\\theta \\in \\tilde {a} _ {t}} \\frac {\\mathbb {1} (\\tilde {a} _ {t} \\text {i s v a l i d}) \\times f (\\theta ; c _ {t} , a _ {t})}{| \\{\\hat {\\theta} | \\hat {\\theta} \\in \\tilde {a} _ {t} , \\forall \\tilde {a} _ {t} \\in \\tilde {\\mathcal {A}} \\} |}\n$$\n",
559
+ "text_format": "latex",
560
+ "bbox": [
561
+ 115,
562
+ 275,
563
+ 485,
564
+ 319
565
+ ],
566
+ "page_idx": 4
567
+ },
568
+ {
569
+ "type": "text",
570
+ "text": "Where $\\mathbb{1}$ is the indicator function. We define valid actions as predicted actions whose name matches the ground-truth action. $f(\\theta ;c_t,a_t)\\in \\{0,1\\}$ is the binary outcome of the LLM classifier judging the validity of parameter $\\theta$ given the context $c_{t}$ and gold action $a_{t}$ . The denominator denotes all predicted parameters of valid predicted actions.",
571
+ "bbox": [
572
+ 112,
573
+ 332,
574
+ 485,
575
+ 447
576
+ ],
577
+ "page_idx": 4
578
+ },
579
+ {
580
+ "type": "text",
581
+ "text": "4.2 Response Quality Evaluation via Dialog Acts",
582
+ "text_level": 1,
583
+ "bbox": [
584
+ 112,
585
+ 461,
586
+ 472,
587
+ 491
588
+ ],
589
+ "page_idx": 4
590
+ },
591
+ {
592
+ "type": "text",
593
+ "text": "Calculating response quality on the textual responses directly is challenging. While there are many ways to calculate similarity between two texts, we resort to a coarse-grained response evaluation via dialog acts. To this end, we leverage dialog act annotations provided by the annotators for each agent response in the ground-truth conversations. In order to evaluate online agent responses, we use an LLM-based dialog act classifier that is prompted to generate one or more of the dialog acts for an agent response.",
594
+ "bbox": [
595
+ 112,
596
+ 500,
597
+ 487,
598
+ 677
599
+ ],
600
+ "page_idx": 4
601
+ },
602
+ {
603
+ "type": "text",
604
+ "text": "5 Experiments",
605
+ "text_level": 1,
606
+ "bbox": [
607
+ 112,
608
+ 692,
609
+ 260,
610
+ 709
611
+ ],
612
+ "page_idx": 4
613
+ },
614
+ {
615
+ "type": "text",
616
+ "text": "We implemented the benchmark as an extension to BFCL v2. We compare Claude Sonnet v3.5, Sonnet v3, Haiku v3, Llama 3.1 70B and 405B, Llama 3 70B, Mistral large, and the Command-plus-r models. We distinguish between using the tool use option in the API vs using direct prompting. The difference is that in the tool use case, the API handles the function call parsing, while in the direct prompting case, the function schemas and parsing are handled explicitly by the user. We use",
617
+ "bbox": [
618
+ 112,
619
+ 721,
620
+ 487,
621
+ 882
622
+ ],
623
+ "page_idx": 4
624
+ },
625
+ {
626
+ "type": "table",
627
+ "img_path": "images/dd10e74a02fdd6b1dce63e28464ad368e0fa8ba93e2295f8b2cda8d99818a411.jpg",
628
+ "table_caption": [],
629
+ "table_footnote": [],
630
+ "table_body": "<table><tr><td>MODEL</td><td>PROVIDER</td><td>AST SOFT (%)</td></tr><tr><td>Nova Pro</td><td>Amazon</td><td>40.91</td></tr><tr><td>Nova Micro</td><td>Amazon</td><td>33.97</td></tr><tr><td>claude-3-5-sonnet</td><td>Anthropic</td><td>35.46</td></tr><tr><td>claude-3-5-haiku†</td><td>Anthropic</td><td>31.25</td></tr><tr><td>claude-3-sonnet</td><td>Anthropic</td><td>22.63</td></tr><tr><td>claude-3-haiku</td><td>Anthropic</td><td>18.30</td></tr><tr><td>llama3-1-405b-instruct</td><td>Meta</td><td>33.19</td></tr><tr><td>llama3-1-70b-instruct</td><td>Meta</td><td>31.29</td></tr><tr><td>llama3-70b-instruct</td><td>Meta</td><td>27.19</td></tr><tr><td>mistral-large-2407†</td><td>Mistral</td><td>30.07</td></tr><tr><td>command-r-plus†</td><td>Cohere</td><td>31.18</td></tr></table>",
631
+ "bbox": [
632
+ 512,
633
+ 80,
634
+ 880,
635
+ 244
636
+ ],
637
+ "page_idx": 4
638
+ },
639
+ {
640
+ "type": "text",
641
+ "text": "Table 4: Model AST soft scores for the conversational function-calling dataset where chained actions are teacher-forced. $\\dagger$ indicates using tool-use formatting.",
642
+ "bbox": [
643
+ 507,
644
+ 253,
645
+ 882,
646
+ 311
647
+ ],
648
+ "page_idx": 4
649
+ },
650
+ {
651
+ "type": "text",
652
+ "text": "Bedrock's Converse API to conduct these experiments<sup>3</sup>. We use the ALIGNSCORE-BASE model to calculate soft scores between string parameter values for the AST soft accuracy metric.<sup>4</sup>. Table 9 and Table 10 in Appendix A indicate the prompts used to generate predictions for the function-calling and response quality benchmarks, respectively. All experiments are run with temperature 0.",
653
+ "bbox": [
654
+ 507,
655
+ 337,
656
+ 882,
657
+ 467
658
+ ],
659
+ "page_idx": 4
660
+ },
661
+ {
662
+ "type": "text",
663
+ "text": "5.1 Function-calling Performance",
664
+ "text_level": 1,
665
+ "bbox": [
666
+ 507,
667
+ 479,
668
+ 789,
669
+ 493
670
+ ],
671
+ "page_idx": 4
672
+ },
673
+ {
674
+ "type": "text",
675
+ "text": "Table 4 shows function-calling results measured in terms of AST soft accuracy across the different models. We observe Nova Pro $(40.91\\%)$ and Claude Sonnet v3.5 $(35.46\\%)$ among the top performing models, followed by Nova Micro $(33.97\\%)$ , Llama 3.1 405B models $(33.19\\%)$ , Llama 3.1 70B $(31.29\\%)$ , Commandr-plus $(31.18\\%)$ and Mistral Large $(30.07\\%)$ . Smaller models such as Nova Micro $(33.97\\%)$ and Haiku v3.5 $(31.25\\%)$ perform relatively well compared to the others.",
676
+ "bbox": [
677
+ 507,
678
+ 500,
679
+ 882,
680
+ 677
681
+ ],
682
+ "page_idx": 4
683
+ },
684
+ {
685
+ "type": "text",
686
+ "text": "5.2 Impact of # of APIs",
687
+ "text_level": 1,
688
+ "bbox": [
689
+ 507,
690
+ 689,
691
+ 709,
692
+ 703
693
+ ],
694
+ "page_idx": 4
695
+ },
696
+ {
697
+ "type": "text",
698
+ "text": "We split the data according to the number of APIs included. Figure 2 shows that while some models such as Nova Pro, Nova Micro, Claude 3.5 Haiku and Mistral large are able to handle $20+$ APIs, there is a tendency towards lower performance across the rest of the models when increasing the number of APIs. There are two implications associated with",
699
+ "bbox": [
700
+ 507,
701
+ 711,
702
+ 880,
703
+ 824
704
+ ],
705
+ "page_idx": 4
706
+ },
707
+ {
708
+ "type": "page_footnote",
709
+ "text": "3There are two modes of calling the API, with tool use or without. In the tool use case, the tool schemas are passed as an API argument, as opposed to concatenating the schema to the prompt directly. We experimented with both, where we use $\\dagger$ to indicate model called using the tool use option. We report the best of the two modes for each model.",
710
+ "bbox": [
711
+ 507,
712
+ 834,
713
+ 880,
714
+ 906
715
+ ],
716
+ "page_idx": 4
717
+ },
718
+ {
719
+ "type": "page_footnote",
720
+ "text": "<sup>4</sup>https://github.com/yuh-zha/AlignScore",
721
+ "bbox": [
722
+ 532,
723
+ 906,
724
+ 821,
725
+ 919
726
+ ],
727
+ "page_idx": 4
728
+ },
729
+ {
730
+ "type": "page_footnote",
731
+ "text": "$^{2}$ https://github.com/ShishirPatil/gorilla/tree/main/berkeley-function-call-leaderboard",
732
+ "bbox": [
733
+ 112,
734
+ 894,
735
+ 485,
736
+ 919
737
+ ],
738
+ "page_idx": 4
739
+ },
740
+ {
741
+ "type": "page_number",
742
+ "text": "7997",
743
+ "bbox": [
744
+ 480,
745
+ 927,
746
+ 519,
747
+ 940
748
+ ],
749
+ "page_idx": 4
750
+ },
751
+ {
752
+ "type": "image",
753
+ "img_path": "images/b60e4dcc02e5f1a2604f373e2d57abc6d205e9d86562677f8bab8a4bba8a24b6.jpg",
754
+ "image_caption": [
755
+ "Figure 2: AST soft accuracy for different models across various number of APIs. The dataset has 144 examples with 1-9 APIs, 154 examples of 10-19 APIs and 15 examples of $20+$ APIs."
756
+ ],
757
+ "image_footnote": [],
758
+ "bbox": [
759
+ 89,
760
+ 82,
761
+ 843,
762
+ 332
763
+ ],
764
+ "page_idx": 5
765
+ },
766
+ {
767
+ "type": "image",
768
+ "img_path": "images/46e65c4eb4fb5dd8318d7dbc735657281cb4ff452c0d51c314ee29c2adb8f424.jpg",
769
+ "image_caption": [
770
+ "Figure 3: AST soft accuracy for different models across various context lengths. The dataset has 174 examples with 1-5 user turns, 114 examples of 6-10 user turns and 25 examples of $11+$ user turns."
771
+ ],
772
+ "image_footnote": [],
773
+ "bbox": [
774
+ 92,
775
+ 382,
776
+ 840,
777
+ 703
778
+ ],
779
+ "page_idx": 5
780
+ },
781
+ {
782
+ "type": "text",
783
+ "text": "increasing the number of tools: First, since the API schemas go into the prompt, more tools imply longer prompts. Second, more APIs provide higher chances of the model making a mistake since it has more choices to select from. In general, including more tools lead to performance degradation. This applies to Claude, Llama and Command-r-plus models.",
784
+ "bbox": [
785
+ 112,
786
+ 765,
787
+ 492,
788
+ 897
789
+ ],
790
+ "page_idx": 5
791
+ },
792
+ {
793
+ "type": "text",
794
+ "text": "5.3 Context Length Analysis",
795
+ "text_level": 1,
796
+ "bbox": [
797
+ 507,
798
+ 765,
799
+ 752,
800
+ 784
801
+ ],
802
+ "page_idx": 5
803
+ },
804
+ {
805
+ "type": "text",
806
+ "text": "Figure 3 shows results split according to the conversation length, measured by indicating the number of user turns. We observe that while some models such as Nova Pro, Nova Micro, Llama 3.1 405B and 70B are able to perform well on long conversations, smaller models such as Haiku v3 struggle to perform well on longer conversations. We also note that Llama 405B appears to perform better",
807
+ "bbox": [
808
+ 507,
809
+ 791,
810
+ 885,
811
+ 921
812
+ ],
813
+ "page_idx": 5
814
+ },
815
+ {
816
+ "type": "page_number",
817
+ "text": "7998",
818
+ "bbox": [
819
+ 480,
820
+ 927,
821
+ 521,
822
+ 941
823
+ ],
824
+ "page_idx": 5
825
+ },
826
+ {
827
+ "type": "text",
828
+ "text": "on longer conversations. This can be an artifact of off-policy evaluation, where the gold-truth conversation context is leveraged by those models for indirect in-context learning, hence improving their predictions as the context length increases. Claude Sonnet v3.5 and Mistral Large perform well up to 10 user turns, but then tend to degrade for longer conversations.",
829
+ "bbox": [
830
+ 112,
831
+ 84,
832
+ 489,
833
+ 212
834
+ ],
835
+ "page_idx": 6
836
+ },
837
+ {
838
+ "type": "text",
839
+ "text": "5.3.1 Chain Length Analysis",
840
+ "text_level": 1,
841
+ "bbox": [
842
+ 112,
843
+ 224,
844
+ 354,
845
+ 240
846
+ ],
847
+ "page_idx": 6
848
+ },
849
+ {
850
+ "type": "text",
851
+ "text": "We also investigate the performance on chained action calls, where the model is expected to perform multiple action calls before returning control to the user. For instance, when the model is asked to look up the number of remaining holiday days for an employee, it is expected to retrieve the employee id from the system prior to that call. The score of a chain $\\tilde{a}_1,\\tilde{a}_2,\\ldots ,\\tilde{a}_J$ of length $J$ actions given a conversation context $c$ is calculated as the product of AST soft accuracies for each of the individual actions: $p(\\tilde{a}_1,\\dots,\\tilde{a}_J|c) = \\prod_{j = 1}^{J}p(\\tilde{a}_j|a_1,\\dots,a_{j - 1},c)$ , where $p(\\tilde{a}_j|a_1,\\dots,a_{j - 1})$ is given by the AST soft accuracy conditioned on gold-truth previous function calls and function call results. Note that we perform teacher-forcing on the action level, where each action is predicted conditioned on the ground-truth previous actions and results.",
852
+ "bbox": [
853
+ 115,
854
+ 244,
855
+ 489,
856
+ 517
857
+ ],
858
+ "page_idx": 6
859
+ },
860
+ {
861
+ "type": "text",
862
+ "text": "Figure 4 shows the results across chains of lengths 1, 2, 3 and $4+$ . The results indicate that all models have much lower performance than predicting a single action. Claude Sonnet 3.5 demonstrates some ability to predict chains of length 2 with $(21.46\\%)$ success, followed by Nova Pro $(17.29\\%)$ , and Llama 3.1 405B $(16.39\\%)$ , while the rest of the models perform worse than $15\\%$ . For chains of length 3 and above, almost all models fail in most cases, except for Nova Pro which has $17.71\\%$ AST accuracy.",
863
+ "bbox": [
864
+ 112,
865
+ 519,
866
+ 489,
867
+ 696
868
+ ],
869
+ "page_idx": 6
870
+ },
871
+ {
872
+ "type": "text",
873
+ "text": "5.3.2 Response Quality via Dialog Acts",
874
+ "text_level": 1,
875
+ "bbox": [
876
+ 112,
877
+ 707,
878
+ 435,
879
+ 722
880
+ ],
881
+ "page_idx": 6
882
+ },
883
+ {
884
+ "type": "text",
885
+ "text": "To help understand where and how models fail, we compare model responses using coarse-grained dialog acts: inform user, seek information, reject request, function call, and other. We use an LLM classifier based on Claude Haiku v3 to classify the dialog acts of the model responses into one of these five categories. We report the classification performance on the ground-truth dataset in Table 5. The classifier predicts one or more dialog act labels for the model response, where the ground-truth annotations may include one or more dialog act labels. We note that the classifier has a high recall but low",
886
+ "bbox": [
887
+ 112,
888
+ 728,
889
+ 489,
890
+ 920
891
+ ],
892
+ "page_idx": 6
893
+ },
894
+ {
895
+ "type": "text",
896
+ "text": "precision. In our reporting, we declare a match if at least one of the predicted dialog acts matches any of the ground-truth labels. The classification prompt is given in Table 8 in Appendix A.",
897
+ "bbox": [
898
+ 507,
899
+ 84,
900
+ 884,
901
+ 149
902
+ ],
903
+ "page_idx": 6
904
+ },
905
+ {
906
+ "type": "table",
907
+ "img_path": "images/6e78cb01e35a7dc81d9c1259507f0c5cafd7702cf880dd326fb42a71e5040b58.jpg",
908
+ "table_caption": [],
909
+ "table_footnote": [],
910
+ "table_body": "<table><tr><td>METRIC</td><td>SCORE (%)</td></tr><tr><td>MULTI-LABEL PRECISION</td><td>67.2</td></tr><tr><td>MULTI-LABEL RECALL</td><td>90.3</td></tr><tr><td>MULTI-LABEL F1 SCORE</td><td>77.0</td></tr><tr><td>SINGLE-LABEL ACCURACY</td><td>92.8</td></tr></table>",
911
+ "bbox": [
912
+ 549,
913
+ 159,
914
+ 843,
915
+ 231
916
+ ],
917
+ "page_idx": 6
918
+ },
919
+ {
920
+ "type": "text",
921
+ "text": "Table 5: Dialog act classifier performance on gold-truth conversations. The classifier detects multiple labels which are compared to the multi-label ground-truth labels. For Single-label accuracy we calculate how often at least one predicted label matches one of the ground-truth labels.",
922
+ "bbox": [
923
+ 507,
924
+ 240,
925
+ 884,
926
+ 326
927
+ ],
928
+ "page_idx": 6
929
+ },
930
+ {
931
+ "type": "text",
932
+ "text": "In terms of dialog act accuracy, Claude Sonnet v3.5 (FC) is the best performing with $73.13\\%$ accuracy, followed closely by Nova Pro $(69.68\\%)$ , Haiku 3.5 $(67.12\\%)$ , Nova Micro $(66.21\\%)$ and command-r-plus $(64.86\\%)$ . Llama models perform worse than the rest. We further analyze the confusion matrix for the dialog acts in Figure 5. We omit the correct matches on the diagonals and focus on the mismatches. In general we see a tendency to confuse inform and seek information acts with function calls, indicating that the models are falsely triggering function calls, although to different extents depending on the model. This is showing to a large extent in the Llama 3.1 70B model. We also observe under-triggering of function calls where the models tend to inform the user or seek information rather than calling a function.",
933
+ "bbox": [
934
+ 507,
935
+ 342,
936
+ 884,
937
+ 617
938
+ ],
939
+ "page_idx": 6
940
+ },
941
+ {
942
+ "type": "text",
943
+ "text": "5.4 Parameter Hallucination Analysis",
944
+ "text_level": 1,
945
+ "bbox": [
946
+ 507,
947
+ 624,
948
+ 821,
949
+ 640
950
+ ],
951
+ "page_idx": 6
952
+ },
953
+ {
954
+ "type": "text",
955
+ "text": "Table 7 shows hallucination results for all models. We report parameter validity rate for the ground truth as a reference. We observe that Claude v3.5 Sonnet has the highest validity rate (72.4%), followed by Nova Pro (68.8%), Haiku 3.5 (66.1%), Command-R Plus (63.7%) and Llama 3.1 405B (62.7%). Claude Sonnet v3 and Haiku v3 have much lower scores.",
956
+ "bbox": [
957
+ 507,
958
+ 645,
959
+ 884,
960
+ 772
961
+ ],
962
+ "page_idx": 6
963
+ },
964
+ {
965
+ "type": "text",
966
+ "text": "6 Conclusion",
967
+ "text_level": 1,
968
+ "bbox": [
969
+ 507,
970
+ 783,
971
+ 640,
972
+ 797
973
+ ],
974
+ "page_idx": 6
975
+ },
976
+ {
977
+ "type": "text",
978
+ "text": "We introduced a conversational benchmark for function calling spanning multiple complexities natural to dialog. The dataset targets the evaluation of function calling and response quality. The benchmark includes over 80 API tools and tests function-calling up to $20+$ APIs under different conversation lengths. We evaluated top LLMs on",
979
+ "bbox": [
980
+ 507,
981
+ 808,
982
+ 882,
983
+ 921
984
+ ],
985
+ "page_idx": 6
986
+ },
987
+ {
988
+ "type": "page_number",
989
+ "text": "7999",
990
+ "bbox": [
991
+ 480,
992
+ 927,
993
+ 519,
994
+ 940
995
+ ],
996
+ "page_idx": 6
997
+ },
998
+ {
999
+ "type": "image",
1000
+ "img_path": "images/9bc3346817fc712c053ca33efea29a0dd7f7bff5d4407d1b33db70e37d9ca390.jpg",
1001
+ "image_caption": [
1002
+ "Figure 4: AST soft accuracy for different models across chain lengths. The dataset has 220 examples with chain length 1, 46 examples with chain length 2, 25 examples with chain length 3, and 22 examples with chain length $4+$ ."
1003
+ ],
1004
+ "image_footnote": [],
1005
+ "bbox": [
1006
+ 131,
1007
+ 80,
1008
+ 872,
1009
+ 399
1010
+ ],
1011
+ "page_idx": 7
1012
+ },
1013
+ {
1014
+ "type": "table",
1015
+ "img_path": "images/6b3d0d426a51f0d92db552901f50d588398b3d799f91a20c4f5cc2d37abd92bb.jpg",
1016
+ "table_caption": [],
1017
+ "table_footnote": [],
1018
+ "table_body": "<table><tr><td>MODEL</td><td>DA ACCURACY (%) ↑</td></tr><tr><td>nova-pro†</td><td>69.68</td></tr><tr><td>nova-micro†</td><td>66.21</td></tr><tr><td>claude-3-5-sonnet†</td><td>73.15</td></tr><tr><td>claude-3-5-haiku†</td><td>67.12</td></tr><tr><td>claude-3-sonnet</td><td>61.54</td></tr><tr><td>claude-3-haiku</td><td>63.80</td></tr><tr><td>llama3-1-70b-instruct</td><td>50.98</td></tr><tr><td>llama3-70b-instruct</td><td>56.26</td></tr><tr><td>mistral-large-2407†</td><td>61.09</td></tr><tr><td>command-r-plus†</td><td>64.86</td></tr></table>",
1019
+ "bbox": [
1020
+ 119,
1021
+ 460,
1022
+ 482,
1023
+ 631
1024
+ ],
1025
+ "page_idx": 7
1026
+ },
1027
+ {
1028
+ "type": "text",
1029
+ "text": "our proposed benchmark in an off-policy turn-level fashion, where we set the context to the ground-truth conversation up to the current turn. The context is composed of user and agent turns as well as function calls and results. Overall, the models performance on this benchmark is relatively low, suggesting that LLMs need further work to improve conversational function-calling capabilities. The benchmark can be used to assess model performance across varying conversations length, number of tools and action chain lengths.",
1030
+ "bbox": [
1031
+ 112,
1032
+ 744,
1033
+ 489,
1034
+ 921
1035
+ ],
1036
+ "page_idx": 7
1037
+ },
1038
+ {
1039
+ "type": "table",
1040
+ "img_path": "images/506003b7b267b97b66b75e0a4fb3e0736129739b259922f6df57b8a303bb7930.jpg",
1041
+ "table_caption": [
1042
+ "Table 6: Dialog acts accuracy for different models. $\\dagger$ indicates using tool-use formatting."
1043
+ ],
1044
+ "table_footnote": [],
1045
+ "table_body": "<table><tr><td>MODEL</td><td>VALID\nPARAMETERS (↑)</td></tr><tr><td>Ground Truth</td><td>83.1%</td></tr><tr><td>Nova Pro</td><td>68.8%</td></tr><tr><td>Nova Micro</td><td>57.9%</td></tr><tr><td>claude-3-5-sonnet</td><td>72.4%</td></tr><tr><td>claude-3-5-haiku†</td><td>66.1%</td></tr><tr><td>claude-3-sonnet</td><td>40.7%</td></tr><tr><td>claude-3-haiku</td><td>36.3%</td></tr><tr><td>llama3-1-405b-instruct</td><td>62.7%</td></tr><tr><td>llama3-1-70b-instruct</td><td>59.2%</td></tr><tr><td>llama3-70b-instruct</td><td>51.4%</td></tr><tr><td>mistral-large-2407†</td><td>51.1%</td></tr><tr><td>command-r-plus†</td><td>63.7%</td></tr></table>",
1046
+ "bbox": [
1047
+ 515,
1048
+ 460,
1049
+ 878,
1050
+ 688
1051
+ ],
1052
+ "page_idx": 7
1053
+ },
1054
+ {
1055
+ "type": "text",
1056
+ "text": "Table 7: Parameter validity rate for different models. VALID PARAMETERS is the percentage of valid predicted parameters for valid action calls as calculated in Section 4.1. $\\dagger$ indicates using tool-use formatting.",
1057
+ "bbox": [
1058
+ 507,
1059
+ 697,
1060
+ 884,
1061
+ 757
1062
+ ],
1063
+ "page_idx": 7
1064
+ },
1065
+ {
1066
+ "type": "text",
1067
+ "text": "7 Limitations & Risks",
1068
+ "text_level": 1,
1069
+ "bbox": [
1070
+ 507,
1071
+ 781,
1072
+ 717,
1073
+ 796
1074
+ ],
1075
+ "page_idx": 7
1076
+ },
1077
+ {
1078
+ "type": "text",
1079
+ "text": "Turn-level evaluation is a fine-grained evaluation approach that allows detailed analysis of how and when predictions deviate from the ground truth. However, performing turn-level evaluation is done in an off-policy fashion, where the gold truth is fixed as context. This does not correspond directly to inference behavior, where the model uses on-",
1080
+ "bbox": [
1081
+ 507,
1082
+ 808,
1083
+ 884,
1084
+ 920
1085
+ ],
1086
+ "page_idx": 7
1087
+ },
1088
+ {
1089
+ "type": "page_number",
1090
+ "text": "8000",
1091
+ "bbox": [
1092
+ 480,
1093
+ 928,
1094
+ 519,
1095
+ 940
1096
+ ],
1097
+ "page_idx": 7
1098
+ },
1099
+ {
1100
+ "type": "text",
1101
+ "text": "Predicted Dialog Act",
1102
+ "text_level": 1,
1103
+ "bbox": [
1104
+ 371,
1105
+ 84,
1106
+ 504,
1107
+ 97
1108
+ ],
1109
+ "page_idx": 8
1110
+ },
1111
+ {
1112
+ "type": "image",
1113
+ "img_path": "images/aefdbf3fac28cd91f48cd495d5126d8fbe046f102be4a19890e4c63b6ca68d67.jpg",
1114
+ "image_caption": [
1115
+ "(a) mistral-large-2407†"
1116
+ ],
1117
+ "image_footnote": [],
1118
+ "bbox": [
1119
+ 117,
1120
+ 111,
1121
+ 361,
1122
+ 239
1123
+ ],
1124
+ "page_idx": 8
1125
+ },
1126
+ {
1127
+ "type": "image",
1128
+ "img_path": "images/4133559a4d94d38ba8f841a2a7ec7ddbd506078b60255a4df3e63c3d886ae55e.jpg",
1129
+ "image_caption": [
1130
+ "(b) Llama 3.1 70B",
1131
+ "Figure 5: Confusion matrix for dialog acts for (a) mistral-large-2407 (b) llama3-1-70b-instruct, (c) claude-sonnet-3-5, and (d) command-r-plus. The rows correspond to true labels and the columns to the predicted labels. We are not showing the diagonal values which are correct matches. $\\dagger$ indicates using tool-use formatting."
1132
+ ],
1133
+ "image_footnote": [],
1134
+ "bbox": [
1135
+ 366,
1136
+ 111,
1137
+ 534,
1138
+ 241
1139
+ ],
1140
+ "page_idx": 8
1141
+ },
1142
+ {
1143
+ "type": "image",
1144
+ "img_path": "images/e35c385e5275ae164c307b4227b410b684c283d9d8d4f48166a7fab9d0b25e2e.jpg",
1145
+ "image_caption": [
1146
+ "(c) claudi-sonnet-3-5†"
1147
+ ],
1148
+ "image_footnote": [],
1149
+ "bbox": [
1150
+ 537,
1151
+ 111,
1152
+ 705,
1153
+ 241
1154
+ ],
1155
+ "page_idx": 8
1156
+ },
1157
+ {
1158
+ "type": "image",
1159
+ "img_path": "images/5e88e8a2ba7b248f92251bbba9d226acf5626ba11c0d9819636ddbdc51666b5c.jpg",
1160
+ "image_caption": [
1161
+ "(d) command-r-plus†"
1162
+ ],
1163
+ "image_footnote": [],
1164
+ "bbox": [
1165
+ 709,
1166
+ 111,
1167
+ 875,
1168
+ 241
1169
+ ],
1170
+ "page_idx": 8
1171
+ },
1172
+ {
1173
+ "type": "text",
1174
+ "text": "policy predictions for agent responses as context. For instance, using off-policy trajectories can induce a form of in-context learning that help later predictions conform to the generation style of the gold truth, or even learn action-calling dependencies from ground-truth context, causing an artificial inflation in model performance for later turns. Another deviation from inference-time behavior is regarding function call execution. In this work, we do not execute function calls. All function call results are looked up from gold truth turns.",
1175
+ "bbox": [
1176
+ 112,
1177
+ 338,
1178
+ 489,
1179
+ 514
1180
+ ],
1181
+ "page_idx": 8
1182
+ },
1183
+ {
1184
+ "type": "text",
1185
+ "text": "The dialog act accuracy and parameter validity rate are both calculated leveraging LLMs to classify or judge the outcome. These LLMs demonstrate high recall for dialog act classification and relatively high parameter validity rate for the groundtruth annotations. However, these models can still make mistakes which can obscure the true model performance.",
1186
+ "bbox": [
1187
+ 112,
1188
+ 518,
1189
+ 489,
1190
+ 645
1191
+ ],
1192
+ "page_idx": 8
1193
+ },
1194
+ {
1195
+ "type": "text",
1196
+ "text": "Data Statement We provide a data statement in adherence with the ACL code of conduct and recommendations laid out in (Bender and Friedman, 2018). The dataset was collected by linguists who are professional English speakers hired through a vendor and they were remunerated above industry standard rates. The conversations were simulated by human annotators, where the same annotator played both the user role and the agent roles, and created the function calls. All conversation parts were collected from scratch except for function call results, which were simulated using an internally trained model. The dataset went through quality assurance process done internally, where conversations were edited as needed to fix any observed errors.",
1197
+ "bbox": [
1198
+ 112,
1199
+ 664,
1200
+ 489,
1201
+ 920
1202
+ ],
1203
+ "page_idx": 8
1204
+ },
1205
+ {
1206
+ "type": "text",
1207
+ "text": "8 Acknowledgments",
1208
+ "text_level": 1,
1209
+ "bbox": [
1210
+ 507,
1211
+ 337,
1212
+ 702,
1213
+ 354
1214
+ ],
1215
+ "page_idx": 8
1216
+ },
1217
+ {
1218
+ "type": "text",
1219
+ "text": "We would like to thank Daniele Bonadiman and Sailik Sengupta for their contributions in creating the APIs, I-Hsuan Chen for support with the dialog act annotation collection, and Emily Moeng for managing data collection through vendors.",
1220
+ "bbox": [
1221
+ 507,
1222
+ 362,
1223
+ 882,
1224
+ 443
1225
+ ],
1226
+ "page_idx": 8
1227
+ },
1228
+ {
1229
+ "type": "text",
1230
+ "text": "References",
1231
+ "text_level": 1,
1232
+ "bbox": [
1233
+ 509,
1234
+ 469,
1235
+ 608,
1236
+ 483
1237
+ ],
1238
+ "page_idx": 8
1239
+ },
1240
+ {
1241
+ "type": "list",
1242
+ "sub_type": "ref_text",
1243
+ "list_items": [
1244
+ "Ali Ahmadvand, Jason Ingyu Choi, and Eugene Agichtein. 2019. Contextual dialogue act classification for open-domain conversational agents. In Proceedings of the 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR'19, page 1273-1276, New York, NY, USA. Association for Computing Machinery.",
1245
+ "Layla El Asri, Jing He, and Kaheer Suleman. 2016. A sequence-to-sequence model for user simulation in spoken dialogue systems. In Interspeech.",
1246
+ "Emily M. Bender and Batya Friedman. 2018. Data statements for natural language processing: Toward mitigating system bias and enabling better science. Transactions of the Association for Computational Linguistics, 6:587-604.",
1247
+ "Saurabh Chakravarty, Raja Venkata Satya Phanindra Chava, and Edward A. Fox. 2019. Dialog acts classification for question-answer corpora. In ASAIL@ICAIL.",
1248
+ "Nathan Duran, Steve Battle, and Jim Smith. 2023. Sentence encoding for dialogue act classification. *Natural Language Engineering*, 29(3):794–823.",
1249
+ "Nicholas Farn and Richard Shin. 2023. Tooltalk: Evaluating tool-usage in a conversational setting. Preprint, arXiv:2311.10775.",
1250
+ "James Gung, Emily Moeng, Wesley Rose, Arshit Gupta, Yi Zhang, and Saab Mansour. 2023. NatCS: Eliciting"
1251
+ ],
1252
+ "bbox": [
1253
+ 509,
1254
+ 492,
1255
+ 884,
1256
+ 921
1257
+ ],
1258
+ "page_idx": 8
1259
+ },
1260
+ {
1261
+ "type": "page_number",
1262
+ "text": "8001",
1263
+ "bbox": [
1264
+ 480,
1265
+ 928,
1266
+ 517,
1267
+ 940
1268
+ ],
1269
+ "page_idx": 8
1270
+ },
1271
+ {
1272
+ "type": "list",
1273
+ "sub_type": "ref_text",
1274
+ "list_items": [
1275
+ "natural customer support dialogues. In Findings of the Association for Computational Linguistics: ACL 2023, pages 9652-9677, Toronto, Canada. Association for Computational Linguistics.",
1276
+ "Minkyoung Kim and Harksoo Kim. 2018. Dialogue act classification model based on deep neural networks for a natural language interface to databases in korean. In 2018 IEEE International Conference on Big Data and Smart Computing (BigComp), pages 537-540.",
1277
+ "Chuyi Kong, Yaxin Fan, Xiang Wan, Feng Jiang, and Benyou Wang. 2024. PlatoLM: Teaching LLMs in multi-round dialogue via a user simulator. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 7841-7863, Bangkok, Thailand. Association for Computational Linguistics.",
1278
+ "Minghao Li, Yingxiu Zhao, Bowen Yu, Feifan Song, Hangyu Li, Haiyang Yu, Zhoujun Li, Fei Huang, and Yongbin Li. 2023. Api-bank: A comprehensive benchmark for tool-augmented llms. Preprint, arXiv:2304.08244.",
1279
+ "Xiao Liu, Hao Yu, Hanchen Zhang, Yifan Xu, Xuanyu Lei, Hanyu Lai, Yu Gu, Hangliang Ding, Kaiwen Men, Kejuan Yang, Shudan Zhang, Xiang Deng, Aohan Zeng, Zhengxiao Du, Chenhui Zhang, Sheng Shen, Tianjun Zhang, Yu Su, Huan Sun, Minlie Huang, Yuxiao Dong, and Jie Tang. 2023a. Agentbench: Evaluating llms as agents. Preprint, arXiv:2308.03688.",
1280
+ "Yang Liu, Kun Han, Zhao Tan, and Yun Lei. 2017. Using context information for dialog act classification in DNN framework. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 2170-2178, Copenhagen, Denmark. Association for Computational Linguistics.",
1281
+ "Yang Liu, Dan Iter, Yichong Xu, Shuohang Wang, Ruochen Xu, and Chenguang Zhu. 2023b. G-eval: NLG evaluation using gpt-4 with better human alignment. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 2511-2522, Singapore. Association for Computational Linguistics.",
1282
+ "Jiarui Lu, Thomas Holleis, Yizhe Zhang, Bernhard Aumayer, Feng Nan, Felix Bai, Shuang Ma, Shen Ma, Mengyu Li, Guoli Yin, Zirui Wang, and Ruoming Pang. 2024. Toolsandbox: A stateful, conversational, interactive evaluation benchmark for llm tool use capabilities. Preprint, arXiv:2408.04682.",
1283
+ "Huanzhi Mao, Fanjia Yan, Charlie Cheng-Jie Ji, Jason Huang, Vishnu Suresh, Yixin Huang, Xiaowen Yu, Joseph E. Gonzalez, and Shishir G. Patil. 2024. Bfcl v3: Multiturn & multi-step function calling evaluation. gorilla.cs.berkeley.edu/blogs/8_berkeley_function_calling_leaderboard.html."
1284
+ ],
1285
+ "bbox": [
1286
+ 115,
1287
+ 85,
1288
+ 489,
1289
+ 919
1290
+ ],
1291
+ "page_idx": 9
1292
+ },
1293
+ {
1294
+ "type": "list",
1295
+ "sub_type": "ref_text",
1296
+ "list_items": [
1297
+ "Qian Pan, Zahra Ashktorab, Michael Desmond, Martin Santillán Cooper, James Johnson, Rahul Nair, Elizabeth Daly, and Werner Geyer. 2024. Human-centered design recommendations for LLM-as-a-judge. In Proceedings of the 1st Human-Centered Large Language Modeling Workshop, pages 16-29, TBD. ACL.",
1298
+ "Shishir G Patil, Tianjun Zhang, Xin Wang, and Joseph E. Gonzalez. 2024. Gorilla: Large language model connected with massive APIs. In The Thirty-eighth Annual Conference on Neural Information Processing Systems.",
1299
+ "Yujia Qin, Shihao Liang, Yining Ye, Kunlun Zhu, Lan Yan, Yaxi Lu, Yankai Lin, Xin Cong, Xiangru Tang, Bill Qian, Sihan Zhao, Lauren Hong, Runchu Tian, Ruobing Xie, Jie Zhou, Mark Gerstein, Dahai Li, Zhiyuan Liu, and Maosong Sun. 2024. Toollm: Facilitating large language models to master 16000+ real-world apis. In ICLR.",
1300
+ "Yangjun Ruan, Honghua Dong, Andrew Wang, Silviu Pitis, Yongchao Zhou, Jimmy Ba, Yann Dubois, Chris J. Maddison, and Tatsunori Hashimoto. 2024. Identifying the risks of lm agents with an lm-emulated sandbox. Preprint, arXiv:2309.15817.",
1301
+ "Timo Schick, Jane Dwivedi-Yu, Roberto Dessi, Roberta Raileanu, Maria Lomeli, Eric Hambro, Luke Zettlemoyer, Nicola Cancedda, and Thomas Scialom. 2023. Toolformer: Language models can teach themselves to use tools. In Thirty-seventh Conference on Neural Information Processing Systems.",
1302
+ "Ivan Sekulic, Silvia Terragni, Victor Guimarães, Nghia Khau, Bruna Guedes, Modestas Filipavicius, Andre Ferreira Manso, and Roland Mathis. 2024. Reliable llm-based user simulator for task-oriented dialogue systems. Preprint, arXiv:2402.13374.",
1303
+ "Andreas Stolcke, Klaus Ries, Noah Coccaro, Elizabeth Shriberg, Rebecca Bates, Daniel Jurafsky, Paul Taylor, Rachel Martin, Carol Van Ess-Dykema, and Marie Meteor. 2000. Dialogue act modeling for automatic tagging and recognition of conversational speech. Computational Linguistics, 26(3):339-374.",
1304
+ "Jiaan Wang, Yunlong Liang, Fandong Meng, Zengkui Sun, Haoxiang Shi, Zhixu Li, Jinan Xu, Jianfeng Qu, and Jie Zhou. 2023. Is ChatGPT a good NLG evaluator? a preliminary study. In Proceedings of the 4th New Frontiers in Summarization Workshop, pages 1-11, Singapore. Association for Computational Linguistics.",
1305
+ "Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik R Narasimhan, and Yuan Cao. 2023. React: Synergizing reasoning and acting in language models. In The Eleventh International Conference on Learning Representations.",
1306
+ "Seeun Yoon, Zhankui He, Jessica Maria Echterhoff, and Julian McAuley. 2024. Evaluating large language models as generative user simulators for conversational recommendation. Preprint, arXiv:2403.09738."
1307
+ ],
1308
+ "bbox": [
1309
+ 510,
1310
+ 85,
1311
+ 882,
1312
+ 919
1313
+ ],
1314
+ "page_idx": 9
1315
+ },
1316
+ {
1317
+ "type": "page_number",
1318
+ "text": "8002",
1319
+ "bbox": [
1320
+ 480,
1321
+ 928,
1322
+ 519,
1323
+ 940
1324
+ ],
1325
+ "page_idx": 9
1326
+ },
1327
+ {
1328
+ "type": "list",
1329
+ "sub_type": "ref_text",
1330
+ "list_items": [
1331
+ "Yuheng Zha, Yichi Yang, Ruichen Li, and Zhiting Hu. 2023. Alignscore: Evaluating factual consistency with a unified alignment function. Preprint, arXiv:2305.16739.",
1332
+ "Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric P. Xing, Haotong Zhang, Joseph Gonzalez, and Ion Stoica. 2023. Judging llm-as-a-judge with mt-bench and chatbot arena. ArXiv, abs/2306.05685."
1333
+ ],
1334
+ "bbox": [
1335
+ 115,
1336
+ 85,
1337
+ 489,
1338
+ 225
1339
+ ],
1340
+ "page_idx": 10
1341
+ },
1342
+ {
1343
+ "type": "text",
1344
+ "text": "A Prompts",
1345
+ "text_level": 1,
1346
+ "bbox": [
1347
+ 115,
1348
+ 252,
1349
+ 226,
1350
+ 268
1351
+ ],
1352
+ "page_idx": 10
1353
+ },
1354
+ {
1355
+ "type": "text",
1356
+ "text": "Table 8 provides the prompts used for dialog act classification using Claude Haiku v3. We also include the system and user prompts used to generate predictions for evaluating function calling (Section 5.1) and response quality (Section 5.3.2) in Table 9 and Table 10, respectively. Table 11 shows the prompt we used to evaluate parameter hallucinations using gpt-4o-mini (with temperature 0) in Section 5.4.",
1357
+ "bbox": [
1358
+ 115,
1359
+ 277,
1360
+ 489,
1361
+ 420
1362
+ ],
1363
+ "page_idx": 10
1364
+ },
1365
+ {
1366
+ "type": "page_number",
1367
+ "text": "8003",
1368
+ "bbox": [
1369
+ 480,
1370
+ 928,
1371
+ 519,
1372
+ 940
1373
+ ],
1374
+ "page_idx": 10
1375
+ },
1376
+ {
1377
+ "type": "text",
1378
+ "text": "System Prompt and Instructions for Dialog Act Classification",
1379
+ "text_level": 1,
1380
+ "bbox": [
1381
+ 144,
1382
+ 126,
1383
+ 626,
1384
+ 142
1385
+ ],
1386
+ "page_idx": 11
1387
+ },
1388
+ {
1389
+ "type": "text",
1390
+ "text": "SYSTEM PROMPT:",
1391
+ "text_level": 1,
1392
+ "bbox": [
1393
+ 144,
1394
+ 152,
1395
+ 252,
1396
+ 162
1397
+ ],
1398
+ "page_idx": 11
1399
+ },
1400
+ {
1401
+ "type": "text",
1402
+ "text": "1 1",
1403
+ "bbox": [
1404
+ 146,
1405
+ 175,
1406
+ 169,
1407
+ 181
1408
+ ],
1409
+ "page_idx": 11
1410
+ },
1411
+ {
1412
+ "type": "text",
1413
+ "text": "output the labels only. Do not output anything else.",
1414
+ "bbox": [
1415
+ 146,
1416
+ 187,
1417
+ 537,
1418
+ 199
1419
+ ],
1420
+ "page_idx": 11
1421
+ },
1422
+ {
1423
+ "type": "text",
1424
+ "text": "If more than one label is predicted, separate them using comma (,)",
1425
+ "bbox": [
1426
+ 146,
1427
+ 200,
1428
+ 650,
1429
+ 212
1430
+ ],
1431
+ "page_idx": 11
1432
+ },
1433
+ {
1434
+ "type": "text",
1435
+ "text": "1",
1436
+ "bbox": [
1437
+ 146,
1438
+ 211,
1439
+ 169,
1440
+ 217
1441
+ ],
1442
+ "page_idx": 11
1443
+ },
1444
+ {
1445
+ "type": "text",
1446
+ "text": "USER PROMPT:",
1447
+ "text_level": 1,
1448
+ "bbox": [
1449
+ 146,
1450
+ 235,
1451
+ 236,
1452
+ 244
1453
+ ],
1454
+ "page_idx": 11
1455
+ },
1456
+ {
1457
+ "type": "text",
1458
+ "text": "1",
1459
+ "bbox": [
1460
+ 147,
1461
+ 259,
1462
+ 169,
1463
+ 265
1464
+ ],
1465
+ "page_idx": 11
1466
+ },
1467
+ {
1468
+ "type": "text",
1469
+ "text": "Select one or more of the following labels as the dialog act for the following text.",
1470
+ "bbox": [
1471
+ 146,
1472
+ 269,
1473
+ 779,
1474
+ 282
1475
+ ],
1476
+ "page_idx": 11
1477
+ },
1478
+ {
1479
+ "type": "text",
1480
+ "text": "If the turns include only function or API calls, use the agent_function_calling label only.",
1481
+ "bbox": [
1482
+ 146,
1483
+ 282,
1484
+ 831,
1485
+ 294
1486
+ ],
1487
+ "page_idx": 11
1488
+ },
1489
+ {
1490
+ "type": "text",
1491
+ "text": "Only use the other labels if the turns include text that is not function-calling. function-calls may co-occur with addition text informing user or seeking information from the user or rejecting the user request.",
1492
+ "bbox": [
1493
+ 146,
1494
+ 294,
1495
+ 836,
1496
+ 329
1497
+ ],
1498
+ "page_idx": 11
1499
+ },
1500
+ {
1501
+ "type": "text",
1502
+ "text": "labels are: agent-seeking_information, agent_other, agent_reject_request, agent_inform_user,",
1503
+ "bbox": [
1504
+ 146,
1505
+ 331,
1506
+ 816,
1507
+ 341
1508
+ ],
1509
+ "page_idx": 11
1510
+ },
1511
+ {
1512
+ "type": "text",
1513
+ "text": "agent_function_calling",
1514
+ "bbox": [
1515
+ 147,
1516
+ 342,
1517
+ 314,
1518
+ 353
1519
+ ],
1520
+ "page_idx": 11
1521
+ },
1522
+ {
1523
+ "type": "text",
1524
+ "text": "text: {prediction}",
1525
+ "bbox": [
1526
+ 147,
1527
+ 354,
1528
+ 282,
1529
+ 365
1530
+ ],
1531
+ "page_idx": 11
1532
+ },
1533
+ {
1534
+ "type": "text",
1535
+ "text": "conversation history: {context}\"",
1536
+ "bbox": [
1537
+ 147,
1538
+ 366,
1539
+ 388,
1540
+ 376
1541
+ ],
1542
+ "page_idx": 11
1543
+ },
1544
+ {
1545
+ "type": "text",
1546
+ "text": "1 1",
1547
+ "bbox": [
1548
+ 147,
1549
+ 378,
1550
+ 169,
1551
+ 382
1552
+ ],
1553
+ "page_idx": 11
1554
+ },
1555
+ {
1556
+ "type": "text",
1557
+ "text": "Table 8: The system prompt and the instructions used for dialog act classification.",
1558
+ "bbox": [
1559
+ 220,
1560
+ 423,
1561
+ 771,
1562
+ 437
1563
+ ],
1564
+ "page_idx": 11
1565
+ },
1566
+ {
1567
+ "type": "text",
1568
+ "text": "Function-calling Evaluation Prompt",
1569
+ "text_level": 1,
1570
+ "bbox": [
1571
+ 144,
1572
+ 523,
1573
+ 431,
1574
+ 538
1575
+ ],
1576
+ "page_idx": 11
1577
+ },
1578
+ {
1579
+ "type": "text",
1580
+ "text": "SYSTEM PROMPT:",
1581
+ "text_level": 1,
1582
+ "bbox": [
1583
+ 146,
1584
+ 548,
1585
+ 250,
1586
+ 558
1587
+ ],
1588
+ "page_idx": 11
1589
+ },
1590
+ {
1591
+ "type": "text",
1592
+ "text": "1",
1593
+ "bbox": [
1594
+ 147,
1595
+ 571,
1596
+ 169,
1597
+ 577
1598
+ ],
1599
+ "page_idx": 11
1600
+ },
1601
+ {
1602
+ "type": "text",
1603
+ "text": "You are an expert in composing functions. You are given a conversation and a set of possible functions. Based on the conversation, you will need to make one function/tool call to achieve the purpose.",
1604
+ "bbox": [
1605
+ 146,
1606
+ 583,
1607
+ 878,
1608
+ 606
1609
+ ],
1610
+ "page_idx": 11
1611
+ },
1612
+ {
1613
+ "type": "text",
1614
+ "text": "If you need to call multiple function calls to achieve the purpose, output the first function call in the chain only.",
1615
+ "bbox": [
1616
+ 146,
1617
+ 607,
1618
+ 836,
1619
+ 631
1620
+ ],
1621
+ "page_idx": 11
1622
+ },
1623
+ {
1624
+ "type": "text",
1625
+ "text": "If none of the functions can be used, respond with an appropriate message to the user, such as clarification, confirmation, eliciting information, etc. If the given question lacks the parameters required by the function, you can ask the user for it. You should only return the function call in tools call sections.",
1626
+ "bbox": [
1627
+ 146,
1628
+ 632,
1629
+ 835,
1630
+ 678
1631
+ ],
1632
+ "page_idx": 11
1633
+ },
1634
+ {
1635
+ "type": "text",
1636
+ "text": "USER PROMPT (only used when prompting models directly):",
1637
+ "bbox": [
1638
+ 146,
1639
+ 689,
1640
+ 559,
1641
+ 702
1642
+ ],
1643
+ "page_idx": 11
1644
+ },
1645
+ {
1646
+ "type": "text",
1647
+ "text": "1",
1648
+ "bbox": [
1649
+ 147,
1650
+ 713,
1651
+ 169,
1652
+ 719
1653
+ ],
1654
+ "page_idx": 11
1655
+ },
1656
+ {
1657
+ "type": "text",
1658
+ "text": "Here is a list of functions in JSON format that you can invoke.",
1659
+ "bbox": [
1660
+ 146,
1661
+ 726,
1662
+ 620,
1663
+ 737
1664
+ ],
1665
+ "page_idx": 11
1666
+ },
1667
+ {
1668
+ "type": "text",
1669
+ "text": "{language_specicHint}\\n\\n{functions}\\n\\n",
1670
+ "bbox": [
1671
+ 146,
1672
+ 738,
1673
+ 468,
1674
+ 749
1675
+ ],
1676
+ "page_idx": 11
1677
+ },
1678
+ {
1679
+ "type": "text",
1680
+ "text": "If you decide to invoke any of the function(s), put it in the format of",
1681
+ "bbox": [
1682
+ 146,
1683
+ 750,
1684
+ 682,
1685
+ 760
1686
+ ],
1687
+ "page_idx": 11
1688
+ },
1689
+ {
1690
+ "type": "text",
1691
+ "text": "[func_name1.params_name1=params_value1, params_name2=params_value2...), func_name2.params)]\\n",
1692
+ "bbox": [
1693
+ 146,
1694
+ 762,
1695
+ 843,
1696
+ 772
1697
+ ],
1698
+ "page_idx": 11
1699
+ },
1700
+ {
1701
+ "type": "text",
1702
+ "text": "You SHOULD NOT include any other information in the response.",
1703
+ "bbox": [
1704
+ 146,
1705
+ 774,
1706
+ 605,
1707
+ 785
1708
+ ],
1709
+ "page_idx": 11
1710
+ },
1711
+ {
1712
+ "type": "text",
1713
+ "text": "{conversation}",
1714
+ "bbox": [
1715
+ 146,
1716
+ 785,
1717
+ 250,
1718
+ 797
1719
+ ],
1720
+ "page_idx": 11
1721
+ },
1722
+ {
1723
+ "type": "text",
1724
+ "text": "1",
1725
+ "bbox": [
1726
+ 146,
1727
+ 797,
1728
+ 169,
1729
+ 802
1730
+ ],
1731
+ "page_idx": 11
1732
+ },
1733
+ {
1734
+ "type": "text",
1735
+ "text": "Table 9: The system and user prompts used to generate predictions for the function-calling benchmark. The user prompt is only included for the case of direct prompting (i.e. when the tool use API is not used). These runs are indicated by dropping the \"FC\" suffix in the results tables.",
1736
+ "bbox": [
1737
+ 112,
1738
+ 841,
1739
+ 880,
1740
+ 884
1741
+ ],
1742
+ "page_idx": 11
1743
+ },
1744
+ {
1745
+ "type": "page_number",
1746
+ "text": "8004",
1747
+ "bbox": [
1748
+ 480,
1749
+ 928,
1750
+ 519,
1751
+ 940
1752
+ ],
1753
+ "page_idx": 11
1754
+ },
1755
+ {
1756
+ "type": "text",
1757
+ "text": "Response Quality Evaluation Prompt",
1758
+ "text_level": 1,
1759
+ "bbox": [
1760
+ 144,
1761
+ 318,
1762
+ 440,
1763
+ 334
1764
+ ],
1765
+ "page_idx": 12
1766
+ },
1767
+ {
1768
+ "type": "text",
1769
+ "text": "SYSTEMPROMPT:",
1770
+ "bbox": [
1771
+ 146,
1772
+ 343,
1773
+ 252,
1774
+ 355
1775
+ ],
1776
+ "page_idx": 12
1777
+ },
1778
+ {
1779
+ "type": "text",
1780
+ "text": "1",
1781
+ "bbox": [
1782
+ 146,
1783
+ 367,
1784
+ 169,
1785
+ 374
1786
+ ],
1787
+ "page_idx": 12
1788
+ },
1789
+ {
1790
+ "type": "text",
1791
+ "text": "You are an agent tasked with assisting a user to solve a problem. You have access to a set of functions that you can use.",
1792
+ "bbox": [
1793
+ 146,
1794
+ 380,
1795
+ 835,
1796
+ 403
1797
+ ],
1798
+ "page_idx": 12
1799
+ },
1800
+ {
1801
+ "type": "text",
1802
+ "text": "You are given a conversation and a set of possible functions. Based on the conversation, you will need to either make one function/tool call or to respond to the user to achieve the purpose. If you need to make multiple function calls to achieve the purpose, output the first function call in the chain only.",
1803
+ "bbox": [
1804
+ 146,
1805
+ 404,
1806
+ 860,
1807
+ 450
1808
+ ],
1809
+ "page_idx": 12
1810
+ },
1811
+ {
1812
+ "type": "text",
1813
+ "text": "If none of the functions can be used, respond with an appropriate message to the user, such as clarification, confirmation,",
1814
+ "bbox": [
1815
+ 146,
1816
+ 451,
1817
+ 835,
1818
+ 473
1819
+ ],
1820
+ "page_idx": 12
1821
+ },
1822
+ {
1823
+ "type": "text",
1824
+ "text": "eliciting information, etc. If the given question lacks the parameters required by the function, you can ask the user for it.",
1825
+ "bbox": [
1826
+ 146,
1827
+ 475,
1828
+ 836,
1829
+ 498
1830
+ ],
1831
+ "page_idx": 12
1832
+ },
1833
+ {
1834
+ "type": "text",
1835
+ "text": "USER PROMPT (only used when prompting models directly):",
1836
+ "bbox": [
1837
+ 146,
1838
+ 508,
1839
+ 559,
1840
+ 521
1841
+ ],
1842
+ "page_idx": 12
1843
+ },
1844
+ {
1845
+ "type": "text",
1846
+ "text": "1",
1847
+ "bbox": [
1848
+ 147,
1849
+ 533,
1850
+ 169,
1851
+ 539
1852
+ ],
1853
+ "page_idx": 12
1854
+ },
1855
+ {
1856
+ "type": "text",
1857
+ "text": "Here is a list of functions in JSON format that you can invoke. \n{languagespecific_hint}\\n\\n{functions}\\n\\nIf you decide to invoke any of the function(s), put it in the format of \n[func_name1.params_name1=params_value1, params_name2=params_value2...), func_name2.params)]\\n{conversation}",
1858
+ "bbox": [
1859
+ 144,
1860
+ 545,
1861
+ 843,
1862
+ 609
1863
+ ],
1864
+ "page_idx": 12
1865
+ },
1866
+ {
1867
+ "type": "text",
1868
+ "text": "Table 10: The system and user prompts used to generate predictions for the response quality benchmark. The user prompt is only included for the case of direct prompting (i.e. when the tool use API is not used). These runs are indicated by dropping the \"FC\" suffix in the results tables.",
1869
+ "bbox": [
1870
+ 112,
1871
+ 650,
1872
+ 884,
1873
+ 693
1874
+ ],
1875
+ "page_idx": 12
1876
+ },
1877
+ {
1878
+ "type": "page_number",
1879
+ "text": "8005",
1880
+ "bbox": [
1881
+ 480,
1882
+ 928,
1883
+ 519,
1884
+ 940
1885
+ ],
1886
+ "page_idx": 12
1887
+ },
1888
+ {
1889
+ "type": "text",
1890
+ "text": "Prompt for Parameter Hallucination Detection",
1891
+ "text_level": 1,
1892
+ "bbox": [
1893
+ 144,
1894
+ 214,
1895
+ 515,
1896
+ 230
1897
+ ],
1898
+ "page_idx": 13
1899
+ },
1900
+ {
1901
+ "type": "text",
1902
+ "text": "1",
1903
+ "bbox": [
1904
+ 142,
1905
+ 237,
1906
+ 171,
1907
+ 246
1908
+ ],
1909
+ "page_idx": 13
1910
+ },
1911
+ {
1912
+ "type": "text",
1913
+ "text": "<guidelines>",
1914
+ "bbox": [
1915
+ 142,
1916
+ 252,
1917
+ 238,
1918
+ 263
1919
+ ],
1920
+ "page_idx": 13
1921
+ },
1922
+ {
1923
+ "type": "list",
1924
+ "sub_type": "text",
1925
+ "list_items": [
1926
+ "- The system is about to execute an action or a series of actions shown below inside `<actions></actions> tags. Each predicted action is called with the action name, parameter name and parameter values, as shown in the action schemas inside `<schemas></schemas> tags.",
1927
+ "- You have to evaluate each parameter value in the predicted action calls and determine whether it was hallucinated.",
1928
+ "- Each parameter value must be EXPLICITLY mentioned in the conversation history. If not, the value is hallucinated. For example if an airport code is not explicitly mentioned in the context and the system uses it, it is considered hallucination. Note that certain actions might require the system to generate text (such as an email or an article). In these cases, evaluate the content of the generated text for hallucination.",
1929
+ "- First think before detecting hallucinated parameters inside <thinking></thinking> tags and add the rationale in the \"rationale\" field.",
1930
+ "- The output should have the following JSON format:: {\"rationale\": \"\", \"hallucinated_parameters\": [[], [], ...]}. The \"hallucinated_parameters\" field should contain a list that has one list of hallucinated parameter names for each predicted action in the order as they appear."
1931
+ ],
1932
+ "bbox": [
1933
+ 142,
1934
+ 263,
1935
+ 719,
1936
+ 489
1937
+ ],
1938
+ "page_idx": 13
1939
+ },
1940
+ {
1941
+ "type": "text",
1942
+ "text": "</guidelines>",
1943
+ "bbox": [
1944
+ 142,
1945
+ 489,
1946
+ 245,
1947
+ 500
1948
+ ],
1949
+ "page_idx": 13
1950
+ },
1951
+ {
1952
+ "type": "text",
1953
+ "text": "This is the action call you have to evaluate:",
1954
+ "bbox": [
1955
+ 142,
1956
+ 511,
1957
+ 485,
1958
+ 524
1959
+ ],
1960
+ "page_idx": 13
1961
+ },
1962
+ {
1963
+ "type": "text",
1964
+ "text": "Conversation History: <conversation_history> {conversation_history_block} </conversation_history>",
1965
+ "bbox": [
1966
+ 142,
1967
+ 536,
1968
+ 356,
1969
+ 583
1970
+ ],
1971
+ "page_idx": 13
1972
+ },
1973
+ {
1974
+ "type": "text",
1975
+ "text": "Predicted Actions: <actions> {predicted_actions} </actions>",
1976
+ "bbox": [
1977
+ 142,
1978
+ 595,
1979
+ 287,
1980
+ 642
1981
+ ],
1982
+ "page_idx": 13
1983
+ },
1984
+ {
1985
+ "type": "text",
1986
+ "text": "Action Schemas: <schemas> {action_schemas} </schemas>",
1987
+ "bbox": [
1988
+ 142,
1989
+ 653,
1990
+ 267,
1991
+ 701
1992
+ ],
1993
+ "page_idx": 13
1994
+ },
1995
+ {
1996
+ "type": "text",
1997
+ "text": "Evaluate the parameters of the predicted actions in <actions></actions> tags. Return a JSON as described in the <guidelines>.",
1998
+ "bbox": [
1999
+ 142,
2000
+ 713,
2001
+ 684,
2002
+ 743
2003
+ ],
2004
+ "page_idx": 13
2005
+ },
2006
+ {
2007
+ "type": "text",
2008
+ "text": "Table 11: Prompt for detecting parameter hallucination in predicted actions",
2009
+ "bbox": [
2010
+ 243,
2011
+ 783,
2012
+ 752,
2013
+ 797
2014
+ ],
2015
+ "page_idx": 13
2016
+ },
2017
+ {
2018
+ "type": "page_number",
2019
+ "text": "8006",
2020
+ "bbox": [
2021
+ 480,
2022
+ 928,
2023
+ 519,
2024
+ 940
2025
+ ],
2026
+ "page_idx": 13
2027
+ }
2028
+ ]
2025/CONFETTI_ Conversational Function-Calling Evaluation Through Turn-Level Interactions/30ac32e0-3901-4494-8422-c9487e1d3e1e_model.json ADDED
@@ -0,0 +1,2494 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ [
3
+ {
4
+ "type": "title",
5
+ "bbox": [
6
+ 0.2,
7
+ 0.09,
8
+ 0.8,
9
+ 0.131
10
+ ],
11
+ "angle": 0,
12
+ "content": "CONFETTI: Conversational Function-Calling Evaluation Through Turn-Level Interactions"
13
+ },
14
+ {
15
+ "type": "text",
16
+ "bbox": [
17
+ 0.202,
18
+ 0.153,
19
+ 0.796,
20
+ 0.221
21
+ ],
22
+ "angle": 0,
23
+ "content": "Tamer Alkhouli, Katerina Margatina, James Gung, Raphael Shu, Claudia Zaghi, Monica Sunkara, Yi Zhang {alkhouli, katemarg, gungj, zhongzhu, sunkaral, yizhngn} \\(@\\) amazon.com AWS AI Labs"
24
+ },
25
+ {
26
+ "type": "title",
27
+ "bbox": [
28
+ 0.261,
29
+ 0.261,
30
+ 0.341,
31
+ 0.277
32
+ ],
33
+ "angle": 0,
34
+ "content": "Abstract"
35
+ },
36
+ {
37
+ "type": "text",
38
+ "bbox": [
39
+ 0.117,
40
+ 0.312,
41
+ 0.49,
42
+ 0.811
43
+ ],
44
+ "angle": 0,
45
+ "content": "We introduce Conversational Function-Calling Evaluation Through Turn-Level Interactions (CONFETTI), a conversational benchmark designed to evaluate the function-calling capabilities and response quality of large language models (LLMs). Current benchmarks lack comprehensive assessment of LLMs in complex conversational scenarios. CONFETTI addresses this gap through 109 human-simulated conversations, comprising 313 user turns and covering 86 APIs. These conversations explicitly target various conversational complexities, such as follow-ups, goal correction and switching, ambiguous and implicit goals. We perform off-policy turn-level evaluation using this benchmark targeting function-calling. Our benchmark also incorporates dialog act annotations to assess agent responses. We evaluate a series of state-of-the-art LLMs and analyze their performance with respect to the number of available APIs, conversation lengths, and chained function calling. Our results reveal that while some models are able to handle long conversations, and leverage more than \\(20+\\) APIs successfully, other models struggle with longer context or when increasing the number of APIs. We also report that the performance on chained function-calls is severely limited across the models. Overall, the top performing models on CONFETTI are Nova Pro \\((40.01\\%)\\), Claude Sonnet v3.5 \\((35.46\\%)\\) and Llama 3.1 405B \\((33.19\\%)\\) followed by command-r-plus \\((31.18\\%)\\) and Mistral-Large-2407 \\((30.07\\%)\\)."
46
+ },
47
+ {
48
+ "type": "title",
49
+ "bbox": [
50
+ 0.115,
51
+ 0.823,
52
+ 0.262,
53
+ 0.839
54
+ ],
55
+ "angle": 0,
56
+ "content": "1 Introduction"
57
+ },
58
+ {
59
+ "type": "text",
60
+ "bbox": [
61
+ 0.113,
62
+ 0.849,
63
+ 0.489,
64
+ 0.899
65
+ ],
66
+ "angle": 0,
67
+ "content": "Function-calling has emerged recently as one of the notable capabilities of large language models (LLMs) (Schick et al., 2023; Yao et al., 2023; Qin"
68
+ },
69
+ {
70
+ "type": "text",
71
+ "bbox": [
72
+ 0.508,
73
+ 0.261,
74
+ 0.886,
75
+ 0.472
76
+ ],
77
+ "angle": 0,
78
+ "content": "et al., 2024; Patil et al., 2024). To generate a function call, LLMs are provided with a list of available functions, including function descriptions, schema, parameter names and types. When provided with natural language input, LLMs can generate appropriate function calls to fulfill user requests. Our work specifically examines interactive conversational scenarios where the user and the system engage in dynamic dialogue. These conversations evolve through multiple turns, including follow-up questions, requests for clarification, and confirmation checks, creating what we define as a conversation trajectory."
79
+ },
80
+ {
81
+ "type": "text",
82
+ "bbox": [
83
+ 0.508,
84
+ 0.473,
85
+ 0.886,
86
+ 0.922
87
+ ],
88
+ "angle": 0,
89
+ "content": "There can be multiple conversation trajectories that achieve the same user goals. This variation adds complexity to evaluating models in conversational multi-turn sessions. There are several ways to perform automatic evaluation in conversational settings. First, the evaluation setup can use a user simulator to automate interaction with the model dynamically, where user utterances are simulated online (Asri et al., 2016; Lu et al., 2024; Sekulic et al., 2024; Yoon et al., 2024). This adds flexibility to the evaluation to accommodate potential variations in the conversation trajectories. However, the evaluation will be subject to potential errors stemming from the user simulator itself, which can obscure the actual performance of the model. Alternatively, user utterances can be determined prior to the conversation session to achieve one or more user goals (Mao et al., 2024). This, however, assumes the trajectory will follow a certain path, with deviations ending up being penalized. A third approach is to evaluate conversations on the turn-level. This is done in offline mode where the history is set to the ground-truth trajectory up to the current turn in the conversation. Although it is done offline, it isolates the behavior of the model at each turn, and allows for a direct comparison between predictions and ground-truth labels. In this work, we follow the third approach."
90
+ },
91
+ {
92
+ "type": "page_footnote",
93
+ "bbox": [
94
+ 0.136,
95
+ 0.907,
96
+ 0.463,
97
+ 0.921
98
+ ],
99
+ "angle": 0,
100
+ "content": "<https://github.com/amazon-science/confetti>"
101
+ },
102
+ {
103
+ "type": "page_number",
104
+ "bbox": [
105
+ 0.481,
106
+ 0.928,
107
+ 0.521,
108
+ 0.941
109
+ ],
110
+ "angle": 0,
111
+ "content": "7993"
112
+ },
113
+ {
114
+ "type": "footer",
115
+ "bbox": [
116
+ 0.091,
117
+ 0.946,
118
+ 0.908,
119
+ 0.972
120
+ ],
121
+ "angle": 0,
122
+ "content": "Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 7993-8006 July 27 - August 1, 2025 ©2025 Association for Computational Linguistics"
123
+ }
124
+ ],
125
+ [
126
+ {
127
+ "type": "image",
128
+ "bbox": [
129
+ 0.144,
130
+ 0.1,
131
+ 0.855,
132
+ 0.472
133
+ ],
134
+ "angle": 0,
135
+ "content": null
136
+ },
137
+ {
138
+ "type": "image_caption",
139
+ "bbox": [
140
+ 0.113,
141
+ 0.509,
142
+ 0.884,
143
+ 0.568
144
+ ],
145
+ "angle": 0,
146
+ "content": "Figure 1: CONFETTI comprises multi-turn conversations between a user and an agent. The agent has access to a set of APIs (tools) to assist the user with their request. The agent can invoke actions and receive observations from the environment. Each agent turn is annotated with a dialog act tag used to evaluate response quality. The figure illustrates the flow of a conversation, including user inputs, agent responses, API calls, and dialog act annotations."
147
+ },
148
+ {
149
+ "type": "text",
150
+ "bbox": [
151
+ 0.133,
152
+ 0.591,
153
+ 0.381,
154
+ 0.606
155
+ ],
156
+ "angle": 0,
157
+ "content": "Our contributions are as follows:"
158
+ },
159
+ {
160
+ "type": "text",
161
+ "bbox": [
162
+ 0.136,
163
+ 0.626,
164
+ 0.49,
165
+ 0.723
166
+ ],
167
+ "angle": 0,
168
+ "content": "- We introduce a conversational function-calling benchmark targeting conversation phenomena such as follow-ups, goal correction and switching, ambiguous and implicit goals, over- and underfilling of parameters, etc. Figure 1 illustrates an example."
169
+ },
170
+ {
171
+ "type": "text",
172
+ "bbox": [
173
+ 0.136,
174
+ 0.742,
175
+ 0.49,
176
+ 0.839
177
+ ],
178
+ "angle": 0,
179
+ "content": "- We propose response quality evaluation to evaluate both function-calling and non-function calling responses via dialog act classification, categorizing responses as seeking information, providing information, rejecting requests or calling functions."
180
+ },
181
+ {
182
+ "type": "text",
183
+ "bbox": [
184
+ 0.136,
185
+ 0.858,
186
+ 0.49,
187
+ 0.922
188
+ ],
189
+ "angle": 0,
190
+ "content": "- We compare state-of-the-art LLMs, from various model providers, showcasing their potentials and gaps on conversational function-calling."
191
+ },
192
+ {
193
+ "type": "list",
194
+ "bbox": [
195
+ 0.136,
196
+ 0.626,
197
+ 0.49,
198
+ 0.922
199
+ ],
200
+ "angle": 0,
201
+ "content": null
202
+ },
203
+ {
204
+ "type": "title",
205
+ "bbox": [
206
+ 0.51,
207
+ 0.59,
208
+ 0.667,
209
+ 0.605
210
+ ],
211
+ "angle": 0,
212
+ "content": "2 Related Work"
213
+ },
214
+ {
215
+ "type": "text",
216
+ "bbox": [
217
+ 0.508,
218
+ 0.616,
219
+ 0.885,
220
+ 0.872
221
+ ],
222
+ "angle": 0,
223
+ "content": "ToolSandbox (Lu et al., 2024) offers an end-to-end evaluation approach, where the authors employ a dynamic user simulator with intermediate milestones to evaluate trajectories. The dataset lacks in domain diversity and complexity, focusing on productivity tools. API-Bank (Li et al., 2023) covers multi-turn dialog and performs API executions. Tooltalk (Farn and Shin, 2023) performs turn-level evaluations, and ToolEmu (Ruan et al., 2024) mocks API responses, similar to our approach. AgentsBench (Liu et al., 2023a) offers open-ended dialog evaluation of LLMs as Agents for Code, Gaming, and Web environments. PlatoLM (Kong et al., 2024) proposes to train a user simulator and synthesize conversations as training data."
224
+ },
225
+ {
226
+ "type": "text",
227
+ "bbox": [
228
+ 0.509,
229
+ 0.874,
230
+ 0.885,
231
+ 0.922
232
+ ],
233
+ "angle": 0,
234
+ "content": "BFCL v3 (Mao et al., 2024) targets evaluating function-calling capabilities in single- and multi-turn settings. Its multi-turn dataset is closely re"
235
+ },
236
+ {
237
+ "type": "page_number",
238
+ "bbox": [
239
+ 0.481,
240
+ 0.928,
241
+ 0.522,
242
+ 0.941
243
+ ],
244
+ "angle": 0,
245
+ "content": "7994"
246
+ }
247
+ ],
248
+ [
249
+ {
250
+ "type": "text",
251
+ "bbox": [
252
+ 0.112,
253
+ 0.085,
254
+ 0.49,
255
+ 0.295
256
+ ],
257
+ "angle": 0,
258
+ "content": "lated to our work. There are however several differences. While the BFCL multi-turn data is model-generated and validated by a human, our data is completely generated by human annotators. This avoids potential bias towards certain model families. Second, our collection targeted multiple conversational complexities such as confirmations, follow-ups, and elicitation as part of the natural flow of the conversations. BFCL offers a subset where parameters are missing to induce elicitation. Third, we include 3-25 functions to predict from at each turn, aiming to reveal model capabilities under varying number of functions provided."
259
+ },
260
+ {
261
+ "type": "text",
262
+ "bbox": [
263
+ 0.113,
264
+ 0.296,
265
+ 0.49,
266
+ 0.392
267
+ ],
268
+ "angle": 0,
269
+ "content": "There have been numerous studies on dialog act modeling (Stolcke et al., 2000) and classification (Ahmadvand et al., 2019; Kim and Kim, 2018; Liu et al., 2017; Chakravarty et al., 2019; Duran et al., 2023). In this work, we use an LLM-based approach to classify agent dialog acts into 5 labels."
270
+ },
271
+ {
272
+ "type": "text",
273
+ "bbox": [
274
+ 0.113,
275
+ 0.393,
276
+ 0.49,
277
+ 0.457
278
+ ],
279
+ "angle": 0,
280
+ "content": "LLM as a judge (Wang et al., 2023; Pan et al., 2024; Liu et al., 2023b; Zheng et al., 2023) has been explored recently. In this work, we leverage LLMs as a means to detect parameter hallucinations."
281
+ },
282
+ {
283
+ "type": "title",
284
+ "bbox": [
285
+ 0.114,
286
+ 0.472,
287
+ 0.258,
288
+ 0.487
289
+ ],
290
+ "angle": 0,
291
+ "content": "3 CONFETTI"
292
+ },
293
+ {
294
+ "type": "title",
295
+ "bbox": [
296
+ 0.114,
297
+ 0.501,
298
+ 0.283,
299
+ 0.515
300
+ ],
301
+ "angle": 0,
302
+ "content": "3.1 Data Collection"
303
+ },
304
+ {
305
+ "type": "text",
306
+ "bbox": [
307
+ 0.113,
308
+ 0.523,
309
+ 0.49,
310
+ 0.78
311
+ ],
312
+ "angle": 0,
313
+ "content": "Complexities Following Gung et al. (2023), to ensure that the conversations in our benchmark cover a broad range of interaction patterns, we define a set of complexities that may be observed in real world interaction with conversational function calling systems. These complexities, defined in Table 1, are used as an input to the conversation authoring process with a target distribution enforced by requiring at least one complexity for each conversation. For example, if EXCEPTIONINEXECUTION is assigned as a required complexity in a conversation, at least one function call must have an error response for it to be considered valid. Annotators are also asked to label the complexities that appear in their conversations for tracking purposes."
314
+ },
315
+ {
316
+ "type": "text",
317
+ "bbox": [
318
+ 0.113,
319
+ 0.793,
320
+ 0.49,
321
+ 0.922
322
+ ],
323
+ "angle": 0,
324
+ "content": "APIs We curated a broad range of APIs across application areas such as issue tracking, travel booking, human resources, and meetings management. Each API contains a set of function definitions with schemas defining valid inputs and outputs for each function. APIs do not have explicit implementations in our benchmark, but instead have fixed outputs defined in each conversation."
325
+ },
326
+ {
327
+ "type": "text",
328
+ "bbox": [
329
+ 0.508,
330
+ 0.085,
331
+ 0.885,
332
+ 0.31
333
+ ],
334
+ "angle": 0,
335
+ "content": "Scenario Generation Each conversation is seeded with a set of required and optional APIs, a required complexity, a reference time the conversation is to take place, and a minimum number of turns. Based on these inputs, a scenario is defined that describes one or more user goals for the conversation in natural language. Authoring valid scenarios requires defining a realistic request that can be resolved given the available APIs and integrating the assigned complexity. Due to the difficulty of this task, we separated the authoring of scenarios from conversations, only allowing conversations to be instantiated for scenarios after they were reviewed by trusted annotators."
336
+ },
337
+ {
338
+ "type": "text",
339
+ "bbox": [
340
+ 0.508,
341
+ 0.321,
342
+ 0.885,
343
+ 0.562
344
+ ],
345
+ "angle": 0,
346
+ "content": "Conversation Generation Conversation authors play the role of both the user and the agent, enacting the pre-defined scenario by entering user turns, agent turns, and function calls that meet the required complexities and align with the scenario description. Authors use dynamically-generated forms in the annotation UI to create valid function calls, which are validated upon submission to ensure the authored values are valid for the function input schema at hand. Upon submission of a function call and selection of a desired response type (i.e. success code vs. error codes), the return value is simulated using an internal model based on the function description, input/output schema, and input values."
347
+ },
348
+ {
349
+ "type": "text",
350
+ "bbox": [
351
+ 0.508,
352
+ 0.572,
353
+ 0.884,
354
+ 0.62
355
+ ],
356
+ "angle": 0,
357
+ "content": "Dialog Acts Following conversation generation, we asked annotators to label agent turns using one or more of the following dialog acts:"
358
+ },
359
+ {
360
+ "type": "text",
361
+ "bbox": [
362
+ 0.532,
363
+ 0.633,
364
+ 0.884,
365
+ 0.711
366
+ ],
367
+ "angle": 0,
368
+ "content": "- Agent seeking information (seek_info): targets responses that elicit information from the user, whether it is intent elicitation, parameter elicitation, or asking for clarification or confirmation."
369
+ },
370
+ {
371
+ "type": "text",
372
+ "bbox": [
373
+ 0.532,
374
+ 0.726,
375
+ 0.885,
376
+ 0.788
377
+ ],
378
+ "angle": 0,
379
+ "content": "- Agent informing user (inform): targets responses that provide information to the user, whether the information is general or specific to the function-calling results."
380
+ },
381
+ {
382
+ "type": "text",
383
+ "bbox": [
384
+ 0.532,
385
+ 0.802,
386
+ 0.884,
387
+ 0.833
388
+ ],
389
+ "angle": 0,
390
+ "content": "- Agent rejecting request (reject): targets responses that reject the user request."
391
+ },
392
+ {
393
+ "type": "text",
394
+ "bbox": [
395
+ 0.532,
396
+ 0.846,
397
+ 0.881,
398
+ 0.877
399
+ ],
400
+ "angle": 0,
401
+ "content": "- Other: any response that does not belong to the previous dialog acts."
402
+ },
403
+ {
404
+ "type": "list",
405
+ "bbox": [
406
+ 0.532,
407
+ 0.633,
408
+ 0.885,
409
+ 0.877
410
+ ],
411
+ "angle": 0,
412
+ "content": null
413
+ },
414
+ {
415
+ "type": "text",
416
+ "bbox": [
417
+ 0.509,
418
+ 0.89,
419
+ 0.884,
420
+ 0.922
421
+ ],
422
+ "angle": 0,
423
+ "content": "Note that the agent response can including multiple dialog acts. We ensure that the annotators try"
424
+ },
425
+ {
426
+ "type": "page_number",
427
+ "bbox": [
428
+ 0.481,
429
+ 0.928,
430
+ 0.521,
431
+ 0.941
432
+ ],
433
+ "angle": 0,
434
+ "content": "7995"
435
+ }
436
+ ],
437
+ [
438
+ {
439
+ "type": "table",
440
+ "bbox": [
441
+ 0.123,
442
+ 0.082,
443
+ 0.875,
444
+ 0.254
445
+ ],
446
+ "angle": 0,
447
+ "content": "<table><tr><td>COMPLEXITY</td><td># DIALOGS</td><td>DESCRIPTION</td></tr><tr><td>EXCEPTIONINEXECUTION</td><td>5</td><td>Errors or exceptions that occur during the execution of an action</td></tr><tr><td>FAILEDCONVERSATION</td><td>5</td><td>Interactions where the intended goal is not achieved</td></tr><tr><td>CONFIRMATION</td><td>6</td><td>Requesting user approval before executing an action</td></tr><tr><td>GOALSWITCHING</td><td>6</td><td>When the user changes their objective during the conversation</td></tr><tr><td>NOTARGETCOMPLEXITY</td><td>6</td><td>Conversations without specific complexity requirements</td></tr><tr><td>GOALCORRECTION</td><td>7</td><td>Adjusting or refining the user&#x27;s goal based on feedback</td></tr><tr><td>GOALSTACKING</td><td>7</td><td>Managing multiple user objectives simultaneously</td></tr><tr><td>AMBIGUOUSGOAL</td><td>9</td><td>When the user&#x27;s intention is unclear and requires clarification</td></tr><tr><td>FOLLOWUPQUESTION</td><td>10</td><td>Additional queries or requests for information after the initial response</td></tr><tr><td>IMPLICITDESCRIPTIVEGOAL</td><td>10</td><td>The user describes a problem/background without directly stating their goal</td></tr><tr><td>OVERFILL</td><td>11</td><td>Providing more information than required for an action</td></tr><tr><td>UNDERFILL</td><td>11</td><td>Missing required arguments or information for an action</td></tr><tr><td>GOALNOTSUPPORTED</td><td>15</td><td>The user&#x27;s request is not supported by the available tools or is out of scope</td></tr></table>"
448
+ },
449
+ {
450
+ "type": "table_caption",
451
+ "bbox": [
452
+ 0.158,
453
+ 0.263,
454
+ 0.837,
455
+ 0.278
456
+ ],
457
+ "angle": 0,
458
+ "content": "Table 1: The distribution and description of the complexities covered in the CONFETTI benchmark."
459
+ },
460
+ {
461
+ "type": "text",
462
+ "bbox": [
463
+ 0.114,
464
+ 0.304,
465
+ 0.486,
466
+ 0.334
467
+ ],
468
+ "angle": 0,
469
+ "content": "to assign a single label before opting for multiple labels."
470
+ },
471
+ {
472
+ "type": "title",
473
+ "bbox": [
474
+ 0.115,
475
+ 0.351,
476
+ 0.311,
477
+ 0.367
478
+ ],
479
+ "angle": 0,
480
+ "content": "3.2 Benchmark Design"
481
+ },
482
+ {
483
+ "type": "text",
484
+ "bbox": [
485
+ 0.113,
486
+ 0.376,
487
+ 0.49,
488
+ 0.614
489
+ ],
490
+ "angle": 0,
491
+ "content": "After the data collection, we convert the conversations into input/output pairs. We split the data into two benchmarks: function-calling benchmark, and response quality benchmark. The function-calling conversational benchmark is defined at the turn-level, where we truncate the conversations at each function-calling turn, and provide the preceding user turns, agent turns, function calls and function results as context. The output is set to be one or more function calls. We extract all function-calling turns from each conversation to construct the dataset. We also include the API schemas of the APIs the agent can choose from. The dataset has a total of 506 examples. Table 2 shows the data statistics."
492
+ },
493
+ {
494
+ "type": "text",
495
+ "bbox": [
496
+ 0.113,
497
+ 0.618,
498
+ 0.49,
499
+ 0.826
500
+ ],
501
+ "angle": 0,
502
+ "content": "Similarly, we define the response quality benchmark at the turn-level. However, instead of truncating conversations at function-calling turns, we extract all agent turns as output turns. The input is set to the preceding user turns, agent turns, and function calls and results, as in the conversational function-calling benchmark, and the API schema of available APIs to call is provided as well. However, the output turns can be function-calling turns or textual agent responses. We limit the number of function-calling turns to 200 to maintain label balance in this dataset. The statistics are given in Table 3."
503
+ },
504
+ {
505
+ "type": "title",
506
+ "bbox": [
507
+ 0.114,
508
+ 0.845,
509
+ 0.315,
510
+ 0.86
511
+ ],
512
+ "angle": 0,
513
+ "content": "4 Evaluation Metrics"
514
+ },
515
+ {
516
+ "type": "text",
517
+ "bbox": [
518
+ 0.113,
519
+ 0.874,
520
+ 0.489,
521
+ 0.922
522
+ ],
523
+ "angle": 0,
524
+ "content": "We leverage abstract syntax trees (AST) to evaluate function-calling turns similar to BFCL v2. For response quality, we resort to dialog acts."
525
+ },
526
+ {
527
+ "type": "table",
528
+ "bbox": [
529
+ 0.57,
530
+ 0.3,
531
+ 0.825,
532
+ 0.42
533
+ ],
534
+ "angle": 0,
535
+ "content": "<table><tr><td>DIMENSION</td><td>COUNT</td></tr><tr><td># conversations</td><td>109</td></tr><tr><td># APIs</td><td>86</td></tr><tr><td># user turns</td><td>313</td></tr><tr><td># agent turns w/ 1 action</td><td>220</td></tr><tr><td># agent turns w/ 2 actions</td><td>46</td></tr><tr><td># agent turns w/ 3+ actions</td><td>47</td></tr><tr><td>Avg turns per conversation</td><td>8.8</td></tr><tr><td># total turns</td><td>506</td></tr></table>"
536
+ },
537
+ {
538
+ "type": "table_caption",
539
+ "bbox": [
540
+ 0.536,
541
+ 0.43,
542
+ 0.855,
543
+ 0.444
544
+ ],
545
+ "angle": 0,
546
+ "content": "Table 2: Function-calling benchmark statistics."
547
+ },
548
+ {
549
+ "type": "table",
550
+ "bbox": [
551
+ 0.57,
552
+ 0.458,
553
+ 0.823,
554
+ 0.552
555
+ ],
556
+ "angle": 0,
557
+ "content": "<table><tr><td>DIMENSION</td><td>COUNT</td></tr><tr><td># turns calling functions</td><td>200</td></tr><tr><td># turns informing user</td><td>331</td></tr><tr><td># turns seeking information</td><td>110</td></tr><tr><td># turns rejecting requests</td><td>32</td></tr><tr><td># other/misc. turns</td><td>25</td></tr><tr><td># total turns</td><td>663</td></tr></table>"
558
+ },
559
+ {
560
+ "type": "table_caption",
561
+ "bbox": [
562
+ 0.508,
563
+ 0.562,
564
+ 0.882,
565
+ 0.591
566
+ ],
567
+ "angle": 0,
568
+ "content": "Table 3: Response quality benchmark statistics: note a turn can have one or more dialog act labels."
569
+ },
570
+ {
571
+ "type": "title",
572
+ "bbox": [
573
+ 0.509,
574
+ 0.617,
575
+ 0.845,
576
+ 0.632
577
+ ],
578
+ "angle": 0,
579
+ "content": "4.1 Function-Calling Evaluation Metrics"
580
+ },
581
+ {
582
+ "type": "text",
583
+ "bbox": [
584
+ 0.507,
585
+ 0.638,
586
+ 0.884,
587
+ 0.814
588
+ ],
589
+ "angle": 0,
590
+ "content": "AST Soft AST evaluation parses the function name, parameter names and values as a tree, and matches each of the tree nodes to the ground-truth reference function call in a binary fashion. Since the dataset includes many APIs that accept string-type input, we use soft scoring to calculating parameter value matching for string types. We use AlignScore (Zha et al., 2023) to calculate the matching accuracy for string parameter values. All nonstring parameter values are evaluated in a binary fashion."
591
+ },
592
+ {
593
+ "type": "text",
594
+ "bbox": [
595
+ 0.508,
596
+ 0.826,
597
+ 0.885,
598
+ 0.921
599
+ ],
600
+ "angle": 0,
601
+ "content": "Parameter Hallucination We also perform an analysis on how often the models hallucinate parameters at the action calls. We use an off-the-shelf LLM to do hallucination detection. The prompt includes the conversation history, the predicted action call (or chain of action calls) and their schemas,"
602
+ },
603
+ {
604
+ "type": "page_number",
605
+ "bbox": [
606
+ 0.481,
607
+ 0.929,
608
+ 0.521,
609
+ 0.941
610
+ ],
611
+ "angle": 0,
612
+ "content": "7996"
613
+ }
614
+ ],
615
+ [
616
+ {
617
+ "type": "text",
618
+ "bbox": [
619
+ 0.113,
620
+ 0.085,
621
+ 0.488,
622
+ 0.165
623
+ ],
624
+ "angle": 0,
625
+ "content": "and instruct the LLM judge to return a list of hallucinated parameters (if any) for each action call, along with a rationale. We use gpt-4o-mini as an LLM judge to avoid bias in the evaluation. The exact prompt is shown in the Appendix A."
626
+ },
627
+ {
628
+ "type": "text",
629
+ "bbox": [
630
+ 0.113,
631
+ 0.167,
632
+ 0.489,
633
+ 0.262
634
+ ],
635
+ "angle": 0,
636
+ "content": "Given a sequence of gold actions \\(\\mathcal{A}_{\\mathrm{g}}\\) and predicted actions \\(\\tilde{\\mathcal{A}}\\) corresponding to the input context sequence \\(\\mathcal{C}\\), and denoting \\(\\tilde{\\alpha}_t\\) as the predicted action for the \\(t\\)-th example, we calculate the parameter validity rate on the parameter level using the following formula."
637
+ },
638
+ {
639
+ "type": "equation",
640
+ "bbox": [
641
+ 0.116,
642
+ 0.277,
643
+ 0.486,
644
+ 0.32
645
+ ],
646
+ "angle": 0,
647
+ "content": "\\[\n\\sum_ {(\\tilde {a} _ {t}, a _ {t}, c _ {t}) \\in (\\tilde {\\mathcal {A}}, \\mathcal {A} _ {g}, \\mathcal {C})} \\sum_ {\\theta \\in \\tilde {a} _ {t}} \\frac {\\mathbb {1} (\\tilde {a} _ {t} \\text {i s v a l i d}) \\times f (\\theta ; c _ {t} , a _ {t})}{| \\{\\hat {\\theta} | \\hat {\\theta} \\in \\tilde {a} _ {t} , \\forall \\tilde {a} _ {t} \\in \\tilde {\\mathcal {A}} \\} |}\n\\]"
648
+ },
649
+ {
650
+ "type": "text",
651
+ "bbox": [
652
+ 0.113,
653
+ 0.334,
654
+ 0.487,
655
+ 0.448
656
+ ],
657
+ "angle": 0,
658
+ "content": "Where \\(\\mathbb{1}\\) is the indicator function. We define valid actions as predicted actions whose name matches the ground-truth action. \\(f(\\theta ;c_t,a_t)\\in \\{0,1\\}\\) is the binary outcome of the LLM classifier judging the validity of parameter \\(\\theta\\) given the context \\(c_{t}\\) and gold action \\(a_{t}\\). The denominator denotes all predicted parameters of valid predicted actions."
659
+ },
660
+ {
661
+ "type": "title",
662
+ "bbox": [
663
+ 0.114,
664
+ 0.462,
665
+ 0.473,
666
+ 0.492
667
+ ],
668
+ "angle": 0,
669
+ "content": "4.2 Response Quality Evaluation via Dialog Acts"
670
+ },
671
+ {
672
+ "type": "text",
673
+ "bbox": [
674
+ 0.113,
675
+ 0.501,
676
+ 0.489,
677
+ 0.678
678
+ ],
679
+ "angle": 0,
680
+ "content": "Calculating response quality on the textual responses directly is challenging. While there are many ways to calculate similarity between two texts, we resort to a coarse-grained response evaluation via dialog acts. To this end, we leverage dialog act annotations provided by the annotators for each agent response in the ground-truth conversations. In order to evaluate online agent responses, we use an LLM-based dialog act classifier that is prompted to generate one or more of the dialog acts for an agent response."
681
+ },
682
+ {
683
+ "type": "title",
684
+ "bbox": [
685
+ 0.114,
686
+ 0.693,
687
+ 0.262,
688
+ 0.71
689
+ ],
690
+ "angle": 0,
691
+ "content": "5 Experiments"
692
+ },
693
+ {
694
+ "type": "text",
695
+ "bbox": [
696
+ 0.113,
697
+ 0.722,
698
+ 0.489,
699
+ 0.883
700
+ ],
701
+ "angle": 0,
702
+ "content": "We implemented the benchmark as an extension to BFCL v2. We compare Claude Sonnet v3.5, Sonnet v3, Haiku v3, Llama 3.1 70B and 405B, Llama 3 70B, Mistral large, and the Command-plus-r models. We distinguish between using the tool use option in the API vs using direct prompting. The difference is that in the tool use case, the API handles the function call parsing, while in the direct prompting case, the function schemas and parsing are handled explicitly by the user. We use"
703
+ },
704
+ {
705
+ "type": "table",
706
+ "bbox": [
707
+ 0.514,
708
+ 0.082,
709
+ 0.881,
710
+ 0.245
711
+ ],
712
+ "angle": 0,
713
+ "content": "<table><tr><td>MODEL</td><td>PROVIDER</td><td>AST SOFT (%)</td></tr><tr><td>Nova Pro</td><td>Amazon</td><td>40.91</td></tr><tr><td>Nova Micro</td><td>Amazon</td><td>33.97</td></tr><tr><td>claude-3-5-sonnet</td><td>Anthropic</td><td>35.46</td></tr><tr><td>claude-3-5-haiku†</td><td>Anthropic</td><td>31.25</td></tr><tr><td>claude-3-sonnet</td><td>Anthropic</td><td>22.63</td></tr><tr><td>claude-3-haiku</td><td>Anthropic</td><td>18.30</td></tr><tr><td>llama3-1-405b-instruct</td><td>Meta</td><td>33.19</td></tr><tr><td>llama3-1-70b-instruct</td><td>Meta</td><td>31.29</td></tr><tr><td>llama3-70b-instruct</td><td>Meta</td><td>27.19</td></tr><tr><td>mistral-large-2407†</td><td>Mistral</td><td>30.07</td></tr><tr><td>command-r-plus†</td><td>Cohere</td><td>31.18</td></tr></table>"
714
+ },
715
+ {
716
+ "type": "table_caption",
717
+ "bbox": [
718
+ 0.508,
719
+ 0.254,
720
+ 0.884,
721
+ 0.312
722
+ ],
723
+ "angle": 0,
724
+ "content": "Table 4: Model AST soft scores for the conversational function-calling dataset where chained actions are teacher-forced. \\(\\dagger\\) indicates using tool-use formatting."
725
+ },
726
+ {
727
+ "type": "text",
728
+ "bbox": [
729
+ 0.508,
730
+ 0.338,
731
+ 0.884,
732
+ 0.468
733
+ ],
734
+ "angle": 0,
735
+ "content": "Bedrock's Converse API to conduct these experiments<sup>3</sup>. We use the ALIGNSCORE-BASE model to calculate soft scores between string parameter values for the AST soft accuracy metric.<sup>4</sup>. Table 9 and Table 10 in Appendix A indicate the prompts used to generate predictions for the function-calling and response quality benchmarks, respectively. All experiments are run with temperature 0."
736
+ },
737
+ {
738
+ "type": "title",
739
+ "bbox": [
740
+ 0.509,
741
+ 0.48,
742
+ 0.791,
743
+ 0.494
744
+ ],
745
+ "angle": 0,
746
+ "content": "5.1 Function-calling Performance"
747
+ },
748
+ {
749
+ "type": "text",
750
+ "bbox": [
751
+ 0.508,
752
+ 0.501,
753
+ 0.884,
754
+ 0.678
755
+ ],
756
+ "angle": 0,
757
+ "content": "Table 4 shows function-calling results measured in terms of AST soft accuracy across the different models. We observe Nova Pro \\((40.91\\%)\\) and Claude Sonnet v3.5 \\((35.46\\%)\\) among the top performing models, followed by Nova Micro \\((33.97\\%)\\), Llama 3.1 405B models \\((33.19\\%)\\), Llama 3.1 70B \\((31.29\\%)\\), Commandr-plus \\((31.18\\%)\\) and Mistral Large \\((30.07\\%)\\). Smaller models such as Nova Micro \\((33.97\\%)\\) and Haiku v3.5 \\((31.25\\%)\\) perform relatively well compared to the others."
758
+ },
759
+ {
760
+ "type": "title",
761
+ "bbox": [
762
+ 0.509,
763
+ 0.69,
764
+ 0.71,
765
+ 0.705
766
+ ],
767
+ "angle": 0,
768
+ "content": "5.2 Impact of # of APIs"
769
+ },
770
+ {
771
+ "type": "text",
772
+ "bbox": [
773
+ 0.508,
774
+ 0.712,
775
+ 0.882,
776
+ 0.825
777
+ ],
778
+ "angle": 0,
779
+ "content": "We split the data according to the number of APIs included. Figure 2 shows that while some models such as Nova Pro, Nova Micro, Claude 3.5 Haiku and Mistral large are able to handle \\(20+\\) APIs, there is a tendency towards lower performance across the rest of the models when increasing the number of APIs. There are two implications associated with"
780
+ },
781
+ {
782
+ "type": "page_footnote",
783
+ "bbox": [
784
+ 0.508,
785
+ 0.835,
786
+ 0.882,
787
+ 0.907
788
+ ],
789
+ "angle": 0,
790
+ "content": "3There are two modes of calling the API, with tool use or without. In the tool use case, the tool schemas are passed as an API argument, as opposed to concatenating the schema to the prompt directly. We experimented with both, where we use \\(\\dagger\\) to indicate model called using the tool use option. We report the best of the two modes for each model."
791
+ },
792
+ {
793
+ "type": "page_footnote",
794
+ "bbox": [
795
+ 0.533,
796
+ 0.907,
797
+ 0.822,
798
+ 0.92
799
+ ],
800
+ "angle": 0,
801
+ "content": "<sup>4</sup>https://github.com/yuh-zha/AlignScore"
802
+ },
803
+ {
804
+ "type": "list",
805
+ "bbox": [
806
+ 0.508,
807
+ 0.835,
808
+ 0.882,
809
+ 0.92
810
+ ],
811
+ "angle": 0,
812
+ "content": null
813
+ },
814
+ {
815
+ "type": "page_footnote",
816
+ "bbox": [
817
+ 0.114,
818
+ 0.895,
819
+ 0.486,
820
+ 0.92
821
+ ],
822
+ "angle": 0,
823
+ "content": "\\(^{2}\\)https://github.com/ShishirPatil/gorilla/tree/main/berkeley-function-call-leaderboard"
824
+ },
825
+ {
826
+ "type": "page_number",
827
+ "bbox": [
828
+ 0.481,
829
+ 0.928,
830
+ 0.521,
831
+ 0.941
832
+ ],
833
+ "angle": 0,
834
+ "content": "7997"
835
+ }
836
+ ],
837
+ [
838
+ {
839
+ "type": "image",
840
+ "bbox": [
841
+ 0.09,
842
+ 0.083,
843
+ 0.844,
844
+ 0.334
845
+ ],
846
+ "angle": 0,
847
+ "content": null
848
+ },
849
+ {
850
+ "type": "image_caption",
851
+ "bbox": [
852
+ 0.113,
853
+ 0.342,
854
+ 0.885,
855
+ 0.374
856
+ ],
857
+ "angle": 0,
858
+ "content": "Figure 2: AST soft accuracy for different models across various number of APIs. The dataset has 144 examples with 1-9 APIs, 154 examples of 10-19 APIs and 15 examples of \\(20+\\) APIs."
859
+ },
860
+ {
861
+ "type": "image",
862
+ "bbox": [
863
+ 0.093,
864
+ 0.384,
865
+ 0.841,
866
+ 0.705
867
+ ],
868
+ "angle": 0,
869
+ "content": null
870
+ },
871
+ {
872
+ "type": "image_caption",
873
+ "bbox": [
874
+ 0.113,
875
+ 0.712,
876
+ 0.887,
877
+ 0.743
878
+ ],
879
+ "angle": 0,
880
+ "content": "Figure 3: AST soft accuracy for different models across various context lengths. The dataset has 174 examples with 1-5 user turns, 114 examples of 6-10 user turns and 25 examples of \\(11+\\) user turns."
881
+ },
882
+ {
883
+ "type": "text",
884
+ "bbox": [
885
+ 0.113,
886
+ 0.766,
887
+ 0.494,
888
+ 0.898
889
+ ],
890
+ "angle": 0,
891
+ "content": "increasing the number of tools: First, since the API schemas go into the prompt, more tools imply longer prompts. Second, more APIs provide higher chances of the model making a mistake since it has more choices to select from. In general, including more tools lead to performance degradation. This applies to Claude, Llama and Command-r-plus models."
892
+ },
893
+ {
894
+ "type": "title",
895
+ "bbox": [
896
+ 0.509,
897
+ 0.766,
898
+ 0.753,
899
+ 0.785
900
+ ],
901
+ "angle": 0,
902
+ "content": "5.3 Context Length Analysis"
903
+ },
904
+ {
905
+ "type": "text",
906
+ "bbox": [
907
+ 0.508,
908
+ 0.793,
909
+ 0.886,
910
+ 0.922
911
+ ],
912
+ "angle": 0,
913
+ "content": "Figure 3 shows results split according to the conversation length, measured by indicating the number of user turns. We observe that while some models such as Nova Pro, Nova Micro, Llama 3.1 405B and 70B are able to perform well on long conversations, smaller models such as Haiku v3 struggle to perform well on longer conversations. We also note that Llama 405B appears to perform better"
914
+ },
915
+ {
916
+ "type": "page_number",
917
+ "bbox": [
918
+ 0.481,
919
+ 0.928,
920
+ 0.522,
921
+ 0.942
922
+ ],
923
+ "angle": 0,
924
+ "content": "7998"
925
+ }
926
+ ],
927
+ [
928
+ {
929
+ "type": "text",
930
+ "bbox": [
931
+ 0.113,
932
+ 0.085,
933
+ 0.49,
934
+ 0.213
935
+ ],
936
+ "angle": 0,
937
+ "content": "on longer conversations. This can be an artifact of off-policy evaluation, where the gold-truth conversation context is leveraged by those models for indirect in-context learning, hence improving their predictions as the context length increases. Claude Sonnet v3.5 and Mistral Large perform well up to 10 user turns, but then tend to degrade for longer conversations."
938
+ },
939
+ {
940
+ "type": "title",
941
+ "bbox": [
942
+ 0.114,
943
+ 0.225,
944
+ 0.356,
945
+ 0.241
946
+ ],
947
+ "angle": 0,
948
+ "content": "5.3.1 Chain Length Analysis"
949
+ },
950
+ {
951
+ "type": "text",
952
+ "bbox": [
953
+ 0.117,
954
+ 0.245,
955
+ 0.49,
956
+ 0.518
957
+ ],
958
+ "angle": 0,
959
+ "content": "We also investigate the performance on chained action calls, where the model is expected to perform multiple action calls before returning control to the user. For instance, when the model is asked to look up the number of remaining holiday days for an employee, it is expected to retrieve the employee id from the system prior to that call. The score of a chain \\(\\tilde{a}_1,\\tilde{a}_2,\\ldots ,\\tilde{a}_J\\) of length \\(J\\) actions given a conversation context \\(c\\) is calculated as the product of AST soft accuracies for each of the individual actions: \\(p(\\tilde{a}_1,\\dots,\\tilde{a}_J|c) = \\prod_{j = 1}^{J}p(\\tilde{a}_j|a_1,\\dots,a_{j - 1},c)\\), where \\(p(\\tilde{a}_j|a_1,\\dots,a_{j - 1})\\) is given by the AST soft accuracy conditioned on gold-truth previous function calls and function call results. Note that we perform teacher-forcing on the action level, where each action is predicted conditioned on the ground-truth previous actions and results."
960
+ },
961
+ {
962
+ "type": "text",
963
+ "bbox": [
964
+ 0.113,
965
+ 0.52,
966
+ 0.49,
967
+ 0.697
968
+ ],
969
+ "angle": 0,
970
+ "content": "Figure 4 shows the results across chains of lengths 1, 2, 3 and \\(4+\\). The results indicate that all models have much lower performance than predicting a single action. Claude Sonnet 3.5 demonstrates some ability to predict chains of length 2 with \\((21.46\\%)\\) success, followed by Nova Pro \\((17.29\\%)\\), and Llama 3.1 405B \\((16.39\\%)\\), while the rest of the models perform worse than \\(15\\%\\). For chains of length 3 and above, almost all models fail in most cases, except for Nova Pro which has \\(17.71\\%\\) AST accuracy."
971
+ },
972
+ {
973
+ "type": "title",
974
+ "bbox": [
975
+ 0.114,
976
+ 0.708,
977
+ 0.436,
978
+ 0.724
979
+ ],
980
+ "angle": 0,
981
+ "content": "5.3.2 Response Quality via Dialog Acts"
982
+ },
983
+ {
984
+ "type": "text",
985
+ "bbox": [
986
+ 0.113,
987
+ 0.729,
988
+ 0.49,
989
+ 0.921
990
+ ],
991
+ "angle": 0,
992
+ "content": "To help understand where and how models fail, we compare model responses using coarse-grained dialog acts: inform user, seek information, reject request, function call, and other. We use an LLM classifier based on Claude Haiku v3 to classify the dialog acts of the model responses into one of these five categories. We report the classification performance on the ground-truth dataset in Table 5. The classifier predicts one or more dialog act labels for the model response, where the ground-truth annotations may include one or more dialog act labels. We note that the classifier has a high recall but low"
993
+ },
994
+ {
995
+ "type": "text",
996
+ "bbox": [
997
+ 0.508,
998
+ 0.085,
999
+ 0.885,
1000
+ 0.15
1001
+ ],
1002
+ "angle": 0,
1003
+ "content": "precision. In our reporting, we declare a match if at least one of the predicted dialog acts matches any of the ground-truth labels. The classification prompt is given in Table 8 in Appendix A."
1004
+ },
1005
+ {
1006
+ "type": "table",
1007
+ "bbox": [
1008
+ 0.55,
1009
+ 0.16,
1010
+ 0.845,
1011
+ 0.232
1012
+ ],
1013
+ "angle": 0,
1014
+ "content": "<table><tr><td>METRIC</td><td>SCORE (%)</td></tr><tr><td>MULTI-LABEL PRECISION</td><td>67.2</td></tr><tr><td>MULTI-LABEL RECALL</td><td>90.3</td></tr><tr><td>MULTI-LABEL F1 SCORE</td><td>77.0</td></tr><tr><td>SINGLE-LABEL ACCURACY</td><td>92.8</td></tr></table>"
1015
+ },
1016
+ {
1017
+ "type": "table_caption",
1018
+ "bbox": [
1019
+ 0.508,
1020
+ 0.241,
1021
+ 0.885,
1022
+ 0.327
1023
+ ],
1024
+ "angle": 0,
1025
+ "content": "Table 5: Dialog act classifier performance on gold-truth conversations. The classifier detects multiple labels which are compared to the multi-label ground-truth labels. For Single-label accuracy we calculate how often at least one predicted label matches one of the ground-truth labels."
1026
+ },
1027
+ {
1028
+ "type": "text",
1029
+ "bbox": [
1030
+ 0.508,
1031
+ 0.343,
1032
+ 0.885,
1033
+ 0.618
1034
+ ],
1035
+ "angle": 0,
1036
+ "content": "In terms of dialog act accuracy, Claude Sonnet v3.5 (FC) is the best performing with \\(73.13\\%\\) accuracy, followed closely by Nova Pro \\((69.68\\%)\\), Haiku 3.5 \\((67.12\\%)\\), Nova Micro \\((66.21\\%)\\) and command-r-plus \\((64.86\\%)\\). Llama models perform worse than the rest. We further analyze the confusion matrix for the dialog acts in Figure 5. We omit the correct matches on the diagonals and focus on the mismatches. In general we see a tendency to confuse inform and seek information acts with function calls, indicating that the models are falsely triggering function calls, although to different extents depending on the model. This is showing to a large extent in the Llama 3.1 70B model. We also observe under-triggering of function calls where the models tend to inform the user or seek information rather than calling a function."
1037
+ },
1038
+ {
1039
+ "type": "title",
1040
+ "bbox": [
1041
+ 0.509,
1042
+ 0.625,
1043
+ 0.822,
1044
+ 0.641
1045
+ ],
1046
+ "angle": 0,
1047
+ "content": "5.4 Parameter Hallucination Analysis"
1048
+ },
1049
+ {
1050
+ "type": "text",
1051
+ "bbox": [
1052
+ 0.508,
1053
+ 0.646,
1054
+ 0.885,
1055
+ 0.773
1056
+ ],
1057
+ "angle": 0,
1058
+ "content": "Table 7 shows hallucination results for all models. We report parameter validity rate for the ground truth as a reference. We observe that Claude v3.5 Sonnet has the highest validity rate (72.4%), followed by Nova Pro (68.8%), Haiku 3.5 (66.1%), Command-R Plus (63.7%) and Llama 3.1 405B (62.7%). Claude Sonnet v3 and Haiku v3 have much lower scores."
1059
+ },
1060
+ {
1061
+ "type": "title",
1062
+ "bbox": [
1063
+ 0.509,
1064
+ 0.784,
1065
+ 0.642,
1066
+ 0.799
1067
+ ],
1068
+ "angle": 0,
1069
+ "content": "6 Conclusion"
1070
+ },
1071
+ {
1072
+ "type": "text",
1073
+ "bbox": [
1074
+ 0.508,
1075
+ 0.809,
1076
+ 0.884,
1077
+ 0.922
1078
+ ],
1079
+ "angle": 0,
1080
+ "content": "We introduced a conversational benchmark for function calling spanning multiple complexities natural to dialog. The dataset targets the evaluation of function calling and response quality. The benchmark includes over 80 API tools and tests function-calling up to \\(20+\\) APIs under different conversation lengths. We evaluated top LLMs on"
1081
+ },
1082
+ {
1083
+ "type": "page_number",
1084
+ "bbox": [
1085
+ 0.481,
1086
+ 0.928,
1087
+ 0.521,
1088
+ 0.941
1089
+ ],
1090
+ "angle": 0,
1091
+ "content": "7999"
1092
+ }
1093
+ ],
1094
+ [
1095
+ {
1096
+ "type": "image",
1097
+ "bbox": [
1098
+ 0.132,
1099
+ 0.082,
1100
+ 0.873,
1101
+ 0.4
1102
+ ],
1103
+ "angle": 0,
1104
+ "content": null
1105
+ },
1106
+ {
1107
+ "type": "image_caption",
1108
+ "bbox": [
1109
+ 0.114,
1110
+ 0.41,
1111
+ 0.883,
1112
+ 0.44
1113
+ ],
1114
+ "angle": 0,
1115
+ "content": "Figure 4: AST soft accuracy for different models across chain lengths. The dataset has 220 examples with chain length 1, 46 examples with chain length 2, 25 examples with chain length 3, and 22 examples with chain length \\(4+\\)."
1116
+ },
1117
+ {
1118
+ "type": "table",
1119
+ "bbox": [
1120
+ 0.12,
1121
+ 0.461,
1122
+ 0.484,
1123
+ 0.632
1124
+ ],
1125
+ "angle": 0,
1126
+ "content": "<table><tr><td>MODEL</td><td>DA ACCURACY (%) ↑</td></tr><tr><td>nova-pro†</td><td>69.68</td></tr><tr><td>nova-micro†</td><td>66.21</td></tr><tr><td>claude-3-5-sonnet†</td><td>73.15</td></tr><tr><td>claude-3-5-haiku†</td><td>67.12</td></tr><tr><td>claude-3-sonnet</td><td>61.54</td></tr><tr><td>claude-3-haiku</td><td>63.80</td></tr><tr><td>llama3-1-70b-instruct</td><td>50.98</td></tr><tr><td>llama3-70b-instruct</td><td>56.26</td></tr><tr><td>mistral-large-2407†</td><td>61.09</td></tr><tr><td>command-r-plus†</td><td>64.86</td></tr></table>"
1127
+ },
1128
+ {
1129
+ "type": "table_caption",
1130
+ "bbox": [
1131
+ 0.114,
1132
+ 0.64,
1133
+ 0.49,
1134
+ 0.671
1135
+ ],
1136
+ "angle": 0,
1137
+ "content": "Table 6: Dialog acts accuracy for different models. \\(\\dagger\\) indicates using tool-use formatting."
1138
+ },
1139
+ {
1140
+ "type": "text",
1141
+ "bbox": [
1142
+ 0.113,
1143
+ 0.745,
1144
+ 0.49,
1145
+ 0.922
1146
+ ],
1147
+ "angle": 0,
1148
+ "content": "our proposed benchmark in an off-policy turn-level fashion, where we set the context to the ground-truth conversation up to the current turn. The context is composed of user and agent turns as well as function calls and results. Overall, the models performance on this benchmark is relatively low, suggesting that LLMs need further work to improve conversational function-calling capabilities. The benchmark can be used to assess model performance across varying conversations length, number of tools and action chain lengths."
1149
+ },
1150
+ {
1151
+ "type": "table",
1152
+ "bbox": [
1153
+ 0.516,
1154
+ 0.461,
1155
+ 0.879,
1156
+ 0.689
1157
+ ],
1158
+ "angle": 0,
1159
+ "content": "<table><tr><td>MODEL</td><td>VALID\nPARAMETERS (↑)</td></tr><tr><td>Ground Truth</td><td>83.1%</td></tr><tr><td>Nova Pro</td><td>68.8%</td></tr><tr><td>Nova Micro</td><td>57.9%</td></tr><tr><td>claude-3-5-sonnet</td><td>72.4%</td></tr><tr><td>claude-3-5-haiku†</td><td>66.1%</td></tr><tr><td>claude-3-sonnet</td><td>40.7%</td></tr><tr><td>claude-3-haiku</td><td>36.3%</td></tr><tr><td>llama3-1-405b-instruct</td><td>62.7%</td></tr><tr><td>llama3-1-70b-instruct</td><td>59.2%</td></tr><tr><td>llama3-70b-instruct</td><td>51.4%</td></tr><tr><td>mistral-large-2407†</td><td>51.1%</td></tr><tr><td>command-r-plus†</td><td>63.7%</td></tr></table>"
1160
+ },
1161
+ {
1162
+ "type": "table_caption",
1163
+ "bbox": [
1164
+ 0.509,
1165
+ 0.699,
1166
+ 0.885,
1167
+ 0.758
1168
+ ],
1169
+ "angle": 0,
1170
+ "content": "Table 7: Parameter validity rate for different models. VALID PARAMETERS is the percentage of valid predicted parameters for valid action calls as calculated in Section 4.1. \\(\\dagger\\) indicates using tool-use formatting."
1171
+ },
1172
+ {
1173
+ "type": "title",
1174
+ "bbox": [
1175
+ 0.509,
1176
+ 0.782,
1177
+ 0.719,
1178
+ 0.797
1179
+ ],
1180
+ "angle": 0,
1181
+ "content": "7 Limitations & Risks"
1182
+ },
1183
+ {
1184
+ "type": "text",
1185
+ "bbox": [
1186
+ 0.508,
1187
+ 0.809,
1188
+ 0.885,
1189
+ 0.921
1190
+ ],
1191
+ "angle": 0,
1192
+ "content": "Turn-level evaluation is a fine-grained evaluation approach that allows detailed analysis of how and when predictions deviate from the ground truth. However, performing turn-level evaluation is done in an off-policy fashion, where the gold truth is fixed as context. This does not correspond directly to inference behavior, where the model uses on-"
1193
+ },
1194
+ {
1195
+ "type": "page_number",
1196
+ "bbox": [
1197
+ 0.481,
1198
+ 0.929,
1199
+ 0.521,
1200
+ 0.941
1201
+ ],
1202
+ "angle": 0,
1203
+ "content": "8000"
1204
+ }
1205
+ ],
1206
+ [
1207
+ {
1208
+ "type": "title",
1209
+ "bbox": [
1210
+ 0.372,
1211
+ 0.085,
1212
+ 0.505,
1213
+ 0.098
1214
+ ],
1215
+ "angle": 0,
1216
+ "content": "Predicted Dialog Act"
1217
+ },
1218
+ {
1219
+ "type": "image",
1220
+ "bbox": [
1221
+ 0.118,
1222
+ 0.112,
1223
+ 0.363,
1224
+ 0.24
1225
+ ],
1226
+ "angle": 0,
1227
+ "content": null
1228
+ },
1229
+ {
1230
+ "type": "image_caption",
1231
+ "bbox": [
1232
+ 0.13,
1233
+ 0.246,
1234
+ 0.273,
1235
+ 0.259
1236
+ ],
1237
+ "angle": 0,
1238
+ "content": "(a) mistral-large-2407†"
1239
+ },
1240
+ {
1241
+ "type": "image",
1242
+ "bbox": [
1243
+ 0.367,
1244
+ 0.112,
1245
+ 0.535,
1246
+ 0.242
1247
+ ],
1248
+ "angle": 0,
1249
+ "content": null
1250
+ },
1251
+ {
1252
+ "type": "image_caption",
1253
+ "bbox": [
1254
+ 0.396,
1255
+ 0.246,
1256
+ 0.51,
1257
+ 0.259
1258
+ ],
1259
+ "angle": 0,
1260
+ "content": "(b) Llama 3.1 70B"
1261
+ },
1262
+ {
1263
+ "type": "image",
1264
+ "bbox": [
1265
+ 0.538,
1266
+ 0.112,
1267
+ 0.706,
1268
+ 0.242
1269
+ ],
1270
+ "angle": 0,
1271
+ "content": null
1272
+ },
1273
+ {
1274
+ "type": "image_caption",
1275
+ "bbox": [
1276
+ 0.555,
1277
+ 0.246,
1278
+ 0.694,
1279
+ 0.259
1280
+ ],
1281
+ "angle": 0,
1282
+ "content": "(c) claudi-sonnet-3-5†"
1283
+ },
1284
+ {
1285
+ "type": "image",
1286
+ "bbox": [
1287
+ 0.71,
1288
+ 0.112,
1289
+ 0.877,
1290
+ 0.242
1291
+ ],
1292
+ "angle": 0,
1293
+ "content": null
1294
+ },
1295
+ {
1296
+ "type": "image_caption",
1297
+ "bbox": [
1298
+ 0.731,
1299
+ 0.246,
1300
+ 0.861,
1301
+ 0.259
1302
+ ],
1303
+ "angle": 0,
1304
+ "content": "(d) command-r-plus†"
1305
+ },
1306
+ {
1307
+ "type": "image_caption",
1308
+ "bbox": [
1309
+ 0.113,
1310
+ 0.27,
1311
+ 0.885,
1312
+ 0.314
1313
+ ],
1314
+ "angle": 0,
1315
+ "content": "Figure 5: Confusion matrix for dialog acts for (a) mistral-large-2407 (b) llama3-1-70b-instruct, (c) claude-sonnet-3-5, and (d) command-r-plus. The rows correspond to true labels and the columns to the predicted labels. We are not showing the diagonal values which are correct matches. \\(\\dagger\\) indicates using tool-use formatting."
1316
+ },
1317
+ {
1318
+ "type": "text",
1319
+ "bbox": [
1320
+ 0.113,
1321
+ 0.339,
1322
+ 0.49,
1323
+ 0.516
1324
+ ],
1325
+ "angle": 0,
1326
+ "content": "policy predictions for agent responses as context. For instance, using off-policy trajectories can induce a form of in-context learning that help later predictions conform to the generation style of the gold truth, or even learn action-calling dependencies from ground-truth context, causing an artificial inflation in model performance for later turns. Another deviation from inference-time behavior is regarding function call execution. In this work, we do not execute function calls. All function call results are looked up from gold truth turns."
1327
+ },
1328
+ {
1329
+ "type": "text",
1330
+ "bbox": [
1331
+ 0.113,
1332
+ 0.519,
1333
+ 0.49,
1334
+ 0.646
1335
+ ],
1336
+ "angle": 0,
1337
+ "content": "The dialog act accuracy and parameter validity rate are both calculated leveraging LLMs to classify or judge the outcome. These LLMs demonstrate high recall for dialog act classification and relatively high parameter validity rate for the groundtruth annotations. However, these models can still make mistakes which can obscure the true model performance."
1338
+ },
1339
+ {
1340
+ "type": "text",
1341
+ "bbox": [
1342
+ 0.113,
1343
+ 0.665,
1344
+ 0.49,
1345
+ 0.921
1346
+ ],
1347
+ "angle": 0,
1348
+ "content": "Data Statement We provide a data statement in adherence with the ACL code of conduct and recommendations laid out in (Bender and Friedman, 2018). The dataset was collected by linguists who are professional English speakers hired through a vendor and they were remunerated above industry standard rates. The conversations were simulated by human annotators, where the same annotator played both the user role and the agent roles, and created the function calls. All conversation parts were collected from scratch except for function call results, which were simulated using an internally trained model. The dataset went through quality assurance process done internally, where conversations were edited as needed to fix any observed errors."
1349
+ },
1350
+ {
1351
+ "type": "title",
1352
+ "bbox": [
1353
+ 0.509,
1354
+ 0.338,
1355
+ 0.704,
1356
+ 0.355
1357
+ ],
1358
+ "angle": 0,
1359
+ "content": "8 Acknowledgments"
1360
+ },
1361
+ {
1362
+ "type": "text",
1363
+ "bbox": [
1364
+ 0.508,
1365
+ 0.363,
1366
+ 0.883,
1367
+ 0.444
1368
+ ],
1369
+ "angle": 0,
1370
+ "content": "We would like to thank Daniele Bonadiman and Sailik Sengupta for their contributions in creating the APIs, I-Hsuan Chen for support with the dialog act annotation collection, and Emily Moeng for managing data collection through vendors."
1371
+ },
1372
+ {
1373
+ "type": "title",
1374
+ "bbox": [
1375
+ 0.51,
1376
+ 0.47,
1377
+ 0.61,
1378
+ 0.485
1379
+ ],
1380
+ "angle": 0,
1381
+ "content": "References"
1382
+ },
1383
+ {
1384
+ "type": "ref_text",
1385
+ "bbox": [
1386
+ 0.511,
1387
+ 0.493,
1388
+ 0.885,
1389
+ 0.599
1390
+ ],
1391
+ "angle": 0,
1392
+ "content": "Ali Ahmadvand, Jason Ingyu Choi, and Eugene Agichtein. 2019. Contextual dialogue act classification for open-domain conversational agents. In Proceedings of the 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR'19, page 1273-1276, New York, NY, USA. Association for Computing Machinery."
1393
+ },
1394
+ {
1395
+ "type": "ref_text",
1396
+ "bbox": [
1397
+ 0.511,
1398
+ 0.608,
1399
+ 0.884,
1400
+ 0.648
1401
+ ],
1402
+ "angle": 0,
1403
+ "content": "Layla El Asri, Jing He, and Kaheer Suleman. 2016. A sequence-to-sequence model for user simulation in spoken dialogue systems. In Interspeech."
1404
+ },
1405
+ {
1406
+ "type": "ref_text",
1407
+ "bbox": [
1408
+ 0.511,
1409
+ 0.657,
1410
+ 0.885,
1411
+ 0.723
1412
+ ],
1413
+ "angle": 0,
1414
+ "content": "Emily M. Bender and Batya Friedman. 2018. Data statements for natural language processing: Toward mitigating system bias and enabling better science. Transactions of the Association for Computational Linguistics, 6:587-604."
1415
+ },
1416
+ {
1417
+ "type": "ref_text",
1418
+ "bbox": [
1419
+ 0.51,
1420
+ 0.732,
1421
+ 0.885,
1422
+ 0.785
1423
+ ],
1424
+ "angle": 0,
1425
+ "content": "Saurabh Chakravarty, Raja Venkata Satya Phanindra Chava, and Edward A. Fox. 2019. Dialog acts classification for question-answer corpora. In ASAIL@ICAIL."
1426
+ },
1427
+ {
1428
+ "type": "ref_text",
1429
+ "bbox": [
1430
+ 0.51,
1431
+ 0.794,
1432
+ 0.885,
1433
+ 0.835
1434
+ ],
1435
+ "angle": 0,
1436
+ "content": "Nathan Duran, Steve Battle, and Jim Smith. 2023. Sentence encoding for dialogue act classification. *Natural Language Engineering*, 29(3):794–823."
1437
+ },
1438
+ {
1439
+ "type": "ref_text",
1440
+ "bbox": [
1441
+ 0.51,
1442
+ 0.844,
1443
+ 0.885,
1444
+ 0.884
1445
+ ],
1446
+ "angle": 0,
1447
+ "content": "Nicholas Farn and Richard Shin. 2023. Tooltalk: Evaluating tool-usage in a conversational setting. Preprint, arXiv:2311.10775."
1448
+ },
1449
+ {
1450
+ "type": "ref_text",
1451
+ "bbox": [
1452
+ 0.51,
1453
+ 0.894,
1454
+ 0.885,
1455
+ 0.922
1456
+ ],
1457
+ "angle": 0,
1458
+ "content": "James Gung, Emily Moeng, Wesley Rose, Arshit Gupta, Yi Zhang, and Saab Mansour. 2023. NatCS: Eliciting"
1459
+ },
1460
+ {
1461
+ "type": "list",
1462
+ "bbox": [
1463
+ 0.51,
1464
+ 0.493,
1465
+ 0.885,
1466
+ 0.922
1467
+ ],
1468
+ "angle": 0,
1469
+ "content": null
1470
+ },
1471
+ {
1472
+ "type": "page_number",
1473
+ "bbox": [
1474
+ 0.481,
1475
+ 0.929,
1476
+ 0.519,
1477
+ 0.941
1478
+ ],
1479
+ "angle": 0,
1480
+ "content": "8001"
1481
+ }
1482
+ ],
1483
+ [
1484
+ {
1485
+ "type": "ref_text",
1486
+ "bbox": [
1487
+ 0.135,
1488
+ 0.086,
1489
+ 0.49,
1490
+ 0.14
1491
+ ],
1492
+ "angle": 0,
1493
+ "content": "natural customer support dialogues. In Findings of the Association for Computational Linguistics: ACL 2023, pages 9652-9677, Toronto, Canada. Association for Computational Linguistics."
1494
+ },
1495
+ {
1496
+ "type": "ref_text",
1497
+ "bbox": [
1498
+ 0.117,
1499
+ 0.153,
1500
+ 0.488,
1501
+ 0.22
1502
+ ],
1503
+ "angle": 0,
1504
+ "content": "Minkyoung Kim and Harksoo Kim. 2018. Dialogue act classification model based on deep neural networks for a natural language interface to databases in korean. In 2018 IEEE International Conference on Big Data and Smart Computing (BigComp), pages 537-540."
1505
+ },
1506
+ {
1507
+ "type": "ref_text",
1508
+ "bbox": [
1509
+ 0.117,
1510
+ 0.233,
1511
+ 0.488,
1512
+ 0.325
1513
+ ],
1514
+ "angle": 0,
1515
+ "content": "Chuyi Kong, Yaxin Fan, Xiang Wan, Feng Jiang, and Benyou Wang. 2024. PlatoLM: Teaching LLMs in multi-round dialogue via a user simulator. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 7841-7863, Bangkok, Thailand. Association for Computational Linguistics."
1516
+ },
1517
+ {
1518
+ "type": "ref_text",
1519
+ "bbox": [
1520
+ 0.117,
1521
+ 0.339,
1522
+ 0.488,
1523
+ 0.404
1524
+ ],
1525
+ "angle": 0,
1526
+ "content": "Minghao Li, Yingxiu Zhao, Bowen Yu, Feifan Song, Hangyu Li, Haiyang Yu, Zhoujun Li, Fei Huang, and Yongbin Li. 2023. Api-bank: A comprehensive benchmark for tool-augmented llms. Preprint, arXiv:2304.08244."
1527
+ },
1528
+ {
1529
+ "type": "ref_text",
1530
+ "bbox": [
1531
+ 0.117,
1532
+ 0.418,
1533
+ 0.488,
1534
+ 0.522
1535
+ ],
1536
+ "angle": 0,
1537
+ "content": "Xiao Liu, Hao Yu, Hanchen Zhang, Yifan Xu, Xuanyu Lei, Hanyu Lai, Yu Gu, Hangliang Ding, Kaiwen Men, Kejuan Yang, Shudan Zhang, Xiang Deng, Aohan Zeng, Zhengxiao Du, Chenhui Zhang, Sheng Shen, Tianjun Zhang, Yu Su, Huan Sun, Minlie Huang, Yuxiao Dong, and Jie Tang. 2023a. Agentbench: Evaluating llms as agents. Preprint, arXiv:2308.03688."
1538
+ },
1539
+ {
1540
+ "type": "ref_text",
1541
+ "bbox": [
1542
+ 0.117,
1543
+ 0.537,
1544
+ 0.488,
1545
+ 0.616
1546
+ ],
1547
+ "angle": 0,
1548
+ "content": "Yang Liu, Kun Han, Zhao Tan, and Yun Lei. 2017. Using context information for dialog act classification in DNN framework. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 2170-2178, Copenhagen, Denmark. Association for Computational Linguistics."
1549
+ },
1550
+ {
1551
+ "type": "ref_text",
1552
+ "bbox": [
1553
+ 0.117,
1554
+ 0.63,
1555
+ 0.488,
1556
+ 0.722
1557
+ ],
1558
+ "angle": 0,
1559
+ "content": "Yang Liu, Dan Iter, Yichong Xu, Shuohang Wang, Ruochen Xu, and Chenguang Zhu. 2023b. G-eval: NLG evaluation using gpt-4 with better human alignment. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 2511-2522, Singapore. Association for Computational Linguistics."
1560
+ },
1561
+ {
1562
+ "type": "ref_text",
1563
+ "bbox": [
1564
+ 0.117,
1565
+ 0.736,
1566
+ 0.488,
1567
+ 0.815
1568
+ ],
1569
+ "angle": 0,
1570
+ "content": "Jiarui Lu, Thomas Holleis, Yizhe Zhang, Bernhard Aumayer, Feng Nan, Felix Bai, Shuang Ma, Shen Ma, Mengyu Li, Guoli Yin, Zirui Wang, and Ruoming Pang. 2024. Toolsandbox: A stateful, conversational, interactive evaluation benchmark for llm tool use capabilities. Preprint, arXiv:2408.04682."
1571
+ },
1572
+ {
1573
+ "type": "ref_text",
1574
+ "bbox": [
1575
+ 0.117,
1576
+ 0.828,
1577
+ 0.488,
1578
+ 0.92
1579
+ ],
1580
+ "angle": 0,
1581
+ "content": "Huanzhi Mao, Fanjia Yan, Charlie Cheng-Jie Ji, Jason Huang, Vishnu Suresh, Yixin Huang, Xiaowen Yu, Joseph E. Gonzalez, and Shishir G. Patil. 2024. Bfcl v3: Multiturn & multi-step function calling evaluation. gorilla.cs.berkeley.edu/blogs/8_berkeley_function_calling_leaderboard.html."
1582
+ },
1583
+ {
1584
+ "type": "list",
1585
+ "bbox": [
1586
+ 0.117,
1587
+ 0.086,
1588
+ 0.49,
1589
+ 0.92
1590
+ ],
1591
+ "angle": 0,
1592
+ "content": null
1593
+ },
1594
+ {
1595
+ "type": "ref_text",
1596
+ "bbox": [
1597
+ 0.513,
1598
+ 0.086,
1599
+ 0.883,
1600
+ 0.166
1601
+ ],
1602
+ "angle": 0,
1603
+ "content": "Qian Pan, Zahra Ashktorab, Michael Desmond, Martin Santillán Cooper, James Johnson, Rahul Nair, Elizabeth Daly, and Werner Geyer. 2024. Human-centered design recommendations for LLM-as-a-judge. In Proceedings of the 1st Human-Centered Large Language Modeling Workshop, pages 16-29, TBD. ACL."
1604
+ },
1605
+ {
1606
+ "type": "ref_text",
1607
+ "bbox": [
1608
+ 0.512,
1609
+ 0.176,
1610
+ 0.883,
1611
+ 0.241
1612
+ ],
1613
+ "angle": 0,
1614
+ "content": "Shishir G Patil, Tianjun Zhang, Xin Wang, and Joseph E. Gonzalez. 2024. Gorilla: Large language model connected with massive APIs. In The Thirty-eighth Annual Conference on Neural Information Processing Systems."
1615
+ },
1616
+ {
1617
+ "type": "ref_text",
1618
+ "bbox": [
1619
+ 0.512,
1620
+ 0.253,
1621
+ 0.883,
1622
+ 0.344
1623
+ ],
1624
+ "angle": 0,
1625
+ "content": "Yujia Qin, Shihao Liang, Yining Ye, Kunlun Zhu, Lan Yan, Yaxi Lu, Yankai Lin, Xin Cong, Xiangru Tang, Bill Qian, Sihan Zhao, Lauren Hong, Runchu Tian, Ruobing Xie, Jie Zhou, Mark Gerstein, Dahai Li, Zhiyuan Liu, and Maosong Sun. 2024. Toollm: Facilitating large language models to master 16000+ real-world apis. In ICLR."
1626
+ },
1627
+ {
1628
+ "type": "ref_text",
1629
+ "bbox": [
1630
+ 0.512,
1631
+ 0.356,
1632
+ 0.883,
1633
+ 0.421
1634
+ ],
1635
+ "angle": 0,
1636
+ "content": "Yangjun Ruan, Honghua Dong, Andrew Wang, Silviu Pitis, Yongchao Zhou, Jimmy Ba, Yann Dubois, Chris J. Maddison, and Tatsunori Hashimoto. 2024. Identifying the risks of lm agents with an lm-emulated sandbox. Preprint, arXiv:2309.15817."
1637
+ },
1638
+ {
1639
+ "type": "ref_text",
1640
+ "bbox": [
1641
+ 0.512,
1642
+ 0.433,
1643
+ 0.883,
1644
+ 0.512
1645
+ ],
1646
+ "angle": 0,
1647
+ "content": "Timo Schick, Jane Dwivedi-Yu, Roberto Dessi, Roberta Raileanu, Maria Lomeli, Eric Hambro, Luke Zettlemoyer, Nicola Cancedda, and Thomas Scialom. 2023. Toolformer: Language models can teach themselves to use tools. In Thirty-seventh Conference on Neural Information Processing Systems."
1648
+ },
1649
+ {
1650
+ "type": "ref_text",
1651
+ "bbox": [
1652
+ 0.512,
1653
+ 0.522,
1654
+ 0.883,
1655
+ 0.588
1656
+ ],
1657
+ "angle": 0,
1658
+ "content": "Ivan Sekulic, Silvia Terragni, Victor Guimarães, Nghia Khau, Bruna Guedes, Modestas Filipavicius, Andre Ferreira Manso, and Roland Mathis. 2024. Reliable llm-based user simulator for task-oriented dialogue systems. Preprint, arXiv:2402.13374."
1659
+ },
1660
+ {
1661
+ "type": "ref_text",
1662
+ "bbox": [
1663
+ 0.512,
1664
+ 0.599,
1665
+ 0.883,
1666
+ 0.678
1667
+ ],
1668
+ "angle": 0,
1669
+ "content": "Andreas Stolcke, Klaus Ries, Noah Coccaro, Elizabeth Shriberg, Rebecca Bates, Daniel Jurafsky, Paul Taylor, Rachel Martin, Carol Van Ess-Dykema, and Marie Meteor. 2000. Dialogue act modeling for automatic tagging and recognition of conversational speech. Computational Linguistics, 26(3):339-374."
1670
+ },
1671
+ {
1672
+ "type": "ref_text",
1673
+ "bbox": [
1674
+ 0.512,
1675
+ 0.688,
1676
+ 0.883,
1677
+ 0.78
1678
+ ],
1679
+ "angle": 0,
1680
+ "content": "Jiaan Wang, Yunlong Liang, Fandong Meng, Zengkui Sun, Haoxiang Shi, Zhixu Li, Jinan Xu, Jianfeng Qu, and Jie Zhou. 2023. Is ChatGPT a good NLG evaluator? a preliminary study. In Proceedings of the 4th New Frontiers in Summarization Workshop, pages 1-11, Singapore. Association for Computational Linguistics."
1681
+ },
1682
+ {
1683
+ "type": "ref_text",
1684
+ "bbox": [
1685
+ 0.512,
1686
+ 0.791,
1687
+ 0.883,
1688
+ 0.857
1689
+ ],
1690
+ "angle": 0,
1691
+ "content": "Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik R Narasimhan, and Yuan Cao. 2023. React: Synergizing reasoning and acting in language models. In The Eleventh International Conference on Learning Representations."
1692
+ },
1693
+ {
1694
+ "type": "ref_text",
1695
+ "bbox": [
1696
+ 0.512,
1697
+ 0.868,
1698
+ 0.883,
1699
+ 0.92
1700
+ ],
1701
+ "angle": 0,
1702
+ "content": "Seeun Yoon, Zhankui He, Jessica Maria Echterhoff, and Julian McAuley. 2024. Evaluating large language models as generative user simulators for conversational recommendation. Preprint, arXiv:2403.09738."
1703
+ },
1704
+ {
1705
+ "type": "list",
1706
+ "bbox": [
1707
+ 0.512,
1708
+ 0.086,
1709
+ 0.883,
1710
+ 0.92
1711
+ ],
1712
+ "angle": 0,
1713
+ "content": null
1714
+ },
1715
+ {
1716
+ "type": "page_number",
1717
+ "bbox": [
1718
+ 0.481,
1719
+ 0.929,
1720
+ 0.521,
1721
+ 0.941
1722
+ ],
1723
+ "angle": 0,
1724
+ "content": "8002"
1725
+ }
1726
+ ],
1727
+ [
1728
+ {
1729
+ "type": "ref_text",
1730
+ "bbox": [
1731
+ 0.117,
1732
+ 0.086,
1733
+ 0.49,
1734
+ 0.138
1735
+ ],
1736
+ "angle": 0,
1737
+ "content": "Yuheng Zha, Yichi Yang, Ruichen Li, and Zhiting Hu. 2023. Alignscore: Evaluating factual consistency with a unified alignment function. Preprint, arXiv:2305.16739."
1738
+ },
1739
+ {
1740
+ "type": "ref_text",
1741
+ "bbox": [
1742
+ 0.117,
1743
+ 0.149,
1744
+ 0.49,
1745
+ 0.227
1746
+ ],
1747
+ "angle": 0,
1748
+ "content": "Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric P. Xing, Haotong Zhang, Joseph Gonzalez, and Ion Stoica. 2023. Judging llm-as-a-judge with mt-bench and chatbot arena. ArXiv, abs/2306.05685."
1749
+ },
1750
+ {
1751
+ "type": "list",
1752
+ "bbox": [
1753
+ 0.117,
1754
+ 0.086,
1755
+ 0.49,
1756
+ 0.227
1757
+ ],
1758
+ "angle": 0,
1759
+ "content": null
1760
+ },
1761
+ {
1762
+ "type": "title",
1763
+ "bbox": [
1764
+ 0.117,
1765
+ 0.253,
1766
+ 0.228,
1767
+ 0.269
1768
+ ],
1769
+ "angle": 0,
1770
+ "content": "A Prompts"
1771
+ },
1772
+ {
1773
+ "type": "text",
1774
+ "bbox": [
1775
+ 0.117,
1776
+ 0.278,
1777
+ 0.49,
1778
+ 0.421
1779
+ ],
1780
+ "angle": 0,
1781
+ "content": "Table 8 provides the prompts used for dialog act classification using Claude Haiku v3. We also include the system and user prompts used to generate predictions for evaluating function calling (Section 5.1) and response quality (Section 5.3.2) in Table 9 and Table 10, respectively. Table 11 shows the prompt we used to evaluate parameter hallucinations using gpt-4o-mini (with temperature 0) in Section 5.4."
1782
+ },
1783
+ {
1784
+ "type": "page_number",
1785
+ "bbox": [
1786
+ 0.482,
1787
+ 0.929,
1788
+ 0.52,
1789
+ 0.941
1790
+ ],
1791
+ "angle": 0,
1792
+ "content": "8003"
1793
+ }
1794
+ ],
1795
+ [
1796
+ {
1797
+ "type": "title",
1798
+ "bbox": [
1799
+ 0.145,
1800
+ 0.127,
1801
+ 0.628,
1802
+ 0.143
1803
+ ],
1804
+ "angle": 0,
1805
+ "content": "System Prompt and Instructions for Dialog Act Classification"
1806
+ },
1807
+ {
1808
+ "type": "title",
1809
+ "bbox": [
1810
+ 0.146,
1811
+ 0.153,
1812
+ 0.253,
1813
+ 0.164
1814
+ ],
1815
+ "angle": 0,
1816
+ "content": "SYSTEM PROMPT:"
1817
+ },
1818
+ {
1819
+ "type": "text",
1820
+ "bbox": [
1821
+ 0.147,
1822
+ 0.177,
1823
+ 0.171,
1824
+ 0.183
1825
+ ],
1826
+ "angle": 0,
1827
+ "content": "1 1"
1828
+ },
1829
+ {
1830
+ "type": "text",
1831
+ "bbox": [
1832
+ 0.147,
1833
+ 0.189,
1834
+ 0.538,
1835
+ 0.2
1836
+ ],
1837
+ "angle": 0,
1838
+ "content": "output the labels only. Do not output anything else."
1839
+ },
1840
+ {
1841
+ "type": "text",
1842
+ "bbox": [
1843
+ 0.147,
1844
+ 0.201,
1845
+ 0.651,
1846
+ 0.213
1847
+ ],
1848
+ "angle": 0,
1849
+ "content": "If more than one label is predicted, separate them using comma (,)"
1850
+ },
1851
+ {
1852
+ "type": "text",
1853
+ "bbox": [
1854
+ 0.147,
1855
+ 0.212,
1856
+ 0.171,
1857
+ 0.218
1858
+ ],
1859
+ "angle": 0,
1860
+ "content": "1"
1861
+ },
1862
+ {
1863
+ "type": "title",
1864
+ "bbox": [
1865
+ 0.147,
1866
+ 0.236,
1867
+ 0.237,
1868
+ 0.246
1869
+ ],
1870
+ "angle": 0,
1871
+ "content": "USER PROMPT:"
1872
+ },
1873
+ {
1874
+ "type": "text",
1875
+ "bbox": [
1876
+ 0.148,
1877
+ 0.26,
1878
+ 0.171,
1879
+ 0.266
1880
+ ],
1881
+ "angle": 0,
1882
+ "content": "1"
1883
+ },
1884
+ {
1885
+ "type": "text",
1886
+ "bbox": [
1887
+ 0.147,
1888
+ 0.271,
1889
+ 0.78,
1890
+ 0.283
1891
+ ],
1892
+ "angle": 0,
1893
+ "content": "Select one or more of the following labels as the dialog act for the following text."
1894
+ },
1895
+ {
1896
+ "type": "text",
1897
+ "bbox": [
1898
+ 0.147,
1899
+ 0.284,
1900
+ 0.833,
1901
+ 0.295
1902
+ ],
1903
+ "angle": 0,
1904
+ "content": "If the turns include only function or API calls, use the agent_function_calling label only."
1905
+ },
1906
+ {
1907
+ "type": "text",
1908
+ "bbox": [
1909
+ 0.147,
1910
+ 0.296,
1911
+ 0.838,
1912
+ 0.33
1913
+ ],
1914
+ "angle": 0,
1915
+ "content": "Only use the other labels if the turns include text that is not function-calling. function-calls may co-occur with addition text informing user or seeking information from the user or rejecting the user request."
1916
+ },
1917
+ {
1918
+ "type": "text",
1919
+ "bbox": [
1920
+ 0.147,
1921
+ 0.332,
1922
+ 0.818,
1923
+ 0.342
1924
+ ],
1925
+ "angle": 0,
1926
+ "content": "labels are: agent-seeking_information, agent_other, agent_reject_request, agent_inform_user,"
1927
+ },
1928
+ {
1929
+ "type": "text",
1930
+ "bbox": [
1931
+ 0.148,
1932
+ 0.343,
1933
+ 0.315,
1934
+ 0.354
1935
+ ],
1936
+ "angle": 0,
1937
+ "content": "agent_function_calling"
1938
+ },
1939
+ {
1940
+ "type": "text",
1941
+ "bbox": [
1942
+ 0.148,
1943
+ 0.355,
1944
+ 0.284,
1945
+ 0.366
1946
+ ],
1947
+ "angle": 0,
1948
+ "content": "text: {prediction}"
1949
+ },
1950
+ {
1951
+ "type": "text",
1952
+ "bbox": [
1953
+ 0.148,
1954
+ 0.367,
1955
+ 0.389,
1956
+ 0.378
1957
+ ],
1958
+ "angle": 0,
1959
+ "content": "conversation history: {context}\""
1960
+ },
1961
+ {
1962
+ "type": "text",
1963
+ "bbox": [
1964
+ 0.148,
1965
+ 0.379,
1966
+ 0.171,
1967
+ 0.384
1968
+ ],
1969
+ "angle": 0,
1970
+ "content": "1 1"
1971
+ },
1972
+ {
1973
+ "type": "text",
1974
+ "bbox": [
1975
+ 0.221,
1976
+ 0.424,
1977
+ 0.773,
1978
+ 0.438
1979
+ ],
1980
+ "angle": 0,
1981
+ "content": "Table 8: The system prompt and the instructions used for dialog act classification."
1982
+ },
1983
+ {
1984
+ "type": "title",
1985
+ "bbox": [
1986
+ 0.146,
1987
+ 0.524,
1988
+ 0.432,
1989
+ 0.539
1990
+ ],
1991
+ "angle": 0,
1992
+ "content": "Function-calling Evaluation Prompt"
1993
+ },
1994
+ {
1995
+ "type": "title",
1996
+ "bbox": [
1997
+ 0.147,
1998
+ 0.549,
1999
+ 0.252,
2000
+ 0.56
2001
+ ],
2002
+ "angle": 0,
2003
+ "content": "SYSTEM PROMPT:"
2004
+ },
2005
+ {
2006
+ "type": "text",
2007
+ "bbox": [
2008
+ 0.148,
2009
+ 0.572,
2010
+ 0.171,
2011
+ 0.578
2012
+ ],
2013
+ "angle": 0,
2014
+ "content": "1"
2015
+ },
2016
+ {
2017
+ "type": "text",
2018
+ "bbox": [
2019
+ 0.147,
2020
+ 0.585,
2021
+ 0.879,
2022
+ 0.607
2023
+ ],
2024
+ "angle": 0,
2025
+ "content": "You are an expert in composing functions. You are given a conversation and a set of possible functions. Based on the conversation, you will need to make one function/tool call to achieve the purpose."
2026
+ },
2027
+ {
2028
+ "type": "text",
2029
+ "bbox": [
2030
+ 0.147,
2031
+ 0.608,
2032
+ 0.837,
2033
+ 0.632
2034
+ ],
2035
+ "angle": 0,
2036
+ "content": "If you need to call multiple function calls to achieve the purpose, output the first function call in the chain only."
2037
+ },
2038
+ {
2039
+ "type": "text",
2040
+ "bbox": [
2041
+ 0.147,
2042
+ 0.633,
2043
+ 0.836,
2044
+ 0.679
2045
+ ],
2046
+ "angle": 0,
2047
+ "content": "If none of the functions can be used, respond with an appropriate message to the user, such as clarification, confirmation, eliciting information, etc. If the given question lacks the parameters required by the function, you can ask the user for it. You should only return the function call in tools call sections."
2048
+ },
2049
+ {
2050
+ "type": "text",
2051
+ "bbox": [
2052
+ 0.147,
2053
+ 0.69,
2054
+ 0.561,
2055
+ 0.703
2056
+ ],
2057
+ "angle": 0,
2058
+ "content": "USER PROMPT (only used when prompting models directly):"
2059
+ },
2060
+ {
2061
+ "type": "text",
2062
+ "bbox": [
2063
+ 0.148,
2064
+ 0.714,
2065
+ 0.171,
2066
+ 0.72
2067
+ ],
2068
+ "angle": 0,
2069
+ "content": "1"
2070
+ },
2071
+ {
2072
+ "type": "text",
2073
+ "bbox": [
2074
+ 0.147,
2075
+ 0.727,
2076
+ 0.621,
2077
+ 0.738
2078
+ ],
2079
+ "angle": 0,
2080
+ "content": "Here is a list of functions in JSON format that you can invoke."
2081
+ },
2082
+ {
2083
+ "type": "text",
2084
+ "bbox": [
2085
+ 0.147,
2086
+ 0.739,
2087
+ 0.47,
2088
+ 0.75
2089
+ ],
2090
+ "angle": 0,
2091
+ "content": "{language_specicHint}\\n\\n{functions}\\n\\n"
2092
+ },
2093
+ {
2094
+ "type": "text",
2095
+ "bbox": [
2096
+ 0.147,
2097
+ 0.751,
2098
+ 0.684,
2099
+ 0.762
2100
+ ],
2101
+ "angle": 0,
2102
+ "content": "If you decide to invoke any of the function(s), put it in the format of"
2103
+ },
2104
+ {
2105
+ "type": "text",
2106
+ "bbox": [
2107
+ 0.147,
2108
+ 0.763,
2109
+ 0.845,
2110
+ 0.774
2111
+ ],
2112
+ "angle": 0,
2113
+ "content": "[func_name1.params_name1=params_value1, params_name2=params_value2...), func_name2.params)]\\n"
2114
+ },
2115
+ {
2116
+ "type": "text",
2117
+ "bbox": [
2118
+ 0.147,
2119
+ 0.775,
2120
+ 0.606,
2121
+ 0.786
2122
+ ],
2123
+ "angle": 0,
2124
+ "content": "You SHOULD NOT include any other information in the response."
2125
+ },
2126
+ {
2127
+ "type": "text",
2128
+ "bbox": [
2129
+ 0.147,
2130
+ 0.787,
2131
+ 0.251,
2132
+ 0.798
2133
+ ],
2134
+ "angle": 0,
2135
+ "content": "{conversation}"
2136
+ },
2137
+ {
2138
+ "type": "text",
2139
+ "bbox": [
2140
+ 0.147,
2141
+ 0.798,
2142
+ 0.171,
2143
+ 0.803
2144
+ ],
2145
+ "angle": 0,
2146
+ "content": "1"
2147
+ },
2148
+ {
2149
+ "type": "text",
2150
+ "bbox": [
2151
+ 0.113,
2152
+ 0.843,
2153
+ 0.882,
2154
+ 0.885
2155
+ ],
2156
+ "angle": 0,
2157
+ "content": "Table 9: The system and user prompts used to generate predictions for the function-calling benchmark. The user prompt is only included for the case of direct prompting (i.e. when the tool use API is not used). These runs are indicated by dropping the \"FC\" suffix in the results tables."
2158
+ },
2159
+ {
2160
+ "type": "page_number",
2161
+ "bbox": [
2162
+ 0.481,
2163
+ 0.929,
2164
+ 0.52,
2165
+ 0.941
2166
+ ],
2167
+ "angle": 0,
2168
+ "content": "8004"
2169
+ }
2170
+ ],
2171
+ [
2172
+ {
2173
+ "type": "title",
2174
+ "bbox": [
2175
+ 0.145,
2176
+ 0.319,
2177
+ 0.441,
2178
+ 0.335
2179
+ ],
2180
+ "angle": 0,
2181
+ "content": "Response Quality Evaluation Prompt"
2182
+ },
2183
+ {
2184
+ "type": "text",
2185
+ "bbox": [
2186
+ 0.147,
2187
+ 0.344,
2188
+ 0.253,
2189
+ 0.356
2190
+ ],
2191
+ "angle": 0,
2192
+ "content": "SYSTEMPROMPT:"
2193
+ },
2194
+ {
2195
+ "type": "text",
2196
+ "bbox": [
2197
+ 0.147,
2198
+ 0.368,
2199
+ 0.171,
2200
+ 0.375
2201
+ ],
2202
+ "angle": 0,
2203
+ "content": "1"
2204
+ },
2205
+ {
2206
+ "type": "text",
2207
+ "bbox": [
2208
+ 0.147,
2209
+ 0.381,
2210
+ 0.836,
2211
+ 0.404
2212
+ ],
2213
+ "angle": 0,
2214
+ "content": "You are an agent tasked with assisting a user to solve a problem. You have access to a set of functions that you can use."
2215
+ },
2216
+ {
2217
+ "type": "text",
2218
+ "bbox": [
2219
+ 0.147,
2220
+ 0.405,
2221
+ 0.862,
2222
+ 0.451
2223
+ ],
2224
+ "angle": 0,
2225
+ "content": "You are given a conversation and a set of possible functions. Based on the conversation, you will need to either make one function/tool call or to respond to the user to achieve the purpose. If you need to make multiple function calls to achieve the purpose, output the first function call in the chain only."
2226
+ },
2227
+ {
2228
+ "type": "text",
2229
+ "bbox": [
2230
+ 0.147,
2231
+ 0.452,
2232
+ 0.836,
2233
+ 0.474
2234
+ ],
2235
+ "angle": 0,
2236
+ "content": "If none of the functions can be used, respond with an appropriate message to the user, such as clarification, confirmation,"
2237
+ },
2238
+ {
2239
+ "type": "text",
2240
+ "bbox": [
2241
+ 0.147,
2242
+ 0.476,
2243
+ 0.838,
2244
+ 0.499
2245
+ ],
2246
+ "angle": 0,
2247
+ "content": "eliciting information, etc. If the given question lacks the parameters required by the function, you can ask the user for it."
2248
+ },
2249
+ {
2250
+ "type": "text",
2251
+ "bbox": [
2252
+ 0.147,
2253
+ 0.51,
2254
+ 0.561,
2255
+ 0.523
2256
+ ],
2257
+ "angle": 0,
2258
+ "content": "USER PROMPT (only used when prompting models directly):"
2259
+ },
2260
+ {
2261
+ "type": "text",
2262
+ "bbox": [
2263
+ 0.148,
2264
+ 0.534,
2265
+ 0.171,
2266
+ 0.541
2267
+ ],
2268
+ "angle": 0,
2269
+ "content": "1"
2270
+ },
2271
+ {
2272
+ "type": "text",
2273
+ "bbox": [
2274
+ 0.146,
2275
+ 0.546,
2276
+ 0.845,
2277
+ 0.611
2278
+ ],
2279
+ "angle": 0,
2280
+ "content": "Here is a list of functions in JSON format that you can invoke. \n{languagespecific_hint}\\n\\n{functions}\\n\\nIf you decide to invoke any of the function(s), put it in the format of \n[func_name1.params_name1=params_value1, params_name2=params_value2...), func_name2.params)]\\n{conversation}"
2281
+ },
2282
+ {
2283
+ "type": "text",
2284
+ "bbox": [
2285
+ 0.113,
2286
+ 0.651,
2287
+ 0.885,
2288
+ 0.694
2289
+ ],
2290
+ "angle": 0,
2291
+ "content": "Table 10: The system and user prompts used to generate predictions for the response quality benchmark. The user prompt is only included for the case of direct prompting (i.e. when the tool use API is not used). These runs are indicated by dropping the \"FC\" suffix in the results tables."
2292
+ },
2293
+ {
2294
+ "type": "page_number",
2295
+ "bbox": [
2296
+ 0.481,
2297
+ 0.929,
2298
+ 0.52,
2299
+ 0.941
2300
+ ],
2301
+ "angle": 0,
2302
+ "content": "8005"
2303
+ }
2304
+ ],
2305
+ [
2306
+ {
2307
+ "type": "title",
2308
+ "bbox": [
2309
+ 0.145,
2310
+ 0.215,
2311
+ 0.516,
2312
+ 0.231
2313
+ ],
2314
+ "angle": 0,
2315
+ "content": "Prompt for Parameter Hallucination Detection"
2316
+ },
2317
+ {
2318
+ "type": "text",
2319
+ "bbox": [
2320
+ 0.144,
2321
+ 0.239,
2322
+ 0.173,
2323
+ 0.247
2324
+ ],
2325
+ "angle": 0,
2326
+ "content": "1"
2327
+ },
2328
+ {
2329
+ "type": "text",
2330
+ "bbox": [
2331
+ 0.144,
2332
+ 0.253,
2333
+ 0.239,
2334
+ 0.264
2335
+ ],
2336
+ "angle": 0,
2337
+ "content": "<guidelines>"
2338
+ },
2339
+ {
2340
+ "type": "text",
2341
+ "bbox": [
2342
+ 0.143,
2343
+ 0.265,
2344
+ 0.692,
2345
+ 0.311
2346
+ ],
2347
+ "angle": 0,
2348
+ "content": "- The system is about to execute an action or a series of actions shown below inside `<actions></actions> tags. Each predicted action is called with the action name, parameter name and parameter values, as shown in the action schemas inside `<schemas></schemas> tags."
2349
+ },
2350
+ {
2351
+ "type": "text",
2352
+ "bbox": [
2353
+ 0.143,
2354
+ 0.313,
2355
+ 0.695,
2356
+ 0.335
2357
+ ],
2358
+ "angle": 0,
2359
+ "content": "- You have to evaluate each parameter value in the predicted action calls and determine whether it was hallucinated."
2360
+ },
2361
+ {
2362
+ "type": "text",
2363
+ "bbox": [
2364
+ 0.143,
2365
+ 0.336,
2366
+ 0.7,
2367
+ 0.406
2368
+ ],
2369
+ "angle": 0,
2370
+ "content": "- Each parameter value must be EXPLICITLY mentioned in the conversation history. If not, the value is hallucinated. For example if an airport code is not explicitly mentioned in the context and the system uses it, it is considered hallucination. Note that certain actions might require the system to generate text (such as an email or an article). In these cases, evaluate the content of the generated text for hallucination."
2371
+ },
2372
+ {
2373
+ "type": "text",
2374
+ "bbox": [
2375
+ 0.143,
2376
+ 0.407,
2377
+ 0.72,
2378
+ 0.43
2379
+ ],
2380
+ "angle": 0,
2381
+ "content": "- First think before detecting hallucinated parameters inside <thinking></thinking> tags and add the rationale in the \"rationale\" field."
2382
+ },
2383
+ {
2384
+ "type": "text",
2385
+ "bbox": [
2386
+ 0.143,
2387
+ 0.431,
2388
+ 0.701,
2389
+ 0.49
2390
+ ],
2391
+ "angle": 0,
2392
+ "content": "- The output should have the following JSON format:: {\"rationale\": \"\", \"hallucinated_parameters\": [[], [], ...]}. The \"hallucinated_parameters\" field should contain a list that has one list of hallucinated parameter names for each predicted action in the order as they appear."
2393
+ },
2394
+ {
2395
+ "type": "list",
2396
+ "bbox": [
2397
+ 0.143,
2398
+ 0.265,
2399
+ 0.72,
2400
+ 0.49
2401
+ ],
2402
+ "angle": 0,
2403
+ "content": null
2404
+ },
2405
+ {
2406
+ "type": "text",
2407
+ "bbox": [
2408
+ 0.144,
2409
+ 0.491,
2410
+ 0.246,
2411
+ 0.501
2412
+ ],
2413
+ "angle": 0,
2414
+ "content": "</guidelines>"
2415
+ },
2416
+ {
2417
+ "type": "text",
2418
+ "bbox": [
2419
+ 0.144,
2420
+ 0.512,
2421
+ 0.486,
2422
+ 0.525
2423
+ ],
2424
+ "angle": 0,
2425
+ "content": "This is the action call you have to evaluate:"
2426
+ },
2427
+ {
2428
+ "type": "text",
2429
+ "bbox": [
2430
+ 0.144,
2431
+ 0.537,
2432
+ 0.357,
2433
+ 0.585
2434
+ ],
2435
+ "angle": 0,
2436
+ "content": "Conversation History: <conversation_history> {conversation_history_block} </conversation_history>"
2437
+ },
2438
+ {
2439
+ "type": "text",
2440
+ "bbox": [
2441
+ 0.144,
2442
+ 0.596,
2443
+ 0.288,
2444
+ 0.643
2445
+ ],
2446
+ "angle": 0,
2447
+ "content": "Predicted Actions: <actions> {predicted_actions} </actions>"
2448
+ },
2449
+ {
2450
+ "type": "text",
2451
+ "bbox": [
2452
+ 0.144,
2453
+ 0.655,
2454
+ 0.268,
2455
+ 0.702
2456
+ ],
2457
+ "angle": 0,
2458
+ "content": "Action Schemas: <schemas> {action_schemas} </schemas>"
2459
+ },
2460
+ {
2461
+ "type": "text",
2462
+ "bbox": [
2463
+ 0.144,
2464
+ 0.714,
2465
+ 0.685,
2466
+ 0.744
2467
+ ],
2468
+ "angle": 0,
2469
+ "content": "Evaluate the parameters of the predicted actions in <actions></actions> tags. Return a JSON as described in the <guidelines>."
2470
+ },
2471
+ {
2472
+ "type": "table_caption",
2473
+ "bbox": [
2474
+ 0.244,
2475
+ 0.784,
2476
+ 0.754,
2477
+ 0.799
2478
+ ],
2479
+ "angle": 0,
2480
+ "content": "Table 11: Prompt for detecting parameter hallucination in predicted actions"
2481
+ },
2482
+ {
2483
+ "type": "page_number",
2484
+ "bbox": [
2485
+ 0.481,
2486
+ 0.929,
2487
+ 0.521,
2488
+ 0.941
2489
+ ],
2490
+ "angle": 0,
2491
+ "content": "8006"
2492
+ }
2493
+ ]
2494
+ ]
2025/CONFETTI_ Conversational Function-Calling Evaluation Through Turn-Level Interactions/30ac32e0-3901-4494-8422-c9487e1d3e1e_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a3f2e22ea45c7f0794f981817c8789314369d3f7df3860df23f4e63d3971f9c5
3
+ size 467509
2025/CONFETTI_ Conversational Function-Calling Evaluation Through Turn-Level Interactions/full.md ADDED
@@ -0,0 +1,356 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CONFETTI: Conversational Function-Calling Evaluation Through Turn-Level Interactions
2
+
3
+ Tamer Alkhouli, Katerina Margatina, James Gung, Raphael Shu, Claudia Zaghi, Monica Sunkara, Yi Zhang {alkhouli, katemarg, gungj, zhongzhu, sunkaral, yizhngn} $@$ amazon.com AWS AI Labs
4
+
5
+ # Abstract
6
+
7
+ We introduce Conversational Function-Calling Evaluation Through Turn-Level Interactions (CONFETTI), a conversational benchmark designed to evaluate the function-calling capabilities and response quality of large language models (LLMs). Current benchmarks lack comprehensive assessment of LLMs in complex conversational scenarios. CONFETTI addresses this gap through 109 human-simulated conversations, comprising 313 user turns and covering 86 APIs. These conversations explicitly target various conversational complexities, such as follow-ups, goal correction and switching, ambiguous and implicit goals. We perform off-policy turn-level evaluation using this benchmark targeting function-calling. Our benchmark also incorporates dialog act annotations to assess agent responses. We evaluate a series of state-of-the-art LLMs and analyze their performance with respect to the number of available APIs, conversation lengths, and chained function calling. Our results reveal that while some models are able to handle long conversations, and leverage more than $20+$ APIs successfully, other models struggle with longer context or when increasing the number of APIs. We also report that the performance on chained function-calls is severely limited across the models. Overall, the top performing models on CONFETTI are Nova Pro $(40.01\%)$ , Claude Sonnet v3.5 $(35.46\%)$ and Llama 3.1 405B $(33.19\%)$ followed by command-r-plus $(31.18\%)$ and Mistral-Large-2407 $(30.07\%)$ .
8
+
9
+ # 1 Introduction
10
+
11
+ Function-calling has emerged recently as one of the notable capabilities of large language models (LLMs) (Schick et al., 2023; Yao et al., 2023; Qin
12
+
13
+ et al., 2024; Patil et al., 2024). To generate a function call, LLMs are provided with a list of available functions, including function descriptions, schema, parameter names and types. When provided with natural language input, LLMs can generate appropriate function calls to fulfill user requests. Our work specifically examines interactive conversational scenarios where the user and the system engage in dynamic dialogue. These conversations evolve through multiple turns, including follow-up questions, requests for clarification, and confirmation checks, creating what we define as a conversation trajectory.
14
+
15
+ There can be multiple conversation trajectories that achieve the same user goals. This variation adds complexity to evaluating models in conversational multi-turn sessions. There are several ways to perform automatic evaluation in conversational settings. First, the evaluation setup can use a user simulator to automate interaction with the model dynamically, where user utterances are simulated online (Asri et al., 2016; Lu et al., 2024; Sekulic et al., 2024; Yoon et al., 2024). This adds flexibility to the evaluation to accommodate potential variations in the conversation trajectories. However, the evaluation will be subject to potential errors stemming from the user simulator itself, which can obscure the actual performance of the model. Alternatively, user utterances can be determined prior to the conversation session to achieve one or more user goals (Mao et al., 2024). This, however, assumes the trajectory will follow a certain path, with deviations ending up being penalized. A third approach is to evaluate conversations on the turn-level. This is done in offline mode where the history is set to the ground-truth trajectory up to the current turn in the conversation. Although it is done offline, it isolates the behavior of the model at each turn, and allows for a direct comparison between predictions and ground-truth labels. In this work, we follow the third approach.
16
+
17
+ ![](images/b32b905fc890fc89fbfe54024b8f1aacf3eef6965bc112dad7d989758e280493.jpg)
18
+ Figure 1: CONFETTI comprises multi-turn conversations between a user and an agent. The agent has access to a set of APIs (tools) to assist the user with their request. The agent can invoke actions and receive observations from the environment. Each agent turn is annotated with a dialog act tag used to evaluate response quality. The figure illustrates the flow of a conversation, including user inputs, agent responses, API calls, and dialog act annotations.
19
+
20
+ Our contributions are as follows:
21
+
22
+ - We introduce a conversational function-calling benchmark targeting conversation phenomena such as follow-ups, goal correction and switching, ambiguous and implicit goals, over- and underfilling of parameters, etc. Figure 1 illustrates an example.
23
+ - We propose response quality evaluation to evaluate both function-calling and non-function calling responses via dialog act classification, categorizing responses as seeking information, providing information, rejecting requests or calling functions.
24
+ - We compare state-of-the-art LLMs, from various model providers, showcasing their potentials and gaps on conversational function-calling.
25
+
26
+ # 2 Related Work
27
+
28
+ ToolSandbox (Lu et al., 2024) offers an end-to-end evaluation approach, where the authors employ a dynamic user simulator with intermediate milestones to evaluate trajectories. The dataset lacks in domain diversity and complexity, focusing on productivity tools. API-Bank (Li et al., 2023) covers multi-turn dialog and performs API executions. Tooltalk (Farn and Shin, 2023) performs turn-level evaluations, and ToolEmu (Ruan et al., 2024) mocks API responses, similar to our approach. AgentsBench (Liu et al., 2023a) offers open-ended dialog evaluation of LLMs as Agents for Code, Gaming, and Web environments. PlatoLM (Kong et al., 2024) proposes to train a user simulator and synthesize conversations as training data.
29
+
30
+ BFCL v3 (Mao et al., 2024) targets evaluating function-calling capabilities in single- and multi-turn settings. Its multi-turn dataset is closely re
31
+
32
+ lated to our work. There are however several differences. While the BFCL multi-turn data is model-generated and validated by a human, our data is completely generated by human annotators. This avoids potential bias towards certain model families. Second, our collection targeted multiple conversational complexities such as confirmations, follow-ups, and elicitation as part of the natural flow of the conversations. BFCL offers a subset where parameters are missing to induce elicitation. Third, we include 3-25 functions to predict from at each turn, aiming to reveal model capabilities under varying number of functions provided.
33
+
34
+ There have been numerous studies on dialog act modeling (Stolcke et al., 2000) and classification (Ahmadvand et al., 2019; Kim and Kim, 2018; Liu et al., 2017; Chakravarty et al., 2019; Duran et al., 2023). In this work, we use an LLM-based approach to classify agent dialog acts into 5 labels.
35
+
36
+ LLM as a judge (Wang et al., 2023; Pan et al., 2024; Liu et al., 2023b; Zheng et al., 2023) has been explored recently. In this work, we leverage LLMs as a means to detect parameter hallucinations.
37
+
38
+ # 3 CONFETTI
39
+
40
+ # 3.1 Data Collection
41
+
42
+ Complexities Following Gung et al. (2023), to ensure that the conversations in our benchmark cover a broad range of interaction patterns, we define a set of complexities that may be observed in real world interaction with conversational function calling systems. These complexities, defined in Table 1, are used as an input to the conversation authoring process with a target distribution enforced by requiring at least one complexity for each conversation. For example, if EXCEPTIONINEXECUTION is assigned as a required complexity in a conversation, at least one function call must have an error response for it to be considered valid. Annotators are also asked to label the complexities that appear in their conversations for tracking purposes.
43
+
44
+ APIs We curated a broad range of APIs across application areas such as issue tracking, travel booking, human resources, and meetings management. Each API contains a set of function definitions with schemas defining valid inputs and outputs for each function. APIs do not have explicit implementations in our benchmark, but instead have fixed outputs defined in each conversation.
45
+
46
+ Scenario Generation Each conversation is seeded with a set of required and optional APIs, a required complexity, a reference time the conversation is to take place, and a minimum number of turns. Based on these inputs, a scenario is defined that describes one or more user goals for the conversation in natural language. Authoring valid scenarios requires defining a realistic request that can be resolved given the available APIs and integrating the assigned complexity. Due to the difficulty of this task, we separated the authoring of scenarios from conversations, only allowing conversations to be instantiated for scenarios after they were reviewed by trusted annotators.
47
+
48
+ Conversation Generation Conversation authors play the role of both the user and the agent, enacting the pre-defined scenario by entering user turns, agent turns, and function calls that meet the required complexities and align with the scenario description. Authors use dynamically-generated forms in the annotation UI to create valid function calls, which are validated upon submission to ensure the authored values are valid for the function input schema at hand. Upon submission of a function call and selection of a desired response type (i.e. success code vs. error codes), the return value is simulated using an internal model based on the function description, input/output schema, and input values.
49
+
50
+ Dialog Acts Following conversation generation, we asked annotators to label agent turns using one or more of the following dialog acts:
51
+
52
+ - Agent seeking information (seek_info): targets responses that elicit information from the user, whether it is intent elicitation, parameter elicitation, or asking for clarification or confirmation.
53
+ - Agent informing user (inform): targets responses that provide information to the user, whether the information is general or specific to the function-calling results.
54
+ - Agent rejecting request (reject): targets responses that reject the user request.
55
+ - Other: any response that does not belong to the previous dialog acts.
56
+
57
+ Note that the agent response can including multiple dialog acts. We ensure that the annotators try
58
+
59
+ <table><tr><td>COMPLEXITY</td><td># DIALOGS</td><td>DESCRIPTION</td></tr><tr><td>EXCEPTIONINEXECUTION</td><td>5</td><td>Errors or exceptions that occur during the execution of an action</td></tr><tr><td>FAILEDCONVERSATION</td><td>5</td><td>Interactions where the intended goal is not achieved</td></tr><tr><td>CONFIRMATION</td><td>6</td><td>Requesting user approval before executing an action</td></tr><tr><td>GOALSWITCHING</td><td>6</td><td>When the user changes their objective during the conversation</td></tr><tr><td>NOTARGETCOMPLEXITY</td><td>6</td><td>Conversations without specific complexity requirements</td></tr><tr><td>GOALCORRECTION</td><td>7</td><td>Adjusting or refining the user&#x27;s goal based on feedback</td></tr><tr><td>GOALSTACKING</td><td>7</td><td>Managing multiple user objectives simultaneously</td></tr><tr><td>AMBIGUOUSGOAL</td><td>9</td><td>When the user&#x27;s intention is unclear and requires clarification</td></tr><tr><td>FOLLOWUPQUESTION</td><td>10</td><td>Additional queries or requests for information after the initial response</td></tr><tr><td>IMPLICITDESCRIPTIVEGOAL</td><td>10</td><td>The user describes a problem/background without directly stating their goal</td></tr><tr><td>OVERFILL</td><td>11</td><td>Providing more information than required for an action</td></tr><tr><td>UNDERFILL</td><td>11</td><td>Missing required arguments or information for an action</td></tr><tr><td>GOALNOTSUPPORTED</td><td>15</td><td>The user&#x27;s request is not supported by the available tools or is out of scope</td></tr></table>
60
+
61
+ to assign a single label before opting for multiple labels.
62
+
63
+ # 3.2 Benchmark Design
64
+
65
+ After the data collection, we convert the conversations into input/output pairs. We split the data into two benchmarks: function-calling benchmark, and response quality benchmark. The function-calling conversational benchmark is defined at the turn-level, where we truncate the conversations at each function-calling turn, and provide the preceding user turns, agent turns, function calls and function results as context. The output is set to be one or more function calls. We extract all function-calling turns from each conversation to construct the dataset. We also include the API schemas of the APIs the agent can choose from. The dataset has a total of 506 examples. Table 2 shows the data statistics.
66
+
67
+ Similarly, we define the response quality benchmark at the turn-level. However, instead of truncating conversations at function-calling turns, we extract all agent turns as output turns. The input is set to the preceding user turns, agent turns, and function calls and results, as in the conversational function-calling benchmark, and the API schema of available APIs to call is provided as well. However, the output turns can be function-calling turns or textual agent responses. We limit the number of function-calling turns to 200 to maintain label balance in this dataset. The statistics are given in Table 3.
68
+
69
+ # 4 Evaluation Metrics
70
+
71
+ We leverage abstract syntax trees (AST) to evaluate function-calling turns similar to BFCL v2. For response quality, we resort to dialog acts.
72
+
73
+ Table 1: The distribution and description of the complexities covered in the CONFETTI benchmark.
74
+
75
+ <table><tr><td>DIMENSION</td><td>COUNT</td></tr><tr><td># conversations</td><td>109</td></tr><tr><td># APIs</td><td>86</td></tr><tr><td># user turns</td><td>313</td></tr><tr><td># agent turns w/ 1 action</td><td>220</td></tr><tr><td># agent turns w/ 2 actions</td><td>46</td></tr><tr><td># agent turns w/ 3+ actions</td><td>47</td></tr><tr><td>Avg turns per conversation</td><td>8.8</td></tr><tr><td># total turns</td><td>506</td></tr></table>
76
+
77
+ Table 2: Function-calling benchmark statistics.
78
+
79
+ <table><tr><td>DIMENSION</td><td>COUNT</td></tr><tr><td># turns calling functions</td><td>200</td></tr><tr><td># turns informing user</td><td>331</td></tr><tr><td># turns seeking information</td><td>110</td></tr><tr><td># turns rejecting requests</td><td>32</td></tr><tr><td># other/misc. turns</td><td>25</td></tr><tr><td># total turns</td><td>663</td></tr></table>
80
+
81
+ Table 3: Response quality benchmark statistics: note a turn can have one or more dialog act labels.
82
+
83
+ # 4.1 Function-Calling Evaluation Metrics
84
+
85
+ AST Soft AST evaluation parses the function name, parameter names and values as a tree, and matches each of the tree nodes to the ground-truth reference function call in a binary fashion. Since the dataset includes many APIs that accept string-type input, we use soft scoring to calculating parameter value matching for string types. We use AlignScore (Zha et al., 2023) to calculate the matching accuracy for string parameter values. All nonstring parameter values are evaluated in a binary fashion.
86
+
87
+ Parameter Hallucination We also perform an analysis on how often the models hallucinate parameters at the action calls. We use an off-the-shelf LLM to do hallucination detection. The prompt includes the conversation history, the predicted action call (or chain of action calls) and their schemas,
88
+
89
+ and instruct the LLM judge to return a list of hallucinated parameters (if any) for each action call, along with a rationale. We use gpt-4o-mini as an LLM judge to avoid bias in the evaluation. The exact prompt is shown in the Appendix A.
90
+
91
+ Given a sequence of gold actions $\mathcal{A}_{\mathrm{g}}$ and predicted actions $\tilde{\mathcal{A}}$ corresponding to the input context sequence $\mathcal{C}$ , and denoting $\tilde{\alpha}_t$ as the predicted action for the $t$ -th example, we calculate the parameter validity rate on the parameter level using the following formula.
92
+
93
+ $$
94
+ \sum_ {(\tilde {a} _ {t}, a _ {t}, c _ {t}) \in (\tilde {\mathcal {A}}, \mathcal {A} _ {g}, \mathcal {C})} \sum_ {\theta \in \tilde {a} _ {t}} \frac {\mathbb {1} (\tilde {a} _ {t} \text {i s v a l i d}) \times f (\theta ; c _ {t} , a _ {t})}{| \{\hat {\theta} | \hat {\theta} \in \tilde {a} _ {t} , \forall \tilde {a} _ {t} \in \tilde {\mathcal {A}} \} |}
95
+ $$
96
+
97
+ Where $\mathbb{1}$ is the indicator function. We define valid actions as predicted actions whose name matches the ground-truth action. $f(\theta ;c_t,a_t)\in \{0,1\}$ is the binary outcome of the LLM classifier judging the validity of parameter $\theta$ given the context $c_{t}$ and gold action $a_{t}$ . The denominator denotes all predicted parameters of valid predicted actions.
98
+
99
+ # 4.2 Response Quality Evaluation via Dialog Acts
100
+
101
+ Calculating response quality on the textual responses directly is challenging. While there are many ways to calculate similarity between two texts, we resort to a coarse-grained response evaluation via dialog acts. To this end, we leverage dialog act annotations provided by the annotators for each agent response in the ground-truth conversations. In order to evaluate online agent responses, we use an LLM-based dialog act classifier that is prompted to generate one or more of the dialog acts for an agent response.
102
+
103
+ # 5 Experiments
104
+
105
+ We implemented the benchmark as an extension to BFCL v2. We compare Claude Sonnet v3.5, Sonnet v3, Haiku v3, Llama 3.1 70B and 405B, Llama 3 70B, Mistral large, and the Command-plus-r models. We distinguish between using the tool use option in the API vs using direct prompting. The difference is that in the tool use case, the API handles the function call parsing, while in the direct prompting case, the function schemas and parsing are handled explicitly by the user. We use
106
+
107
+ <table><tr><td>MODEL</td><td>PROVIDER</td><td>AST SOFT (%)</td></tr><tr><td>Nova Pro</td><td>Amazon</td><td>40.91</td></tr><tr><td>Nova Micro</td><td>Amazon</td><td>33.97</td></tr><tr><td>claude-3-5-sonnet</td><td>Anthropic</td><td>35.46</td></tr><tr><td>claude-3-5-haiku†</td><td>Anthropic</td><td>31.25</td></tr><tr><td>claude-3-sonnet</td><td>Anthropic</td><td>22.63</td></tr><tr><td>claude-3-haiku</td><td>Anthropic</td><td>18.30</td></tr><tr><td>llama3-1-405b-instruct</td><td>Meta</td><td>33.19</td></tr><tr><td>llama3-1-70b-instruct</td><td>Meta</td><td>31.29</td></tr><tr><td>llama3-70b-instruct</td><td>Meta</td><td>27.19</td></tr><tr><td>mistral-large-2407†</td><td>Mistral</td><td>30.07</td></tr><tr><td>command-r-plus†</td><td>Cohere</td><td>31.18</td></tr></table>
108
+
109
+ Table 4: Model AST soft scores for the conversational function-calling dataset where chained actions are teacher-forced. $\dagger$ indicates using tool-use formatting.
110
+
111
+ Bedrock's Converse API to conduct these experiments<sup>3</sup>. We use the ALIGNSCORE-BASE model to calculate soft scores between string parameter values for the AST soft accuracy metric.<sup>4</sup>. Table 9 and Table 10 in Appendix A indicate the prompts used to generate predictions for the function-calling and response quality benchmarks, respectively. All experiments are run with temperature 0.
112
+
113
+ # 5.1 Function-calling Performance
114
+
115
+ Table 4 shows function-calling results measured in terms of AST soft accuracy across the different models. We observe Nova Pro $(40.91\%)$ and Claude Sonnet v3.5 $(35.46\%)$ among the top performing models, followed by Nova Micro $(33.97\%)$ , Llama 3.1 405B models $(33.19\%)$ , Llama 3.1 70B $(31.29\%)$ , Commandr-plus $(31.18\%)$ and Mistral Large $(30.07\%)$ . Smaller models such as Nova Micro $(33.97\%)$ and Haiku v3.5 $(31.25\%)$ perform relatively well compared to the others.
116
+
117
+ # 5.2 Impact of # of APIs
118
+
119
+ We split the data according to the number of APIs included. Figure 2 shows that while some models such as Nova Pro, Nova Micro, Claude 3.5 Haiku and Mistral large are able to handle $20+$ APIs, there is a tendency towards lower performance across the rest of the models when increasing the number of APIs. There are two implications associated with
120
+
121
+ ![](images/b60e4dcc02e5f1a2604f373e2d57abc6d205e9d86562677f8bab8a4bba8a24b6.jpg)
122
+ Figure 2: AST soft accuracy for different models across various number of APIs. The dataset has 144 examples with 1-9 APIs, 154 examples of 10-19 APIs and 15 examples of $20+$ APIs.
123
+
124
+ ![](images/46e65c4eb4fb5dd8318d7dbc735657281cb4ff452c0d51c314ee29c2adb8f424.jpg)
125
+ Figure 3: AST soft accuracy for different models across various context lengths. The dataset has 174 examples with 1-5 user turns, 114 examples of 6-10 user turns and 25 examples of $11+$ user turns.
126
+
127
+ increasing the number of tools: First, since the API schemas go into the prompt, more tools imply longer prompts. Second, more APIs provide higher chances of the model making a mistake since it has more choices to select from. In general, including more tools lead to performance degradation. This applies to Claude, Llama and Command-r-plus models.
128
+
129
+ # 5.3 Context Length Analysis
130
+
131
+ Figure 3 shows results split according to the conversation length, measured by indicating the number of user turns. We observe that while some models such as Nova Pro, Nova Micro, Llama 3.1 405B and 70B are able to perform well on long conversations, smaller models such as Haiku v3 struggle to perform well on longer conversations. We also note that Llama 405B appears to perform better
132
+
133
+ on longer conversations. This can be an artifact of off-policy evaluation, where the gold-truth conversation context is leveraged by those models for indirect in-context learning, hence improving their predictions as the context length increases. Claude Sonnet v3.5 and Mistral Large perform well up to 10 user turns, but then tend to degrade for longer conversations.
134
+
135
+ # 5.3.1 Chain Length Analysis
136
+
137
+ We also investigate the performance on chained action calls, where the model is expected to perform multiple action calls before returning control to the user. For instance, when the model is asked to look up the number of remaining holiday days for an employee, it is expected to retrieve the employee id from the system prior to that call. The score of a chain $\tilde{a}_1,\tilde{a}_2,\ldots ,\tilde{a}_J$ of length $J$ actions given a conversation context $c$ is calculated as the product of AST soft accuracies for each of the individual actions: $p(\tilde{a}_1,\dots,\tilde{a}_J|c) = \prod_{j = 1}^{J}p(\tilde{a}_j|a_1,\dots,a_{j - 1},c)$ , where $p(\tilde{a}_j|a_1,\dots,a_{j - 1})$ is given by the AST soft accuracy conditioned on gold-truth previous function calls and function call results. Note that we perform teacher-forcing on the action level, where each action is predicted conditioned on the ground-truth previous actions and results.
138
+
139
+ Figure 4 shows the results across chains of lengths 1, 2, 3 and $4+$ . The results indicate that all models have much lower performance than predicting a single action. Claude Sonnet 3.5 demonstrates some ability to predict chains of length 2 with $(21.46\%)$ success, followed by Nova Pro $(17.29\%)$ , and Llama 3.1 405B $(16.39\%)$ , while the rest of the models perform worse than $15\%$ . For chains of length 3 and above, almost all models fail in most cases, except for Nova Pro which has $17.71\%$ AST accuracy.
140
+
141
+ # 5.3.2 Response Quality via Dialog Acts
142
+
143
+ To help understand where and how models fail, we compare model responses using coarse-grained dialog acts: inform user, seek information, reject request, function call, and other. We use an LLM classifier based on Claude Haiku v3 to classify the dialog acts of the model responses into one of these five categories. We report the classification performance on the ground-truth dataset in Table 5. The classifier predicts one or more dialog act labels for the model response, where the ground-truth annotations may include one or more dialog act labels. We note that the classifier has a high recall but low
144
+
145
+ precision. In our reporting, we declare a match if at least one of the predicted dialog acts matches any of the ground-truth labels. The classification prompt is given in Table 8 in Appendix A.
146
+
147
+ <table><tr><td>METRIC</td><td>SCORE (%)</td></tr><tr><td>MULTI-LABEL PRECISION</td><td>67.2</td></tr><tr><td>MULTI-LABEL RECALL</td><td>90.3</td></tr><tr><td>MULTI-LABEL F1 SCORE</td><td>77.0</td></tr><tr><td>SINGLE-LABEL ACCURACY</td><td>92.8</td></tr></table>
148
+
149
+ Table 5: Dialog act classifier performance on gold-truth conversations. The classifier detects multiple labels which are compared to the multi-label ground-truth labels. For Single-label accuracy we calculate how often at least one predicted label matches one of the ground-truth labels.
150
+
151
+ In terms of dialog act accuracy, Claude Sonnet v3.5 (FC) is the best performing with $73.13\%$ accuracy, followed closely by Nova Pro $(69.68\%)$ , Haiku 3.5 $(67.12\%)$ , Nova Micro $(66.21\%)$ and command-r-plus $(64.86\%)$ . Llama models perform worse than the rest. We further analyze the confusion matrix for the dialog acts in Figure 5. We omit the correct matches on the diagonals and focus on the mismatches. In general we see a tendency to confuse inform and seek information acts with function calls, indicating that the models are falsely triggering function calls, although to different extents depending on the model. This is showing to a large extent in the Llama 3.1 70B model. We also observe under-triggering of function calls where the models tend to inform the user or seek information rather than calling a function.
152
+
153
+ # 5.4 Parameter Hallucination Analysis
154
+
155
+ Table 7 shows hallucination results for all models. We report parameter validity rate for the ground truth as a reference. We observe that Claude v3.5 Sonnet has the highest validity rate (72.4%), followed by Nova Pro (68.8%), Haiku 3.5 (66.1%), Command-R Plus (63.7%) and Llama 3.1 405B (62.7%). Claude Sonnet v3 and Haiku v3 have much lower scores.
156
+
157
+ # 6 Conclusion
158
+
159
+ We introduced a conversational benchmark for function calling spanning multiple complexities natural to dialog. The dataset targets the evaluation of function calling and response quality. The benchmark includes over 80 API tools and tests function-calling up to $20+$ APIs under different conversation lengths. We evaluated top LLMs on
160
+
161
+ ![](images/9bc3346817fc712c053ca33efea29a0dd7f7bff5d4407d1b33db70e37d9ca390.jpg)
162
+ Figure 4: AST soft accuracy for different models across chain lengths. The dataset has 220 examples with chain length 1, 46 examples with chain length 2, 25 examples with chain length 3, and 22 examples with chain length $4+$ .
163
+
164
+ <table><tr><td>MODEL</td><td>DA ACCURACY (%) ↑</td></tr><tr><td>nova-pro†</td><td>69.68</td></tr><tr><td>nova-micro†</td><td>66.21</td></tr><tr><td>claude-3-5-sonnet†</td><td>73.15</td></tr><tr><td>claude-3-5-haiku†</td><td>67.12</td></tr><tr><td>claude-3-sonnet</td><td>61.54</td></tr><tr><td>claude-3-haiku</td><td>63.80</td></tr><tr><td>llama3-1-70b-instruct</td><td>50.98</td></tr><tr><td>llama3-70b-instruct</td><td>56.26</td></tr><tr><td>mistral-large-2407†</td><td>61.09</td></tr><tr><td>command-r-plus†</td><td>64.86</td></tr></table>
165
+
166
+ our proposed benchmark in an off-policy turn-level fashion, where we set the context to the ground-truth conversation up to the current turn. The context is composed of user and agent turns as well as function calls and results. Overall, the models performance on this benchmark is relatively low, suggesting that LLMs need further work to improve conversational function-calling capabilities. The benchmark can be used to assess model performance across varying conversations length, number of tools and action chain lengths.
167
+
168
+ Table 6: Dialog acts accuracy for different models. $\dagger$ indicates using tool-use formatting.
169
+
170
+ <table><tr><td>MODEL</td><td>VALID
171
+ PARAMETERS (↑)</td></tr><tr><td>Ground Truth</td><td>83.1%</td></tr><tr><td>Nova Pro</td><td>68.8%</td></tr><tr><td>Nova Micro</td><td>57.9%</td></tr><tr><td>claude-3-5-sonnet</td><td>72.4%</td></tr><tr><td>claude-3-5-haiku†</td><td>66.1%</td></tr><tr><td>claude-3-sonnet</td><td>40.7%</td></tr><tr><td>claude-3-haiku</td><td>36.3%</td></tr><tr><td>llama3-1-405b-instruct</td><td>62.7%</td></tr><tr><td>llama3-1-70b-instruct</td><td>59.2%</td></tr><tr><td>llama3-70b-instruct</td><td>51.4%</td></tr><tr><td>mistral-large-2407†</td><td>51.1%</td></tr><tr><td>command-r-plus†</td><td>63.7%</td></tr></table>
172
+
173
+ Table 7: Parameter validity rate for different models. VALID PARAMETERS is the percentage of valid predicted parameters for valid action calls as calculated in Section 4.1. $\dagger$ indicates using tool-use formatting.
174
+
175
+ # 7 Limitations & Risks
176
+
177
+ Turn-level evaluation is a fine-grained evaluation approach that allows detailed analysis of how and when predictions deviate from the ground truth. However, performing turn-level evaluation is done in an off-policy fashion, where the gold truth is fixed as context. This does not correspond directly to inference behavior, where the model uses on-
178
+
179
+ # Predicted Dialog Act
180
+
181
+ ![](images/aefdbf3fac28cd91f48cd495d5126d8fbe046f102be4a19890e4c63b6ca68d67.jpg)
182
+ (a) mistral-large-2407†
183
+
184
+ ![](images/4133559a4d94d38ba8f841a2a7ec7ddbd506078b60255a4df3e63c3d886ae55e.jpg)
185
+ (b) Llama 3.1 70B
186
+ Figure 5: Confusion matrix for dialog acts for (a) mistral-large-2407 (b) llama3-1-70b-instruct, (c) claude-sonnet-3-5, and (d) command-r-plus. The rows correspond to true labels and the columns to the predicted labels. We are not showing the diagonal values which are correct matches. $\dagger$ indicates using tool-use formatting.
187
+
188
+ ![](images/e35c385e5275ae164c307b4227b410b684c283d9d8d4f48166a7fab9d0b25e2e.jpg)
189
+ (c) claudi-sonnet-3-5†
190
+
191
+ ![](images/5e88e8a2ba7b248f92251bbba9d226acf5626ba11c0d9819636ddbdc51666b5c.jpg)
192
+ (d) command-r-plus†
193
+
194
+ policy predictions for agent responses as context. For instance, using off-policy trajectories can induce a form of in-context learning that help later predictions conform to the generation style of the gold truth, or even learn action-calling dependencies from ground-truth context, causing an artificial inflation in model performance for later turns. Another deviation from inference-time behavior is regarding function call execution. In this work, we do not execute function calls. All function call results are looked up from gold truth turns.
195
+
196
+ The dialog act accuracy and parameter validity rate are both calculated leveraging LLMs to classify or judge the outcome. These LLMs demonstrate high recall for dialog act classification and relatively high parameter validity rate for the groundtruth annotations. However, these models can still make mistakes which can obscure the true model performance.
197
+
198
+ Data Statement We provide a data statement in adherence with the ACL code of conduct and recommendations laid out in (Bender and Friedman, 2018). The dataset was collected by linguists who are professional English speakers hired through a vendor and they were remunerated above industry standard rates. The conversations were simulated by human annotators, where the same annotator played both the user role and the agent roles, and created the function calls. All conversation parts were collected from scratch except for function call results, which were simulated using an internally trained model. The dataset went through quality assurance process done internally, where conversations were edited as needed to fix any observed errors.
199
+
200
+ # 8 Acknowledgments
201
+
202
+ We would like to thank Daniele Bonadiman and Sailik Sengupta for their contributions in creating the APIs, I-Hsuan Chen for support with the dialog act annotation collection, and Emily Moeng for managing data collection through vendors.
203
+
204
+ # References
205
+
206
+ Ali Ahmadvand, Jason Ingyu Choi, and Eugene Agichtein. 2019. Contextual dialogue act classification for open-domain conversational agents. In Proceedings of the 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR'19, page 1273-1276, New York, NY, USA. Association for Computing Machinery.
207
+ Layla El Asri, Jing He, and Kaheer Suleman. 2016. A sequence-to-sequence model for user simulation in spoken dialogue systems. In Interspeech.
208
+ Emily M. Bender and Batya Friedman. 2018. Data statements for natural language processing: Toward mitigating system bias and enabling better science. Transactions of the Association for Computational Linguistics, 6:587-604.
209
+ Saurabh Chakravarty, Raja Venkata Satya Phanindra Chava, and Edward A. Fox. 2019. Dialog acts classification for question-answer corpora. In ASAIL@ICAIL.
210
+ Nathan Duran, Steve Battle, and Jim Smith. 2023. Sentence encoding for dialogue act classification. *Natural Language Engineering*, 29(3):794–823.
211
+ Nicholas Farn and Richard Shin. 2023. Tooltalk: Evaluating tool-usage in a conversational setting. Preprint, arXiv:2311.10775.
212
+ James Gung, Emily Moeng, Wesley Rose, Arshit Gupta, Yi Zhang, and Saab Mansour. 2023. NatCS: Eliciting
213
+
214
+ natural customer support dialogues. In Findings of the Association for Computational Linguistics: ACL 2023, pages 9652-9677, Toronto, Canada. Association for Computational Linguistics.
215
+ Minkyoung Kim and Harksoo Kim. 2018. Dialogue act classification model based on deep neural networks for a natural language interface to databases in korean. In 2018 IEEE International Conference on Big Data and Smart Computing (BigComp), pages 537-540.
216
+ Chuyi Kong, Yaxin Fan, Xiang Wan, Feng Jiang, and Benyou Wang. 2024. PlatoLM: Teaching LLMs in multi-round dialogue via a user simulator. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 7841-7863, Bangkok, Thailand. Association for Computational Linguistics.
217
+ Minghao Li, Yingxiu Zhao, Bowen Yu, Feifan Song, Hangyu Li, Haiyang Yu, Zhoujun Li, Fei Huang, and Yongbin Li. 2023. Api-bank: A comprehensive benchmark for tool-augmented llms. Preprint, arXiv:2304.08244.
218
+ Xiao Liu, Hao Yu, Hanchen Zhang, Yifan Xu, Xuanyu Lei, Hanyu Lai, Yu Gu, Hangliang Ding, Kaiwen Men, Kejuan Yang, Shudan Zhang, Xiang Deng, Aohan Zeng, Zhengxiao Du, Chenhui Zhang, Sheng Shen, Tianjun Zhang, Yu Su, Huan Sun, Minlie Huang, Yuxiao Dong, and Jie Tang. 2023a. Agentbench: Evaluating llms as agents. Preprint, arXiv:2308.03688.
219
+ Yang Liu, Kun Han, Zhao Tan, and Yun Lei. 2017. Using context information for dialog act classification in DNN framework. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 2170-2178, Copenhagen, Denmark. Association for Computational Linguistics.
220
+ Yang Liu, Dan Iter, Yichong Xu, Shuohang Wang, Ruochen Xu, and Chenguang Zhu. 2023b. G-eval: NLG evaluation using gpt-4 with better human alignment. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 2511-2522, Singapore. Association for Computational Linguistics.
221
+ Jiarui Lu, Thomas Holleis, Yizhe Zhang, Bernhard Aumayer, Feng Nan, Felix Bai, Shuang Ma, Shen Ma, Mengyu Li, Guoli Yin, Zirui Wang, and Ruoming Pang. 2024. Toolsandbox: A stateful, conversational, interactive evaluation benchmark for llm tool use capabilities. Preprint, arXiv:2408.04682.
222
+ Huanzhi Mao, Fanjia Yan, Charlie Cheng-Jie Ji, Jason Huang, Vishnu Suresh, Yixin Huang, Xiaowen Yu, Joseph E. Gonzalez, and Shishir G. Patil. 2024. Bfcl v3: Multiturn & multi-step function calling evaluation. gorilla.cs.berkeley.edu/blogs/8_berkeley_function_calling_leaderboard.html.
223
+
224
+ Qian Pan, Zahra Ashktorab, Michael Desmond, Martin Santillán Cooper, James Johnson, Rahul Nair, Elizabeth Daly, and Werner Geyer. 2024. Human-centered design recommendations for LLM-as-a-judge. In Proceedings of the 1st Human-Centered Large Language Modeling Workshop, pages 16-29, TBD. ACL.
225
+ Shishir G Patil, Tianjun Zhang, Xin Wang, and Joseph E. Gonzalez. 2024. Gorilla: Large language model connected with massive APIs. In The Thirty-eighth Annual Conference on Neural Information Processing Systems.
226
+ Yujia Qin, Shihao Liang, Yining Ye, Kunlun Zhu, Lan Yan, Yaxi Lu, Yankai Lin, Xin Cong, Xiangru Tang, Bill Qian, Sihan Zhao, Lauren Hong, Runchu Tian, Ruobing Xie, Jie Zhou, Mark Gerstein, Dahai Li, Zhiyuan Liu, and Maosong Sun. 2024. Toollm: Facilitating large language models to master 16000+ real-world apis. In ICLR.
227
+ Yangjun Ruan, Honghua Dong, Andrew Wang, Silviu Pitis, Yongchao Zhou, Jimmy Ba, Yann Dubois, Chris J. Maddison, and Tatsunori Hashimoto. 2024. Identifying the risks of lm agents with an lm-emulated sandbox. Preprint, arXiv:2309.15817.
228
+ Timo Schick, Jane Dwivedi-Yu, Roberto Dessi, Roberta Raileanu, Maria Lomeli, Eric Hambro, Luke Zettlemoyer, Nicola Cancedda, and Thomas Scialom. 2023. Toolformer: Language models can teach themselves to use tools. In Thirty-seventh Conference on Neural Information Processing Systems.
229
+ Ivan Sekulic, Silvia Terragni, Victor Guimarães, Nghia Khau, Bruna Guedes, Modestas Filipavicius, Andre Ferreira Manso, and Roland Mathis. 2024. Reliable llm-based user simulator for task-oriented dialogue systems. Preprint, arXiv:2402.13374.
230
+ Andreas Stolcke, Klaus Ries, Noah Coccaro, Elizabeth Shriberg, Rebecca Bates, Daniel Jurafsky, Paul Taylor, Rachel Martin, Carol Van Ess-Dykema, and Marie Meteor. 2000. Dialogue act modeling for automatic tagging and recognition of conversational speech. Computational Linguistics, 26(3):339-374.
231
+ Jiaan Wang, Yunlong Liang, Fandong Meng, Zengkui Sun, Haoxiang Shi, Zhixu Li, Jinan Xu, Jianfeng Qu, and Jie Zhou. 2023. Is ChatGPT a good NLG evaluator? a preliminary study. In Proceedings of the 4th New Frontiers in Summarization Workshop, pages 1-11, Singapore. Association for Computational Linguistics.
232
+ Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik R Narasimhan, and Yuan Cao. 2023. React: Synergizing reasoning and acting in language models. In The Eleventh International Conference on Learning Representations.
233
+ Seeun Yoon, Zhankui He, Jessica Maria Echterhoff, and Julian McAuley. 2024. Evaluating large language models as generative user simulators for conversational recommendation. Preprint, arXiv:2403.09738.
234
+
235
+ Yuheng Zha, Yichi Yang, Ruichen Li, and Zhiting Hu. 2023. Alignscore: Evaluating factual consistency with a unified alignment function. Preprint, arXiv:2305.16739.
236
+ Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric P. Xing, Haotong Zhang, Joseph Gonzalez, and Ion Stoica. 2023. Judging llm-as-a-judge with mt-bench and chatbot arena. ArXiv, abs/2306.05685.
237
+
238
+ # A Prompts
239
+
240
+ Table 8 provides the prompts used for dialog act classification using Claude Haiku v3. We also include the system and user prompts used to generate predictions for evaluating function calling (Section 5.1) and response quality (Section 5.3.2) in Table 9 and Table 10, respectively. Table 11 shows the prompt we used to evaluate parameter hallucinations using gpt-4o-mini (with temperature 0) in Section 5.4.
241
+
242
+ # System Prompt and Instructions for Dialog Act Classification
243
+
244
+ # SYSTEM PROMPT:
245
+
246
+ 1 1
247
+
248
+ output the labels only. Do not output anything else.
249
+
250
+ If more than one label is predicted, separate them using comma (,)
251
+
252
+ 1
253
+
254
+ # USER PROMPT:
255
+
256
+ 1
257
+
258
+ Select one or more of the following labels as the dialog act for the following text.
259
+
260
+ If the turns include only function or API calls, use the agent_function_calling label only.
261
+
262
+ Only use the other labels if the turns include text that is not function-calling. function-calls may co-occur with addition text informing user or seeking information from the user or rejecting the user request.
263
+
264
+ labels are: agent-seeking_information, agent_other, agent_reject_request, agent_inform_user,
265
+
266
+ agent_function_calling
267
+
268
+ text: {prediction}
269
+
270
+ conversation history: {context}"
271
+
272
+ 1 1
273
+
274
+ Table 8: The system prompt and the instructions used for dialog act classification.
275
+
276
+ # Function-calling Evaluation Prompt
277
+
278
+ # SYSTEM PROMPT:
279
+
280
+ 1
281
+
282
+ You are an expert in composing functions. You are given a conversation and a set of possible functions. Based on the conversation, you will need to make one function/tool call to achieve the purpose.
283
+
284
+ If you need to call multiple function calls to achieve the purpose, output the first function call in the chain only.
285
+
286
+ If none of the functions can be used, respond with an appropriate message to the user, such as clarification, confirmation, eliciting information, etc. If the given question lacks the parameters required by the function, you can ask the user for it. You should only return the function call in tools call sections.
287
+
288
+ USER PROMPT (only used when prompting models directly):
289
+
290
+ 1
291
+
292
+ Here is a list of functions in JSON format that you can invoke.
293
+
294
+ {language_specicHint}\n\n{functions}\n\n
295
+
296
+ If you decide to invoke any of the function(s), put it in the format of
297
+
298
+ [func_name1.params_name1=params_value1, params_name2=params_value2...), func_name2.params)]\n
299
+
300
+ You SHOULD NOT include any other information in the response.
301
+
302
+ {conversation}
303
+
304
+ 1
305
+
306
+ Table 9: The system and user prompts used to generate predictions for the function-calling benchmark. The user prompt is only included for the case of direct prompting (i.e. when the tool use API is not used). These runs are indicated by dropping the "FC" suffix in the results tables.
307
+
308
+ # Response Quality Evaluation Prompt
309
+
310
+ SYSTEMPROMPT:
311
+
312
+ 1
313
+
314
+ You are an agent tasked with assisting a user to solve a problem. You have access to a set of functions that you can use.
315
+
316
+ You are given a conversation and a set of possible functions. Based on the conversation, you will need to either make one function/tool call or to respond to the user to achieve the purpose. If you need to make multiple function calls to achieve the purpose, output the first function call in the chain only.
317
+
318
+ If none of the functions can be used, respond with an appropriate message to the user, such as clarification, confirmation,
319
+
320
+ eliciting information, etc. If the given question lacks the parameters required by the function, you can ask the user for it.
321
+
322
+ USER PROMPT (only used when prompting models directly):
323
+
324
+ 1
325
+
326
+ Here is a list of functions in JSON format that you can invoke.
327
+ {languagespecific_hint}\n\n{functions}\n\nIf you decide to invoke any of the function(s), put it in the format of
328
+ [func_name1.params_name1=params_value1, params_name2=params_value2...), func_name2.params)]\n{conversation}
329
+
330
+ Table 10: The system and user prompts used to generate predictions for the response quality benchmark. The user prompt is only included for the case of direct prompting (i.e. when the tool use API is not used). These runs are indicated by dropping the "FC" suffix in the results tables.
331
+
332
+ # Prompt for Parameter Hallucination Detection
333
+
334
+ 1
335
+
336
+ <guidelines>
337
+
338
+ - The system is about to execute an action or a series of actions shown below inside `<actions></actions> tags. Each predicted action is called with the action name, parameter name and parameter values, as shown in the action schemas inside `<schemas></schemas> tags.
339
+ - You have to evaluate each parameter value in the predicted action calls and determine whether it was hallucinated.
340
+ - Each parameter value must be EXPLICITLY mentioned in the conversation history. If not, the value is hallucinated. For example if an airport code is not explicitly mentioned in the context and the system uses it, it is considered hallucination. Note that certain actions might require the system to generate text (such as an email or an article). In these cases, evaluate the content of the generated text for hallucination.
341
+ - First think before detecting hallucinated parameters inside <thinking></thinking> tags and add the rationale in the "rationale" field.
342
+ - The output should have the following JSON format:: {"rationale": "", "hallucinated_parameters": [[], [], ...]}. The "hallucinated_parameters" field should contain a list that has one list of hallucinated parameter names for each predicted action in the order as they appear.
343
+
344
+ </guidelines>
345
+
346
+ This is the action call you have to evaluate:
347
+
348
+ Conversation History: <conversation_history> {conversation_history_block} </conversation_history>
349
+
350
+ Predicted Actions: <actions> {predicted_actions} </actions>
351
+
352
+ Action Schemas: <schemas> {action_schemas} </schemas>
353
+
354
+ Evaluate the parameters of the predicted actions in <actions></actions> tags. Return a JSON as described in the <guidelines>.
355
+
356
+ Table 11: Prompt for detecting parameter hallucination in predicted actions
2025/CONFETTI_ Conversational Function-Calling Evaluation Through Turn-Level Interactions/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1490248c34fedea5a75c91b0d0791f204bd7f8a1cf474f912f7b27568c40d9db
3
+ size 654338
2025/CONFETTI_ Conversational Function-Calling Evaluation Through Turn-Level Interactions/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/CORAL_ Learning Consistent Representations across Multi-step Training with Lighter Speculative Drafter/3f20cb7c-16b0-4d8d-932f-156e46539381_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/CORAL_ Learning Consistent Representations across Multi-step Training with Lighter Speculative Drafter/3f20cb7c-16b0-4d8d-932f-156e46539381_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/CORAL_ Learning Consistent Representations across Multi-step Training with Lighter Speculative Drafter/3f20cb7c-16b0-4d8d-932f-156e46539381_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b666993032ff4a52d674d59a245caa697f94914d98897e7a072ac262688c9ad4
3
+ size 546096
2025/CORAL_ Learning Consistent Representations across Multi-step Training with Lighter Speculative Drafter/full.md ADDED
@@ -0,0 +1,438 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CORAL: Learning Consistent Representations across Multi-step Training with Lighter Speculative Drafter
2
+
3
+ Yepeng Weng, Dianwen Mei, Huishi Qiu Xujie Chen, Li Liu, Jiang Tian, Zhongchao Shi
4
+
5
+ AI Lab, Lenovo Research
6
+
7
+ {wengyp1, meidw1, qiuhs1, chenxj23, liuli16, tianjiang1, shizc2}@lenovo.com
8
+
9
+ # Abstract
10
+
11
+ Speculative decoding is a powerful technique that accelerates Large Language Model (LLM) inference by leveraging a lightweight speculative draft model. However, existing designs suffers in performance due to misalignment between training and inference. Recent methods have tried to solve this issue by adopting a multi-step training strategy, but the complex inputs of different training steps make it harder for the draft model to converge. To address this, we propose CORAL, a novel framework that improves both accuracy and efficiency in speculative drafting. CORAL introduces Cross-Step Representation Alignment, a method that enhances consistency across multiple training steps, significantly improving speculative drafting performance. Additionally, we identify the LM head as a major bottleneck in the inference speed of the draft model. We introduce a weight-grouping mechanism that selectively activates a subset of LM head parameters during inference, substantially reducing the latency of the draft model. We evaluate CORAL on three LLM families and three benchmark datasets, achieving speedup ratios of $2.50 \times -4.07 \times$ , outperforming state-of-the-art methods such as EAGLE-2 and HASS. Our results demonstrate that CORAL effectively mitigates training-inference misalignment and delivers significant speedup for modern LLMs with large vocabularies.
12
+
13
+ # 1 Introduction
14
+
15
+ Large Language Models (LLMs), such as GPT (OpenAI, 2023) and Llama series (Touvron et al., 2023a,b; Grattafori et al., 2024), have demonstrated exceptional capabilities in various natural language processing tasks. However, achieving stronger model performance often depends on increasing the number of model parameters (Kaplan et al., 2020; Hoffmann et al., 2022), which leads to higher costs in both training and inference. Thus, achieving strong performance while maintaining
16
+
17
+ ![](images/19f518ff39ca10a8c047b8088045dcc6c848b72e1111b8061670c6738447f5bc.jpg)
18
+ Figure 1: Speedup ratios of different methods on Llama3-8B and Qwen2.5-7B at temperature=0, averaging on MT-bench, HumanEval, and GSM8K datasets. We present full results in Table 2 and this chart is only a subset of all comparisons.
19
+
20
+ quick response is a crucial part in LLM implementations. Under common hardware conditions, transformer decoder-based LLMs are memory-bound (Dao et al., 2022), which means that the generation speed is mainly determined by memory access and bandwidth, rather than arithmetic computations. This allows for the acceleration of generation using speculative decoding (Chen et al., 2023; Leviathan et al., 2023). The general idea of speculative decoding is to utilize one or multiple lightweight draft models to predict the output of target LLM for several upcoming timesteps, and then verify the drafted predictions in parallel using the target model. The memory-bound characteristic guarantees that the parallel verification of multiple tokens does not incur a significant increase in latency compared to generating a single token.
21
+
22
+ Recently, autoregressive draft models, such as EAGLE (Li et al., 2024b), have received widespread attention for their excellent speedup performance. For training, EAGLE uses not only the output tokens but also the last hidden states from target LLM as input to the draft model, while during the drafting phase, the draft model uses its own hidden states from the previous timestep,
23
+
24
+ <table><tr><td>Model</td><td>Hidden</td><td>Inter. size</td><td>Vocab</td><td>Wd / Wt</td><td>Ld / Lt</td></tr><tr><td>Llama2-7B</td><td>4096</td><td>11008</td><td>32000</td><td>350M/6301M(5.6%)</td><td>1.36ms/23.65ms(5.8%)</td></tr><tr><td>Llama3-8B</td><td>4096</td><td>14336</td><td>128256</td><td>741M/7157M(10.4%)</td><td>2.58ms/26.06ms(9.9%)</td></tr><tr><td>Qwen2.5-7B</td><td>3584</td><td>18944</td><td>152064</td><td>767M/6743M(11.4%)</td><td>2.69ms/24.58ms(10.9%)</td></tr></table>
25
+
26
+ Table 1: Parameters and latencies of Llama3-8B, Llama2-7B, and Qwen2.5-7B draft and target models. $W_{d}$ , $W_{t}$ and $L_{d}$ , $L_{t}$ denote the parameter counts and latency of draft and target model. In the table, M represents $1024 \times 1024$ . Parameters of the embedding layer are not calculated because they do not participate in general matrix multiplication (GEMM). Latencies are tested with one token on a single NVIDIA A6000 GPU.
27
+
28
+ ![](images/c073a7dfdd0e83c2a66b0f57ba517abdab802d2c94c4d6019b5b256339f38941.jpg)
29
+ Figure 2: Parameters and latencies of Llama3-8B, Llama2-7B, Qwen2.5-7B draft model. For a model with large vocabulary, the LM head takes the majority of the drafting latency.
30
+
31
+ which may contain biases. This misalignment leads to a decrease in the prediction accuracy of the draft model. HASS (Zhang et al., 2024) proposes a multi-step training strategy, where the hidden states output by the draft model are fed back into itself multiple times during training, allowing the draft model to learn the feature distribution of the inference phase. In Section 2 we will provide more detailed discussions on them.
32
+
33
+ Although HASS exhibits impressive performance, there are still some limitations to multi-step training. Specifically, their design causes the input features at different training steps to vary, which might be challenging for a lightweight draft model to adapt to. The discrepancy of each training step may also introduce potential gradient conflicts. Furthermore, modern LLMs are increasingly moving towards large vocabularies to obtain better performance (Tao et al., 2024). For example, previous model such as Llama2 has a small vocabulary size of only 32000 (Touvron et al., 2023b), while the vocabulary size of Llama3 (Grattafori et al., 2024) is 128256, and that of Qwen2.5 (Yang et al., 2024) is 152064. Such large vocabularies lead to an increase in the parameter size of the Language Model head (LM head), resulting in increased overhead of drafting, which is presented in Table 1. As demonstrated in Figure 2, the heavy LM head could potentially dominate the latency of draft model. However, few
34
+
35
+ studies have focused on this aspect.
36
+
37
+ In this paper, we introduce CORAL (learning COnsistent Representations Across multi-step training with Lighter speculative drafter), a speculative decoding method that improves the alignment between the draft model and the target model while maintaining high drafting speed. We first propose Cross-Step Representation Alignment (CSRA), which leverages the idea of contrastive learning to enforce consistency among the output features of each training step. The constraint on features makes them more stable, and thus improves the training efficiency and the performance of the draft model. Furthermore, by grouping the LM heads, we significantly reduce the activated parameters of the draft model with large vocabulary size, thereby decreasing the wall time of speculative decoding.
38
+
39
+ We evaluate acceleration capability of CORAL on multi-turn conversation, code generation, and mathematical reasoning tasks using the MT-Bench, HumanEval and GSM8K datasets, respectively. The results show that our method achieves $2.50 \times 4.07 \times$ speedup over vanilla decoding at a temperature of 0, surpassing state-of-the-art methods such as EAGLE-2 and HASS.
40
+
41
+ Our key contributions can be summarized as follows.
42
+
43
+ 1. We propose Cross-Step Representation Alignment, a technique that enables the draft model to learn consistent representations across multiple timesteps.
44
+ 2. We find that the vocabulary size can significantly influence the latency of the draft model, and propose a novel method which selectively activates a subset of LM head parameters during inference using a router.
45
+ 3. CORAL achieves speedup ratios of $2.50 \times 4.07 \times$ on various LLMs and datasets, outperforming existing speculative decoding methods such as EAGLE-2 and HASS.
46
+
47
+ ![](images/7e69713addfb32ccf8a6c7b13fcf99c2fd44dea2e9c1d0b5e4315b06270097c2.jpg)
48
+ Figure 3: Demonstration of EAGLE training / inference and multi-step training with CSRA. $f$ denotes feature and $e$ denotes embedding. Superscripts indicate the source of the variable, with $t$ and $d$ denoting the target model and draft model. Subscripts index the position of a feature or embedding. For example, $f_3^t$ means the feature in position 3 and comes from the target model. For multi-step training, we use apostrophes to distinguish the outputs of different training steps. Specifically, we denote the output feature of step 1 as $f^d$ , and for step 2 and 3 we use $f^{d'}$ and $f^{d''}$ , respectively. Compared to HASS, CSRA introduces additional constraints on feature consistency. The training target is applied at each step, and we only illustrate it once for the sake of clarity.
49
+
50
+ ![](images/2d0aebc30fec421d87065e66778e76dfe0ee97aecff4c3d20939b64c1de0eda8.jpg)
51
+
52
+ # 2 Preliminaries
53
+
54
+ In this section, we provide some background information related to speculative decoding and review some existing methods, including EAGLE and HASS.
55
+
56
+ # 2.1 Speculative Decoding
57
+
58
+ Speculative decoding (Chen et al., 2023; Leviathan et al., 2023) aims to accelerate the generation speed of autoregressive LLMs. Vanilla speculative decoding employs a lightweight model (draft model) to generate a chain of candidate tokens for the next $\gamma$ timesteps, which are then verified in parallel by the original LLM (target model) and decide whether to accept them or not. Since the latency of LLM generation mainly lies in the memory access, parallel verification of multiple tokens does not significantly impact the latency of the target LLM, although the computational cost is multiplied.
59
+
60
+ The acceleration capability of speculative decoding is typically evaluated using two metrics: average acceptance length $\tau$ and the actual Speedup Ratio (SR). A drafting-verification cycle consists of one token provided by the target model and multiple candidates generated by the draft model over $\gamma$ time steps. The average acceptance length $\tau$ is defined as the number of new tokens generated in a single drafting-verification cycle.
61
+
62
+ Ideally, we can estimate the speedup ratio using $\tau$ and the latencies of draft and target model:
63
+
64
+ $$
65
+ S R \approx \tau \times \frac {L _ {t} ^ {\prime}}{\gamma \times L _ {d} + L _ {t}}, \tag {1}
66
+ $$
67
+
68
+ where $L_{t}$ and $L_{d}$ denote the latency of the target
69
+
70
+ model and draft model, respectively. $L_{t}^{\prime}$ denotes the latency for evaluating multiple tokens one time, it could be slightly different from $L_{t}$ depending on the hardware. Some additional overheads might also contribute to latency, such as comparing the probabilities of tokens from draft and target models to determine acceptance. However, since these overheads typically do not dominate the overall latency, it is a good choice to ignore them when estimating the speedup ratio.
71
+
72
+ From Equation (1) we can see the speedup ratio is primarily influenced by two factors: the alignment between the draft model and the target model, which mainly influences $\tau$ , and the ratio of their latencies. Specifically, the lower the latency of the draft model and the better alignment between the two models, the higher the speedup ratio will be achieved by speculative decoding.
73
+
74
+ # 2.2 EAGLE
75
+
76
+ EAGLE (Li et al., 2024b) is a lightweight autoregressive draft model that leverages a single transformer layer identical to that of the target model. The LM head of draft model is reused directly from the target model, with its parameters frozen. EAGLE discovers that utilizing the feature (i.e., the last hidden states) of the target model can effectively enhance the alignment between the draft and target model. For training, the input of the draft model at position $s$ is the current token $t_s$ and the feature of the target model at position $s - 1$ . The token $t_s$ will first be transformed into embedding $e_s$ , and then concatenated with the feature. A linear layer is adopted to reduce the dimensions before
77
+
78
+ the single transformer layer.
79
+
80
+ The training target of EAGLE is to align the feature (regression) and probability distribution (classification) of the draft and target model. EAGLE uses smooth L1 as the regression loss and cross-entropy as the classification loss.
81
+
82
+ EAGLE selects multiple candidates at each timestep during drafting, resulting in a tree-shaped structure rather than a chain. Tree decoding offers more possible trajectories than chain decoding, leading to a higher acceptance length. EAGLE-2 (Li et al., 2024a) improves the fixed tree structure to a dynamic one and achieves better performance.
83
+
84
+ # 2.3 HASS
85
+
86
+ HASS (Zhang et al., 2024) addresses the inconsistency between the training and inference phases of EAGLE by introducing a multi-step training strategy. As demonstrated in Figure 3, EAGLE uses the feature of the target model for training, whereas in inference, the draft model uses its own feature. HASS solves this problem by feeding the output feature of draft model back into itself for multiple times. To expose the draft model to inference-time conditions during training, attention masks from different training steps require careful adjustment. HASS also incorporates other improvements on EAGLE, but they are orthogonal to multi-step alignment. In this paper, we focus mainly on HASS alignment, and all references to HASS in the remainder of this paper denote HASS alignment unless otherwise specified.
87
+
88
+ While HASS improves the accuracy of draft models in autoregressive generation, we argue that there are still unresolved issues due to the discrepancies between representations from multiple training steps (i.e., $f^d$ , $f^{d'}$ and $f^{d''}$ in Figure 3). It is harder for the draft model to adapt to more complex inputs and the conflicting gradients from multiple steps may hinder convergence speed.
89
+
90
+ # 3 Method
91
+
92
+ In this section, we first introduce Cross-Step Representation Alignment, a method designed to strengthen the alignment between the draft model and the target model. We then analyze the speedup ratio and identify the LM head of the draft model as a bottleneck. To address this issue, we propose the LM head router, a novel solution that aims to reduce the latency of the draft model.
93
+
94
+ ![](images/43bb23a8d07ca2678c4237d1b290f4225457af3382aa3e9ed917125a7cbef781.jpg)
95
+ Figure 4: Comparison of EAGLE training, HASS training and CSRA. Here $\bigcirc$ denotes training target, $\triangle$ denotes output features from different steps. Triangles filled with darker colors represent the first step's output. Different colors represent outputs or targets of different positions. Optimization direction is marked as $\rightarrow$ , and the dashed $\leftrightarrow$ means repulsion.
96
+
97
+ # 3.1 Cross-Step Representation Alignment
98
+
99
+ Cross-Step Representation Alignment (CSRA) leverages the idea of contrastive learning (Chopra et al., 2005; Schroff et al., 2015). Specifically, in multi-step training, we treat the output features at the same position in a sentence as positive views of the same sample, while all other features are considered negative samples.
100
+
101
+ Assuming current training step is $t$ , the output features of current step are $F_{t} \in \mathbb{R}^{B \times S \times D}$ , where $B, S,$ and $D$ represent the batch size, sequence length, and hidden dimension, respectively. Naturally, we regard them as $B \times S$ samples, and each sample has $t$ positive views, while all other features are considered negative samples.
102
+
103
+ For each output feature $f$ in current training step, our objective is to minimize its distance to other positive views while maximizing the distance to negative samples. To achieve this, we normalize the features and compute the InfoNCE loss (van den Oord et al., 2018) as the objective function, which encourages the feature to be closer to its positive views and away from negative samples:
104
+
105
+ $$
106
+ \mathcal {L} _ {C S R A} = - \log \frac {\exp (\sin (q , f ^ {+}) / \tau)}{\sum_ {f \in F} \exp (\sin (q , f) / \tau)}, \tag {2}
107
+ $$
108
+
109
+ where $q$ and $f^{+}$ denotes the query feature and positive views, and $F$ is the set of all features along with the targets. The similarity function $\mathrm{sim}(\cdot ,\cdot)$ is defined as cosine similarity. Here $\tau$ is the temperature hyperparameter. Figure 4 shows the differences between EAGLE / HASS training and CSRA.
110
+
111
+ The training loss can be defined as:
112
+
113
+ $$
114
+ \mathcal {L} = w _ {r e g} \mathcal {L} _ {r e g} + w _ {c l s} \mathcal {L} _ {c l s} + w _ {C S R A} \mathcal {L} _ {C S R A}, (3)
115
+ $$
116
+
117
+ where $\mathcal{L}_{reg}$ and $\mathcal{L}_{cls}$ represent the regression loss and classification loss, respectively. Since $\mathcal{L}_{CSRA}$ primarily affects representation learning, we maintain $w_{cls}$ consistent with EAGLE and adjust another two weights according to different target models. For detailed parameter settings, please refer to Appendix A.
118
+
119
+ # 3.2 Estimation of Speedup Ratio
120
+
121
+ As discussed in Section 2.1, the generation speed is primarily constrained by memory bandwidth. Therefore, the theoretical latency $L_{theo}$ in generation phase is proportional to the LLM's parameter count $W_{LLM}$ :
122
+
123
+ $$
124
+ L _ {\text {t h e o .}} \propto W _ {L L M}. \tag {4}
125
+ $$
126
+
127
+ However, this estimation is not always accurate due to the following factors: 1) Not all operators and computing graphs are fully optimized. 2) The latency of some element-wise operators (e.g., activation, norm) is not reflected in the parameter count. This issue is particularly noticeable for PyTorch, because it is not a framework optimized for inference.
128
+
129
+ Luckily, the draft model and target one share the same transformer structure, and the extra latency caused by the aforementioned factors is relatively consistent in both models. This allows us to estimate the wall time and speedup ratio of speculative decoding based on the parameters of draft model and target model:
130
+
131
+ $$
132
+ \frac {L _ {d}}{L _ {t}} \approx \frac {W _ {d}}{W _ {t}}, \tag {5}
133
+ $$
134
+
135
+ $$
136
+ S R \approx \tau \times \frac {W _ {t}}{\gamma \times W _ {d} + W _ {t}}, \tag {6}
137
+ $$
138
+
139
+ where $W_{d}$ , $W_{t}$ and $L_{d}$ , $L_{t}$ denote the parameter counts and latency of draft and target model, respectively. Note that the embedding layer does not participate in general matrix multiplication (GEMM), therefore its parameters should not be included in
140
+
141
+ latency estimation. Table 1 presents the latencies and parameters of different LLMs, along with their corresponding draft models. The results suggest that estimating the latency ratio between the draft and target models based on their parameter counts is relatively accurate. Notably, for Llama3-8B and Qwen2.5-7B, the latency of draft model is approximately $10\%$ of that of target model. As the depth of drafting increases, the latency of draft model is expected to contribute significantly to the overall wall time.
142
+
143
+ Furthermore, it is also possible to estimate the latency of each component of the draft model based on their parameter count. As shown in Figure 2, in cases with large vocabularies, the latency of LM head accounts for a significant proportion of the total latency, which provides us with a valuable insight: If we can reduce the activated weights of the LM head, the overall speedup will be substantially improved.
144
+
145
+ # 3.3 LM Head Router
146
+
147
+ As mentioned in Section 3.2, for draft models with large vocabularies, LM head constitutes the major part of drafting latency. We propose the LM head router, aiming to group the LM head and then activate only a subset of LM head parameters during drafting, as demonstrated in Figure 5.
148
+
149
+ Assuming a LLM with a vocabulary size $V$ , we divide the LM head equally into $N$ groups, each with a vocabulary size of $v = V / N$ . We utilize a router to select which group to activate. The output of router can be outlined as follows:
150
+
151
+ $$
152
+ p _ {\text {r o u t e r}} = \operatorname {S o f t m a x} (W _ {2} (\operatorname {a c t} (W _ {1} h) + h)), \tag {7}
153
+ $$
154
+
155
+ $$
156
+ W _ {2} \in \mathbb {R} ^ {N \times d}, W _ {1} \in \mathbb {R} ^ {d \times d},
157
+ $$
158
+
159
+ where $h$ denotes the hidden states of draft model, $d$ is the hidden size.
160
+
161
+ Let $p(x), q(x)$ denote the predicted and target distribution, and $p_{\mathrm{group}}(x^n)$ denote the probability distribution within a specific group $n$ . After selecting a particular group, the softmax probability is calculated by logits in this group, independent of the logits in other groups.
162
+
163
+ Then the final distribution with router should be
164
+
165
+ $$
166
+ p (x) = p _ {\text {r o u t e r}} (n) \cdot p _ {\text {g r o u p}} \left(x ^ {n}\right). \tag {8}
167
+ $$
168
+
169
+ For each group, $\sum p_{\mathrm{group}}(x^n) = 1$ , and for router we have $\sum p_{\mathrm{router}}(n) = 1$ . Therefore, the final $p(x)$ is normalized.
170
+
171
+ ![](images/f902677569e1f6aedc1da50b740bf8d2d0a180f4db6a29c5f8aa8adb410178a4.jpg)
172
+ (a) Vanilla LM head
173
+
174
+ ![](images/6f34f1049d791d2de66454763a260fb1a12555b4b24fe61859606f2097edba06.jpg)
175
+ (b) LM head with router
176
+
177
+ ![](images/f5ee2eab41738389667d243dc9da2cc7a0735fa5e0922542e773e01894bcec1b.jpg)
178
+ hidden states
179
+
180
+ ![](images/7bb96b7a407d7112a4ea7586505b37da273c03dfbfd2ea49abb04c05804a193b.jpg)
181
+ probabilities
182
+
183
+ ![](images/8f80f6e4ff73bfab33fd13ae7a3cbc8c32ab1edfb59f3ca0adb25dfdd0d141e6.jpg)
184
+ activated LM head params
185
+
186
+ ![](images/328856e3dee5237b5ecc9c59d96758e225d2bed9ae2eca309f01d29fc0087180.jpg)
187
+ non-activated params
188
+ Figure 5: Demonstration of LM head router in draft model. With the router, we only output probabilities of one or multiple subsets of vocabulary.
189
+
190
+ The training target of LM head router is the sum of target probabilities in each group, namely $q_{\mathrm{router}}(n) = \sum q_{\mathrm{group}}(x^n)$ . We use cross-entropy as the loss function:
191
+
192
+ $$
193
+ \mathcal {L} _ {\text {r o u t e r}} = - \sum q _ {\text {r o u t e r}} (n) \log p _ {\text {r o u t e r}} (n). \tag {9}
194
+ $$
195
+
196
+ It is evident that, although the LM head router reduces the latency of the draft model, it comes at the cost of a slight decrease in acceptance length $\tau$ due to imperfect routing accuracy. Based on Equations (5) and (6), the LM head router gets its best performance when 1) the LM head accounts for a significant portion of the latency of draft model 2) the latency ratio between the draft model and the target model is substantial. Therefore, we only apply the LM head router to models with large vocabularies (Qwen2.5, Llama3) and relatively small sizes (7B, 14B).
197
+
198
+ We adopt a two-stage training strategy, where we first train the draft model following the standard training procedure (either single-step or multi-step), and then fix the weights of draft model and train the router separately. For further discussion, please refer to Appendix F.
199
+
200
+ # 4 Experiments
201
+
202
+ In this section, we first introduce the experimental setup, then discuss the overall effectiveness of our method, and finally present the ablation studies on CSRA and LM head router.
203
+
204
+ # 4.1 Experimental Setup
205
+
206
+ Target LLMs. We choose Llama3-Instruct-8B/70B(Grattafori et al., 2024), Llama2-chat-7B/13B(Touvron et al., 2023b) and Qwen2.5-Instruct-7B/14B(Yang et al., 2024) as our target models.
207
+
208
+ Tasks. We choose multiple datasets covering three tasks, including MT-Bench(Zheng et al., 2023) for multi-turn dialogue, GSM8K(Cobbe et al., 2021) for mathematical reasoning, and HumanEval(Chen et al., 2021) for code generation. For 7B/14B models, experiments are conducted with batch size of 1 on a single NVIDIA A6000 48G GPU. For Llama3-70B-Instruct, we use $4 \times$ A6000 GPUs due to memory requirements.
209
+
210
+ Metrics. Since CORAL is a lossless speculative decoding strategy, it is not necessary to measure the generation quality. For acceleration, we use two metrics to evaluate the performance:
211
+
212
+ - Speedup Ratio: the actual speedup ratio compared to vanilla decoding.
213
+ - Acceptance Length $\tau$ : the average number of new tokens generated per drafting-verification cycle.
214
+
215
+ Comparisons. We use vanilla decoding as the baseline $(1.00\times)$ to measure the speedup ratio. We primarily compare CORAL with the latest lossless speculative decoding methods, including EAGLE, EAGLE-2, and HASS. Since EAGLE is already one of the fastest speculative decoding methods, we choose EAGLE as the speculative decoding baseline and do not compare with other methods with lower speedup ratios.
216
+
217
+ Implementation. Our implementation is based on the open source repositories of HASS $^1$ and EAGLE-2 $^2$ , and the settings are primarily identical to those of them. All models are trained with ShareGPT dataset for 20 epochs with batch size of 2 per GPU. For HASS and CORAL, the default step for training is set to 3. Our system prompt for Llama3 is slightly different from that of EAGLE, please refer to Appendix E for detailed discussion. For inference, we employ a tree depth of 6 and select 60 candidate tokens for all models.
218
+
219
+ # 4.2 Effectiveness and Ablation Studies
220
+
221
+ # 4.2.1 Effectiveness
222
+
223
+ We present the acceptance lengths $\tau$ and speedup ratios of three datasets in Table 2. The results show that CSRA achieves the best performance in both $\tau$ and speedup ratio (SR) in all experiments we have tested, surpassing EAGLE, EAGLE-2, and HASS. The advantages of CSRA are more pronounced for
224
+
225
+ <table><tr><td colspan="2"></td><td colspan="2">MT-bench
226
+ τ/SR</td><td colspan="2">HumanEval
227
+ τ/SR</td><td colspan="2">GSM8K
228
+ τ/SR</td><td>Average
229
+ τ/SR</td></tr><tr><td>model</td><td>method</td><td>T=0</td><td>T=1</td><td>T=0</td><td>T=1</td><td>T=0</td><td>T=1</td><td>T=0</td></tr><tr><td rowspan="4">L2-13B</td><td>EAGLE</td><td>3.93/3.04×</td><td>3.64/2.65×</td><td>4.51/3.47×</td><td>4.24/3.13×</td><td>4.01/3.10×</td><td>3.84/2.83×</td><td>4.15/3.20×</td></tr><tr><td>EAGLE-2</td><td>4.80/3.16×</td><td>4.68/3.06×</td><td>5.59/3.75×</td><td>5.41/3.60×</td><td>4.98/3.38×</td><td>4.84/3.25×</td><td>5.12/3.43×</td></tr><tr><td>HASS</td><td>5.20/3.42×</td><td>5.02/3.26×</td><td>5.99/4.01×</td><td>5.79/3.86×</td><td>5.32/3.60×</td><td>5.24/3.51×</td><td>5.50/3.68×</td></tr><tr><td>CORAL</td><td>5.25/3.45×</td><td>5.10/3.32×</td><td>6.06/4.07×</td><td>5.90/3.93×</td><td>5.39/3.65×</td><td>5.25/3.51×</td><td>5.57/3.72×</td></tr><tr><td rowspan="4">L2-7B</td><td>EAGLE</td><td>3.80/2.67×</td><td>3.62/2.37×</td><td>4.29/3.04×</td><td>3.96/2.60×</td><td>3.84/2.73×</td><td>3.74/2.48×</td><td>3.87/2.81×</td></tr><tr><td>EAGLE-2</td><td>4.68/2.89×</td><td>4.45/2.70×</td><td>5.34/3.35×</td><td>5.02/3.11×</td><td>4.70/2.98×</td><td>4.67/2.89×</td><td>4.91/3.07×</td></tr><tr><td>HASS</td><td>5.02/3.09×</td><td>4.77/2.88×</td><td>5.71/3.58×</td><td>5.35/3.30×</td><td>5.11/3.25×</td><td>4.99/3.10×</td><td>5.28/3.31×</td></tr><tr><td>CORAL</td><td>5.09/3.13×</td><td>4.86/2.94×</td><td>5.73/3.58×</td><td>5.48/3.40×</td><td>5.12/3.25×</td><td>5.05/3.13×</td><td>5.31/3.32×</td></tr><tr><td rowspan="4">L3-70B</td><td>EAGLE</td><td>2.87/2.24×</td><td>2.67/2.06×</td><td>3.73/2.93×</td><td>3.53/2.74×</td><td>3.46/2.71×</td><td>3.26/2.52×</td><td>3.35/2.63×</td></tr><tr><td>EAGLE-2</td><td>4.08/2.70×</td><td>3.91/2.61×</td><td>4.95/3.31×</td><td>4.89/3.27×</td><td>4.03/2.70×</td><td>3.73/2.50×</td><td>4.35/2.90×</td></tr><tr><td>HASS</td><td>4.10/2.71×</td><td>4.00/2.65×</td><td>5.23/3.49×</td><td>5.10/3.40×</td><td>4.12/2.76×</td><td>3.83/2.56×</td><td>4.48/2.99×</td></tr><tr><td>CORAL</td><td>4.23/2.79×</td><td>4.13/2.72×</td><td>5.31/3.54×</td><td>5.19/3.46×</td><td>4.34/2.90×</td><td>3.91/2.61×</td><td>4.63/3.08×</td></tr><tr><td rowspan="5">L3-8B</td><td>EAGLE</td><td>2.63/1.65×</td><td>2.40/1.41×</td><td>3.65/2.29×</td><td>3.29/1.92×</td><td>3.47/2.18×</td><td>3.22/1.89×</td><td>3.25/2.04×</td></tr><tr><td>EAGLE-2</td><td>4.16/2.28×</td><td>3.84/2.08×</td><td>4.78/2.61×</td><td>4.64/2.50×</td><td>4.21/2.32×</td><td>3.94/2.13×</td><td>4.38/2.40×</td></tr><tr><td>HASS</td><td>4.48/2.45×</td><td>4.12/2.21×</td><td>5.31/2.89×</td><td>5.12/2.76×</td><td>4.56/2.51×</td><td>4.18/2.28×</td><td>4.78/2.62×</td></tr><tr><td>CORAL</td><td>4.57/2.50×</td><td>4.15/2.24×</td><td>5.43/2.95×</td><td>5.28/2.83×</td><td>4.70/2.58×</td><td>4.39/2.38×</td><td>4.90/2.68×</td></tr><tr><td>CORAL w/r.</td><td>4.26/2.63×</td><td>3.92/2.39×</td><td>5.22/3.21×</td><td>5.03/3.07×</td><td>4.42/2.76×</td><td>4.12/2.53×</td><td>4.63/2.87×</td></tr><tr><td rowspan="5">Q2.5-14B</td><td>EAGLE</td><td>2.63/1.83×</td><td>2.44/1.62×</td><td>3.31/2.31×</td><td>3.12/2.10×</td><td>3.62/2.52×</td><td>3.46/2.33×</td><td>3.19/2.22×</td></tr><tr><td>EAGLE-2</td><td>4.08/2.36×</td><td>3.76/2.15×</td><td>5.01/2.89×</td><td>4.85/2.78×</td><td>4.62/2.69×</td><td>4.58/2.65×</td><td>4.57/2.65×</td></tr><tr><td>HASS</td><td>4.52/2.59×</td><td>4.12/2.35×</td><td>5.50/3.18×</td><td>5.37/3.07×</td><td>5.03/2.92×</td><td>4.91/2.83×</td><td>5.02/2.90×</td></tr><tr><td>CORAL</td><td>4.56/2.62×</td><td>4.13/2.35×</td><td>5.64/3.26×</td><td>5.40/3.09×</td><td>5.16/3.00×</td><td>5.12/2.95×</td><td>5.12/2.96×</td></tr><tr><td>CORAL w/r.</td><td>4.26/2.74×</td><td>3.88/2.46×</td><td>5.31/3.44×</td><td>5.12/3.28×</td><td>4.80/3.14×</td><td>4.72/3.05×</td><td>4.79/3.11×</td></tr><tr><td rowspan="5">Q2.5-7B</td><td>EAGLE</td><td>2.53/1.56×</td><td>2.25/1.27×</td><td>3.04/1.87×</td><td>2.79/1.58×</td><td>3.32/2.05×</td><td>3.00/1.72×</td><td>2.96/1.83×</td></tr><tr><td>EAGLE-2</td><td>3.91/2.13×</td><td>3.45/1.86×</td><td>4.62/2.53×</td><td>4.36/2.35×</td><td>4.23/2.33×</td><td>4.07/2.21×</td><td>4.25/2.33×</td></tr><tr><td>HASS</td><td>4.15/2.26×</td><td>3.65/1.96×</td><td>4.96/2.71×</td><td>4.74/2.55×</td><td>4.53/2.49×</td><td>4.35/2.35×</td><td>4.55/2.49×</td></tr><tr><td>CORAL</td><td>4.22/2.30×</td><td>3.83/2.05×</td><td>5.09/2.78×</td><td>4.86/2.62×</td><td>4.67/2.57×</td><td>4.50/2.44×</td><td>4.66/2.55×</td></tr><tr><td>CORAL w/r.</td><td>4.02/2.50×</td><td>3.62/2.21×</td><td>4.86/3.05×</td><td>4.57/2.81×</td><td>4.38/2.76×</td><td>4.16/2.58×</td><td>4.42/2.77×</td></tr></table>
230
+
231
+ Table 2: Acceptance lengths $\tau$ and speedup ratio (SR) of different methods on MT-bench, HumanEval, and GSM8K datasets with temperature $T\in \{0,1\}$ . The best results are in bold, and some minor advantages may be obscured due to rounding. We also calculate the average $\tau$ and SR under $T = 0$ for a more direct comparison. L2, L3, Q2.5 represents Llama2-Chat, Llama3-Instruct, and Qwen2.5-Instruct, respectively. As clarified in Section 3.3, we apply LM head router for relatively small LLMs with large vocabularies (denoted as CORAL w/ r.), such as Qwen2.5-7B/14B and Llama3-8B. For Llama2 series and Llama3-70B, we use CSRA only.
232
+
233
+ LLMs with larger vocabularies, whereas the benefits are less significant for earlier models such as Llama2. For LM head router, we set the group number to 16 and choose the top-2 groups for the best performance. Although the router sacrifices some acceptance length, the overall speedup ratio benefits from reduced latency and shows a considerable increase.
234
+
235
+ # 4.2.2 Ablation Study on CSRA
236
+
237
+ We conduct a more detailed comparative analysis with HASS under different training steps. According to HASS, further increases in the number of training steps (i.e., training steps $\geq 5$ ) do not necessarily lead to improvements in acceptance length. Therefore, we focus our comparison on the cases where the number of training steps is set to 2, 3 (default), and 4.
238
+
239
+ ![](images/3f89c882631ebc01875d8fd9737ce1c0337e10b4413ed5c4fcedf12ae2f136b8.jpg)
240
+ Figure 6: Acceptance rates in MT-bench dataset. Here $n - \alpha$ denotes the acceptance rate of the n-th token.
241
+
242
+ ![](images/6f2ec648257fad965709c6723c6abb570843f0fce3cb7be9eb5876c7cefe43e2.jpg)
243
+
244
+ The results summarized in Table 3 demonstrate that CSRA consistently outperforms HASS with the same number of training steps. Furthermore, from the perspective of training cost, CSRA achieves a performance comparable to HASS (step=4) using only 2 training steps, demonstrating that CSRA offers a substantial advantage in
245
+
246
+ <table><tr><td></td><td colspan="2">MT-bench</td><td colspan="2">HumanEval</td><td colspan="2">GSM8K</td><td colspan="2">Average</td></tr><tr><td>step</td><td>HASS</td><td>CSRA</td><td>HASS</td><td>CSRA</td><td>HASS</td><td>CSRA</td><td>HASS</td><td>CSRA</td></tr><tr><td>2</td><td>4.41/2.41×</td><td>4.53/2.48×</td><td>5.24/2.86×</td><td>5.35/2.90×</td><td>4.50/2.47×</td><td>4.60/2.52×</td><td>4.72/2.58×</td><td>4.83/2.63×</td></tr><tr><td>3</td><td>4.48/2.45×</td><td>4.57/2.50×</td><td>5.31/2.89×</td><td>5.43/2.95×</td><td>4.56/2.51×</td><td>4.70/2.58×</td><td>4.78/2.62×</td><td>4.90/2.68×</td></tr><tr><td>4</td><td>4.46/2.44×</td><td>4.58/2.51×</td><td>5.39/2.93×</td><td>5.55/3.00×</td><td>4.58/2.54×</td><td>4.70/2.57×</td><td>4.81/2.64×</td><td>4.94/2.69×</td></tr></table>
247
+
248
+ terms of training efficiency. We also compare the acceptance rates $\alpha$ of HASS and CSRA at different timesteps during inference, as shown in Figure 6. The results show that CSRA generally outperforms HASS at different timesteps.
249
+
250
+ # 4.2.3 Ablation Study on LM Head Router
251
+
252
+ The LM head router has two hyperparameters: the total number of groups $N$ , and the number of top- $n$ groups to activate during inference. A larger group number, although leading to activating fewer parameters, would increase the difficulty of training and damage accuracy. Similarly, how many groups to activate is also a trade-off between speed and accuracy. We perform a grid search over these two hyperparameters in the MT-bench dataset with Llama3-8B, and the results are shown in Table 4.
253
+
254
+ Table 3: Acceptance length and speedup ratio of Llama3-8B under different alignment steps.
255
+
256
+ <table><tr><td colspan="7">CORAL T=0</td></tr><tr><td>N</td><td>top1</td><td>top2</td><td>top3</td><td>top4</td><td>top6</td><td>top8</td></tr><tr><td>N/A</td><td>2.50×</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>4</td><td>2.60×</td><td>2.46×</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>8</td><td>2.62×</td><td>2.61×</td><td>2.54×</td><td>-</td><td>-</td><td>-</td></tr><tr><td>16</td><td>2.53×</td><td>2.63×</td><td>2.60×</td><td>2.57×</td><td>-</td><td>-</td></tr><tr><td>32</td><td>2.41×</td><td>2.59×</td><td>2.60×</td><td>2.61×</td><td>2.56×</td><td>-</td></tr><tr><td>64</td><td>2.33×</td><td>2.51×</td><td>2.55×</td><td>2.57×</td><td>2.57×</td><td>2.53×</td></tr><tr><td colspan="7">EAGLE-2 T=0</td></tr><tr><td>N</td><td>top1</td><td>top2</td><td>top3</td><td>top4</td><td>top6</td><td>top8</td></tr><tr><td>N/A</td><td>2.28×</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>4</td><td>2.44×</td><td>2.29×</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>8</td><td>2.40×</td><td>2.39×</td><td>2.33×</td><td>-</td><td>-</td><td>-</td></tr><tr><td>16</td><td>2.30×</td><td>2.41×</td><td>2.39×</td><td>2.36×</td><td>-</td><td>-</td></tr><tr><td>32</td><td>2.24×</td><td>2.37×</td><td>2.40×</td><td>2.38×</td><td>2.35×</td><td>-</td></tr><tr><td>64</td><td>2.18×</td><td>2.33×</td><td>2.37×</td><td>2.37×</td><td>2.37×</td><td>2.33×</td></tr></table>
257
+
258
+ Table 4: Speedup of Llama3-8B with LM head router on MT-bench dataset. We group the LM head parameters into $N$ groups and selectively activate top- $n$ of them. N/A denotes the results without LM head router.
259
+
260
+ The results show that our method consistently yields significant improvements, regardless of whether multi-step training is employed. For CORAL, dividing the LM head into 16 groups and activating the top-2 groups during inference brings
261
+
262
+ the best speedup performance. Since the optimal setting may vary across different LLMs and cannot be easily estimated, we recommend empirical studies to identify the optimal configuration.
263
+
264
+ Let us discuss the effectiveness of the LM head router from another aspect using Llama3-8B. Since the number of activated LM head groups may vary due to tree decoding, we can estimate the latency of the draft model based on the ratio between acceptance length and speedup. Specifically, according to Table 1, the latency of the draft model is approximately $10\%$ that of the target model. Therefore, ideally (assuming $L_{t}^{\prime} = L_{t}$ in Equation 1), the ratio between acceptance length and speedup should be 1.6, which means that within one drafting-verification cycle, the target model is invoked once while the draft model runs six times. However, in practical scenarios, the latency of the target model increases by approximately $19\%$ (from 26ms to 31ms) when inferring 60 tokens in parallel compared to generating a single token. Taking into account this factor, the actual ratio between acceptance length and speedup will increase to approximately 1.8.
265
+
266
+ Our experiments also confirm this estimation. Without the LM head router, the ratio between acceptance length and speedup is approximately $4.90 / 2.68 \approx 1.83$ . In contrast, when the LM head router is adopted, this ratio decreases to $4.63 / 2.87 \approx 1.61$ . This indicates that the average latency of the draft model is only $(0.6 - 0.22) / 0.6 \approx 63\%$ of its original latency, demonstrating the efficacy of the LM head router.
267
+
268
+ # 5 Related Work
269
+
270
+ There has been a significant amount of work in accelerating LLMs. Some methods focus on reducing the number of parameters or memory access, such as low-bit quantization (Dettmers et al., 2022; Frantar et al., 2023; Xiao et al., 2023; Lin et al., 2024), and model distillation (Gu et al., 2024; Ko et al., 2024; Zhong et al., 2024). Recently, some studies have also explored activating only a subset of model parameters during inference to reduce memory access cost (Du et al., 2022; Fedus et al., 2022).
271
+
272
+ Speculative decoding (Chen et al., 2023; Leviathan et al., 2023) leverages the memory-bound nature of decoder-only LLMs and achieves lossless acceleration using a drafting-verification framework.
273
+
274
+ Research on speculative decoding has primarily focused on two areas: 1) drafter design, 2) verification strategy. For drafter design, Medusa (Cai et al., 2024) attaches multiple heads to the original LLM and predict multiple subsequent tokens one time. Hydra (Ankner et al., 2024) improves Medusa by enhancing correlations between draft heads. Clover (Xiao et al., 2024) introduces an RNN-based draft head. Some methods utilize more information from target model to improve alignment, EAGLE (Li et al., 2024b) combines the output token and last hidden states of target LLMs to resolve the uncertainty in drafter's prediction. GLIDE (Du et al., 2024) reuses the KV cache of target LLMs. For the verification strategy, Hu and Huang (2024); Sun et al. (2024) find that the acceptance length of speculative sampling is not optimal and take into account the probability of subsequent tokens. SpecInfer (Miao et al., 2024) proposes decoding tree for verification. Sequoia (Chen et al., 2024), EAGLE-2 (Li et al., 2024a), and OPT-tree (Wang et al., 2024) adopts a dynamic tree structure.
275
+
276
+ # 6 Conclusion
277
+
278
+ This paper proposes CORAL, an efficient speculative decoding method. We introduce Cross-Step Representation Alignment, which effectively mitigates training-inference misalignment and improves the accuracy of speculation. Additionally, we propose the LM head router, a simple but effective module designed to reduce the latency of the draft model. We compare CORAL with other state-of-the-art methods on various LLMs and datasets, and the results show that CORAL surpasses existing methods, such as EAGLE-2 and HASS, demonstrating the effectiveness of our method.
279
+
280
+ # Limitations
281
+
282
+ There are mainly two limitations in this work. Firstly, the introduction of CSRA loss may lead to a slight increase in regression loss, which results in a decrease in the acceptance length if the draft model is trained with a single step. This issue can be addressed by multi-step training. Secondly, adopting a large vocabulary is a trend in the development of modern LLMs, and our LM head router is specifically designed for LLMs with large vocab
283
+
284
+ ularies. It might not be suitable for models with small vocabularies, as the computational overhead of LM head is limited in the overall wall time of speculative decoding. In this case, the time saved by the draft model cannot compensate for the loss in acceptance length.
285
+
286
+ # Acknowledgments
287
+
288
+ We would like to thank Lenovo Model Factory team for providing computing resources. Special thanks to Xiaoyue Mi from the Institute of Computing Technology, Chinese Academy of Sciences, Penghui Yang from Nanyang Technological University, and Henry Zheng from Tsinghua University for their valuable suggestions during the writing of this paper.
289
+
290
+ # References
291
+
292
+ Zachary Ankner, Rishab Parthasarathy, Aniruddha Nrusimha, Christopher Rinard, Jonathan RaganKelley, and William Brandon. 2024. Hydra: Sequentially-dependent draft heads for medusa decoding. arXiv preprint arXiv:2402.05109.
293
+ 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. In Proceedings of the International Conference on Machine Learning.
294
+ Charlie Chen, Sebastian Borgeaud, Geoffrey Irving, Jean-Baptiste Lespiau, Laurent Sifre, and John Jumper. 2023. Accelerating large language model decoding with speculative sampling. arXiv preprint arXiv:2302.01318.
295
+ Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Pondé de Oliveira Pinto, et al. 2021. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374.
296
+ Zhuoming Chen, Avner May, Ruslan Svirschevski, Yuhsun Huang, Max Ryabinin, Zhihao Jia, and Beidi Chen. 2024. Sequoia: Scalable, robust, and hardware-aware speculative decoding. arXiv preprint arXiv:2402.12374.
297
+ Sumit Chopra, Raia Hadsell, and Yann LeCun. 2005. Learning a similarity metric discriminatively, with application to face verification. In Proceedings of the Conference on Computer Vision and Pattern Recognition.
298
+ 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.
299
+
300
+ Tri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra, and Christopher Ré. 2022. Flashattention: Fast and memory-efficient exact attention with io-awareness. In Advances in Neural Information Processing System.
301
+ Tim Dettmers, Mike Lewis, Younes Belkada, and Luke Zettlemoyer. 2022. LLM.int8(): 8-bit matrix multiplication for transformers at scale.
302
+ Cunxiao Du, Jing Jiang, Yuanchen Xu, Jiawei Wu, Sicheng Yu, Yongqi Li, Shenggui Li, Kai Xu, Liqiang Nie, Zhaopeng Tu, and Yang You. 2024. GliDe with a cape: A low-hassle method to accelerate speculative decoding. In Proceedings of the International Conference on Machine Learning.
303
+ Nan Du, Yanping Huang, Andrew M. Dai, Simon Tong, Dmitry Lepikhin, Yuanzhong Xu, Maxim Krikun, et al. 2022. GLaM: Efficient scaling of language models with mixture-of-experts. In Proceedings of the International Conference on Machine Learning.
304
+ William Fedus, Barret Zoph, and Noam Shazeer. 2022. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. Journal of Machine Learning Research.
305
+ Elias Frantar, Saleh Ashkboos, Torsten Hoefler, and Dan Alistarh. 2023. GPTQ: Accurate post-training quantization for generative pre-trained transformers.
306
+ Aaron Grattafori, Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, et al. 2024. The llama 3 herd of models. arXiv preprint arXiv:2407.21783.
307
+ Yuxian Gu, Li Dong, Furu Wei, and Minlie Huang. 2024. MiniLLM: Knowledge distillation of large language models. In Proceedings of the International Conference on Learning Representations.
308
+ Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, et al. 2022. Training compute-optimal large language models. arXiv preprint arXiv:2203.15556.
309
+ Zhengmian Hu and Heng Huang. 2024. Accelerated speculative sampling based on tree monte carlo. In Proceedings of the International Conference on Machine Learning.
310
+ Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B. Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. 2020. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361.
311
+ Jongwoo Ko, Sungnyun Kim, Tianyi Chen, and Se-Young Yun. 2024. Distillm: Towards streamlined distillation for large language models. In Proceedings of the International Conference on Machine Learning.
312
+ Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur P. Parikh, Chris Alberti,
313
+
314
+ Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, Kristina Toutanova, Llion Jones, Matthew Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. 2019. Natural questions: a benchmark for question answering research. Trans. Assoc. Comput. Linguistics.
315
+ Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph Gonzalez, Hao Zhang, and Ion Stoica. 2023. Efficient memory management for large language model serving with pagedattention. In Proceedings of the 29th Symposium on Operating Systems Principles.
316
+ Yaniv Leviathan, Matan Kalman, and Yossi Matias. 2023. Fast inference from transformers via speculative decoding. In Proceedings of the International Conference on Machine Learning.
317
+ Yuhui Li, Fangyun Wei, Chao Zhang, and Hongyang Zhang. 2024a. EAGLE-2: Faster inference of language models with dynamic draft trees. In Proceedings of the Conference on the Empirical Methods in Natural Language Processing.
318
+ Yuhui Li, Fangyun Wei, Chao Zhang, and Hongyang Zhang. 2024b. EAGLE: Speculative sampling requires rethinking feature uncertainty. In Proceedings of the International Conference on Machine Learning.
319
+ Ji Lin, Jiaming Tang, Haotian Tang, Shang Yang, Wei Ming Chen, Wei-Chen Wang, Guangxuan Xiao, Xingyu Dang, Chuang Gan, and Song Han. 2024. AWQ: activation-aware weight quantization for ondevice LLM compression and acceleration. In Proceedings of the Annual Conference on Machine Learning and Systems.
320
+ Xupeng Miao, Gabriele Oliaro, Zhihao Zhang, Xinhao Cheng, Zeyu Wang, engxin Zhang, Rae Ying Yee Wong, Alan Zhu, Lijie Yang, Xiaoxiang Shi, Chunan Shi, Zhuoming Chen, Daiyaan Arfeen, Reyna Abhyankar, and Zhihao Jia. 2024. SpecInfer: Accelerating large language model serving with tree-based speculative inference and verification. In Proceedings of the ACM International Conference on Architectural Support for Programming Languages and Operating Systems.
321
+ Ramesh Nallapati, Bowen Zhou, Cicero Nogueira dos Santos, Caglar Gulçehre, and Bing Xiang. 2016. Abstractive text summarization using sequence-to-sequence rnns and beyond. In Proceedings of the 20th SIGNLL Conference on Computational Natural Language Learning, CoNLL 2016, Berlin, Germany, August 11-12, 2016.
322
+ OpenAI. 2023. GPT-4 technical report. arXiv preprint arXiv:2303.08774.
323
+ Florian Schroff, Dmitry Kalenichenko, and James Philbin. 2015. FaceNet: A unified embedding for face recognition and clustering. In Proceedings of the Conference on Computer Vision and Pattern Recognition.
324
+
325
+ Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Neural machine translation of rare words with subword units. In Proceedings of the Annual Meeting of the Association for Computational Linguistics.
326
+ Ziteng Sun, Uri Mendlovic, Yaniv Leviathan, Asaf Aharoni, Ahmad Beirami, Jae Hun Ro, and Ananda Theertha Suresh. 2024. Block verification accelerates speculative decoding. arXiv preprint arXiv:2403.10444.
327
+ Chaofan Tao, Qian Liu, Longxu Dou, Niklas Muennighoff, Zhongwei Wan, Ping Luo, Min Lin, and Ngai Wong. 2024. Scaling laws with vocabulary: Larger models deserve larger vocabularies.
328
+ 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.
329
+ Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. 2023a. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971.
330
+ Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, et al. 2023b. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288.
331
+ Aäron van den Oord, Yazhe Li, and Oriol Vinyals. 2018. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748.
332
+ Changhan Wang, Kyunghyun Cho, and Jiatao Gu. 2020. Neural machine translation with byte-level subwords. In Proceedings of the AAAI Conference on Artificial Intelligence.
333
+ Jikai Wang, Yi Su, Juntao Li, Qingrong Xia, Zi Ye, Xinyu Duan, Zhefeng Wang, and Min Zhang. 2024. Opt-tree: Speculative decoding with adaptive draft tree structure. arXiv preprint arXiv:2406.17276.
334
+ Bin Xiao, Chunan Shi, Xiaonan Nie, Fan Yang, Xiangwei Deng, Lei Su, Weipeng Chen, and Bin Cui. 2024. Clover: Regressive lightweight speculative decoding with sequential knowledge. arXiv preprint arXiv:2405.00263.
335
+ Guangxuan Xiao, Ji Lin, Mickaël Seznec, Hao Wu, Julien Demouth, and Song Han. 2023. SmoothQuant: Accurate and efficient post-training quantization for large language models. In Proceedings of the International Conference on Machine Learning.
336
+ An Yang, Baosong Yang, Beichen Zhang, Binyuan Hui, et al. 2024. Qwen2.5 technical report. arXiv preprint arXiv:2412.15115.
337
+
338
+ Lefan Zhang, Xiaodan Wang, Yanhua Huang, and Ruiwen Xu. 2024. Learning harmonized representations for speculative sampling. arXiv preprint arXiv:2408.15766.
339
+ Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric P. Xing, Hao Zhang, Joseph E. Gonzalez, and Ion Stoica. 2023. Judging llm-as-a-judge with mt-bench and chatbot arena. In Advances in Neural Information Processing Systems
340
+ Qihuang Zhong, Liang Ding, Li Shen, Juhua Liu, Bo Du, and Dacheng Tao. 2024. Revisiting knowledge distillation for autoregressive language models. In Proceedings of the Annual Meeting of the Association for Computational Linguistics.
341
+
342
+ # A Hyperparameters in CSRA Loss
343
+
344
+ The temperature of $\mathcal{L}_{CSRA}$ is set to 0.07, consistent with some previous works such as CLIP (Zheng et al., 2023).
345
+
346
+ Then we set $w_{reg}$ to 0.5, half of EAGLE's original setting. The weight of CSRA loss is adjusted according to different target models, making the values of $w_{CSRA}\mathcal{L}_{CSRA}$ and $w_{reg}\mathcal{L}_{reg}$ roughly the same. In this way, the loss imposed on representation is approximately the same as EAGLE/HASS training.
347
+
348
+ Based on the values of $w_{reg} \mathcal{L}_{reg}$ , we choose $w_{CSRA} = 0.2$ for Qwen2.5-7B, $w_{CSRA} = 0.15$ for Llama3-8B, $w_{CSRA} = 0.1$ for Llama3-70B, Qwen2.5-14B and Llama2-7B, and 0.05 for Llama2-13B.
349
+
350
+ # B Training Details
351
+
352
+ We use a fixed dataset of 68,000 examples from ShareGPT as our training set, which is identical to EAGLE and HASS. CORAL requires approximately 2 days to train a 7B draft model under default settings (training step=3, epoch=20). It is worth noting that draft models with large vocabularies such as Llama3 and Qwen2.5 require more GPU memory compared to Llama2, so we use $4 \times$ NVIDIA H20-96G GPUs for training. Training large draft models such as Llama3-70B on A100-40G GPU may result in out-of-memory issues under our experimental settings. We recommend using GPUs with larger memory capacities or choosing other alternatives (e.g., reducing the batch size, model parallelism).
353
+
354
+ # C Single-step Training with CSRA
355
+
356
+ We do not recommend using the CSRA loss in the context of single-step training. Our empirical findings suggest that introducing the CSRA loss may lead to a slight increase in regression loss, likely due to the mismatch between the two optimization objectives. Specifically, the CSRA loss focuses solely on the angular relationships between the output features, without imposing any constraints on the feature norm, whereas the regression loss aims to learn features that are identical to the target. The increase in regression loss may damage the acceptance length. We present the results of CSRA with single-step training in Table 5.
357
+
358
+ <table><tr><td></td><td>MT-bench</td><td>HumanEval</td><td>GSM8K</td></tr><tr><td>EAGLE-2</td><td>4.16</td><td>4.78</td><td>4.21</td></tr><tr><td>CSRA Step1</td><td>4.10</td><td>4.70</td><td>4.10</td></tr></table>
359
+
360
+ A plausible explanation for this phenomenon is that in single-step training, the draft model lacks exposure to subsequent steps, therefore the L1 distance between the prediction and target feature is relatively more critical. In contrast, for multi-step training, the draft model learns to adapt to subsequent steps, making the discriminative power of different representations and the multi-step consistency more crucial.
361
+
362
+ # D Discussion on the discrepancies between different training steps
363
+
364
+ To better illustrate the discrepancies between representations from multiple training steps, we measure the InfoNCE between features from different steps. Please note that absolute distance metrics (such as L1 or cosine distance) are not ideal measurements, as absolute distances fail to represent the distinguishability between different features. In contrast, InfoNCE transforms cosine similarity into a probability distribution, effectively reflecting the relative distances between features, which is more crucial for prediction accuracy. Therefore, InfoNCE serves as a more appropriate metric.
365
+
366
+ We randomly select 100 samples from ShareGPT and evaluate the differences in output features across 4 steps. The following are the InfoNCE between features of different steps for EAGLE-2, HASS, and CSRA. For instance, the first column
367
+
368
+ Table 5: Acceptance length of Llama3-8B EAGLE-2 and CORAL model with single-step training.
369
+
370
+ <table><tr><td>EAGLE-2</td><td>step 0</td><td>step 1</td><td>step 2</td><td>step 3</td></tr><tr><td>step 0</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>step 1</td><td>1.5668</td><td>-</td><td>-</td><td>-</td></tr><tr><td>step 2</td><td>1.8415</td><td>1.4843</td><td>-</td><td>-</td></tr><tr><td>step 3</td><td>2.0391</td><td>1.6559</td><td>1.4876</td><td>-</td></tr><tr><td>HASS</td><td>step 0</td><td>step 1</td><td>step 2</td><td>step 3</td></tr><tr><td>step 0</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>step 1</td><td>1.4577</td><td>-</td><td>-</td><td>-</td></tr><tr><td>step 2</td><td>1.6117</td><td>1.3816</td><td>-</td><td>-</td></tr><tr><td>step 3</td><td>1.7290</td><td>1.4876</td><td>1.3924</td><td>-</td></tr><tr><td>CSRA</td><td>step 0</td><td>step 1</td><td>step 2</td><td>step 3</td></tr><tr><td>step 0</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>step 1</td><td>0.9545</td><td>-</td><td>-</td><td>-</td></tr><tr><td>step 2</td><td>1.1044</td><td>0.8395</td><td>-</td><td>-</td></tr><tr><td>step 3</td><td>1.2179</td><td>0.9381</td><td>0.8173</td><td>-</td></tr></table>
371
+
372
+ Table 6: InfoNCE between features from different training steps. The temperature is set to 0.07, which is aligned with our setting in CSRA training.
373
+
374
+ represents the InfoNCE between the output features of step 1 and step 2 to 4. Clearly, the differences in features between steps increase gradually as the number of steps grows. Since HASS employs multi-step training, the differences between steps are smaller compared to EAGLE-2. Moreover, our method significantly reduces the discrepancies between different steps, achieves higher similarity between positive features and enhances the discriminative power of negative features, ensuring relatively consistent performance across all steps during inference.
375
+
376
+ # E Discussion on System Prompt
377
+
378
+ EAGLE utilizes the system prompt from the official Llama2-chat example:
379
+
380
+ sys_p1 = You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.\n\nIf a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.\n
381
+
382
+ The same system prompt is also used in Llama3 drafter training. However, it appears that Llama3
383
+
384
+ <table><tr><td>Train</td><td>Test</td><td>MT-bench</td><td>HumanEval</td><td>GSM8K</td></tr><tr><td rowspan="2">sys_p2</td><td>sys_p2</td><td>4.16</td><td>4.78</td><td>4.21</td></tr><tr><td>sys_p1</td><td>4.11(-0.05)</td><td>4.73(-0.05)</td><td>4.27(+0.06)</td></tr><tr><td rowspan="2">sys_p1</td><td>sys_p1</td><td>4.18</td><td>4.78</td><td>4.38</td></tr><tr><td>sys_p2</td><td>3.87(-0.31)</td><td>4.17(-0.61)</td><td>3.93(-0.45)</td></tr><tr><td rowspan="2">open source (sys_p1)</td><td>sys_p1</td><td>4.24</td><td>4.92</td><td>4.34</td></tr><tr><td>sys_p2</td><td>3.94(-0.30)</td><td>4.67(-0.25)</td><td>3.91(-0.43)</td></tr></table>
385
+
386
+ Table 7: Acceptance lengths of EAGLE-2 for Llama3-8B-Instruct with different system prompts.
387
+
388
+ does not have a default system prompt. Nevertheless, we find the system prompt in the official Llama3.3 example<sup>5</sup> is simpler and also widely adopted:
389
+
390
+ # sys_p2 = You are a helpful assistant
391
+
392
+ The system prompt has a certain impact on the acceptance length and speedup ratio. To investigate this, we compared the open-source Llama3-8B-Instruct draft model in EAGLE official repository (trained with sys_p1) and draft models trained by ourselves using sys_p1 and sys_p2. Our results in Table 7 show that switching between different system prompts might lead to a decrease in speedup and acceptance length on the MT-Bench and Humaneval datasets, while GSM8K is an exception.
393
+
394
+ Upon closer inspection of the GSM8K results, we find that when using sys_p1, most responses start with a sentence similar to "Let's break this down step by step", whereas when using sys_p2, the beginning if outputs will be more diverse. This suggests that the speedup ratio using sys_p1 might be artificially inflated in some cases.
395
+
396
+ Furthermore, since longer system prompts provide the draft model with more context, we suppose that detailed prompts and increased information could potentially improve the performance of draft model when the system prompt of training and inference is aligned. However, when the system prompts are not consistent, training the model with a more detailed system prompt may lead to greater performance degradation.
397
+
398
+ To obtain a more generalizable draft model, we use sys_p2 in all experiments with Llama3-Instruct 8B/70B. We believe a more general and simple system prompt would reflect the draft model's true capabilities more accurately.
399
+
400
+ # F Discussion on LM Head Router
401
+
402
+ In this section, we will discuss some issues of LM head router.
403
+
404
+ Tree decoding. In tree decoding, each timestep contains multiple candidate tokens. Since each candidate requires a different set of LM head groups, we need to activate all the involved groups, which may bring additional latency. In some cases, we even need to activate the entire LM head parameters (e.g., if we take the top two groups and top 10 candidates, the worst-case scenario might require activating 20 groups).
405
+
406
+ This issue can be addressed through appropriate grouping strategies. First, dividing the tokens into more groups helps alleviate the problem. For instance, with a total of 32 groups, selecting the top 10 candidates from the top 2 groups ensures that the LM head parameters are not fully activated, even in the worst-case scenario. Second, modern LLMs utilize BPE (Sennrich et al., 2016) or BBPE (Wang et al., 2020) for tokenization, where higher-frequency tokens tend to be concentrated in groups with smaller indices. As a result, such an extreme scenario is unlikely to occur in practice.
407
+
408
+ Two-stage training. There are mainly two reasons for adopting two-stage training. Firstly, the two-stage training strategy ensures that the router serves as a plug-and-play module, without affecting the standalone usage of the first-stage model, thereby providing greater flexibility. Secondly, since the number of groups is a hyperparameter that may require multiple experiments to determine the optimal setting, two-stage training allows us to store the output of draft model and train the router only, making it easier for parameter tuning.
409
+
410
+ Backends. Although many researches on speculative decoding measure the speedup ratio on PyTorch, we do not consider PyTorch to be a good backend. For example, as shown in Table 2, the FP16 latency of Llama3-8B-draft head on RTX A6000 GPU is $1.51\mathrm{ms}$ , which is close to the the
411
+
412
+ <table><tr><td rowspan="2">model</td><td rowspan="2">method</td><td colspan="2">Alpaca</td><td colspan="2">Natural Q.</td><td colspan="2">CNN/DM</td></tr><tr><td>τ</td><td>SR</td><td>τ</td><td>SR</td><td>τ</td><td>SR</td></tr><tr><td rowspan="3">L2-7B</td><td>EAGLE-2</td><td>4.51</td><td>2.88×</td><td>4.10</td><td>2.61×</td><td>4.12</td><td>2.40×</td></tr><tr><td>HASS</td><td>4.87</td><td>3.11×</td><td>4.41</td><td>2.80×</td><td>4.44</td><td>2.57×</td></tr><tr><td>CORAL</td><td>4.96</td><td>3.15×</td><td>4.44</td><td>2.84×</td><td>4.54</td><td>2.62×</td></tr><tr><td rowspan="4">L3-8B</td><td>EAGLE-2</td><td>4.33</td><td>2.39×</td><td>3.37</td><td>1.86×</td><td>3.82</td><td>1.98×</td></tr><tr><td>HASS</td><td>4.77</td><td>2.56×</td><td>3.59</td><td>1.98×</td><td>4.06</td><td>2.16×</td></tr><tr><td>CORAL</td><td>4.79</td><td>2.58×</td><td>3.63</td><td>2.00×</td><td>4.16</td><td>2.20×</td></tr><tr><td>CORAL w/ r.</td><td>4.49</td><td>2.74×</td><td>3.28</td><td>2.06×</td><td>3.61</td><td>2.16×</td></tr><tr><td rowspan="4">Q2.5-7B</td><td>EAGLE-2</td><td>3.93</td><td>2.17×</td><td>3.13</td><td>1.73×</td><td>3.33</td><td>1.78×</td></tr><tr><td>HASS</td><td>4.19</td><td>2.31×</td><td>3.30</td><td>1.82×</td><td>3.57</td><td>1.90×</td></tr><tr><td>CORAL</td><td>4.29</td><td>2.35×</td><td>3.38</td><td>1.86×</td><td>3.72</td><td>1.97×</td></tr><tr><td>CORAL w/ r.</td><td>4.11</td><td>2.60×</td><td>3.15</td><td>1.99×</td><td>3.28</td><td>1.99×</td></tr></table>
413
+
414
+ oretical time of $1.3\mathrm{ms}$ (1002M memory access with 768GB/s bandwidth). However, for other parts, which mainly consists of transformer, the actual time is much higher than the theoretical time (1.07ms vs 0.63ms), achieving only about $60\%$ of the theoretical performance.
415
+
416
+ This is a problem inherent to PyTorch. For instance, in Qwen2 speed benchmark<sup>6</sup>, the inference speed of 7B model on A100 80G GPU is only 38 token/s (i.e., 26ms-token), which is far from the theoretical time of about 7ms (estimated by 14G memory access with 2TB/s bandwidth). This problem can be mitigated by using a more optimized backend, such as vLLM (Kwon et al., 2023).
417
+
418
+ Therefore, the performance of the LM head router may be affected by the hardware and backend conditions. In a well-optimized backend, the router's performance will be better than reported in this paper, as the latency of the LM head will occupy a larger proportion in the draft model.
419
+
420
+ Small vocabulary and super large LLMs. Let's take Llama3-70B on MT-bench as an example. In our experiments on CORAL, the time consumption of the target/draft model is 4105s/561s, meaning that the draft model accounts for only $12\%$ of the entire drafting-verification cycle (for Llama3-8B, this figure is approximately $33\%$ ). Although the LM head of the draft model still constitutes a significant portion of the drafting latency, its overall contribution to the entire cycle is only $5 - 6\%$ (while for Llama3-8B, it is nearly $20\%$ ). If a router is used, the time consumption of the target/draft model be
421
+
422
+ comes $4477\mathrm{s} / 440\mathrm{s}$ , resulting in only a $3\%$ reduction in the entire cycle. However, the acceptance length decreases from 4.23 to 3.93, a drop of $9.3\%$ , and the speedup decreases from $2.79 \times$ to $2.69 \times$ .
423
+
424
+ A similar conclusion applies to Llama2-7B. Since the latency of the LM head does not constitute a large part of the total latency, using a router on Llama2 is not a good choice.
425
+
426
+ # G Additional Experiments
427
+
428
+ Here we present some additional experimental results on Alpaca (Taori et al., 2023), Natural Questions (Kwiatkowski et al., 2019) and CNN/DM (Nallapati et al., 2016) datasets.
429
+
430
+ # H Licenses of Artifacts
431
+
432
+ We present the licenses of artifacts related to this paper in table 9.
433
+
434
+ Table 8: Additional results on Alpaca, Natural Questions and CNN/DM dataset. We provide the results on Llama2-7B-chat, Llama3-8B-Instruct and Qwen2.5-7B-Instruct. The temperature is set to 0.
435
+
436
+ <table><tr><td rowspan="3">models</td><td>Llama3</td><td>llama3 license</td></tr><tr><td>Llama2</td><td>llama2 license</td></tr><tr><td>Qwen2.5</td><td>apache-2.0</td></tr><tr><td rowspan="7">datasets</td><td>ShareGPT</td><td>apache-2.0</td></tr><tr><td>MT-bench</td><td>CC-BY-4.0</td></tr><tr><td>HumanEval</td><td>MIT</td></tr><tr><td>GSM8K</td><td>MIT</td></tr><tr><td>Alpaca</td><td>CC-BY-NC-4.0</td></tr><tr><td>Natural Questions</td><td>apache-2.0</td></tr><tr><td>CNN/DM</td><td>apache-2.0</td></tr><tr><td rowspan="2">codes</td><td>EAGLE/EAGLE2</td><td>apache-2.0</td></tr><tr><td>HASS</td><td>not provided</td></tr></table>
437
+
438
+ Table 9: Licenses of artifacts
2025/CORAL_ Learning Consistent Representations across Multi-step Training with Lighter Speculative Drafter/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c4a00b70fec2669b040a3e311ce635b4711556e2f00d9605fe2c652723759ba7
3
+ size 852457
2025/CORAL_ Learning Consistent Representations across Multi-step Training with Lighter Speculative Drafter/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/CORDIAL_ Can Multimodal Large Language Models Effectively Understand Coherence Relationships_/475b6b13-7e46-4586-a8fa-36edeef9226c_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/CORDIAL_ Can Multimodal Large Language Models Effectively Understand Coherence Relationships_/475b6b13-7e46-4586-a8fa-36edeef9226c_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/CORDIAL_ Can Multimodal Large Language Models Effectively Understand Coherence Relationships_/475b6b13-7e46-4586-a8fa-36edeef9226c_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:af7636ba6b93eb869a18c666f67111f9fd0e323926bd31dca09f04e2f8dd77bf
3
+ size 5791259
2025/CORDIAL_ Can Multimodal Large Language Models Effectively Understand Coherence Relationships_/full.md ADDED
@@ -0,0 +1,609 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CORDIAL: Can Multimodal Large Language Models Effectively Understand Coherence Relationships?
2
+
3
+ Aashish Anantha Ramakrishnan, Aadarsh Anantha Ramakrishnan, Dongwon Lee
4
+
5
+ The Pennsylvania State University, National Institute of Technology, Tiruchirappalli {aza6352, dul13}@psu.edu , 106121001@nitt.edu
6
+
7
+ # Abstract
8
+
9
+ Multimodal Large Language Models (MLLMs) are renowned for their superior instruction-following and reasoning capabilities across diverse problem domains. However, existing benchmarks primarily focus on assessing factual and logical correctness in downstream tasks, with limited emphasis on evaluating MLLMs' ability to interpret pragmatic cues and intermodal relationships. To address this gap, we assess the competency of MLLMs in performing Multimodal Discourse Analysis (MDA) using Coherence Relations. Our benchmark, CORDIAL, encompasses a broad spectrum of Coherence Relations across 3 different discourse domains at varying levels of granularity. Through our experiments on $10+$ MLLMs employing different prompting strategies, we show that even top models like Gemini 1.5 Pro and GPT-4o fail to match the performance of simple classifier-based baselines. This study emphasizes the need to move beyond similarity-based metrics and adopt a discourse-driven framework for evaluating MLLMs, providing a more nuanced assessment of their capabilities. The benchmark and code are available at: https://aashish2000.github.io/CORDIAL/.
10
+
11
+ # 1 Introduction
12
+
13
+ The recent advancements in Multimodal Large Language Models (MLLMs) enable them to effectively capture diverse representations of problem domains (Alayrac et al., 2022; Chen et al., 2024c; Pichai, 2024; Liu et al., 2024a). These MLLMs are capable of adapting to various downstream tasks with limited data through Parameter-Efficient Fine-Tuning (PEFT) (Hu et al., 2021) and In-Context Learning (ICL) (Brown et al., 2020) approaches. Existing Vision-based MLLM benchmarks assess different aspects of model performance such as Perception, Cognition, and Reasoning (Li et al., 2024) through various downstream tasks.
14
+
15
+ Current benchmark design strategies often focus
16
+
17
+ on evaluating the ability of MLLMs to utilize the intersection of input sources to solve a common problem (Kruk et al., 2019). Although this helps assess the model's ability to interpret its inputs factually and logically, it does not fully capture the model's understanding of the relationships between these modalities. Similarly, benchmarks that evaluate the alignment between images and text (Thrush et al., 2022), utilize curated or synthetically generated image-text pairs. These methods focus solely on literal relations that measure the level of overlap between the image and text. On the other hand, pragmatic cues provide information on non-literal relations where the true intent/message of an example may not be directly referenced in both modalities as shown in Figure 1. These cues are leveraged routinely in real-world multimodal discourses, which are characterized by the use of multiple modes of communication to convey different components of a message. Multimodal Discourse Analysis (MDA) studies how the interaction between these different modes can create semiotic meaning (Kress, 2009).
18
+
19
+ To operationalize the assessment of these intermodal relationships, we turn to theories of Discourse Coherence (Hobbs, 1978), which offer a way to quantify the organization and flow of ideas across information sources. From these theories, we focus on the concept of Coherence Relations (Alikhani and Stone, 2019), which provides a finite structure to link different parts of a discourse. Recent studies have extended these traditionally text-only theories to multimodal discourses, showing that Coherence Relations can be effectively applied to image-text pairs (Alikhani et al., 2020). With Coherence Relations being a fundamental aspect of human communication, we evaluate whether MLLMs can effectively predict and verify these relations.
20
+
21
+ In this work, we propose the CORDIAL (COherence Relations in Discourse for Images
22
+
23
+ ![](images/3b47a210478331774ec1bee990d146e225c1ee9d9912bd38681480cbc867c786.jpg)
24
+ Figure 1: CORDIAL presents a combination of literal and pragmatic relations for analyzing the intermodal reasoning capabilities of MLLMs. We evaluate MLLMs on the task of Multimodal Discourse Analysis through the prediction and verification of Coherence Relations across three different discourse domains.
25
+
26
+ And Language), the first benchmark for evaluating MLLMs on the task of MDA. CORDIAL consists of a diverse set of Coherence Relations across three different discourse domains: Disaster Management, Social Media, and Online Articles. Each domain also offers different levels of complexity in the evaluated Coherence Relations, from binary relations to more challenging settings such as multi-class and multi-label relations assigned by human annotators. We evaluate the performance of $10+$ MLLMs on CORDIAL, focusing on three research questions:
27
+
28
+ # RQ1: Can MLLMs predict Coherence Relations effectively?
29
+
30
+ # RQ2: Can MLLMs verify Coherence Relations accurately?
31
+
32
+ # RQ3: Can we teach MLLMs to understand Coherence Relations better?
33
+
34
+ Our analysis reveals that both Coherence Relation prediction (RQ1) and verification (RQ2) are challenging tasks for MLLMs when these relations focus on pragmatic cues. Although larger MLLMs perform better than their smaller, open-source counterparts, traditional classifier baselines consistently outperform them across discourse domains. To summarize, our key takeaways are as follows:
35
+
36
+ - We propose CORDIAL, the first benchmark for evaluating MLLMs for Multi-modal Discourse Analysis (MDA) using Coherence Relations.
37
+ - Our experiments show that MLLMs struggle to predict and verify Coherence Relations, especially when these relations are more pragmatic.
38
+
39
+ - We demonstrate the need for coherence-aware fine-tuning approaches to improve intermodal reasoning capabilities of MLLMs.
40
+
41
+ # 2 Related Work
42
+
43
+ Multimodal Large Language Models MLLMs are fundamentally generative models that combine Large Language Models (LLM) (Brown et al., 2020) with multimodal encoders (Dosovitskiy et al., 2021). In recent years, several new MLLMs have been released, based on various proprietary (OpenAI et al., 2024; Anthropic; Pichai, 2024) and open-source LLM backbones (Liu et al., 2023; Wu et al., 2024; Bai et al., 2023). These models have shown impressive performance on a variety of downstream reasoning tasks, including Visual Question Answering (Wu and Xie, 2024), Document Analysis (Lv et al., 2023), Embodied AI agents (Shek et al., 2024), etc.
44
+
45
+ MLLM Reasoning Benchmarks Recent works that have proposed benchmarks evaluating vision language reasoning, focus on assessing different facets of their input modalities. Visual Reasoning benchmarks measure the capability of these models to understand spatial and object-level relations among image components (Kamath et al., 2023; Rajabi and Kosecka, 2024; Nie et al., 2024; Thrush et al., 2022; Kamoi et al., 2024). Contextual Reasoning benchmarks demonstrate how MLLMs interpret in-context examples and compositional language prompts (Zong et al., 2024; Wu and Xie,
46
+
47
+ ![](images/ce0b7ba07b6aaf00bd09b6492009afa2e16d0148208e2f74862f2216d64264a5.jpg)
48
+ Table 1: Examples from each dataset for all Coherence Relations. The words in red are important cues present in the caption, while the words in orange show pragmatic cues inferred from the image-text pair. The relations highlighted in blue are the selected relations for CLUE Single-Label.
49
+
50
+ 2024; Shao et al., 2024; Zeng et al., 2024). Finally, Knowledge-based reasoning assesses how models recall knowledge from intrinsic and extrinsic sources to answer factual and logical questions (Johnson et al., 2016; Xenos et al., 2023; Lu et al., 2022). Although these benchmarks measure how multimodal prompts can be efficiently understood to solve a candidate task, intermodal reasoning with real-world discourses has been less studied.
51
+
52
+ Image-Text Relationships Quantifying image-text relationships accurately has been an active area of research in the era of Vision Language Models (VLMs). Traditional VLMs translate images and text into a common representation space and compute the degree of similarity based on the distance between these embeddings (Radford et al., 2021; Jia et al., 2021; Caron et al., 2021; Hessel et al., 2021). However, these methods failed to capture human preferences in image-text matching accurately across different task domain benchmarks (Anantha Ramakrishnan et al., 2024b; Ross et al., 2024; Anantha Ramakrishnan et al., 2024a). To include human feedback in the process of predict
53
+
54
+ ing similarity scores, content-based models trained on human-annotated similarity scores were introduced (Wu et al., 2023; Kirstain et al., 2023; Xu et al., 2023). Apart from similarity scores, taxonomies have been proposed to quantify different types of linkages between image-text pairs (Marsh and White, 2003; Vempala and Preoticiuc-Pietro, 2019; Kruk et al., 2019; Bateman, 2014). In particular, multimodal coherence relations have been shown to sufficiently capture different aspects of image-text intents for various vision-language tasks (Alikhani et al., 2019; Inan et al., 2021; Alikhani et al., 2023, 2020; Xu et al., 2022).
55
+
56
+ # 3 The CORDIAL Benchmark
57
+
58
+ # 3.1 Motivation
59
+
60
+ With Coherence Relations providing a finite representation of image-text linkages, we aim to measure MLLM performance through relation classification and verification tasks. Traditional alignment benchmarks often evaluate models using similarity scores. But multiple states of alignment between image-text pairs can exist, at the object-level,
61
+
62
+ ![](images/868f375352ff26067f68717ab2a6bdfd5c96d2333dc483a8bc14fd5a74df5141.jpg)
63
+ Figure 2: An overview of the Image-Text label (i.e., Coherence Relations) distributions across CORDIAL
64
+
65
+ ![](images/13dcc797989aaceaa431eb81ea9616398240cc422c611aee29d99a1b0723e1d7.jpg)
66
+
67
+ ![](images/411756ca94a6a121f5121b20d73032e13ac5dc39b9eb0a6c8ea7b4766c19e189.jpg)
68
+
69
+ scene-level, or even at the discourse-level (Xu et al., 2022). A pragmatic understanding of the context surrounding these pairs informs our ability to describe this alignment accurately. Thus, similarity scores alone may not be sufficient to capture the true performance of MLLMs. Additionally, with Coherence Relations being context-driven, the type of relations present in a discourse can vary across different domains. This necessitates the evaluation of MLLMs on multiple real-world discourse domains to assess their generalization capabilities. With MLLMs-as-a-judge (Chen et al., 2024a) becoming more popular in tasks where acquiring human judgment is expensive and time-consuming, the importance of this task is further highlighted. We carefully pick and curate real-world image-text pairs with expert human annotations with the preprocessing details described in Appendix Section A. The three different discourse domains we evaluate are: Disaster Management, Social Media, and Online Articles.
70
+
71
+ # 3.2 Coherence Relations
72
+
73
+ Each dataset we include in CORDIAL assesses a unique set of Coherence Relations. To understand how communication in a discourse can be quantified by Coherence Relations, we turn to the Theory of Coherence (Hobbs, 1978). We define communication as the transfer of information and ideas from a speaker to a listener. For successful communication, a discourse needs to satisfy 4 conditions: (1) The message contents should be present in the discourse (2) The message must be relevant to the overall context of the discourse (3) Any new/unpredictable attributes of the message must build on the listener's existing world knowledge (4) The speaker must provide cues to guide the listener to graph their intended meaning. The goal of defining Coherence Relations is to serve any of the above-mentioned communicative func
74
+
75
+ tions. This way, for tasks such as MDA, we can analyze the communicative patterns present in a multimodal discourse. We consider Coherence Relations to be a constrained set of connections that describe the structural and causal relationships between different parts of a discourse. Consider the examples from Table 1, certain relations such as Visible and Concretization deal with presenting the same message content across modalities. On the other hand, relations such as Insertion and Extension require the reader to understand the union of information along with the context surrounding each modality to get the full message.
76
+
77
+ # 3.3 Data Sources
78
+
79
+ To construct our benchmark, we leverage existing datasets that provide image-text pairs along with human-annotated Coherence Relations across different discourse domains. We select three datasets that offer a diverse set of Coherence Relations: DisRel (Disaster Management), Tweet Subtitles (Social Media), and CLUE (Online Articles).
80
+
81
+ DisRel This dataset (Sosea et al., 2021) explores the relationship of image-text pairs from disaster-related tweets, with labels collected through crowdsourcing on Amazon MTurk. The dataset contains 4600 multimodal tweets with a test set size of 500 examples with a $50\%$ split between the two classes:
82
+
83
+ - Similar: The image and text share the same focus and attempt to convey the same message. There exists a significant overlap in the information conveyed between modalities.
84
+ - Complementary: The image and text do not share the same focus, but one modality helps understand the other better. Both modalities provide independent information which when combined, provide a more complete picture of the
85
+
86
+ message/event. There may be divergence in the information conveyed between modalities.
87
+
88
+ Tweet Subtitles To measure cross-modal coherence relations between image and text, this dataset (Xu et al., 2022) contains 16000 image-text pairs sourced from Twitter on open-domain topics. The test set for this dataset consists of 1600 examples, which is $10\%$ of the entire dataset. The dataset provides single-label annotations from expert annotators on 3 entity-level and 2 scene-level relations:
89
+
90
+ - Insertion (Entity-level): Both the text and the image focus on the same visual entity but it is not explicitly mentioned in the text.
91
+ - Concretization (Entity-level): Both the text and image contain a mention of the main visual entity but may differ in types of details shared.
92
+ - Projection (Entity-level): The main entity mentioned in the text is implicitly related to the visual objects present in the image. The image contains a reference to objects related to the main entity rather than the entity itself.
93
+ - Restatement (Scene-level): The text directly describes the image contents. Both modalities convey the same message.
94
+ - Extension (Scene-level): The image expands upon the story or idea in the text, presenting new elements or elaborations, effectively filling in narrative gaps left by the text.
95
+
96
+ CLUE This dataset presents a novel conceptualization of image-text relations by extending text-only coherence relations to the multimodal setting (Alikhani et al., 2020). The publicly available version of the dataset contains 4770 imagedtext pairs sourced from the Conceptual Captions Dataset (Sharma et al., 2018). The samples were provided multi-label annotations by expert annotators for 5 different relationship types:
97
+
98
+ - **Visible:** The text presents information that is intended to recognizably characterize what is depicted in the image.
99
+ - Action: The text describes an extended, dynamic process in which the moment captured in the image is a representative snapshot.
100
+ - **Meta:** The text allows the reader to draw inferences not just about the scene depicted in the image but about the production and presentation of the image itself.
101
+
102
+ - Subjective: The text provides information about the speaker's reaction to, or evaluation of, what is depicted in the image.
103
+ - Story: The text provides a freestanding description of the circumstances depicted in the image, analogous to including instructional, explanatory, and other background relations.
104
+
105
+ We evaluate this dataset in two different settings: Multi-Label (ML) and Single-Label (SL). In the ML setting, we treat the dataset as a multi-label classification task where MLLMs predict all applicable labels. For CLUE SL, we follow the original dataset's label mapping strategy to select the most applicable label from the present annotations for each sample (Alikhani et al., 2020). This provides two different settings for evaluating MLLM's understanding of coherence relations on the same image-text pairs with 1183 examples in the test set.
106
+
107
+ # 3.4 Baseline Classifier
108
+
109
+ Our goal of including a baseline classifier is to capture the existing signal in our datasets and to provide a reference point for MLLM performance. Understanding that human annotations can be noisy, we utilize this simple, generalizable classifier to identify relations where MLLMs are particularly under-performing on our benchmark. We employ CLIP Text and Image encoders to extract multimodal embeddings in a zero-shot manner (Radford et al., 2021). We then train a Multi-Layer Perceptron (MLP) classifier using these embeddings on the train sets of each of these datasets to predict Coherence Relations. This ensures that our classifier is not biased towards any specific domain and can generalize across different discourse contexts. More details about the classifier are present in Appendix Section F.
110
+
111
+ # 4 Experiments
112
+
113
+ To answer our research questions, we conduct experiments on the CORDIAL benchmark with top open-source and proprietary MLLMs. For (RQ1), we evaluate the performance of 12 MLLMs from 9 different model families across our benchmark along with a classifier baseline. The 4 settings in our benchmark are structured with increasing difficulty, with DisRel and Tweet Subtitles being the simpler settings while CLUE Single-Label (SL) and CLUE Multi-Label (ML) are more complex. To answer (RQ2), we pick a selection of MLLMs
114
+
115
+ ![](images/5ef9cc81324006025a67999376a8ff6c417fba5d7726e9567d6fbe777a2d2ea3.jpg)
116
+ Figure 3: % Loss/Gain after fine-tuning Llama 3.2-V. Fine-tuning shows significant performance gains, either on zero-shot or few-shot prompts across all 4 settings
117
+
118
+ and investigate their ability to verify coherence relations as correct or incorrect when provided along with image-text pairs. This provides a measure of the model's grasp of concepts such as discourse coherence and intermodal reasoning. For understanding (RQ3), we evaluate the effectiveness of different prompting strategies in enabling these MLLMs to discern coherence relations. We also fine-tune an MLLM on our benchmark to see if it can enhance its intermodal reasoning capability.
119
+
120
+ # 4.1 Models Evaluated
121
+
122
+ We evaluate 4 proprietary MLLMs: GPT-4o (OpenAI et al., 2024), Gemini 1.5 Flash (Pichai, 2024), Gemini 1.5 Pro (Pichai, 2024), and Claude 3.5 Sonnet v2 (Anthropic) and 8 open-source MLLMs: LLaVA 1.6 (7B, 13B, 34B) (Liu et al., 2024b), LLaVA OneVision 7B (Li et al., 2025), Qwen2-VL-7B (Wang et al., 2024), Llama 3.2 11B Instruct (Meta AI), Phi3.5 Vision Instruct (Abdin et al., 2024), and InternVL 2.5 26B (Chen et al., 2024b). We selected these model families as they demonstrated acceptable prompt adherence as described in Appendix Sections B, C. We also include a pre-trained classifier fine-tuned for the task of coherence relation prediction. We selected GPT-4o, Gemini 1.5 Pro, and Claude 3.5 Sonnet v2 as they were among the better-performing MLLMs on our benchmark for verification, with more details provided in Appendix Section D.
123
+
124
+ # 4.2 Evaluation Metrics
125
+
126
+ On the task of coherence relation prediction, we report the per-class F1 score and overall F1 score
127
+
128
+ <table><tr><td>Model</td><td>Prompt</td><td>Sim</td><td>Compl</td><td>Macro F1</td></tr><tr><td>Random Guess</td><td>Baseline</td><td>0.490</td><td>0.478</td><td>0.484</td></tr><tr><td rowspan="2">LLaVA 1.6 7B</td><td>Zero</td><td>0.253</td><td>0.541</td><td>0.397</td></tr><tr><td>CoT</td><td>0.544</td><td>0.489</td><td>0.516 ↑30.0%</td></tr><tr><td rowspan="2">LLaVA 1.6 13B</td><td>Zero</td><td>0.666</td><td>0.000</td><td>0.333</td></tr><tr><td>CoT</td><td>0.408</td><td>0.675</td><td>0.542 ↑62.8%</td></tr><tr><td rowspan="3">LLaVA 1.6 34B</td><td>Zero</td><td>0.000</td><td>0.666</td><td>0.333</td></tr><tr><td>Few</td><td>0.139</td><td>0.679</td><td>0.409 ↑22.8%</td></tr><tr><td>CoT</td><td>0.353</td><td>0.571</td><td>0.462 ↑38.7%</td></tr><tr><td rowspan="3">LLaVA OneVision 7B</td><td>Zero</td><td>0.626</td><td>0.391</td><td>0.509</td></tr><tr><td>Few</td><td>0.549</td><td>0.541</td><td>0.545 ↑7.1%</td></tr><tr><td>CoT</td><td>0.549</td><td>0.601</td><td>0.575 ↑13.0%</td></tr><tr><td rowspan="3">Qwen2-VL 7B</td><td>Zero</td><td>0.654</td><td>0.268</td><td>0.461</td></tr><tr><td>Few</td><td>0.664</td><td>0.148</td><td>0.406 ↓11.9%</td></tr><tr><td>CoT</td><td>0.446</td><td>0.602</td><td>0.524 ↑13.7%</td></tr><tr><td rowspan="3">Llama 3.2 Vision 11B</td><td>Zero</td><td>0.388</td><td>0.635</td><td>0.512</td></tr><tr><td>Few</td><td>0.509</td><td>0.479</td><td>0.494 ↓3.5%</td></tr><tr><td>CoT</td><td>0.292</td><td>0.615</td><td>0.453 ↓11.5%</td></tr><tr><td rowspan="3">Phi3.5 Vision 4.2B</td><td>Zero</td><td>0.655</td><td>0.177</td><td>0.416</td></tr><tr><td>Few</td><td>0.409</td><td>0.662</td><td>0.536 ↑28.8%</td></tr><tr><td>CoT</td><td>0.549</td><td>0.601</td><td>0.575 ↑38.2%</td></tr><tr><td rowspan="3">InternVL 2.5 26B</td><td>Zero</td><td>0.618</td><td>0.698</td><td>0.658</td></tr><tr><td>Few</td><td>0.633</td><td>0.633</td><td>0.633 ↓3.8%</td></tr><tr><td>CoT</td><td>0.393</td><td>0.670</td><td>0.531 ↓19.3%</td></tr><tr><td rowspan="3">GPT-4o</td><td>Zero</td><td>0.025</td><td>0.667</td><td>0.346</td></tr><tr><td>Few</td><td>0.443</td><td>0.667</td><td>0.555 ↑60.4%</td></tr><tr><td>CoT</td><td>0.361</td><td>0.676</td><td>0.519 ↑50.0%</td></tr><tr><td rowspan="3">Gemini 1.5 Flash</td><td>Zero</td><td>0.714</td><td>0.715</td><td>0.715</td></tr><tr><td>Few</td><td>0.363</td><td>0.688</td><td>0.525 ↓26.6%</td></tr><tr><td>CoT</td><td>0.593</td><td>0.699</td><td>0.646 ↓9.7%</td></tr><tr><td rowspan="3">Gemini 1.5 Pro</td><td>Zero</td><td>0.719</td><td>0.679</td><td>0.699</td></tr><tr><td>Few</td><td>0.611</td><td>0.727</td><td>0.669 ↓4.3%</td></tr><tr><td>CoT</td><td>0.630</td><td>0.717</td><td>0.673 ↓3.7%</td></tr><tr><td rowspan="3">Claude 3.5 Sonnet v2</td><td>Zero</td><td>0.722</td><td>0.615</td><td>0.669</td></tr><tr><td>Few</td><td>0.710</td><td>0.559</td><td>0.634 ↓5.2%</td></tr><tr><td>CoT</td><td>0.603</td><td>0.703</td><td>0.653 ↓2.4%</td></tr><tr><td>CLIP Classifier</td><td>Baseline</td><td>0.750</td><td>0.715</td><td>0.733</td></tr></table>
129
+
130
+ Table 2: Results for Coherence Relation Prediction on DisRel. The coherence relations predicted are Similar (Sim) and Complementary (Compl).
131
+
132
+ across all 4 settings. We select Macro F1 for overall performance as it treats all classes equally, which is important for our benchmark as it contains imbalanced classes. We report response accuracy for measuring performance on the verification task.
133
+
134
+ # 4.3 Prompting Strategies and Fine-tuning
135
+
136
+ In addition to zero-shot evaluation, we also investigate the contribution of few-shot and Chain-of-Thought (CoT) prompting strategies in enabling MLLMs to learn coherence relations better. For few-shot, we include one example per coherence relation in each prompt as examples in the 3 single-label classification settings. For multi-label classification on CLUE ML, we include 6 different examples covering different combinations of relations in our prompt. To perform CoT, we include a reasoning step in our prompt that asks the model to generate a rationale before predicting the coherence relation. More details about the prompt templates
137
+
138
+ <table><tr><td>Model</td><td>Prompt</td><td>Ins</td><td>Concr</td><td>Proj</td><td>Restmt</td><td>Ext</td><td>Macro F1</td></tr><tr><td>Random Guess</td><td>Baseline</td><td>0.094</td><td>0.340</td><td>0.068</td><td>0.123</td><td>0.165</td><td>0.158</td></tr><tr><td rowspan="2">LLaVA 1.6 7B</td><td>Zero</td><td>0.000</td><td>0.693</td><td>0.062</td><td>0.066</td><td>0.082</td><td>0.181</td></tr><tr><td>CoT</td><td>0.019</td><td>0.822</td><td>0.081</td><td>0.050</td><td>0.114</td><td>0.217</td></tr><tr><td rowspan="2">LLaVA 1.6 13B</td><td>Zero</td><td>0.085</td><td>0.044</td><td>0.000</td><td>0.000</td><td>0.095</td><td>0.045</td></tr><tr><td>CoT</td><td>0.070</td><td>0.477</td><td>0.000</td><td>0.122</td><td>0.054</td><td>0.145</td></tr><tr><td rowspan="3">LLaVA 1.6 34B</td><td>Zero</td><td>0.000</td><td>0.176</td><td>0.094</td><td>0.104</td><td>0.253</td><td>0.125</td></tr><tr><td>Few</td><td>0.026</td><td>0.630</td><td>0.198</td><td>0.060</td><td>0.211</td><td>0.225</td></tr><tr><td>CoT</td><td>0.024</td><td>0.063</td><td>0.108</td><td>0.154</td><td>0.169</td><td>0.104</td></tr><tr><td rowspan="3">LLaVA OneVision 7B</td><td>Zero</td><td>0.023</td><td>0.000</td><td>0.066</td><td>0.125</td><td>0.032</td><td>0.049</td></tr><tr><td>Few</td><td>0.067</td><td>0.000</td><td>0.087</td><td>0.071</td><td>0.177</td><td>0.081</td></tr><tr><td>CoT</td><td>0.062</td><td>0.005</td><td>0.057</td><td>0.124</td><td>0.101</td><td>0.070</td></tr><tr><td rowspan="3">Qwen2-VL 7B</td><td>Zero</td><td>0.000</td><td>0.728</td><td>0.121</td><td>0.142</td><td>0.011</td><td>0.201</td></tr><tr><td>Few</td><td>0.094</td><td>0.148</td><td>0.078</td><td>0.144</td><td>0.068</td><td>0.106</td></tr><tr><td>CoT</td><td>0.156</td><td>0.167</td><td>0.068</td><td>0.170</td><td>0.000</td><td>0.112</td></tr><tr><td rowspan="3">Llama 3.2 Vision 11B</td><td>Zero</td><td>0.000</td><td>0.779</td><td>0.000</td><td>0.093</td><td>0.000</td><td>0.175</td></tr><tr><td>Few</td><td>0.035</td><td>0.388</td><td>0.000</td><td>0.092</td><td>0.113</td><td>0.126</td></tr><tr><td>CoT</td><td>0.097</td><td>0.421</td><td>0.055</td><td>0.167</td><td>0.086</td><td>0.165</td></tr><tr><td rowspan="3">Phi3.5 Vision 4.2B</td><td>Zero</td><td>0.043</td><td>0.790</td><td>0.109</td><td>0.171</td><td>0.030</td><td>0.229</td></tr><tr><td>Few</td><td>0.183</td><td>0.179</td><td>0.000</td><td>0.159</td><td>0.093</td><td>0.123</td></tr><tr><td>CoT</td><td>0.025</td><td>0.745</td><td>0.164</td><td>0.156</td><td>0.022</td><td>0.223</td></tr><tr><td rowspan="3">InternVL 2.5 26B</td><td>Zero</td><td>0.101</td><td>0.389</td><td>0.090</td><td>0.090</td><td>0.011</td><td>0.136</td></tr><tr><td>Few</td><td>0.090</td><td>0.002</td><td>0.041</td><td>0.292</td><td>0.000</td><td>0.085</td></tr><tr><td>CoT</td><td>0.118</td><td>0.450</td><td>0.102</td><td>0.199</td><td>0.083</td><td>0.190</td></tr><tr><td rowspan="3">GPT-4o</td><td>Zero</td><td>0.126</td><td>0.564</td><td>0.111</td><td>0.200</td><td>0.167</td><td>0.234</td></tr><tr><td>Few</td><td>0.171</td><td>0.599</td><td>0.131</td><td>0.268</td><td>0.199</td><td>0.274</td></tr><tr><td>CoT</td><td>0.076</td><td>0.346</td><td>0.146</td><td>0.217</td><td>0.187</td><td>0.194</td></tr><tr><td rowspan="3">Gemini 1.5 Flash</td><td>Zero</td><td>0.172</td><td>0.783</td><td>0.138</td><td>0.183</td><td>0.011</td><td>0.257</td></tr><tr><td>Few</td><td>0.027</td><td>0.681</td><td>0.139</td><td>0.257</td><td>0.193</td><td>0.259</td></tr><tr><td>CoT</td><td>0.068</td><td>0.734</td><td>0.133</td><td>0.259</td><td>0.071</td><td>0.253</td></tr><tr><td rowspan="3">Gemini 1.5 Pro</td><td>Zero</td><td>0.200</td><td>0.692</td><td>0.141</td><td>0.290</td><td>0.034</td><td>0.271</td></tr><tr><td>Few</td><td>0.113</td><td>0.661</td><td>0.247</td><td>0.270</td><td>0.000</td><td>0.258</td></tr><tr><td>CoT</td><td>0.102</td><td>0.657</td><td>0.101</td><td>0.278</td><td>0.022</td><td>0.232</td></tr><tr><td rowspan="3">Claude 3.5 Sonnet v2</td><td>Zero</td><td>0.132</td><td>0.764</td><td>0.183</td><td>0.328</td><td>0.175</td><td>0.316</td></tr><tr><td>Few</td><td>0.144</td><td>0.567</td><td>0.122</td><td>0.285</td><td>0.246</td><td>0.273</td></tr><tr><td>CoT</td><td>0.180</td><td>0.725</td><td>0.138</td><td>0.316</td><td>0.256</td><td>0.323</td></tr><tr><td>CLIP Classifier</td><td>Baseline</td><td>0.542</td><td>0.866</td><td>0.286</td><td>0.388</td><td>0.514</td><td>0.519</td></tr></table>
139
+
140
+ used for each of the tasks are present in Sections C.1 and D.1 of our appendix. We fine-tune the Llama 3.2 11B Instruct model on our benchmark to measure the impact of task-specific fine-tuning in open-source MLLMs with hyperparameter selection described in Appendix Section E.
141
+
142
+ # 5 Findings and Implications
143
+
144
+ # 5.1 Main Results
145
+
146
+ MLLMs Struggle with Coherence Relations From our results in Tables 2, 3, 4, 6 we observe that no MLLM shows improvements over our baseline classifier on Macro F1 scores across all settings. When strictly looking at zero-shot prompts, Claude 3.5 Sonnet v2 performs the best on Tweet Subtitles, CLUE ML, and CLUE SL while Gemini 1.5 Flash performs the best on DisRel. However, the CLIP Classifier can outperform these MLLMs by $2.4\%$ on DisRel, $64.1\%$ on Tweet Subtitles, $38.6\%$ on CLUE SL, and $5.6\%$ on CLUE ML in terms of Macro F1 score. This shows that although these datasets have clearly discernible visual and text features that help in predicting coherence relations, MLLMs aren't able to comprehend them effectively. The trend extends to both proprietary and
147
+
148
+ Table 3: Results for Coherence Relation Prediction on Tweet Subtitles. The Coherence Relations predicted are Insertion (Ins), Concretization (Concr), Projection (Proj), Restatement (Restmt) and Extension (Ext).
149
+
150
+ <table><tr><td>Model</td><td>Prompt</td><td>Visible</td><td>Subj</td><td>Action</td><td>Story</td><td>Meta</td><td>Macro F1</td></tr><tr><td>Random Guess</td><td>Baseline</td><td>0.233</td><td>0.069</td><td>0.030</td><td>0.162</td><td>0.266</td><td>0.152</td></tr><tr><td rowspan="2">LLaVA 1.6 7B</td><td>Zero</td><td>0.484</td><td>0.135</td><td>0.000</td><td>0.158</td><td>0.096</td><td>0.174</td></tr><tr><td>CoT</td><td>0.534</td><td>0.198</td><td>0.068</td><td>0.043</td><td>0.004</td><td>0.169</td></tr><tr><td rowspan="2">LLaVA 1.6 13B</td><td>Zero</td><td>0.541</td><td>0.027</td><td>0.039</td><td>0.158</td><td>0.000</td><td>0.153</td></tr><tr><td>CoT</td><td>0.529</td><td>0.043</td><td>0.054</td><td>0.034</td><td>0.016</td><td>0.135</td></tr><tr><td rowspan="3">LLaVA 1.6 34B</td><td>Zero</td><td>0.545</td><td>0.000</td><td>0.000</td><td>0.012</td><td>0.004</td><td>0.112</td></tr><tr><td>Few</td><td>0.457</td><td>0.097</td><td>0.058</td><td>0.318</td><td>0.086</td><td>0.203</td></tr><tr><td>CoT</td><td>0.537</td><td>0.143</td><td>0.062</td><td>0.210</td><td>0.004</td><td>0.191</td></tr><tr><td rowspan="3">LLaVA OneVision 7B</td><td>Zero</td><td>0.541</td><td>0.000</td><td>0.087</td><td>0.043</td><td>0.000</td><td>0.134</td></tr><tr><td>Few</td><td>0.146</td><td>0.000</td><td>0.025</td><td>0.172</td><td>0.243</td><td>0.117</td></tr><tr><td>CoT</td><td>0.535</td><td>0.000</td><td>0.048</td><td>0.092</td><td>0.000</td><td>0.135</td></tr><tr><td rowspan="3">Qwen2-VL 7B</td><td>Zero</td><td>0.533</td><td>0.068</td><td>0.000</td><td>0.034</td><td>0.000</td><td>0.127</td></tr><tr><td>Few</td><td>0.539</td><td>0.000</td><td>0.000</td><td>0.000</td><td>0.004</td><td>0.109</td></tr><tr><td>CoT</td><td>0.530</td><td>0.156</td><td>0.057</td><td>0.080</td><td>0.004</td><td>0.166</td></tr><tr><td rowspan="3">Llama 3.2 Vision 11B</td><td>Zero</td><td>0.537</td><td>0.136</td><td>0.098</td><td>0.023</td><td>0.000</td><td>0.159</td></tr><tr><td>Few</td><td>0.542</td><td>0.000</td><td>0.026</td><td>0.000</td><td>0.000</td><td>0.114</td></tr><tr><td>CoT</td><td>0.533</td><td>0.189</td><td>0.026</td><td>0.083</td><td>0.020</td><td>0.170</td></tr><tr><td rowspan="3">Phi3.5 Vision 4.2B</td><td>Zero</td><td>0.542</td><td>0.038</td><td>0.053</td><td>0.104</td><td>0.000</td><td>0.147</td></tr><tr><td>Few</td><td>0.485</td><td>0.256</td><td>0.021</td><td>0.255</td><td>0.162</td><td>0.236</td></tr><tr><td>CoT</td><td>0.534</td><td>0.000</td><td>0.087</td><td>0.083</td><td>0.000</td><td>0.141</td></tr><tr><td rowspan="3">InternVL 2.5 26B</td><td>Zero</td><td>0.558</td><td>0.273</td><td>0.071</td><td>0.312</td><td>0.027</td><td>0.248</td></tr><tr><td>Few</td><td>0.498</td><td>0.211</td><td>0.048</td><td>0.253</td><td>0.127</td><td>0.228</td></tr><tr><td>CoT</td><td>0.537</td><td>0.333</td><td>0.052</td><td>0.254</td><td>0.087</td><td>0.252</td></tr><tr><td rowspan="3">GPT-4o</td><td>Zero</td><td>0.544</td><td>0.345</td><td>0.064</td><td>0.178</td><td>0.065</td><td>0.239</td></tr><tr><td>Few</td><td>0.549</td><td>0.352</td><td>0.023</td><td>0.390</td><td>0.134</td><td>0.289</td></tr><tr><td>CoT</td><td>0.558</td><td>0.321</td><td>0.054</td><td>0.324</td><td>0.024</td><td>0.256</td></tr><tr><td rowspan="3">Gemini 1.5 Flash</td><td>Zero</td><td>0.543</td><td>0.215</td><td>0.091</td><td>0.168</td><td>0.020</td><td>0.207</td></tr><tr><td>Few</td><td>0.543</td><td>0.380</td><td>0.054</td><td>0.402</td><td>0.071</td><td>0.290</td></tr><tr><td>CoT</td><td>0.557</td><td>0.300</td><td>0.000</td><td>0.329</td><td>0.072</td><td>0.252</td></tr><tr><td rowspan="3">Gemini 1.5 Pro</td><td>Zero</td><td>0.559</td><td>0.329</td><td>0.039</td><td>0.440</td><td>0.112</td><td>0.296</td></tr><tr><td>Few</td><td>0.531</td><td>0.391</td><td>0.070</td><td>0.451</td><td>0.253</td><td>0.339</td></tr><tr><td>CoT</td><td>0.558</td><td>0.330</td><td>0.000</td><td>0.350</td><td>0.057</td><td>0.259</td></tr><tr><td rowspan="3">Claude 3.5 Sonnet v2</td><td>Zero</td><td>0.516</td><td>0.408</td><td>0.070</td><td>0.439</td><td>0.113</td><td>0.309</td></tr><tr><td>Few</td><td>0.467</td><td>0.430</td><td>0.077</td><td>0.434</td><td>0.338</td><td>0.349</td></tr><tr><td>CoT</td><td>0.537</td><td>0.378</td><td>0.058</td><td>0.382</td><td>0.119</td><td>0.295</td></tr><tr><td>CLIP Classifier</td><td>Baseline</td><td>0.548</td><td>0.270</td><td>0.150</td><td>0.479</td><td>0.687</td><td>0.427</td></tr></table>
151
+
152
+ Table 4: Results for Coherence Relation Prediction on CLUE Single-Label. The Coherence Relations predicted are Visible, Subjective (Subj), Action, Story and Meta
153
+
154
+ <table><tr><td>Dataset</td><td>CR</td><td>Claude</td><td>Gemini</td><td>GPT4o</td></tr><tr><td rowspan="3">DisREL</td><td>Similar</td><td>70.4%</td><td>57.2%</td><td>14.8%</td></tr><tr><td>Complementary</td><td>91.2%</td><td>10.8%</td><td>96.8%</td></tr><tr><td>Overall</td><td>80.8%</td><td>34.0%</td><td>55.8%</td></tr><tr><td rowspan="6">Tweet Subtitles</td><td>Insertion</td><td>20.59%</td><td>0.0%</td><td>11.76%</td></tr><tr><td>Concretization</td><td>74.1%</td><td>57.35%</td><td>37.61%</td></tr><tr><td>Projection</td><td>81.82%</td><td>0.0%</td><td>15.91%</td></tr><tr><td>Restatement</td><td>65.73%</td><td>64.34%</td><td>21.68%</td></tr><tr><td>Extension</td><td>66.29%</td><td>0.0%</td><td>38.29%</td></tr><tr><td>Overall</td><td>70.44%</td><td>47.69%</td><td>34.56%</td></tr><tr><td rowspan="6">CLUE SL</td><td>Visible</td><td>83.37%</td><td>90.21%</td><td>75.4%</td></tr><tr><td>Subjective</td><td>58.0%</td><td>20.0%</td><td>52.0%</td></tr><tr><td>Action</td><td>72.73%</td><td>9.09%</td><td>54.55%</td></tr><tr><td>Story</td><td>29.12%</td><td>3.85%</td><td>35.71%</td></tr><tr><td>Meta</td><td>9.98%</td><td>0.0%</td><td>0.8%</td></tr><tr><td>Overall</td><td>42.77%</td><td>35.0%</td><td>36.52%</td></tr><tr><td>CLUE ML</td><td>Overall</td><td>48.82%</td><td>32.71%</td><td>44.21%</td></tr></table>
155
+
156
+ Table 5: Accuracy of MLLMs in verifying each Coherence Relation (CR) of every dataset.
157
+
158
+ open-source MLLMs regardless of their size. Our results reiterate the need for benchmarks such as CORDIAL to evaluate the intermodal reasoning capabilities of MLLMs.
159
+
160
+ Pragmatic Relations are Challenging In single-label prediction settings, we observe that MLLMs come close to the baseline classifier's scores on DisRel, containing the image-text relations that are more literal (Similar, Complementary). On the
161
+
162
+ other hand, there exists a significant gap in performance in other single-label datasets. Looking into per-relation F1 scores, pragmatic relation categories such as Insertion, Projection, and Extension are particularly challenging for MLLMs. A similar trend is observed in CLUE SL and CLUE ML where MLLMs struggle with relation categories such as Story and Meta.
163
+
164
+ Verification Accuracy Depends on Settings Analyzing the verification performance of MLLMs in Table 5, we observe that the performance of MLLMs on the verification task is highly dependent on the setting. Across all settings, Claude 3.5 Sonnet v2 performs the best, with an accuracy of $80.8\%$ on DisRel, $70.4\%$ on Tweet Subtitles, $42.8\%$ on CLUE SL and $48.5\%$ on CLUE ML. This shows that MLLMs are able to verify coherence relations better in settings where the relations are more literal and easier to understand. However, the performance of MLLMs on the verification task is significantly lower in settings where the relations are more non-literal and pragmatic.
165
+
166
+ Inconsistency of Prompting Strategies In our experiments with few-shot and CoT prompting strategies, we observe that the performance of MLLMs is inconsistent across different settings and model families. Across DisRel, Tweet Subtitles, CLUE SL and CLUE ML, a total of 7, 8, 10 and 10 MLLMs respectively show improvements in performance with either few-shot or CoT prompting strategies. However, only 2 MLLMs: LLaVA OneVision 7B and GPT-4o show improvements across all settings. Overall, we observe that in the more difficult settings (CLUE SL and CLUE ML), more number of models are able to leverage one of these alternate prompting strategies to improve their performance. But, even with additional examples or reasoning steps, MLLMs are not able to outperform the baseline classifier. This shows that Coherence Relation Prediction is a fundamentally difficult task that cannot be taught to MLLMs only through prompting strategies.
167
+
168
+ Fine-tuning Improves MLLM Reasoning Looking at Figure 3, we observe that fine-tuning the Llama 3.2 Vision model on our benchmark proves beneficial for coherence relation prediction. In both DisRel and Tweet Subtitles, we see gains in both zero-shot and few-shot prompt scores with Llama 3.2 Vision up to $18.42\%$ compared to its original performance. On both CLUE ML and
169
+
170
+ SL, we see improvements in either zero-shot or few-shot performance with minimal performance loss on the other. This shows that MLLMs are able to learn to recognize coherence relations better when fine-tuned on a task-specific dataset. Coherence-aware fine-tuning can be a promising direction for improving their reasoning and cognition abilities.
171
+
172
+ # 5.2 Discussion
173
+
174
+ Model Biases Inhibit Prediction Performance Looking at the per-class F1 scores across MLLMs, we observe they are biased towards certain relation categories. This includes the prediction of only a small subset of relations across all samples in an evaluation setting. From Figure 2, we acknowledge that the distribution of relation categories in our benchmark is imbalanced. However, this response imbalance of MLLMs is observed even on majority classes such as Concretization in Tweet Subtitles and Meta relations in CLUE SL and ML. This shows that despite providing few-shot examples and prompt optimization strategies, MLLMs display biases towards certain relation categories. When we look at the results of our fine-tuned model, we can see that prediction results on relations ignored by the base model are improved. This shows that fine-tuning can help mitigate these reasoning biases in MLLMs.
175
+
176
+ Cross-Discourse Generalization of CR Tax-onomies With our evaluation of MLLMs performing MDA, we show that they perform much worse compared to baseline classifiers within each discourse type. Since CR taxonomies are designed specifically for the discourses analyzed, it is difficult to directly infer the cross-domain translation of model performances from one discourse to another. Previous studies on text-only discourses report poor cross-domain adaptation of traditional classifiers across discourse types (Bourgonje and Demberg, 2024). As CORDIAL extends evaluation to multiple discourses, we are able to provide a better assessment of MLLM capabilities in Discourse Analysis. A natural extension of our benchmark would be designing a unified set of CRs that can be applied across complementary discourses. This setting would be especially challenging for our classifier baselines due to the varying distribution of images and text from different sources, compared to MLLMs which are more robust to these changes. The grouping of complementary discourse domains
177
+
178
+ and definition of new unified CRs is a challenging task which we aim to investigate as a part of our future work.
179
+
180
+ # 6 Conclusions
181
+
182
+ We propose CORDIAL, a novel benchmark to evaluate how MLLMs perform MDA using Coherence Relations. Our experiments show existing state-of-the-art MLLMs struggle to match simple baseline classifiers in predicting Coherence Relations across different discourse domains. We also show the impact of evaluating different prompt strategies and the importance of using diverse datasets to probe intermodal reasoning capabilities of MLLMs. Finally, we show that fine-tuning MLLMs on coherence relations can help alleviate model biases and improve their performance on these tasks. This work highlights the need for MLLM benchmarks to evolve beyond factual & perceptual assessment tasks and focus on understanding both literal and pragmatic relationships between multimodal components of real-world discourses. We hope that CORDIAL will serve as a stepping stone for future research in MDA and encourage the community to explore new methods to improve MLLMs on these tasks.
183
+
184
+ # Limitations
185
+
186
+ While our proposed benchmark provides a comprehensive assessment of intermodal reasoning in current MLLMs, several limitations must be acknowledged. The benchmark is currently limited to analyzing coherence relations in single-turn discourses. This is due to a lack of publicly available datasets that provide multi-turn image-text pairs with annotated coherence relations. We plan to extend our benchmark to include multi-turn discourse relations as future work. Our benchmark is currently limited to the English language and must be extended to multi-lingual discourses as well.
187
+
188
+ # Acknowledgments
189
+
190
+ This research was in part supported by the U.S. National Science Foundation (NSF) award #1820609. Part of the research results were obtained using the computational resources provided by CloudBank (https://www.cloudbank.org/), which was supported by the NSF award #1925001.
191
+
192
+ # References
193
+
194
+ Marah Abdin, Jyoti Aneja, Hany Awadalla, Ahmed Awadallah, Ammar Ahmad Awan, Nguyen Bach, Amit Bahree, Arash Bakhtiari, Jianmin Bao, Harkirat Behl, Alon Benhaim, Misha Bilenko, Johan Bjorck, Sebastien Bubeck, Martin Cai, Qin Cai, Vishrav Chaudhary, Dong Chen, Dongdong Chen, Weizhu Chen, Yen-Chun Chen, Yi-Ling Chen, Hao Cheng, Parul Chopra, Xiyang Dai, Matthew Dixon, Ronen Eldan, Victor Fragoso, Jianfeng Gao, Mei Gao, Min Gao, Amit Garg, Allie Del Giorno, Abhishek Goswami, Suriya Gunasekar, Emman Haider, Junheng Hao, Russell J Hewett, Wenxiang Hu, Jamie Huynh, Dan Iter, Sam Ade Jacobs, Mojan Javaheripi, Xin Jin, Nikos Karampatziakis, Piero Kauffmann, Mahoud Khademi, Dongwoo Kim, Young Jin Kim, Lev Kurilenko, James R Lee, Yin Tat Lee, Yuanzhi Li, Yunsheng Li, Chen Liang, Lars Liden, Xihui Lin, Zeqi Lin, Ce Liu, Liyuan Liu, Mengchen Liu, Weishung Liu, Xiaodong Liu, Chong Luo, Piyush Madan, Ali Mahmoudzadeh, David Majercak, Matt Mazzola, Caio Cesar Teodoro Mendes, Arindam Mitra, Hardik Modi, Anh Nguyen, Brandon Norick, Barun Patra, Daniel Perez-Becker, Thomas Portet, Reid Pryzant, Heyang Qin, Marko Radmilac, Liliang Ren, Gustavo de Rosa, Corby Rosset, Sambudha Roy Olatunji Ruwase, Olli Saarikivi, Amin Saied, Adil Salim, Michael Santacroce, Shital Shah, Ning Shang, Hiteshi Sharma, Yelong Shen, Swadheen Shukla, Xia Song, Masahiro Tanaka, Andrea Tupini, Praneetha Vaddamanu, Chunyu Wang, Guanhua Wang, Lijuan Wang, Shuohang Wang, Xin Wang, Yu Wang, Rachel Ward, Wen Wen, Philipp Witte, Haiping Wu, Xiaoxia Wu, Michael Wyatt, Bin Xiao, Can Xu, Jiahang Xu Weijian Xu Jilong Xue Sonali Yadav Fan Yang Jianwei Yang Yifan Yang Ziyi Yang Donghan Yu Lu Yuan Chenruidong Zhang Cyril Zhang Jianwen Zhang,Liyna Zhang,Yi ZhangYue ZhangYunan Zhang,and Xiren Zhou.2024.Phi-3 technical report: A highly capable language model locally on your phone.arXiv [cs.CL].
195
+
196
+ Jean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech, Iain Barr, Yana Hasson, Karel Lenc, A Mensch, Katie Millican, Malcolm Reynolds, Roman Ring, Eliza Rutherford, Serkan Cabi, Tengda Han, Zhitao Gong, Sina Samangooei, Marianne Monteiro, Jacob Menick, Sebastian Borgeaud, Andy Brock, Aida Nematzadeh, Sahand Sharifzadeh, Mikolaj Binkowski, Ricardo Barreira, O Vinyals, Andrew Zisserman, and K Simonyan. 2022. Flamingo: A visual language model for few-shot learning. Neural Inf Process Syst, abs/2204.14198.
197
+
198
+ Malihe Alikhani, Baber Khalid, and Matthew Stone. 2023. Image-text coherence and its implications for multimodal AI. Front. Artif. Intell., 6:1048874.
199
+
200
+ Malihe Alikhani, Sreyasi Nag Chowdhury, Gerard de Melo, and Matthew Stone. 2019. CITE: A corpus of image-text discourse relations. In Proceedings of the 2019 Conference of the North, pages 570-575, Stroudsburg, PA, USA. Association for Computational Linguistics.
201
+
202
+ Malihe Alikhani, Piyush Sharma, Shengjie Li, Radu Soricut, and Matthew Stone. 2020. Cross-modal coherence modeling for caption generation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 6525-6535, Stroudsburg, PA, USA. Association for Computational Linguistics.
203
+ Malihe Alikhani and Matthew Stone. 2019. "caption" as a coherence relation: Evidence and implications. In Proceedings of the Second Workshop on Shortcomings in Vision and Language, pages 58-67, Stroudsburg, PA, USA. Association for Computational Linguistics.
204
+ Aashish Anantha Ramakrishnan, Sharon X Huang, and Dongwon Lee. 2024a. ANCHOR: LLM-driven news subject conditioning for text-to-image synthesis. arXiv:2404.10141 [cs.CV].
205
+ Aashish Anantha Ramakrishnan, Sharon X Huang, and Dongwon Lee. 2024b. ANNA: Abstractive text-to-image synthesis with filtered news captions. In The Third Workshop on Advances in Language and Vision Research. Association for Computational Linguistics.
206
+ Anthropic. Claude 3.5 sonnet. https://www.anthropi c.com/claude/sonnet. Accessed: 2025-2-14.
207
+ Jinze Bai, Shuai Bai, Shusheng Yang, Shijie Wang, Sinan Tan, Peng Wang, Junyang Lin, Chang Zhou, and Jingren Zhou. 2023. Qwen-VL: A versatile vision-language model for understanding, localization, text reading, and beyond. arXiv [cs.CV].
208
+ John A Bateman. 2014. Text and Image: A critical introduction to the visual/verbal divide, 1st edition. Routledge.
209
+ Peter Bourgonje and Vera Demberg. 2024. Generalizing across languages and domains for discourse relation classification. In Proceedings of the 25th Annual Meeting of the Special Interest Group on Discourse and Dialogue, pages 554-565, Stroudsburg, PA, USA. Association for Computational Linguistics.
210
+ Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared 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 M Ziegler, Jeffrey Wu, Clemens Winter, Christopher 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. arXiv:2005.14165 [cs].
211
+ Mathilde Caron, Hugo Touvron, Ishan Misra, Herve Jegou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. 2021. Emerging properties in self-supervised vision transformers. In 2021 IEEE/CVF International Conference on Computer Vision (ICCV), pages 9650-9660. IEEE.
212
+
213
+ Dongping Chen, Ruoxi Chen, Shilin Zhang, Yaochen Wang, Yinuo Liu, Huichi Zhou, Qihui Zhang, Yao Wan, Pan Zhou, and Lichao Sun. 2024a. MLLM-as-a-judge: Assessing multimodal LLM-as-a-judge with vision-language benchmark. In *Forty-first International Conference on Machine Learning*.
214
+ Zhe Chen, Weiyun Wang, Yue Cao, Yangzhou Liu, Zhangwei Gao, Erfei Cui, Jinguo Zhu, Shenglong Ye, Hao Tian, Zhaoyang Liu, Lixin Gu, Xuehui Wang, Qingyun Li, Yimin Ren, Zixuan Chen, Jiapeng Luo, Jiahao Wang, Tan Jiang, Bo Wang, Conghui He, Botian Shi, Xingcheng Zhang, Han Lv, Yi Wang, Wenqi Shao, Pei Chu, Zhongying Tu, Tong He, Zhiyong Wu, Huipeng Deng, Jiaye Ge, Kai Chen, Kaipeng Zhang, Limin Wang, Min Dou, Lewei Lu, Xizhou Zhu, Tong Lu, Dahua Lin, Yu Qiao, Jifeng Dai, and Wenhai Wang. 2024b. Expanding performance boundaries of open-source multimodal models with model, data, and test-time scaling. arXiv [cs.CV].
215
+ Zhe Chen, Weiyun Wang, Hao Tian, Shenglong Ye, Zhangwei Gao, Erfei Cui, Wenwen Tong, Kongzhi Hu, Jiapeng Luo, Zheng Ma, Ji Ma, Jiaqi Wang, Xiaoyi Dong, Hang Yan, Hewei Guo, Conghui He, Botian Shi, Zhenjiang Jin, Chao Xu, Bin Wang, Xingjian Wei, Wei Li, Wenjian Zhang, Bo Zhang, Pinlong Cai, Licheng Wen, Xiangchao Yan, Min Dou, Lewei Lu, Xizhou Zhu, Tong Lu, Dahua Lin, Yu Qiao, Jifeng Dai, and Henhai Wang. 2024c. How far are we to GPT-4V? closing the gap to commercial multimodal models with open-source suites. Sci. China Inf. Sci., 67(12).
216
+ Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. 2021. An image is worth 16x16 words: Transformers for image recognition at scale. In International Conference on Learning Representations.
217
+ Jack Hessel, Ari Holtzman, Maxwell Forbes, Ronan Le Bras, and Yejin Choi. 2021. CLIPScore: A reference-free evaluation metric for image captioning. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 7514-7528, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
218
+ Jerry R Hobbs. 1978. *Why is discourse coherent?*, volume 176. SRI International Menlo Park, CA.
219
+ 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 [cs.CL].
220
+ Mert Inan, Piyush Sharma, Baber Khalid, Radu Soricut, Matthew Stone, and Malihe Alikhani. 2021. COS-Mic: A coherence-aware generation metric for image descriptions. In Findings of the Association for Computational Linguistics: EMNLP 2021, pages 3419-3430, Stroudsburg, PA, USA. Association for Computational Linguistics.
221
+
222
+ Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc V Le, Yun-Hsuan Sung, Zhen Li, and Tom Duerig. 2021. Scaling up visual and vision-language representation learning with noisy text supervision. ICML, 139:4904-4916.
223
+ Justin Johnson, Bharath Hariharan, Laurens van der Maaten, Li Fei-Fei, C Lawrence Zitnick, and Ross Girshick. 2016. CLEVR: A diagnostic dataset for compositional language and elementary visual reasoning. arXiv [cs.CV], pages 1988-1997.
224
+ Amita Kamath, Jack Hessel, and Kai-Wei Chang. 2023. What's "up" with vision-language models? investigating their struggle with spatial reasoning. In The 2023 Conference on Empirical Methods in Natural Language Processing.
225
+ Ryo Kamoi, Yusen Zhang, Sarkar Snigdha Sarathi Das, Ranran Haoran Zhang, and Rui Zhang. 2024. VisOnlyQA: Large vision language models still struggle with visual perception of geometric information. arXiv [cs.CL].
226
+ Yuval Kirstain, Adam Polyak, Uriel Singer, Shahbuland Matiana, Joe Penna, and Omer Levy. 2023. Pick-a-pic: An open dataset of user preferences for text-to-image generation. In Thirty-seventh Conference on Neural Information Processing Systems.
227
+ Gunther Kress. 2009. Multimodality: A social semiotic approach to contemporary communication. Routledge, London, England.
228
+ Julia Kruk, Jonah Lubin, Karan Sikka, Xiao Lin, Dan Jurafsky, and Ajay Divakaran. 2019. Integrating text and image: Determining multimodal document intent in instagram posts. 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), Stroudsburg, PA, USA. Association for Computational Linguistics.
229
+ Bo Li, Yuanhan Zhang, Dong Guo, Renrui Zhang, Feng Li, Hao Zhang, Kaichen Zhang, Peiyuan Zhang, Yanwei Li, Ziwei Liu, and Chunyuan Li. 2025. LLaVA-OneVision: Easy visual task transfer. Transactions on Machine Learning Research.
230
+ Jian Li, Weiheng Lu, Hao Fei, Meng Luo, Ming Dai, Min Xia, Yizhang Jin, Zhenye Gan, Ding Qi, Chaoyou Fu, Ying Tai, Wankou Yang, Yabiao Wang, and Chengjie Wang. 2024. A survey on benchmarks of multimodal large language models. arXiv [cs.CL].
231
+ Haotian Liu, Chunyuan Li, Yuheng Li, and Yong Jae Lee. 2023. Improved baselines with visual instruction tuning.
232
+ Haotian Liu, Chunyuan Li, Yuheng Li, and Yong Jae Lee. 2024a. Improved baselines with visual instruction tuning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 26296-26306.
233
+
234
+ Haotian Liu, Chunyuan Li, Yuheng Li, Bo Li, Yuanhan Zhang, Sheng Shen, and Yong Jae Lee. 2024b. LLaVA-NeXT: Improved reasoning, OCR, and world knowledge.
235
+ Pan Lu, Swaroop Mishra, Tony Xia, Liang Qiu, KaiWei Chang, Song-Chun Zhu, Oyvind Tafjord, Peter Clark, and Ashwin Kalyan. 2022. Learn to explain: Multimodal reasoning via thought chains for science question answering. In The 36th Conference on Neural Information Processing Systems (NeurIPS).
236
+ Tengchao Lv, Yupan Huang, Jingye Chen, Yuzhong Zhao, Yilin Jia, Lei Cui, Shuming Ma, Yaoyao Chang, Shaohan Huang, Wenhui Wang, Li Dong, Weiyao Luo, Shaoxiang Wu, Guoxin Wang, Cha Zhang, and Furu Wei. 2023. KOSMOS-2.5: A multimodal literate model. arXiv [cs.CL].
237
+ Emily E Marsh and M White. 2003. A taxonomy of relationships between images and text. J. Documentation, 59:647-672.
238
+ Meta AI. Llama 3.2: Revolutionizing edge AI and vision with open, customizable models. https://ai meta.com/blog/llama-3-2-connect-2024-vision-edge-mobile-devices/. Accessed: 2025-2-2.
239
+ Jiahao Nie, Gongjie Zhang, Wenbin An, Yap-Peng Tan, Alex C Kot, and Shijian Lu. 2024. MMRel: A relation understanding benchmark in the MLLM era. arXiv [cs.CV].
240
+ OpenAI, Aaron Hurst, Adam Lerer, Adam P Goucher, Adam Perelman, Aditya Ramesh, Aidan Clark, A J Ostrow, Akila Welihinda, Alan Hayes, Alec Radford, Aleksander Madry, Alex Baker-Whitcomb, Alex Beutel, Alex Borzunov, Alex Carney, Alex Chow, Alex Kirillov, Alex Nichol, Alex Paino, Alex Renzin, Alex Tachard Passos, Alexander Kirillov, Alex Christakis, Alexis Conneau, Ali Kamali, Allan Jabri, Allison Moyer, Allison Tam, Amadou Crookes, Amin Tootoochian, Amin Tootoonchian, Ananya Kumar, Andrea Vallone, Andrej Karpathy, Andrew Braunstein, Andrew Cann, Andrew Codispoti, Andrew Galu, Andrew Kondrich, Andrew Tulloch, Andrey Mishchenko, Angela Baek, Angela Jiang, Antoine Pelisse, Antonia Woodford, Anuj Gosalia, Arka Dhar, Ashley Pantuliano, Avi Nayak, Avital Oliver, Barret Zoph, Behrooz Ghorbani, Ben Leimberger, Ben Rossen, Ben Sokolowsky, Ben Wang, Benjamin Zweig, Beth Hoover, Blake Samic, Bob McGrew, Bobby Spero, Bogo Giertler, Bowen Cheng, Brad Lightcap, Brandon Walkin, Brendan Quinn, Brian Guerraci, Brian Hsu, Bright Kellogg, Brydon Eastman, Camillo Lugaresi, Carroll Wainwright, Cary Bassin, Cary Hudson, Casey Chu, Chad Nelson, Chak Li, Chan Jun Shern, Channing Conger, Charlotte Barette, Chelsea Voss, Chen Ding, Cheng Lu, Chong Zhang, Chris Beaumont, Chris Hallacy, Chris Koch, Christian Gibson, Christina Kim, Christine Choi, Christine McLeavey, Christopher Hesse, Claudia Fischer, Clemens Winter, Coley Czarnecki, Colin Jarvis, Colin Wei, Constantin Koumouzelis, Dane
241
+
242
+ Sherburn, Daniel Kappler, Daniel Levin, Daniel Levy, David Carr, David Farhi, David Mely, David Robinson, David Sasaki, Denny Jin, Dev Valladares, Dimitris Tsipras, Doug Li, Duc Phong Nguyen, Duncan Findlay, Edede Oiwoh, Edmund Wong, Ehsan Asdar, Elizabeth Proehl, Elizabeth Yang, Eric Antonow, Eric Kramer, Eric Peterson, Eric Sigler, Eric Wallace, Eugene Brevdo, Evan Mays, Farzad Khorasani, Felipe Petroski Such, Filippo Raso, Francis Zhang, Fred von Lohmann, Freddie Sulit, Gabriel Goh, Gene Oden, Geoff Salmon, Giulio Starace, Greg Brockman, Hadi Salman, Haiming Bao, Haitang Hu, Hannah Wong, Haoyu Wang, Heather Schmidt, Heather Whitney, Heewoo Jun, Hendrik Kirchner, Henrique Ponde de Oliveira Pinto, Hongyu Ren, Huiwen Chang, Hyung Won Chung, Ian Kivlichan, Ian O'Connell, Ian O'Connell, Ian Osband, Ian Silber, Ian Sohl, Ibrahim Okuyucu, Ikai Lan, Ilya Kostrikov, Ilya Sutskever, Ingmar Kanitscheider, Ishaan Gulrajani, Jacob Coxon, Jacob Menick, Jakub Pachocki, James Aung, James Betker, James Crooks, James Lennon, Jamie Kiros, Jan Leike, Jane Park, Jason Kwon, Jason Phang, Jason Teplitz, Jason Wei, Jason Wolfe, Jay Chen, Jeff Harris, Jenia Varavva Jessica Gan Lee Jessica Shieh Ji Lin Jiahui Yu, Jiayi Weng, Jie Tang, Jieqi Yu, Joanne Jang, Joaquin Quinonero Candela, Joe Beutler, Joe Landers Joel Parish Johannes Heidecke John Schulman Jonathan Lachman Jonathan McKay Jonathan Uesato Jonathan Ward Jong Wook KimJoost Huizinga Jordan Sitkin Jos Kraaijeveld Josh Gross Josh Kaplan Josh Snyder Joshua Achiam Joy Jiao Joyce Lee,Juntang Zhuang Justyn Harriman Kai Fricke,Kai Hayashi Karan Singhal,Katy Shi,Kavin Karthik Kayla Wood Kendra Rimbach Kenny Hsu Kenny NguyenKeren Gu-Lemberg Kevin Button Kevin Liu Kiel Howe Krithika Muthukumar Kyle Luther,Lama Ahmad Larry Kai Lauren Itow Lauren Workman, Leher Pathak Leo Chen Li JingLia Guy Liam Fedus Liang Zhou Lien Mamitsuka Lilian Weng Lindsay McCallum Lindsey Held Long Ouyang Louis Feuvrier Lu Zhang Lukas Kondraciuk Lukasz Kaiser Luke Hewitt Luke Metz Lyric Doshi Mada Aflak Maddie Simens Madelaine Boyd Madeleine Thompson Marat Dukhan Mark Chen Mark Gray Mark Hudnall Marvin Zhang Marwan Aljubeh Mateusz Litwin Matthew Zeng Max Johnson Maya Shetty Mayank Gupta Meghan Shah,Mehmet Yatbaz,Meng Jia Yang,Mengchao Zhong Mia Glaese Mianna Chen Michael Janner Michael Lampe Michael Petrov Michael Wu Michele Wang Michelle Fradin Michelle Pokrass Miguel Castro Miguel Oom Temudo de Castro Mikhail Pavlov Miles Brundage Miles Wang Minal KhanMira Murati Mo Bavarian Molly Lin Murat Yesildal,Nacho SotoNatalia Gimelshein,Natalie Cone Natalie Staudacher Natalie Summers Natan LaFontaine Neil Chowdhury Nick Ryder Nick Stathas Nick Turley Nik Tezak Nik Felix Nithanth Kudige Nitish Keskar Noah Deutsch Noel Bundick,Nora Puckett Ofir Nachum Ola Okelola Oleg Boiko,Oleg Murk Oliver Jaffe Olivia Watkins Olivier Godement Owen Campbell-Moore Patrick Chao Paul McMillan Pavel Belov Peng Su Pe
243
+
244
+ ter Bak, Peter Bakkum, Peter Deng, Peter Dolan, Peter Hoeschele, Peter Welinder, Phil Tillet, Philip Pronin, Philippe Tillet, Prafulla Dhariwal, Qiming Yuan, Rachel Dias, Rachel Lim, Rahul Arora, Rajan Troll, Randall Lin, Rapha Gontijo Lopes, Raul Puri, Reah Miyara, Reimar Leike, Renaud Gaubert, Reza Zamani, Ricky Wang, Rob Donnelly, Rob Honsby, Rocky Smith, Rohan Sahai, Rohit Ramchandani, Romain Huet, Rory Carmichael, Rowan Zellers, Roy Chen, Ruby Chen, Ruslan Nigmatullin, Ryan Cheu, Saachi Jain, Sam Altman, Sam Schoenholz, Sam Toizer, Samuel Miserendino, Sandhini Agarwal, Sara Culver, Scott Ethersmith, Scott Gray, Sean Grove, Sean Metzger, Shamez Hermani, Shantanu Jain, Shengjia Zhao, Sherwin Wu, Shino Jomoto, Shirong Wu, Shuaiqi, Xia, Sonia Phene, Spencer Papay, Srinivas Narayanan, Steve Coffey, Steve Lee, Stewart Hall, Suchir Balaji, Tal Broda, Tal Stramer, Tao Xu, Tarun Gogineni, Taya Christianson, Ted Sanders, Tejal Patwardhan, Thomas Cunninghamman, Thomas Degry, Thomas Dimson, Thomas Raoux, Thomas Shadwell, Tianhao Zheng, Todd Underwood, Todor Markov, Toki Sherbakov, Tom Rubin, Tom Stasi, Tomer Kaftan, Tristan Heywood, Troy Peterson, Tyce Walters, Tyna Eloundou, Valerie Qi, Veit Moeller, Vinnie Monaco, Vishal Kuo, Vlad Fomenko, Wayne Chang, Weiyi Zheng, Wenda Zhou, Wesam Manassra, Will Sheu, Wojciech Zaremba, Yash Patil, Yilei Qian Yongjik Kim, Youlong Cheng, Yu Zhang, Yuchen He, Yuchen Zhang, Yujia Jin, Yunxing Dai, and Yury Malkov. 2024. GPT-4o system card. arXiv [cs.CL].
245
+
246
+ Sundar Pichai. 2024. Our next-generation model: Gemini 1.5. https://blog.google/technology/ai/google-gemini-next-generation-model-febru-ary-2024/. Accessed: 2025-2-2.
247
+
248
+ Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. 2021. Learning transferable visual models from natural language supervision. arXiv:2103.00020 [cs].
249
+
250
+ Navid Rajabi and Jana Kosecka. 2024. GSR-bench: A benchmark for grounded spatial reasoning evaluation via multimodal LLMs. In NeurIPS 2024 Workshop on Compositional Learning: Perspectives, Methods, and Paths Forward.
251
+
252
+ Candace Ross, Melissa Hall, Adriana Romero-Soriano, and Adina Williams. 2024. What makes a good metric? evaluating automatic metrics for text-to-image consistency. In First Conference on Language Modeling.
253
+
254
+ Hao Shao, Shengju Qian, Han Xiao, Guanglu Song, Zhuofan Zong, Letian Wang, Yu Liu, and Hongsheng Li. 2024. Visual CoT: Advancing multi-modal language models with a comprehensive dataset and benchmark for chain-of-thought reasoning. In The Thirty-eight Conference on Neural Information Processing Systems Datasets and Benchmarks Track.
255
+
256
+ Piyush Sharma, Nan Ding, Sebastian Goodman, and Radu Soricut. 2018. Conceptual captions: A cleaned,
257
+
258
+ hypernymed, image alt-text dataset for automatic image captioning. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2556-2565, Melbourne, Australia. Association for Computational Linguistics.
259
+ Chak Lam Shek, Xiyang Wu, Wesley A Suttle, Carl Busart, Erin Zaroukian, Dinesh Manocha, Pratap Tokekar, and Amrit Singh Bedi. 2024. LANCAR: Leveraging language for context-aware robot locomotion in unstructured environments. In 2024 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 9612-9619. IEEE.
260
+ Tiberiu Sosea, Justin Sirbu, Cornelia Caragea, Doina Caragea, and Traian Rebedea. 2021. Using the image-text relationship to improve multimodal disaster tweet classification. Int Conf Inf Syst Crisis Response Manag, pages 691-704.
261
+ Tristan Thrush, Ryan Jiang, Max Bartolo, Amanpreet Singh, Adina Williams, Douwe Kiela, and Candace Ross. 2022. Winoground: Probing vision and language models for visio-linguistic compositionality. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5238-5248.
262
+ Alakananda Vempala and Daniel Preoticiuc-Pietro. 2019. Categorizing and inferring the relationship between the text and image of twitter posts. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2830-2840, Stroudsburg, PA, USA. Association for Computational Linguistics.
263
+ Peng Wang, Shuai Bai, Sinan Tan, Shijie Wang, Zhihao Fan, Jinze Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, Yang Fan, Kai Dang, Mengfei Du, Xuancheng Ren, Rui Men, Dayiheng Liu, Chang Zhou, Jingren Zhou, and Junyang Lin. 2024. Qwen2-VL: Enhancing vision-language model's perception of the world at any resolution. arXiv [cs.CV].
264
+ Penghao Wu and Saining Xie. 2024. V?: Guided visual search as a core mechanism in multimodal LLMs. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13084-13094.
265
+ Xiaoshi Wu, Keqiang Sun, Feng Zhu, Rui Zhao, and Hongsheng Li. 2023. Human preference score: Better aligning text-to-image models with human preference. In 2023 IEEE/CVF International Conference on Computer Vision (ICCV), pages 2096-2105. IEEE.
266
+ Zhiyu Wu, Xiaokang Chen, Zizheng Pan, Xingchao Liu, Wen Liu, Damai Dai, Huazuo Gao, Yiyang Ma, Chengyue Wu, Bingxuan Wang, Zhenda Xie, Yu Wu, Kai Hu, Jiawei Wang, Yaofeng Sun, Yukun Li, Yishi Piao, Kang Guan, Aixin Liu, Xin Xie, Yuxiang You, Kai Dong, Xingkai Yu, Haowei Zhang, Liang Zhao,
267
+
268
+ Yisong Wang, and Chong Ruan. 2024. DeepSeekVL2: Mixture-of-experts vision-language models for advanced multimodal understanding. arXiv [cs.CV].
269
+ Alexandros Xenos, Themos Stafylakis, Ioannis Patras, and Georgios Tzimiropoulos. 2023. A simple baseline for knowledge-based visual question answering. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 14871-14877, Stroudsburg, PA, USA. Association for Computational Linguistics.
270
+ Chunpu Xu, Hanzhuo Tan, Jing Li, and Piji Li. 2022. Understanding social media cross-modality discourse in linguistic space. In *Findings of the Association for Computational Linguistics: EMNLP* 2022, pages 2459-2471, Stroudsburg, PA, USA. Association for Computational Linguistics.
271
+ Jiazheng Xu, Xiao Liu, Yuchen Wu, Yuxuan Tong, Qinkai Li, Ming Ding, Jie Tang, and Yuxiao Dong. 2023. ImageReward: Learning and evaluating human preferences for text-to-image generation. arXiv [cs.CV].
272
+ Yuchen Zeng, Wonjun Kang, Yicong Chen, Hyung Il Koo, and Kangwook Lee. 2024. Can MLLMs perform text-to-image in-context learning? In First Conference on Language Modeling.
273
+ Yongshuo Zong, Ondrej Bohdal, and Timothy Hospedales. 2024. VL-ICL bench: The devil in the details of multimodal in-context learning. In *The Thirteenth International Conference on Learning Representations*.
274
+
275
+ # Appendix
276
+
277
+ <table><tr><td>Model</td><td>Prompt</td><td>Visible</td><td>Subj</td><td>Action</td><td>Story</td><td>Meta</td><td>Macro F1</td></tr><tr><td rowspan="2">LLaVA 1.6 7B</td><td>Zero</td><td>0.864</td><td>0.117</td><td>0.113</td><td>0.048</td><td>0.029</td><td>0.234</td></tr><tr><td>CoT</td><td>0.848</td><td>0.245</td><td>0.247</td><td>0.058</td><td>0.013</td><td>0.282</td></tr><tr><td rowspan="2">LLaVA 1.6 13B</td><td>Zero</td><td>0.869</td><td>0.147</td><td>0.389</td><td>0.115</td><td>0.401</td><td>0.384</td></tr><tr><td>CoT</td><td>0.849</td><td>0.095</td><td>0.237</td><td>0.090</td><td>0.048</td><td>0.264</td></tr><tr><td rowspan="3">LLaVA 1.6 34B</td><td>Zero</td><td>0.868</td><td>0.165</td><td>0.470</td><td>0.369</td><td>0.298</td><td>0.434</td></tr><tr><td>Few</td><td>0.859</td><td>0.000</td><td>0.471</td><td>0.453</td><td>0.166</td><td>0.390</td></tr><tr><td>CoT</td><td>0.858</td><td>0.117</td><td>0.317</td><td>0.175</td><td>0.163</td><td>0.326</td></tr><tr><td rowspan="3">LLaVA OneVision 7B</td><td>Zero</td><td>0.820</td><td>0.034</td><td>0.380</td><td>0.024</td><td>0.000</td><td>0.252</td></tr><tr><td>Few</td><td>0.757</td><td>0.109</td><td>0.510</td><td>0.150</td><td>0.000</td><td>0.305</td></tr><tr><td>CoT</td><td>0.856</td><td>0.150</td><td>0.349</td><td>0.213</td><td>0.154</td><td>0.345</td></tr><tr><td rowspan="3">Qwen2-VL 7B</td><td>Zero</td><td>0.864</td><td>0.045</td><td>0.211</td><td>0.086</td><td>0.013</td><td>0.244</td></tr><tr><td>Few</td><td>0.864</td><td>0.162</td><td>0.461</td><td>0.368</td><td>0.017</td><td>0.374</td></tr><tr><td>CoT</td><td>0.865</td><td>0.082</td><td>0.094</td><td>0.080</td><td>0.021</td><td>0.228</td></tr><tr><td rowspan="3">Llama 3.2 Vision 11B</td><td>Zero</td><td>0.869</td><td>0.157</td><td>0.424</td><td>0.349</td><td>0.284</td><td>0.417</td></tr><tr><td>Few</td><td>0.828</td><td>0.248</td><td>0.571</td><td>0.443</td><td>0.499</td><td>0.518</td></tr><tr><td>CoT</td><td>0.850</td><td>0.183</td><td>0.391</td><td>0.420</td><td>0.371</td><td>0.443</td></tr><tr><td rowspan="3">Phi3.5 Vision 4.2B</td><td>Zero</td><td>0.866</td><td>0.000</td><td>0.092</td><td>0.036</td><td>0.013</td><td>0.201</td></tr><tr><td>Few</td><td>0.527</td><td>0.226</td><td>0.311</td><td>0.490</td><td>0.036</td><td>0.318</td></tr><tr><td>CoT</td><td>0.819</td><td>0.047</td><td>0.475</td><td>0.294</td><td>0.064</td><td>0.340</td></tr><tr><td rowspan="3">InternVL 2.5 26B</td><td>Zero</td><td>0.822</td><td>0.291</td><td>0.448</td><td>0.324</td><td>0.029</td><td>0.383</td></tr><tr><td>Few</td><td>0.496</td><td>0.266</td><td>0.491</td><td>0.400</td><td>0.128</td><td>0.356</td></tr><tr><td>CoT</td><td>0.757</td><td>0.397</td><td>0.444</td><td>0.331</td><td>0.059</td><td>0.397</td></tr><tr><td rowspan="3">GPT-4o</td><td>Zero</td><td>0.858</td><td>0.451</td><td>0.453</td><td>0.291</td><td>0.060</td><td>0.423</td></tr><tr><td>Few</td><td>0.874</td><td>0.495</td><td>0.561</td><td>0.525</td><td>0.123</td><td>0.515</td></tr><tr><td>CoT</td><td>0.865</td><td>0.506</td><td>0.357</td><td>0.354</td><td>0.084</td><td>0.433</td></tr><tr><td rowspan="3">Gemini 1.5 Flash</td><td>Zero</td><td>0.875</td><td>0.368</td><td>0.554</td><td>0.355</td><td>0.065</td><td>0.443</td></tr><tr><td>Few</td><td>0.847</td><td>0.420</td><td>0.648</td><td>0.480</td><td>0.163</td><td>0.512</td></tr><tr><td>CoT</td><td>0.871</td><td>0.419</td><td>0.308</td><td>0.358</td><td>0.109</td><td>0.413</td></tr><tr><td rowspan="3">Gemini 1.5 Pro</td><td>Zero</td><td>0.884</td><td>0.485</td><td>0.544</td><td>0.313</td><td>0.106</td><td>0.467</td></tr><tr><td>Few</td><td>0.866</td><td>0.532</td><td>0.668</td><td>0.464</td><td>0.206</td><td>0.547</td></tr><tr><td>CoT</td><td>0.880</td><td>0.403</td><td>0.180</td><td>0.278</td><td>0.090</td><td>0.366</td></tr><tr><td rowspan="3">Claude 3.5 Sonnet v2</td><td>Zero</td><td>0.891</td><td>0.535</td><td>0.681</td><td>0.479</td><td>0.220</td><td>0.561</td></tr><tr><td>Few</td><td>0.829</td><td>0.503</td><td>0.643</td><td>0.553</td><td>0.360</td><td>0.578</td></tr><tr><td>CoT</td><td>0.876</td><td>0.515</td><td>0.596</td><td>0.389</td><td>0.174</td><td>0.510</td></tr><tr><td>CLIP Classifier</td><td>Baseline</td><td>0.905</td><td>0.176</td><td>0.627</td><td>0.615</td><td>0.642</td><td>0.593</td></tr></table>
278
+
279
+ Table 6: Results for Coherence Relation Prediction on the CLUE Multi-Label dataset. The Coherence Relations predicted are Visible, Subjective (Subj), Action, Story and Meta with multiple relations being applicable to a single image-text pair.
280
+
281
+ # A Data Preparation
282
+
283
+ This section sheds light on the methods used while preparing all the datasets mentioned in this paper for model evaluation. We verify all three datasets used to construct this benchmark have a permissive license that allows usage for research purposes without restrictions (DisRel - MIT License, Tweet Subtitles - MIT License, CLUE - Sourced from Conceptual Captions and free for research use).
284
+
285
+ # A.1 DisREL
286
+
287
+ Due to limited number of samples in the Unrelated category, these image-text pairs were discarded from our train and test set. All placeholder instances of $\langle \mathsf{URL} \rangle$ were removed from the text as a part of our data cleaning.
288
+
289
+ # A.2 Tweet Subtitles
290
+
291
+ This dataset contains two types of captions for tweets: actual and text generated by an image captioning model. We use only the actual caption as part of our evaluation.
292
+
293
+ ![](images/f67c265317f14e842f59071d7164e1fcbf31e869a60dff925f35377727ed4e33.jpg)
294
+ Figure 4: An overview of the Image-Text Label (i.e., Coherence Relations) distribution across CLUE ML
295
+
296
+ # A.3 CLUE
297
+
298
+ The labels other than the ones mentioned in Section 3.3 were disregarded from our train and test set for both settings, due to the lack of examples. We construct the CLUE Single-Label dataset with the same heuristic used by Alikhani et al. (2020):
299
+
300
+ Step 1: If the set contains a Meta relation, assign it to the image-text pair. Else, proceed to the next step.
301
+
302
+ Step 2: If the set contains a Visible relation and doesn't contain either a Meta or Subjective relation, assign it to the image-text pair. Else, proceed to the next step.
303
+
304
+ Step 3: If none of the above rules are met, randomly sample one relation from the 5 available, and assign it to the pair.
305
+
306
+ # B Model Availability
307
+
308
+ This section focuses on the details of model availability and parameters, that we use in Section 4.1. For all models, we set temperature to 0 or do_sample=False, maximum output tokens to 512 and the random seed set to 42, wherever possible to ensure reproducibility. The model responses in this paper were collected between January 12, 2025 and February 12, 2025.
309
+
310
+ # B.1 Proprietary Models
311
+
312
+ OpenAI GPT: We access the GPT-4o model via the official OpenAI API. We evaluate gpt-4o-2024-08-06.
313
+
314
+ Anthropic Claude: We access Claude 3.5 Sonnet v2 via the Vertex AI API, using Google Cloud. We evaluate claude-3-5-sonnet-v2@20241022.
315
+
316
+ Google Gemini: We access Gemini 1.5 Flash and Gemini 1.5 Pro via the Vertex AI API, using Google Cloud. We evaluate gemini-1.5-flash-002 and gemini-1.5-pro-002.
317
+
318
+ # B.2 Open Source Models
319
+
320
+ We evaluate models published on Huggingface Hub. LLaVA 1.6 34B and Llama 3.2 11B Vision were evaluated using the LMDeploy<sup>1</sup> framework. We evaluate Qwen2-VL using code released by the authors. All other models, were evaluated using the VLLM<sup>2</sup> framework. Refer to Table 7 for the models we evaluate.
321
+
322
+ <table><tr><td>Model</td><td>Model ID</td></tr><tr><td>InternVL 2.5 26B</td><td>OpenGVLab/InternVL2_5-26B</td></tr><tr><td>Llama 3.2 Vision 11B</td><td>meta-llama/Llama-3.2-11B-Vision-Instruct</td></tr><tr><td>LLaVA 1.6 7B</td><td>llava-hf/llava-v1.6-mistral-7b-hf</td></tr><tr><td>LLaVA 1.6 13B</td><td>llava-hf/llava-v1.6-vicuna-13b-hf</td></tr><tr><td>LLaVA 1.6 34B</td><td>liuhaotian/llava-v1.6-34b</td></tr><tr><td>LLaVA OneVision 7B</td><td>llava-hf/llava-onevision-qwen2-7b-ov-hf</td></tr><tr><td>Phi 3.5 Vision</td><td>microsoft/Phi-3.5-vision-instruct</td></tr><tr><td>Qwen2-VL-7B</td><td>Qwen/Qwen2-VL-7B-Instruct</td></tr><tr><td>Claude 3.5 Sonnet v2</td><td>claude-3-5-sonnet-v2@20241022</td></tr><tr><td>GPT-4o</td><td>gpt-4o-2024-08-06</td></tr><tr><td>Gemini 1.5 Flash</td><td>gemini-1.5-flash-002</td></tr><tr><td>Gemini 1.5 Pro</td><td>gemini-1.5-pro-002</td></tr></table>
323
+
324
+ Table 7: MLLMs we evaluate in this paper. For open-source models, this table shows the model names in Huggingface.
325
+
326
+ # C MLLM Evaluation Details
327
+
328
+ This section provides details about the evaluation task (RQ1) mentioned in Section 4.1.
329
+
330
+ # C.1 Prompt Templates
331
+
332
+ As mentioned in Section 4.3, we make use of Zero-Shot, Few-Shot and Chain of Thought prompting for evaluation. Every prompting strategy utilizes three different messages:
333
+
334
+ - System Message: We explain the task and the definitions of each Coherence Relation present in the dataset being evaluated.
335
+ - User Message: This message is used to reiterate the task again, along with the required output format. The image and text that needs to be evaluated, is also added here.
336
+
337
+ - Assistant Message: We use this optional message for certain models, to guide its responses towards the intended output format.
338
+
339
+ The different prompts and system messages used on each data source as mentioned in Section 3.3, is present in the appendix.
340
+
341
+ # C.2 Few Shot Prompting
342
+
343
+ In this prompting strategy, we utilize user-assistant message pairs that are inserted right after the user message which specifies output format. For the Tweet Subtitles and CLUE Single-Label datasets, we utilize 5-shot examples to include all possible coherence relations. In the case of CLUE Multi-Label and DisREL, we utilize 6-shot examples and 2-shot examples respectively.
344
+
345
+ We do not evaluate LLaVA 1.67B and 13B using this prompting technique, as our prompt (text + multimodal tokens) does not fit into the context length (4096) of these models.
346
+
347
+ # C.3 Chain-of-Thought Prompting
348
+
349
+ We instruct the model to analyze the image-text pair, before assigning a Coherence Relation in this prompting strategy. We incorporate the instruction "Let's think step by step", to make the model respond with concise sentences that detail its reasoning process.
350
+
351
+ # C.4 Preprocessing Images for Claude
352
+
353
+ We noticed that some images were above the 5 MB per file size limit imposed by Anthropic for their API. As per their recommendations, we evaluate Claude on images that are resized to 1.3 megapixels, while preserving the aspect ratio.
354
+
355
+ # C.5 Postprocessing MLLM Responses
356
+
357
+ In the case of single-label datasets, we remove instances of the phrase "Coherence Relation:" along with other punctuation and whitespace. If there exists only one occurrence of a particular coherence relation, we use that as the prediction result for the image-text pair.
358
+
359
+ While working with CLUE Multi-Label responses, we remove instances of the phrase "Coherence Relations:". All valid JSON in the response is parsed using regular expressions. If the output format is comma-separated values, those responses are parsed appropriately.
360
+
361
+ After this, if we cannot find any valid label for an image-text pair from the MLLM's response, we discard the sample from our test set. To ensure test set consistency, we discarded around 200 samples across all datasets and calculated the final evaluation metrics as mentioned in Section 4.2.
362
+
363
+ # D MLLM Verification Details
364
+
365
+ This section provides details about the verification task (RQ2) mentioned in Section 4.1.
366
+
367
+ # D.1 Prompt Templates
368
+
369
+ For this task, we utilize a Chain-of-Thought prompting strategy. Each model is given the same system message as before, but along with the image-text pair, we also give the ground truth Coherence Relation. The model is then asked to respond with a True/False answer, along with its rationale for its response.
370
+
371
+ # D.2 Preprocessing Images for Claude
372
+
373
+ We use the same strategy as mentioned in Section C.4, only for the images that don't come under the file size limit.
374
+
375
+ # D.3 Postprocessing MLLM Responses
376
+
377
+ We parse boolean values from each MLLM response, and assign False to an image-text pair, only if there is any occurrence of the same. For CLUE ML, we provide only overall verification accuracies since it is a multi-label verification problem.
378
+
379
+ # E Fine-tuning Details
380
+
381
+ We fine-tune LLaMA 3.2 Vision 11B Instruct (unsloth/Llama-3.2-11B-Vision-Instruct in Huggingface) using the Unsloth<sup>3</sup> framework. We opted for this framework due to its memory efficiency and rapid fine-tuning capabilities. We perform Parameter Efficient Fine-Tuning (PEFT) of all layers (Vision & Language) and modules (Attention & MLP) present. We use the hyperparameters mentioned in Section E.1 on each dataset for fine-tuning. Other parameters have been initialized to their default values.
382
+
383
+ # E.1 Hyperparameters
384
+
385
+ # Common Parameters
386
+
387
+ - LoRA Parameters: $r = 16$
388
+ - num_train_epochs = 3
389
+
390
+ <table><tr><td>Model</td><td>Prompt</td><td>Sim</td><td>Compl</td><td>Macro F1</td></tr><tr><td rowspan="2">FT-Llama 3.2 Vision 11B</td><td>Zero</td><td>0.629</td><td>0.620</td><td>0.625</td></tr><tr><td>Few</td><td>0.673</td><td>0.327</td><td>0.500 ↓20.0%</td></tr><tr><td rowspan="2">Llama 3.2 Vision 11B</td><td>Zero</td><td>0.388</td><td>0.635</td><td>0.512</td></tr><tr><td>Few</td><td>0.509</td><td>0.479</td><td>0.494 ↓3.5%</td></tr></table>
391
+
392
+ Table 8: Per-class Coherence Relation Prediction of Fine-tuned LLama 3.2 Vision 11B (FT-Llama) on the DisRel dataset. The coherence relations predicted are Similar and Complementary.
393
+
394
+ <table><tr><td>Model</td><td>Prompt</td><td>Ins</td><td>Concr</td><td>Proj</td><td>Restmt</td><td>Ext</td><td>Macro F1</td></tr><tr><td rowspan="2">FT-Llama 3.2 Vision 11B</td><td>Zero</td><td>0.440</td><td>0.853</td><td>0.045</td><td>0.042</td><td>0.148</td><td>0.306</td></tr><tr><td>Few</td><td>0.231</td><td>0.752</td><td>0.213</td><td>0.100</td><td>0.254</td><td>0.310 ↑1.3%</td></tr><tr><td rowspan="2">Llama 3.2 Vision 11B</td><td>Zero</td><td>0.000</td><td>0.779</td><td>0.000</td><td>0.093</td><td>0.000</td><td>0.175</td></tr><tr><td>Few</td><td>0.035</td><td>0.388</td><td>0.000</td><td>0.092</td><td>0.113</td><td>0.126 ↓28.0%</td></tr></table>
395
+
396
+ Table 9: Per-class Coherence Relation Prediction of Fine-tuned LLama 3.2 Vision 11B (FT-Llama) on the Tweet Subtitles dataset. The Coherence Relations predicted are Insertion (Ins), Concretization (Concr), Projection (Proj), Restatement (Restmt) and Extension (Ext).
397
+
398
+ <table><tr><td>Model</td><td>Prompt</td><td>Visible</td><td>Subj</td><td>Action</td><td>Story</td><td>Meta</td><td>Macro F1</td></tr><tr><td rowspan="2">FT-Llama 3.2 Vision 11B</td><td>Zero</td><td>0.547</td><td>0.074</td><td>0.042</td><td>0.045</td><td>0.004</td><td>0.142</td></tr><tr><td>Few</td><td>0.516</td><td>0.230</td><td>0.053</td><td>0.228</td><td>0.155</td><td>0.236 ↑66.2%</td></tr><tr><td rowspan="2">Llama 3.2 Vision 11B</td><td>Zero</td><td>0.537</td><td>0.136</td><td>0.098</td><td>0.023</td><td>0.000</td><td>0.159</td></tr><tr><td>Few</td><td>0.542</td><td>0.000</td><td>0.026</td><td>0.000</td><td>0.000</td><td>0.114 ↓28.3%</td></tr></table>
399
+
400
+ Table 10: Per-class Coherence Relation Prediction of Fine-tuned LLama 3.2 Vision 11B (FT-Llama) on the CLUE Single-Label dataset. The Coherence Relations predicted are Visible, Subjective (Subj), Action, Story and Meta
401
+
402
+ <table><tr><td>Model</td><td>Prompt</td><td>Visible</td><td>Subj</td><td>Action</td><td>Story</td><td>Meta</td><td>Macro F1</td></tr><tr><td rowspan="2">FT-Llama 3.2 Vision 11B</td><td>Zero</td><td>0.864</td><td>0.228</td><td>0.520</td><td>0.287</td><td>0.431</td><td>0.466</td></tr><tr><td>Few</td><td>0.864</td><td>0.158</td><td>0.586</td><td>0.282</td><td>0.549</td><td>0.488 ↑4.7%</td></tr><tr><td rowspan="2">Llama 3.2 Vision 11B</td><td>Zero</td><td>0.869</td><td>0.157</td><td>0.424</td><td>0.349</td><td>0.284</td><td>0.417</td></tr><tr><td>Few</td><td>0.828</td><td>0.248</td><td>0.571</td><td>0.443</td><td>0.499</td><td>0.518 ↑24.2%</td></tr></table>
403
+
404
+ Table 11: Per-class Coherence Relation Prediction of Fine-tuned LLama 3.2 Vision 11B (FT-Llama) on the CLUE Multi-Label dataset. The Coherence Relations predicted are Visible, Subjective (Subj), Action, Story and Meta with multiple relations being applicable to a single image-text pair.
405
+
406
+ - warmup_steps = 100 since our train sets are relatively small.
407
+ per_device_train_batch_size = 32
408
+ gradient Accumulation_steps = 1
409
+ - dtype = torch.float16
410
+ - optim = adamw_torch
411
+ - weight_Decay = 0.01
412
+ - lr_scheduler_type = cosine
413
+
414
+ # DisREL
415
+
416
+ - LoRA Parameters: lora_alpha=16
417
+ - Learning Rate $= 1{e}^{-5}$
418
+
419
+ # Tweet Subtitles
420
+
421
+ - LoRA Parameters: lora_alpha=16
422
+ - Learning Rate $= 1e^{-5}$
423
+
424
+ # CLUE Single-Label
425
+
426
+ - LoRA Parameters: lora_alpha=16
427
+ - Learning Rate $= 1e^{-5}$
428
+
429
+ # CLUE Multi-Label
430
+
431
+ - LoRA Parameters: lora_alpha=8
432
+ - Learning Rate $= 1e^{-7}$
433
+
434
+ # E.2 Train Set Preparation for CLUE
435
+
436
+ During experimentation, we noticed that models fine-tuned on CLUE Single-Label and Multi-Label, tend to skew their responses towards the majority classes (Visible, Story and Meta) in the dataset. In order to curb this behavior, we decided to randomly sample 200 examples from the CLUE Single-Label train set for these coherence relations alone. The same image-text pairs were used for the multi-label setting as well.
437
+
438
+ # F Baseline Classifier Details
439
+
440
+ As mentioned in Section 3.4, we employ CLIP Text and Image Encoders (openai/clip-vit-large-patch14 in Huggingface) in a zero-shot manner to extract multi-modal embeddings. These embeddings are then concatenated together, to form a tensor of size 1536. This multi-modal tensor is then passed through a Multi-Layer Perceptron with two hidden layers of size 512 and 256, along with an output layer equal to the number of Coherence Relations in each dataset. The MLP uses RELU in between each layer for introducing non-linearity, and a Dropout of 0.2 between the first two layers.
441
+
442
+ A validation split of $10\%$ was created from the train sets. The DisREL, Tweet Subtitles and CLUE Single-Label classifiers were trained using the Cross Entropy Loss, whereas the CLUE MultiLabel classifier used the Binary Cross Entropy Loss along with a Sigmoid Layer. Due to the large
443
+
444
+ class imbalance in CLUE Single-Label, we use a weighted loss function in that classifier alone. Every model was trained with a batch size of 32, using the Adam Optimizer and a learning rate of $1e^{-5}$ . Table 12 shows the number of epochs, for which each classifier was trained in every setting.
445
+
446
+ <table><tr><td>Dataset</td><td>Number of Epochs</td></tr><tr><td>DisREL</td><td>15</td></tr><tr><td>Tweet Subtitles</td><td>25</td></tr><tr><td>CLUE Single-Label</td><td>25</td></tr><tr><td>CLUE Multi-Label</td><td>50</td></tr></table>
447
+
448
+ Table 12: Number of epochs for which each classifier was trained.
449
+
450
+ # G Computational Resources
451
+
452
+ To evaluate and fine-tune open-source models, we use 2 NVIDIA H100 80GB HBM3 and 2 NVIDIA A100 SXM4 GPUs for around two days worth of computation.
453
+
454
+ # System Message for DisREL
455
+
456
+ You are an expert linguist and your task is to predict the Coherence Relations of a given image-text pair. A coherence relation captures the structural, logical, and purposeful relationships between an image and its text, capturing the author's intent.
457
+
458
+ These are the possible coherence relations you can assign to an image-text pair:
459
+
460
+ - Similar: The image and text provide the same information and share the same focus. There exists significant overlap in information conveyed between modalities.
461
+ - Complementary: The image and text do not provide the same information or share the same focus but one modality helps understand the other better.
462
+
463
+ # System Message for Tweet Subtitles
464
+
465
+ You are an expert linguist and your task is to predict the Coherence Relations of a given image-text pair. A coherence relation captures the structural, logical, and purposeful relationships between an image and its text, capturing the author's intent.
466
+
467
+ These are the possible coherence relations you can assign to an image-text pair:
468
+
469
+ - Insertion: The salient object described in the image is not explicitly mentioned in the text.
470
+ - Concretization: Both the text and image contain a mention of the main visual entity.
471
+ - Projection: The main entity mentioned in the text is implicitly related to the visual objects present in the image.
472
+ - Restatement: The text directly describes the image contents.
473
+ - Extension: The image expands upon the story or idea in the text, presenting new elements or elaborations, effectively filling in narrative gaps left by the text.
474
+
475
+ # System Message for CLUE Single-Label and Multi-Label
476
+
477
+ You are an expert linguist and your task is to predict the Coherence Relations of a given image-text pair. A coherence relation captures the structural, logical, and purposeful relationships between an image and its text, capturing the author's intent.
478
+
479
+ These are the possible coherence relations you can assign to an image-text pair:
480
+
481
+ - Visible: The text presents information that is intended to recognizably characterize what is depicted in the image.
482
+ - Action: The text describes an extended, dynamic process of which the moment captured in the image is a representative snapshot.
483
+ - Meta: The text allows the reader to draw inferences not just about the scene depicted in the image but about the production and presentation of the image itself.
484
+ - Subjective: The text provides information about the speaker's reaction to, or evaluation of, what is depicted in the image.
485
+ - Story: The text provides a free-standing description of the circumstances depicted in the image, analogous to including instructional, explanatory and other background relations.
486
+
487
+ Zero/Few Shot Prompt for DisREL, Tweet Subtitles and CLUE Single-Label
488
+
489
+ # System
490
+
491
+ <insert-system-message>
492
+
493
+ # User
494
+
495
+ Based on provided information, predict the most applicable Coherence Relation for the next image-text pair. Output only one relation (<insert-coherence-relations>) and do not include any other information in your response.
496
+
497
+ Use the format "Coherence Relation: <insert-coherence-relation>" for your response.
498
+
499
+ (Added to finetuned LLaMA 3.2 Vision's prompt in CLUE Single-Label, to enhance output format adherence.)
500
+
501
+ <add-few-shot-examples>
502
+
503
+ <insert-image-text-pair>
504
+
505
+ # Assistant
506
+
507
+ Coherence Relation:
508
+
509
+ CoT Prompt for DisREL, Tweet Subtitles and CLUE Single-Label
510
+
511
+ # System
512
+
513
+ <insert-system-message>
514
+
515
+ # User
516
+
517
+ Before assigning a coherence relation, let's think step by step and analyze the image-text pair in depth.
518
+
519
+ <insert-image-text-pair>
520
+
521
+ # Assistant
522
+
523
+ Analysis: <add-analysis-from-model>
524
+
525
+ # User
526
+
527
+ Based on provided information, predict the most applicable Coherence Relation for the next image-text pair. Output only one relation (<insert-coherence-relations>) and do not include any other information in your response.
528
+
529
+ # Assistant
530
+
531
+ Coherence Relation:
532
+
533
+ Zero/Few Shot Prompt for CLUE Multi-Label
534
+
535
+ # System
536
+
537
+ <insert-system-message>
538
+
539
+ # User
540
+
541
+ Based on provided information, predict the correct Coherence Relations for the next image-text pair. Output them as a JSON value to the key "labels" and do not include any other information in your response. (Default output format for all models)
542
+
543
+ Give your predicted labels as comma separated values. Do not include any other information in your response.
544
+
545
+ (Alternate output format for LLaMA 3.2, Phi 3.5, Qwen2-VL and LLaVA-OneVision)
546
+
547
+ Use the format "Coherence Relation: <insert-coherence-relation>" for your response.
548
+
549
+ (Added to LLaVA 1.6 13B prompt to enhance output format adherence.)
550
+
551
+ <add-few-shot-examples>
552
+
553
+ <insert-image-text-pair>
554
+
555
+ # Assistant
556
+
557
+ Coherence Relations:
558
+
559
+ # CoT Prompt for CLUE Multi-Label
560
+
561
+ # System
562
+
563
+ <insert-system-message>
564
+
565
+ # User
566
+
567
+ Before assigning a coherence relation, let's think step by step and analyze the image-text pair in depth.
568
+
569
+ # <insert-image-text-pair>
570
+
571
+ # Assistant
572
+
573
+ Analysis: <add-analysis-from-model>
574
+
575
+ # User
576
+
577
+ Now, using your analysis, predict the correct Coherence Relations for the image-text pair. Output them as a JSON value to the key "labels" and do not include any other information in your response. (Default output format for all models)
578
+
579
+ Give your predicted labels as comma separated values. Do not include any other information in your response.
580
+
581
+ (Alternate output format for LLaMA 3.2, Phi 3.5, Qwen2-VL and LLaVA OneVision)
582
+
583
+ Use the format "Coherence Relation: <insert-coherence-relation>" for your response.
584
+
585
+ (Added to LLaVA 1.6 13B prompt to enhance output format adherence.)
586
+
587
+ # Assistant
588
+
589
+ Coherence Relations:
590
+
591
+ # Verification Prompt Template
592
+
593
+ # System
594
+
595
+ <insert-system-message>
596
+
597
+ # User
598
+
599
+ Based on provided information, reply True (if appropriate) or False (if not appropriate) for the following image-text pair. Give your rationale behind it.
600
+
601
+ <insert-image-text-pair>
602
+
603
+ <insert-coherence-relation>
604
+
605
+ Sample Assistant Response
606
+
607
+ <True/False>
608
+
609
+ Rationale: <model-response>
2025/CORDIAL_ Can Multimodal Large Language Models Effectively Understand Coherence Relationships_/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5012d33d7c1101389396a472404c421c691ef598bb392fd8da9e41827c7086e5
3
+ size 907252
2025/CORDIAL_ Can Multimodal Large Language Models Effectively Understand Coherence Relationships_/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/COSMMIC_ Comment-Sensitive Multimodal Multilingual Indian Corpus for Summarization and Headline Generation/c75c13af-c009-4e64-acf0-2df9fea2af96_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/COSMMIC_ Comment-Sensitive Multimodal Multilingual Indian Corpus for Summarization and Headline Generation/c75c13af-c009-4e64-acf0-2df9fea2af96_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/COSMMIC_ Comment-Sensitive Multimodal Multilingual Indian Corpus for Summarization and Headline Generation/c75c13af-c009-4e64-acf0-2df9fea2af96_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eaa3e261dc08b2de00c4efbd936156334fbf3a0b4077cb90198cfaac4d59664c
3
+ size 2424803
2025/COSMMIC_ Comment-Sensitive Multimodal Multilingual Indian Corpus for Summarization and Headline Generation/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2025/COSMMIC_ Comment-Sensitive Multimodal Multilingual Indian Corpus for Summarization and Headline Generation/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:feb6f4093dde670d933a70027de706094ebb2e4a8cc21d26147313dd4cc8fb6f
3
+ size 1564320
2025/COSMMIC_ Comment-Sensitive Multimodal Multilingual Indian Corpus for Summarization and Headline Generation/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/CRUXEVAL-X_ A Benchmark for Multilingual Code Reasoning, Understanding and Execution/c417d4e9-7396-4bb9-816a-1fb652465a1c_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/CRUXEVAL-X_ A Benchmark for Multilingual Code Reasoning, Understanding and Execution/c417d4e9-7396-4bb9-816a-1fb652465a1c_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/CRUXEVAL-X_ A Benchmark for Multilingual Code Reasoning, Understanding and Execution/c417d4e9-7396-4bb9-816a-1fb652465a1c_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f3dad3071a38dfea90a109b80fd4561d90f4a71e841ff7f4d43ce90d99c2a7ab
3
+ size 1377543
2025/CRUXEVAL-X_ A Benchmark for Multilingual Code Reasoning, Understanding and Execution/full.md ADDED
@@ -0,0 +1,732 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CRUXEVAL-X: A Benchmark for Multilingual Code Reasoning, Understanding and Execution
2
+
3
+ Ruiyang Xu $^{1,2,*}$ , Jialun Cao $^{3,*}$ , Yaojie Lu $^{1,\dagger}$ , Ming Wen $^{4}$ , Hongyu Lin $^{1}$ , Xianpei Han $^{1,2}$ , Ben He $^{1,2,\dagger}$ , Shing-Chi Cheung $^{3}$ , Le Sun $^{1,2}$
4
+
5
+ $^{1}$ Chinese Information Processing Laboratory, Institute of Software, Chinese Academy of Sciences
6
+ $^{2}$ University of Chinese Academy of Sciences $^{3}$ The Hong Kong University of Science and Technology
7
+ $^{4}$ Huazhong University of Science and Technology
8
+ {xuruiyang2022, luyaojie, hongyu, xianpei, sunle}@iscas.ac.cn
9
+ {jcaoap, scc}@cse.ust.hk mwenaa@hust.edu.cn benhe@ucas.edu.cn
10
+
11
+ # Abstract
12
+
13
+ Code benchmarks such as HumanEval are widely adopted to evaluate Large Language Models' (LLMs) coding capabilities. However, there is an unignorable programming language bias in existing code benchmarks – over $95\%$ code generation benchmarks are dominated by Python, leaving the LLMs' capabilities in other programming languages such as Java and $\mathrm{C / C + + }$ unknown. Moreover, coding task bias is also crucial. Most benchmarks focus on code generation capability, while benchmarks for code reasoning (given input, reasoning output; and given output, reasoning input), an essential coding capability, are insufficient. Yet, constructing multi-lingual benchmarks can be expensive and labor-intensive, and codes in contest websites such as Leetcode suffer from data contamination during training. To fill this gap, we propose CRUXEVAL-X, a multi-lingual code reasoning benchmark that contains 19 programming languages. It comprises at least 600 subjects for each language, along with 19K content-consistent tests in total. In particular, the construction pipeline of CRUXEVAL-X works in a fully automated and test-guided manner, which iteratively generates and repairs based on execution feedback. Also, to cross language barriers (e.g., dynamic/static type systems in Python/C++, we formulated various transition rules between language pairs to facilitate translation. Our extensive evaluation of 24 representative LLMs reveals the correlation between language pairs. For example, TypeScript and JavaScript show a significant positive correlation, while Racket has less correlation with other languages. More interestingly, even a model trained solely on Python can achieve at most $34.4\%$ Pass@1 in other languages, revealing the cross-language generalization of LLMs.
14
+
15
+ # 1 Introduction
16
+
17
+ Large language models (LLMs) have shown ad
18
+
19
+ *These authors contributed equally to this work.
20
+ † Corresponding authors.
21
+
22
+ ![](images/b3593223c449f301b653d0598322ecee8c917a4b6f9d69781b34a7980f7774dc.jpg)
23
+ Figure 1: Code generation vs. Code reasoning
24
+
25
+ vanced proficiency in various domains, including code generation (Liu et al., 2024; Du et al., 2024), defect detection (Yang et al., 2024a) and program repair (Xia and Zhang, 2023; Zhong et al., 2024; Hu et al., 2024). Benchmarks such as HumanEval (Chen et al., 2021) and SWEBench (Jimenez et al., 2023) were introduced to measure LLMs' capabilities, providing insights into LLMs' strengths and weaknesses.
26
+
27
+ Recent studies (Cao et al., 2024a; Chai et al., 2024; Chen et al., 2024) have spotted two significant biases in current benchmarks. First, Programming language bias. As pointed out by prior studies (Cao et al., 2024a; Chai et al., 2024; Chen et al., 2021; Austin et al., 2021), Python dominates code generation benchmarks with over $95\%$ involvement. Other programming languages (PLs) such as Java and $\mathrm{C / C + + }$ , despite their popularity and availability, gain less exploration. Second, Coding task bias. Most coding benchmarks focus on code generation tasks (i.e., giving descriptions in natural language and generating the program, as shown in Figure 1 (A)), while code reasoning (i.e., given
28
+
29
+ the program, reasoning the input or output of the program, as shown in Figure 1 (B - D)) is seldom evaluated (Chen et al., 2024). A recent work introduced a code reasoning benchmark (Gu et al., 2024; Chen et al., 2024), while it is only in Python. Figure 1 (C - D) shows that simply changing PLs from Python to $\mathrm{C + + }$ can turn a correct reasoning into an incorrect one. More discussion about this task can be found in Appendix J.
30
+
31
+ However, constructing multi-lingual benchmarks is not a trivial task. First, human annotation can be expensive. As reported by recent work (Chai et al., 2024), they spent a total of $12,000 US dollars for human annotators, providing the working environment, free meals, souvenirs, and free GPT-4 interface usage to construct their multi-lingual benchmark. Second, automated translation does not perform well. The latest studies (Yin et al., 2024) show that even the best LLM (i.e., ChatGPT) can only achieve an average of $64\%$ success translation rate, which is far from practice. Rule-based translation (Cassano et al., 2023; Ling et al., 2022) usually suffers from generalizability issues, making them limited in handling prescribed code structures. Additionally, multi-lingual solutions from contest websites such as LeetCode and Codeforces were included in most LLMs training sources, thus suffering from data contamination issues (Cao et al., 2024b).
32
+
33
+ To fill the above research gaps, we introduce CRUXEval-X, a multi-lingual code reasoning benchmark that contains 19 popular PLs, including C++, Rust, Java, etc., expanded from CruxEval (Gu et al., 2024), a code reasoning benchmark written in Python. For each PL in CRUXEval-X, there are at least $600+$ functions. Additionally, there are 500 samples that are fully aligned across all PLs. In total, there are 12,660 subjects along with 19K test cases for input/output reasoning.
34
+
35
+ Noteworthy that the pipeline of constructing CRUXEval-X works in a fully automated manner. It first translates the test cases by transition rules adapted from prior work (Cassano et al., 2023), then iterates the generation-and-repair process intensively. In particular, the transition rules are formulated to cross the language barriers. For example, Python employs a dynamically typed system where types are determined at runtime, whereas $\mathrm{C} + +$ uses a statically typed system requiring explicit type declarations at compile time. The rules facilitate the translation of the test cases. Additionally, inspired by prior work (Yin et al., 2024;
36
+
37
+ Rozière et al., 2022), we employ a test-guided manner (Rozière et al., 2022) to generate the translation and iteratively repair the generated code using execution feedback (e.g., compilation error, runtime error) (Yin et al., 2024).
38
+
39
+ Through extensive experiments on 24 mainstream LLMs, we observe several interesting findings. First, in multiple PLs, the input reasoning and output reasoning capabilities of LLMs are comparable. Also, there is a noticeable correlation between certain PLs (e.g., JavaScript and TypeScript show a positive correlation, while Racket consistently yields the worst results). More interestingly, we observe that even if a model is only trained on Python (e.g., phi-1 and phi-1.5), it still can reach a $16\% \sim 26\%$ output reasoning success rate in other PLs, compared with $25.6\%$ in Python. The finding indicates the cross-language generalization of LLMs.
40
+
41
+ The contributions can be summarized as follows: (1) We introduce CRUXEval-X, a multi-lingual code reasoning benchmark that contains 19 popular PLs. (2) We introduce an automated code translation pipeline that adopts a test-guided and iterative generate-and-repair practice. (3) We evaluate $20+$ LLMs and yield inspiring findings.
42
+
43
+ # 2 Benchmark Construction
44
+
45
+ In this section, we describe the construction process of CRUXEVAL-X, illustrated in Figure 2, which is adapted from CRUXEVAL. It can be divided into three main steps. First, we translate function signatures via mapping variable type annotations (Step 1 in Figure 2). Then we employ a rule-based approach to translate Python test cases into other PLs (Step 2 in Figure 2). Finally, we integrate multiple LLMs to translate code by iterating the generation-and-repair process (Step 3 in Figure 2).
46
+
47
+ # 2.1 Step I. Function Signature Translation
48
+
49
+ To enhance the accuracy and standardization of function translation results, we first translate the function signatures and dependencies. Note that Python does not require an explicit type annotation, which may confuse the translation for the function signature. For example, as shown in Figure 2 Step I, the types of two input parameters (i.e., s1 and s2) are unclear. So we extract the input variables from the function signature using the syntax tree and match them with the tests. Based on the variable types in the tests, we annotate the input and output
50
+
51
+ ![](images/f644870126048f7411dd28d136422859d55e08ede17a39edd911361639bb73bf.jpg)
52
+ Figure 2: The pipeline of CruxEval-X construction.
53
+
54
+ variables in the function signature.
55
+
56
+ Then, we adopt the rules as prior work (Cassano et al., 2023) to map the types from Python to other PLs. In particular, we identify the data types in the annotated Python signature (e.g., parameter types, return types), mapping the types from Python to other PLs according to the rules, then structuring the signature in the corresponding PLs. Take the example in Figure 2 Step I, the Python signature def f(s1:str, s2:str) -> str is translated into that in C++ (std::string f(std::string s1, std::string s2). After translating the tests, all 800 subjects in Python can be translated, as shown in Table 1.
57
+
58
+ # 2.2 Step II. Test Suites Translation
59
+
60
+ We employ a test-guided approach to ensure the correctness of the translation results, which necessitates test cases in various PLs. Prior works (Athiwaratkun et al., 2022; Cassano et al., 2023) provided various rules for mapping Python test cases to other PLs. We adopt the mapping rules from MultiPL-E (Cassano et al., 2023) to assist the transition of our test suites.
61
+
62
+ However, their rules have limited support for type handling (e.g., they cannot handle a list with hybrid types). Thus, to maximize the success rate, we made two improvements to enhance the rules. First, we enhance handling structured types such as List and Dict. For example, when handling C#, we add an equality function to check whether two Dict types are equal. Second, when dealing with variables that have complex types that
63
+
64
+ are not as well-supported in some other PLs, we transform these variables into more generic types without significantly altering the original function's functionality. For example, we change type List[Union(str, int)] into List(str) if the function keeps the same functionality. A small portion of the data that cannot be converted is discarded. The result of Step II is shown in Table 1. Further details can be found in the Appendix B.
65
+
66
+ # 2.3 Step III. Iterative Generation & Repair
67
+
68
+ After translating tests, dependencies, and signatures, we employ multiple LLMs to iteratively translate Python code into target PLs. Each LLM performs two steps: generation and repair. Problems that pass all test cases are excluded from subsequent iterations. Below, we will elaborate on these two substeps in detail.
69
+
70
+ # 2.3.1 Generation
71
+
72
+ Relying on a single LLM's limited generations often results in a low translation success rate (Yin et al., 2024). To address this, we propose a multi-round generation method that interacts with the testing environment to determine whether to continue iterating.
73
+
74
+ Let $A_0$ denote the number of correctly translated codes, and $U$ the total number of problems. For unresolved problems, LLM $M$ generates results over multiple rounds. Let $A_i$ represent the number of correct results in the $i$ -th round. The maximum rounds is $N$ . Early stopping occurs if the increase in correct results compared to $k$ rounds prior, $A_{i-k}$ ,
75
+
76
+ falls below a threshold $\delta$ . The formula is as follows:
77
+
78
+ $$
79
+ \begin{array}{l} A _ {i} = \operatorname {C o r r e c t} (P (O _ {i} \mid U - A _ {i - 1}; M)) + A _ {i - 1} \\ \text {f o r} i \in \{1, 2, \dots , N \} \\ \text {S t o p i f} (i > k) \text {a n d} \left(A _ {i} - A _ {i - k} < \delta\right) \tag {1} \\ \end{array}
80
+ $$
81
+
82
+ Here, $O_{i}$ is the $i$ -th round code generated from $P(O_{i} \mid U - A_{i-1}; M)$ , and Correct(.) calculate the correct results. To leverage diverse LLMs' strengths, we use GPT-3.5-Turbo for initial generation (see Table 1, "w/o Iter") and DeepseekCoder-33B-Instruct for further generation. This pipeline improves upon single-LLM generation, as demonstrated in our final results. (see Table 1, "w/ Iter")
83
+
84
+ # 2.3.2 Repair
85
+
86
+ Simply generating code will still result in many errors that LLMs cannot solve. Therefore, after the generation step of each LLM, we provide them with error messages for error correction. Multiple iterative error correction is costly with limited benefits. (Chen et al., 2023), so we only perform error correction once after each LLMs.
87
+
88
+ After GPT3.5-Turbo generation, we directly provide the LLM with the erroneous code along with the error messages for correction. After the Iterating Generation of DeepseekCoder-33B-Instruct, since the untranslated code can produce numerous incorrect code snippets after multiple rounds of iteration, which may contain the same errors. We first use simhash to deduplicate the erroneous code and then proceed with error correction on the deduplicated code. The error correction in each phase uses the LLM used in that phase.
89
+
90
+ # 2.3.3 Multiturn Repair Based on Overlap
91
+
92
+ After completing the steps above, we first calculate the intersection of correctly answered questions in different PLs. To our surprise, there were only 333 questions that all PLs answered correctly. However, 563 problems have been successfully translated correctly by at least 16 PLs. Upon analyzing the questions our LLM failed to solve, we find that each PL has its difficulties in translating from Python. For example, in Julia, the index for arrays and other collection types starts from 1, which differs from Python. The details of the difficulties can be found in Appendix C.
93
+
94
+ Based on these observations, we conduct final generation and iterative error correction on the questions that are correctly translated by more than 15 PLs. Due to the small amount of data, we
95
+
96
+ utilized GPT-4o for generation and error correction. During the generation process, we provide the LLM with three corresponding typical examples based on the difficulties we find. The overlap is increased to 462 after repair of GPT-4o.
97
+
98
+ We manually refined 38 questions that GPT-4 nearly solved, expanding our dataset to 500 entries. We determined that 500 entries are sufficient to distinguish the effectiveness of the LLMs. Therefore, we use these 500 entries as our CRUXEVAL-X benchmark. The final result of our pipeline is shown in Table 1 under the column "w/Iter". The experimental setups and prompts can be found in Appendix D, and detail statics of our benchmark is shown in Appendix I.
99
+
100
+ # 2.4 Quality Analysis
101
+
102
+ After constructing the dataset, we evaluate the benchmark's quality from four perspectives. First, Accuracy: We use a test-guided approach to ensure that each data point passes test cases, guaranteeing correctness. Second, Reliability: We build on the high-quality CRUXEVAL dataset, ensuring problems avoid randomness or multi-threading, enhancing reliability. Third, Data Leakage: We compare with Stack v2 (67.5TB of GitHub data), finding only $0.8\%$ overlap, indicating minimal leakage risk. Fourth, Data Bias: We assess potential bias by generating evaluation data with other LLMs using the same method as described above. Results show no significant advantage for any LLM on its own generated data. The possibel reason is the distinct tasks in generation and evaluation phases. Detailed results and analysis are in Appendix A.
103
+
104
+ # 3 Experiments
105
+
106
+ # 3.1 Experiment Setup
107
+
108
+ LLMs for evaluation We selected 24 LLMs across 4 types for evaluation, including general LLMs (GPT-3.5-Turbo, GPT-4o-mini, GPT-4o (Brown et al., 2020; Achiam et al., 2023), Llama3 (AI, 2024), Qwen2 (Yang et al., 2024b), phi-3-instruct (Abdin et al., 2024)), multilingual code $^{1}$ LLMs (Deepseekcoder-V2 (Zhu et al., 2024), Deepseekcoder-V1 (Guo et al., 2024), CodeLlama (Roziere et al., 2023), Starcoder (Li et al., 2023a), Starcoder2 (Lozhkov et al., 2024), CodeQwen1.5-Chat (Bai et al., 2023)), instruction-tuned multilingual LLMs
109
+
110
+ <table><tr><td rowspan="2">Languages</td><td rowspan="2">Step I</td><td rowspan="2">Step II</td><td colspan="2">Step III</td></tr><tr><td>w/o Iter</td><td>w/ Iter</td></tr><tr><td>C# (cs)</td><td>800</td><td>774</td><td>380</td><td>670</td></tr><tr><td>C++ (cpp)</td><td>800</td><td>800</td><td>549</td><td>733</td></tr><tr><td>D (d)</td><td>800</td><td>754</td><td>95</td><td>629</td></tr><tr><td>GO (go)</td><td>800</td><td>752</td><td>293</td><td>699</td></tr><tr><td>Java (java)</td><td>800</td><td>774</td><td>541</td><td>698</td></tr><tr><td>JavaScript (js)</td><td>800</td><td>800</td><td>634</td><td>743</td></tr><tr><td>Julia (jl)</td><td>800</td><td>774</td><td>410</td><td>680</td></tr><tr><td>Lua (lua)</td><td>800</td><td>800</td><td>582</td><td>741</td></tr><tr><td>Perl (pl)</td><td>800</td><td>799</td><td>591</td><td>728</td></tr><tr><td>PHP (php)</td><td>800</td><td>800</td><td>622</td><td>755</td></tr><tr><td>R (r)</td><td>800</td><td>800</td><td>542</td><td>699</td></tr><tr><td>Racket (rkt)</td><td>800</td><td>800</td><td>264</td><td>681</td></tr><tr><td>Ruby (rb)</td><td>800</td><td>800</td><td>658</td><td>748</td></tr><tr><td>Rust (rs)</td><td>800</td><td>754</td><td>449</td><td>690</td></tr><tr><td>Scala (scala)</td><td>800</td><td>799</td><td>462</td><td>712</td></tr><tr><td>Shell (sh)</td><td>800</td><td>763</td><td>528</td><td>674</td></tr><tr><td>Swift (swift)</td><td>800</td><td>796</td><td>415</td><td>654</td></tr><tr><td>TypeScript (ts)</td><td>800</td><td>774</td><td>592</td><td>726</td></tr></table>
111
+
112
+ Table 1: The result of each step, The portion within parentheses in the "Language" column represents the abbreviations for various languages. Due to the constraints of page size, these abbreviations are used to better display certain charts or tables.
113
+
114
+ (Deepseekcoder-instruct-V1 (Guo et al., 2024), WizardCoder (Luo et al., 2023), CodeLlama-Python, CodeLlama-Instruct (Roziere et al., 2023)), and single or few-language code LLMs (CodeGen (Nijkamp et al., 2022), phi-1 (Gunasekar et al., 2023), phi-1.5 (Li et al., 2023b)).
115
+
116
+ Evaluation task We adopt the task settings from prior work (Gu et al., 2024), dividing the tasks into output reasoning and input reasoning. For any PLs dataset, we provide the code along with the corresponding input or output in the test cases. Input reasoning is predicting the input based on the output. Output reasoning is predicting the output based on the input. Each problem contains a test case, which follows the CRUXEVAL. The search space for test cases is exponential in nature, ensuring that LLMs do not know the answer to the problem in advance.
117
+
118
+ Evaluation method. We use pass@1 (Kulal et al., 2019; Chen et al., 2021) to evaluate both tasks. We set the temperature to 0 and employ greedy decoding for generation as prior work (Cao et al., 2024a). For closed-source LLMs, we use gpt-3.5-turbo, gpt-4o-mini, and gpt-4o from OpenAI's API.
119
+
120
+ # 3.2 Overall Result
121
+
122
+ Table 2 shows Pass@1 evaluation results of various LLMs arranged in descending order of the LLMs' parameter size. We can see that: 1) CRUXEval-
123
+
124
+ X is challenging for all tested LLMs. Even GPT-4o can only achieve Pass@1 around $70\%$ . Notably, the result of the open-source LLMs DeepseekcoderV2 is better than GPT-4o-mini, with an average Pass@1 of $62.8\%$ on input reasoning and $65.0\%$ on output reasoning. Furthermore, the average results show that across different types of PLs, LLMs exhibit similar capabilities in input and output reasoning, consistent with prior observations in Python (Gu et al., 2024). 2) Single-programming-language model (e.g., phi-1) and few-language models (e.g. CodeGen-muti) demonstrate unexpected generalization capabilities on unseen language tasks. During evaluation, we introduced few-language LLMs (CodeGen-multi, trained on six PLs) and single-language LLMs (phi-1.5 and phi-1, trained only on Python). Despite this, they achieved similar results across 19 PLs. Notably, phi-1, trained solely on Python, scored $11.8\%$ Pass@1 on Python input prediction and $23.6\%$ on Perl. We will provide a more detailed analysis of this phenomenon in the Analysis section.
125
+
126
+ # 4 Analysis
127
+
128
+ # 4.1 Key Factors for LLM Code Reasoning
129
+
130
+ To get more insight into what factors in code affect LLMs' code reasoning ability, we explore six factors (e.g., average number of input variables, average input length) and statistics their correlation with correct/incorrect reasoning. The results are shown in Figure 3. Each column of the box plot displays the distribution of 19 PLs. In particular, the columns "Num of Input Variable", "Num of Variable Type" are counted by averaging the number of types of input parameters in method signatures, "Input/Output Length" is the average string length of the input/output. For instance, in the test case where $f('a', 123) == \{ 'a': 1 \}$ , the input length is 6, and the output length is 8. "Whether Have Complex Type" checks whether there are List, Dict, Tuple, Set types in input and output. "Execution Steps" calculates the average execution steps in Python bytecode operations, following prior work (Gu et al., 2024).
131
+
132
+ From Figure 3 (A - C), we can see that the number/ types of input variables have little impact on the code reasoning, especially Sub-figure B, which shows that the reasoning capability is slightly better when more types of variables are involved. A more counter-intuitive observation is made from Figure 3 (D - E). They indicate that the reasoning
133
+
134
+ <table><tr><td colspan="21">Input Reasoning Performance</td></tr><tr><td>Models</td><td>Size</td><td>cs</td><td>cpp</td><td>d</td><td>go</td><td>java</td><td>js</td><td>jl</td><td>lua</td><td>pl</td><td>php</td><td>py</td><td>r</td><td>rkt</td><td>rb</td><td>rs</td><td>scal</td><td>sh</td><td>swift</td><td>ts</td></tr><tr><td>GPT-4o</td><td>-</td><td>70.2</td><td>64.6</td><td>71.6</td><td>75.4</td><td>69.8</td><td>73.2</td><td>67.0</td><td>73.0</td><td>70.2</td><td>74.8</td><td>70.6</td><td>74.4</td><td>67.4</td><td>72.0</td><td>73.6</td><td>65.4</td><td>70.6</td><td>74.2</td><td>74.0</td></tr><tr><td>GPT-4o-mini</td><td>-</td><td>58.8</td><td>52.2</td><td>60.6</td><td>62.0</td><td>57.2</td><td>59.6</td><td>56.2</td><td>63.4</td><td>57.4</td><td>61.0</td><td>59.6</td><td>60.4</td><td>51.2</td><td>61.6</td><td>61.2</td><td>52.6</td><td>57.2</td><td>63.4</td><td>61.2</td></tr><tr><td>GPT-3.5 Turbo</td><td>-</td><td>52.2</td><td>39.2</td><td>50.2</td><td>53.4</td><td>55.4</td><td>50.0</td><td>47.0</td><td>53.2</td><td>47.6</td><td>52.2</td><td>51.6</td><td>48.6</td><td>45.4</td><td>49.6</td><td>53.0</td><td>54.2</td><td>47.6</td><td>58.2</td><td>48.4</td></tr><tr><td>Deepseekcoder-V2</td><td>236B</td><td>63.8</td><td>57.0</td><td>66.6</td><td>64.0</td><td>64.8</td><td>67.0</td><td>58.4</td><td>62.0</td><td>61.4</td><td>64.2</td><td>64.0</td><td>65.8</td><td>58.0</td><td>63.2</td><td>63.6</td><td>58.2</td><td>62.4</td><td>62.6</td><td>66.6</td></tr><tr><td>Qwen2-Instruct</td><td>72B</td><td>52.0</td><td>54.2</td><td>49.6</td><td>55.4</td><td>50.0</td><td>51.6</td><td>51.0</td><td>51.2</td><td>47.8</td><td>55.2</td><td>52.4</td><td>53.2</td><td>47.8</td><td>54.4</td><td>57.2</td><td>50.6</td><td>52.4</td><td>51.6</td><td>52.0</td></tr><tr><td>CodeLlama-Python</td><td>34B</td><td>38.8</td><td>40.0</td><td>39.2</td><td>39.0</td><td>41.4</td><td>45.8</td><td>44.8</td><td>45.0</td><td>43.2</td><td>48.0</td><td>46.8</td><td>42.2</td><td>38.8</td><td>44.0</td><td>44.2</td><td>43.0</td><td>44.6</td><td>45.0</td><td>44.0</td></tr><tr><td>CodeLlama-Instruct</td><td>34B</td><td>44.6</td><td>48.4</td><td>43.8</td><td>46.0</td><td>44.4</td><td>52.6</td><td>50.4</td><td>49.4</td><td>46.0</td><td>52.0</td><td>51.2</td><td>48.4</td><td>42.4</td><td>48.2</td><td>48.6</td><td>48.0</td><td>46.2</td><td>49.4</td><td>53.2</td></tr><tr><td>CodeLlama</td><td>34B</td><td>40.4</td><td>44.6</td><td>45.6</td><td>41.2</td><td>39.0</td><td>50.0</td><td>49.0</td><td>47.0</td><td>46.6</td><td>48.8</td><td>49.8</td><td>47.6</td><td>39.8</td><td>46.6</td><td>46.8</td><td>44.6</td><td>44.4</td><td>50.0</td><td>48.6</td></tr><tr><td>WizardCoder-V1.1</td><td>33B</td><td>44.8</td><td>25.4</td><td>46.4</td><td>47.6</td><td>48.4</td><td>45.6</td><td>49.2</td><td>48.8</td><td>44.6</td><td>50.0</td><td>50.0</td><td>45.0</td><td>42.4</td><td>49.2</td><td>48.2</td><td>48.2</td><td>45.4</td><td>51.0</td><td>46.4</td></tr><tr><td>Deepseekcoder-instruct</td><td>33B</td><td>46.0</td><td>43.6</td><td>49.8</td><td>49.0</td><td>46.8</td><td>48.8</td><td>47.0</td><td>50.0</td><td>46.8</td><td>52.0</td><td>51.8</td><td>48.2</td><td>41.6</td><td>52.0</td><td>48.4</td><td>47.0</td><td>48.2</td><td>52.2</td><td>49.6</td></tr><tr><td>Deepseekcoder-base</td><td>33B</td><td>41.2</td><td>42.8</td><td>43.2</td><td>45.6</td><td>43.8</td><td>46.0</td><td>47.6</td><td>47.4</td><td>47.2</td><td>48.6</td><td>49.2</td><td>50.6</td><td>42.8</td><td>47.4</td><td>46.8</td><td>44.0</td><td>46.4</td><td>48.2</td><td>45.0</td></tr><tr><td>Starcoder2</td><td>15B</td><td>41.4</td><td>43.8</td><td>51.6</td><td>45.2</td><td>42.6</td><td>44.0</td><td>48.2</td><td>44.6</td><td>44.8</td><td>49.8</td><td>46.6</td><td>45.8</td><td>45.0</td><td>49.0</td><td>46.6</td><td>37.0</td><td>47.4</td><td>52.2</td><td>46.2</td></tr><tr><td>WizardCoder-V1.0</td><td>15B</td><td>29.2</td><td>30.0</td><td>30.6</td><td>28.6</td><td>29.6</td><td>33.0</td><td>34.8</td><td>33.6</td><td>36.2</td><td>36.8</td><td>33.2</td><td>33.4</td><td>36.4</td><td>33.6</td><td>33.0</td><td>29.0</td><td>35.0</td><td>34.0</td><td>32.4</td></tr><tr><td>Starcoder</td><td>15B</td><td>28.2</td><td>30.0</td><td>33.0</td><td>33.2</td><td>33.4</td><td>35.2</td><td>34.4</td><td>31.6</td><td>34.0</td><td>36.4</td><td>34.8</td><td>33.4</td><td>36.6</td><td>35.0</td><td>34.8</td><td>27.4</td><td>37.0</td><td>30.8</td><td>33.2</td></tr><tr><td>phi-3-instruct</td><td>14B</td><td>31.8</td><td>26.0</td><td>38.8</td><td>36.4</td><td>37.2</td><td>42.4</td><td>36.2</td><td>37.2</td><td>35.6</td><td>41.2</td><td>43.4</td><td>39.2</td><td>24.4</td><td>36.0</td><td>36.8</td><td>38.0</td><td>33.6</td><td>41.2</td><td>42.8</td></tr><tr><td>Llama-3-Instruct</td><td>8B</td><td>37.0</td><td>36.4</td><td>35.0</td><td>38.6</td><td>36.2</td><td>38.4</td><td>39.6</td><td>40.0</td><td>36.2</td><td>36.6</td><td>38.4</td><td>42.2</td><td>24.2</td><td>35.8</td><td>37.6</td><td>38.0</td><td>31.6</td><td>42.2</td><td>38.2</td></tr><tr><td>CodeQwen1.5-Chat</td><td>7B</td><td>42.8</td><td>42.0</td><td>43.0</td><td>46.4</td><td>44.6</td><td>43.8</td><td>42.2</td><td>42.8</td><td>41.6</td><td>44.8</td><td>43.0</td><td>43.4</td><td>38.2</td><td>43.6</td><td>42.0</td><td>39.4</td><td>46.6</td><td>45.8</td><td>43.6</td></tr><tr><td>CodeLlama-Instruct</td><td>7B</td><td>38.6</td><td>36.0</td><td>38.4</td><td>38.4</td><td>38.2</td><td>39.6</td><td>42.2</td><td>43.4</td><td>36.4</td><td>40.4</td><td>41.0</td><td>41.0</td><td>38.8</td><td>41.6</td><td>37.6</td><td>42.6</td><td>39.6</td><td>40.2</td><td>41.0</td></tr><tr><td>CodeLlama-hf</td><td>7B</td><td>36.4</td><td>36.2</td><td>36.8</td><td>34.6</td><td>36.4</td><td>36.6</td><td>40.2</td><td>39.6</td><td>36.0</td><td>39.4</td><td>40.2</td><td>40.0</td><td>36.6</td><td>39.2</td><td>35.4</td><td>37.8</td><td>36.8</td><td>39.2</td><td>38.8</td></tr><tr><td>Deepseekcoder-instruct</td><td>6.7B</td><td>35.0</td><td>37.0</td><td>35.6</td><td>40.4</td><td>35.0</td><td>36.6</td><td>39.2</td><td>38.8</td><td>39.4</td><td>42.2</td><td>38.2</td><td>42.0</td><td>37.2</td><td>40.2</td><td>37.4</td><td>36.8</td><td>42.8</td><td>40.8</td><td>34.2</td></tr><tr><td>Deepseekcoder-base</td><td>6.7B</td><td>38.8</td><td>42.4</td><td>41.2</td><td>43.2</td><td>40.4</td><td>43.6</td><td>42.6</td><td>42.8</td><td>41.6</td><td>46.4</td><td>41.4</td><td>46.2</td><td>43.0</td><td>44.6</td><td>41.6</td><td>40.8</td><td>44.8</td><td>43.4</td><td>41.8</td></tr><tr><td>CodeGen-multi</td><td>6B</td><td>28.8</td><td>25.4</td><td>6.2</td><td>25.6</td><td>36.2</td><td>25.2</td><td>17.4</td><td>24.4</td><td>38.4</td><td>22.8</td><td>22.6</td><td>27.2</td><td>16.2</td><td>6.4</td><td>18.8</td><td>31.0</td><td>48.6</td><td>32.4</td><td>25.2</td></tr><tr><td>phi-1_5</td><td>1.3B</td><td>29.2</td><td>16.0</td><td>13.2</td><td>25.8</td><td>26.8</td><td>9.8</td><td>30.4</td><td>26.6</td><td>17.8</td><td>26.6</td><td>25.8</td><td>8.4</td><td>6.6</td><td>1.4</td><td>25.2</td><td>30.4</td><td>34.4</td><td>26.6</td><td>30.8</td></tr><tr><td>phi-1</td><td>1.3B</td><td>0.2</td><td>7.0</td><td>9.6</td><td>3.6</td><td>2.8</td><td>17.0</td><td>19.0</td><td>17.4</td><td>23.6</td><td>9.2</td><td>11.8</td><td>9.4</td><td>11.2</td><td>6.8</td><td>5.4</td><td>1.8</td><td>19.8</td><td>14.0</td><td>14.0</td></tr><tr><td>Average</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
135
+
136
+ <table><tr><td colspan="21">Output Reasoning Performance</td></tr><tr><td>Models</td><td>Size</td><td>cs</td><td>cpp</td><td>d</td><td>go</td><td>java</td><td>js</td><td>jl</td><td>lua</td><td>pl</td><td>php</td><td>py</td><td>r</td><td>rkt</td><td>rb</td><td>rs</td><td>scal</td><td>sh</td><td>swift</td><td>ts</td></tr><tr><td>GPT-4o</td><td>-</td><td>75.0</td><td>74.8</td><td>71.4</td><td>77.0</td><td>73.2</td><td>77.6</td><td>73.6</td><td>74.8</td><td>74.0</td><td>75.4</td><td>75.4</td><td>72.0</td><td>70.8</td><td>74.0</td><td>74.4</td><td>71.8</td><td>71.6</td><td>76.0</td><td>76.4</td></tr><tr><td>GPT-4o-mini</td><td>-</td><td>63.0</td><td>63.0</td><td>61.4</td><td>63.4</td><td>54.0</td><td>61.8</td><td>57.8</td><td>60.0</td><td>57.4</td><td>64.2</td><td>61.6</td><td>59.6</td><td>56.6</td><td>61.2</td><td>61.8</td><td>61.2</td><td>56.2</td><td>63.0</td><td>61.2</td></tr><tr><td>GPT-3.5 Turbo</td><td>-</td><td>54.2</td><td>43.2</td><td>56.0</td><td>53.2</td><td>43.6</td><td>56.2</td><td>54.2</td><td>54.6</td><td>51.8</td><td>55.2</td><td>57.2</td><td>49.4</td><td>48.0</td><td>56.4</td><td>54.6</td><td>56.4</td><td>51.0</td><td>57.8</td><td>53.6</td></tr><tr><td>Deepseekcoder-V2</td><td>236B</td><td>66.6</td><td>66.2</td><td>63.4</td><td>68.0</td><td>67.6</td><td>65.4</td><td>64.8</td><td>63.6</td><td>63.0</td><td>67.4</td><td>66.8</td><td>63.0</td><td>62.2</td><td>65.2</td><td>65.8</td><td>63.2</td><td>58.8</td><td>67.8</td><td>66.4</td></tr><tr><td>Qwen2-Instruct</td><td>72B</td><td>51.2</td><td>50.2</td><td>51.6</td><td>53.6</td><td>38.2</td><td>52.0</td><td>51.0</td><td>49.0</td><td>45.8</td><td>50.8</td><td>51.2</td><td>45.0</td><td>46.8</td><td>50.8</td><td>51.0</td><td>51.0</td><td>45.6</td><td>50.4</td><td>53.2</td></tr><tr><td>CodeLlama-Python</td><td>34B</td><td>41.4</td><td>44.8</td><td>45.6</td><td>41.8</td><td>41.4</td><td>45.4</td><td>45.2</td><td>42.8</td><td>43.6</td><td>43.8</td><td>43.8</td><td>42.4</td><td>38.6</td><td>42.8</td><td>46.6</td><td>43.8</td><td>42.0</td><td>44.4</td><td>44.8</td></tr><tr><td>CodeLlama-Instruct</td><td>34B</td><td>44.4</td><td>46.2</td><td>45.8</td><td>46.8</td><td>40.6</td><td>47.4</td><td>45.6</td><td>42.8</td><td>44.0</td><td>44.8</td><td>44.0</td><td>40.2</td><td>38.2</td><td>44.2</td><td>46.4</td><td>43.8</td><td>40.6</td><td>45.2</td><td>45.0</td></tr><tr><td>CodeLlama</td><td>34B</td><td>44.6</td><td>47.8</td><td>44.2</td><td>45.2</td><td>38.4</td><td>47.0</td><td>45.8</td><td>42.8</td><td>43.8</td><td>46.4</td><td>46.4</td><td>38.8</td><td>38.4</td><td>45.4</td><td>47.2</td><td>47.4</td><td>43.8</td><td>47.6</td><td>47.4</td></tr><tr><td>WizardCoder-V1.1</td><td>33B</td><td>47.0</td><td>46.8</td><td>45.8</td><td>44.2</td><td>50.8</td><td>50.0</td><td>47.0</td><td>46.0</td><td>45.2</td><td>51.4</td><td>49.6</td><td>44.0</td><td>42.4</td><td>48.2</td><td>47.8</td><td>45.0</td><td>44.4</td><td>48.0</td><td>49.8</td></tr><tr><td>Deepseekcoder-instruct</td><td>33B</td><td>52.0</td><td>51.4</td><td>49.0</td><td>48.8</td><td>53.2</td><td>55.0</td><td>50.4</td><td>50.4</td><td>50.0</td><td>53.0</td><td>52.2</td><td>48.2</td><td>46.6</td><td>52.8</td><td>50.6</td><td>48.0</td><td>49.4</td><td>52.8</td><td>53.6</td></tr><tr><td>DeepseekCoder-base</td><td>33B</td><td>48.2</td><td>50.0</td><td>46.0</td><td>48.6</td><td>49.2</td><td>51.4</td><td>46.8</td><td>48.0</td><td>48.4</td><td>52.0</td><td>49.8</td><td>45.2</td><td>46.4</td><td>49.0</td><td>46.2</td><td>47.6</td><td>46.0</td><td>49.2</td><td>51.2</td></tr><tr><td>Starcoder2</td><td>15B</td><td>46.0</td><td>47.4</td><td>47.2</td><td>49.0</td><td>48.4</td><td>50.0</td><td>49.2</td><td>44.8</td><td>49.4</td><td>48.4</td><td>48.4</td><td>47.2</td><td>45.0</td><td>51.0</td><td>48.8</td><td>45.2</td><td>45.8</td><td>49.6</td><td>48.6</td></tr><tr><td>WizardCoder-V1.0</td><td>15B</td><td>25.2</td><td>30.0</td><td>30.6</td><td>33.2</td><td>26.8</td><td>33.6</td><td>30.2</td><td>30.2</td><td>31.0</td><td>33.0</td><td>34.0</td><td>31.6</td><td>29.6</td><td>32.8</td><td>31.2</td><td>31.2</td><td>29.8</td><td>34.2</td><td>34.0</td></tr><tr><td>Starcoder</td><td>15B</td><td>20.4</td><td>31.6</td><td>31.8</td><td>31.0</td><td>18.4</td><td>33.4</td><td>32.2</td><td>31.8</td><td>29.8</td><td>32.6</td><td>32.6</td><td>30.0</td><td>29.2</td><td>33.4</td><td>32.6</td><td>30.0</td><td>30.2</td><td>33.0</td><td>33.0</td></tr><tr><td>phi-3-instruct</td><td>14B</td><td>34.2</td><td>37.6</td><td>39.0</td><td>31.0</td><td>34.2</td><td>41.6</td><td>41.2</td><td>34.4</td><td>35.8</td><td>37.8</td><td>42.4</td><td>36.6</td><td>24.6</td><td>42.2</td><td>37.4</td><td>36.2</td><td>37.2</td><td>41.4</td><td>43.0</td></tr><tr><td>Llama-3-Instruct</td><td>8B</td><td>32.0</td><td>30.8</td><td>31.2</td><td>31.4</td><td>25.0</td><td>35.0</td><td>31.4</td><td>34.0</td><td>29.6</td><td>27.0</td><td>33.6</td><td>27.2</td><td>28.0</td><td>31.8</td><td>34.4</td><td>33.8</td><td>32.0</td><td>36.4</td><td>33.8</td></tr><tr><td>CodeQwen1.5-Chat</td><td>7B</td><td>37.8</td><td>40.2</td><td>40.2</td><td>40.6</td><td>35.4</td><td>43.6</td><td>42.6</td><td>40.4</td><td>39.6</td><td>43.0</td><td>41.4</td><td>38.2</td><td>39.0</td><td>44.6</td><td>42.0</td><td>35.0</td><td>38.2</td><td>43.8</td><td>42.2</td></tr><tr><td>CodeLlama-Instruct</td><td>7B</td><td>32.2</td><td>35.6</td><td>34.4</td><td>35.0</td><td>24.4</td><td>38.2</td><td>35.2</td><td>32.2</td><td>34.2</td><td>36.0</td><td>35.4</td><td>32.0</td><td>29.6</td><td>37.0</td><td>37.4</td><td>33.0</td><td>33.0</td><td>34.6</td><td>38.8</td></tr><tr><td>CodeLlama-hf</td><td>7B</td><td>32.6</td><td>34.4</td><td>33.8</td><td>33.4</td><td>28.4</td><td>38.0</td><td>35.2</td><td>34.4</td><td>35.2</td><td>38.0</td><td>34.4</td><td>32.6</td><td>30.8</td><td>34.8</td><td>36.8</td><td>33.4</td><td>31.0</td><td>35.0</td><td>38.2</td></tr><tr><td>Deepseekcoder-instruct</td><td>6.7B</td><td>34.8</td><td>41.8</td><td>40.4</td><td>39.4</td><td>32.8</td><td>47.6</td><td>42.6</td><td>38.8</td><td>42.0</td><td>43.8</td><td>43.6</td><td>40.8</td><td>39.2</td><td>43.2</td><td>41.8</td><td>40.6</td><td>37.8</td><td>43.2</td><td>44.0</td></tr><tr><td>Deepseekcoder-base</td><td>6.7B</td><td>41.2</td><td>46.2</td><td>43.2</td><td>42.8</td><td>42.6</td><td>44.8</td><td>46.0</td><td>41.0</td><td>40.4</td><td>41.8</td><td>44.8</td><td>42.8</td><td>43.0</td><td>42.6</td><td>42.0</td><td>43.2</td><td>40.6</td><td>47.6</td><td>45.4</td></tr><tr><td>CodeGen-multi</td><td>6B</td><td>21.4</td><td>23.6</td><td>25.0</td><td>26.4</td><td>21.6</td><td>22.8</td><td>22.8</td><td>23.8</td><td>20.4</td><td>25.2</td><td>24.8</td><td>23.4</td><td>17.8</td><td>24.0</td><td>25.2</td><td>22.0</td><td>22.2</td><td>25.0</td><td>21.4</td></tr><tr><td>phi-1_5</td><td>1.3B</td><td>16.0</td><td>26.0</td><td>24.8</td><td>22.6</td><td>15.8</td><td>23.0</td><td>23.6</td><td>21.2</td><td>22.0</td><td>22.2</td><td>25.6</td><td>21.8</td><td>16.8</td><td>19.6</td><td>22.0</td><td>21.6</td><td>17.6</td><td>25.6</td><td>25.2</td></tr><tr><td>phi-1</td><td>1.3B</td><td>5.8</td><td>9.0</td><td>13.2</td><td>14.8</td><td>4.6</td><td>20.8</td><td>19.2</td><td>15.8</td><td>15.6</td><td>18.6</td><td>22.4</td><td>17.6</td><td>10.4</td><td>18.0</td><td>16.4</td><td>11.0</td><td>16.4</td><td>19.2</td><td>19.0</td></tr><tr><td>Average</td><td></td><td>40.3</td><td>42.4</td><td>42.3</td><td>42.6</td><td>37.9</td><td>45.1</td><td>43.1</td><td>41.6</td><td>41.3</td><td>43.8</td><td>44.2</td><td>40.4</td><td>38.3</td><td>43.5</td><td>43.4</td><td>41.5</td><td>40.1</td><td>44.6</td><td>44.6</td></tr></table>
137
+
138
+ Table 2: The result of each LLM in CRUXEVAL-X. Each result is shaded with a background color from blue to white based on the Pass@1. The bluer, the larger. Deepseekcoder-V2 is a MOE LLM; the parameter activated during inference is 21B. All results are tested on 500 aligned data.
139
+
140
+ # capability is negatively correlated with the length of input/output strings.
141
+
142
+ Furthermore, regarding input reasoning capability, the more input variables, the more challenging it is for LLMs to reason about the correct inputs, thus the worse the input reasoning performance (Sub-figures A and D).
143
+
144
+ # 4.2 Cross-language Generalization Ability
145
+
146
+ To investigate the cross-language generalization ability of LLMs, we investigate the reasoning abl
147
+
148
+ ity of phi-1 and phi-1.5, which are trained on English and Python only. To get a better understanding, we analyze the capability in terms of syntax and semantics in 9 PLs because they provide clear error messages to distinct syntactic/semantic errors.
149
+
150
+ # 4.2.1 Syntactic Correctness
151
+
152
+ For a LLM trained on single PL, ensuring syntactic correctness is crucial for its generalization to other programming languages. For example, in a Racket language test case, the expected output might be
153
+
154
+ ![](images/b3ca566bbf4a00f8784cce3eb72869d1c94764b52205f9724faddeec9a5f2ccd.jpg)
155
+ Figure 3: Key factors for LLM code reasoning capability.
156
+
157
+ "(list 5 8 1 3 0)", but the LLM incorrectly predicts "[5,8,1,3,0]", leading to a compilation error. Figure 4 shows the number of syntactic-correct cases made by these two LLMs in both tasks. It is clear that Python has the highest syntactic correctness in both tasks, followed by Go and TypeScript. On the contrary, C++, C#, and Java witness the most syntactic errors for these LLMs. Interestingly, even though phi-1 and phi-1.5 have not trained on PLs other than Python, they can still achieve an average of $49.1\%$ and $72.0\%$ syntactically correctness rate in other PLs, respectively, compared with $97.0\%$ and $98.7\%$ achieved on Python. It indicates the cross-language generalizability of LLMs.
158
+
159
+ # 4.2.2 Semantic Correctness
160
+
161
+ Beyond syntactic correctness, semantic correctness poses higher requirements, i.e., passing the tests. The results are shown in the last two rows in Table 2. In particular, phi-1.5 reaches $25.8\%$ input reasoning performance on Python, while on other PLs, an average of $19.0\%$ can also be reached. The observation further consolidates the cross-language generalizability of LLMs.
162
+
163
+ # 4.2.3 Cross-NL and Cross-PL Generalization
164
+
165
+ From Figure 4 and Table 2, there is a noticeable increase from phi-1 to phi-1.5 (an average of $10.7\%$ vs. $21.7\%$ on input reasoning, and $15.1\%$ vs. $21.7\%$ on output reasoning). According to the description (Abdin et al., 2024), phi-1.5 is further finetuned with more synthetic texts in natural language (NL). Considering the dramatic improvement in code reasoning, it is highly likely that the improvement in NL reasoning positively impacts code reasoning.
166
+
167
+ ![](images/c96b48cc63a01713e80f8f79728cf202e5785b48f0cb815e9b418041d42b3bb4.jpg)
168
+ Figure 4: The syntax accuracy of each LLM.
169
+
170
+ # 4.3 Programming Language Correlation
171
+
172
+ To further investigate the correlations between these 19 PLs in CRUXEVAL-X, we calculate each PL pair's correlation (i.e., cosine similarity, ranging from -1 to 1), visualized in Figure 5. In particular, for each PL, we flatten the results of LLMs as a feature vector and calculate the cosine similarities for each pair of PLs.
173
+
174
+ Overall, Figure 5 shows that the correlation between PL pairs is generally similar, with an average of $0.7+$ cosine similarities. Among all PL pairs, JavaScript and JavaScript correlate the most strongly (0.87 and 0.91 on both tasks). It indicates that the code reasoning capabilities on different PLs are highly correlated. Also, the correlation in output reasoning is slightly higher than in input reasoning, with an average of 0.79 vs. 0.75.
175
+
176
+ It is also noteworthy that Racket has the most minor correlation with all the other PLs. It may be because of its distinct syntax. A case study can be found in Listing 3.
177
+
178
+ ![](images/19216f103cc85193e42a519519081fc586d020cc140cb77eb8c0dc9f72b8e46e.jpg)
179
+ Figure 5: The correlation between PL pairs.
180
+
181
+ # 4.4 Case Study
182
+
183
+ After identifying the phi-series-LLMs (i.e., phi-1, phi-1.5) exhibit cross-language generalization and the correlation across PLs, we further analyze the predictions of phi-1.5 to get a deeper understanding. We noticed that out of the 128 correct instances in Python by phi-1.5, $61.7\%$ (79/128) are also correct in PHP, while only $39.8\%$ (51/128) are correct in
184
+
185
+ Racket. Therefore, we use one example in these three PLs to understand its rationale.
186
+
187
+ Listing 1: Subject-164 (Python)
188
+ ```python
189
+ 1 def f(list: List[int]) -> List[int]:
190
+ 2 lst.sort()
191
+ 3 return lst[0:3]
192
+ 4 # input: [5, 8, 1, 3, 0]
193
+ 5 # phi-1.5 answer: [0, 1, 3]
194
+ ```
195
+
196
+ Listing 2: Subject-164 (PHP)
197
+ ```txt
198
+ 1 <?php
199
+ 2 function f(\\(lst) {
200
+ 3 sort(\\)lst);
201
+ 4 return array.slice(\\(lst,0,3);
202
+ 5 }
203
+ 6 // input: array(5,8,1,3,0)
204
+ 7 // phi-1.5 answer: array(0,1,3)
205
+ ```
206
+
207
+ Listing 3: Subject-164 (Racket)
208
+ ```lisp
209
+ 1 (define(f lst)
210
+ 2 (define sorted-list (sort lst <))
211
+ 3 (take sorted-list 3))
212
+ 4 ;; input: (list 5 8 1 3 0)
213
+ 5 ;; phi-1.5 answer: (list 5 8 1)
214
+ ```
215
+
216
+ # 4.4.1 Analysis on Subject 164
217
+
218
+ Listing 1-3 demonstrates an instance where phi-1.5 generalizes Python (Listing 1)'s reasoning capabilities to other languages. From a grammar structure perspective, their respective function definitions, indentation formats, and the functions they invoke exhibit significant differences. However, overall, PHP and Python share a more similar structure, both utilizing sort for sorting and return for returning output values. Therefore, phi-1.5 is able to generalize its code reasoning abilities to PHP, but fails to comprehend the sorting command in Racket, leading to incorrect predictions.
219
+
220
+ Upon analyzing these 128 questions, we observe that excluding those where the output could be directly derived from the input, such as assert f("zej","owc") == "zej", which accounted for approximately $40\%$ of the cases, there are still numerous examples demonstrating that phi-1.5 has developed a certain level of cross-language capabilities. From these examples, we can observe that the multilingual generalization capability of the model is positively correlated with the grammar structural similarity between languages. Even Racket, a language significantly different from others, maintains certain logical similarities in aspects such as function definitions, loops, and conditional branches.
221
+
222
+ This is a key reason why Phi-1.5 can achieve considerable effectiveness across multiple languages. More case studies can be found in appendix K.
223
+
224
+ # 5 Related Work
225
+
226
+ Multi-Task Code Benchmark. Recently, there has been an increasing number of tasks related to code that are used to evaluate the various capabilities of LLMs in the field of coding, including code generation (Chen et al., 2021; Austin et al., 2021), code repair (Jimenez et al., 2023; Tian et al., 2024), and code description (Chai et al., 2024). However, datasets that assess the reasoning abilities of code are relatively limited, and the currently proposed reasoning datasets are confined to the Python language (Gu et al., 2024; Chen et al., 2024). In this work, we expand the Python language reasoning dataset CRUXEVAL (Gu et al., 2024) to encompass 19 PLs, thereby addressing the deficiency in reasoning datasets at the multilingual level.
227
+
228
+ Multi-Language Code Benchmark. Multilingual evaluation datasets are important for assessing the comprehensive coding capabilities of code LLMs. In the early stages, multilingual code datasets were mainly used for code translation tasks (Elnaggar et al., 2021; Ahmad et al., 2021; Roziere et al., 2020, 2021; Zhu et al., 2022b; Yan et al., 2023; Zhu et al., 2022a). These datasets often consist of problem solutions in different languages extracted from algorithm competition-related websites, thus suffering from data contamination issue. Bechmark like McEval (Chai et al., 2024), which relies on human annotation, requires a high cost. In this work, we provide a process using LLMs for multilingual code translation, which can achieve a high accuracy and low cost in creating a multilingual dataset.
229
+
230
+ # 6 Conclusion
231
+
232
+ In this work, we provide a fully automated process for constructing a multilingual dataset based on a Python code language dataset. Through this process, we successfully transform the CRUXEval dataset into a multilingual dataset containing 19 PLs and test its effectiveness on 24 LLMs, demonstrating the validity of the dataset. Furthermore, we find that models trained on only a few languages exhibit the ability to transfer their prediction capabilities to other languages in input/output reasoning tasks, and this ability is influenced by the model's own reasoning capabilities.
233
+
234
+ # 7 Limitations
235
+
236
+ There are Three limitations in this work. First, our benchmark relies on model-generated data. While this approach effectively reduces costs and avoids issues of data leakage, it may introduce biases in the dataset towards the LLMs that generated the data. However, we select different LLMs to construct evaluation data and conduct experiments on this data. The experimental results indicate that our dataset construction method does not affect the fairness of the dataset. Additionally, the model-based translation method cannot guarantee that all data will be perfectly translated into other PLs. However, through our method, based on 800 pieces of data, we generated 500 aligned pieces of data for 19 PLs. From our evaluation results, it can be seen that this amount of data is sufficient to effectively distinguish the reasoning capabilities of each LLM. Finally, translated codes from Python cannot reflect several specific language features of other languages. Our intention is to achieve highly aligned multilingual data across 19 languages. However, preserving language-specific features make it challenging to create such aligned data, as the distinctive features of one language are inherently difficult to replicate in others. This represents a tradeoff. In our future work, we plan to explore how to construct multilingual data while retaining more language-specific features.
237
+
238
+ # 8 Acknowledgements
239
+
240
+ We sincerely thank the reviewers for their insightful comments and valuable suggestions. This work was supported by Beijing Natural Science Foundation (L243006), Beijing Municipal Science and Technology Project (Nos. Z231100010323002), the Natural Science Foundation of China (No. 62272439, 62306303, 62476265) and the Basic Research Program of ISCAS (Grant No. ISCAS-ZD-202402).
241
+
242
+ # References
243
+
244
+ Marah Abdin, Sam Ade Jacobs, Ammar Ahmad Awan, Jyoti Aneja, Ahmed Awadallah, Hany Awadalla, Nguyen Bach, Amit Bahree, Arash Bakhtiari, Harkirat Behl, et al. 2024. Phi-3 technical report: A highly capable language model locally on your phone. arXiv preprint arXiv:2404.14219.
245
+ Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman,
246
+
247
+ Shyamal Anadkat, et al. 2023. Gpt-4 technical report. arXiv preprint arXiv:2303.08774.
248
+ Wasi Uddin Ahmad, Md Golam Rahman Tushar, Saikat Chakraborty, and Kai-Wei Chang. 2021. Avatar: A parallel corpus for javapython program translation. arXiv preprint arXiv:2108.11590.
249
+ Meta AI. 2024. Introducing meta llama 3: The most capable openly available llm to date. Blog. Online; accessed 15-January-2024.
250
+ Ben Athiwaratkun, Sanjay Krishna Gouda, Zijian Wang, Xiaopeng Li, Yuchen Tian, Ming Tan, Wasi Uddin Ahmad, Shiqi Wang, Qing Sun, Mingyue Shang, et al. 2022. Multi-lingual evaluation of code generation models. arXiv preprint arXiv:2210.14868.
251
+ 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.
252
+ 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.
253
+ 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.
254
+ Jialun Cao, Zhiyong Chen, Jiarong Wu, Shing chi Cheung, and Chang Xu. 2024a. Can ai beat undergraduates in entry-level java assignments? benchmarking large language models on javabench. Preprint, arXiv:2406.12902.
255
+ Jialun Cao, Wuqi Zhang, Shing-Chi Cheung, and So on. 2024b. Concerned with data contamination? assessing countermeasures in code language model. Preprint, arXiv:2403.16898.
256
+ Federico Cassano, John Gouwar, Daniel Nguyen, Sydney Nguyen, Luna Phipps-Costin, Donald Pinckney, Ming-Ho Yee, Yangtian Zi, Carolyn Jane Anderson, Molly Q Feldman, et al. 2023. Multi-e: a scalable and polyglot approach to benchmarking neural code generation. IEEE Transactions on Software Engineering, 49(7):3675-3691.
257
+ Linzheng Chai, Shukai Liu, Jian Yang, Yuwei Yin, Ke Jin, Jiaheng Liu, Tao Sun, Ge Zhang, Changyu Ren, Hongcheng Guo, et al. 2024. Mceval: Massively multilingual code evaluation. arXiv preprint arXiv:2406.07436.
258
+ Junkai Chen, Zhiyuan Pan, Xing Hu, Zhenhao Li, Ge Li, and Xin Xia. 2024. Reasoning runtime behavior of a program with llm: How far are we? Preprint, arXiv:2403.16437.
259
+
260
+ 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.
261
+ Xinyun Chen, Maxwell Lin, Nathanael Scharli, and Denny Zhou. 2023. Teaching large language models to self-debug. arXiv preprint arXiv:2304.05128.
262
+ Xueying Du, Mingwei Liu, Kaixin Wang, Hanlin Wang, Junwei Liu, Yixuan Chen, Jiayi Feng, Chaofeng Sha, Xin Peng, and Yiling Lou. 2024. Evaluating large language models in class-level code generation. In Proceedings of the IEEE/ACM 46th International Conference on Software Engineering, pages 1-13.
263
+ Ahmed Elnaggar, Wei Ding, Llion Jones, Tom Gibbs, Tamas Feher, Christoph Angerer, Silvia Severini, Florian Matthes, and Burkhard Rost. 2021. Codetrans: Towards cracking the language of silicon's code through self-supervised deep learning and high performance computing. arXiv preprint arXiv:2104.02443.
264
+ Alex Gu, Baptiste Rozière, Hugh Leather, Armando Solar-Lezama, Gabriel Synnaeve, and Sida I Wang. 2024. Cruxeval: A benchmark for code reasoning, understanding and execution. arXiv preprint arXiv:2401.03065.
265
+ Suriya Gunasekar, Yi Zhang, Jyoti Aneja, Caio César Teodoro Mendes, Allie Del Giorno, Sivakanth Gopi, Mojan Javaheripi, Piero Kauffmann, Gustavo de Rosa, Olli Saarikivi, et al. 2023. Textbooks are all you need. arXiv preprint arXiv:2306.11644.
266
+ Daya Guo, Qihao Zhu, Dejian Yang, Zhenda Xie, Kai Dong, Wentao Zhang, Guanting Chen, Xiao Bi, Yu Wu, YK Li, et al. 2024. Deepseek-coder: When the large language model meets programming-the rise of code intelligence. arXiv preprint arXiv:2401.14196.
267
+ Xueyu Hu, Kun Kuang, Jiankai Sun, Hongxia Yang, and Fei Wu. 2024. Leveraging print debugging to improve code generation in large language models. arXiv preprint arXiv:2401.05319.
268
+ Carlos E Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, and Karthik Narasimhan. 2023. Swe-bench: Can language models resolve real-world github issues? arXiv preprint arXiv:2310.06770.
269
+ Sumith Kulal, Panupong Pasupat, Kartik Chandra, Mina Lee, Oded Padon, Alex Aiken, and Percy S Liang. 2019. Spoc: Search-based pseudocode to code. Advances in Neural Information Processing Systems, 32.
270
+ Raymond Li, Loubna Ben Allal, Yangtian Zi, Niklas Muennighoff, Denis Kocetkov, Chenghao Mou, Marc Marone, Christopher Akiki, Jia Li, Jenny Chim, et al. 2023a. Starcoder: may the source be with you! arXiv preprint arXiv:2305.06161.
271
+
272
+ Yuanzhi Li, Sébastien Bubeck, Ronen Eldan, Allie Del Giorno, Suriya Gunasekar, and Yin Tat Lee. 2023b. Textbooks are all you need ii: phi-1.5 technical report. arXiv preprint arXiv:2309.05463.
273
+ Michael Ling, Yijun Yu, Haitao Wu, Yuan Wang, James R. Cordy, and Ahmed E. Hassan. 2022. In rust we trust - a transpiler from unsafe c to safer rust. In 2022 IEEE/ACM 44th International Conference on Software Engineering: Companion Proceedings (ICSE-Companion), pages 354-355.
274
+ Jiawei Liu, Chunqiu Steven Xia, Yuyao Wang, and Lingming Zhang. 2024. Is your code generated by chatgpt really correct? rigorous evaluation of large language models for code generation. Advances in Neural Information Processing Systems, 36.
275
+ Anton Lozhkov, Raymond Li, Loubna Ben Allal, Federico Cassano, Joel Lamy-Poirier, Nouamane Tazi, Ao Tang, Dmytro Pykhtar, Jiawei Liu, Yuxiang Wei, et al. 2024. Starcoder 2 and the stack v2: The next generation. arXiv preprint arXiv:2402.19173.
276
+ Ziyang Luo, Can Xu, Pu Zhao, Qingfeng Sun, Xi-ubo Geng, Wenxiang Hu, Chongyang Tao, Jing Ma, Qingwei Lin, and Daxin Jiang. 2023. Wizardcoder: Empowering code large language models with evol-instruct. arXiv preprint arXiv:2306.08568.
277
+ Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, and Caiming Xiong. 2022. Codegen: An open large language model for code with multi-turn program synthesis. arXiv preprint arXiv:2203.13474.
278
+ 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.
279
+ Baptiste Roziere, Marie-Anne Lachaux, Lowik Chanussot, and Guillaume Lample. 2020. Unsupervised translation of programming languages. Advances in neural information processing systems, 33:20601-20611.
280
+ Baptiste Rozière, Jie Zhang, François Charton, Mark Harman, Gabriel Synnaeve, and Guillaume Lample. 2022. Leveraging automated unit tests for unsupervised code translation. In *The Tenth International Conference on Learning Representations*, ICLR 2022, Virtual Event, April 25-29, 2022. OpenReview.net.
281
+ Baptiste Roziere, Jie M Zhang, Francois Charton, Mark Harman, Gabriel Synnaeve, and Guillaume Lample. 2021. Leveraging automated unit tests for unsupervised code translation. arXiv preprint arXiv:2110.06773.
282
+ Runchu Tian, Yining Ye, Yujia Qin, Xin Cong, Yankai Lin, Zhiyuan Liu, and Maosong Sun. 2024. Debugbench: Evaluating debugging capability of large language models. arXiv preprint arXiv:2401.04621.
283
+
284
+ Chunqiu Steven Xia and Lingming Zhang. 2023. Keep the conversation going: Fixing 162 out of 337 bugs for $0.42 each using chatgpt. arXiv preprint arXiv:2304.00385.
285
+ Weixiang Yan, Yuchen Tian, Yunzhe Li, Qian Chen, and Wen Wang. 2023. CodetransOcean: A comprehensive multilingual benchmark for code translation. arXiv preprint arXiv:2310.04951.
286
+ Aidan ZH Yang, Claire Le Goues, Ruben Martins, and Vincent Hellendoorn. 2024a. Large language models for test-free fault localization. In Proceedings of the 46th IEEE/ACM International Conference on Software Engineering, pages 1-12.
287
+ An Yang, Baosong Yang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Zhou, Chengpeng Li, Chengyuan Li, Dayiheng Liu, Fei Huang, et al. 2024b. Qwen2 technical report. arXiv preprint arXiv:2407.10671.
288
+ Xin Yin, Chao Ni, Tien N. Nguyen, Shaohua Wang, and Xiaohu Yang. 2024. Rectifier: Code translation with corrector via llms. Preprint, arXiv:2407.07472.
289
+ Li Zhong, Zilong Wang, and Jingbo Shang. 2024. Ldb: A large language model debugger via verifying runtime execution step-by-step. arXiv preprint arXiv:2402.16906.
290
+ Ming Zhu, Aneesh Jain, Karthik Suresh, Roshan Ravindran, Sindhu Tipirneni, and Chandan K Reddy. 2022a. Xlcost: A benchmark dataset for cross-lingual code intelligence. arXiv preprint arXiv:2206.08474.
291
+ Ming Zhu, Karthik Suresh, and Chandan K Reddy. 2022b. Multilingual code snippets training for program translation. In Proceedings of the AAAI conference on artificial intelligence, volume 36, pages 11783-11790.
292
+ Qihao Zhu, Daya Guo, Zhihong Shao, Dejian Yang, Peiyi Wang, Runxin Xu, Y Wu, Yukun Li, Huazuo Gao, Shirong Ma, et al. 2024. Deepseek-coder-v2: Breaking the barrier of closed-source models in code intelligence. arXiv preprint arXiv:2406.11931.
293
+
294
+ # A Dataset Bias for Data-Generating LLM
295
+
296
+ The experimental results of existing papers have already demonstrated that the LLMs used for generate CRUXEVAL benchmark do not introduce unfairness (Gu et al., 2024). Therefore, our goal is to verify whether our pipeline can lead to unfairness on datasets of other programming languages (PLs). To achieve this, we reduce the number of iterations and use a single model for data generation, aiming to determine if different models can gain an advantage on the data they generated themselves.
297
+
298
+ We select Qwen2.5-Coder-32B-Instruct (Qwen 32B), deepseek-coder-33b-instruct (Dpk 33B), and deepseek-coder-6.7b-instruct (Dpk 7B) to generate data respectively, and reduce the maximum number of iterations to 5. We generated data for both commonly used PLs $\mathrm{C + + }$ and less commonly used PLs Racket. After taking the intersection, we obtain 566 aligned $\mathrm{C + + }$ data points and 206 aligned Racket data points. We then calculate the pass@1 for these three models, with the specific results shown in Table 3.
299
+
300
+ <table><tr><td colspan="4">Input Reasoning (C++)</td></tr><tr><td>Data\Evaluate</td><td>Qwen 32B</td><td>Dpk 33B</td><td>Dpk 7B</td></tr><tr><td>Qwen 32B</td><td>76.3</td><td>49.6</td><td>38.3</td></tr><tr><td>Dpk 33B</td><td>75.6</td><td>47.5</td><td>39.2</td></tr><tr><td>Dpk 7B</td><td>76.3</td><td>48</td><td>37.6</td></tr></table>
301
+
302
+ Output Reasoning $(\mathrm{C} + + )$
303
+
304
+ <table><tr><td>Data\Evaluate</td><td>Qwen 32B</td><td>Dpk 33B</td><td>Dpk 7B</td></tr><tr><td>Qwen 32B</td><td>65.5</td><td>53.0</td><td>42.6</td></tr><tr><td>Dpk 33B</td><td>67.7</td><td>51.2</td><td>44.3</td></tr><tr><td>Dpk 7B</td><td>67.1</td><td>52.6</td><td>43.2</td></tr></table>
305
+
306
+ Input Reasoning (Racket)
307
+
308
+ <table><tr><td>Data\Evaluate</td><td>Qwen 32B</td><td>Dpk 33B</td><td>Dpk 7B</td></tr><tr><td>Qwen 32B</td><td>82.0</td><td>51.9</td><td>42.7</td></tr><tr><td>Dpk 33B</td><td>77.2</td><td>49.0</td><td>37.9</td></tr><tr><td>Dpk 7B</td><td>78.6</td><td>42.2</td><td>41.3</td></tr></table>
309
+
310
+ Output Reasoning (Racket)
311
+
312
+ <table><tr><td>Data\Evaluate</td><td>Qwen 32B</td><td>Dpk 33B</td><td>Dpk 7B</td></tr><tr><td>Qwen 32B</td><td>78.6</td><td>58.7</td><td>47.6</td></tr><tr><td>Dpk 33B</td><td>76.2</td><td>57.8</td><td>46.1</td></tr><tr><td>Dpk 7B</td><td>79.1</td><td>56.8</td><td>44.7</td></tr></table>
313
+
314
+ Table 3: Impact of data generating LLMs
315
+
316
+ It can be observed that the relative ordering of the three models does not change. Moreover, the model used for data generation does not significantly impact the final evaluation results. For instance, in the Input Reasoning task for $\mathrm{C + + }$ Qwen 32B's pass@1 consistently remain around 76.
317
+
318
+ We analyze the possible reason: During both the data generation phase and the evaluation phase, the tasks performed by the LLMs are different. We use the model to generate code in different languages (i.e., code translation), while we evaluate the model's ability to infer outputs/inputs based on given inputs/outputs in code (i.e., code reasoning). It is important to note that the test cases used during the code reasoning phase are not visible to the model during the code translation phase, ensuring a fair evaluation process. Therefore, the model is performing two distinct tasks (i.e., code translation and code reasoning), and there is no unfairness involved.
319
+
320
+ # B The Improvements of Pipeline
321
+
322
+ # B.1 Enhance of the Pipeline
323
+
324
+ (1) For C# we enhance the check function to include the ability to judge if the List and Dict types are equal. (2) For Julia we add the data type to empty dict, for example change input Dict() to Dict(String, String()). Otherwise, the function can not accept the input (3) For JavaScript we change String which Contains special characters, such as"example\n" to `example\n`.
325
+
326
+ # B.2 Transform Complex Types
327
+
328
+ (1) For inputs and outputs that include functions, such as "bfrerat". split("\\-") we will replace the input or output with the result after the function execution. (2) When the input is of Callable type, such as lambda x: x.reverse(), we will remove the parameter and incorporate the Callable type into the main function internally. (3) For complex variables that contain multiple types, if we can convert them into a simpler type without altering the function's functionality, we will preserve such functions. For instance, as illustrated in Listing 4, consider a dictionary d: Dict[str, Union[int, str]]. If converting all its values to the str type does not alter the function's behavior, we will retain it; otherwise, we will discard them.
329
+
330
+ Listing 4: An example with complex type
331
+ 1 from typing import Dict, Union, Tuple
332
+ 2
333
+ 3 def f(d: Dict[str, Union[int, str]]) -> Tuple(bool, bool]:
334
+ 4 r = {
335
+ 5 "c": d.copy(),
336
+ 6 "d": d.copy()
337
+ 7 }
338
+ 8 return (r["c"] is r["d"], r["c"]} == r["d'])
339
+ 9
340
+ 10 def check(candidate):
341
+ 11 assert candidate({"i": 1, "love": "parakeets"}) == (False, True)
342
+ 12
343
+ 13 def test_check():
344
+ 14 check(f)
345
+
346
+ # C The Difficulties for Translation
347
+
348
+ (1) For indexing functions, the starting position is not 0 but 1, with Julia being a typical language that exhibits this behavior. An example is shown in listing 5. (2) For the conversion between Python's str type and its own char and string types, D language is a typical case where this issue arises. An example is shown in listing 6. (3) For the transformation and comparison of dictionary types. For example, C# need to first sort two Dictionary before compare them.
349
+
350
+ Listing 5: Julia Error Case
351
+ 1 function f(text::String, s::Int64, e ::Int64)::Int64
352
+ 2 sublist = text[s+1:e] # Julia uses 1-based indexing, so adjust the start index
353
+ 3 if isempty(sublist)
354
+ 4 return -1
355
+ 5 end
356
+ 6 min_char = minimum(sublist)
357
+ 7 return findfirst(||(min_char), sublist) - 1 # Adjust for 0- based index in the result
358
+ 8 end
359
+
360
+ # D Details of Benchmark Construction
361
+
362
+ # D.1 Experimental Setup of Each Step
363
+
364
+ In Generation step. Given the higher usage cost of closed-source LLMs, we set $N$ to 5, $k$ to 5, $\delta A$ to 0, and the temperature to 0.2 for GPT3.5-Turbo. For DeepseekCoder-33B-Instruct We set $N$ to 50, $k$ to 5, $\delta A$ to 0, and the temperature to 0.8. In Repair step. We set temperature to 0. For GPT-4o, we generate once, and correct errors three times.
365
+
366
+ # D.2 Prompt of Each Step
367
+
368
+ In Figures 7 and 6, we include the prompts we use for our benchmark construction. We use a few-shot prompt for all models. For Generation step of each model, the prompt is show in Figure 7. The example in this Figure is used for GPT3.5-turbo. After the Generation and Repair of GPT3.5-turbo, we choose three examples from the correct generated problems which include str, List, Dict type respectively. We use these examples for Deepseekcoder-instruct-33b Generation. For GPT-4o, based on the summarized difficulties in translation, we provide three examples, as shown in Listing 6, 7, and 8. we present these examples in three distinct languages. For each specific language translation, we employ the corresponding language version of the three examples.
369
+
370
+ As illustrated in Figure 6, the prompt for Repair is shown, which depicts a single round of error correction. The compiler's returned error messages are provided to the model for correction. For multiple rounds of error correction, subsequent error messages are appended to the dialogue after the model encounters errors again.
371
+
372
+ Listing 6: example1 for GPT-4o (D)
373
+ ```txt
374
+ 1 import std.math;
375
+ 2 import std.typecons;
376
+ 3 import std(conv;
377
+ 4 import std.alGORITHM;
378
+ 5 import std.array;
379
+ 6 import std.string;
380
+ 7
381
+ 8 string f(string x, string y) { char[] yMutable = y.dup; yMutable.reverse();
382
+ 11 string tmp = yMutable.map!(c => c == "9" ? "0" : "9").array. map!(c => c.to_string).array. join("");
383
+ 12 if (x.isNumeric && tmp.isNumeric) { return x ~ tmp; } else { return x;
384
+ 16 }
385
+ 17 }
386
+ 18 unittest
387
+ 19 {
388
+ 20 alias candidate = f; assert(candidate([]), sdasdnakjsda80") == "");
389
+ 21 }
390
+ 22 }
391
+ 23 void main(){}
392
+ ```
393
+
394
+ ![](images/37dde3355fd7ee372ad3bb399bd0b98283eaa6e71f6fa52ccd90f0f069ca45e3.jpg)
395
+ Figure 6: Prompt of repair
396
+
397
+ ![](images/1a9d2f8b661ac2b27883b67f665c3bbb796fd840ff2404a99cd5ca0859aa7171.jpg)
398
+ Figure 7: Prompt of generation
399
+
400
+ Listing 7: example2 for GPT-4o (Swift)
401
+ ```swift
402
+ 1 import Foundation
403
+ 2
404
+ 3 func f(strand: String, zmnc: String) -> Int {
405
+ 4 var strand = strand
406
+ 5 var poz = strand范围(of:zmnc)
407
+ 6 while poz != nil {
408
+ 7 strand.removeSubrange(poz!)
409
+ 8 poz = strand范围(of:zmnc)
410
+ 9 }
411
+ 10 let lastIndex = strand范围(of:zmnc, options: [], range: nil, locale: nil)?..lowerBound.utm160offset(in: strand)
412
+ 11 return lastIndex ?? -1
413
+ 12
414
+ 13 func $= =$ (left: [(Int, Int)], right: [(Int, Int)]) -> Bool {
415
+ 14 if left.count != right.count {
416
+ 15 return false
417
+ 16 }
418
+ 17 for (l, r) in zip(left, right) {
419
+ 18 if l != r {
420
+ 19 return false
421
+ 20 }
422
+ 21 }
423
+ 22 return true
424
+ 23 }
425
+ 24
426
+ 25 assert(f(strand:"",zmnc:"abc") == -1)
427
+ ```
428
+
429
+ Listing 8: example3 for GPT-4o (Python)
430
+ ```python
431
+ 1 from typing import Dict,Tuple
432
+ 2
433
+ 3 def f(d: Dict[str, int]) -> Tuple[int ,int]:
434
+ 4 if "x" in d:
435
+ 5 $\mathbf{x} = \mathbf{d}[\mathbf{"}\mathbf{x}^{\prime \prime}]$
436
+ 6 if "y" in d:
437
+ 7 y $=$ d["y"]
438
+ 8 return x,y
439
+ 9
440
+ 10 def checkCandidate):
441
+ 11 assert candidate({"x": 5,"y": 12}) $= =$ (5,12)
442
+ 12
443
+ 13 def test_check():
444
+ 14 check(f)
445
+ ```
446
+
447
+ # E Programming Language Correlation in Translation
448
+
449
+ We observed that after a four-step translation process, the intersection of the 18 programming languages contained only 333 entries. This indicates that each programming language has its unique subset of correctly translated parts. Therefore, we constructed a Venn diagram to study the correlation between the sets of correct translations among different languages.
450
+
451
+ Specifically, the results are shown in Figure 8.
452
+
453
+ Due to the limitation of the number of sets that a Venn diagram can clearly represent, we explored by two methods, each selecting five representative languages. First, we chose the five languages with the largest union of results from the 18 languages to construct the first Venn diagram, which is the left half of Figure 8. Subsequently, we selected the top five most widely used languages, excluding Python, based on data from GitHub 2.0, to construct the second Venn diagram, which is the right half of Figure 8.
454
+
455
+ From Figure 8, we can observe that mainstream programming languages often have more similar syntax structures, and the model's generation capability is stronger for these languages. Therefore, the intersection of the generation results for these five languages is relatively large, with 632 entries, while the union is relatively small, totaling 776 entries. Lua, PHP, R, Ruby, and JavaScript are among the languages with the broadest correct translation entries across all programming languages, with their union totaling 798 entries.
456
+
457
+ ![](images/09b5e8254670c1ff637c08460681825e08bc2f6439a27ca5a027b5db2271eb20.jpg)
458
+ Figure 8: The community of each language in code translation.
459
+
460
+ ![](images/a3e9a55f0c0261672d2eae64d3d07a8432634e003abcfdf449ba44b8f9c11e49.jpg)
461
+
462
+ ![](images/d7c8eff84d98a1cfd0c7bb9b46ec050ccb5f20e18431451c8e8f29ed46390bec.jpg)
463
+ Figure 9: The result of each step in translation
464
+
465
+ # F The Result of Each Step in Translation
466
+
467
+ Figure 9 shows the improvement brought by each step for every language during the construction of the benchmark. It can be observed that each step leads to an overall enhancement in translation performance. For mainstream languages such as C++ and Java, the number of correctly translated items can exceed 600 after one or two steps. For lower-frequency languages like D and Racket, the effect is gradually improved, eventually resulting in all languages having more than 600 correct translations.
468
+
469
+ # G GPU Usage and Total Cost of Translation
470
+
471
+ The total cost of GPT3.5-Turbo and GPT-4o is about $60 US dollars. For Deepseekcoder-Instruct-33b, we use 1 NVIDIA A100-80GB GPU and the generation and repair takes about 72 hours.
472
+
473
+ # H Prompt of Input/Output Reasoning
474
+
475
+ In Figures 12, 10, 11, 13, we include the prompts we use for our benchmark construction. We use a few-shot prompt for all models. The examples of few-shot is shown in Listings 9, 10, 11. All the prompts and examples are demonstrated in the C++ language.
476
+
477
+ Based on the given code, which may contain errors, complete the "????" in assert statement with the output when executing the cpp code on the given test case. Do NOT output any extra information, even if the function is incorrect or incomplete. Do NOT output a description for the assert.
478
+
479
+ cpp {function}
480
+
481
+ [ANSWER] {function answer} [/ANSWER]
482
+
483
+ Figure 10: Prompt of output reasoning (non-GPT)
484
+
485
+ ```txt
486
+ You will be given a cpp function f and a check function, where you only know the output of the test case. Output the completion of the check function so that the code will run without errors by finding any input such that executing f on the input leads to the given output. There may be multiple answers, and you can output any one. Do NOT output any additional information.
487
+ ```cpp
488
+ {function}
489
+ {ANSWER}
490
+ {function answer}
491
+ {ANSWER}
492
+ ```
493
+
494
+ Figure 11: Prompt of input reasoning (GPT)
495
+
496
+ You will be given a cpp function f and a check function, where you only know the output of the test case. Find any input such that executing f on the input leads to the given output. There may be multiple answers, but you should only output one. Think step by step before arriving at an answer. Finally, surround the answer, with no additional words, with [ANSWER] and [/ANSWER] tags. Express your answer as a function call that when executed will give the output.
497
+
498
+ ```
499
+ ```
500
+ cpp
501
+ {example1}
502
+
503
+ [ANSWER] {answer1}
504
+
505
+ [/ANSWER]
506
+ ```
507
+ cpp
508
+ {example2}
509
+
510
+ [ANSWER] {answer2} [/ANSWER] ..cpp {example3}
511
+
512
+ [ANSWER]
513
+ {answer3}
514
+ [/ANSWER]
515
+ ``cpp
516
+ {function}
517
+
518
+ [ANSWER] {function answer} [/ANSWER]
519
+
520
+ Figure 12: Prompt of input reasoning (non-GPT)
521
+
522
+ Based on the given code, which may contain errors, complete the "????" in assert statement with the output when executing the cpp code on the given test case. Do not output any extra information, even if the function is incorrect or incomplete
523
+
524
+ ...cpp{function}
525
+
526
+ [ANSWER] {function answer} [/ANSWER]
527
+
528
+ Figure 13: Prompt of output reasoning (GPT)
529
+
530
+ Listing 9: Input/Output Reasoning example1 $(\mathrm{C} + + )$
531
+ ```c
532
+ 1 #include<assert.h>
533
+ 2 #include<bits/stdc++.h>
534
+ 3 long f(std::vector<std::string> my_list){
535
+ 4 long count $= 0$ .
536
+ 5 for (std::string i : my_list){
537
+ 6 if (i.size()%2 $= = 0$ { count $+ = 1$ .
538
+ 7 }
539
+ 8
540
+ 9 }
541
+ 10 return count;
542
+ 11
543
+ 12 int main(){
544
+ 13 auto candidate $= \mathbb{f}$ .
545
+ 14 assert(candidate((std::vector<std ::string><({(std::string)"mq", (std::string)"px", (std:: string)"zy"}))) $= =$ (3));
546
+ 15 }
547
+ ```
548
+
549
+ Listing 10: Input/Output Reasoning example2 (C++)
550
+ ```cpp
551
+ 1 #include<assert.h>
552
+ 2 #include<bits/stdc++.h>
553
+ 3 std::string f(std::string s1, std:: string s2) {
554
+ 4 return s1 + s2;
555
+ 5 }
556
+ 6 int main() {
557
+ 7 auto candidate = f;
558
+ 8 assert(candidate("ba"), ("nana")) == ("banana"));
559
+ 9 }
560
+ ```
561
+
562
+ Listing 11: Input/Output Reasoning example3 (C++)
563
+ ```cpp
564
+ 1 #include<assert.h>
565
+ 2 #include<bits/stdc++.h>
566
+ 3 std::tuple<long, long> f(std::map<std ::string, long> d) {
567
+ 4 long x = 0, y = 0;
568
+ 5 if(d.find("x") != d.end()){
569
+ 6 x = d["x"];
570
+ 7 }
571
+ 8 if(d.find("y") != d.end()){
572
+ 9 y = d["y"];
573
+ 10 }
574
+ 11 return std::make tuple(x, y);
575
+ 12 }
576
+ 13 int main() {
577
+ 14 auto candidate = f;
578
+ 15 assert(candidate((std::map<std:: string,long>({{"x",5}}, {"y", 12}})))) == (std::make tuple (5, 12));
579
+ 16 }
580
+ ```
581
+
582
+ # I The Statistics of Benchmark
583
+
584
+ We present specific statistics for our benchmark across various PLs. As shown in Table 4, the average number of lines and average length for each PLs is provided. Each entry corresponds to one test case, and the input-output reasoning is evaluated by predicting the outcome of that test case.
585
+
586
+ # J Code Reasoning Task
587
+
588
+ # J.1 The Connection Between Code Reasoning and Input/Output Prediction
589
+
590
+ Input/output prediction is a good carrier for demonstrating code reasoning capabilities. First, for code tasks such as code generation, code repair, and code translation, they all fundamentally depend on understanding the code execution process. The input/output reasoning ability of a LLM is excellent representation of this understanding. What's more, starting from the perspective of LLMs input/output reasoning is a task that is easy to judge for correctness and has a certain level of difficulty,
591
+
592
+ <table><tr><td>language</td><td>Rust</td><td>Racket</td><td>Lua</td><td>Java</td></tr><tr><td>avg line</td><td>14.1</td><td>17.6</td><td>17.3</td><td>22</td></tr><tr><td>avg length</td><td>380.4</td><td>401.1</td><td>413.3</td><td>641.6</td></tr><tr><td>Scala</td><td>PHP</td><td>Perl</td><td>GO</td><td>D</td></tr><tr><td>16.1</td><td>17.3</td><td>21.3</td><td>35.8</td><td>21.5</td></tr><tr><td>445.9</td><td>407.8</td><td>409.3</td><td>755.2</td><td>396.6</td></tr><tr><td>C++</td><td>C#</td><td>TS</td><td>Python</td><td>R</td></tr><tr><td>16.4</td><td>22.9</td><td>17.1</td><td>14.3</td><td>11.3</td></tr><tr><td>481.1</td><td>636.3</td><td>405.1</td><td>303.4</td><td>347.2</td></tr><tr><td>Julia</td><td>Ruby</td><td>JS</td><td>Swift</td><td>Shell</td></tr><tr><td>15.2</td><td>14.5</td><td>16</td><td>24.5</td><td>23.2</td></tr><tr><td>299.3</td><td>321.9</td><td>344.6</td><td>551.4</td><td>370.4</td></tr></table>
593
+
594
+ Table 4: The average number of lines and average length of our benchmark
595
+
596
+ requiring rigorous logical reasoning. This task is of great reference value for evaluating the reasoning capabilities of language models.
597
+
598
+ # J.2 The Applicability of Code Reasoning Tasks
599
+
600
+ In software development, understanding and predicting the input and output of code is crucial for detecting potential security vulnerabilities and ensuring the reliability of the code. For example, input validation and output filtering are key steps in preventing security vulnerabilities such as SQL injection and cross-site scripting attacks. A LLM capable of precise input and output reasoning can provide strong support in this regard.
601
+
602
+ # K Additional Case Study
603
+
604
+ # K.1 Error Cases of GPT-4o
605
+
606
+ As can be seen in Table 2, even GPT-4o fails to successfully solve approximately $30\%$ of the problems. We analyze this portion of cases, specifically selecting those where less than two PLs out of 19 passed the test cases. We find that a significant number of these cases involve the processing of long strings. In input reasoning tasks, this accounted for $85.2\%$ (46/54) of the cases. In Output reasoning tasks, it accounted for $68.4\%$ (39/57).
607
+
608
+ Listings 12 and 13 respectively show the error cases of GPT-4o in input / output reasoning tasks. In Listing 12, the LLM fail to comprehend the code's intention of converting the case of every alternate character. In Listing 13, the variable space_symbol consists of two parentheses, but the
609
+
610
+ LLMs mistakenly interpreted it as one parenthesis, leading to an error. This aligns with the conclusion in Section 4.1 that the longer the input or output, the more prone the LLMs are to making mistakes.
611
+
612
+ # K.2 Comparative Evaluation of LLMs' Reasoning Ability
613
+
614
+ To better understand the reasoning capabilities of different LLMs, we select three LLMs at varying levels: GPT-4o, DeepseekCoder-6.7b-base, and phi-1.5. We compare them pairwise to assess the reasoning ability of each LLM. We define that if a model correctly solves a problem in more than 17 PLs, it is considered to have mastered that problem. Conversely, if it solves the problem in fewer than 3 languages, it is deemed not to have mastered it.
615
+
616
+ By comparing the problems that GPT-4o master but DeepseekCoder-6.7b-base do not, we find that these problems mostly require multi-step operations, but the overall difficulty does not exceed the problem in Listing 12. As shown in Listings 14 and 15, one such problem involves successfully reversing ’ OOP ’ and removing extra spaces. Although DeepseekCoder-6.7b-base also execute these two steps, it fail to completely remove the spaces on both sides.
617
+
618
+ Next, by comparing the problems that DeepseekCoder-6.7b-base master but phi-1.5 do not, we find that these issues often arise because phi-1.5 fails to correctly write variables corresponding to programming languages other than Python, accounting for $90\%$ (36/40) of the cases. As illustrated in Listings 16 and 17, phi-1.5 does not understand the meaning of the long-type variable and still outputs it as a string, leading to syntax errors.
619
+
620
+ From the above analysis, it can be seen that GPT-4o is capable of handling relatively complex tasks, DeepseekCoder-6.7b-base performs well in simple tasks but may make minor errors in complex tasks. phi-1.5, although demonstrating a certain level of Cross-PL Generalization, still performs poorly in non-Python languages. Particularly in understanding variable types and syntax.
621
+
622
+ Listing 12: Error Case of GPT-4o (Input Reasoning, C++)
623
+ ```cpp
624
+ 1 #include<assert.h>
625
+ 2 #include<bits/stdc++.h>
626
+ 3 std::string f(std::string line) {
627
+ 4 int count = 0;
628
+ 5 std::string a;
629
+ 6 for (int i = 0; i < line.length() ; i++) {
630
+ 7 count += 1;
631
+ 8 if (count%2==0) {
632
+ 9 a.push_back(tolower(line[ i]) == line[i] ? toupper(line[i] : tolower(line[i]);
633
+ 10 }
634
+ 11 else {
635
+ 12 a.push_back(line[i]);
636
+ 13 }
637
+ 14 }
638
+ 15 return a;
639
+ 16 }
640
+ 17 int main() {
641
+ 18 auto candidate = f;
642
+ 19 assert(candidate("987yHnShAsHd 93275YrGsGbGsShFbSfB")) == (" 987YhnShASHD 93275 yRgsgBgssHfBsFB"));
643
+ 20 }
644
+ ```
645
+
646
+ Listing 13: Error Case of GPT-4o (Output Reasoning, Python)
647
+ ```python
648
+ 1 def f(text: str, space_SYMBOL: str, size: int) -> str:
649
+ 2 spaces = '.join(space_SYMBOL for i in range(size-len(text)))
650
+ 3 return text + spaces
651
+ 4
652
+ 5 def check(candidate):
653
+ 6 assert candidate('w', ''), 7) == 'w)******')
654
+ 8 def test_check():
655
+ 9 check(f)
656
+ 10
657
+ 11 test_check()
658
+ ```
659
+
660
+ Listing 14: Correct Case of GPT-4o (Output Reasoning, Python)
661
+ ```python
662
+ 1 def f(s: str) -> str:
663
+ 2 arr = list(s.strip())
664
+ 3 arr.reverse()
665
+ 4 return '.join(arr)
666
+ 5
667
+ 6 def check(candidate):
668
+ 7 assert candidate(' 00P ' == 'P00'
669
+ 8
670
+ 9 def test_check():
671
+ 10 check(f)
672
+ 11
673
+ 12 test_check()
674
+ ```
675
+
676
+ Listing 15: Error Case of DeepseekCoder-6.7b-base (Output Reasoning, Python)
677
+ ```python
678
+ 1 def f(s: str) -> str:
679
+ 2 arr = list(s.strip())
680
+ 3 arr.reverse()
681
+ 4 return '.join(arr)
682
+ 5
683
+ 6 def check(candidate):
684
+ 7 assert candidate(' 00P ' == ' P00'
685
+ 8
686
+ 9 def test_check():
687
+ 10 check(f)
688
+ 11
689
+ 12 test_check()
690
+ ```
691
+
692
+ Listing 16: Correct Case of DeepseekCoder-6.7b-base (Input Reasoning, C++)
693
+ ```cpp
694
+ 1 #include<assert.h>
695
+ 2 #include<bits/stdc++.h>
696
+ 3 std::string f(std::string text, long size) {
697
+ 4 long counter = text.length();
698
+ 5 for (long i = 0; i < size - (size % 2); ++i) {
699
+ 6 text = " " + text + " ";
700
+ 7 counter += 2;
701
+ 8 if (counter >= size) {
702
+ 9 return text;
703
+ 10 }
704
+ 11 }
705
+ 12 return text;
706
+ 13 }
707
+ 14 int main() {
708
+ 15 auto candidate = f;
709
+ 16 assert(candidate("7"), ("7")) == ("7"));
710
+ 17 }
711
+ ```
712
+
713
+ Listing 17: Error Case of Phi-1.5 (Input Reasoning, C++)
714
+ ```c
715
+ 1 #include<assert.h>
716
+ 2 #include<bits/stdc++.h>
717
+ 3 std::string f(std::string text, long size) {
718
+ 4 long counter = text.length();
719
+ 5 for (long i = 0; i < size - (size % 2); ++i) {
720
+ 6 text = " " + text + " ";
721
+ 7 counter += 2;
722
+ 8 if (counter >= size) {
723
+ 9 return text;
724
+ 10 }
725
+ 11 }
726
+ 12 return text;
727
+ 13 }
728
+ 14 int main() {
729
+ 15 auto candidate = f;
730
+ 16 assert(candidate("7"), (11)) == ("7"));
731
+ 17 }
732
+ ```
2025/CRUXEVAL-X_ A Benchmark for Multilingual Code Reasoning, Understanding and Execution/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:967ffdca30f459e70a436575c154eb49b71189e99dcff1bc8b438b6f59447d78
3
+ size 1054648
2025/CRUXEVAL-X_ A Benchmark for Multilingual Code Reasoning, Understanding and Execution/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2025/CRiskEval_ A Chinese Multi-Level Risk Evaluation Benchmark Dataset for Large Language Models/a84299f5-3d1c-44be-a92a-894c465d8ec7_content_list.json ADDED
The diff for this file is too large to render. See raw diff