peal.sparse_dictionaries.splice_decomposition.SpLICEDecompositionConfig¶
- class peal.sparse_dictionaries.splice_decomposition.SpLICEDecompositionConfig[source]¶
Bases:
SparseDictionaryConfigConfiguration for SpLICE-based sparse decomposition.
Uses a pretrained CLIP model and SpLICE vocabulary to decompose image embeddings into sparse concept weights. No training required.
- Parameters:
clip_model (
str) – SpLICE model name of the CLIP backbone ("clip:ViT-L/14"); it must be the encoder the generator conditions on.vocabulary (
str) – Name of the SpLICE concept vocabulary ("laion").vocabulary_size (
int) – Number of vocabulary entries to keep;-1uses the full vocabulary.l1_penalty (
float) – LASSO sparsity penalty of the SpLICE solver.solver (
str) –"skl"(scikit-learn) or"admm".ending (
str) – File extension of the saved state.n_components (
intorNone) – Set from the vocabulary size once the SpLICE model is loaded.component_strings (
listorNone) – Concept names DiDAE should target when editing.opposite_component_strings (
listorNone) – Opposite concepts used for DDPM-inversion benchmarking.benchmark_ddpm_inversion (
bool) – If True the explainer edits with text prompts instead of z_sem.
Methods
Attributes