Margins in Contrastive Learning: Evaluating Multi-task Retrieval for Sentence Embeddings
| dc.contributor.author | Jørgensen, Tollef Emil | |
| dc.contributor.author | Breitung, Jens | |
| dc.contributor.editor | Johansson, Richard | |
| dc.contributor.editor | Stymne, Sara | |
| dc.coverage.spatial | Tallinn, Estonia | |
| dc.date.accessioned | 2025-02-18T09:08:44Z | |
| dc.date.available | 2025-02-18T09:08:44Z | |
| dc.date.issued | 2025-03 | |
| dc.description.abstract | This paper explores retrieval with sentence embeddings by fine-tuning sentence-transformer models for classification while preserving their ability to capture semantic similarity. To evaluate this balance, we introduce two opposing metrics – polarity score and semantic similarity score – that measure the model's capacity to separate classes and retain semantic relationships between sentences. We propose a system that augments supervised datasets with contrastive pairs and triplets, training models under various configurations and evaluating their performance on top-$k$ sentence retrieval. Experiments on two binary classification tasks demonstrate that reducing the margin parameter of loss functions greatly mitigates the trade-off between the metrics. These findings suggest that a single fine-tuned model can effectively handle joint classification and retrieval tasks, particularly in low-resource settings, without relying on multiple specialized models. | |
| dc.identifier.uri | https://hdl.handle.net/10062/107219 | |
| dc.language.iso | en | |
| dc.publisher | University of Tartu Library | |
| dc.relation.ispartofseries | NEALT Proceedings Series, No. 57 | |
| dc.rights | Attribution-NonCommercial-NoDerivatives 4.0 International | |
| dc.rights.uri | https://creativecommons.org/licenses/by-nc-nd/4.0/ | |
| dc.title | Margins in Contrastive Learning: Evaluating Multi-task Retrieval for Sentence Embeddings | |
| dc.type | Article |
Failid
Originaal pakett
1 - 1 1