Free Lunch for Efficient Textual Commonsense Integration in Language Models

05/24/2023
by   Wanyun Cui, et al.
0

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. We group training samples with similar commonsense descriptions into a single batch, thus reusing the encoded description across multiple samples. One key observation is that the upper bound of batch partitioning 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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/06/2021

Enhancing Language Models with Plug-and-Play Large-Scale Commonsense

We study how to enhance language models (LMs) with textual commonsense k...
research
11/29/2022

Improving Commonsense in Vision-Language Models via Knowledge Graph Riddles

This paper focuses on analyzing and improving the commonsense ability of...
research
04/22/2020

Visual Commonsense Graphs: Reasoning about the Dynamic Context of a Still Image

Even from a single frame of a still image, people can reason about the d...
research
09/17/2021

Does Commonsense help in detecting Sarcasm?

Sarcasm detection is important for several NLP tasks such as sentiment i...
research
08/18/2021

It’s Common Sense, isn’t it? Demystifying Human Evaluations in Commonsense-enhanced NLG systems

Common sense is an integral part of human cognition which allows us to m...
research
01/12/2021

Dimensions of Commonsense Knowledge

Commonsense knowledge is essential for many AI applications, including t...
research
01/19/2023

Batch Prompting: Efficient Inference with Large Language Model APIs

Performing inference on hundreds of thousands of samples with large lang...

Please sign up or login with your details

Forgot password? Click here to reset