In particle swarm optimization, particles do not necessarily communicate with the entire swarm; instead, they may only interact with a subset of neighbours. Neighborhood topology defines which particles share information, how the best solution spreads throughout the swarm, and the balance between exploration and convergence.

Two common PSO variants arise from this: global best PSO and local best PSO.

Global Best Topology

In global topology (gbest), every particle has access to the best position discovered by the entire swarm:

The velocity update is then:

This allows very fast information propagation with rapid convergence. However, there is also a higher risk of premature convergence.

Local Best Topology

In local-best topology (lbest), every particle communicates with a limited neighborhood. Each particle uses:

Then, the velocity update is:

This means information propagation is slower. However, diversity is better, with more exploration.

An example of a local-best method is ring topology:

Comparison

Note that ring and grid/lattice are both lbest.