NESS, the Neural-Symbolic Sandwich... a new direction for making transformers AGI-friendly
Read the Portuguese translation →
Author: Ben Goertzel · Watch on YouTube
Video authored by the channel shown, not by IANIA; all rights belong to the creator. Transcript and summary generated automatically; the original-language content is preserved.
Original language: English
Original video: NESS, the Neural-Symbolic Sandwich… a new direction for making transformers AGI-friendly · Channel: Ben Goertzel · 30:19 · Watch on YouTube
Topics: AI models
Summary
Section titled “Summary”Ben Goertzel argues that large language models are useful components of AGI but should not be its core, especially because they struggle with continual learning and can forget information. He describes predictive coding as a potentially more brain-like learning method, while noting that scaling it for transformers remains a work in progress. He then introduces NESS, the Neural-Symbolic Sandwich: a hybrid architecture that combines a mostly frozen transformer, distilled transformer layers, a symbolic-program layer, a probabilistic combiner, and a neural output layer. Early small-scale experiments suggest the symbolic layer can help preserve integrated performance after sequential training on text and Python. He presents NESS as a pragmatic route toward open, decentralized AGI while more fundamental neural architectures are still being developed.
Key points
Section titled “Key points”- Goertzel sees LLMs as valuable AGI components, particularly as interfaces between structured knowledge and human language, rather than as the foundation of AGI.
- A key limitation of current LLMs is that their weights are frozen during inference, making continual learning difficult and encouraging reliance on external memory.
- Predictive coding could enable more local, brain-like weight updates alongside activation, and may reduce catastrophic forgetting.
- The team is exploring predictive coding for transformers, but results so far are limited to small scales and need further improvement.
- NESS keeps a pretrained transformer as its base and adds four jointly trained layers, including distilled transformer layers and a symbolic layer.
- The symbolic layer contains programs built from semantic relations and shared variable bindings, and can draw on neural and symbolic history for context.
- A probabilistic combiner maps symbolic-program outputs into inputs for the neural output layer.
- In a small experiment involving text, Python, and then text again, the symbolic layer helped the overall system regain its integrated prediction ability.
- Goertzel argues that hybrid architectures could make existing open-weight models more adaptable without waiting for a complete transformer replacement.
- He frames open, decentralized AGI with moral agency as important for ensuring beneficial development keeps pace with closed and proprietary efforts.
Chapters
Section titled “Chapters”| Start | Chapter | Summary |
|---|---|---|
| 00:00 | LLMs as components of an AGI system | Goertzel explains why he sees LLMs as useful parts of an agentic architecture, with symbolic reasoning and memory taking on broader roles. |
| 02:06 | Continual learning and the limits of current LLMs | He describes frozen model weights, reliance on external memory, and the difficulty of learning continuously during inference. |
| 04:44 | Predictive coding as an alternative learning method | Goertzel introduces predictive coding and explains how its local learning process may support continual learning and avoid catastrophic forgetting. |
| 08:25 | Scaling predictive coding for transformers | He discusses early transformer experiments, the remaining technical challenges, and the time and architectural changes needed to scale the approach. |
| 11:33 | Introducing the Neural-Symbolic Sandwich | Rather than wait for predictive coding to scale, Goertzel proposes adding flexible, continually learning layers to an existing open-weight transformer. |
| 14:09 | The five layers of NESS | He lays out the architecture, from the frozen transformer base through distilled layers and symbolic programs to a probabilistic combiner and neural output layer. |
| 17:16 | Semantic relations as symbolic programs | Goertzel illustrates how entities, relations, and shared variable bindings can form symbolic programs that represent events and patterns. |
| 21:58 | Early experiments and continual learning | A small text-Python-text training experiment suggests the symbolic layer can help the system recover its integrated prediction ability after forgetting. |
| 24:02 | Practical motivation and open decentralized AGI | He connects NESS to Omega, gives an example of models repeating outdated information, and argues for pragmatic progress toward open, decentralized AGI. |
| 29:17 | A promising early prototype | Goertzel concludes that NESS is an early-stage idea whose initial prototype results make him eager to see how it develops. |
Quotes
Section titled “Quotes”the LLM ultimately should be a communication tool for going back and forth between structured knowledge and English or other human languages. — 01:01
then it experiences what we call catastrophic forgetting. — 06:20
It’s what I call the neural symbolic uh sandwich or nest nes like the lock ness monster. — 13:38
the symbolic layer of course doesn’t forget everything — 22:28
we need to think creatively about like how do you leverage what’s there now — 29:17
Concepts and entities
Section titled “Concepts and entities”NESS, Neural-Symbolic Sandwich, Omega, Hyperon, predictive coding, catastrophic forgetting, SingularityNET, BJI Labs, Ben Goertzel
Full transcript (original language)
Section titled “Full transcript (original language)”00:00 Hey, I want to talk about some uh technical work I’ve been playing with which is going quite well and if it continues to go well might have some actual significant consequence. So as those who follow me would know I don’t think LLM is the holy path to AGI. I don’t think they’re necessary as part
00:31 of an AGI. I do think they can be very useful components of AGI systems. I mean, which is why in Omega we have an agentic loop wrapping up LLM calls and along the way a bunch of uh calls into hyper on symbolic working memory. Long-term memory. I’m expering the medium-term memory. You have symbolic reasoning inside there in each goround
01:01 of the agentic loop and and uh we’re gradually tweaking omega to shift it more and more toward leveraging goal pursuit and self- understanding in the symbolic component of the loop and less and less relying on The LLM, the LLM ultimately should be a communication tool for going back and
01:33 forth between structured knowledge and English or other human languages. And uh the LLM should be a sort of lossy questionable but valuable knowledge oracle, right? And the hyperon system with symbolic reasoning, evolutionary learning and such should should do the rest. So that’s that’s the AGI approach that I’ve been focusing on. But since there is an LLM in there in the agentic loop, even
02:06 though LLMs are not the crux of my approach to AI, like I would like the LLM to be as AGIish as possible, right? And there’s many things stopping LLM from being fully human level AGIish, right? I mean, the basic representation of knowledge they have is overly tied to the specific information they’ve been fed. So, they’re doing a bit too much of recombining
02:37 details of what they’ve been fed and a bit too little of, you know, wild ass general purpose ab abstraction and creative leaps beyond the details of the training data. But the another major shortcoming of the way LLMs are working is continual learning. Like I can’t do weight learning and activation space learning and inference
03:09 uh in the same process at the same time, right? like you you train the LLM then you freeze the weights and you have a frozen model like Opus 5.6 six or you know Astra, you have a frozen model and you do inference with that. You can do some learning like in context learning the activation space which is super cool and amazing and then to maintain context beyond what the activation space will do. It uses a
03:40 bunch of external memory props basically and you know the external memory props some of them work well some of them work badly. I mean, we everyone who’s an LLM user sees they’re not great, right? And and uh I mean, part of why Omega works so nicely is the hyperon symbolic memory serves as a, you know, a better long-term memory prop for the LM and the agent loop. I mean, it’s more than that because we’re doing interesting
04:12 reasoning beyond just memory lookup, but just just having better medium to long-term memory to overcome the shortcomings that transform our neural nets, the core neural mechanism inside LLMs have in terms of continual learning due to not being able to update weights in the course of inference. I mean this is this is a major win for omega. So what what I would like
04:44 inside an omega loop ideally is just a transformer that can keep updating its weights as it goes along, right? I mean the human brain does. We have long-term potentiation and other such mechanisms. We update the weights on the neural connections in our brains, you know, in semi-real time as activation spreads around them. update tends to be slower than activation spreading, right? But but uh I mean it’s
05:15 a it’s wrapped up in the same process and I think one can train you know a multi- trillion parameter transformer with some variation of the current architectures in a way that will support continual learning. And there’s probably many ways to do that. I mean, one one algorithm my team at Singularity and BJI Labs has
05:49 been experimenting with is predictive coding, which I’ve talked about before. Like you can you can train neural nets using different algorithms than the standard back propagation algorithm. If you train them using an alternate algorithm called predictive coding, you can often get neuronal nets that are much better at continual learning and where you can update the weights together with the activation spreading. And what what happens in a back propagation network when you try to do this like you you train the network with more and more
06:20 information. you train the network with more and more information. And once once you sort of reach the capacity of the network, then it experiences what we call catastrophic forgetting. Like it just forgets a lot of what it learned all of a sudden very rapidly. like it it jammed up its memory capacity and it’s not storing things in a way that lets it sort of gracefully get rid of the less important things as it learns new things or like
06:50 consolidate a whole bunch of stuff into a more compact form so it can fit new information. It just starts whole self forgetting stuff, right? And that’s a not a very brain-like way of doing things. Predictive coding is a neural learning algorithm that’s more brain-like in many senses. Instead of kind of sweeping a weight adjustment algorithm through the whole network from top to bottom like backdrop, each neuron does its own learning trying to learn
07:20 how to predict the other neurons and nearby layers. And then there’s a sort of settling in process where neurons here, adapt to neurons there, neurons there, adapt to neurons here. It happens over and over again. And through this sometimes chaotic, you know, iterative settling in process of each neuron learning for itself how to predict what’s going to happen in its surroundings. Then the overall network settles into a functional sort of attractor comprised by the the weight
07:53 matrix. So when you train the network in this way, you often find it doesn’t suffer this catastrophic forgetting phenomenon and it can do more robust continue learning. Just keep on learning new stuff and more gracefully forget the old stuff if its capacity gets full. Now that said, most of the literature in creative coding has been on vision, not language.
08:25 And we have gotten the predictive coding transformer to work okay at the GPT2 scale. It’s continual learning performance and practice so far is better than a comfortable backrop network, but not as good as we would like. So there’s still a bunch of work to be done to get predictive cogn to work well on transformers and I I think it’s coming along. Like I think if you look at if you look at the trajectory of
08:56 backcrop work like it took decades to overcome the various issues that early backrop networks had. Like when I was teaching back prop neural nets in the ’9s, I mean it took like 3 hours or something to get a 35 neuron uh recurrent backdrop network to converge to something. Part of it is the Solaris workstation I was working on at the time was primitive compared to a
09:26 modern smartwatch or something little little in the modern supercomput. Part of it was that recurrent backdrop on a richly connected network architecture was the wrong thing to be doing, right? And it took a while to figure out all the tricks for kind of filtering between layers, introducing limited bumps of of recurrence and attention mechanisms and all this. And all these tricks aren’t necessarily going to be the same tricks for predictive coding as they are for backdrop networks. So we’re trying to
09:58 rush through the process of making predictive coding you know do large scale transformer stuff and I think once that’s worked through we are likely to get something with much more brain-like human mindlike properties including better continual learning along with the ability to train more locally on a whole decentralized network of machines which comes along with the localized sort of neuron by
10:28 neuron learning characteristics that you get with that with PC. But all that said, I got impatient and I started feeling like, well, okay, we can do that. And we have fabric PC toolkit, which is awesome, which is accelerating our experimentation with these PC architectures. And like we’re I think what we’re doing at Singularityet is greatly increasing the speed of
11:01 transitioning PC from research into into practice because mostly creative code learning has been done in academia where the goal has been to demonstrate interesting new phenomena at the small scale rather than being to get stuff to work at the large scale in practice. Right? So we’re we’re sort of the first group trying to make PC work at the large scale in practice and that’s being super interesting on the other hand
11:33 I’m in more of a hurry than that right and so what I started thinking is okay maybe we take a big open weights transformer such as the ones being provided by the you know the largest and wisdom of the Chinese Communist Party. We take we take a big open whites transformer and we then freeze most of it, leave it as it is, but take the top of it and we want to replace the top of it with something
12:05 more flexible, more brain-like, more neural symbolically linkable, more capable of continual learning. So maybe like maybe the base is mostly like pre-trained model and just represents the model of what’s on the web, you know, maybe it’s okay to refresh at every 3 or 6 months the web doesn’t change that often, right? Maybe maybe it’s okay maybe forever, maybe for starters if the top bits of the network are built in the way that we really want that’s
12:35 really AGI capable. So the the first thing I started playing with there was just training a predictive coating cap on top of a standard transformer and that worked okay at a at a small scale not as well as I wanted. I then started trying to sort of distill the base network like take take a back prop
13:06 train distill it using some homotopic distillation into what’s called an error PC network a kind of predictive coding network that looks a lot like a backrop network and then put a predictive coding cap with greater flexibility on top of that and you can kind of co-rain the distillation with learning of the cap All right. And that that worked a little better, but still uh still not as well as I wanted. So that’s what led me to come up with the approach that uh I’m playing with now
13:38 and which I’m very excited about. It’s what I call the neural symbolic uh sandwich or nest nes like the lock ness monster. And the LLMs I was using to help develop this don’t like the sandwich metaphor. They’re like, but you’re not just piling stuff on top like a sandwich. It’s all about the interfaces between the different layers, right? And of course, they’re they’re right, but the LLMs just have a
14:09 bad sense of poetry and and imagination. I think about uh if anyone else is old enough to remember the newspaper cartoon Blondie, uh Dagwood Bumstead had these huge sandwiches he would eat. So that’s what I’m envisioning envisioning. five layers in my neuros symbolic sandwich right so the the bottom layer is pre-trained backrop model just I mean
14:40 for small cases I train it myself but you can you can for a big case I’ll take an existing open weights model right then the other four layers on top of that are all co-rained for the purpose and what’s the loss function you can play with but this is sort of standard transformer stuff because we’re not in my mind not trying to train a full AGI. I’m trying to train a transformer that, you know, can be decentralized trained and do robust continual learning to
15:11 plunge into an Omega loop along with some other AI components I have, right? I mean, if if it turns out to be an AGI on its own, I won’t complain either, but it’s not really what I’m looking for. So the next layer up from the base frozen transformer the top couple layers just the top couple layers of uh transformer blocks those I will distill and you can distill them in various ways use back proper ARPC or whatever but I’ll distill them together with the more unique things that come above it’s sort of a bridging layer then the middle layer of
15:41 the five is the most interesting one right the the middle layer is [snorts] a symbolic layer and that middle layer in nest neural symbolic sandwich. The the middle layer is a bunch of symbolic programs, a diverse ensemble of symbolic programs. And I’ve experimented with a whole bunch of options here. But the symbolic programs they take as the output the output from the distilled top couple
16:13 layers of of the transformer, right? So they take they take neural stuff as input. They also take history as input. And an important thing is these programs in the middle symbolic layer of the sandwich like the the these programs they have to use context to give their outputs, right? And they can they can use their own context. They form from a symbolic history. They can also look at the the
16:46 context fished up by the frozen base of the transformer through its own attctionection attention mechanism and they can use that to grab context from the symbolic history. Right? So using neural and symbolic attention to grab context from symbolic history and then you learn an ensemble of different programs. Right? And one thing you can do that’s interesting is use semantic frames and semantic knowledge to form
17:16 these programs. So say you have text coming in to the transformer, right? Take that text, run it through an entity extractor, run it through a semantic relation extractor. So you get you get predate argument relationship. So if the sentence was like Ben walked through the field, I mean the the transformer is doing its neural stuff. a semantic relation extraction may say, “Well, Ben’s Ben’s an entity and there’s a walked relationship between Ben and the field, right?” And then you have
17:47 that you have these labeled semantic relationships there. And of course, we can very robustly get these kind of entities and relationship extracted from text using modern transformers. I mean we could do that even before modern transformer using old stuff like the Stanford parser and and Berkeley parser from pre-transformer computational linguistics right so in theory we could co-rain this and
18:18 relation extraction with the rest of the network but for now we can just use existing functionality for that because it it it works right so then then if you do that your symbolic programs can then be combinations of semantic relations s which have proper alignment of variable bindings. So they represent like frames and events. So you could have a little a little semantic program in this middle layer which which
18:50 oh it it could have a relationship like uh you know there’s one actor who sends a message there’s another actor that receives a message there’s a channel on which the message is sent there’s an encoding scheme and the sender and the receiver are both using the same encoding scheme. Right? So that’s a bundle of smack relations involving a couple actors. It’s a bundle of smack relationships with shared variable
19:20 bindings. And that that whole thing like sending a message between a sender and a receiver along a channel using a mutually understood encoding scheme like that that is an example of a little program that lives in the symbolic layer that could then be recognized as something coming through the the input text. Right? So you but you’ve got a huge number of these even at the small examples I’ve run you have hundreds and and and thousands of them and for a I mean a full scale frontier model you’d
19:51 have an insane number of these programs right so then that’s the middle layer now the top layer is a neural net again and ultimately I want to be a predictive coding neural net I’ve experimented with predictive coding back prop and other other sort of math functions at the top level giving an output probability distribution that will be ultimately judged and whose loss will be calculated. That’s uh that’s another neural net with a few layers.
20:22 The fourth layer in between the middle uh symbolic layer and the top neural output layer. The fourth layer has to map outputs of symbolic programs into inputs of the top layer of the sandwich which is a neural cap. And I realize that’s a probabistic programming problem which is cool. Like you’re you’re trying to transform the distribution of output of these symbolic programs into the distribution of input that the top level
20:56 neural path wants in order to give the desired output. So I can train a simple probabistic combiner and you can do that using a variety of uh mixture models now but I mean down the road that can be a sort of arbitrarily complex learned probabistic program right so that that’s uh that’s the five layers of the neural symbolic sandwich like frozen transformer on the bottom distilled
21:27 couple layers of transformer above above that symbolic layer above that which may use both symbolic and neural history and may include other knowledge sources. The output of semantic relation extraction now the output of reasoning and a hyperound system later. Right? Next layer up is a proistic programming combiner level that finally feeds stuff into the top level which is a neural cap that gives the the desired output
21:58 distribution. Right? I found training this on very small networks know it works interestingly well and the experiment I did on a really small network like less than a million parameters that got me excited is like I trained the network on text then I trained it more on Python code then I train it on a bunch of text again I check like did it forget everything well what’s interesting is
22:28 the layer 2 like the distilled uh part of the base transformer did forget a lot of stuff like when you taught it text and taught it Python you know when it learned the Python it forgot a bunch of the text but the symbolic layer of course doesn’t forget everything but then because the symbolic layer didn’t forget everything the network sort of got back its overall integrated prediction ability fairly quickly once you started feeding it text again after
22:58 going text python text right so that that’s a it showed that the ability of symbolic systems for continual learning which comes very directly out of the way they’re they’re built right like that I mean they you have a bunch of programs you don’t have to delete the programs for text just as you’re training with Python but the the ability at at long-term memory continue that symbolic systems give still carried
23:31 over to the whole integrated neural symbolic system which wasn’t obvious right like it could have just totally discombobulated the system so that if you trained the whole system with text and Python then it just got confused and couldn’t just segue back to text but no it it was able to to segue nicely back to text right so That’s Nest, the neural symbolic sandwich. And I’ve written a Substack
24:02 post on this with some diagrams and some links to some research papers and an early stage uh code base we’re working with to try to scale this up. What I’ve tried to do in this uh video is just sort of give an intuitive feel for the what and why, right? Because I I really feel We’re in an AGI race here, right? And uh there are optimal ways to do things and like replacing the whole transformer with some sort of predictive
24:35 coding network designed for neurosy symbolic interfacing is probably the right way to do things. But we want to get done quickly. And if you can do that just by making a neuros symbolic cap on existing open weights models that may get you far enough, right? Cuz think about like the neural level there, the symbolic level there rather. It can go back and forth with a hyperon atom space, right? Like if you have this whole thing wrapped in an omega, then it’s no longer like this
25:06 frozen neural net interacting with this separate symbolic memory. And I mean as a trivial example of the stupidity that leads to this example is easily overcome but I mean as a trivial example like at this moment all the LLMs I’m using in my agents were trained evidently before the telegram botbot API was introduced. So first pass all these
25:38 agents think it’s not possible for telegram bots to talk to each other even though they are controlling telegram bots which talk to each other right so usually they realize that is what they are doing that they are operating telegram bots that talk to each other but sometimes even though they are in fact doing it I mean they they they consult their underlying model and it tells them no telegram has no botbot API I and they lose track of the fact that
26:09 what they’re in fact doing is using telegrams botbot API but they they cannot update the weights of the LM they’re using with this knowledge like they can store in their own adenom space right they can store in their vector memory the fact that they are in fact using telegram’s botbot API but they can’t update the LM. So, it just keeps telling that wrong information over and over again. Every now and then they
26:40 believe it. Now, that’s that’s a trivial example because it’s just an empirical external fact. You can just store it in their database and it mostly works. All right. The thing is there’s loads and loads of subtler examples like that which aren’t so obvious to to iron out. And you can you can fix this sort of thing just by making the top couple layers of the network able to cope with
27:11 with continual learning. Right? So I mean that’s we got grapes today. Upgrade from blackberries I think. So yeah, that’s uh an example of you know the flexibility of possible AGI designs and also sort of a how we’re
27:42 mixing up idealism with pragmatism like in making hybrid architectures that hopefully can be made to work soon, right? Because I mean what we need what we need to do what we need to do to get a beneficial future for our species is have an open decentralized AGI with an architecture capable of actual
28:14 moral agency right and teach it human values in a sensible way. We need to roll this out on a globally distributed decentralized infrastructure as soon as possible so that the open decentralized beneficial side of things is in the lead ahead of the closed proprietary military purely profit driven
28:47 side of things. That’s not to say the military won’t use this stuff. It’s not to say we or others won’t make a profit with it, right? It’s saying that open and decentralized needs to be in the lead the way the US is now in the lead over China and let everyone else, you know, play catchup and and that that’s fine that they they will, right? And I think to get there, we can’t wait to totally replace backpack transformers with superior
29:17 things. I mean, unless there’s an advantage even faster than what I’m thinking, which would be great. Like, we need to think creatively about like how do you how do you leverage what’s there now and, you know, twink it judiciously so it can fully contribute to a hybrid AGI architecture? And that’s what the NES neurosymbolic sandwich is about. It’s early stage, but sometimes, you know, I have a lot of ideas. I make a lot of prototypes, a lot
29:49 more that now that we have vibe coding even than I did before. But yeah, sometimes something feels quite right and I don’t always trust that feeling. But then when something feels so right and then the prototype results also work in accordance with that feeling, I’m in uh I’ve got to jump on it. So this this this does give me that feeling. I’ll be
30:19 quite curious to see how it evolves.