Release Notes: v0.4.0
OODEEL v0.4.0 - Enhanced Multi-Layer OOD Detection & HuggingFace Integration
Release Date: January 2026
This release introduces major enhancements to OODEEL, including HuggingFace model support, multi-layer scoring capabilities, and significant improvements to feature-based OOD detection methods.
🎯 Major Features
HuggingFace Integration
- New HFTorchFeatureExtractor: Seamlessly apply OOD detection on HuggingFace models
- HuggingFace dataset loading: Added
load_from_huggingfacemethod for both TensorFlow and PyTorch data handlers - Unified API: DictDataset and HuggingFace Dataset API unification with
column_namesandget_columns_shapesmethods - Streamlined transforms: Improved transform handling for HuggingFace and torchvision datasets
Multi-Layer Scoring & Aggregators
- Aggregator system: New Fisher and variance score aggregators for combining multi-layer features
- Enhanced methods: Multi-layer scoring support for DKNN, Mahalanobis, RMDS, and Gram methods
- Per-layer improvements: Refactored VIM, SHE, RMDS, Gram, and Mahalanobis for better per-layer fit and score operations
Method Enhancements
- Input perturbation: Added epsilon/temperature arguments for all methods via FeatureBasedDetector class
- head_layer_id support: ReAct, ASH, and SCALE now properly handle head_layer_id argument
- ReAct improvements: Better penultimate layer computation, especially for models with F.avg_pool
- return_penultimate: New argument for feature extractors to support ReAct quantile computation
🔧 Improvements & Refactoring
Code Organization
- Refactored
_fit_to_datasetand_score_layerinto OODBaseDetector for feature-based methods - Reorganized methods with clear public API → per-layer → internal helpers structure
- Removed
fit_to_datasetfrom logit-based methods for cleaner separation - Moved scoring code outside of
_fit_layerfor better modularity
Data Handling
- Default features post-processing functions for PyTorch and TensorFlow extractors
- Improved numpy concatenation of features in extractors
- Better batch processing with concatenation moved outside loops
- Removed deprecated
mergemethod from data handlers
Performance
- Numpy concatenation optimizations in ReAct and t-SNE plotting
- More efficient feature handling in torch and TensorFlow extractors
🐛 Bug Fixes
- Dependencies: Replaced faiss_cpu with faiss_gpu and added numpy version constraints
- Operator improvements: Check if already numpy array in
operator.convert_to_numpy - sklearn compatibility: Check sklearn version using
packaging.version.parse - SHE fix: Proper reset between two fits in tests
- Softmax perturbation: Fixed input perturbation for RMDS and SHE
- Feature references: Fixed features reference in torch feature extractor
- Plotting: Fixed number of bins in
plot_ood_scores - Deprecated warnings: Updated t-SNE
n_iter→max_iter - Type handling: Improved typing and label conversion when numpy_concat is True
- Segfault: Fixed segfault in GitHub Actions
- Postproc functions: Resolved postproc_fns conflicts and migration from init to fit
📚 Documentation
- New tutorial: Comprehensive data_handler tutorial
- Improved docstrings: Better documentation for ASH, ReAct, and SCALE methods
- README updates: Updated with test versions and removed deprecated OODDataset references
- Method documentation: Added sources in Fisher aggregator and reordered methods
- Notebook updates: Updated both TensorFlow and PyTorch feature-based methods notebooks
🧪 Testing
- Extended coverage: GitHub Actions now test on more recent TensorFlow and PyTorch versions
- HuggingFace tests: Comprehensive tests for HFTorchFeatureExtractor
- Stability improvements: Fixed tests that could fail due to random seed
- VIM tests: Updated TensorFlow and PyTorch VIM tests for aggregators
🏗️ Build & Maintenance
- Version bump: 0.3.0 → 0.4.0
- Pre-commit hooks: Updated for license insertion
- Dependencies: Updated pylint in pre-commit config