Prediction and Entropy of Printed English (1950) [pdf]
princeton.edu
princeton.edu
https://pages.cs.wisc.edu/~rist/642-spring-2014/shannon-secr...
https://pure.mpg.de/rest/items/item_2383164/component/file_2...
What an absolute genius who disrupted two fields in two years.
I was exposed to Shannon's channel capacity theorem of a binary erasure channel in a grad comms theory course, and totally fell in love with the beauty and elegance of his mathematical formulations. Since that day, teaching Information Theory has been my most favorite hobby--which also used to a career. I love to see students' eyes pop when you eventually show how elegantly simple it is to express disorder (entropy) and to find fundamental limits on source and channel codes using this expression.
Wish we had more MS theses today that at least attempted something as ambitious as this one, instead of just checking a box :(
[0]https://en.wikipedia.org/wiki/The_Information:_A_History,_a_...
0: https://techchannel.att.com/play-video.cfm/2010/3/16/In-Thei...
He actually showed that ball juggling is one of the most complex cognitive tasks that a human can undertake: "The physical constraints that affect mastery and limit the number of objects juggled arise from gravity - more specifically, Newtonian mechanics (h=1/2gt2). Each ball must be thrown sufficiently high to allow the juggler time to deal with the other balls. The need for either speed or height increases rapidly with the number of objects juggled."
You’ll be lucky to get anything reasonable at all.
Language models are related to text compression, except that the compression is lossy, not trying to be able to recreate the source text exactly but rather to be able to recreate something that is statistically similar.
The PTB perplexity numbers are based on the probabilities assigned to some text from the Wall Street Journal that used to be used as a standard test set in language modeling. It's 2 to the power of the average log probability of each word in the text under the model. So perplexity of 20 corresponds to around 4.3 bits of log probability per word, or another way of thinking of it is that the model will guess the correct following word in 1/20 cases.
The reason I say this isn't exactly the output entropy is that, since perplexity is evaluated on a fixed text, it might not correspond to the kinds of texts that the model would generate purely on its own. In other words when you're looking at some fixed txt, the contexts you get in p(token | context) might not be anything like a context that the LM would generate itself. This was a problem people pointed out a few years ago---back then it looked like LM generations were somewhat higher-entropy than what you measured looking at a fixed text. I don't know if the modern huge LMs have this same problem.
[1]. An Introduction to Information Theory, Symbols, Signals & Noise By John Robinson Pierce · 1980 https://www.google.com/books/edition/An_Introduction_to_Info...
https://www.amazon.com/Idea-Factory-Great-American-Innovatio...
Btw Shannon also invented wearable computers. He did it to cheat at roulette.
It was just an idea before they jointly developed it.
[1] https://en.wikipedia.org/wiki/J._Doyne_Farmer [2] https://en.wikipedia.org/wiki/The_Eudaemonic_Pie
Highly recommended!
In the 80s-90s, Shannon’s predict the next token idea gave us spell check.
In 2000-2010 it gave us Siri & Google Home.
In 2020 it gave us ChatGPT.
I remember a presentation by Bill Gates, about the cutting edge statistical modelling based translation and speech recognition at Microsoft, similar to what Google was doing. The software was live-transcribing him, well enough that he could be understood. I was floored. Assuming this wasn't tailored to Bill specifically for the demo, it was revolutionary technology of the kind I had expected to take much longer to develop. That was 2008. At the time the notion that speech might become a common interface still seemed rather far-fetched to many. By 2018 such tech was everywhere. Deep learning based models have now closed much of the remaining gap in just the last couple years.
* How did Shannon get nice looking math before LaTeX? John Nash's thesis in 1950 (only 32 pages long!) had handwritten math: https://library.princeton.edu/special-collections/sites/defa...
* Strange to see see citations as footnotes, not a references section. (Nash's thesis was kind enough to include two cites in its references.) Was this typical?
In practice however the state space is so humongously large that this barely comes up in any reasonable example.
Can you expand on this? Not quite following.
I'm not sure how much you know about regular grammars, but basically they're the kind of thing that a regular expression can match. Now regular expressions can do a lot but they have their limitations, in particular they cannot distinguish a sequence of matched brackets '((())())' form one of unmatched brackets '(()(', or at least not with 100% accuracy.
It turns out that regular expressions are precisely the languages that can be recognized by finite state machines. Which is kind of equivalent to the possible outputs of a markov model.
Since large language models only have a finite number of states they must have the same limitations, which means it is fundamentally impossible to make them only generate balanced brackets. They get away with it by having a ridiculous number of states, so they might not be able to deal with arbitrarily deep nesting, but they can still get far enough that you won't generally notice.
ChatGPT Example:
> Add the correct number of closing parentheses to this string: (((((((((((((((((((((((((((((((
>> ))))))))))))))))))))))))))))
>> The correct number of closing parentheses to balance the opening parentheses is 21.
which is not correct
I think an analogy would be like saying that you can't represent pi as a floating point number. Precision can be increased by adding more bits, but there's a fundamental limitation because of the underlying storage mechanism.
a) Turing-complete, in which case they can all match unbounded brackets, or
b) they are all not Turing-complete, LSTMs might be able to match unbounded brackets (if there is only one type of bracket), while RNNs and Transformers can't.
For RNN/LSTM all you need is enough neurons to implement a counter.
For an arbitrary depth, that would need to be an infinitely sized counter. (I presume you know this, but this is why a push-down automaton can always close parens, but a finite state machine can only close parens up to a finite nesting depth.)
So, "all you need is enough neurons" for an RNN/LSTM is equivalent to just saying you just need to scale the LMM state large enough to handle your use case.
In reality, ignoring rdrand (and other quantum noise instructions) and ignoring using I/O for external storage, all of our computers are (gigantic) finite state machines. Technically, our programming languages might be Turing complete, but our near-infinite memory implementations are actually finite state machines, not Turing-complete. Though, you only run into the difference when you fill the whole machine's memory.
So, I think a more important question is how efficiently different finite state machines make use of their state sizes for a given problem. How many neurons would it take to match parens to a maximum depth of 2^40 for an RNN/LSTM vs. an LLM?
For a Transformer you need to add a new layer of self-attention to increase bracket matching depth by 1. https://direct.mit.edu/tacl/article/doi/10.1162/tacl_a_00306...
Transformers are formally a lot weaker than RNNs/LSTMs.
https://www.lesswrong.com/posts/htrZrxduciZ5QaCjw/language-m...
Shouldn't that be U instead of V? Or am I missing something.