Where Is GPT in the Chomsky Hierarchy?

(fi-le.net)

39 points | by fi-le 4 days ago

10 comments

  • PaulHoule 2 hours ago
    The Chomsky Hierarchy isn't the right way to think about, in fact the Chomsky paradigm probably held back progress in language technology over the past 70 years.

    In the Kuhnian sense, Syntactic Structures was the vanguard of a paradigm shift that let linguists do "normal science" in terms of positing a range of problems and writing papers about them. It was also useful in computer science for formally defining computer languages that are close enough to natural languages that people find them usable.

    On the other hand, attempts to use the Chomsky theory to develop language technology failed miserably outside of very narrow domains and in the real world Markov models and conditional random fields often outperformed when the function was "understanding", "segmentation", etc.

    From an engineering standpoint, the function that tells if a production is in the grammar that is central to the theory is not so interesting for language technology, I mean, if LLMs were -centric then an LLM would go on strike if you got the spelling or grammar wrong or correct you in a schoolmarmish William Safire way but rather it is more useful for LLMs to silently correct for obvious mistakes the same way that real language users do.

    The other interesting thing is the mixing of syntax and semantics. For a long time I believed the "Language Instinct" idea of Pinker in which the ability to serialize and deserialize language is a peripheral that is attached to an animal and you need the rest of the animal and even the surrounding world to have "human" competence. Now LLMs come around and manage to show a lot of linguistic competence without the rest of the animal and boy we have egg on our face, and coming out of the shadow of the Chomsky theory, structuralism will rear it's head again. (e.g. "X is structured like a language" got hung up on the unspoken truth that "language is not structured like a language")

    • czzr 40 minutes ago
      I don’t think LLMs contradict the Pinker description - it just turns out that the output stream embodies a lot of information, and you can construct a model (of some reasonable fidelity) of the original sources from sufficient examples of the output stream.
    • suddenlybananas 8 minutes ago
      > For a long time I believed the "Language Instinct" idea of Pinker in which the ability to serialize and deserialize language is a peripheral that is attached to an animal and you need the rest of the animal and even the surrounding world to have "human" competence.

      Yeah you just need 10 trillion tokens of data.

    • ogogmad 1 hour ago
      I think most PL parsers use recursive descent, which doesn't require any formal language theory. That said, it's possible that formal language theory has enabled regular expressions to enter widespread use - first via theory; then to make tokenisers; then included in text editors; and then to make GREP.
      • Maxatar 1 hour ago
        You're going to have a very hard time parsing a language using recursive descent if you don't understand some formal language theory. Recursive descent algorithms have a lot of trouble with left-recursion, and can result in arbitrary backtracking if you're not careful, which can blow up memory and time. To fix left-recursion you need to rewrite your grammar, which means familiarity with formal language theory. To avoid backtracking you typically use an LL(N) or variations thereof, which once again require having a pretty good understanding of formal language theory.
        • FeepingCreature 44 minutes ago
          Nah. Source: have done it without formal language theory. You can do most things by printf debugging and kludging.

          (Left-recursion? Use a while loop! Mutable state is a pathway to many abilities functional programmers consider unnatural.)

    • DiscourseFan 1 hour ago
      Don't worry, the LLMs are already post-structuralist (at least the ones working on them are often familiar with those thinkers). Which is incredibly disturbing, I think, for many linguists who have spent their entire careers fighting against the French, only to have such philosophical and intellectual work become the most important in the development of this new technology. Hey, at least I'm employed! (And they said it "wasn't serious," that Chomskian Linguistics was the "real science"!)
      • lukev 40 minutes ago
        Well, technically, they're more structuralist than post-structuralist. Arguably they even prove that Saussure's original structuralist hypothesis was correct.
  • weinzierl 20 minutes ago
    "This covers practically all programming languages, because they conform to a syntax tree where each branch is an application of such a production rule."

    Except that practically all practically used programming languages are not context-free.

    • fi-le 4 minutes ago
      Thank you, corrected!
  • pohl 1 hour ago
    Regular...albeit astronomically large (unless we're granting idealizations like infinite context, etc.)
    • Netcob 28 minutes ago
      Exactly, same as all real-world computers.

      Although to be fair, nothing above regular (that I'm aware of, it's been a while) requires infinite space, just unlimited space... you can always make a real Turing machine as long as you keep adding more tape whenever it needs it.

  • Animats 15 minutes ago
    > Let's grant our GPT an infinite context-window.

    No. If you have infinite memory, you get into decidability issues, which the author does. Lots of people have been down this rathole. Penrose is probably the most prominent. It doesn't help.

    The real issues are combinatoric. How hard is this? Is there an upper bound? Is this one of those many problems where the worst case limit is exponential but the average limit is much lower? Or where a "good enough" solution is far cheaper computationally than a perfect one. The Traveling Salesman problem is the classic example, but it comes up in other optimization contexts, such as the simplex method of linear programming.

  • aghilmort 1 hour ago
    there’s decent work on computational reasoning power of transformers, SSMs, etc.

    some approximate snippets that come to mind are that decoder-only transformers recognize AC^0 and think in TC^0, that encoder-decoders are strictly more powerful than decoder-only, etc.

    Person with last name Miller iric if poke around on arXiv, a few others, been a while since was current top of mind so ymmv on exact correctness of above snippets

    • ctoa 1 hour ago
      You are probably thinking of Merrill (whose work is referenced towards the end of the article).
  • guerrilla 1 hour ago
    This is a trivial category mistake.
  • enriquepablo 28 minutes ago
    The Chomsky hierarchy is a classification of grammars. So it's about Syntax.

    GPT is purely about semantics, about truth. To the extent that I think it can be said to be fundamentally informal in its dedication to truth, since it can easily be prompted to produce syntactically incorrect output - wrt the syntax of whatever language whose semantics determine the truth GPT is asked to reflect.

    So I think this is a categorically incorrect question.

    I mean, what is the fundamental syntax of the output of an LLM? It would have to be that any sequence of utf8 chars is valid.

    • suddenlybananas 10 minutes ago
      LLMs have absolutely nothing to do with truth. If anything the analogy is closer to syntax as LLMs are pure form, just language in absence of any context or reference.
  • Maxatar 1 hour ago
    So unless I'm mistaken, the TL;DR is that GPTs inherently can not be Turing complete because they always terminate, ie. there is always a non-zero probability of the end-of-token character to be generated.

    Seems like a fair argument to raise, although not too insightful.

    As a nitpick, it really is not the case that most programming languages are context-free, but I can sympathize with what the author is trying to get at. Most programming languages have a context-free superset that is useful to use as one of many stages in the parsing pipeline, before type checking and name resolution etc... but apart from perhaps some dynamically typed programming languages, the vast majority of programming languages are context-sensitive, not context-free.

    • fi-le 3 minutes ago
      Thank you for the nitpick, corrected!
    • onraglanroad 1 hour ago
      > GPTs inherently can not be Turing complete because they always terminate

      I'm not sure that was intended entirely seriously. After all, humans always terminate too...

      • bigfishrunning 1 hour ago
        To follow on logically, maybe humans aren't Turing complete? we are not equivalent to Turing machines...
        • FeepingCreature 42 minutes ago
          No machine instantiated in the physical universe is Turing complete in this sense.
        • prolyxis 1 hour ago
          Except that as far as I understand, one of the inspirations for the Turing machine is to explain precisely the computations a human computer could perform with (potentially a lot of) pen and paper.
          • stormking 56 minutes ago
            And an unlimited life span.
        • wat10000 58 minutes ago
          We can simulate a Turing machine, given storage. The infinite storage and infinite time is always a sticking point when comparing any real physical system to a theoretical Turing machine, so we tend to ignore those bits.
          • tshaddox 21 minutes ago
            "Unbounded" is a better term to use than "infinite."
    • arjvik 1 hour ago
      As a quick hack, is this flaw fixed by using top-p or top-k or min-p or whatever the current hottest logit sampling algorithm is?
      • FeepingCreature 41 minutes ago
        The "flaw" is also fixed by simply not recognizing the end-of-sampling token. Even the limited size of the context window can be worked around with tool calls.
  • Vosporos 1 hour ago
    On Little Saint James, with Chomsky himself.
  • ozim 1 hour ago
    [flagged]
    • varjag 1 hour ago
      While I share the opinion that Chomsky held back the field of linguistics for decades, the belief that technical or scientific excellence has to beget virtues is a fallacy.
    • sph 30 minutes ago
      Who’s we? The social media hivemind that determines what to feel about things?

      Be an adult, think for yourself. The most despicable person to have lived in the modern age made decent paintings in his younger years.

    • WhyOhWhyQ 46 minutes ago
      What I gathered is that Chomsky was genuinely friends with Epstein, even after the sex crimes had been revealed (which is disturbing), but that there's no evidence Chomsky himself did anything criminal or immoral beyond being friends with a monster. The charitable interpretation is that Chomsky is just as easily conned by fun-seeming extroverted people as anyone else. But maybe there's more to it.
    • onraglanroad 56 minutes ago
      "We"? Who's "we"?

      You're nothing to do with me

      The me that I am is not you

      Not a "we". Not an "us"

      There's no party of blue, or red or white

      Not for me, at least