You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is the mathematical foundation behind NeuralMeshLite, covering the neural computations, evolutionary operators, and swarm coordination mechanisms.
📐 Mathematical Foundations of NeuralMeshLite
1. Micro-Mind Neural Network Forward Pass
Each micro-mind contains a tiny feedforward network with one hidden layer.
Fitness $F$ measures task performance. For a batch of tasks:
$$F = \frac{1}{N}\sum_{i=1}^N \mathcal{L}(\hat{\mathbf{y}}_i, \mathbf{y}_i)$$
where $\mathcal{L}$ is task-specific (e.g., cross-entropy for classification).
Given two parent parameter sets $\boldsymbol{\theta}^{(1)}$ and $\boldsymbol{\theta}^{(2)}$, child parameters are computed via element-wise averaging:
$$\boldsymbol{\theta}^{(\text{child})} = \frac{\boldsymbol{\theta}^{(1)} + \boldsymbol{\theta}^{(2)}}{2}$$
Parameters are perturbed with additive Gaussian noise:
$$\theta_j' = \theta_j + \epsilon, \quad \epsilon \sim \mathcal{N}(0, \sigma^2)$$
where $\sigma$ is the mutation rate.
Given a task type $T$, the swarm selects a specialist mind. The probability of selecting mind $i$ is:
$$P(i | T) = \begin{cases}
\frac{1}{N_T} & \text{if specialization}(i) = T \text{ and } N_T > 0 \
\frac{1}{N} & \text{otherwise (fallback to any)}
\end{cases}$$
where $N_T$ is the number of minds specialized in task $T$.
The swarm maintains a fixed size $N$. After evolution, the population is:
$$\mathcal{P}_{t+1} = \mathcal{E} \cup \mathcal{O}$$
where $\mathcal{O}$ are $N - e$ offspring generated via selection, crossover, and mutation.
9. Softmax Activation (Output Layer)
For classification tasks, the output logits $\mathbf{z}$ are transformed to probabilities:
$$\hat{y}i = \frac{e^{z_i}}{\sum{j=1}^{d_{\text{out}}} e^{z_j}}$$
This is handled internally by Axon's :softmax activation.