A siamese network uses two identical subnetworks with shared parameters and weights to encode separate inputs for comparison. In Sentence-BERT, each sentence is encoded independently so the resulting embeddings capture semantic relationships. section 2.3.1
The architecture supports semantic comparison by:
- Encoding each sentence independently with the same network. section 2.3.1
- Learning to distinguish similar sentence pairs from dissimilar pairs. section 2.3.1
- Using shared parameters to encourage embeddings that preserve semantic relationships. section 2.3.1
SBERT comparison path
Unlike BERT, which concatenates two sentences before processing them, Sentence-BERT independently encodes both sentences and calculates their cosine similarity.
