Introduction

Understanding the emergence of collective behavior from local interactions is a central question in the study of complex systems. In nature, large-scale spatio-temporal patterns frequently arise without centralized coordination as seen, e.g., from the coordinated motion in animal groups1,2,3 or the synchronized flashing of fireflies4,5, chirping of crickets6 or waving of crabs7. Two foundational models—the Vicsek model, which captures spatial organization via local alignment8, and the Kuramoto model, which describes phase synchronization among coupled oscillators9—have provided key insights into such emergent phenomena. However, many real-world systems feature an inseparable interplay between spatial and oscillatory dynamics, rendering these models individually insufficient. Examples include chorusing frogs10, swimming sperm cells11, interacting magnetic colloids12, or magnetic domain walls13, where agents not only exhibit translational motion but also internal oscillations which are mutually coupled. To address this type of behavior, the concept of swarmalators (swarming oscillators), i.e., agents that exhibit both collective motion and synchronization, has been proposed14. Bidirectional coupling between these modes, where spatial proximity alters phase dynamics and phase differences modify motion, yields rich behaviors such as synchronized clustering, rotating waves, and ring-like assemblies15,16.

Although several of the above-mentioned systems exhibit phenomenological signatures of swarmalator behavior, the underlying mechanisms linking synchronization to motion in these systems are usually not clear and, accordingly, cannot be controlled. Understanding the coupling mechanisms in more detail is not only crucial to describe experimental swarmalators within existing theoretical frameworks but also important for spatio-temporal control in swarm robotics17,18,19, self-assembled micro machines20,21,22,23, and neuromorphic or reservoir computing24,25.

In this work, we present an experimental realization of a swarmalator system using feedback-controlled self-propelled colloidal particles (denoted as active Brownian particles (ABPs)) with independently tunable spatial and oscillatory dynamics. Active particles are especially well suited for realizing swarmalators, since they pose a comparably easy way of manipulating high numbers of moving agents and because the interactions between active particles have yielded basic swarmalator characteristics before12,26. Hydrodynamic interactions at high particle density mediate strong coupling between motion and phase. By tuning a single control parameter, we observe transitions between tightly synchronized, dense clusters and loosely connected, weakly synchronized states, in good agreement with numerical simulations. Our explicit understanding of the coupling mechanism enables us, for the first time, to describe and understand our system within the theoretical framework of swarmalators. Crucially, our system exhibits not only synchronization-dependent attraction, but also lateral interaction forces that drive collective rotation dynamics reminiscent of rotating biological clusters, such as those formed by bacteria or starfish embryos27,28. Furthermore, because the timescales for synchronization and clustering of the swarmalators are clearly separated, we can dynamically modulate their interaction strength to access non-equilibrium swarmalator states inaccessible under static conditions. Our results demonstrate a controllable experimental platform for swarmalators and expand the theoretical framework to include previously unexplored physical interactions.

Results

Synchronization of oscillating ABPs

To experimentally realize oscillators, we employed ABPs whose propulsion directions are individually controlled by an incident laser beam29,30,31. The ABPs we used were made from carbon-coated silica spheres (radius a = 3 μm) suspended in a near-critical water-lutidine mixture. Illumination with a focused laser heats each particle slightly above the critical temperature of the solvent, inducing local demixing and self-propulsion. Crucially, when the laser is laterally offset from the particle center, propulsion occurs opposite to the offset direction (Fig. 1a; for details, see Methods section “Experimental realization of oscillating ABPs”). To encode a phase into each ABP’s motion, we programmed them to perform quasi-circular oscillations around designated target positions. This was implemented by continuously steering each particle i in the (memorized) direction of its reference position qi using a control signal delayed by one time step δt (Fig. 1b; Methods section “Experimental realization of oscillating ABPs”). As a consequence of this control scheme, each ABP performs an orbiting motion around its reference position qi32,33 with the oscillating phase defined by \(\theta={\tan }^{-1}\left({u}_{y}/{u}_{x}\right)\) and the spatial components ux and uy of the propulsion velocity u. In our experiments, the time delay was set to δt = 0.4 s, which is identical to the time interval between recordings of the particle positions. In combination with a propulsion speed of \(\left\vert {{{\bf{u}}}}\right\vert \approx\) 2 μm/s, this yields in an average oscillation radius of R ≈ 1 μm (Fig. 1c). The initial direction of rotation is random for each particle and may spontaneously reverse due to thermal fluctuations. When operating several such oscillators with small distances \(\left\vert {{{{\bf{q}}}}}_{ij}\right\vert\) between their reference points, their oscillation becomes highly synchronized (see Supplementary video 1). Figure 1d shows experimental snapshots of synchronized oscillators with their trajectories colored according to time, where the synchronization is visible in the form of particles moving in the same directions at the same time. Such synchronization is due to hydrodynamic interactions as discussed in detail below. As a measure of synchronization σi of oscillator i with its neighbors j, we use

$${\sigma }_{i}=\frac{1}{{N}_{j}} {\sum}_{j}{\left\langle \cos \left({\theta }_{i}-{\theta }_{j}\right)\right\rangle }_{T}.$$
(1)

(see Fig. 1e). Here, 〈. . . 〉T denotes the average over time intervals T = 10 δt and Nj the number of neighbors j of oscillator i. Accordingly, σi can vary between +1 and −1, corresponding to in- and out-of-phase oscillations, respectively. Figure 1f shows an array of about 250 oscillators, with their reference positions arranged on a hexagonal lattice at a spacing of \(\left\vert {{{{\bf{q}}}}}_{ij}\right\vert\) = 12 μm. The ABPs are color-coded according to their local synchronization σi. The experiments are complemented by numerical simulations incorporating the same geometry and hydrodynamic interactions between ABPs (see Methods section “Simulation model” and SI section 5). At short inter-oscillator distances, the system exhibits large synchronized domains interspersed with only narrow domain walls of weak coherence. As the spacing \(\left\vert {{{{\bf{q}}}}}_{ij}\right\vert\) between neighboring reference positions increases, the mean synchronization across the array decreases (Fig. 1g; Supplementary video 1). This spatially dependent synchronization is a hallmark of swarmalator systems.

Fig. 1: Hydrodynamic synchronization of oscillating ABPs.
figure 1

a An active colloid (gray, ABP) with velocity u propelled by a laser spot (green). b An ABP propelled toward a reference position (red) with a time delay δt with the use of a laser spot (green). During δt, the particle moves the distance δr, and the particle misses the reference site, leading to an oscillation around the reference position. c Trajectory (light to dark blue as a function of time) of an oscillating ABP around its reference position (red) from experiments. The ABP position is sampled every δt, with straight lines connecting successive points to depict the trajectory. d Experimental snapshot of three ABPs orbiting around their reference positions in phase. Their trajectories are colored according to time (red to blue). The ABPs are moving in roughly the same direction in each time step, visualizing the synchronization of their oscillation. e Definition of the synchronization of two oscillators i and j, \({\sigma }_{ij}={\langle \cos \left({\theta }_{i}-{\theta }_{j}\right)\rangle }_{T}\). f Experimental snapshot of an array of around 250 oscillators whose reference positions q are arranged on a hexagonal grid with a distance \(\left\vert {{{{\bf{q}}}}}_{ij}\right\vert=\) 12 μm between neighboring reference positions. The ABPs are colored according to the mean synchronization to their neighbors \({\sigma }_{i}={\langle {\sigma }_{ij}\rangle }_{j}\) (black denotes defect ABPs). For an animated version, see Supplementary video 1. g Average synchronization \({\langle {\sigma }_{ij}\rangle }_{ij}\) of oscillators as a function of their reference point distance qij. Closed symbols: 400 oscillators on a grid as shown in (f). Open symbols: isolated doublets of oscillators. Blue lines show simulation results based on the force field shown in (j), including defect particles (see SI section 3; Fig. S7 for the synchronization without defects). Error bars and light colored areas correspond to the standard deviation. h Illustration of the experiment used to map out the forces between ABPs. One oscillating ABP with its target position (red) is placed close to a passive tracer particle, and the velocity of the tracer upass is recorded as a function of its position \(\left({r}_{\perp }| {r}_{\parallel }\right)\) in the reference frame of the velocity uact of the oscillating ABP to determine the hydrodynamic forces. i Force field experienced by a passive tracer particle close to an oscillating ABP as a function of its position \(\left({r}_{\perp }| {r}_{\parallel }\right)\) perpendicular and parallel to the ABP. j The force field of a combination of a squirmer with β = 0.25 and lubrication forces, as used in our simulations. Source data are provided as a Source data file.

To probe the underlying hydrodynamic coupling mechanism, we measured the velocity of a passive colloid placed near a moving ABP as a function of its relative position (Fig. 1h, i). The resulting strongly anisotropic velocity field and the associated force distribution indicates that hydrodynamic interactions mediate the coupling, consistent with prior observations in colloidal oscillators11,34,35. The measured flow field agrees well with a superposition of a squirmer model (with active stress parameter β = 0.25) and short-range lubrication forces (Fig. 1j; Methods section “Simulation model” and SI section 5). Incorporating this interaction model into simulations quantitatively reproduces the experimentally observed distance-dependent synchronization (Fig. 1g, snapshots in Fig. S1, for more details about the hydrodynamic synchronization see SI section 4).

Motile oscillators

In addition to phase oscillations, a characteristic feature of swarmalators is a translational degree of freedom, with mutual coupling between position and phase. Experimentally, we implement this by allowing the ABP’s reference positions qi,t to evolve dynamically in time. At each time step δt, they are updated according to

$${{{{\bf{q}}}}}_{i,t+\delta t}={{{{\bf{q}}}}}_{i,t}+\Gamma \cdot \left({{{{\bf{R}}}}}_{i,t}-{{{{\bf{q}}}}}_{i,t}\right).$$
(2)

Here, di,t = Ri,t − qi,t is the displacement between the time-averaged particle position \({{{{\bf{R}}}}}_{i,t}=\frac{1}{T}{\sum }_{t-T}^{t}{{{{\bf{r}}}}}_{i,t}\) and the reference position qi,t and Γ is a freely adjustable coupling parameter. As a result of this rule, the reference positions acquire a time-varying velocity that depends on the displacement di,t and is therefore sensitive to the orbiting dynamics of the ABPs. The averaging window T is chosen to slightly exceed a typical oscillation period (6–8 δt) and is consistent with that used to compute the synchronization parameter σi in equation (1); moderate variations in T do not qualitatively affect the behavior of the system. To prevent phoretic clustering of the ABPs, we include a short-range repulsive interaction between neighboring reference positions as usual in swarmalator models (see Methods section “Reference position update”).

Figure 2a, b illustrate the dynamics resulting from equation (2): an ABP circles around a motile reference point, which itself moves. The mean squared displacement (MSD) provides a quantitative measure of activity36, and we use it to characterize the mobility of the swarmalator population and its dependence on the coupling parameter Γ. The MSD of isolated oscillators for different Γ values is shown in Fig. 2c. For Γ = 0, reference positions remain fixed, and the MSD shows oscillations at short times and eventually saturates. For finite values of Γ, the reference positions move due to fluctuations in the mean position Ri,t of the ABPs. This leads to an increasing value of the MSDs at large times with a Γ-dependent exponent α. Figure 2d shows that α, obtained from fits to simulated MSDs, increases from 0 to 1 with increasing \(\left\vert \Gamma \right\vert\) (for Γ > -0.2), indicating diffusive motion in the limit of large Γ. For strong negative coupling (Γ < − 0.2), reference positions outrun the ABPs orbits, inducing ballistic motion and quenching of oscillations. Because the ABPs cease to oscillate in this regime, we restrict our analysis to Γ≥ − 0.2 in the subsequent sections.

Fig. 2: Dynamics of motile oscillators.
figure 2

a Illustration of a motile oscillator consisting of an ABP (gray) with position ri and velocity ui oscillating around its reference position qi with phase θi. The ABP and reference position trajectories are illustrated in blue and red, respectively. According to equation (2), qi is moved in the direction of the displacement di of the ABP position Ri averaged over the interval T = 10δt. b Experimental snapshot of the motion resulting from the update scheme in (a) with Γ = − 0.1. The trajectory of the ABP is shown in light to dark blue as a function of time, and that of its reference position in red. c Mean squared displacement (MSD) of the motile oscillators from experiments with low particle densities for different values of Γ (left: Γ < 0, right: Γ > 0, median curves over particles). The dashed gray lines mark τ2 (left) and τ (right). See SI section 6 for the definition of the MSD. For Γ = 0, the MSDs show oscillations as expected for an ABP orbiting around a fixed position. When \(\left\vert \Gamma \right\vert\) increases, the exponent α of the MSD increases, showing a transition from stationary to diffusive (α = 1) and ballistic (α = 2) motion. d Long time exponent α of the MSDs against Γ obtained from fitting simulated curves. The dashed lines mark ballistic (α = 2), diffusive (α = 1) and no motion (α = 0). Source data are provided as a Source data file.

Synchronization-dependent swarmalator motion

So far, we have shown that ABP oscillations synchronize as a function of the inter-oscillator distance qij, with reference positions evolving dynamically according to equation (2). What fundamentally distinguishes swarmalators from simple motile oscillators, however, is the bidirectional coupling between phase synchronization and translational motion. In our system, this coupling arises naturally through hydrodynamic interactions, particularly pronounced at high particle densities. Figure 3a, b shows experimental and simulation snapshots for coupling values Γ = 0.2 and Γ = − 0.1, respectively. In both cases, systems were initialized with identical ABP densities and evolved for over 6000δt. For Γ = 0.2, oscillators mutually attract, leading to the emergence of dense, highly synchronized clusters. In contrast, for Γ = − 0.1, this cohesion breaks down: the system expands, the particle density decreases, and synchronization is lost (also see Supplementary video 2).

Fig. 3: Interactions between swarmalators.
figure 3

a, b Snapshots from experiment (left) and simulation (right) for Γ = 0.2 and Γ = −0.1 (see Supplementary video 2 for animated versions). The swarmalators are colored according to the synchronization averaged over their neighbors σi (black denotes defect ABPs). With Γ > 0, the swarmalators form highly synchronized clusters, while for Γ < 0 the swarmalators disperse and the synchronization is low. c Fraction fc of particles in clusters (with at least one neighbor closer than 15 μm) in experiment (black symbols) and simulation (blue line) against Γ. The error bars and light colored area correspond to the standard deviation between different runs. d A swarmalator with its reference position qi (red) and mean particle position \({{{{\bf{R}}}}}_{i}={\langle {{{{\bf{r}}}}}_{i}\rangle }_{T}\) (blue). d,ij is the displacement di = Ri − qi of the ABP from its reference position projected onto the connection vector qij = qj − qi to the reference position qj of a neighbor. e Heat map of d,ij averaged over particles against the synchronization σij with and distance \(\left\vert {{{{\bf{q}}}}}_{ij}\right\vert\) to neighbors. Figure S2 shows d,ij as a function of σij averaged over distances 8–15 μm. f Relative velocity of neighbors in a distance of 8–15 μm for different values of Γ (color of the curve) for negative (left) and positive (right) Γ. Light colored areas are the standard deviation for different experimental runs. For negative Γ we observe a repulsive interaction for high synchronization (positive relative velocity), while for positive Γ, synchronized swarmalators attract each other (negative relative velocity). In all experiments and simulations, 400 swarmalators were initialized in an area of size 400 × 280 μm, and allowed to relax until no two reference positions are within 10 μm separation using the exclusion algorithm in Methods section “Reference position update”. This gave a density of around 0.003 μm−2 at the end of the relaxation step. Source data are provided as a Source data file.

Figure 3c shows that the experimentally measured fraction fc of oscillators within clusters (defined as those with at least one neighbor within qij ≤ 15 μm distance) increases continuously with Γ, consistent with simulations. Notably, isolated oscillators display diffusive motion for both positive and negative Γ (Fig. 2d), indicating that the observed structure formation at high densities must arise from interactions between oscillators. Considering the reference point update rule equation (2), this behavior results from the displacement di,t of oscillating ABPs from their reference positions.

A defining feature of swarmalators is that their motion depends jointly on their distance and phase synchronization. To probe this relationship, we analyzed di,t as a function of both the reference point separation qij and the pairwise synchronization σij. Figure 3e presents the average longitudinal displacement component d,ij of di,t, projected along the direction \(\hat{{{{{\bf{q}}}}}_{ij}}\) to neighboring oscillators. The data reveals a clear dependence of d,ij on both distance qij and synchronization σij, confirming that motility in our system is jointly modulated by spatial proximity and synchronization—consistent with theoretical swarmalator models. Figure S2 shows a graph of d,ij against σij averaged over distance qij between 8 and 15 μm. When two oscillators i and j are negatively synchronized, the longitudinal displacement d,ij is negative, indicating that each ABP is, on average, displaced away from its neighbor relative to its own reference position. Conversely, for positively synchronized pairs, ABPs are displaced toward each other (i.e., d,ij > 0). The magnitude of this displacement decays with increasing separation between reference positions. This behavior provides a mechanistic explanation for the Γ-dependent clustering observed in Fig. 3a, b. When two oscillators are synchronized, their ABPs tend to shift toward each other, yielding positive d,ij values (Fig. 3d). For positive Γ, this displacement drives the reference positions closer together via equation (2), thereby promoting aggregation. In contrast, for negative Γ, the reference points move opposite to the displacement, causing synchronized oscillators to effectively repel. This interpretation is supported by direct measurements of the relative velocities between neighboring reference positions (Fig. 3f), which vary systematically with Γ, confirming the predicted dependence of effective interactions on the sign of Γ. Simulations based on the hydrodynamic interaction model detailed in Section “Synchronization of oscillating ABPs” reproduce the experimentally observed trends in both ABP displacement and relative reference-point velocity (Fig. S3). Moreover, the nature of the interaction between oscillators depends sensitively on the character of their hydrodynamic propulsion mechanism: whether they behave as pushers, pullers, or neutral squirmers (Figs. S9, S10). This underscores the critical role of the hydrodynamic flow fields generated by the orbiting ABPs34,37.

Our results show that the motile oscillators exhibit synchronization-dependent motion and a distance-dependent synchronization. Taken together, these features are hallmarks of swarmalator behavior, consistent with theoretical studies. Standard swarmalator models are characterized by two parameters, the synchronization strength K, and the spatial interaction parameter J, controlling the synchronization-dependent attraction (J > 0) or repulsion (J < 0)14,38,39. For constant, distance-independent attraction, theory predicts that swarmalators with K > 0 and J > 0 form a single, dense, synchronized cluster14. However, when attraction decays with distance—as in our system—smaller, isolated synchronized clusters are expected39,40, in agreement with our experimental observations for Γ > 0 (Fig. 3a). The regime J < 0 corresponding to Γ < 0 is rarely explored theoretically. In our experiments, it leads to dispersed, weakly synchronized swarmalators.

Swarmalator model

Beyond a simple qualitative comparison, our quantitative characterization of the interactions among swarmalators enables us to model their dynamics within the general swarmalator framework. Specifically, we represent the phase coupling between oscillating colloids as a distance-dependent, Kuramoto-like coupling term (for more details, see SI section 4). With the oscillation frequency ω0 of isolated swarmalators, the corresponding equation of motion for the phase can be written as

$$\dot{{\theta }_{i}}(t)={\omega }_{0}+{\sum}_{j\ne i}\frac{K}{| {{{{\bf{q}}}}}_{ij}(t){| }^{3}}\sin \left[\Delta {\theta }_{ij}(t)\right]+{\xi }_{i,\theta }(t).$$
(3)

Here, Δθij(t) is the phase difference between neighboring swarmalators and ξi,θ(t) Gaussian, δ-correlated noise. Opposed to frequently used swarmalator models with long-range coupling14, hydrodynamic interactions results in a shorter-ranged \({\left\vert {{{{\bf{q}}}}}_{ij}\right\vert }^{-3}\) decay of the synchronization41.

As demonstrated in the previous section, the swarmalators in our experiments exhibit attraction or repulsion depending jointly on their relative position and phase synchronization. This interaction is mediated by the longitudinal displacement d,ij of each ABP along the direction of its neighbor. We find that d,ij can be well described by the empirical relation \({d}_{\parallel,ij}\propto | {{{{\bf{q}}}}}_{ij}{| }^{-2}\sin (\pi {\sigma }_{ij})\). With the assumption that the net displacement di,t is the superposition of displacements in the direction of neighbors, i.e., \({{{{\bf{d}}}}}_{i,t}=1/{N}_{j}{\sum }_{j}{d}_{\parallel,ij}\cdot \hat{{{{{\bf{q}}}}}_{ij}}\), the motion of swarmalators can be described as

$$\dot{{{{{\bf{q}}}}}_{i}}(t)=\, \frac{1}{{N}_{j}} \mathop{\sum}_{j\ne i}\frac{J{{{{\bf{q}}}}}_{ij}(t)}{| {{{{\bf{q}}}}}_{ij}(t){| }^{3}}\sin \left[\pi \cos \left(\Delta {\theta }_{ij}(t)\right)\right]\\ +{{{{\bf{F}}}}}_{rep,ij}(t)+{{{{\boldsymbol{\xi }}}}}_{i,q}(t).$$
(4)

ξi,q(t) is Gaussian, δ-correlated noise, and Frep,ij adds a repulsive force for small distances (see Methods section “Reference position update”). For more details on the motivation of equation (4), see SI section 7. By integrating equations (3) and (4) with K > 0 and varying J, we recover both the synchronized clusters and the dispersed states observed in experiments and simulations (Fig. 4; Fig. S4; Supplementary video 3). The model also enables exploration of anti-synchronizing interactions (K < 0), which are not accessible in our experiments due to the synchronizing interactions of the oscillators. Hydrodynamic anti-synchronization is, however, in principle possible and has been reported in other colloidal systems34,42,43,44. For K < 0 and J > 0, the system evolves into a dispersed, weakly synchronized state. In contrast, when both synchronization and spatial interaction are repulsive (K < 0, J < 0), swarmalators self-organize into chain-like aggregates in which adjacent particles oscillate in antiphase. We can rationalize these effectively one-dimensional structures considering that denser configurations lead to frustrated phase arrangements, destabilizing synchronization, and inducing repulsion between synchronized pairs. Similar alternating phases have also been observed in numerical simulations of swarmalators with entirely different coupling and interaction mechanisms45. This suggests that the states observed in Fig. 4 are rather generic beyond the specific swarmalator realization in our study. By using synchronization, cluster size, and cluster asphericity as order parameters, the data for different J and K values separate into four distinct phases: synchronized clusters, dispersed-synchronized, chain-like anti-synchronized, and dispersed anti-synchronized states (see SI section 8).

Fig. 4: Phase diagram of the swarmalator model.
figure 4

K and J are the parameters governing the distance-dependent synchronization and synchronization-dependent attraction or repulsion, respectively (see equations (3) and (4)). a For K < 0, J > 0, the swarmalators arrange randomly without synchronization. b For K > 0, J > 0, highly synchronized clusters emerge. c For K < 0, J < 0, the swarmalators arrange in chain-like structures in which adjacent swarmalators have opposite phases. d For K > 0, J < 0, the swarmalators synchronize but repel each other. The colors denote the phases of the swarmalators as indicated in (d). For a quantitative description of the four phases, see SI Section 8. Additional snapshots for different parameter values are provided in Fig. S4, and an animated phase diagram is available in Supplementary video 3. For all J, K values, the noise was fixed with an amplitude Dθ = Dη = 0.001, where \(\langle {\xi }_{i,\theta }(t){\xi }_{j,\theta }(t^{\prime} )\rangle={D}_{\theta }\delta (t-t^{\prime} )\) and \(\langle {{{{\boldsymbol{\xi }}}}}_{i,\eta,}(t)\cdot {{{{\boldsymbol{\xi }}}}}_{j,\eta }(t^{\prime} )\rangle=d{D}_{\eta }\delta (t-t^{\prime} )\), where d is the dimensionality (here d = 2). We set ω0 = 1, integration time-step dt = 0.005/ω0, and ran the simulation for a total time of 20,000/ω0.

Outlook

Previous numerical studies of swarmalator systems have predominantly focused on quasi-static pattern formation, where steady-state configurations emerge rapidly. In contrast, our experimental system evolves on markedly longer timescales. Notably, the two principal observables—phase synchronization (σ) and the fraction of swarmalators in clusters (fc)—exhibit different relaxation dynamics (Fig. 5a). Following a change in the coupling parameter Γ, synchronization decays rapidly (within a few oscillation periods τosc), whereas structural reorganization, as measured by fc, proceeds over tens of τosc. This timescale separation gives rise to non-trivial state trajectories when Γ is modulated dynamically. In particular, switching Γ between positive and negative values generates a closed loop in the (σfc) state space (Fig. 5b), where the system transiently explores configurations that are inaccessible under static coupling. These intermediate states depend on the switching direction, reflecting a form of hysteresis. At higher switching rates, the system no longer equilibrates between transitions, but remains in a transient intermediate state, displaying a form of dynamic memory (Fig. 5c, d). Since this effect is a direct consequence of the asynchronous relaxation of spatial and phase degrees of freedom, we expect it to be a generic feature of swarmalators, which offers additional possibilities regarding the control of swarmalator systems46.

Fig. 5: Effects of time-varying interactions and lateral forces in swarmalators.
figure 5

a The mean fraction of swarmalators in clusters 〈fc〉 relaxes slower than the mean synchronization 〈σ〉 after a switch in Γ (the light colored areas show the SEM over multiple runs). We selected Γ = −05 and Γ = 0.2 here, because these values result in the same swarmalator motility (see Fig. S11; SI section 6). b Switching back and forth between two values of Γ results in a loop in the 〈fc〉–〈σ〉 space, because the system visits different states depending on the direction of the switching. 〈σ〉 and 〈fc〉 are averaged over multiple runs. c State loop in the 〈fc〉–〈σ〉 space in simulations, for slow switching (every 400δt) of Γ (gray, as in (b)) as well as for fast switching (every 200δt) from different initial Γ (purple and orange). 〈σ〉 and 〈fc〉 are averaged over 50 runs. d Illustration of the state loop with two smaller loops (purple and orange) that are a result of faster switching in Γ from different initial values of Γ (see inset). e Heat map of the averaged normal displacement \({\langle {d}_{\perp,ij}\rangle }_{ij}\) against the synchronization σij and reference point distance \(\left\vert {{{{\bf{q}}}}}_{ij}\right\vert\) between neighboring swarmalators in experiment. f The normal (perpendicular) displacement d,ij is defined as the component of the displacement di orthogonal to the direction to the neighboring reference point qij, multiplied by the sign of the angular velocity of i. g Snapshots of a rotating swarmalator cluster in simulations at different times (colors yellow to green to blue). h Mean and standard deviation of the angular velocity ω of a rotating cluster as a function of the number N of swarmalators in the system and the coupling parameter Γ in simulations In (g, h), the swarmalators were initialized on a hexagonal grid with a separation of 8 μm, the system was allowed to relax for 3000δt, and the data was collected and averaged over 30,000δt. In (a, b, c), the initial density is around 0.003 μm−2. Source data are provided as a Source data file.

Besides gaining control over swarmalator systems, another important direction in swarmalator research is the search for new types of interactions that can expand the range of phenomena these models can explain47,48. The swarmalators in our experiments reveal a qualitatively new interaction channel in the form of synchronization-dependent forces, which are not limited to the axis connecting swarmalators to which theoretical models are usually restricted. We find that the hydrodynamic interactions also give rise to lateral forces, i.e., forces acting orthogonal to the connecting axis, arising from an orthogonal component of particle displacement d (Fig. 5e, f), depending on synchronization and distance. Similar to the parallel displacement, which gives rise to the synchronization-dependent attraction (see Fig. 3), this lateral displacement results in a rotational motion of swarmalators around each other. This kind of rotational motion originating from hydrodynamics is observed in multiple biological systems, like groups of starfish embryos27, but has not been reproduced in swarmalator models before. In the phenomenological model in the section “Swarmalator model”, we have omitted these lateral forces for simplicity, but this effect can be readily incorporated by adding another term to equation (4). Figure 5g, h shows a simulation snapshot of a rotating cluster of swarmalators and the size and Γ-dependent angular velocity. The rotation speed of the cluster can also be tuned by Γ, which couples the hydrodynamic interactions of the swarmalators to their motion. Importantly, the individual particles have no intrinsic chirality; instead, symmetry is broken through noise-assisted flips in rotation and synchronization mediated by hydrodynamic interactions, resulting in an emergent global rotation of the entire cluster with the same sense as its constituent swarmalators (see Fig. 5e, SI section 9). Incorporating lateral forces into swarmalator models fundamentally enriches the emergent phenomenology, enabling the formation of dynamic rotational states reminiscent of biological systems, such as vortical structures in bacterial colonies and starfish embryo aggregates27,28. Our results, therefore, expand the physical scope of swarmalator dynamics and underscore the need to include anisotropic interaction channels in future theoretical frameworks.

Methods

Experimental realization of oscillating ABPs

The Janus colloids we used as ABPs were prepared by coating commercially available silica particles (radius 3 μm) with 80 nm of carbon on one hemisphere. We dispersed these particles in a binary mixture of water and 26.8 wt% 2,6-Lutidine, which has a critical demixing temperature of 34 °C. The dispersion was placed inside a quartz glass sample cell with a height of 200 μm, which was kept at 28 °C. Focusing a laser with a wavelength of 532 nm on these particles heats up the carbon cap, which leads to anisotropic demixing of the critical mixture around them and self-phoretic motion. The propulsion speed can be controlled via the laser intensity. We controlled the motion direction by offsetting the center of the laser spot from the particle center by 2.4 μm. Using an acousto-optical deflector, we scanned the laser beam over the particles at 100 kHz, allowing us to move multiple hundreds of ABPs in parallel. To achieve continuous steering of the particles, we captured microscope images, detected the particle positions, and steered each particle towards its assigned reference position in a feedback loop at 2.5 Hz. As the particles move after the image capture at time t, the laser spots, which we apply at t + δt (δt = 0.4 s), push them in directions misaligned with the reference position. This kind of time delay and direction mismatch in the steering signal leads to a continuous oscillating motion of the ABPs around their reference points32. The ABPs used in this study do, in principle, show negative phototaxis, i.e., their uncapped side and therefore their swimming direction reorient to point down light intensity gradients with reorientation times in the order of 1 s30. However, we find that in our experiments, where we change the driving direction of each ABP with 2.5 Hz (i.e., a delay time of δt = 0.4 s), the colloids can not reorient sufficiently fast and are most of the time oriented with their carbon cap pointing in the direction orthogonal to the substrate they are moving on. As a result, the Janus colloids employed as ABPs here essentially behave like isotropic active colloids.

The relaxation time of the propulsion mechanism of the ABPs is around 0.1 s30. Since the time δt in between changes of the laser spot positions is larger than this propulsion relaxation time, the ABPs react quasi-instantaneously to changes in the driving direction.

To compensate for the mechanical instabilities of the optical setup that result in slight misalignments between the laser focus and the ABP positions, we carried out periodical recalibrations throughout all our measurements.

Simulation model

The motion of the swarmalators is described by an ABP model of self-propelled particles with hydrodynamic interactions. An ABP experiences a propulsion force fp acting along an orientation vector ei. The motion of such an ABP at position ri is governed by

$$m{\ddot{{{{\bf{r}}}}}}_{i}={f}_{p}{{{{\bf{e}}}}}_{i}-\gamma {\dot{{{{\bf{r}}}}}}_{i}+\sqrt{2{D}_{t}{\gamma }^{2}}{{{{\boldsymbol{\zeta }}}}}_{i}+{{{{\bf{F}}}}}_{{{{\rm{HI}}}}}({{{{\bf{r}}}}}_{i}),$$
(5)

where γ is the damping coefficient related to the fluid viscosity, Dt is the thermal translational diffusion coefficient of the particle, and ζi is a Gaussian random process with 〈ζi(t)〉 = 0 and \(\langle {{{{\boldsymbol{\zeta }}}}}_{i}(t){{{{\boldsymbol{\zeta }}}}}_{j}({t}^{{\prime} })\rangle={\delta }_{ij}\delta (t-{t}^{{\prime} })\). For a particle speed of u0, the required propulsion force is given by fp = γu0. The swarmalators interact hydrodynamically via the interaction FHI(ri) = γUHI(ri), due to the movement of the fluid by each swarmalator. Here, the flow field UHI(ri) is given by

$${{{{\bf{U}}}}}_{{{{\rm{HI}}}}}({{{{\bf{r}}}}}_{i})={\sum}_{j}{{{{\bf{U}}}}}_{flow,j}({{{{\bf{r}}}}}_{i}-{{{{\bf{r}}}}}_{j})+{{{{\bf{U}}}}}_{lub,j}({{{{\bf{r}}}}}_{i}-{{{{\bf{r}}}}}_{j})$$
(6)

where the sum is over all particles j within some cutoff distance RHI, i.e., ri − rj < RHI. The first term Uflow,j is the hydrodynamic force generated at the position of particle i due to the self-propulsion of the particle j, and is modeled using the squirmer flow field49,50

$${{{{\bf{U}}}}}_{flow,j}(r)=-\frac{p}{{r}^{2}}[1-3{({{{{\bf{e}}}}}_{j}\cdot \hat{{{{\bf{r}}}}})}^{2}]\hat{{{{\bf{r}}}}}-\frac{s}{{r}^{3}}[{{{\bf{e}}}}_{j}-3({{{{\bf{e}}}}}_{j}\cdot \hat{{{{\bf{r}}}}})\hat{{{{\bf{r}}}}}]$$
(7)

with r = ri − rj, r = r and \(\hat{{{{\bf{r}}}}}={{{\bf{r}}}}/r\). The first term decaying as 1/r2 is due to a force dipole of strength p = − 3βu0a2/4, and the second term corresponds to a source dipole of strength s = u0a3/2, where β is the squirmer parameter that measures the asymmetry in the flow field and a is the particle radius. For β > 0, we have a puller, and for β < 0, we have a pusher. For light-activated colloids, we expect no strong dipole contributions, i.e., β < 1.

In addition to the squirmer (far-field) interactions, we also include (near-field) lubrication forces between swarmalators51, as squirmer interactions alone are insufficient to account for the strong hydrodynamic interactions observed in the experiment (see SI section 2; Fig. S6). The flow field related to lubrication forces is given by

$${{{{\bf{U}}}}}_{lub,j}(r)=-\frac{a}{h}(\dot{{{{\bf{r}}}}}\cdot \hat{{{{\bf{r}}}}})\Theta (r)\hat{{{{\bf{r}}}}}$$
(8)

where \(\dot{{{{\bf{r}}}}}={\dot{{{{\bf{r}}}}}}_{i}-{\dot{{{{\bf{r}}}}}}_{j}\) is the relative velocity between particle j and i, h = r − 2a is the shortest distance between the surface of the two particles, and \(\Theta (r)=\exp (-r/{R}_{0})\) is a cutoff function whose decay radius R0 is determined by matching the data to the experiment (see SI section 2; Fig. S6).

The ABP orientation vector ei(t) at any time instant t is determined by the position of the laser spot li(t), so that ei(t) = (ri(t) − li(t))/ri(t) − li(t), as the particle moves in the direction away from the laser spot. By choosing this update scheme that matches the experimental setup, we are able to closely replicate the experimental conditions and obtain very good agreement for the single particle motion (see SI section 1; Fig. S5). The laser spot is updated every delay time δt, with the update rule

$${{{{\bf{l}}}}}_{i,t+\delta t}={{{{\bf{r}}}}}_{i,t+\delta t}-{l}_{0}\frac{({{{{\bf{q}}}}}_{i,t}-{{{{\bf{r}}}}}_{i,t})}{| {{{{\bf{q}}}}}_{i,t}-{{{{\bf{r}}}}}_{i,t}| }$$
(9)

where l0 is the distance from the particle center at which the laser is illuminated, and qi,t − ri,t is the displacement vector between the particle's reference position qi and the particle's position ri one delay time prior, i.e., at (t + δt) − δt. The system lies in the regime of low Reynolds number, so that we simulate equation (5) in the over-damped regime, i.e., m/γ δt, so that effectively

$${\dot{{{{\bf{r}}}}}}_{i}\simeq {v}_{0}{{{{\bf{e}}}}}_{i}+\sqrt{2{D}_{t}}{{{{\boldsymbol{\zeta }}}}}_{i}+{{{{\bf{U}}}}}_{{{{\rm{HI}}}}}$$
(10)

The equation of motion (5) is solved using the Velocity-Verlet integration scheme52. All the simulation parameters along with the corresponding experimental values are collected in Table 1.

Table 1 Table showing the simulation parameters and the corresponding value in the experiment

Reference position update

To couple the motion of the swarmalator to its rotational oscillations, a reference-point update rule based on the swarmalators past trajectory is implemented, with reference position qi,t updated every delay time as

$${{{{\bf{q}}}}}_{i,t+\delta t}={{{{\bf{q}}}}}_{i,t}+\Gamma \cdot ({{{{\bf{R}}}}}_{i,t}-{{{{\bf{q}}}}}_{i,t})$$
(11)

where \({{{{\bf{R}}}}}_{i,t}=\frac{1}{T}{\sum }_{t-T}^{t}{{{{\bf{r}}}}}_{i,t}\) is the average position of the swarmalator measured over the last T time steps, and Γ controls the strength of the displacement of the new reference position. Moreover, to prevent the reference positions from coming too close together—which could cause collision between particles—an exclusion algorithm between the reference positions is implemented following a Monte-Carlo procedure. Thus, every reference update qi,t is accepted with probability

$${P}_{i}=\exp (-\Delta E/{k}_{b}T)$$
(12)

where

$$\Delta E=\mathop{\sum}_{i\ne j}{V}_{{{{\rm{LJ}}}}}(| {{{{\bf{q}}}}}_{i,t}-{{{{\bf{q}}}}}_{i,t-\delta t}| )-{V}_{{{{\rm{LJ}}}}}(| {{{{\bf{q}}}}}_{i,t-\delta t}-{{{{\bf{q}}}}}_{i,t-\delta t}| ),$$
(13)

and VLJ is the truncated Lennard-Jones potential given by

$${V}_{{{{\rm{LJ}}}}}(r)=\left\{\begin{array}{ll}4\varepsilon {\left(\frac{{R}_{\max }}{r}\right)}^{12}\quad &r\le {R}_{\max }\\ 0,\hfill \quad &r > {R}_{\max }\end{array}\right.$$
(14)

Here \({R}_{\max }\) is the minimum desired reference-point separation. The particle distribution around the reference points indicates that particles can reach distances of up to 2.0 μm from their reference positions (see Fig. S5a), thereby suggesting a minimum center-to-center separation of \({R}_{\max }=10\) μm (particle radius 3 μm) for the reference points to avoid overlapping ABPs. We therefore set ϵ/kbT = 0.2, so that while particles typically maintain a separation of \({R}_{\max }\), strong hydrodynamic forces can bring the particles closer together. Given the initialization density is around 0.003 μm−2, for weak or no clustering (Γ  0.0), the clustering coefficient is expected to remain low, as there is, on average, only one particle per box of side length 18 μm. Therefore, we choose a cutoff of 15 μm to measure clustering in the system. Additionally, in simulations, particles closer than 6.25 μm are excluded from the analysis, since lubrication forces become too strong and the behavior is uncontrolled and ill-defined.