Energy-Based Reasoners: 385x more efficient inference (energy-based-reasoners.github.io)
258 points by frenchmajesty 9 hours ago
Topfi 7 hours ago
Recommend checking out Logical Intelligence, chaired by among others Yann LeCun, for more context on EBMs [0]. Has great potential in areas that LLMs traditionally do not perform that well in and, because they want to show the advantages of EBMs, also tends to be a great source of examples LLMs struggle with, like primary school level maths and counting (while ironically providing Millennium level Lean proofs). Does of course open the not unreasonable discussion of whether it matters if LLMs can accurately count when writing code to do the calculation is reliable and fast...
[0] https://logicalintelligence.com/blog/energy-based-model-sudo...
abeppu 3 hours ago
> We disabled code execution for all models in the demo, to prevent the LLMs from writing a brute-force backtracking solver in Python and running it, which would tell us something about their coding ability but nothing about their reasoning ability.
This seems sketchy. Reasoning how to solve the problem with a program is still reasoning, and if it yields programs which are more efficient (bc even a slow interpreter is faster/cheaper than an LLM) and potentially reusable, then so much the better!
throwaway0q5347 2 hours ago
I think the goal in this case is to isolate the LLM from that avenue in order to determine whether or not the approach is improving the LLM intrinsic ability, not because it is a better solution than having the LLM create programs.
abeppu 2 hours ago
nilsherzig 6 hours ago
> See the live benchmark
broken login wall. truly agi.
Topfi 6 hours ago
Yeah, that's embarrassing. It was a neat showcase when it was online. Was only able to find this video that shows the demo [0].
[0] https://www.linkedin.com/posts/brianbuntz_sudoku-is-apparent...
otabdeveloper4 5 hours ago
> while ironically providing Millennium level Lean proofs
They're doing that by generating a metric shitload of schizo syllogism junk that is then sifted through Lean to find a valid nugget. (Or not.)
The implication is that "Millennium level" is mostly stuff that's too tedius for meatsack humans to sift through.
topicalSoup 3 minutes ago
You are factually incorrect about this. If you look at how these proofs are actually being generated, the proof comes first and is only later Lean-verified. For example, take Yang-Mills: it was proved by OpenAI on Sept 9 and then Lean-formalized on Oct 16. If all the AI was doing was sifting Lean, we would expect the proof completion and the Lean verification to happen simultaneously.
zbentley 2 hours ago
I think that’s valuable, potentially. The bitter lesson writ large, basically: lots of problem spaces that previously required reasoning to narrow down possible paths to solutions can now be permitted over much more broadly instead.
Sucks for the project of human learning though.
testtestmetest 5 hours ago
Logical Intelligence is most definately a scam, that should hardly be taken seriously. Its one of the handful of companies that is able to automatically fundraise a fk ton of momey just by putting LeCun's name on it (a great way to make a bunch of money off VCs last year).
Its funny everytime ebms get brought up people have to name drop this company. They literally do nothing.
throwaway0q5347 2 hours ago
> Logical Intelligence is most definately a scam, that should hardly be taken seriously
citation needed?
program_whiz 6 hours ago
A clarifying way to think about this for sudoku:
For every clue, mark the probability of sampling its number in the row/col to zero. Also mark the probability of selecting a "clue cell" for modification to 0.
Pick a random cell for modification, based on its "energy" (higher energy get modified first):
1. Every conflicting cell gets energy +1.0 (try to resolve conflicts before new empty cells). E.g. two 7s on the same row both get +1 energy.
2. Empty cells have small energy 0.1
3. Filled cells with no conflicts have energy 0
For the selected cell, choose a digit. Look at numbers in its row/column, every occurrence of a number in the row/col drop prob of sampling by 90%. Example: | No. of 7s | chance of 7 |
| --- | --- |
| 0 | 10% (equal to other digits) |
| 1 | 1% |
| 2 | 0.1% |
Obviously this would get more complex with more numbers on the line (this is just checking 7 on otherwise empty line).This is essentially what these models are doing. It provides a kind of "wave function collapse" search with random exploration based on "energy", but energy is just defined as conflict / unsolved. For something like a maze, energy is disconnected path segments or walls, etc.
mocmoc 5 hours ago
I've spent a year on this. EBMs while ... how to say it, they are impressive validators , it's insanely hard to train them. They are very niche specific. While LLMs , being not right all the time and clumsy and so on, they help the people to get the job done at the end.
EBM sudoku is not that hard in a small scale, and Logical Intelligence sudoku solver doesn't scale , if I'm wrong , I want to see them offering as big of a sudoku as you want.
also, after months and months training EBMs , you come to realize... it's really worth it?
xgk 4 hours ago
What makes EBM hard to train?
It took a long time (including the development of GPUs, then TPUs, not to mention domain-specific languages like JAX and PyTorch with associated compilers) and scale to train LLMs. EBMs have not yet seen this level of decades of 'full-stack' optimisation.
m3kw9 4 hours ago
is it good for local llm's where you do a very specific task like voice removal?
xgk 6 hours ago
The paper does not seem to define what Energy-Based means. The paper says: "EBMs learn a scalar function that assigns an energy to a candidate prediction given an input." What codomain do those learned scalar function have? I guess real numbers? But is "Energy" just a synonym for the reals?
program_whiz 6 hours ago
See my comment below, I explain what it means. Energy is just a number that comes out of matrix which learns the relationship between different states of the system being searched. For example, suppose we're talking about sudoku. You would have a matrix that has W_ij (weights between spaces). For each of those, there are 9x9 numbers (energy between two of the digits). A combination like W[0, 1](4, 4) is high because you would have a 4 in the first space, and a 4 in the 2nd space (which breaks the rules). Most of the values are low energy (e.g. 4 and 2 is energy 0, no conflict). However, as different numbers are placed, they are checking for the lowest energy number across the whole board, and the "clues" are locked in.
So if you had a "clue" like 2 in a space, then the energy for 2 on that row / column would be high, but other numbers low. You just sum this up and pick the lowest energy number. As you add numbers, you can hit conflicts (e.g. two 7s in the row), changing one of them will be the next lowest energy move. The probability of changing a number is inversely proportional to its energy. So changing the conflicting numbers is the usual most likely move.
So in the best case it works like this: For each empty cell, pick a number at random, but its weighted by the other numbers that affect it (e.g. if 7 is in the row, the chance of 7 is 0.1%). Continue doing this on empty cells, unless there is a conflict in solved cells (higher prob of mutation), in which case change that number first.
So its a slightly fuzzified version of a very fast concrete algo. "Energy" is just a number from training, its defining by the task at hand (in this case, "energy" is how much conflict numbers have on the board, 0 meaning no conflict and solved if every cell is filled in).
datsci_est_2015 4 hours ago
Nice explanation. Very intuitive use of the word “energy” by the researchers, imo, because of its relationship to entropy and “low energy states” (good / desirable / stable) and “high energy states” (bad / undesirable / unstable).
CuriouslyC 6 hours ago
To simplify the explanation further, the main difference in practice between energy based and more traditional models is that they throw out normalization.
xgk 5 hours ago
That's also my default assumption: P(x) ∝ e^(−E(x)) Or, in more detail,
E(x) = −log P(x) + constant
If that's the correct interpretation, then the main advantage of energy-based methods over strictly probabilistic methods seems to be that, since the energy function does not need to integrate to one, it can be parameterised with any nonlinear regression function. That means density estimation is basically a nonlinear regression problem.This is the interpretation in [1]. I am not sure, however, if the paper here is an unnormalised probabilistic model.
[1] Y. Song, D. P. Kingma, How to Train Your Energy-Based Models. (2021) https://arxiv.org/abs/2101.03288
datsci_est_2015 4 hours ago
Which can be a huge advantage, as normalization is an often-overlooked source of bias in modeling.
usernametaken29 6 hours ago
I find this particularly concerning because in their related works they did not refer to the free energy principle, which is the underlying principle of energy based cognition... so eh... what are they referring to? If its not the energy as defined by FEP and active inference, which energy is it? Did they mean entropy? I didn't get it from the paper, really
eli_gottlieb 2 hours ago
Energy-based models parameterize energy functions $$E_{\eta}(x) = -log p_{\eta}(x)$$ with neural networks $$\eta$$. The FEP and active inference are specializations of this paradigm to latent-variable models where the energy function is defined by the unnormalized Bayesian posterior over the latent instead of just a marginal distribution over the observed data.
Source: I've worked with a lot of core FEP folks and published at their conference.
tristenharr 41 minutes ago
Ahh finally! It’s what I would have expected. Thank you so much for scratching this intellectual itch I’ve had for a bit now.
This also might be a good way to finally explain to people how AI is working in some sense. If you look at it from an information theoretic view and treat things like kolgomorov complexity and the data inputs to machine learning as an energy landscape, you can look at AI and ML as a whole as something that is learning the energy landscape.
It’s not that AI ever was a black box, we have always known how it works. (It’s a pet peeve of mine when people say we don’t understand AI, we designed it using mathematics we understand perfectly the mechanisms)
The information we observe is a consequence of the underlying structure and constraints of reality. The universe has an underlying physical structure, with energy, interactions, constraints, and relationships. What we call data is an observable artifact of those underlying structures.
You can view reasoning as navigating an energy landscape.
Very neat and interesting nice work!
andai 38 minutes ago
>It’s a pet peeve of mine when people say we don’t understand AI, we designed it using mathematics we understand perfectly the mechanisms
Well, unfortunately I am here to peeve your pet. OpenAI and Anthropic have both spent years training specialized AIs to help them figure out what the heck their AIs are doing!
igleria 8 hours ago
As far as I could understand, this works very well for a very specific logic puzzle problem set. Interested on future papers tho :)
program_whiz 6 hours ago
Big caveat if anyone thinks this could replace or strongly augment "reasoning" models (LLMs, RNNs) -- its more like an energy-based search for a discrete problem (graph coloring, solving mazes, sudoku).
It works by training a weight matrix (N-to-N) on different solutions. For example, in sudoku you're training a weight matrix for every space to every other space (81 c 2), with 9x9 numbers (~240K weights). So then the "energy" for every number in a space is W_ij(a, b) where ij is a pair of spaces, and (a, b) is a pair numbers you want to swap (e.g. 4->2 in the space). Pick the lowest energy move each time (argmin of this whole space), and iterate.
This has a few limitations. First, its discrete and has a limited space definition, getting this to work for arbitrary reasoning seems hard (what size/shape graph would you use for arbitrary reasoning). Second, the ruleset is defined apriori (e.g. you need to know you have a 9x9 grid and 9 numbers, the rules of the game are implicit in the checker). Third, the actual search algorithm is somewhat bespoke to task (less of a factor, maybe use generic graph coloring as the basis of any problem), but for something like agentic reasoning its not clear how this would be adapted. For example with mazes, we need to know what constitutes a valid path and a solved maze, but for language/code rules like that are hard to formulate.
Fourth, this doesn't admit of an easy way to use "fuzzy reasoning" that would be required for integration with any kind of human language or image-based system, where continuous vectors are useful (the graph edges and colors are on/off or discrete).
There are ways to adapt, but this approach fits pretty solidly in the "deterministic, fixed problem size" realm.
In addition, for training you need correct solutions and counter-examples (strongly labeled). For something like "fuzzy logic" training or "natural language" coming up with clear examples and counter-examples would be challenging to fit into this model. LLMs are only possible by leveraging vast quantities of unlabeled data. Not saying impossible, but challenging. For example, if training on human code, what constitutes a counter-example? You basically already have to have a method of getting correct and sufficiently incorrect code just to train this type of system, and its unclear how to represent those changes.
For all of these problems, given the constraints and amount of bespoke logic required, solving with dynamic programming is far faster (including arbitrary graph coloring problems). I only say this to mean that if we could solve all the problems I mentioned above and get arbitrary reasoning into the form of graph coloring, it would still probably be more efficient just to solve that with good old dynamic programming / recursion than with a model like this that needs O(N^2) params versus the graph and needs millions of training examples for different domains. They brag about solving sudoku, but a CPU-based approach to solving it the good old fashioned way on is probably 10-100x faster. If we were using an H200 like they did, we could easily solve the whole sudoku dataset in less than a second.
But it _is_ a very interesting approach, partly because the energy strategy encodes good / likely guesses, so that is kind of interesting vs dynamic programming which is kind of a brute-force approach, so maybe for very large spaces it would be more efficient (but then you have the issue of the parameter space blowing up).
plaguuuuuu 5 hours ago
I'd love to wire it into a model and do some training. Can't see any way to obtain it though.
program_whiz 5 hours ago
Yeah any method I'm thinking is better solved another way. If you need continuous graphs, then this devolves into GNN or transformers. If you truly have discrete graphs, just use standard programming? I dunno, maybe this energy approach is better on some problems (more efficient), but getting training examples where you automatically extract the graph representation, and the energy rules seems like a big leap. If you already have the energy rules in code, then the "just program it" approach is stronger. I left a comment above with an example how to sample this just using ordinary code that would be a lot more efficient imo (but keeps the random weighted search), and is probably better than brute force.
thesnarkitecht 5 hours ago
Anyone want to explain how these models work? And can you actually run them on any hardware?
vessenes 5 hours ago
Well their Sudoku model is 1.8 million parameters, so yes. You could run it on your toothbrush. I like the idea of a Sudoku-cheating toothbrush, or maybe vape, actually, you could be that guy at the cafe.
scurnus 6 hours ago
This is basic and similar to recurrent reasoning papers, it works only on sudoku and basic games, with constrained rules, unique or low number of solutions. It would be interesting to see how these reasoners do in games like Chess or Go. Efficient inference is useful when it comes with something useful.
crab2 3 hours ago
"Autoregressive Language Models are Secretly Energy-Based Models"
saithound 8 hours ago
385x? Them's rookie numbers. Classical energies learn to reason 1000x faster than looped models. [1] Of course, all for a very generous definition of reasoning, that has almost nothing in common with the thing most people associate with the term nowadays. [2]
[1] https://arxiv.org/abs/2611.17309
[2] https://developers.openai.com/api/docs/guides/reasoning?api-...
yorwba 7 hours ago
The common definition of "reasoning" for all three is "performing a sequence of intermediate steps with multiple passes through the model before outputting an answer." The main difference is that the reasoning models in TFA and [1] are puzzle-solving models, not language models.
saithound 6 hours ago
Well, yes, that's the very generous definition of reasoning I was referring to, under which almost any iterative computation could count as reasoning.
ricardobeat 8 hours ago
Did those two papers get published six days apart?
cobychapple 5 hours ago
title says 385x and the page says 345x, I guess the compression is lossy?
netbioserror 6 hours ago
The more abstractly reasoning can be modeled, the better. It means knowledge can be externalized to discrete knowledge bases and queried when needed, and models can be run locally with lower and lower energy hardware.
The question is, how integral to reasoning is compressing vast quantities of knowledge to the latent space?