TermGPT: Multi-Level Contrastive Fine-Tuning for Terminology Adaptation in Legal and Financial Domain
Yidan Sun, Mengying Zhu, Feiyue Chen, Yangyang Wu, Xiaolei Dan, Mengyuan Yang, Xiaolin Zheng, Shenglin Ben
TL;DR
The paper tackles the isotropy of LLM embeddings that impairs domain-specific terminology discrimination in legal and financial contexts. It introduces TermGPT, a terminology-aware fine-tuning framework that couples sentence-graph based data augmentation with multi-level contrastive learning (sentence- and token-level) to balance global context and fine-grained term distinctions. It contributes a specialized financial terminology dataset and demonstrates that TermGPT yields notable improvements over domain-pretrained and contrastive baselines on terminology QCA and QA tasks, with robust cross-domain performance. The work has practical impact for high-stakes NLP tasks in regulated domains and points to future work on adversarial robustness.
Abstract
Large language models (LLMs) have demonstrated impressive performance in text generation tasks; however, their embedding spaces often suffer from the isotropy problem, resulting in poor discrimination of domain-specific terminology, particularly in legal and financial contexts. This weakness in terminology-level representation can severely hinder downstream tasks such as legal judgment prediction or financial risk analysis, where subtle semantic distinctions are critical. To address this problem, we propose TermGPT, a multi-level contrastive fine-tuning framework designed for terminology adaptation. We first construct a sentence graph to capture semantic and structural relations, and generate semantically consistent yet discriminative positive and negative samples based on contextual and topological cues. We then devise a multi-level contrastive learning approach at both the sentence and token levels, enhancing global contextual understanding and fine-grained terminology discrimination. To support robust evaluation, we construct the first financial terminology dataset derived from official regulatory documents. Experiments show that TermGPT outperforms existing baselines in term discrimination tasks within the finance and legal domains.
