Sentence-BERT with a Siamese Network

Learn how Sentence-BERT uses the Siamese network architecture for fine-tuning pre-trained BERT for sentence pair classification and sentence pair regression tasks.

Sentence-BERT uses the Siamese network architecture for fine-tuning the pre-trained BERT model for sentence pair tasks. In this lesson, let's understand how the Siamese network architecture is useful and how we fine-tune the pre-trained BERT for sentence pair tasks. First, we will see how Sentence-BERT works for a sentence pair classification task, then we will learn how Sentence-BERT works for a sentence pair regression task.

Sentence pair classification task

Suppose we have a dataset containing sentence pairs and a binary label indicating whether the sentence pairs are similar (1) or dissimilar (0), as shown in the following figure:

Get hands-on with 1400+ tech skills courses.