SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.10443 · 2023

Taming the Sigmoid Bottleneck: Provably Argmaxable Sparse Multi-Label Classification

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 14 functions out of this paper's own repositories and ran 13 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
andreasgrv/sigmoid-bottleneck canonical 13 of 14
FunctionStatusWhere it lives
affinise Ran andreasgrv/sigmoid-bottleneck/spmlbl/modules.py
code served (permissive licence) · get_code("aa97babdb6f4b212")
count_alternating_bits Ran andreasgrv/sigmoid-bottleneck/spmlbl/verify.py
code served (permissive licence) · get_code("467640b6cac88182")
cyclic_polytope_trig Ran andreasgrv/sigmoid-bottleneck/spmlbl/modules.py
code served (permissive licence) · get_code("95a1b13f612e6900")
encode_batch_labels Ran andreasgrv/sigmoid-bottleneck/spmlbl/data.py
code served (permissive licence) · get_code("f1080c6e6756f465")
encode_label_list Ran andreasgrv/sigmoid-bottleneck/spmlbl/data.py
code served (permissive licence) · get_code("83ded52943d23cf3")
f1 Ran andreasgrv/sigmoid-bottleneck/spmlbl/metrics.py
code served (permissive licence) · get_code("77bf2eea0dac3863")
f1_counts Ran andreasgrv/sigmoid-bottleneck/spmlbl/metrics.py
code served (permissive licence) · get_code("09b29a8958f3dcca")
generate_card_samples Ran andreasgrv/sigmoid-bottleneck/plots/argmaxability_slack/check_infeasible_cyclic.py
code served (permissive licence) · get_code("f072f1c9d0e306c2")
k_hot_to_dense Ran andreasgrv/sigmoid-bottleneck/spmlbl/verify.py
code served (permissive licence) · get_code("9da5519e0206563b")
linear_dependence Ran andreasgrv/sigmoid-bottleneck/spmlbl/math.py
code served (permissive licence) · get_code("50a7ff0312b87b82")
orthogonal_complement Ran andreasgrv/sigmoid-bottleneck/spmlbl/math.py
code served (permissive licence) · get_code("43e11696974c4c73")
pattern_is_feasible_cyclic Ran andreasgrv/sigmoid-bottleneck/spmlbl/verify.py
code served (permissive licence) · get_code("a51b6a4a498e44a8")
torch_interleave_columns Ran andreasgrv/sigmoid-bottleneck/spmlbl/modules.py
code served (permissive licence) · get_code("e29b1f502ab0b31f")
encode_bpe_label_list Not yet run andreasgrv/sigmoid-bottleneck/spmlbl/data.py
code served (permissive licence) · get_code("b1095adb35aeb739")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Sigmoid output layers are widely used in multi-label classification (MLC) tasks, in which multiple labels can be assigned to any input. In many practical MLC tasks, the number of possible labels is in the thousands, often exceeding the number of input features and resulting in a low-rank output layer. In multi-class classification, it is known that such a low-rank output layer is a bottleneck that can result in unargmaxable classes: classes which cannot be predicted for any input. In this paper, we show that for MLC tasks, the analogous sigmoid bottleneck results in exponentially many unargmaxable label combinations. We explain how to detect these unargmaxable outputs and demonstrate their presence in three widely used MLC datasets. We then show that they can be prevented in practice by introducing a Discrete Fourier Transform (DFT) output layer, which guarantees that all sparse label combinations with up to $k$ active labels are argmaxable. Our DFT layer trains faster and is more parameter efficient, matching the F1@k score of a sigmoid layer while using up to 50% fewer trainable parameters. Our code is publicly available at https://github.com/andreasgrv/sigmoid-bottleneck.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2310.10443")
get_code_for_paper("2310.10443")
have("2310.10443")

Connect an agent — have() is free.