News for hackers. Stuff that matters.
Re:Σ-GPTs: A New Approach to Autoregressive Models by cs702 on Friday June 07, 2024 @09:49AM (#40608690)
This looks great.

The authors randomly permute (i.e., shuffle) input tokens in training and add two positional encodings to each token: one with the token's position and another with the position of the token to be predicted. Otherwise, the model is a standard autoregressive GPT. The consequences of this seemingly "simple" modification are significant:

* The authors can prompt the trained model with part of a sequence and then decode the missing tokens, all at once, in parallel, regardless of order -- i.e., the model can in-fill in parallel.

* The authors can compute conditional probability densities for every missing token in a sequence, again in parallel, i.e., densities for all missing tokens at once.

* The authors propose a rejection-sampling method for generating in-fill tokens, again in parallel. Their method seems to work well in practice.

I've added this to my reading list. Thank you for sharing it on HN.

Re:Σ-GPTs: A New Approach to Autoregressive Models by thomashop on Friday June 07, 2024 @11:38AM (#40609689)
I don't understand how that parallel prediction can work...

Let's say I give it as input the sentence:

I . . . . . . . . happily.

The second word to be predicted depends on the first word.

Re:Σ-GPTs: A New Approach to Autoregressive Models by cs702 on Friday June 07, 2024 @11:48AM (#40609792)
Give the model the tokens "happily" and "I", and add to each input token its respective position embedding and the position embedding for the token to be predicted. You can do this in parallel for all tokens to be predicted. The model has been trained so it can predict tokens in any position.
Re:Σ-GPTs: A New Approach to Autoregressive Models by KRAKRISMOTT on Friday June 07, 2024 @12:15PM (#40610054)
Isn't this bag of words all over again? Except with positional hints?
Re:Σ-GPTs: A New Approach to Autoregressive Models by hexomancer on Friday June 07, 2024 @12:07PM (#40609967)
Yes, but is there any guarantee that the complete sentence makes sense?
Re:Σ-GPTs: A New Approach to Autoregressive Models by entropicdrifter on Friday June 07, 2024 @12:09PM (#40609989)
That guarantee didn't exist with regular GPT LLMs, did it? It just came about as an emergent property of throwing more and more compute, training data, and training time at the problem
Re:Σ-GPTs: A New Approach to Autoregressive Models by amluto on Friday June 07, 2024 @03:30PM (#40612067)
I think it’s effectively built in to the design. The model outputs a probability distribution for the first unknown token [0]. Then some code outside the model chooses a token and runs the model again with that token provided to the model. So the second output token’s probability distribution is automatically conditioned on the first output token, etc.

Sometimes people will attempt to parallelize this by using a faster model to guess a few tokens and then evaluating them in as a batch with the main model to determine whether the choices were good.

[0] Usually it outputs “logits”, which become a probability distribution when combined with a “temperature” parameter.

Re:Σ-GPTs: A New Approach to Autoregressive Models by qeternity on Friday June 07, 2024 @06:19PM (#40613558)
> I think it’s effectively built in to the design.

It isn't. There is no guarantee that successive tokens will be comprehensible.

> Usually it outputs “logits”, which become a probability distribution when combined with a “temperature” parameter.

The logits are the probability distribution (well technically, you would apply softmax). Temperature is a parameter for how you sample those logits in a non-greedy fashion.

Re:Σ-GPTs: A New Approach to Autoregressive Models by hexaga on Friday June 07, 2024 @07:14PM (#40613872)
> Temperature is a parameter for how you sample those logits in a non-greedy fashion.

I think temperature is better understood as a pre-softmax pass over logits. You'd divide logits by the temp, and then their softmax becomes more/less peaky.

    probs = (logits / temp).softmax()
Sampling is a whole different thing.
Re:Σ-GPTs: A New Approach to Autoregressive Models by qeternity on Friday June 07, 2024 @07:20PM (#40613906)
Sure, my comment about softmax was simply about the probability distribution. But temperature is still part of sampling. If you’re greedy decoding, temperature doesn’t matter.
Re:Σ-GPTs: A New Approach to Autoregressive Models by alextheparrot on Friday June 07, 2024 @03:32PM (#40612094)
No, but it makes more conceptual sense given the model can consider what was said before it
Re:Σ-GPTs: A New Approach to Autoregressive Models by toxik on Friday June 07, 2024 @12:57PM (#40610527)
That is indeed an issue. Their sampling method rejects impossible combinations.
Re:Σ-GPTs: A New Approach to Autoregressive Models by taneq on Friday June 07, 2024 @12:42PM (#40610361)
Wow, if that works that's wild (and also has that "damn, now you say it it's obvious" flavour that so many really cool discoveries share...)
Re:Σ-GPTs: A New Approach to Autoregressive Models by toxik on Friday June 07, 2024 @01:07PM (#40610614)
This problem formulation has been around for a while, it’s kind of the holy grail of modeling. What is new compared to PixelCNN and related is this position embedding idea.
Re:Σ-GPTs: A New Approach to Autoregressive Models by cs702 on Monday June 10, 2024 @09:36AM (#40633556)
Yes, the modification the authors propose is indeed "simple."

It's "obvious" only in hindsight.

Re:Σ-GPTs: A New Approach to Autoregressive Models by tripplyons on Friday June 07, 2024 @01:51PM (#40611056)
The only difference I see from XLNet is how they use it during inference.
Re:Σ-GPTs: A New Approach to Autoregressive Models by arnaudpannatier on Friday June 07, 2024 @02:58PM (#40611756)
Hey! I'm Arnaud, first author of the paper. XLNet also shuffles the data during training, but they use a masking mechanism instead of the causal + double positional encoding. The application differs, XLNet is not AFAIK focused on generation (even if it can be used for that) and the burst-sampling idea is new.
Re:Σ-GPTs: A New Approach to Autoregressive Models by RivieraKid on Friday June 07, 2024 @04:06PM (#40612433)
Are there any obvious practical application of this algorithm for existing large (10B+) text / image models?

Does the rejection sampling lead to a statistically correct sample from the joint probability distribution or is that just a (possibly rough) approximation?

Re:Σ-GPTs: A New Approach to Autoregressive Models by arnaudpannatier on Saturday June 08, 2024 @08:30AM (#40617105)
For the application: being able to prompt anywhere in the sequence can be of interest. For what we've seen in the experiment, the rejection sampling leads to similar generation than the autoregressive one, we did not see any mode collapse or anything of that kind.
Re:Σ-GPTs: A New Approach to Autoregressive Models by tripplyons on Friday June 07, 2024 @03:38PM (#40612145)
Thanks for the clarification!
Re:Σ-GPTs: A New Approach to Autoregressive Models by WanderPanda on Friday June 07, 2024 @02:44PM (#40611627)
Wait wasn't BERT all about non-causal masking aka predicting words in the middle?!
Re:Σ-GPTs: A New Approach to Autoregressive Models by nico on Friday June 07, 2024 @03:31PM (#40612074)
I know this is for tokens/text, but can the same concept be applied to images using something like a diffusion model? And then be able to upscale images arbitrarily by infilling?
Re:Σ-GPTs: A New Approach to Autoregressive Models by gwern on Friday June 07, 2024 @04:18PM (#40612550)
Yes. See the related work section in the paper: there is a long history of models, recently like MAE and MaskGit, which predict pixels in basically arbitrary orders, and that is useful because it lets you train on subsets of each image, upscale/infill during generation, and so on. (If you know what MAE is, that might be the fastest way to summarize OP: "it's a GPT trained like a MAE".)
Re:Σ-GPTs: A New Approach to Autoregressive Models by psb217 on Friday June 07, 2024 @04:39PM (#40612735)
People also often forget "orderless autoregression", which was introduced a while back and has been reinvented many times since. See Sec 4 (pg 8) of "Neural Autoregressive Distribution Estimation" [https://arxiv.org/abs/1605.02226]. The main difference from current work is that this 2016 paper used MLPs and convnets on fixed-length observations/sequences, so sequence position is matched one-to-one with position in the network's output, rather than conditioning on a position embedding. Of course, Transformers make this type of orderless autoregression more practical for a variety of reasons -- TFs are great!

Key quote from Sec 4: "In this section we describe an order-agnostic training procedure, DeepNADE (Uria et al., 2014), which will address both of the issues above. This procedure trains a single deep neural network that can assign a conditional distribution to any variable given any subset of the others. This network can then provide the conditionals in Equation 1 for any ordering of the input observations. Therefore, the network defines a factorial number of different models with shared parameters, one for each of the D! orderings of the inputs. At test time, given an inference task, the most convenient ordering of variables can be used."

Re:Σ-GPTs: A New Approach to Autoregressive Models by DonHopkins on Tuesday June 11, 2024 @12:51PM (#40648580)
Gwern Branwen: Please do the world a favor and keep your vicious bigoted transphobic invalid opinions the hell OUT of the discussion of Lynn Conway's death. You and your hate speech and bullying are not welcome. Sit this one out.

https://news.ycombinator.com/item?id=8750504

Re:Σ-GPTs: A New Approach to Autoregressive Models by gwern on Tuesday June 11, 2024 @04:28PM (#40651087)
I have no idea what you are talking about, given that you are linking to a comment a decade old which has nothing to do with Conway's death just now; nor have I commented on Conway in any way today or been on HN today until just now, where I saw your comment. (Nor do I intend to comment now that you have drawn my attention to her passing, as I generally feel that such obituary notices should try to celebrate the good about a person, as posterity will have quite enough time to consider the bad as well.)

If you disagree and wish it 'kept out', my suggestion would be to... not link it? Especially in other pages which have nothing to do with Conway?

Re:Σ-GPTs: A New Approach to Autoregressive Models by DonHopkins on Tuesday June 11, 2024 @11:15PM (#40654095)
As somebody with a twitter feed full of recent pathetic misogynistic shit like this:

https://x.com/gwernbranwen1/status/1742214526878265550

...you are in no position to make claims about how posterity will consider the bad things about other people, asshole.

Re:Σ-GPTs: A New Approach to Autoregressive Models by telotortium on Wednesday June 12, 2024 @12:01PM (#40659604)
That’s a fake account - gwern’s real account is at https://x.com/gwern. It’s usually protected, but he occasionally processes his follow requests.
Re:Σ-GPTs: A New Approach to Autoregressive Models by DonHopkins on Wednesday June 12, 2024 @02:28AM (#40655181)
I'm sorry, I confused you with a twitter account that used the same name as yours, as I was upset by Lynn's passing. I take back what I said about you being an asshole.
Re:Σ-GPTs: A New Approach to Autoregressive Models by gwern on Wednesday June 12, 2024 @01:37PM (#40660789)
You are, unfortunately, not the first to be misled by my impersonator.

I've done what I can to get that account blocked: I have reported him for impersonation to Twitter years ago, after his previous accounts, and I have asked my followers to report the account to get it banned, and I have asked again just now. If any HNers would like to take a moment to report the false troll https://x.com/gwernbranwen1 account for impersonation of my real Twitter account, https://x.com/gwern , I would be grateful - there must be some number of reports at which he'll finally be banned...

But Twitter takes forever to ban impersonation accounts, so, 'gwernbranwen1' keeps on tweeting that crap.

(Why, you might wonder? I don't know. I have no idea who or why whoever is behind that account does it. They have never explained it anywhere I've seen, nor do they seem to particularly hate me or are trying to ruin my reputation; their main fixation seems to be misogynist hatred of a few women like Julia Wise. I've met Julia Wise all of once, who is a nice woman who I liked, but I otherwise have no particular connection to her, and I have no idea why anyone would want to harass her online like that or why they would do so under my name. It's just the Internet, I guess: https://gwern.net/littlewood )

Re:Σ-GPTs: A New Approach to Autoregressive Models by telotortium on Thursday June 13, 2024 @04:50PM (#40674606)
Whoa, look at that - the impersonator is suspended now.
Re:Σ-GPTs: A New Approach to Autoregressive Models by dingdonghopkins on Tuesday June 11, 2024 @07:53PM (#40653034)
What on earth is wrong with you? Your behavior is as obsessive and stalkerish as Conway's.
Re:Σ-GPTs: A New Approach to Autoregressive Models by telotortium on Wednesday June 12, 2024 @12:03PM (#40659639)
MAE = masked autoencoder, not mean absolute error.
Re:Σ-GPTs: A New Approach to Autoregressive Models by RivieraKid on Friday June 07, 2024 @03:46PM (#40612212)
If there are multiple missing tokens, what's the positional encoding for the "token to be predicted"?
Re:Σ-GPTs: A New Approach to Autoregressive Models by cs702 on Friday June 07, 2024 @04:01PM (#40612375)
See this thread, also on this page:

https://news.ycombinator.com/item?id=40609689

Re:Σ-GPTs: A New Approach to Autoregressive Models by mglikesbikes on Friday June 07, 2024 @06:12PM (#40613511)
Off topic, but what do you use for your reading list?
Re:Σ-GPTs: A New Approach to Autoregressive Models by barfbagginus on Friday June 07, 2024 @07:30PM (#40613958)
Zotero is great for organizing and annotating papers, keeping notes, and building bibliographies.

You can create libraries and sub libraries according to topic, and also create libraries for projects or reading lists. Can also create shared libraries, for your research team to share annotated papers.

Finally it can archive offline copies of web pages, which makes it useful for blog articles and other online resources that might vanish.

There's a little learning curve, but it's worth it if you find yourself juggling dozens of technical papers! Enjoy!

Re:Σ-GPTs: A New Approach to Autoregressive Models by ofou on Friday June 07, 2024 @06:23PM (#40613583)
I use Emergent Mind[1] to keep track of new research published on ArXiv. You can bookmark articles once logged in. It's very useful for keeping track of articles, reading quick summaries, and following conversations on various social media.

[1]: https://www.emergentmind.com/papers/2404.09562

Re:Σ-GPTs: A New Approach to Autoregressive Models by inhumantsar on Friday June 07, 2024 @06:32PM (#40613647)
hijacking for a bit of shameless self promotion: if you're an obsidian user, I recently built a plugin that simplifies web pages, parses out metadata, and saves them to obsidian as markdown files: https://github.com/inhumantsar/slurp

arXiv comes through a bit ugly atm but it's high on my to-do list. I'm leveraging the library that Firefox uses for reader mode, so most sites come through quite well. A lot of my work right now is expanding their metadata support and fixing parser issues.

Re:Σ-GPTs: A New Approach to Autoregressive Models by cs702 on Friday June 07, 2024 @07:21PM (#40613912)
old-fashioned text files
Re:Σ-GPTs: A New Approach to Autoregressive Models by concurrentsquar on Friday June 07, 2024 @10:03PM (#40614709)
Google Chrome has a built-in reading list (go open the 3-dotted menu at the top-right corner, then click on "Bookmarks and lists" -> "Reading list")