Closed brunosan closed 4 months ago
+1 on this based on customer needs to lean on embedding shift for anomaly detection. Not having the losses messess the value of the anomalies.
Reconstruction losses would require to run the reconstruction head during inference. So while this might be an indication of ease of reconstruction, it might not always indicate that the embedding is better. Simpler images are easier to reconstruct than complicated ones. So I am closing this for now, let's revisit when we want to dive deeper into this topic.
In the process of generating embeddings from a trained deep learning model, we perform inference on an input image and save the resulting embedding, which captures the semantic reconstructions of salient features as determined by the model. To enhance the utility of these embeddings, I propose saving the reconstruction loss alongside the embedding vector.
The reconstruction loss, calculated as the difference between the input image and the model's reconstructed output, provides valuable insights into the semantic content and anomalies present in the input image:
Real-world applications:
Implementation: Modify the embedding generation pipeline to calculate and save the reconstruction loss alongside the embedding vector. This can be achieved by comparing the input image with the model's reconstructed output using e.g. the same loss, or others (MSE, ...).
Action Items:
I think this change no only makes our outputs much more useful, but also of measurable relative confidence, AND highlight of operational bias (making the loss a feature, not a thing to get rid of).
cc @MaceGrim @danhammer for the utility feedback.