Papers › Breaking Free Transformer Models: Task-specific Context Attribution Promises Improved...

Breaking Free Transformer Models: Task-specific Context Attribution Promises Improved Generalizability Without Fine-tuning Pre-trained LLMs

30 Jan 2024arXiv:2401.16638archive 2025-07-28

Stepan Tytarenko, Mohammad Ruhul Amin

Fine-tuning large pre-trained language models (LLMs) on particular datasets is a commonly employed strategy in Natural Language Processing (NLP) classification tasks. However, this approach usually results in a loss of models generalizability. In this paper, we present a framework that allows for maintaining generalizability, and enhances the performance on the downstream task by utilizing task-specific context attribution. We show that a linear transformation of the text representation from any transformer model using the task-specific concept operator results in a projection onto the latent concept space, referred to as context attribution in this paper. The specific concept operator is optimized during the supervised learning stage via novel loss functions. The proposed framework demonstrates that context attribution of the text representation for each task objective can improve the capacity of the discriminator function and thus achieve better performance for the classification task. Experimental results on three datasets, namely HateXplain, IMDB reviews, and Social Media Attributions, illustrate that the proposed model attains superior accuracy and generalizability. Specifically, for the non-fine-tuned BERT on the HateXplain dataset, we observe 8% improvement in accuracy and 10% improvement in F1-score. Whereas for the IMDB dataset, fine-tuned state-of-the-art XLNet is outperformed by 1% for both accuracy and F1-score. Furthermore, in an out-of-domain cross-dataset test, DistilBERT fine-tuned on the IMDB dataset in conjunction with the proposed model improves the F1-score on the HateXplain dataset by 7%. For the Social Media Attributions dataset of YouTube comments, we observe 5.2% increase in F1-metric. The proposed framework is implemented with PyTorch and provided open-source on GitHub.

PaperPDFCode

Code

stepantita/space-model officialmentioned in paperpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Sentiment AnalysisSentiment ClassificationText ClassificationWord EmbeddingsZero-Shot Text Classification

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Sentiment Analysis IMDb Space-XLNet Accuracy 94.88 #20 of 49 Archive leaderboard report
Sentiment Analysis IMDb Movie Reviews Space-XLNet Accuracy (2 classes) 0.9488 #1 of 2 Archive leaderboard report
Sentiment Analysis IMDb Movie Reviews Space-XLNet F1 Macro 0.9487 #1 of 2 Archive leaderboard report
Sentiment Analysis IMDb Movie Reviews Space-DistilBERT Accuracy (2 classes) 0.8322 #2 of 2 Archive leaderboard report
Sentiment Analysis IMDb Movie Reviews Space-DistilBERT F1 Macro 0.8320 #2 of 2 Archive leaderboard report
Text Classification HateXplain Space-XLNet Accuracy (2 classes) 0.8798 #1 of 4 Archive leaderboard report
Text Classification HateXplain Space-XLNet F1 Macro 0.8797 #1 of 4 Archive leaderboard report
Text Classification HateXplain XLNet Accuracy (2 classes) 0.8160 #2 of 4 Archive leaderboard report
Text Classification HateXplain XLNet F1 Macro 0.8156 #2 of 4 Archive leaderboard report
Text Classification HateXplain Space-BERT Accuracy (2 classes) 0.8110 #3 of 4 Archive leaderboard report
Text Classification HateXplain Space-BERT F1 Macro 0.8108 #3 of 4 Archive leaderboard report
Text Classification HateXplain BERT-base Accuracy (2 classes) 0.6588 #4 of 4 Archive leaderboard report
Text Classification HateXplain BERT-base F1 Macro 0.6555 #4 of 4 Archive leaderboard report
Text Classification IMDb Movie Reviews XLNet Accuracy (2 classes) 0.9387 #2 of 3 Archive leaderboard report
Text Classification IMDb Movie Reviews Space-XLNet F1 Macro 0.9487 #3 of 3 Archive leaderboard report
Text Classification Social media attributions of YouTube comments Space-BERT Accuracy (2 classes) 0.8309 #1 of 2 Archive leaderboard report
Text Classification Social media attributions of YouTube comments Space-BERT F1 Macro 0.8006 #1 of 2 Archive leaderboard report
Text Classification Social media attributions of YouTube comments BERT-base Accuracy (2 classes) 0.8220 #2 of 2 Archive leaderboard report
Text Classification Social media attributions of YouTube comments BERT-base F1 Macro 0.7484 #2 of 2 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

AdamAttentionAttention DropoutBERTBPEDense ConnectionsDistilBERTDropoutLayer NormalizationLinear LayerLinear Warmup With Linear DecayMulti-Head AttentionResidual ConnectionSentencePieceSoftmaxWeight DecayWordPieceXLNet

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections