Generative AI Agents as Automatically Designed Von Neumann Computer Systems

katoshi
Neo-Cybernetics
Published in
10 min readNov 19, 2023
Photo by Denis Pavlovic on Unsplash

I’ve recently started my journey to gain a deeper understanding at the macro-level of a system architecture perspective of conversational AI chatbots and generative AI agents based on large language models. These advanced systems have been shaking the world since last year, particularly in terms of their language processing capabilities.

When outputting text from an inputted sentence, a generative AI agent repeats the process of sequentially generating one word at a time. During this process, it continuously updates its internal state.

The behavior of this operation is analogous to a computer processing a program. Put simply, from a macro perspective, one can assert that the generative AI agent is a Von Neumann-type computer that sequentially processes its own unique program.

Unlike a regular computer, this unique program can be thought of as being automatically and black-box generated internally by the AI agent based on the inputted sentences. Additionally, this programming language, language processing system, and the automatic program generation process are believed to be automatically designed internally by the AI agents during its learning process.

By understanding it macroscopically as a collection of a Von Neumann computer and its peripheral systems, it is possible to deepen our understanding of the processes performed by the agent.

This article will elaborate on the approach described above in detail.

General Explanation of Generative AI Agents

When researching the technology of generative AI agents, explanations about the technology used during its learning and the concept of text output are commonly encountered.

Regarding learning, it appears that a technique is used to convert input data into an efficient internal representation using mechanisms called encoders and decoders. Moreover, based on the concept of attention, a technology that identifies the most important parts of a sentence in its context while learning has become a breakthrough technology in recent large language models.

Additionally, when the AI agents output a sentence, it is described as repeatedly guessing and outputting characters based on which characters are most likely to follow the given sentence, according to the learning results.

External Processing of AI Agents

Putting aside these detailed internal mechanisms and simply considering the external form macroscopically, the system works as follows:

Step 1: Analyze the inputted sentence internally to generate “Internal Information 1.”

Step 2: Use “Internal Information 1” and “Internal Information 2,” as well as “previously outputted sentences,” to output the next word. During this process, “Internal Information 2” is updated.

Step 3: Repeat Step 2 until the end condition is met.

Example of Processing

For example, if “Thank you” is inputted and “You are welcome” is outputted, the following process would have been performed:

Step 1:

Input “Thank you”

Update: “Internal Information 1 (Thank you)”

Step 2 (First Time):

Information: “Internal Information 1 (Thank you)” “Internal Information 2 (none)” “Previously outputted sentences = none”

Output: “You”

Update: “Internal Information 2 (You)”

Step 2 (Second Time):

Information: “Internal Information 1 (Thank you)” “Internal Information 2 (You)” “Previously outputted sentences = You”

Output: “are”

Update: “Internal Information 2 (You + are)”

Step 2 (Third Time):

Information: “Internal Information 1 (Thank you)” “Internal Information 2 (You + are)” “Previously outputted sentences = You are”

Output: “welcome”

Update: “Internal Information 2 (You + are + welcome)”

Von Neumann Computers and Generative AI Agents

Modeling in this way reveals that this process is actually equivalent to a Von Neumann-type computer, which is the model for computers processing programs today.

To briefly explain a Von Neumann computer, it is a machine that processes instructions written in a program one step at a time until the program ends. During this, it can hold data in internal memory and processes it while updating this data.

Therefore, structurally, it has a processing unit for handling programs and internal memory, along with input and output devices. The processing unit in an actual computer corresponds to the CPU or GPU.

In the case of generative agents, “Internal Information 1” corresponds to the program, and the part executing Step 2’s process acts as the processing unit. Normally, the program part remains unchanged while repeating the processing steps, so “Internal Information 1” fits perfectly in this aspect.

And the data equivalent to internal memory are “Internal Information 2” and “previously outputted sentences.” “Internal Information 2” is used like a vector, with the same memory area being updated, and “previously outputted sentences” is used like a list, with data being added to the end with each process.

Of course, when viewed microscopically, generative AI is performing parallel processing of a massive neural network. However, the repetition of predicting and outputting the next character in Step 2 can be considered, macroscopically, as corresponding to the sequential processing of one step of a Von Neumann computer, with the details of commands and programs being a black box.

Generative AI Agents as a Program Generator-Embedded Von Neumann Computers

The part of the AI agents that converts the inputted text into “Internal State 1” can be likened to a program generator. It’s like treating the inputted text as a request document and generating “Internal State 1” as a program.

With this perspective, it can be said that a generative AI agent as a whole corresponds to a Von Neumann computer with an embedded program generator.

Note such an agent typically incorporates randomness in its selection of words to output. This can be thought of as similar to a Von Neumann computer having commands that can generate random numbers. Generally, Von Neumann computers are considered to operate deterministically, but they can perform probabilistic and fuzzy operations if randomness generation is included in their commands.

Moreover, in a conventional Von Neumann computer, the CPU processes a limited type of commands, and the operations of each command are clear.

However, the commands processed by generative AI agents, as a Von Neumann computer, are extremely complex and numerous.

Furthermore, these complex and numerous commands and the part that generates the corresponding program are formed inside the neural network during the process of the large language model reading and learning from a vast amount of text. These are completely hidden within the neural network and remain a black box, unextractable even if we try to find them.

Therefore, at first glance, it may not seem like a Von Neumann computer. However, if we look abstractly at the sequential processing that updates the internal memory state according to the inputted program, chat AI fits perfectly into the essence of a Von Neumann computer.

Generative AI Agents Learning as the Automatic Development Process of Command Sets and Program Generators

The discussion so far pertained to conversing with a trained generative AI agent.

Before conversing with us, the large language model upon which the agent is based learns by ‘reading’ vast amounts of text. If a trained model is a program generator-embedded Von Neumann computer, then this learning process corresponds to the development of the command set and the program generator.

During this process, the AI agent automatically develops a functioning command set and program generator while reading vast amounts of text.

Therefore, the encoder-decoder and attention mechanisms mentioned earlier can be seen as technologies for the automatic development of command sets and program generators for a Von Neumann computer.

Currently, generative AI agents is provided in a format where it converses after pre-training. In the future, AI technology that learns in real-time while conversing with users may emerge. If that happens, it would be a Von Neumann computer that dynamically improves its command set and program generator.

Development of Von Neumann Computers and Their Surrounding Systems

Typically, Von Neumann computers and their surrounding systems are developed by humans. This includes various design tasks carried out by human engineers.

First, the design of the computer is necessary. This involves the logical design of the command set and the design of the processing unit.

Designing the command set is the task of defining various commands that can be used within a program for the processes intended to be run on the computer. Essentially, by defining commands for arithmetic operations, loop and conditional processing, internal memory, data input, and data output, a wide range of programs can be created. More advanced commands can make programming easier.

The design of the processing unit involves designing the processing of each command in the command set when given by a program.

Using the designed computer command set, the design of a program to perform the required processing is necessary. Program design includes requirement analysis to understand what needs to be processed by the computer and the creation of a program that meets those requirements.

Software engineers are needed to design programs. They become able to create programs by learning the computer’s command set and its functions. Moreover, by acquiring requirement analysis skills, they can organize the requested content into something that can be processed by a program.

Design of Computer and Program in Generative AI Agents

When we view generative AI agents as a collection of a Von Neumann computer and its surrounding systems, we can consider the following:

First, the design of the computer is automatically carried out during the learning process of AI agents. The result of this design is held as a group of parameters inside the agent’s large language model. While the contents are a black box, it includes a processing unit for the command set.

Simultaneously, the design of the program generator is also automatically carried out during the training process and is held within the parameters of the large language model.

The program generator is a mechanism for automatic program design. In conventional computers, there is no automatic program generator that includes requirement analysis; this role is filled by human software engineers. In other words, the program generator is automatically learning the methods of program creation and requirement analysis skills that human software engineers learn.

Thus, through the training phase, the processing unit and program generator are designed and retained inside the generative AI agent.

When text is inputted into this agent, a program is designed by the program generator, then this program is sequentially processed by the processing unit, resulting in the output of text.

Generative AI Agents Viewed as a Von Neumann Computer

When we consider AI agents based on large language models not just as processors of natural language, but as a Von Neumann computer processing a unique set of commands, it adds new perspectives to several mysteries.

First, there’s the notion that AI Agents have acquired advanced intellectual abilities, not just the ability to handle natural language.

This seems strange when we think of AI’s learning as simply the processing of natural language. If it were only learning words, the acquisition of abilities like mathematical calculation or sequential thinking doesn’t intuitively make sense.

However, if we view generative AI agents learning as the automatic development of command sets and program generators for a Von Neumann computer, it seems natural that successful learning would lead to the ability to perform mathematical calculations. It also becomes less mysterious that it could think sequentially, using information updated in previous loops.

There’s also talk about AI agents gaining intellectual abilities not seen in smaller neural networks as the size of its neural network increases.

If we consider this simply as learning natural language, it might seem that only the memory capacity for words and the volume of semantic associations between words would increase. This doesn’t clearly explain how increasing size correlates with the acquisition of intellectual abilities.

But if we think of this as the automatic development of a command set and program generator for a Von Neumann computer, it can be compared to increasing the bit width of a CPU architecture or the size of ROM.

Comparing the complexity of processes that a 64-bit CPU can handle in one command to an 8-bit microcontroller, and the simplicity of the programs that can be created using the former, it’s understandable why the latter is more suited for advanced processing. Similarly, the possibilities offered by a program that has to fit into a small ROM versus one that can fit into a larger ROM are naturally different.

There are discussions suggesting that further increasing the size of the neural network may not be as effective in the future. This is intuitively understandable when considering that beyond a certain point, further advancements in CPU architecture’s bit width or ROM size yield diminishing returns.

Advantages of Understanding Generative AI Agents as a Von Neumann Computer

Thus, viewing a generative AI agent macroscopically as a Von Neumann computer is not just an analogy; it’s a very effective way to intuitively understand its mechanism and properties.

Currently, we train large language models by having them read vast texts, and various intellectual abilities have emerged by chance. In the future, we might efficiently separate the learning steps for words, grammar, and natural responses from those for developing intellectual abilities like calculation and sequential thinking.

Researching the latter from the perspective of automatically developing command sets and program generators might provide clues to more effective learning methods. It could also lead to ideas for efficiently imparting intellectual abilities to smaller-sized generative AI systems.

If we can uncover the mechanisms and learning tricks through which chat AI acquires intellectual abilities in the process of learning natural language, we might also gain valuable insights and understanding about improving human intellectual capabilities.

In Conclusion

Thus, viewing generative AI agents macroscopically as automatically designed Von Neumann computers and its surrounding systems is not just an analogy. I believe it is very effective for intuitively understanding its mechanisms and properties.

Currently, the various intellectual abilities that have emerged in large language models like GPT-4 are likely the result of having them read and learn from vast amounts of text. In the future, it might be possible to efficiently separate and optimize the learning steps for teaching words, grammar, and natural responses from those for developing intellectual abilities like calculation and sequential thinking.

Researching the latter from the perspective of automatically developing command sets and program generators might provide clues for better learning methods. This could also lead to ideas for efficiently imparting intellectual abilities even in smaller-sized chat AIs.

If the mechanisms and learning tricks through which generative AI acquires intellectual abilities in the process of learning natural language become clear, it might also offer valuable insights and understanding about enhancing human intellectual capabilities.

--

--

katoshi
Neo-Cybernetics

Software Engineer and System Architect with a Ph.D. I write articles exploring the common nature between life and intelligence from a system perspective.