Attention Is Bayesian Inference

(medium.com)

141 points | by samwillis 5 days ago

7 comments

  • kianN 17 hours ago
    I don’t love these “X is Bayesian” analogies because they tend to ignore the most critical part of Bayesian modeling: sampling with detailed with detailed balance.

    This article goes into the implicit prior/posterior updating during LLM inference; you can even go a step further and directly implement hierarchical relationships between layers with H-Nets. However, even under an explicit Bayesian framework, there’s a stark difference in robustness between these H-Nets and the equivalent Bayesian model with the only variable being the parameter estimation process. [1]

    [1] https://blog.sturdystatistics.com/posts/hnet_part_II/

  • vessenes 16 hours ago
    Not a professional, but an avid researcher/reader.

    These papers look promising, but a few initial strikes - first, the research itself was clearly done with agentic support; I'd guess from the blog post and the papers that actually the research was done by agents with human support. Lots of persistent give aways like overcommitting to weird titles like "Wind Tunnel" and all of the obvious turns of phrase in the medium post unfortunately carry on into the papers themselves. This doesn't mean they're wrong but I do think it means what they have is less info dense and less obviously correct, given today's state of the art with agentic research.

    Upshot of the papers, there's one claim - each layer of a well trained transformer network allows a bayesian 'update' and selection of "truth" or preference of the model; deeper layers in the architecture = more accuracy. Thinking models = a chance to refresh the context and get back to the start of the layers to do further refinement.

    There's a followup claim - that thinking about what the models are doing as solely updating weights for this bayesian process will get more efficient training.

    Data in the paper - I didn't read deeply enough to decide if this whole "it's all Bayes all the way down" seems true to me. they show that if you ablate single layers then accuracy drops. But that is not news.

    They do show significantly faster (per round) loss reduction using EM training vs SGD, but they acknowledge this converges to the same loss eventually (although their graphs do not show this convergence, btw), and crucially they do absolutely no reporting on compute required, or comparison with more modern methods.

    Upshot - I think I'd skip this and kind of regret the time I spent reading the papers. Might be true, but a) so what, and b) we don't have anything falsifiable or genuinely useful out of the theory. Maybe if we could splice together different models in a new and cool way past merging layers, then I'd say we have something interesting out of this.

  • CuriouslyC 19 hours ago
    Pretty interesting. The posterior matching is a big deal, but I'm not convinced by the handwaiving required to demonstrate it in larger models. I'm interested in seeing how direct EM training scales though.
  • behnamoh 17 hours ago
    sure, but this stuff is only obvious post hoc. so many people have tried to "justify" the attention mechanism according to their area of expertise, but none of them came up with it first; ML engineers with ML thinking did.
  • roger_ 18 hours ago
    Last time I look into SoTA Bayesian deep learning, Bayesian output layers seems the most promising and practical. Is that still the case?
  • danielscrubs 18 hours ago
    Found it interesting and engaging, but having a CS professor at Colombia putting their name to AI “slop” is a bit unnerving. If they are writing papers for work you would hope they would enjoy the process of thinking and writing (journaling) instead of using ChatGPT.
    • cubefox 18 hours ago
      Yeah. The article was clearly "enhanced" with an LLM. Too many inane "this is not just A; this is B" sentences. Also, "why this matters" as final subheading. Fail.
      • naasking 15 hours ago
        Who cares if it was enhanced with LLMs? That's not determinative of whether the article is accurate and valuable.
        • Analemma_ 15 hours ago
          This is kind of a self-defeating argument. If the information is accurate and valuable, why bother with this blog post at all? The papers could speak for themselves.

          But a lot of people are of the opinion that for many papers it helps to have a secondary publication where the author puts the work in the appropriate context. I’m trying to build a shared mental model with the author, to help me better understand the underlying work; that is harder to do when there’s no mind behind the words.

          • naasking 13 hours ago
            Because articles are high level summaries of detailed work. What's self defeating about that?

            > that is harder to do when there’s no mind behind the words.

            Presumably the author read the text before publish and agreed with the summary. What's the problem exactly?

            • layer8 11 hours ago
              The problem is that it’s distracting, lowers the quality of the writing, and one has to be cautious that random details might be wrong or misleading in a way that wouldn’t happen if it was completely self-authored.
              • naasking 11 hours ago
                That's just not true, and even if LLMs did introduce more errors than humans, if you can't trust the author to proof read a summary article about his own papers, then you shouldn't trust the papers either.
                • layer8 11 hours ago
                  I agree with the latter. The fact that they use an LLM for the summary post without rewriting it in their own words already makes me not trust their papers.
      • binary132 18 hours ago
        this was also my experience and unfortunately, if there were any grains of value to be winnowed from the slop, I lacked the patience to continue grinding at the mill.
    • RevEng 16 hours ago
      Writing the paper is a very small part of the research. It's entirely likely that - like many of their students - they love the research but hate writing papers. They are very different skill sets.
      • layer8 11 hours ago
        One would think they’d care about the experience of people actually reading their papers.
    • esafak 17 hours ago
      Just give me an arXiv paper and I'll summarize it myself!
      • jungturk 17 hours ago
        The three arxiv links being summarized are included in the article.
    • maccam912 18 hours ago
      Y'all, we need to get away from calling everything written by an LLM "slop". To me, slop is text for the purpose of padding content or getting clicks or whatever. Whether or not this was written in full or in part or 100% by a human who sounds like an LLM, the content here was interesting to think about and was organized and easy to read. Maybe I'm the only person reading past the word choice and grammar to extract the ideas from the article instead of playing a game of "human or AI" with every piece of writing I see.
      • yloh 17 hours ago
        If something is not worth writing, it is not worth reading.
        • tekne 17 hours ago
          On one hand, yes: expanding bullet points to slop makes things strictly worse.

          On the other hand, if one uses AI but keeps content density constant (e.g. grammar fixes for non-native speakers) or even negative (compress this repetitive paragraph), I think it can be a useful net productivity boost.

          Current AI can't really add information, but a lot of editing is subtracting, and as long as you check the output for hallucinations (and prompt-engineer a lot since models like to add) imo LLMs can be a subtraction-force-multiplier.

          Ironically: anti-slop; or perhaps, fighting slop with slop.

          • wrsh07 16 hours ago
            People are complaining about this article because of the lack of density
        • naasking 15 hours ago
          Well that's a completely wrong take.
      • derbOac 16 hours ago
        For whatever it's worth, I felt that regardless of whether it was written by a human, or AI, or AI-then-human, it was poorly written. I was going to dismiss it until I saw the links to the papers at the bottom, which I found pretty interesting and well worth the read.

        The essay kind of works for me as an impressionistic context for the three papers, but without those three papers I think it's almost more confusing than it helps.

      • wrsh07 16 hours ago
        I would say that many of the sentences in this essay are not worth reading. Most of them are of the form described, eg not x but y

        Eg

        > This suggests that the EM structure isn’t just an analogy — it’s the natural grain of the optimization landscape

        I don't care if someone uses llm. But it shows a lack of care to do it in this blatant way without noting it. Eg at work I'll often link prompt-response in docs as an appendix, but I will call out the provenance

        If you find those sentences to be helpful, great! I find it decreases the signal in the article and makes me skim it. If you're wondering why people complain, it's because sharing a post intended to be skimmed without saying, hey you should skim this, is a little disrespectful of someone's time

        • eli_gottlieb 4 hours ago
          > This suggests that the EM structure isn’t just an analogy — it’s the natural grain of the optimization landscape

          As someone in the field, this means nothing, and I'm very suspicious of the article as a whole because it has so many sentences like this.

  • dbacar 14 hours ago
    Just skimming, noticed lots of em dashes, interesting :).
    • iamjs 12 hours ago
      It's so disappointing that this has become a meme. Lot's of people write with em-dashes. If you want to criticize the _writing_, then do so.
      • dbacar 4 hours ago
        Writing is repetitive, making lots of general false claims out of personal feelings etc... I guess this is enough to criticize a chatbot output.