Papers › Bag of Tricks for Efficient Text Classification

Bag of Tricks for Efficient Text Classification

6 Jul 2016EACL 2017 4arXiv:1607.01759archive 2025-07-28

Armand Joulin, Edouard Grave, Piotr Bojanowski, Tomas Mikolov

This paper explores a simple and efficient baseline for text classification. Our experiments show that our fast text classifier fastText is often on par with deep learning classifiers in terms of accuracy, and many orders of magnitude faster for training and evaluation. We can train fastText on more than one billion words in less than ten minutes using a standard multicore CPU, and classify half a million sentences among 312K classes in less than a minute.

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

Syntology 9 code samples harvested from 4 repositories linked to this paper: 3 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; 2 where Syntology's instrument failed) · 6 unverified. Where Syntology's instrument failed: 2 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: official repository: 1 sample from 1 repository, 1 ran (0 with no instrument failure; 1 where Syntology's instrument failed); community (archive-listed): 8 samples from 3 repositories, 2 ran (1 with no instrument failure; 1 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 13 of its repositories that Syntology harvested for other papers:

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

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

facebookresearch/fastText officialmentioned in papermentioned on GitHubMITSyntology: 1 sample, 1 ran (1 instrument-failed) · 0 unverified report
2023-MindSpore-1/ms-code-197 mentioned on GitHubmindsporeSyntology: not harvested report
2023-MindSpore-1/ms-code-198 mentioned on GitHubmindsporeSyntology: not harvested report
2023-MindSpore-1/ms-code-200 mentioned on GitHubmindsporeSyntology: not harvested report
DW-yejing/fasttext4j-jdk6 mentioned on GitHubBSD-3-ClauseSyntology: not harvested report
FengJiaChunFromSYSU/fastText mentioned on GitHubMITSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to FastText.zip: Compressing text classification models (arXiv:1612.03651; that paper's own run record: 11 ran (of which 0 constructed an object rather than computing a result; 8 with no instrument failure: 0 honoured, 0 violated, 8 with no contract checked; 3 where Syntology's instrument failed) · 7 unverified); nothing checks that they implement this paper's method. report
GitHubSprint/fasttext4j mentioned on GitHubBSD-3-ClauseSyntology: not harvested report
Kinetikm/fastTextRelearning mentioned on GitHubSyntology: 1 sample, 0 ran · 1 unverified report
Kinetikm/fasttextRelearnExperiment mentioned on GitHubNOASSERTIONSyntology: not harvested report
M155K4R4/fastText mentioned on GitHubNOASSERTIONSyntology: not harvested report
MhYao2014/HyperbolicEmbedding mentioned on GitHubMITSyntology: not harvested report
NatthanonNon/text-classification-benchmarks mentioned on GitHubMITSyntology: not harvested report
Nim-NLP/fastText mentioned on GitHubNOASSERTIONSyntology: not harvested report
Omerktn/fastText-iterative mentioned on GitHubSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Enriching Word Vectors with Subword Information (arXiv:1607.04606; that paper's own run record: 25 ran (of which 0 constructed an object rather than computing a result; 21 with no instrument failure: 0 honoured, 0 violated, 21 with no contract checked; 4 where Syntology's instrument failed) · 6 unverified); nothing checks that they implement this paper's method. report
RaRe-Technologies/gensim-data mentioned on GitHubSyntology: not harvested report
SarangShaikh201/fastText mentioned on GitHubSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Enriching Word Vectors with Subword Information (arXiv:1607.04606; that paper's own run record: 25 ran (of which 0 constructed an object rather than computing a result; 21 with no instrument failure: 0 honoured, 0 violated, 21 with no contract checked; 4 where Syntology's instrument failed) · 6 unverified); nothing checks that they implement this paper's method. report
ShreyaKhare/imdb_fasttext mentioned on GitHubSyntology: not harvested report
TEAMLAB-Lecture/deep_nlp_101 mentioned on GitHubtfSyntology: not harvested report
TsingZ0/PFL-Non-IID mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Communication-Efficient Learning of Deep Networks from Decentralized Data (arXiv:1602.05629; that paper's own run record: 47 ran (of which 17 constructed an object rather than computing a result; 27 with no instrument failure: 2 honoured, 0 violated, 25 with no contract checked; 20 where Syntology's instrument failed) · 30 unverified), Think Locally, Act Globally: Federated Learning with Local and Global Representations (arXiv:2001.01523; that paper's own run record: 2 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; 1 where Syntology's instrument failed) · 4 unverified), Ditto: Fair and Robust Federated Learning Through Personalization (arXiv:2012.04221; that paper's own run record: 15 ran (of which 5 constructed an object rather than computing a result; 12 with no instrument failure: 7 honoured, 0 violated, 5 with no contract checked; 3 where Syntology's instrument failed) · 3 unverified) and 8 more (every one in this page's JSON twin); nothing checks that they implement this paper's method. report
ZZhangyutong/fasttext mentioned on GitHubmindsporeSyntology: not harvested report
amymariaparker2401/new mentioned on GitHubNOASSERTIONSyntology: not harvested report
bentrevett/pytorch-sentiment-analysis mentioned on GitHubpytorchSyntology: not harvested report
bmcclannahan/NLP-Sentiment mentioned on GitHubpytorchSyntology: not harvested report
brightmart/text_classification mentioned on GitHubtfSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding (arXiv:1810.04805; that paper's own run record: 300 ran (of which 75 constructed an object rather than computing a result; 234 with no instrument failure: 18 honoured, 5 violated, 211 with no contract checked; 66 where Syntology's instrument failed) · 359 unverified); nothing checks that they implement this paper's method. report
bung87/fastText mentioned on GitHubNOASSERTIONSyntology: not harvested report
bzz/LangID mentioned on GitHubtfSyntology: not harvested report
code2k13/nlphose mentioned on GitHubApache-2.0Syntology: not harvested report
code2k13/nlppipe mentioned on GitHubApache-2.0Syntology: not harvested report
csebuetnlp/xl-sum mentioned on GitHubjaxSyntology: not harvested report
currentsapi/extractnet mentioned on GitHubMITSyntology: 6 samples, 1 ran (0 instrument-failed) · 5 unverified report
currentsapi/fastlangid mentioned on GitHubApache-2.0Syntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to FastText.zip: Compressing text classification models (arXiv:1612.03651; that paper's own run record: 11 ran (of which 0 constructed an object rather than computing a result; 8 with no instrument failure: 0 honoured, 0 violated, 8 with no contract checked; 3 where Syntology's instrument failed) · 7 unverified); nothing checks that they implement this paper's method. report
currentslab/extractnet mentioned on GitHubMITSyntology: not harvested report
divisionai/fastText mentioned on GitHubMITSyntology: not harvested report
donghyeonk/fastText1607 mentioned on GitHubpytorchSyntology: 1 sample, 1 ran (1 instrument-failed) · 0 unverified report
ericxsun/fastText mentioned on GitHubNOASSERTIONSyntology: not harvested report
explosion/floret mentioned on GitHubMITSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to FastText.zip: Compressing text classification models (arXiv:1612.03651; that paper's own run record: 11 ran (of which 0 constructed an object rather than computing a result; 8 with no instrument failure: 0 honoured, 0 violated, 8 with no contract checked; 3 where Syntology's instrument failed) · 7 unverified); nothing checks that they implement this paper's method. report
gmichalo/question_identification_on_medical_logs mentioned on GitHubpytorchSyntology: not harvested report
graykode/nlp-tutorial mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Efficient Estimation of Word Representations in Vector Space (arXiv:1301.3781; that paper's own run record: 43 ran (of which 7 constructed an object rather than computing a result; 38 with no instrument failure: 4 honoured, 0 violated, 34 with no contract checked; 5 where Syntology's instrument failed) · 19 unverified), Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation (arXiv:1406.1078; that paper's own run record: 13 ran (of which 6 constructed an object rather than computing a result; 10 with no instrument failure: 0 honoured, 0 violated, 10 with no contract checked; 3 where Syntology's instrument failed) · 9 unverified), 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) and 1 more (every one in this page's JSON twin); nothing checks that they implement this paper's method. report
hanfeng108/Language-Detection mentioned on GitHubpytorchSyntology: not harvested report
hufscapstone/Fast_text mentioned on GitHubMITSyntology: not harvested report
indix/whatthelang mentioned on GitHubApache-2.0Syntology: not harvested report
jen1995/fastText mentioned on GitHubMITSyntology: not harvested report
kpu/fastertext mentioned on GitHubMITSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to FastText.zip: Compressing text classification models (arXiv:1612.03651; that paper's own run record: 11 ran (of which 0 constructed an object rather than computing a result; 8 with no instrument failure: 0 honoured, 0 violated, 8 with no contract checked; 3 where Syntology's instrument failed) · 7 unverified); nothing checks that they implement this paper's method. report
linkfluence/fastText4j mentioned on GitHubBSD-3-ClauseSyntology: not harvested report
lmd1993/fastTextBoost mentioned on GitHubNOASSERTIONSyntology: not harvested report
luckyPT/jvm-ml mentioned on GitHubtfSyntology: not harvested report
luhuiguo/jfasttext mentioned on GitHubNOASSERTIONSyntology: not harvested report
mohammadreza-Banaei73/INLP_neural_practical_session mentioned on GitHubpytorchSyntology: not harvested report
mwydmuch/extremeText mentioned on GitHubtfNOASSERTIONSyntology: not harvested report
nageshsinghc4/deepwrap mentioned on GitHubtfSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding (arXiv:1810.04805; that paper's own run record: 300 ran (of which 75 constructed an object rather than computing a result; 234 with no instrument failure: 18 honoured, 5 violated, 211 with no contract checked; 66 where Syntology's instrument failed) · 359 unverified); nothing checks that they implement this paper's method. report
pommedeterresautee/fastrtext mentioned on GitHubNOASSERTIONSyntology: not harvested report
ppke-nlpg/fastText_factored-cbow mentioned on GitHubMITSyntology: not harvested report
rmenegaux/fastDNA mentioned on GitHubNOASSERTIONSyntology: not harvested report
romik9999/fasttext-1925f09ed3 mentioned on GitHubNOASSERTIONSyntology: not harvested report
shawnyxiao/textclassification-keras mentioned on GitHubtfMITSyntology: not harvested report
trietnm2/sent2vec4j mentioned on GitHubSyntology: not harvested report
tshev/faster-FastText mentioned on GitHubMITSyntology: not harvested report
vinhkhuc/JFastText mentioned on GitHubNOASSERTIONSyntology: not harvested report
wyfish/fastText mentioned on GitHubnot reachable when probed 2026-09-18 — repositories for recent papers often appear after camera-readySyntology: not harvested report
xuzhezhaozhao/fastText_reading mentioned on GitHubNOASSERTIONSyntology: not harvested report
xyfJASON/Comment-Analysis mentioned on GitHubSyntology: not harvested report
yangyucheng000/fasttext mentioned on GitHubmindsporeSyntology: not harvested report
zafercavdar/fasttext-langdetect mentioned on GitHubMITSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to FastText.zip: Compressing text classification models (arXiv:1612.03651; that paper's own run record: 11 ran (of which 0 constructed an object rather than computing a result; 8 with no instrument failure: 0 honoured, 0 violated, 8 with no contract checked; 3 where Syntology's instrument failed) · 7 unverified); nothing checks that they implement this paper's method. report
dmlc/gluon-nlp mxnetApache-2.0Syntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to GluonCV and GluonNLP: Deep Learning in Computer Vision and Natural Language Processing (arXiv:1907.04433; 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) · 0 unverified); nothing checks that they implement this paper's method. report
mindspore-ai/models mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to AdaBin: Improving Binary Neural Networks with Adaptive Binary Sets (arXiv:2208.08084; that paper's own run record: 4 ran (of which 0 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 0 where Syntology's instrument failed) · 1 unverified); nothing checks that they implement this paper's method. 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

9 samples harvested: 3 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; 2 where Syntology's instrument failed) · 6 unverified. “Where Syntology's instrument failed” counts failures 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
1ran
6unverified

Licence: 2 of the 9 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 4 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. 2 samples whose link to this paper records no repository are listed under one of this paper's own repositories, because identical code was harvested from it for another 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.

facebookresearch/fastText official repository 1 sample, 1 ran (1 instrument-failed) · 0 unverified
read_args python/fasttext_module/fasttext/FastText.py identical code Syntology harvested from this repository for another paper; this paper's link records no repository, path or licence of its own ran · our draft was wrong licence of this copy not recorded · f697966cbe929024 · report fixture: signature arg_list:list/1/str, arg_dict:dict/0/?, arg_names:list/1/str, default_values:dict/0/? · returned tuple · level recorded 2026-09-22
Kinetikm/fastTextRelearning community (archive-listed) 1 sample, 0 ran · 1 unverified
compute_similarity in 16 papers python/doc/examples/train_unsupervised.py identical code Syntology harvested from this repository for another paper; this paper's link records no repository, path or licence of its own unverified licence of this copy not recorded · 411c04ff52be0d9f · report
currentsapi/extractnet community (archive-listed) 6 samples, 1 ran (0 instrument-failed) · 5 unverified
evaluation_metrics extractnet/util.py ran MIT (permissive) · 9f34a097938066d0 · report fixture: signature predicted:list/1/str, actual:list/1/str, bow:bool/0/bool · returned tuple · level recorded 2026-09-25
bytes_cast extractnet/compat.py unverified MIT (permissive) · 1fc6189843b47c19 · report
dameraulevenshtein extractnet/util.py unverified MIT (permissive) · 0b240d50631fc9ab · report
get_and_union_features extractnet/util.py unverified MIT (permissive) · 6d6b719f28e0ad54 · report
str_cast extractnet/compat.py unverified MIT (permissive) · 39461510fffca969 · report
str_list_cast extractnet/compat.py unverified MIT (permissive) · 533a11c8e71b54ee · report
donghyeonk/fastText1607 community (archive-listed) 1 sample, 1 ran (1 instrument-failed) · 0 unverified
get_ngram dataset.py ran · our draft was wrong fingerprinted MIT (permissive) · a3b19b485060241b · report fixture: signature words:list/1/str, n:int/0/int · returned list · level recorded 2026-09-22

Tasks

Emotion Recognition in ConversationGeneral ClassificationSentiment AnalysisText Classification

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Emotion Recognition in Conversation CPED FastText Accuracy of Sentiment 48.62 #7 of 11 Archive leaderboard report
Emotion Recognition in Conversation CPED FastText Macro-F1 of Sentiment 30.33 #7 of 11 Archive leaderboard report
Sentiment Analysis Amazon Review Full FastText Accuracy 60.2 #8 of 9 Archive leaderboard report
Sentiment Analysis Amazon Review Polarity FastText Accuracy 94.6 #8 of 9 Archive leaderboard report
Sentiment Analysis Sogou News fastText, h=10, bigram Accuracy 96.8 #1 of 1 Archive leaderboard report
Sentiment Analysis Yelp Binary classification fastText, h=10, bigram Error 4.3 #17 of 20 Archive leaderboard report
Sentiment Analysis Yelp Fine-grained classification FastText Error 36.1 #14 of 17 Archive leaderboard report
Text Classification AG News fastText Error 7.5 #13 of 24 Archive leaderboard report
Text Classification DBpedia FastText Error 1.4 #18 of 21 Archive leaderboard report
Text Classification Yahoo! Answers FastText Accuracy 72.3 #9 of 10 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.

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