G-Loss: Graph-Guided Fine-Tuning of Language Models
Sharma Aditya, Agarwal Vinti, Kumar Rajesh
TLDR
G-Loss is a new graph-guided loss function for fine-tuning LMs, improving embedding quality and classification accuracy by leveraging global semantic structure.
Key contributions
- Introduces G-Loss, a graph-guided loss function for fine-tuning language models.
- Incorporates semi-supervised label propagation to capture global semantic structure.
- Builds a document-similarity graph to guide learning of discriminative embeddings.
- Achieves faster convergence and higher classification accuracy on 5 benchmark datasets.
Why it matters
Traditional LM fine-tuning losses miss global semantic structure. G-Loss addresses this by using graph-guided learning, leading to more robust and accurate embeddings. This significantly improves performance on various classification tasks, making LMs more effective.
Original Abstract
Traditional loss functions, including cross-entropy, contrastive, triplet, and su pervised contrastive losses, used for fine-tuning pre-trained language models such as BERT, operate only within local neighborhoods and fail to account for the global semantic structure. We present G-Loss, a graph-guided loss function that incorporates semi-supervised label propagation to use structural relationships within the embedding manifold. G-Loss builds a document-similarity graph that captures global semantic relationships, thereby guiding the model to learn more discriminative and robust embeddings. We evaluate G-Loss on five benchmark datasets covering key downstream classification tasks: MR (sentiment analysis), R8 and R52 (topic categorization), Ohsumed (medical document classification), and 20NG (news categorization). In the majority of experimental setups, G-Loss converges faster and produces semantically coherent embedding spaces, resulting in higher classification accuracy than models fine-tuned with traditional loss functions.
📬 Weekly AI Paper Digest
Get the top 10 AI/ML arXiv papers from the week — summarized, scored, and delivered to your inbox every Monday.