Free Lunch for Efficient Textual Commonsense Integration in Language Models

Wanyun Cui, Xingran Chen


Abstract
Recent years have witnessed the emergence of textual commonsense knowledge bases, aimed at providing more nuanced and context-rich knowledge. The integration of external commonsense into language models has been shown to be a key enabler in advancing the state-of-the-art for a wide range of NLP tasks. However, incorporating textual commonsense descriptions is computationally expensive, as compared to encoding conventional symbolic knowledge. In this paper, we propose a method to improve its efficiency without modifying the model. Our idea is to group training samples with similar commonsense descriptions into a single batch, thus reusing the encoded description across multiple samples. We theoretically investigate this problem and demonstrate that its upper bound can be reduced to the classic graph k-cut problem. Consequently, we propose a spectral clustering-based algorithm to solve this problem. Extensive experiments illustrate that the proposed batch partitioning approach effectively reduces the computational cost while preserving performance. The efficiency improvement is more pronounced on larger datasets and on devices with more memory capacity, attesting to its practical utility for large-scale applications.
Anthology ID:
2023.acl-long.208
Volume:
Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)
Month:
July
Year:
2023
Address:
Toronto, Canada
Editors:
Anna Rogers, Jordan Boyd-Graber, Naoaki Okazaki
Venue:
ACL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
3759–3770
Language:
URL:
https://aclanthology.org/2023.acl-long.208
DOI:
10.18653/v1/2023.acl-long.208
Bibkey:
Cite (ACL):
Wanyun Cui and Xingran Chen. 2023. Free Lunch for Efficient Textual Commonsense Integration in Language Models. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3759–3770, Toronto, Canada. Association for Computational Linguistics.
Cite (Informal):
Free Lunch for Efficient Textual Commonsense Integration in Language Models (Cui & Chen, ACL 2023)
Copy Citation:
PDF:
https://aclanthology.org/2023.acl-long.208.pdf
Video:
 https://aclanthology.org/2023.acl-long.208.mp4