Skip to content

Add PLF postprocessor - #318

Open
maryhadalittlecode wants to merge 1 commit into
Jingkang50:mainfrom
maryhadalittlecode:add-plf-postprocessor-clean
Open

Add PLF postprocessor#318
maryhadalittlecode wants to merge 1 commit into
Jingkang50:mainfrom
maryhadalittlecode:add-plf-postprocessor-clean

Conversation

@maryhadalittlecode

Copy link
Copy Markdown

Adds PLF, a post-hoc OOD detector that applies a piecewise linear shaping function to penultimate-layer features.

Paper: "An Information-Theoretic Framework for Feature Construction in Out-of-Distribution Detection": https://arxiv.org/abs/2506.14194

Leaderboard PR:
The corresponding leaderboard entries were submitted separately in zjysteven#7: zjysteven#7.

Our git repo: https://github.com/maryhadalittlecode/PLF-OpenOOD
PLF’s hyperparameters are tuned using Bayesian optimization (BO); please refer to our repo for the complete tuning procedure, as the grid search range in configs/postprocessors/plf.yml included here is provided only as an example.

Changes

  • openood/postprocessors/plf_postprocessor.py — PLF postprocessor implementation
  • configs/postprocessors/plf.yml — default configuration and hyperparameters
  • openood/networks/plf_net.py — network wrapper for applying PLF to penultimate features
  • openood/postprocessors/__init__.py, openood/postprocessors/utils.py, and openood/evaluation_api/postprocessor.py — registration under the 'plf' key
  • openood/evaluation_api/evaluator.py — integration of the PLF network wrapper into the evaluation pipeline
  • scripts/ood/plf/ — evaluation scripts for CIFAR-10, CIFAR-100, ImageNet-200, and ImageNet-1K

Results

CIFAR-10 (ResNet-18)

Category Method Near-OOD Far-OOD Avg-OOD Ranking
Feature Shaping PLF (Ours) 89.47 ± 0.89 92.36 ± 1.09 91.40 ± 1.48 3

CIFAR-100 (ResNet-18)

Category Method Near-OOD Far-OOD Avg-OOD Ranking
Feature Shaping PLF (Ours) 80.75 ± 0.19 80.53 ± 1.38 80.60 ± 1.24 3

ImageNet-200 (ResNet-18)

Category Method Near-OOD Far-OOD Avg-OOD Ranking
Feature Shaping PLF (Ours) 83.28 ± 1.11 93.82 ± 0.85 89.60 ± 0.97 2

ImageNet-1K (ResNet-50)

Category Method Near-OOD Far-OOD Avg-OOD Ranking
Feature Shaping PLF (Ours) 78.15 96.24 89.00 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant