Repository navigation
Release v2.0.2 introduces Concept Localization
This release introduces input-to-concept localization in HolisticCraft: identify which image regions drive a learned concept's activation using black-box attribution methods.
What's new
- Concept localization for TensorFlow and PyTorch. Use
attribute_concepts_to_inputs()with aPartialExplainerto generate input-space attribution maps. Localize all concepts or select specific concept IDs. This can complement the existing CAM-style explanations forcoeff_u, as was done before. - Configurable concept scores.
make_concept_localizer()exposes a callable returning one activation score per image and concept. Choosemean(default),sum,max, or a custom reducer; signed concept coefficients are preserved. - Integrated visualization. Pass
concept_mapstodisplay_images_per_concept()ordisplay_top_images_per_concept()to overlay
localization maps. Top-image ranking remains based on concept activation coefficients. Signed heatmaps are displayed by absolute magnitude. - Expanded documentation and validation. Updated HolisticCraft documentation distinguishes activation maps, activation scores (how activated the concept is in an input), concept importance, and localization. A TensorFlow tutorial demonstrates the workflow, with additional localization and cross-framework guidance.
- Unrelated to the Concept Localization feature, documentation deployment now publishes versioned releases with a
latestalias.
Usage notes
Localization requires a fitted HolisticCraft instance, a factorizer supporting out-of-sample encode() (all the supported factorizers by default), and a compatible black-box explainer. Returned maps have shape (N, H, W, number_of_concepts); uncomputed concept channels contain NaN. The feature is opt-in and complements existing concept activation visualizations and concept importance estimation.