Karthik Elamvazhuthi
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # But What Do Bees Do? ![Screenshot 2025-10-16 at 5.59.31 PM](https://hackmd.io/_uploads/Hy2ZwbkAgx.png) In this note, we consider an odd way to address the deadlock avoidance problem. To recap, when we looked at the model in the previous note, it seemed like deadlock avoidance was fundamentally hard as a [feedback stabilization problem](https://hackmd.io/pavUBAyfQ3iOet1q_RdlwQ), unless we relaxed the problem in some way. We see how bees might have addressed this problem, partly by what I think is a form of *state-space expansion*. Let us consider this modified [model of decision making based on observations of house hunting in bees by Seeley and coauthors](https://www.science.org/doi/10.1126/science.1210361). $$ \begin{aligned} \dot{x}_A &= -\big(v_{AU} + v_{AB}\big)x_A + v_{UA}x_U + v_{BA}x_B,\\[4pt] \dot{x}_B &= -\big(v_{BU} + v_{BA}\big)x_B + v_{UB}x_U + v_{AB}x_A,\\[4pt] \dot{x}_U &= -\big(v_{UA} + v_{UB}\big)x_U + v_{AU}x_A + v_{BU}x_B. \end{aligned} $$ The new state $U$ denotes the *uncommitted* state. This extra state has been a source of my confusion and overthinking for 10 years since I came across the model. The problem can now be framed again in terms of this equation. The goal is to design feedback laws $v_{i,j}(\cdot)$ so that - $(1,0,0)$ is globally asymptotically stable if $A>B$, - $(0,1,0)$ is globally asymptotically stable if $B>A$, - $(1,0,0)$ and $(0,1,0)$ are locally asymptotically stable if $A = B$. Given this objective, lets see what bees do under this context. A small modification of the [observation of bees by Seeley et al.](https://www.science.org/doi/10.1126/science.1210361) is the following choice of rates: $$ \begin{aligned} v_{UA} &= \gamma_A + \rho x_A, & v_{UB} &= \gamma_B + \rho x_B, \\ v_{AU} &= \sigma x_B, & v_{BU} &= \sigma x_A. \end{aligned} $$ A very important role is played by the *cross-inhibition* term $\sigma x_i$. In practice, bees achieve cross-inhibition by [head-butting](https://valleybees.org.au/wp-content/uploads/2017/11/HEAD-BUTTS.pdf). The rest of the rates are set to $0$. The interpretations of the parameters are as follows: - $\gamma_i$ is a spontaneous discovery effect proportional to the quality of site $i$. - $\rho > 0$ captures the population recruitment effect. - $\sigma > 0$ is the cross-inhibition effect that introduces negative feedback into the system. Since $x_A + x_B + x_U = 1$ for all time, the dynamics live on the two-dimensional simplex, and we can eliminate $x_U$ by substituting $x_U = 1 - x_A - x_B$. The system reduces to $$ \begin{aligned} \dot{x}_A &= (\gamma_A + \rho x_A)(1 - x_A - x_B) - \sigma\, x_A x_B, \\[4pt] \dot{x}_B &= (\gamma_B + \rho x_B)(1 - x_A - x_B) - \sigma\, x_A x_B. \end{aligned} $$ ## 1. Equilibria A direct calculation (Appendix A) shows that the equilibria of the system are organized by a single parameter, $$ \delta := \frac{\gamma_B - \gamma_A}{\rho}, $$ which measures the quality difference between the two sites in units of recruitment strength. There are always two **vertex equilibria**, $(1,0,0)$ and $(0,1,0)$, corresponding to unanimous commitment to one site. In addition, when $|\delta| < 1$, there is a unique **interior equilibrium** $(x_A^*, x_B^*, x_U^*)$ with all three components strictly positive. At the boundary $|\delta| = 1$, the interior equilibrium collides with one of the vertices, and for $|\delta| > 1$ it leaves the simplex entirely. So the parameter $\delta$ partitions the design space into three regimes by equilibrium count: three equilibria when the sites are close in quality, two when one is clearly better, and a transcritical bifurcation in between. ## 2. Stability A linearization at each equilibrium (Appendix B) gives the following picture. **Vertex equilibria.** The vertex $(1,0,0)$ has determinant $\sigma\rho(1 - \delta)$ and the vertex $(0,1,0)$ has determinant $\sigma\rho(1 + \delta)$. Both traces are negative. So: | $\delta$ regime | $(1,0,0)$ | $(0,1,0)$ | |---|---|---| | $\delta < -1$ | stable | saddle | | $-1 < \delta < 1$ | **stable** | **stable** | | $\delta > 1$ | saddle | stable | The regime $|\delta| < 1$ is bistable: both decisions are locally attracting. Note the structural role of $\sigma$: setting $\sigma = 0$ makes the determinant vanish at both vertices, leaving them marginally stable rather than attracting. Cross-inhibition is what gives the decision states their basin structure. **Interior equilibrium.** Whenever it exists, the interior equilibrium is a **saddle**. The proof (Appendix B) uses the equilibrium identity $\mu x_U^* = \sigma x_A^* x_B^*$ to show that $\det J < 0$ there. The saddle has a one-dimensional stable manifold which acts as a separatrix between the basins of the two vertices. ![simplex](https://hackmd.io/_uploads/Bkalo11abg.gif) ## 3. Discussion Putting the pieces together, the simplex dynamics has three regimes: - **Both are kinda similar ($|\delta| < 1$).** Two stable vertices and one interior saddle. The decision choice depends on initial conditions. - **One is kind of better ($|\delta| = 1$).** The saddle collides with the losing decision. - **Obvious winner ($|\delta| > 1$).** Only the winning decision is stable. Almost every trajectory converges to the winner. The state-space expansion does not satisfy the original design specification, which asked for global stability of the better decision whenever $A \neq B$. In the *Both are kinda similar ($|\delta| < 1$) regime*, the model is bistable. Therefore, the solution has created a band around the point of equal decision quality around which we achieve bistability. The impossibility result from the previous note relied on a continuity argument at $A = B$ seems to have been gotten around by relaxing the objective, not necessarily by expanding the state space. ## 4. Could We Have Done This in Two States? A natural question is whether the bistable band is genuinely a consequence of state-space expansion, or whether the two-state model can also exhibit it. The answer is that the two-state model can indeed reproduce a bistable band as well. Recall the [two-state setup](https://hackmd.io/pavUBAyfQ3iOet1q_RdlwQ): $x_A + x_B = 1$, with $$ \dot x_A = -u_{AB} x_A + u_{BA} x_B. $$ Consider rates of the form $$ u_{AB} = \phi(A - B) + \psi(x_A, x_B; A, B), \qquad $$$$u_{BA} = \phi(B - A) + \psi(x_B, x_A; B, A), $$ where $\phi: \mathbb{R} \to \mathbb{R}_{\geq 0}$ is a smooth threshold function (zero for sufficiently negative argument, positive for sufficiently positive argument) and $\psi$ is a small symmetric stabilizing term that makes both vertices locally attracting. Then: - For $|A - B|$ large, $\phi$ dominates and drives the swarm to the better site, recovering the feedforward construction from the previous note. - For $|A - B|$ small, $\phi \approx 0$ and the $\psi$ term creates bistability at both vertices. The width of the bistable band can be adjusted by the threshold scale of $\phi$ and can be made as small as desired. But notice the role mean-field coupling plays here. The site-discrimination work is done by $\phi(A - B)$, each bee independently reads the quality difference and switches accordingly. The mean-field term $\psi$ enters as a separate add-on to stabilize the decisions and create the band. We test this on an example with the following choice of control: $$ \phi(z) = \max(0,\; z - \varepsilon), \qquad \varepsilon = 0.25 $$ $$ u_{AB} = \phi(B - A) + c\, x_B^2, \qquad u_{BA} = \phi(A - B) + c\, x_A^2, \qquad c = 1 $$ With $A - B = 0.10$ and $\varepsilon = 0.25$, both $\phi$ terms vanish (we are inside the band), so the dynamics reduce to $$ \dot x_A = -x_B^2\, x_A + x_A^2\, x_B = x_A\, x_B\,(x_A - x_B) = x_A(1 - x_A)(2x_A - 1) $$ which is exactly the quadratic construction from the previous note with $A = B = 1$. The equilibria are at $0$, $\tfrac{1}{2}$, and $1$, with a saddle at $\tfrac{1}{2}$ and both vertices stable. The following gif shows different swarm populations (each bee marker represents a single population) starting from different initial fractions $x_A$ and evolving under the flow. Swarms starting to the left of the saddle at $x_A = \tfrac{1}{2}$ commit to $B$; those starting to the right commit to $A$. The lower panel shows $\dot x_A$ as a function of $x_A$ — negative on the left half, positive on the right — confirming the bistable structure. ![bee_twostate](https://hackmd.io/_uploads/SkJCsyJaZx.gif) In the three-state Seeley model, by contrast, site quality enters only through the $\gamma_i$ asymmetry, and the actual decision dynamics are carried entirely by mean-field coupling. The same population interactions that produce the bistable band also do the discrimination. All of these models seem to indicate that the role of mean-field terms, that is, interaction within the population is mainly the key behind avoiding deadlock through some relaxation. ## 5. What Does This Say About Feedback Stabilizability for Collective Decision Making? It looks like state-space expansion does not resolve the [obstruction to stabilizability](https://hackmd.io/pavUBAyfQ3iOet1q_RdlwQ). But it does relax the problem through a specific choice of control law inspired by bees. By introducing the uncommitted state $U$, we converted the rigid demand "stabilize the correct decision globally" into the softer demand "stabilize *some* vertex locally, with the correct one favored when the quality gap is large." All the smooth symmetric feedback laws we have seen have given up something: global correctness, deadlock avoidance, or smoothness. State-space expansion gives up *global correctness in the region of near-equal quality*. The two-state construction with $\phi + \psi$ makes the same trade more crudely and less interpretably. Neither does something the other cannot. The broader question is the following when feedback stabilizability fails, which relaxations are the most important, and which ones belong in a general theoretical framework of collective decision making as an instance of feedback stabilization? ## Reference The model presented here is from the paper, [Thomas D. Seeley, P. Kirk Visscher, Thomas Schlegel, Patrick M. Hogan, Nigel R. Franks, and James A. R. Marshall. Stop Signals Provide Cross Inhibition in Collective Decision-Making by Honeybee Swarms](https://www.science.org/doi/10.1126/science.1210361) --- ## Appendix A: Computing the Equilibria At equilibrium we require $\dot{x}_A = \dot{x}_B = 0$. Subtracting the two equilibrium equations of the original three-state system yields $$ \big[(\gamma_A+\rho x_A)-(\gamma_B+\rho x_B)\big]x_U=0, $$ so every equilibrium satisfies either $x_U = 0$ or $x_A - x_B = (\gamma_B - \gamma_A)/\rho$. **Case (i): $x_U = 0$.** With $x_A + x_B = 1$, the equation $\dot x_A = 0$ reduces to $\sigma x_A x_B = 0$, giving the two vertex equilibria $(1,0,0)$ and $(0,1,0)$. **Case (ii): $x_U > 0$.** Define $\delta := (\gamma_B - \gamma_A)/\rho$. Then $x_B = x_A + \delta$ and $x_U = 1 - 2x_A - \delta$. Plugging into $\dot x_A = 0$: $$ (\gamma_A+\rho x_A)(1-2x_A-\delta)=\sigma x_A(x_A+\delta). $$ This is a quadratic in $x_A$, with solutions $$ x_A^*=\frac{-B\pm\sqrt{B^2-4(2\rho+\sigma)C}}{2(2\rho+\sigma)}, \quad B := 2\gamma_A-\rho+(\rho+\sigma)\delta, \quad C := -\gamma_A(1-\delta). $$ Once $x_A^*$ is fixed, $x_B^* = x_A^* + \delta$ and $x_U^* = 1 - 2x_A^* - \delta$. To count interior equilibria in the simplex, define $f(x) := (\gamma_A+\rho x)(1-2x-\delta) - \sigma x(x+\delta)$. If $|\delta| < 1$, the positivity of the parameters gives $f(0) > 0$ and $f(1) < 0$, so there is exactly one root in $(0,1)$. At $\delta = 1$, $f(0) = 0$ and the root collides with the vertex $(0,1,0)$; at $\delta = -1$ it collides with $(1,0,0)$. For $|\delta| > 1$ no feasible root exists. ## Appendix B: Stability Calculations The Jacobian of the reduced two-variable system $$ \dot{x}_A = (\gamma_A + \rho x_A)(1 - x_A - x_B) - \sigma x_A x_B, $$$$\dot{x}_B = (\gamma_B + \rho x_B)(1 - x_A - x_B) - \sigma x_A x_B $$ is, writing $x_U = 1 - x_A - x_B$, $$ J = \begin{bmatrix} \rho x_U - (\gamma_A + \rho x_A) - \sigma x_B & -(\gamma_A + \rho x_A) - \sigma x_A \\[6pt] -(\gamma_B + \rho x_B) - \sigma x_B & \rho x_U - (\gamma_B + \rho x_B) - \sigma x_A \end{bmatrix}. $$ **At $(1, 0, 0)$:** Substituting $x_A = 1$, $x_B = 0$, $x_U = 0$, $$ J\big|_{(1,0,0)} = \begin{bmatrix} -(\gamma_A + \rho) & -(\gamma_A + \rho + \sigma) \\[4pt] -\gamma_B & -(\gamma_B + \sigma) \end{bmatrix}. $$ The trace is $-(\gamma_A + \rho) - (\gamma_B + \sigma) < 0$. The determinant simplifies: $$ \det J = (\gamma_A + \rho)(\gamma_B + \sigma) - \gamma_B(\gamma_A + \rho + \sigma) = \sigma(\gamma_A - \gamma_B + \rho) = \sigma\rho(1 - \delta). $$ Stability is controlled by the sign of the determinant: $(1,0,0)$ is a stable node iff $\delta < 1$, and a saddle iff $\delta > 1$. **At $(0, 1, 0)$:** By the $A \leftrightarrow B$ symmetry, $\det J = \sigma\rho(1 + \delta)$, so $(0,1,0)$ is stable iff $\delta > -1$. **At the interior equilibrium.** The equilibrium identities $$ \mu := \gamma_A + \rho x_A^* = \gamma_B + \rho x_B^*, \qquad \mu x_U^* = \sigma x_A^* x_B^* $$ let us write the Jacobian as $$ J\big|^* = \begin{bmatrix} \rho x_U^* - \mu - \sigma x_B^* & -\mu - \sigma x_A^* \\[4pt] -\mu - \sigma x_B^* & \rho x_U^* - \mu - \sigma x_A^* \end{bmatrix}. $$ Expanding the determinant and cancelling, we get $$ \det J = \rho x_U^* \cdot \big( \rho x_U^* - 2\mu - \sigma(x_A^* + x_B^*) \big). $$ We claim the second factor is negative. From $\mu \geq \rho x_A^*$ and $\mu x_U^* = \sigma x_A^* x_B^*$, $$ \rho x_A^* x_U^* \leq \mu x_U^* = \sigma x_A^* x_B^* \implies \rho x_U^* \leq \sigma x_B^*, $$ and symmetrically $\rho x_U^* \leq \sigma x_A^*$. Adding these, $$ 2\rho x_U^* \leq \sigma(x_A^* + x_B^*) < 2\mu + \sigma(x_A^* + x_B^*), $$ so $\rho x_U^* < 2\mu + \sigma(x_A^* + x_B^*)$. The second factor is therefore negative, and $\det J < 0$. The interior equilibrium is a saddle whenever it exists.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully