Papers › XLNet: Generalized Autoregressive Pretraining for Language Understanding
XLNet: Generalized Autoregressive Pretraining for Language Understanding
Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, Quoc V. Le
With the capability of modeling bidirectional contexts, denoising autoencoding based pretraining like BERT achieves better performance than pretraining approaches based on autoregressive language modeling. However, relying on corrupting the input with masks, BERT neglects dependency between the masked positions and suffers from a pretrain-finetune discrepancy. In light of these pros and cons, we propose XLNet, a generalized autoregressive pretraining method that (1) enables learning bidirectional contexts by maximizing the expected likelihood over all permutations of the factorization order and (2) overcomes the limitations of BERT thanks to its autoregressive formulation. Furthermore, XLNet integrates ideas from Transformer-XL, the state-of-the-art autoregressive model, into pretraining. Empirically, under comparable experiment settings, XLNet outperforms BERT on 20 tasks, often by a large margin, including question answering, natural language inference, sentiment analysis, and document ranking.
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):
get_harvested_code_for_paper(arxiv_id="1906.08237")get_code(code_sha256="…")with a sample'scode_sha256from the list belowget_citation_path(paper_1="1906.08237", paper_2="…")with another paper's arXiv id or titleget_concepts_for_paper(arxiv_id="1906.08237")
Code
Syntology 24 code samples harvested from 6 repositories linked to this paper: 15 ran (of which 2 constructed an object rather than computing a result; 10 with no instrument failure: 2 honoured, 0 violated, 8 with no contract checked; 5 where Syntology's instrument failed) · 9 unverified. Where Syntology's instrument failed: 5 where our contract draft was wrong; failures of Syntology's instrument, not of the code.
By repository: official repository: 2 samples from 1 repository, 1 ran (1 with no instrument failure; 0 where Syntology's instrument failed); community (archive-listed): 22 samples from 5 repositories, 14 ran (9 with no instrument failure; 5 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 10 of its repositories that Syntology harvested for other papers:
- cuhksz-nlp/SAPar, community (archive-listed): harvested for another paper, listed under the repository
- huggingface/transformers, community (archive-listed): harvested for 4 other papers, listed under the repository
- huggingface/xlnet, community (archive-listed): harvested for another paper, listed under the repository
- kaushaltrivedi/fast-bert, community (archive-listed): harvested for 2 other papers, listed under the repository
- listenviolet/XLNet, community (archive-listed): harvested for another paper, listed under the repository
- tomgoter/nlp_finalproject, community (archive-listed): harvested for another paper, listed under the repository
- MindCode-4/code-5, community (archive-listed): harvested for another paper, listed under the repository
- PaddlePaddle/PaddleNLP, community (archive-listed): harvested for another paper, listed under the repository
- lvyufeng/bert4ms, community (archive-listed): harvested for another paper, listed under the repository
- pwc-1/Paper-9, community (archive-listed): harvested for another paper, listed under the repository
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. 2 of the 15 samples that ran have no recorded date.
27 repositories listed; official and paper-mentioned ones first.
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
24 samples harvested: 15 ran (of which 2 constructed an object rather than computing a result; 10 with no instrument failure: 2 honoured, 0 violated, 8 with no contract checked; 5 where Syntology's instrument failed) · 9 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.
Licence: 4 of the 24 samples are pointer only, meaning Syntology does not serve that copy's text. For 1 of them, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. This page shows no code text for any sample; each one links to its file in the repository.
Harvested from 6 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. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.
4276ef7411886c72 · report
fixture: signature qlen:int/0/int, klen:int/0/int, d_model:int/0/int, clamp_len:int/0/int, attn_type:str/0/str, bi_data:bool/0/bool, bsz:int/0/int, dtype:DType/0/? · returned EagerTensor · level recorded 2026-09-22 624bba127433de69 · report
fixture: signature features:Tensor/3/float, labels:Tensor/1/int, mask:NoneType/0/? · returned Tensor · level recorded 2026-09-24 1370bb66bcbac8f1 · report
fixture: returned scl_model_Xlnet · level recorded 2026-09-22 30647553d552c86f · report
fixture: returned XLNet · level recorded 2026-09-22 census: 14 implementations from 37 papers, 2 distinct outputs on one shared input this sample: bucket 1 of 1, arg 1: rank 2, kind float, dtype float32 pytorch_transformers/modeling_bert.py ran · our draft was wrong fingerprinted Apache-2.0 (permissive) ·
0f786c407fb1ee4c · report
fixture: signature x:Tensor/2/float · returned Tensor · level recorded, date not recorded 35ef111fc00c21b4 · report
fixture: signature model:callable/0/?, config:Config/0/? · returned dict · level recorded 2026-09-22 c92ba449e48ecffe · report
fixture: signature model:callable/0/?, config:Config/0/?, tf_weights:dict/0/? · returned dict · level recorded 2026-09-25 census: 43 implementations from 74 papers, 6 distinct outputs on one shared input this sample: bucket 1 of 1, arg 1: rank 2, kind float, dtype float32 pytorch_transformers/modeling_gpt2.py ran · our draft was wrong fingerprinted Apache-2.0 (permissive) ·
8d23fbe2b99b840b · report
fixture: signature x:Tensor/2/float · returned Tensor · level recorded, date not recorded census: 43 implementations from 74 papers, 6 distinct outputs on one shared input this sample: bucket 1 of 1, arg 1: rank 2, kind float, dtype float32 pytorch_transformers/modeling_bert.py ran · honoured contract fingerprinted Apache-2.0 (permissive) here; the stored copy is pointer only ·
fdc64f4c72036ae4 · report
fixture: signature x:Tensor/2/float · returned Tensor · level recorded 2026-09-22 census: 43 implementations from 74 papers, 6 distinct outputs on one shared input pytorch_transformers/modeling_xlnet.py ran fingerprinted Apache-2.0 (permissive) ·
b05b2bb38c0e4e72 · report
fixture: signature x:Tensor/2/float · returned Tensor · level recorded 2026-09-25 census: 43 implementations from 74 papers, 6 distinct outputs on one shared input pytorch_transformers/modeling_xlm.py ran fingerprinted Apache-2.0 (permissive) ·
b3c2618f6b7fb60c · report
fixture: signature x:Tensor/2/float · returned Tensor · level recorded 2026-09-25 f5d8d44f65a08b76 · report
fixture: signature slen:int/0/int, lengths:Tensor/1/int, causal:bool/0/bool, padding_mask:NoneType/0/? · returned tuple · level recorded 2026-09-25 7183a17dd79327a8 · report
fixture: signature layer:callable/0/?, index:Tensor/1/int, dim:int/0/int · returned Conv1D · level recorded 2026-09-25 d30d6c3098df2c42 · report
fixture: signature layer:callable/0/?, index:Tensor/1/int, dim:int/0/int · returned Linear · level recorded 2026-09-22 93228a3eb5c4d179 · report
fixture: signature embedding:callable/0/?, bias:Tensor/1/float, labels:Tensor/2/int, inputs:Tensor/3/float, sampler:LogUniformSampler/0/? · returned Tensor · level recorded 2026-09-22 03a94dbb436249a3 · report
07bb0220eb5b609f · report
42ee168c3ae12e60 · report
23d246e59ef9447b · report
4a94662ff3b5c5cf · report
e31093ffc8275cff · report
de032896e6064f69 · report
ea4abb20faaddb4d · report
Method as code Syntology
What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it. Siblings are assemblies lifted from this paper in the same batch for the same method: alternative readings kept side by side; none replaces or supersedes another.
5 assemblies on this paper: 5 harvested, 0 generated, listed in 1 groups (siblings lifted in one batch form one group).
5 sibling assemblies for XLNet (harvested), lifted in the same batch on 2026-09-09: alternative readings kept side by side; none replaces or supersedes another.
harvested Assembly for XLNet (graph method: XLNet). 2 bricks; individually on a fixture: 2 ran (of which 1 constructed an object rather than computing a result; 2 with no instrument failure: 0 honoured, 0 violated, 2 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified. The assembly has not been run end-to-end.
one of 5 siblings
- scl_model_Xlnet entry · level 1 · ran ·
1370bb66bcbac8f1 - SupConLoss helper · level 1 · ran ·
624bba127433de69
harvested Assembly for XLNet (graph method: XLNet). 14 bricks; individually on a fixture: 5 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 2 honoured, 0 violated, 0 with no contract checked; 3 where Syntology's instrument failed) · 9 unverified. The assembly has not been run end-to-end.
one of 5 siblings
- transformer_xl entry · level 0 · unverified ·
346015e252bc02c1 - _cache_mem helper · level 1 · ran; the contract check could not run ·
9d5e914b24b8911a - _create_mask helper · level 0 · unverified ·
c1f8a649a7a837d5 - embedding_lookup helper · level 0 · unverified ·
5abf0267f0fc7514 - positionwise_ffn model · level 0 · unverified ·
ddf11fc956cd28ce - rel_multihead_attn model · level 0 · unverified ·
6ccb8d28491109b6 - relative_positional_encoding model · level 1 · ran · honoured contract ·
4276ef7411886c72 - two_stream_rel_attn model · level 0 · unverified ·
2d935f29546db9cd - gelu helper · level 1 · ran · honoured contract ·
d08f324f950148de - head_projection model · level 0 · unverified ·
6804d62cb7cd8df3 - post_attention model · level 0 · unverified ·
cf208c8c20d52c1b - rel_attn_core model · level 0 · unverified ·
b517847a8c809203 - positional_embedding helper · level 1 · ran; the contract check could not run ·
9bf0f6e6298f3fbe - rel_shift model · level 1 · ran; the contract check could not run ·
5f7c5b38aeb29bf5
harvested Assembly for XLNet (graph method: XLNet). 1 brick; individually on a fixture: 1 ran (of which 1 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; the one sample that ran constructed an object rather than computing a result. The assembly has not been run end-to-end.
one of 5 siblings
- XLNet entry · level 1 · ran ·
30647553d552c86f
harvested Assembly for XLNet (graph method: XLNet). 1 brick; individually on a fixture: 0 ran · 1 unverified. The assembly has not been run end-to-end.
one of 5 siblings
- XLNetForMultiLabelSequenceClassification entry · level 0 · unverified ·
ea4abb20faaddb4d
harvested Assembly for XLNet (graph method: XLNet). 1 brick; individually on a fixture: 0 ran · 1 unverified. The assembly has not been run end-to-end.
one of 5 siblings
- XLNetForMultiLabelSequenceClassification entry · level 0 · unverified ·
de032896e6064f69
Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="1906.08237") returns these assemblies with each brick's role and wiring (how to connect).
Tasks
Results from the paper archive 2025-07-28
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
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