Recently, several studies have shown how large language models (LLMs) capabilities can be enhanced through explicit multi-step reasoning, performed by a single LLM or resulting from the interaction of multiple agents. In particular, some positive effects of multi-agent interactions, such as mitigating hallucinations and increasing stability, resemble emergent properties that natural systems such as birds flocking, ants colonies or fish schooling also exhibit. Therefore, in this thesis, we take inspiration both from natural and artificial swarm systems to delve deeper into the collective behaviour of LLM agents involved in complex long-term tasks. In detail, we consider an homogeneous group of agents, meaning that all agents are identical in terms of role and goals, each equipped with memory buffers that allow for incremental and goal-specific improvements. As a first task, standard optimization is considered: since it has recently been shown that LLM can act as optimizers, we can now compare the performance and stability of a single LLM with a swarm of LLM agents. To this end, we simulate the movement of interacting agents in a bounded landscape characterized by multiple local minima or a large valley, with the ultimate goal of identifying the global minimum. Agents do not have access to the functional form describing the landscape and are instructed with natural language. We call this framework LLM Agent Swarm Optimization (llmASO). Within llmASO, interactions occur according to a specific network topology and are modelled either in terms of pure information sharing or by incorporating the exchange of verbal suggestions. Here, first the impact of randomness and sparsity is studied. Randomness is included in the system by allowing each agent to perform random movements around their current location at each iteration, resulting in greater exploration and/or stability. Instead, sparsity is implemented either by dropping out, with given probability, some connections at each optimization step or by randomly selecting one of the incoming suggestions, without affecting the information flow. In addition, different levels of LLM temperature are studied. Then, the results of these tests are exploited to analyze the impact of network topology. Different topologies are considered, from regular to random graphs, static or dynamic. The final performance is evaluated on multiple benchmark functions. After achieving a successful outcome in this task, we apply our findings to other interaction models, where other emergent properties, such as segregation, can be studied. Finally, we run the experiments using the quantized versions of a variety of small (7 billion parameters) and open-source LLMs. This choice is driven by our interest in applying these findings to swarms of small robots, each equipped with a LLM, which imposes stringent requirements in terms of memory and computational power.

Recently, several studies have shown how large language models (LLMs) capabilities can be enhanced through explicit multi-step reasoning, performed by a single LLM or resulting from the interaction of multiple agents. In particular, some positive effects of multi-agent interactions, such as mitigating hallucinations and increasing stability, resemble emergent properties that natural systems such as birds flocking, ants colonies or fish schooling also exhibit. Therefore, in this thesis, we take inspiration both from natural and artificial swarm systems to delve deeper into the collective behaviour of LLM agents involved in complex long-term tasks. In detail, we consider an homogeneous group of agents, meaning that all agents are identical in terms of role and goals, each equipped with memory buffers that allow for incremental and goal-specific improvements. As a first task, standard optimization is considered: since it has recently been shown that LLM can act as optimizers, we can now compare the performance and stability of a single LLM with a swarm of LLM agents. To this end, we simulate the movement of interacting agents in a bounded landscape characterized by multiple local minima or a large valley, with the ultimate goal of identifying the global minimum. Agents do not have access to the functional form describing the landscape and are instructed with natural language. We call this framework LLM Agent Swarm Optimization (llmASO). Within llmASO, interactions occur according to a specific network topology and are modelled either in terms of pure information sharing or by incorporating the exchange of verbal suggestions. Here, first the impact of randomness and sparsity is studied. Randomness is included in the system by allowing each agent to perform random movements around their current location at each iteration, resulting in greater exploration and/or stability. Instead, sparsity is implemented either by dropping out, with given probability, some connections at each optimization step or by randomly selecting one of the incoming suggestions, without affecting the information flow. In addition, different levels of LLM temperature are studied. Then, the results of these tests are exploited to analyze the impact of network topology. Different topologies are considered, from regular to random graphs, static or dynamic. The final performance is evaluated on multiple benchmark functions. After achieving a successful outcome in this task, we apply our findings to other interaction models, where other emergent properties, such as segregation, can be studied. Finally, we run the experiments using the quantized versions of a variety of small (7 billion parameters) and open-source LLMs. This choice is driven by our interest in applying these findings to swarms of small robots, each equipped with a LLM, which imposes stringent requirements in terms of memory and computational power.

Swarm Intelligence in Interacting Language Model Agents

ZOMER, NICOLA
2023/2024

Abstract

Recently, several studies have shown how large language models (LLMs) capabilities can be enhanced through explicit multi-step reasoning, performed by a single LLM or resulting from the interaction of multiple agents. In particular, some positive effects of multi-agent interactions, such as mitigating hallucinations and increasing stability, resemble emergent properties that natural systems such as birds flocking, ants colonies or fish schooling also exhibit. Therefore, in this thesis, we take inspiration both from natural and artificial swarm systems to delve deeper into the collective behaviour of LLM agents involved in complex long-term tasks. In detail, we consider an homogeneous group of agents, meaning that all agents are identical in terms of role and goals, each equipped with memory buffers that allow for incremental and goal-specific improvements. As a first task, standard optimization is considered: since it has recently been shown that LLM can act as optimizers, we can now compare the performance and stability of a single LLM with a swarm of LLM agents. To this end, we simulate the movement of interacting agents in a bounded landscape characterized by multiple local minima or a large valley, with the ultimate goal of identifying the global minimum. Agents do not have access to the functional form describing the landscape and are instructed with natural language. We call this framework LLM Agent Swarm Optimization (llmASO). Within llmASO, interactions occur according to a specific network topology and are modelled either in terms of pure information sharing or by incorporating the exchange of verbal suggestions. Here, first the impact of randomness and sparsity is studied. Randomness is included in the system by allowing each agent to perform random movements around their current location at each iteration, resulting in greater exploration and/or stability. Instead, sparsity is implemented either by dropping out, with given probability, some connections at each optimization step or by randomly selecting one of the incoming suggestions, without affecting the information flow. In addition, different levels of LLM temperature are studied. Then, the results of these tests are exploited to analyze the impact of network topology. Different topologies are considered, from regular to random graphs, static or dynamic. The final performance is evaluated on multiple benchmark functions. After achieving a successful outcome in this task, we apply our findings to other interaction models, where other emergent properties, such as segregation, can be studied. Finally, we run the experiments using the quantized versions of a variety of small (7 billion parameters) and open-source LLMs. This choice is driven by our interest in applying these findings to swarms of small robots, each equipped with a LLM, which imposes stringent requirements in terms of memory and computational power.
2023
Swarm Intelligence in Interacting Language Model Agents
Recently, several studies have shown how large language models (LLMs) capabilities can be enhanced through explicit multi-step reasoning, performed by a single LLM or resulting from the interaction of multiple agents. In particular, some positive effects of multi-agent interactions, such as mitigating hallucinations and increasing stability, resemble emergent properties that natural systems such as birds flocking, ants colonies or fish schooling also exhibit. Therefore, in this thesis, we take inspiration both from natural and artificial swarm systems to delve deeper into the collective behaviour of LLM agents involved in complex long-term tasks. In detail, we consider an homogeneous group of agents, meaning that all agents are identical in terms of role and goals, each equipped with memory buffers that allow for incremental and goal-specific improvements. As a first task, standard optimization is considered: since it has recently been shown that LLM can act as optimizers, we can now compare the performance and stability of a single LLM with a swarm of LLM agents. To this end, we simulate the movement of interacting agents in a bounded landscape characterized by multiple local minima or a large valley, with the ultimate goal of identifying the global minimum. Agents do not have access to the functional form describing the landscape and are instructed with natural language. We call this framework LLM Agent Swarm Optimization (llmASO). Within llmASO, interactions occur according to a specific network topology and are modelled either in terms of pure information sharing or by incorporating the exchange of verbal suggestions. Here, first the impact of randomness and sparsity is studied. Randomness is included in the system by allowing each agent to perform random movements around their current location at each iteration, resulting in greater exploration and/or stability. Instead, sparsity is implemented either by dropping out, with given probability, some connections at each optimization step or by randomly selecting one of the incoming suggestions, without affecting the information flow. In addition, different levels of LLM temperature are studied. Then, the results of these tests are exploited to analyze the impact of network topology. Different topologies are considered, from regular to random graphs, static or dynamic. The final performance is evaluated on multiple benchmark functions. After achieving a successful outcome in this task, we apply our findings to other interaction models, where other emergent properties, such as segregation, can be studied. Finally, we run the experiments using the quantized versions of a variety of small (7 billion parameters) and open-source LLMs. This choice is driven by our interest in applying these findings to swarms of small robots, each equipped with a LLM, which imposes stringent requirements in terms of memory and computational power.
swarm intelligence
language models
complex systems
network topology
information transfer
File in questo prodotto:
File Dimensione Formato  
Zomer_Nicola.pdf

accesso riservato

Dimensione 20.07 MB
Formato Adobe PDF
20.07 MB Adobe PDF

The text of this website © Università degli studi di Padova. Full Text are published under a non-exclusive license. Metadata are under a CC0 License

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/20.500.12608/64701