Papers › Universal Language Model Fine-tuning for Text Classification

Universal Language Model Fine-tuning for Text Classification

18 Jan 2018ACL 2018 7arXiv:1801.06146archive 2025-07-28

Jeremy Howard, Sebastian Ruder

Inductive transfer learning has greatly impacted computer vision, but existing approaches in NLP still require task-specific modifications and training from scratch. We propose Universal Language Model Fine-tuning (ULMFiT), an effective transfer learning method that can be applied to any task in NLP, and introduce techniques that are key for fine-tuning a language model. Our method significantly outperforms the state-of-the-art on six text classification tasks, reducing the error by 18-24% on the majority of datasets. Furthermore, with only 100 labeled examples, it matches the performance of training from scratch on 100x more data. We open-source our pretrained models and code.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

No sample from the archive's official repository (fastai/fastai) is linked to this paper; the 5 samples below come from 2 community repositories. Syntology harvested code from fastai/fastai for another paper.

fastai/fastai: Syntology's graph links these samples to fastai: A Layered API for Deep Learning (arXiv:2002.04688; that paper's own run record: 1 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 7 unverified); nothing checks that they implement this paper's method.

Syntology 5 code samples harvested from 2 repositories linked to this paper: 2 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 2 where Syntology's instrument failed) · 3 unverified. Where Syntology's instrument failed: 2 where our contract draft was wrong; failures of Syntology's instrument, not of the code. Every run on this page is a failure of Syntology's instrument, not of the code.

By repository: community (archive-listed): 5 samples from 2 repositories, 2 ran (0 with no instrument failure; 2 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 4 of its repositories that Syntology harvested for other papers:

Levels written on 2026-09-22 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

66 repositories listed; official and paper-mentioned ones first.

fastai/fastai officialpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to fastai: A Layered API for Deep Learning (arXiv:2002.04688; that paper's own run record: 1 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 7 unverified); nothing checks that they implement this paper's method. report
AbhimanyuAryan/IMDB-NLP mentioned on GitHubSyntology: not harvested report
AnttiKarlsson/finnish_ulmfit mentioned on GitHubpytorchSyntology: not harvested report
Deepayan137/Adapting-OCR mentioned on GitHubpytorchSyntology: not harvested report
Julian1070/Deep-Learning mentioned on GitHubpytorchSyntology: not harvested report
LamLauChiu/Tensorflow_Learning mentioned on GitHubtfSyntology: not harvested report
MJahangeerQureshi/Text-Classification mentioned on GitHubSyntology: not harvested report
Mees-Molenaar/protein_location mentioned on GitHubpytorchSyntology: not harvested report
PrideLee/sentiment-analysis mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Attention Is All You Need (arXiv:1706.03762; that paper's own run record: 610 ran (of which 293 constructed an object rather than computing a result; 529 with no instrument failure: 45 honoured, 15 violated, 469 with no contract checked; 81 where Syntology's instrument failed) · 336 unverified); nothing checks that they implement this paper's method. report
RajasSU/Twitter-Sentiment-Analysis-using-ULMFiT mentioned on GitHubSyntology: not harvested report
SkullFang/ULMFIT_NLP_Classification mentioned on GitHubSyntology: not harvested report
Socialbird-AILab/BERT-Classification-Tutorial mentioned on GitHubtfSyntology: not harvested report
TheShadow29/subreddit-classification-dataset mentioned on GitHubtfSyntology: not harvested report
ahmadelsallab/READ mentioned on GitHubtfSyntology: not harvested report
akari0216/Paddle-awdlstm mentioned on GitHubpaddleSyntology: not harvested report
alantancr/Hotel-Recommender mentioned on GitHubtfSyntology: not harvested report
alexandra-chron/ntua-slp-wassa-iest2018 mentioned on GitHubpytorchSyntology: not harvested report
alexandra-chron/wassa-2018 mentioned on GitHubpytorchSyntology: not harvested report
algoashutosh/sentiment-analysis-project mentioned on GitHubpytorchSyntology: not harvested report
amagooda/SummaRuNNer_coattention mentioned on GitHubpytorchSyntology: not harvested report
anthonyckleung/Transfer-Learning-in-Sentiment-Tweets mentioned on GitHubpytorchSyntology: not harvested report
anubhavmaity/Ag-News-Category-Classifier mentioned on GitHubSyntology: not harvested report
apmoore1/language-model mentioned on GitHubpytorchSyntology: not harvested report
benjaminvdb/110kDBRD mentioned on GitHubSyntology: not harvested report
benjaminvdb/DBRD mentioned on GitHubSyntology: not harvested report
bhuvanakundumani/sexist_rmks_classifier mentioned on GitHubSyntology: not harvested report
cahya-wirawan/indonesian-language-models mentioned on GitHubtfSyntology: not harvested report
castortroynz/desafio_atuacao19 mentioned on GitHubSyntology: not harvested report
comicencyclo/TransferLearning_DiscriminativeFineTuning mentioned on GitHubSyntology: not harvested report
cstorm125/thai2fit mentioned on GitHubpytorchSyntology: not harvested report
dhruvsawhney/CS152_FinalProject mentioned on GitHubSyntology: not harvested report
dpalominop/ULMFit mentioned on GitHubSyntology: not harvested report
floleuerer/fastai_ulmfit mentioned on GitHubMITSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to BERTje: A Dutch BERT Model (arXiv:1912.09582; that paper's own run record: 4 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 0 honoured, 0 violated, 2 with no contract checked; 2 where Syntology's instrument failed) · 1 unverified); nothing checks that they implement this paper's method. report
floraxinru/HotelReviews_SentimentAnalysis mentioned on GitHubSyntology: not harvested report
floraxinru/NLP_HotelReviews mentioned on GitHubSyntology: not harvested report
haianhle/ULMFiT-Sentiment mentioned on GitHubSyntology: not harvested report
heye0507/individualNLPClassifier mentioned on GitHubpytorchSyntology: not harvested report
hpanwar08/sentence-classification-pytorch mentioned on GitHubpytorchSyntology: not harvested report
jackbandy/deep_learning_ulmfit mentioned on GitHubSyntology: not harvested report
jannenev/ulmfit-language-model mentioned on GitHubpytorchSyntology: not harvested report
joelweber97/Python3_TF_Certificate mentioned on GitHubtfSyntology: not harvested report
keithRebello/ULMFiT_sentiment_analysis mentioned on GitHubSyntology: not harvested report
khumbuai/keras_wiki_lm mentioned on GitHubtfSyntology: not harvested report
lukashedegaard/ride mentioned on GitHubpytorchApache-2.0Syntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to A System for Massively Parallel Hyperparameter Tuning (arXiv:1810.05934; that paper's own run record: 14 ran (of which 0 constructed an object rather than computing a result; 14 with no instrument failure: 0 honoured, 0 violated, 14 with no contract checked; 0 where Syntology's instrument failed) · 1 unverified); nothing checks that they implement this paper's method. report
lukexyz/Language-Models mentioned on GitHubpytorchSyntology: not harvested report
magic-lantern/nlp-transfer-learning mentioned on GitHubpytorchSyntology: not harvested report
mamamot/Russian-ULMFit mentioned on GitHubpytorchSyntology: not harvested report
mdaniluk/language-detector mentioned on GitHubSyntology: not harvested report
mrdbourke/tensorflow-deep-learning mentioned on GitHubtfSyntology: not harvested report
muellerzr/CodeFest_2019 mentioned on GitHubSyntology: not harvested report
neburseni/NLP mentioned on GitHubSyntology: not harvested report
nextbigwhat-ai/sentiment-analysis-pytorch mentioned on GitHubpytorchSyntology: not harvested report
nishee0521/Sarcasm-Detector mentioned on GitHubSyntology: not harvested report
noise-field/Russian-ULMFit mentioned on GitHubpytorchSyntology: not harvested report
prajjwal1/language-modelling mentioned on GitHubpytorchSyntology: 3 samples, 0 ran · 3 unverified report
radoslawkrolikowski/sentiment-analysis-pytorch mentioned on GitHubpytorchSyntology: not harvested report
rajs96/ULMFiT-Twitter-US-Airline-Sentiment mentioned on GitHubSyntology: not harvested report
rania000/SentAnalyser mentioned on GitHubpytorchSyntology: not harvested report
rodrigopivi/aida mentioned on GitHubtfSyntology: not harvested report
shivam360d/Sentiment-Analysis-ULMFit mentioned on GitHubSyntology: not harvested report
simecek/Czech-ULMFiT mentioned on GitHubSyntology: not harvested report
tanmaylaud/Patient_Conversation_Classifier_FastAI mentioned on GitHubSyntology: not harvested report
tanvir-ishraq/healifyai--llm-based-healthcare-system mentioned on GitHubpytorchSyntology: not harvested report
thisiskhan/tensorflow-developer-certificate-machine-learning-kit mentioned on GitHubtfSyntology: not harvested report
uchange/ulangel mentioned on GitHubpytorchSyntology: 2 samples, 2 ran (2 instrument-failed) · 0 unverified report
varshinireddyt/ULMFiT mentioned on GitHubSyntology: not harvested 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.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

5 samples harvested: 2 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 2 where Syntology's instrument failed) · 3 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Every run on this page is a failure of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

2ran · our draft was wrong
3unverified

Licence: 3 of the 5 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

prajjwal1/language-modelling community (archive-listed) 3 samples, 0 ran · 3 unverified
get_texts in 12 papers ULMfit.py unverified no licence file found · pointer only · 2a2b16561a736d43 · report
repackage_var fastai/lm_rnn.py unverified no licence file found · pointer only · e18c93c24e6c53bf · report
seq2seq_reg fastai/lm_rnn.py unverified no licence file found · pointer only · 929d963d360617be · report
uchange/ulangel community (archive-listed) 2 samples, 2 ran (2 instrument-failed) · 0 unverified
lower_tw ulangel/data/text_processor.py ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 80418ee432e95278 · report fixture: signature tweet:str/0/str · returned str · level recorded 2026-09-22
toLowercase ulangel/data/text_processor.py ran · our draft was wrong Apache-2.0 (permissive) · 6ee9ad2657174087 · report fixture: signature matchobj:Match/0/? · returned str · level recorded 2026-09-22

Tasks

General ClassificationLanguage ModelingLanguage ModellingSentiment AnalysisText ClassificationTransfer Learning

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Sentiment Analysis IMDb ULMFiT Accuracy 95.4 #16 of 49 Archive leaderboard report
Sentiment Analysis Yelp Binary classification ULMFiT Error 2.16 #7 of 20 Archive leaderboard report
Sentiment Analysis Yelp Fine-grained classification ULMFiT Error 29.98 #5 of 17 Archive leaderboard report
Text Classification AG News ULMFiT Error 5.01 #4 of 24 Archive leaderboard report
Text Classification DBpedia ULMFiT Error 0.80 #6 of 21 Archive leaderboard report
Text Classification TREC-6 ULMFiT Error 3.6 #5 of 19 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

Introduced by this paper: Discriminative Fine-Tuning, Slanted Triangular Learning Rates, ULMFiT

AWD-LSTMActivation RegularizationAdamDiscriminative Fine-TuningDropConnectDropoutEmbedding DropoutLSTMSigmoid ActivationSlanted Triangular Learning RatesTanh ActivationTemporal Activation RegularizationULMFiTVariational DropoutWeight Tying

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