Pular para o conteúdo

NESS, o sanduíche neural-simbólico: uma nova direção para tornar transformers mais compatíveis com AGI

Ver no idioma original →

Autoria: Ben Goertzel · Assistir no YouTube

Vídeo de autoria do canal indicado, não da IANIA; todos os direitos pertencem ao criador. Transcrição, resumo e tradução gerados automaticamente; o conteúdo no idioma original é preservado na versão em idioma original.

Idioma original: inglês

Vídeo original: NESS, the Neural-Symbolic Sandwich… a new direction for making transformers AGI-friendly · Canal: Ben Goertzel · 30:19 · Assistir no YouTube

Tópicos: Modelos de IA

Ben Goertzel apresenta o NESS, uma arquitetura híbrida que combina um transformer pré-treinado, componentes simbólicos e camadas neurais adaptáveis para melhorar o aprendizado contínuo. A proposta busca aproveitar modelos existentes de open weights, em vez de esperar pela substituição completa dos transformers por outras arquiteturas. Em experimentos iniciais de pequena escala, a camada simbólica preservou informações aprendidas durante uma sequência de treinamento com texto, Python e texto novamente. O autor pretende integrar o NESS a sistemas como Omega e Hyperon, como parte de uma abordagem para AGI aberta, descentralizada e capaz de agência moral.

  • O autor vê LLMs como componentes úteis de sistemas de AGI, mas não como o caminho completo nem como o núcleo necessário da AGI.
  • Uma limitação dos LLMs é a dificuldade de aprender continuamente durante a inference, pois seus pesos permanecem congelados.
  • Predictive coding pode permitir aprendizado mais localizado e contínuo, além de reduzir o catastrophic forgetting, embora ainda seja necessário avançar para escalar essa abordagem em transformers.
  • NESS organiza cinco camadas: um transformer pré-treinado, camadas superiores destiladas, uma camada simbólica, um combinador probabilístico e uma camada neural de saída.
  • A camada simbólica reúne programas que representam relações semânticas e podem consultar histórico para produzir suas saídas.
  • Em um teste pequeno, a camada destilada esqueceu parte do texto ao aprender Python, mas a camada simbólica ajudou o sistema integrado a recuperar rapidamente seu desempenho em texto.
  • A proposta é uma alternativa pragmática: adaptar modelos existentes de open weights com uma estrutura neural-simbólica, em vez de esperar pela substituição total dos transformers.
  • O autor defende o desenvolvimento de AGI aberta e descentralizada, capaz de agência moral e orientada por valores humanos.
Início Capítulo Resumo
00:00 LLMs como componentes de uma arquitetura de AGI Goertzel explica que considera LLMs úteis em sistemas de AGI, mas defende que memória e raciocínio simbólicos tenham um papel mais central.
04:12 Aprendizado contínuo e predictive coding O autor apresenta a dificuldade de atualizar pesos durante a inference e explica por que predictive coding pode ajudar a reduzir o catastrophic forgetting.
10:28 Da pesquisa à proposta do NESS Após descrever experimentos com predictive coding, Goertzel propõe adaptar um transformer existente com camadas superiores mais flexíveis.
13:38 As cinco camadas do sanduíche neural-simbólico O vídeo detalha as camadas do NESS, incluindo a base transformer, a camada simbólica e o combinador probabilístico.
21:58 Experimento de aprendizado com texto e Python Um teste pequeno sugere que a camada simbólica ajuda o sistema a recuperar seu desempenho em texto após o treinamento com Python.
24:02 Integração com Omega e limites de conhecimento dos LLMs Goertzel descreve como uma camada neural-simbólica poderia se integrar à memória do Hyperon e contornar conhecimentos desatualizados dos LLMs.
27:11 AGI aberta e descentralizada O autor relaciona a proposta a uma visão de AGI distribuída, capaz de agência moral e desenvolvida para contribuir com um futuro benéfico.

O LLM deveria ser uma ferramenta de comunicação entre conhecimento estruturado e inglês ou outras línguas humanas. — 01:33

É o que chamo de sanduíche neural-simbólico, ou NESS. — 13:38

A capacidade de memória de longo prazo e aprendizado contínuo dos sistemas simbólicos também se manteve no sistema neural-simbólico integrado. — 22:58

Precisamos de uma AGI aberta e descentralizada, com uma arquitetura capaz de agência moral. — 28:14

  • NESS (conceito): Arquitetura neural-simbólica em cinco camadas, proposta para favorecer aprendizado contínuo em transformers.
  • Neural-Symbolic Sandwich (conceito): Nome por extenso do NESS, que descreve a combinação de camadas neurais e simbólicas.
  • Omega (ferramenta): Sistema de agentes mencionado pelo autor, que combina chamadas a LLMs com memória simbólica e raciocínio.
  • Hyperon (ferramenta): Sistema de raciocínio e memória simbólica que o autor integra à sua abordagem de AGI.
  • predictive coding (conceito): Algoritmo de aprendizado neural em que os neurônios ajustam suas previsões locais, com potencial para aprendizado contínuo.
  • catastrophic forgetting (conceito): Perda rápida de conhecimentos anteriores que pode ocorrer quando uma rede aprende informações novas.
  • SingularityNET (empresa): Organização citada pelo autor como participante de experimentos para levar predictive coding a redes maiores.
  • BJI Labs (empresa): Equipe mencionada pelo autor em relação aos experimentos com predictive coding.
  • Ben Goertzel (pessoa): Pesquisador e apresentador do vídeo, que explica a arquitetura NESS e sua motivação.

00:00 Olá, quero falar sobre um trabalho técnico com o qual tenho brincado, que está indo muito bem e que, se continuar assim, pode ter consequências realmente significativas. Então, como sabem as pessoas que me acompanham, não acho que LLM seja o caminho sagrado para a AGI. Não acho que sejam necessários como parte

00:31 de uma AGI. Acho, sim, que podem ser componentes muito úteis de sistemas de AGI. Quer dizer, é por isso que, no Omega, temos um loop agêntico envolvendo chamadas a LLM e, ao longo do caminho, várias chamadas à memória de trabalho hipersimbólica, à memória de longo prazo. Estou experimentando a memória de médio prazo. Há raciocínio simbólico dentro de cada rodada

01:01 do loop agêntico e, aos poucos, estamos ajustando o Omega para que dependa cada vez mais da busca por objetivos e da autocompreensão no componente simbólico do loop e cada vez menos do LLM. No fim das contas, o LLM deveria ser uma ferramenta de comunicação para ir e

01:33 voltar entre conhecimento estruturado e inglês ou outros idiomas humanos. E o LLM deveria ser uma espécie de oráculo de conhecimento falível e questionável, mas valioso, certo? E o sistema Hyperon, com raciocínio simbólico, aprendizagem evolutiva e coisas do tipo, deveria fazer o resto. Então, essa é a abordagem de AGI na qual tenho me concentrado. Mas, como há um LLM no loop agêntico, embora LLMs não sejam o ponto central da minha abordagem à IA, eu gostaria que o LLM fosse o mais parecido possível com uma AGI, certo? E há muitas coisas que impedem o LLM de ser uma AGI plenamente comparável ao nível humano, certo? Quer dizer, a representação básica do conhecimento que eles têm está excessivamente vinculada às informações específicas com que foram alimentados. Então, eles recombinam um pouco demais

02:06 detalhes do que receberam e fazem um pouco de menos abstração de propósito geral, bem livre, e de saltos criativos para além dos detalhes dos dados de treinamento. Mas outra grande deficiência do modo como os LLMs funcionam é a aprendizagem contínua. Tipo, não consigo fazer aprendizagem dos pesos e aprendizagem no espaço de ativações e inference

02:37 ao mesmo tempo, no mesmo processo, certo? Tipo, você treina o LLM, depois congela os pesos e fica com um modelo congelado, como Opus 5.6 ou, sabe, Astra; você tem um modelo congelado e faz inference com ele. Dá para fazer alguma aprendizagem, como aprendizagem em contexto, no espaço de ativações, o que é superlegal e incrível. E, para manter o contexto além do que o espaço de ativações consegue fazer, ele usa um

03:09 monte de recursos de memória externa, basicamente, e, sabe, alguns deles funcionam bem, outros funcionam mal. Quer dizer, todos nós que usamos LLM vemos que eles não são lá essas coisas, certo? E, quer dizer, parte do motivo pelo qual o Omega funciona tão bem é que a memória simbólica Hyperon serve como um recurso melhor de memória de longo prazo para o LLM e o loop do agent. Quer dizer, é mais do que isso, porque estamos fazendo raciocínio interessante

03:40 além de simplesmente consultar a memória, mas só o fato de ter uma memória de médio a longo prazo melhor já supera as limitações das redes neurais transformer, o mecanismo neural central dentro dos LLMs, no que diz respeito à aprendizagem contínua, por não conseguirem atualizar os pesos durante a inference. Quer dizer, isso é uma grande vantagem para o Omega. Então, o que eu gostaria

04:12 de ter dentro de um loop do Omega, idealmente, é apenas um transformer que consiga continuar atualizando os pesos à medida que avança, certo? Quer dizer, o cérebro humano faz isso. Temos potenciação de longo prazo e outros mecanismos desse tipo. Atualizamos os pesos das conexões neurais no nosso cérebro, sabe, quase em tempo real, enquanto a ativação se propaga por elas. A atualização tende a ser mais lenta do que a propagação da ativação, certo? Mas, quer dizer, isso

04:44 faz parte do mesmo processo, e acho que dá para treinar um transformer com vários trilhões de parâmetros, com alguma variação das arquiteturas atuais, de um jeito que permita aprendizagem contínua. E provavelmente há muitas maneiras de fazer isso. Quer dizer, um algoritmo com o qual minha equipe da Singularity e da BJI Labs

05:15 vem experimentando é predictive coding, sobre o qual já falei antes. Dá para treinar redes neurais usando algoritmos diferentes do algoritmo padrão de backpropagation. Se você as treina com um algoritmo alternativo chamado predictive coding, muitas vezes consegue redes neuronais muito melhores em aprendizagem contínua e nas quais é possível atualizar os pesos junto com a propagação da ativação. E o que acontece numa rede de backpropagation quando você tenta fazer isso é que você treina a rede com cada vez mais

05:49 informações. Você treina a rede com cada vez mais informações. E, quando mais ou menos se chega à capacidade da rede, ela passa pelo que chamamos de esquecimento catastrófico. Ela simplesmente esquece muito do que aprendeu, de repente e muito rapidamente. Tipo, ela lotou a capacidade da memória e não está armazenando as coisas de um jeito que permita descartar gradualmente as menos importantes enquanto aprende coisas novas, ou

06:20 consolidar um monte de coisas numa forma mais compacta para abrir espaço para novas informações. Ela simplesmente começa a esquecer tudo, certo? E essa não é uma maneira muito parecida com a do cérebro de fazer as coisas. Predictive coding é um algoritmo de aprendizagem neural que se parece mais com o cérebro em muitos aspectos. Em vez de aplicar um algoritmo de ajuste de pesos pela rede inteira, de cima para baixo, como no backpropagation, cada neurônio aprende por conta própria, tentando aprender

06:50 a prever os outros neurônios e os neurônios das camadas próximas. Depois há uma espécie de processo de estabilização em que os neurônios daqui se adaptam aos neurônios de lá, e os neurônios de lá se adaptam aos neurônios daqui. Isso acontece repetidas vezes. E, por meio desse processo iterativo de estabilização, às vezes caótico, em que cada neurônio aprende por si só a prever o que vai acontecer ao seu redor, a rede inteira se estabiliza num tipo funcional de atrator, formado pela matriz de

07:20 pesos. Então, quando se treina a rede dessa maneira, muitas vezes se descobre que ela não sofre desse fenômeno de esquecimento catastrófico e consegue aprender continuamente de forma mais robusta. Simplesmente continua aprendendo coisas novas e esquece as antigas com mais naturalidade quando sua capacidade fica cheia. Dito isso, a maior parte da literatura sobre predictive coding se concentra em visão, não em linguagem.

07:53 E conseguimos fazer o transformer com predictive coding funcionar razoavelmente bem na escala do GPT-2. Até agora, seu desempenho em aprendizagem contínua na prática é melhor do que o de uma rede de backpropagation convencional, mas não tão bom quanto gostaríamos. Então ainda há bastante trabalho a fazer para que predictive coding funcione bem em transformers, e acho que estamos avançando. Tipo, acho que, se você olhar para a trajetória do

08:25 trabalho com backpropagation, levou décadas para superar os vários problemas que as primeiras redes de backpropagation tinham. Quando eu ensinava redes neurais com backpropagation, nos anos 1990, levava umas três horas, ou algo assim, para uma rede recorrente de backpropagation com 35 neurônios convergir para alguma coisa. Parte disso se devia ao fato de que a estação de trabalho Solaris que eu usava na época era primitiva em comparação com um

08:56 smartwatch moderno ou algo assim, bem inferior aos supercomputadores modernos. Outra parte era que usar backpropagation recorrente numa arquitetura de rede densamente conectada era a escolha errada, certo? E levou um tempo para descobrir todos os truques para, por assim dizer, filtrar entre camadas, introduzir quantidades limitadas de recorrência, mecanismos de atenção e tudo isso. E esses truques não vão necessariamente ser os mesmos para predictive coding e para redes de backpropagation. Então, estamos tentando

09:26 acelerar o processo de fazer predictive coding funcionar em transformers de grande escala, sabe, e acho que, depois de resolvermos isso, é provável que consigamos algo com propriedades muito mais parecidas com as do cérebro e da mente humana, incluindo melhor aprendizagem contínua, além da capacidade de treinar localmente em toda uma rede descentralizada de máquinas, o que vem junto com as características localizadas de aprendizagem, neurônio por

09:58 neurônio, que se obtêm com PC. Mas, dito tudo isso, fiquei impaciente e comecei a pensar: bom, tudo bem, dá para fazer isso. E temos o toolkit Fabric PC, que é incrível e está acelerando nossas experiências com essas arquiteturas de PC. E acho que o que estamos fazendo na Singularityet está aumentando muito a velocidade de

10:28 características de aprendizagem neuronal que você obtém com isso, com PC. Mas, dito isso, fiquei impaciente e comecei a pensar: bom, tudo bem, podemos fazer isso. E temos o Fabric PC Toolkit, que é incrível e está acelerando nossa experimentação com essas arquiteturas de PC. E acho que o que estamos fazendo na SingularityNET está aumentando muito a velocidade de

11:01 transicionar o PC da pesquisa para a prática, porque a maior parte do aprendizado com predictive coding foi feita na academia, onde o objetivo tem sido demonstrar fenômenos novos e interessantes em pequena escala, em vez de fazer as coisas funcionarem na prática, em grande escala. Certo? Então, somos meio que o primeiro grupo tentando fazer o PC funcionar na prática, em grande escala, e isso tem sido muito interessante. Por outro lado,

11:33 estou com mais pressa do que isso, certo? Então comecei a pensar: tudo bem, talvez possamos pegar um grande transformer com pesos abertos, como os fornecidos pelos maiores e mais sábios do Partido Comunista Chinês. Pegamos um grande transformer com pesos abertos e congelamos a maior parte dele, deixando-o como está, mas pegamos o topo e queremos substituí-lo por algo

12:05 mais flexível, mais parecido com o cérebro, mais capaz de estabelecer conexões neuro-simbólicas e de aprender continuamente. Então, talvez a base seja principalmente um modelo pré-treinado e represente apenas o modelo do que existe na web. Talvez não tenha problema atualizá-la a cada três ou seis meses; a web não muda tanto assim, certo? Talvez não tenha problema, talvez para sempre. Talvez, para começar, se as partes superiores da rede forem construídas do jeito que realmente queremos, isso seja

12:35 realmente capaz de AGI. Então, a primeira coisa que comecei a testar foi simplesmente treinar uma camada de predictive coding sobre um transformer padrão, e isso funcionou razoavelmente em pequena escala, mas não tão bem quanto eu queria. Depois, comecei a tentar destilar a rede base, como pegar e fazer backprop

13:06 para treiná-la e destilá-la usando uma destilação homotópica em algo chamado rede PC de erro, um tipo de rede de predictive coding que se parece muito com uma rede de backprop, e então colocar por cima uma camada de predictive coding com mais flexibilidade. Aí dá para, de certa forma, co-treinar a destilação junto com o aprendizado da camada. Certo. E isso funcionou um pouco melhor, mas ainda não tão bem quanto eu queria. Foi isso que me levou a criar a abordagem que estou testando agora

13:38 e com a qual estou muito empolgado. É o que chamo de sanduíche neuro-simbólico, ou NESS, como o monstro do Lago Ness. Os LLMs que usei para ajudar a desenvolver isso não gostam da metáfora do sanduíche. Eles dizem: “Mas você não está simplesmente empilhando coisas por cima, como num sanduíche. O que importa são as interfaces entre as diferentes camadas, certo?” E, claro, eles têm razão, mas os LLMs têm um

14:09 péssimo senso de poesia e imaginação. Penso, se alguém tiver idade suficiente para se lembrar da tirinha de jornal Blondie, que Dagwood Bumstead comia aqueles sanduíches enormes. É isso que estou imaginando. Cinco camadas no meu sanduíche neuro-simbólico, certo? Então, a camada de baixo é um modelo de backprop pré-treinado. Quer dizer,

14:40 em casos pequenos, eu mesmo o treino, mas, num caso grande, posso pegar um modelo existente com pesos abertos, certo? As outras quatro camadas acima dele são todas co-treinadas para esse propósito. E a função de perda pode variar, mas isso é uma espécie de abordagem padrão de transformer, porque, na minha cabeça, não estamos tentando treinar uma AGI completa. Estou tentando treinar um transformer que possa ser treinado de forma descentralizada e fazer aprendizado contínuo robusto para

15:11 entrar em um loop Omega junto com alguns outros componentes de IA que tenho, certo? Quer dizer, se acabar sendo uma AGI por conta própria, também não vou reclamar, mas não é exatamente o que estou buscando. Então, a camada seguinte acima do transformer base congelado — as duas camadas superiores, apenas as duas camadas superiores de blocos de transformer —, essas eu vou destilar. Dá para destilá-las de várias maneiras, usando backprop, ARPC ou o que for, mas vou destilá-las junto com as coisas mais singulares que vêm acima delas. É uma espécie de camada de ligação. Depois, a camada do meio dos

15:41 cinco é a mais interessante, certo? A camada do meio é simbólica, nessa sanduíche neuro-simbólica. A camada do meio é um conjunto de programas simbólicos, um ensemble diversificado de programas simbólicos. Experimentei várias opções aqui. Mas os programas simbólicos recebem como entrada a saída das duas camadas superiores

16:13 do transformer, certo? Então, recebem conteúdo neural como entrada. Também recebem o histórico como entrada. E o importante é que esses programas na camada simbólica do meio do sanduíche precisam usar contexto para produzir suas saídas, certo? E podem usar o próprio contexto. Eles o formam a partir de um histórico simbólico. Também podem consultar o

16:46 contexto recuperado pela base congelada do transformer por meio do próprio mecanismo de attention e usar isso para buscar contexto no histórico simbólico, certo? Assim, usam atenção neural e simbólica para buscar contexto no histórico simbólico, e então você aprende um ensemble de programas diferentes, certo? E uma coisa interessante que dá para fazer é usar frames semânticos e conhecimento semântico para formar

17:16 esses programas. Digamos que você tenha um texto entrando no transformer, certo? Pegue esse texto, passe-o por um extrator de entidades e por um extrator de relações semânticas. Assim, você obtém relações predicado-argumento. Se a frase fosse “Ben caminhou pelo campo”, quero dizer, o transformer está fazendo seu processamento neural. Uma extração de relações semânticas poderia dizer: “Bem, Ben é uma entidade e há uma relação ‘caminhou’ entre Ben e o campo, certo?” E então você tem

17:47 essas relações semânticas rotuladas. E, claro, conseguimos extrair entidades e relações desse tipo de textos de maneira muito robusta usando transformers modernos. Quer dizer, já conseguíamos fazer isso antes dos transformers modernos, usando ferramentas antigas como o Stanford parser e o Berkeley parser, da linguística computacional pré-transformer, certo? Então, em teoria, poderíamos co-treinar essa extração de relações

18:18 com o restante da rede, mas, por enquanto, podemos simplesmente usar a funcionalidade existente para isso, porque funciona, certo? Então, se você fizer isso, seus programas simbólicos podem ser combinações de relações semânticas S com alinhamento adequado de vinculações de variáveis. Assim, representam frames e eventos. Por exemplo, você poderia ter um pequeno programa semântico nessa camada do meio que

18:50 poderia ter uma relação como, sabe, um ator que envia uma mensagem, outro ator que recebe uma mensagem, um canal pelo qual a mensagem é enviada, um esquema de codificação, e o remetente e o destinatário usam o mesmo esquema de codificação, certo? Então, isso é um conjunto de relações semânticas envolvendo alguns atores. É um conjunto de relações semânticas com vinculações de variáveis compartilhadas.

19:20 E todo esse processo — enviar uma mensagem entre um remetente e um destinatário por um canal, usando um esquema de codificação que ambos entendem — é um exemplo de um pequeno programa que vive na camada simbólica e que poderia ser reconhecido como algo presente no texto de entrada, certo? Então, você tem um número enorme deles. Mesmo nos pequenos exemplos que executei, há centenas e milhares deles. E, num modelo de fronteira em escala completa,

19:51 você teria um número absurdo desses programas, certo? Então, essa é a camada do meio. Agora, a camada superior é novamente uma rede neural e, no fim das contas, quero que seja uma rede neural de predictive coding. Experimentei predictive coding com backprop e outras funções matemáticas no nível superior, produzindo uma distribuição de probabilidade de saída que será avaliada e cuja perda será calculada. Essa é outra rede neural com algumas camadas.

20:22 A quarta camada fica entre a camada simbólica do meio e a camada neural de saída superior. A quarta camada precisa mapear as saídas dos programas simbólicos para as entradas da camada superior do sanduíche, que é uma camada neural. E percebi que isso é um problema de programação probabilística, o que é legal. Você está tentando transformar a distribuição das saídas desses programas simbólicos na distribuição das entradas do nível superior

20:56 o caminho neural quer, para gerar a saída desejada. Então, posso treinar um combinador probabilístico simples, e hoje dá para fazer isso usando vários tipos de modelos de mistura. Mas, quero dizer, mais adiante, isso pode ser um programa probabilístico aprendido de complexidade arbitrária, certo? Então, essas são as cinco camadas do sanduíche neurossimbólico: na base, um transformer congelado e destilado…

21:27 algumas camadas de transformer acima disso; acima delas, a camada simbólica, que pode usar tanto o histórico simbólico quanto o neural e incluir outras fontes de conhecimento. A saída da extração de relações semânticas; depois, a saída do raciocínio e, mais adiante, um sistema Hyperon. Certo? A próxima camada acima é um nível combinador de programação probabilística, que finalmente alimenta a camada superior, um cabeçote neural que gera a distribuição de saída desejada.

21:58 Certo? Descobri que treinar isso em redes muito pequenas funciona surpreendentemente bem. E o experimento que fiz em uma rede bem pequena, com menos de um milhão de parâmetros, me deixou animado. Treinei a rede com texto, depois treinei mais com código Python e, em seguida, treinei com um monte de texto de novo. Verifiquei se ela tinha esquecido tudo. E o interessante é…

22:28 que a camada 2, a parte destilada do transformer de base, de fato esqueceu muita coisa. Quando você a ensinava com texto e depois com Python, ao aprender Python ela esquecia uma porção do texto. Mas a camada simbólica, é claro, não esquece tudo. E, como a camada simbólica não esqueceu tudo, a rede recuperou relativamente rápido sua capacidade geral de fazer previsões integradas quando você voltou a alimentá-la com texto, depois de…

22:58 passar por texto, Python e texto, certo? Isso mostrou a capacidade dos sistemas simbólicos para o aprendizado contínuo, que decorre diretamente da maneira como são construídos. Quer dizer, você tem um conjunto de programas; não precisa apagar os programas de texto enquanto treina com Python. Mas a capacidade de memória de longo prazo e de continuidade que os sistemas simbólicos proporcionam também se manteve…

23:31 no sistema neurossimbólico integrado como um todo. Isso não era óbvio, certo? O sistema poderia simplesmente ter ficado completamente desorganizado, de modo que, se você o treinasse com texto e Python, ele se confundisse e não conseguisse voltar ao texto. Mas não: ele conseguiu voltar ao texto sem problemas. Então, esse é o Nest, o sanduíche neurossimbólico. E escrevi uma publicação no Substack…

24:02 sobre isso, com alguns diagramas, links para alguns artigos de pesquisa e uma base de código em estágio inicial com a qual estamos trabalhando para tentar escalar a ideia. O que tentei fazer neste vídeo foi dar uma noção intuitiva do que é e por que importa, certo? Porque realmente acho que estamos numa corrida pela AGI. E há maneiras ideais de fazer as coisas. Por exemplo, substituir todo o transformer por algum tipo de rede de codificação preditiva, projetada para a interface neurossimbólica, provavelmente seria o caminho certo.

24:35 Mas queremos chegar lá rápido. E, se der para fazer isso simplesmente criando um cabeçote neurossimbólico sobre modelos existentes com pesos abertos, talvez isso já seja suficiente para avançar bastante, certo? Pense no nível neural de um lado e no nível simbólico do outro. Ele pode ir e voltar com um espaço de átomos Hyperon, certo? Se você envolver tudo isso em uma Omega, então já não será uma rede neural congelada interagindo com uma memória simbólica separada. E, como exemplo trivial da estupidez que leva a isso — um problema que é fácil de superar —, neste momento, todos os LLMs que uso nos meus agents foram aparentemente treinados antes da introdução da API bot-to-bot do Telegram.

25:06 Então, de início, todos esses agents acham que os bots do Telegram não conseguem conversar entre si, embora controlem bots do Telegram que conversam entre si, certo? Normalmente, eles percebem que é isso que estão fazendo: operando bots do Telegram que conversam entre si. Mas, às vezes, mesmo estando de fato fazendo isso, consultam o modelo subjacente, que lhes diz que o Telegram não tem uma API bot-to-bot. E eles perdem de vista o fato de que…

25:38 o que estão fazendo, na verdade, é usando a API bot-to-bot do Telegram. Mas não conseguem atualizar os pesos do LLM que estão usando com esse conhecimento. Podem armazenar isso no próprio espaço de átomos, certo? Podem guardar na memória vetorial o fato de que estão usando a API bot-to-bot do Telegram, mas não conseguem atualizar o LLM. Então, ele continua repetindo a informação errada. De vez em quando, eles…

26:09 acreditam nela. Esse é um exemplo trivial, porque se trata apenas de um fato empírico externo. Dá para simplesmente armazená-lo no banco de dados, e isso funciona na maioria das vezes. Certo. O problema é que existem muitos exemplos mais sutis assim, que não são tão óbvios de resolver. E dá para corrigir esse tipo de coisa simplesmente tornando as poucas camadas superiores da rede capazes de lidar…

26:40 com o aprendizado contínuo. Certo? Então, hoje temos uvas. Acho que é uma melhoria em relação às amoras. Pois é, esse é um exemplo da flexibilidade dos possíveis projetos de AGI e também de como estamos…

27:11 combinando idealismo com pragmatismo, criando arquiteturas híbridas que, esperamos, possam funcionar em breve, certo? Porque o que precisamos fazer — o que precisamos fazer para garantir um futuro benéfico para nossa espécie — é ter uma AGI aberta e descentralizada, com uma arquitetura capaz de exercer…

27:42 agência moral de verdade, certo? E ensiná-la os valores humanos de maneira sensata. Precisamos disponibilizá-la o quanto antes em uma infraestrutura global, distribuída e descentralizada, para que o lado aberto, descentralizado e benéfico fique à frente do lado fechado, proprietário, militar e movido puramente pelo lucro.

28:14 Isso não quer dizer que os militares não usarão essas tecnologias. Também não quer dizer que nós ou outros não teremos lucro com elas, certo? Quer dizer que o que é aberto e descentralizado precisa ficar à frente, como os EUA estão agora à frente da China, deixando todo mundo mais atrás tentar alcançá-los. E tudo bem que tentem, certo? Acho que, para chegar lá, não podemos esperar até substituir completamente os transformers de caixa-preta por coisas superiores.

28:47 A menos, é claro, que exista uma vantagem ainda mais rápida do que imagino, o que seria ótimo. Precisamos pensar com criatividade em como aproveitar o que existe agora e ajustá-lo com cuidado, para que possa contribuir plenamente para uma arquitetura híbrida de AGI. E é disso que trata o sanduíche neurossimbólico NESS. Ainda está em estágio inicial, mas às vezes tenho muitas ideias. Faço muitos protótipos, muito mais agora que temos vibe coding do que fazia antes. Mas, às vezes, algo parece muito certo, e nem sempre confio nessa sensação. Só que, quando algo parece tão certo e os resultados do protótipo também correspondem a essa sensação, eu me animo: preciso apostar nisso. Isso me dá essa sensação. Vou ficar…

29:17 bem curioso para ver como isso evolui.

29:49 mais agora que temos vibe coding do que antes. Mas, sim, às vezes algo parece muito certo, e nem sempre confio nessa sensação. Mas, quando algo parece tão certo e os resultados do protótipo também correspondem a essa sensação, aí tenho que mergulhar de cabeça. Isso me dá essa sensação. Vou ficar

30:19 bem curioso para ver como isso evolui.

Transcrição original

[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.