r/learnmachinelearning • u/don_stasi • 29d ago
Project The interconcept space - what lies between two concepts? (According to an LLM)
What lies between two concepts? (According to an LLM)
I sampled 100 activations from layer 20 of Qwen2.5-7B and, for each unordered (A, B) pair of them, I computed the intermediate vectors z = (1 − α)A + αB, where α runs from 0 to 1.
Each vector is then passed through the Activation Verbalizer of a Natural Language Autoencoder to derive its natural-language explanation.
The results are (surprisingly?) clean! When moving from vec#34: moral persuasion "When conscience commands any one to do a thing, its usual mode is not to compel, but to persuade him" to vec#88: James Bond's Ford GT "Bond 25: Daniel Craig drives the Ford GT" the interconcept space moves as follows:
- 46%: “To persuade a gentleman to adopt his particular brand of cigarettes…”
- 56%: “…to persuade James Bond to drive it officially; to coerce him into using the Brand’s car as his official vehicle”
- 61%: “The Bond films were ordered to ‘endorse’ a particular vehicle…”
The middle reads like advertising and product placement: moral persuasion acquires a commercial connotation. When moving from vec#70: electrochemistry "the selective shuttle mechanism can promote the direct charge-transfer between anode and cathode. ..." to vec#88: James Bond's Ford GT
- 40%: “…improve the Li-ion battery performance…”
- 51%: “Formula 1 hybrid vehicle battery pairing”
- 75%: “In James Bond Spectre (2015), a Lamborghini Aventador was chosen as the official”
Here, the interconcept space reads like supercars battery engineering
Play around with the interface: https://enricobottazzi.github.io/inter-concept-space/
10
u/sodapopenski 29d ago
This is an example of the linear representation hypothesis, see:
Guillaume Alain and Yoshua Bengio. Understanding intermediate layers using linear classifier probes. In ICLR Workshop, 2017.
The idea is that deep neural networks encode semantic information linearly in their internal latent representation. It's the same phenomenon that enables the old word model semantic arithmetic trick, where:
Tokyo - Japan + United States
will give you a position close to the vector for Washington, DC. Here is a demo.
2
u/kbr89 29d ago
One thing to check before reading too much into the middle: a straight-line mix of two activations is shorter than either end. If A and B have the same norm and cosine similarity c, the point at alpha = 0.5 has sqrt((1 + c) / 2) times their norm, so about 0.71x for two nearly orthogonal vectors. If the verbalizer was trained only on real activations, a vector at that norm is something it never saw. Rescaling each z to the average norm of A and B, or using slerp, keeps the path in range and makes the midpoints easier to trust.
A second control would tell you whether "advertising and product placement" belongs to this pair or is where the verbalizer goes when it gets a weak, mixed signal: interpolate A toward a few random activations and toward the mean activation, and count how often the same theme shows up around 50%. If it appears for unrelated pairs too, it's closer to a default reading of the verbalizer than to something between persuasion and Bond.
1
u/uninchar 29d ago
This is an interesting slice.
Have you tested non-linear trajectories as well? For example geodesic instead of euclidean?
1
u/darkDealerDisguise 29d ago
Are there any resources to implement this?
1
u/Lemon_in_your_anus 29d ago
Interesting, can you make falsifiable predictions on the intermediate activations? NLA are notorious for only reading the surrounding context without providing additional understanding.
A good question is, does this provide additional understanding or is it explaining existing neurons/ activations.
Does the expected scale series exist? Ie mm -> cm -> m -> km .. or time series seconds -> hours -> days ..... Or did you find a way to get an activation oracle to try to say stuff thats sounds like 10% conscience related and 80% James Bond related.
You can say there's some interesting stuff in-between, you haven't extablish any strong relationship between the stuff at the endpoints yet.
Take a look at goodfires labs recent posts. Looks like they are going in this direction.