Generating Sentence-Level Embedding Based on the Trends in Token-Level BERT Embeddings
The sentence (phrase or passage) level embedding is often used as input in many NLP classification problems, for example, in spam detection and question-answering (QA) systems. In my previous post Discovering Trends in BERT Embeddings of Different Levels for the Task of Semantic Context Determining, I discussed how you might generate a vector representation that holds information about changes in contextual embedding values relative to a static embedding of the same token, which you then can use as a component for generating a sentence-level embedding. This article expands on this topic, exploring what tokens in a sentence you need to derive such trend vectors from to be able to generate an efficient embedding for the entire sentence. The first question that arises in connection with this is: from how many tokens in a sentence do you need to derive the embedding in order to generate an efficient embedding for the entire sentence? If you recall from the discussion in the previous post, we're getting a single vector -- derived for the most important word in a sentence -- that includes information about the context of the entire sentence.
Jan-5-2023, 05:15:13 GMT
- Technology: