Live data from Hacker News

I made a transformer to predict a simple sequence manually

vgel.me

41–50 of 104 posts

Re: I made a transformer to predict a simple sequence manually

#41
post #38

I've been kicking around a similar idea for awhile. Why can't we have an intuitive interface to the weights of a model, that a domain expert can tweak by hand to accelerate training? For example, in a vision model, they can increase the "orangeness" collection of weights when detecting traffic cones. That way, instead of requiring thousands/millions more examples to calibrate "orangeness" right, it's accelerated by a…

The technical reason it can't be done (or would be very difficult to do) is that weights are typically very uninterpretable. There aren't specific clusters of neurons that map to one concept or another, everything kind of does everything.

I wonder if an expert can "impose" weights onto a model and the model will opt to continue with them when it resumes training. For example, in the vision example, the expert may not know where "orangeness" currently exists, but if they impose their own collection of weight adjustments that represent orangeness, will the model continue to use these weights as the path of least resistance when continuing to optimize? Just spitballing, but if we can't pick out which neurons do what, the alternative would seem to be to encourage the model to adopt a control interface of neurons.

Re: I made a transformer to predict a simple sequence manually

#42

I've been kicking around a similar idea for awhile. Why can't we have an intuitive interface to the weights of a model, that a domain expert can tweak by hand to accelerate training? For example, in a vision model, they can increase the "orangeness" collection of weights when detecting traffic cones. That way, instead of requiring thousands/millions more examples to calibrate "orangeness" right, it's accelerated by a…

> weights of a model, that a domain expert can tweak by hand

This sounds similar to how image recognition was done before deep learning [1]

[1] https://www.youtube.com/watch?v=8SF_h3xF3cE&t=1358s

Re: I made a transformer to predict a simple sequence manually

#44

I've been kicking around a similar idea for awhile. Why can't we have an intuitive interface to the weights of a model, that a domain expert can tweak by hand to accelerate training? For example, in a vision model, they can increase the "orangeness" collection of weights when detecting traffic cones. That way, instead of requiring thousands/millions more examples to calibrate "orangeness" right, it's accelerated by a…

> weights of a model, that a domain expert can tweak by hand This sounds similar to how image recognition was done before deep learning [1] [1] https://www.youtube.com/watch?v=8SF_h3xF3cE&t=1358s

Great example. Right, the deep learning approach uncovers all kinds of hidden features and relationships automatically that a team of humans might miss.

I guess I'm thinking about this problem from the perspective of these GPT models requiring more training data than a normal person can acquire. Currently, it seems you need the entire internet worth of training data (and a lot of money) to get something that can communicate reasonably well. But most people can communicate reasonably well, so it would be cool if that basic communication knowledge could be somehow used to accelerate training and minimize the reliance on training data.

Re: I made a transformer to predict a simple sequence manually

#45

Earlier quoted context omitted.

This isn't a color comment. It's a small correction to a factual error. No culture war to be had here.

[flagged]

Why are people allowed to post this hateful culture war shit on this website?

Re: I made a transformer to predict a simple sequence manually

#47

It's some kind of abstract machine, like a turing machine or the machine that parses regexes, isn't it?

Neural networks are Turing machines. You can make them perform any computation by carefully setting up their weights. It would be nice to have compilers for them that were not based on approximation, though.

The whole point is that we don’t know what rules to encode and we want the system to derive the weights for itself as part of the training process. We have compilers that can do deterministic code - that’s the normal approach.

Re: I made a transformer to predict a simple sequence manually

#49

Earlier quoted context omitted.

> weights of a model, that a domain expert can tweak by hand This sounds similar to how image recognition was done before deep learning [1] [1] https://www.youtube.com/watch?v=8SF_h3xF3cE&t=1358s

Great example. Right, the deep learning approach uncovers all kinds of hidden features and relationships automatically that a team of humans might miss. I guess I'm thinking about this problem from the perspective of these GPT models requiring more training data than a normal person can acquire. Currently, it seems you need the entire internet worth of training data (and a lot of money) to get something that can comm…

I am still learning transformers, but I believe part of the issue may be that the weights do not necessarily correlate to things like "orangeness"

Instead of a transformer for each color, you have like 5 to 100 weights that represent some arbitrary combination of colors. Literally the arbitrariness is defined by the dataset and the number of weights allocated.

They may even represent more than just color.

So I am not sure if a weight is actually a "dial" like you are describing it, where you can turn up or down different qualities. I think the relationship between weights and features is relatively chaotic.

Like you may increase orangeness but decrease "cone shapedness" or accidentally make it identify deer as trees or something, all by just changing 1 value on 1 weight

Re: I made a transformer to predict a simple sequence manually

#50

It's some kind of abstract machine, like a turing machine or the machine that parses regexes, isn't it?

This is simplified a bit - It's just a "machine" that maps [set of inputs] -> [set of probabilities of the next output]

First you define a list of tokens - lets say 24 letters because that's easier.

They are a machine that takes an input sequence of tokens, does a deterministic series of matrix operations, and outputs what is a list of the probability of every token.

"learning" is just the process of setting some of the numbers inside of a matrix(s) used for some of the operations.

Notice that there's only a single "if" statement in their final code, and it's for evaluating the result's accuracy. All of the "logic" is from the result of these matrix operations.

Post reply on HN