PALM-OOD
ResNet-34 encoder and projection head trained with several prototypes per class for out-of-distribution detection.
Image classification · 143 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Image classification
- Parameters
- 21.6M
- Operations
- 143
- Framework
- PyTorch
- Recurrent
- No
- Published
- ICLR 2024
- Cited by
- 5 (as of 28 October 2026)
- Authors
- Haodong Lu, Dong Gong, Shuo Wang and others
- Source
- GitHub: jeff024/PALM
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m19035
- Graph hash
- 17d3bda0c30b375e85c439146cf4f66ea326e8a42d4af018f44e280962849591
- Skeleton hash
- e950892a21575f94992c7e2134d62e507d972169e3625fa1d6f8135ebb4d0b37
- Architecture hash
- f39d2437957577963321bbd07398689314dafb1058413eee49b2925ea537d65b
- Diagram SHA-256
- 54ffad60e0d1df3a6b969f43cecabbc5d104929a4b1212f1a667f8e294b93826
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
PALM, short for PrototypicAl Learning with a Mixture of prototypes, represents each class with several prototypes instead of one so that the learned embeddings serve out-of-distribution (OOD) detection better. OOD detection means flagging test samples that lie far from the training data, which the paper calls crucial for deploying models safely. Earlier distance-based methods, the authors argue, pull every sample of a class toward a single prototype, which models realistic data poorly.
The network is an encoder followed by a projector that maps the high-dimensional features to a lower-dimensional embedding on a hypersphere. In the paper's main experiments the backbone is ResNet-34 for CIFAR-100 and ResNet-18 for CIFAR-10, with a two-layer MLP projector onto a 128-dimensional unit sphere. Training combines a maximum likelihood estimation loss that tightens embeddings around their assigned prototypes with a contrastive loss among the prototypes. By default the paper keeps 6 prototypes per class and selects the 5 closest during pruning.
At test time the paper scores samples with the Mahalanobis distance. It reports an average AUROC of 93.82 on its CIFAR-100 benchmark. Because prototypes are estimated automatically, the method also extends to OOD detection with unlabeled in-distribution data.
Key idea. PALM models each class with multiple prototypes, assigning samples to them by soft weights, to learn compact embeddings for out-of-distribution detection.
- PALM
- PALM-OOD
- PrototypicAl Learning with a Mixture of prototypes
- out-of-distribution detection
- OOD detection
- mixture of prototypes
- prototype learning
- hyperspherical embeddings
- distance-based OOD detection
- CIFAR-100 OOD
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{lu2024learningmixtureprototypesoutofdistribution,
title={Learning with Mixture of Prototypes for Out-of-Distribution Detection},
author={Haodong Lu and Dong Gong and Shuo Wang and Jason Xue and Lina Yao and Kristen Moore},
year={2024},
eprint={2402.02653},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2402.02653},
}