Papers › PolyLoss: A Polynomial Expansion Perspective of Classification Loss Functions

PolyLoss: A Polynomial Expansion Perspective of Classification Loss Functions

26 Apr 2022ICLR 2022 4arXiv:2204.12511archive 2025-07-28

Zhaoqi Leng, Mingxing Tan, Chenxi Liu, Ekin Dogus Cubuk, Xiaojie Shi, Shuyang Cheng, Dragomir Anguelov

Cross-entropy loss and focal loss are the most common choices when training deep neural networks for classification problems. Generally speaking, however, a good loss function can take on much more flexible forms, and should be tailored for different tasks and datasets. Motivated by how functions can be approximated via Taylor expansion, we propose a simple framework, named PolyLoss, to view and design loss functions as a linear combination of polynomial functions. Our PolyLoss allows the importance of different polynomial bases to be easily adjusted depending on the targeting tasks and datasets, while naturally subsuming the aforementioned cross-entropy loss and focal loss as special cases. Extensive experimental results show that the optimal choice within the PolyLoss is indeed dependent on the task and dataset. Simply by introducing one extra hyperparameter and adding one line of code, our Poly-1 formulation outperforms the cross-entropy loss and focal loss on 2D image classification, instance segmentation, object detection, and 3D object detection tasks, sometimes by a large margin.

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 7 code samples harvested from 3 repositories linked to this paper: 6 ran (of which 0 constructed an object rather than computing a result; 5 with no instrument failure: 0 honoured, 0 violated, 5 with no contract checked; 1 where Syntology's instrument failed) · 1 unverified. Where Syntology's instrument failed: 1 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: community (archive-listed): 7 samples from 3 repositories, 6 ran (5 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 11 of its repositories that Syntology harvested for other papers:

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

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

abhuse/polyloss-pytorch mentioned on GitHubpytorchMITSyntology: not harvested report
frgfm/Holocron mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to U-Net: Convolutional Networks for Biomedical Image Segmentation (arXiv:1505.04597; that paper's own run record: 530 ran (of which 247 constructed an object rather than computing a result; 378 with no instrument failure: 18 honoured, 10 violated, 350 with no contract checked; 152 where Syntology's instrument failed) · 227 unverified), Large Batch Training of Convolutional Networks (arXiv:1708.03888; that paper's own run record: 4 ran (of which 4 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; every one of the 4 samples that ran constructed an object rather than computing a result), UNet++: A Nested U-Net Architecture for Medical Image Segmentation (arXiv:1807.10165; that paper's own run record: 21 ran (of which 0 constructed an object rather than computing a result; 18 with no instrument failure: 1 honoured, 1 violated, 16 with no contract checked; 3 where Syntology's instrument failed) · 7 unverified) and 3 more (every one in this page's JSON twin); nothing checks that they implement this paper's method. report
jahongir7174/MaskRCNN mentioned on GitHubpytorchMITSyntology: 3 samples, 3 ran (0 instrument-failed) · 0 unverified report
jahongir7174/PolyLoss mentioned on GitHubpytorchMITSyntology: not harvested report
lumia-group/apl mentioned on GitHubpytorchMITSyntology: not harvested report
nachiket273/loss-tryout mentioned on GitHubpytorchMITSyntology: 3 samples, 2 ran (0 instrument-failed) · 1 unverified report
yiyixuxu/polyloss-pytorch mentioned on GitHubpytorchSyntology: 1 sample, 1 ran (1 instrument-failed) · 0 unverified report
MindCode-4/code-8 mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to OTCE: A Transferability Metric for Cross-Domain Cross-Task Representations (arXiv:2103.13843; that paper's own run record: 1 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; 1 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
MindSpore-scientific-2/code-4 mindsporeSyntology: not harvested report
MindSpore-scientific-2/code-5 mindsporeSyntology: not harvested report
MindSpore-scientific-2/code-8 mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to LP-MusicCaps: LLM-Based Pseudo Music Captioning (arXiv:2307.16372; that paper's own run record: 7 ran (of which 0 constructed an object rather than computing a result; 7 with no instrument failure: 1 honoured, 0 violated, 6 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
MindSpore-scientific/code-1 mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Mitigating Gradient Bias in Multi-objective Learning: A Provably Convergent Stochastic Approach (arXiv:2210.12624; that paper's own run record: 9 ran (of which 0 constructed an object rather than computing a result; 9 with no instrument failure: 0 honoured, 0 violated, 9 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
MindSpore-scientific/code-10 mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Open-Sora: Democratizing Efficient Video Production for All (arXiv:2412.20404; that paper's own run record: 3 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 0 honoured, 0 violated, 3 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
MindSpore-scientific/code-11 mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to SignSGD with Federated Voting (arXiv:2403.16372; that paper's own run record: 3 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 0 honoured, 0 violated, 3 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
MindSpore-scientific/code-13 mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to SVGDreamer: Text Guided SVG Generation with Diffusion Model (arXiv:2312.16476; that paper's own run record: 10 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; 2 where Syntology's instrument failed) · 2 unverified); nothing checks that they implement this paper's method. report
MindSpore-scientific/code-5 mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Similarity of Neural Network Models: A Survey of Functional and Representational Measures (arXiv:2305.06329; 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-scientific/code-8 mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to SimBa: Simplicity Bias for Scaling Up Parameters in Deep Reinforcement Learning (arXiv:2410.09754; that paper's own run record: 6 ran (of which 2 constructed an object rather than computing a result; 6 with no instrument failure: 0 honoured, 0 violated, 6 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
jahongir7174/EfficientNetV2 pytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to EfficientNetV2: Smaller Models and Faster Training (arXiv:2104.00298; that paper's own run record: 55 ran (of which 14 constructed an object rather than computing a result; 43 with no instrument failure: 11 honoured, 0 violated, 32 with no contract checked; 12 where Syntology's instrument failed) · 24 unverified); nothing checks that they implement this paper's method. report
pwc-1/Paper-9 mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to RandAugment: Practical automated data augmentation with a reduced search space (arXiv:1909.13719; that paper's own run record: 58 ran (of which 1 constructed an object rather than computing a result; 7 with no instrument failure: 0 honoured, 1 violated, 6 with no contract checked; 51 where Syntology's instrument failed) · 7 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

7 samples harvested: 6 ran (of which 0 constructed an object rather than computing a result; 5 with no instrument failure: 0 honoured, 0 violated, 5 with no contract checked; 1 where Syntology's instrument failed) · 1 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.

1ran; the contract check could not run
5ran
1unverified

Licence: 1 of the 7 samples is 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 3 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.

jahongir7174/MaskRCNN community (archive-listed) 3 samples, 3 ran (0 instrument-failed) · 0 unverified
resize in 108 papers
census: 10 implementations from 14 papers, 5 distinct outputs across 2 buckets, one shared input per bucket
utils/util.py ran MIT (permissive) · e6a94a5bc4d9e8f4 · report fixture: signature image:ndarray/3/int, image_size:int/0/int · returned tuple · level recorded 2026-09-24
xy2wh utils/util.py ran fingerprinted MIT (permissive) · 9ead510a24af1caa · report fixture: signature x:ndarray/2/float · returned ndarray · level recorded 2026-09-24
xyn2xy utils/util.py ran MIT (permissive) · e79b32bd70ec5c58 · report fixture: signature x:ndarray/2/float, w:int/0/int, h:int/0/int, pad_w:int/0/int, pad_h:int/0/int · returned ndarray · level recorded 2026-09-24
nachiket273/loss-tryout community (archive-listed) 3 samples, 2 ran (0 instrument-failed) · 1 unverified
crossentropyfirstn polynloss.py ran MIT (permissive) · f6b1da081133f2de · report fixture: signature probs:list/1/Tensor, tgts:list/1/int, n:int/0/int, reduction:str/0/str · returned list · level recorded 2026-09-24
focallossfirstn polynloss.py ran MIT (permissive) · 75f93a5098113ec2 · report fixture: signature probs:list/1/Tensor, tgts:list/1/int, gamma:float/0/float, n:int/0/int, reduction:str/0/str · returned list · level recorded 2026-09-24
polynloss polynloss.py unverified MIT (permissive) · f31e8ddcecd510f0 · report
yiyixuxu/polyloss-pytorch community (archive-listed) 1 sample, 1 ran (1 instrument-failed) · 0 unverified
to_one_hot in 44 papers
census: 5 implementations from 6 papers, 4 distinct outputs across 2 buckets, one shared input per bucket
PolyLoss.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant no licence file found · pointer only · 6806c813ec675aab · report fixture: signature labels:Tensor/2/int, num_classes:int/0/int, dtype:dtype/0/?, dim:int/0/int · returned Tensor · level recorded 2026-09-22

Tasks

3D Object DetectionImage ClassificationInstance SegmentationObject DetectionSemantic Segmentationimage-classification

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Classification ImageNet EfficientNetV2 (PolyLoss) Top 1 Accuracy 87.2% #99 of 1060 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

Focal Loss

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