This is an interesting approach to failure detection in trained models. Learning an additive vector to enhance separation between correct and incorrect predictions in latent space is theoretically possible and has some practical precedent.
The feasibility depends on several factors:
Theoretical basis: If the model's failures have systematic patterns in latent space (rather than being randomly distributed), then there should exist directions that help separate successes from failures. The key assumption is that prediction failures share some common characteristics in the representation space.
Practical considerations:
-
Data requirements: You'd need a labeled dataset of the model's predictions (correct vs incorrect) along with their latent representations. This is straightforward to obtain from a validation set.
-
Learning approach: You could frame this as a binary classification problem where you learn a linear transformation (or just an additive vector) that maximizes the separation between the two classes. Methods like:
- Linear discriminant analysis (LDA) to find the optimal projection direction
- Learning a simple linear classifier and using its weight vector
- Contrastive learning approaches to push apart the two classes
-
Dimensionality: The effectiveness often depends on the dimensionality of the latent space. Higher-dimensional spaces generally offer more directions to find separability.
Limitations:
- If failures are diverse and don't cluster well in latent space, a single additive vector might not capture all failure modes
- The approach might work better for certain types of errors (e.g., systematic biases) than others (e.g., boundary cases)
- You'd need to carefully validate that the learned vector generalizes to new data
This concept relates to research on "confidence estimation" and "uncertainty quantification" in neural networks, where similar ideas about finding directions in latent space that correlate with model confidence have shown promise. Have you considered what specific architecture or training approach you'd use for learning this vector?