Wacky Idea #1: A Look-up Table for CV models
Intro
I’ve had a wack idea recently: could a small “hashed-memory module” add useful info to an existing computer vision model? This idea was inspired after DeepSeek’s Engram work (paper: https://arxiv.org/abs/2601.07372).
Idea Explained
TLDR; Engram uses hashed token sequences to look up learned embeddings to combine the important learned tokens with the model’s hidden states.
What I want to do with a learned “look-up table” is see if I can add useful corrections to the final layer of a network to bump up accuracy? I want to first experiment with the last layer of a network to keep my experiment small and controlled at first. Adding corrections to all hidden layers would be useful later on to prevent full hallucinations in tasks such as segmentation (e.g. a model forgot to segment out a whole portion of an object because it did not recognize it was a certain object).
But, the problem gets complicated with images. Language has discrete token IDs, which results in natural keys. But, a vision model’s patch embeddings are continuous vectors, where each vector’s representation changes ever so slightly depending on small changes. Hashing these very, very small floating point changes would actually cause these slightly different vectors to be mashed into “one vector,” removing the vector’s representation of the small changes in its patch. This would make the look-up table “feature-poor.”
One approach could be to use fixed random projections and turn the final projection of the vector into bits, becoming the “address.” Similar feature vectors are more likely to share an address, though collisions can also group unrelated features. But, multiple hash tables could make the module less dependent on any single collision. Still, I’m not a big fan of this approach because of the potential of collisions and the need to do multiple work arounds.
I’ll keep y’all updated with the results! I still have some more reading to do, as I’m sure someone else has implemented a similar idea. Here are a few things I would search up,
Has anyone used look-up tables before? It for sure has, so this leads me to my next question: how did they implement the look-up table?
How does the CV community deal with feature vectors that are very similar? Do they just group them together? How do they differentiate them?
What are the benefits of just using a trained encoder backbone to turn the values into discrete tokens?

Comments
Post a Comment