# PBRF Layer 2 NBM v0.5 Initial Simulation Plan ## 1. Objective This document outlines the plan for initial computational experiments using the refined PBRF Layer 2 formalism, the Dynamic Causal Influence Network (DCIN) v0.5, as defined in [[archive/projects/PBRF/0238_PBRF_L2_NBM_Definition_v0.5]]. The primary goals of these simulations are: 1. **Verification:** Verify that the conservation of `Σ S_i` holds despite the introduction of dynamic edge weights `w_ji(t)`. 2. **Aggregation Mechanism Exploration:** Test whether the dynamic weight update rule (driven by `α_S`, `α_P`) can lead to spontaneous aggregation or clustering of the conserved quantity `S` from various initial conditions. 3. **Parameter Interaction:** Explore the interplay between the new dynamic weight parameters (`α_S`, `α_P`, `λ`) and the existing persistence resistance (`β`) and context modulation (`ε`) parameters. 4. **Pattern Formation:** Observe the types of patterns (if any) that emerge under different parameter regimes. ## 2. Formalism Recap (DCIN v0.5) * **Network:** Directed graph `G=(V, E)` with dynamic edge weights `w_ji(t) ≥ 0`. * **States:** Node state `S_i ∈ ℝ`, Node persistence `P_i ∈ ℝ≥0`. * **Context:** `Context_i(t) = Avg(S_k)` over incoming neighbors (using `w_{ki}(t)`). * **Potential:** `Φ_i(t) = S_i(t) * (1 + ε * Context_i(t))`. * **Flow:** `Flow_{ji}(t) = [ w_{ji}(t) / (1 + β * P_i(t)) ] * (Φ_j(t) - Φ_i(t))`. * **State Update:** `S_i(t+1) = S_i(t) + Δt * [Net Flow]` (inherently conservative). * **Persistence Update:** `P_i(t+1) = P_i(t) * exp(-γ * |ΔS_i|) + δ * (1 - exp(-γ * |ΔS_i|))`. * **Weight Update:** `w_{ji}(t+1) = max(0, w_{ji}(t) + Δt * [ α_S*f_S(S_j,S_i) + α_P*f_P(P_j,P_i) - λ*w_{ji}(t) ])`. * `f_S = S_j(t) * S_i(t)` (proposed) * `f_P = P_j(t) * P_i(t)` (proposed) ## 3. Simulation Setup * **Environment:** Standard scientific computing environment (e.g., Python with NumPy/SciPy, NetworkX). * **Time:** Discrete sequence steps `t = 0, 1, 2, ...`. Set `Δt = 1`. * **Default Parameters:** `γ = 0.1`, `δ = 0.1`, `β = 0`, `ε = 0`, `α_S = 0`, `α_P = 0`, `λ = 0.01` (small decay unless varied). * **Initial Conditions:** * `S_i(0)`: Uniform random noise around a baseline (e.g., `S_i(0) ~ U(0, 0.1)`), or specific patterns. Ensure `Σ S_i(0)` is known. * `P_i(0)`: Initialized low (e.g., `P_i(0) = δ`). * `w_ji(0)`: Initialized uniformly low (e.g., `w_ji(0) = 0.1`) for all potential edges in the chosen topology. * **Network Topology:** Start with a 2D grid (e.g., 20x20) with connections to nearest neighbors (e.g., 4 or 8 neighbors), potentially with periodic boundary conditions. ## 4. Proposed Experiments **Experiment 1: Conservation Verification (v0.5)** * **Objective:** Numerically verify that `Σ_i S_i(t)` remains constant when edge weights are dynamic. * **Network:** Small closed network (e.g., 5x5 grid with periodic boundaries). * **Parameters:** Set `α_S > 0` or `α_P > 0`, `λ > 0`. Other parameters arbitrary (but non-zero where applicable, e.g., `β>0`, `ε≠0`). Random initial `S_i(0)`. * **Procedure:** Run simulation for T steps (e.g., T=200). Calculate `TotalS(t) = Σ_i S_i(t)` at each step. * **Expected Outcome:** `TotalS(t)` should remain constant within machine precision. * **Analysis:** Plot `TotalS(t)` vs `t`. Check for drift. **Experiment 2: Baseline (No Aggregation Forces)** * **Objective:** Establish baseline behavior with dynamic weights but no attraction forces. * **Network:** 2D grid (e.g., 20x20), periodic boundaries. * **Parameters:** Set `α_S = 0`, `α_P = 0`. Keep `λ > 0` (e.g., 0.01) so weights decay slowly. Set `β = 0`, `ε = 0`. Initial condition: Random noise `S_i(0) ~ U(0, 0.1)`. `w_ji(0) = 0.1`. * **Procedure:** Run simulation (e.g., T=500). * **Expected Outcome:** `S` should diffuse towards a uniform state. Weights `w_ji` should slowly decay towards 0 due to `λ`. * **Analysis:** Visualize `S_i(t)` and `w_ji(t)` distributions. Plot average `S` and average `w`. **Experiment 3: State-Based Attraction (`α_S > 0`)** * **Objective:** Test if attraction based on state density drives aggregation. * **Network:** 2D grid. * **Parameters:** Set `α_P = 0`, `β = 0`, `ε = 0`. Vary `α_S > 0` (e.g., 0.1, 1.0, 10.0). Keep `λ = 0.01`. Initial condition: Random noise `S_i(0) ~ U(0, 0.1)`. `w_ji(0) = 0.1`. * **Procedure:** Run simulation (e.g., T=1000 or longer). * **Expected Outcome (Hypothesis):** Regions with higher `S` should develop stronger internal connections (`w_ji` increases where `S_i*S_j` is high). This might lead to the formation of distinct high-density clusters separated by low-density regions with weak connections. * **Analysis:** Visualize `S_i(t)` and `w_ji(t)` distributions. Look for cluster formation. Use clustering metrics (e.g., spatial autocorrelation, cluster size distribution). Analyze the relationship between local `S` density and local average `w`. **Experiment 4: Persistence-Based Attraction (`α_P > 0`)** * **Objective:** Test if attraction based on persistence drives aggregation. * **Network:** 2D grid. * **Parameters:** Set `α_S = 0`, `β = 0`, `ε = 0`. Vary `α_P > 0` (e.g., 0.1, 1.0, 10.0). Keep `λ = 0.01`. Initial condition: Random noise `S_i(0) ~ U(0, 0.1)`. `w_ji(0) = 0.1`. * **Procedure:** Run simulation (e.g., T=1000 or longer). * **Expected Outcome (Hypothesis):** Regions that happen to become stable (`P_i` increases) should develop stronger internal connections. Will this reinforce existing density fluctuations or lead to different types of structures compared to state-based attraction? * **Analysis:** Visualize `S_i(t)`, `P_i(t)`, and `w_ji(t)` distributions. Look for cluster formation. Compare results with Exp 3. Analyze the relationship between local `P` and local average `w`. **Experiment 5: Combined Attraction (`α_S > 0, α_P > 0`)** * **Objective:** Observe the combined effect of state and persistence attraction. * **Network:** 2D grid. * **Parameters:** Set `β = 0`, `ε = 0`. Choose positive values for `α_S`, `α_P`, `λ`. Initial condition: Random noise. * **Procedure:** Run simulation. * **Expected Outcome (Hypothesis):** Potentially stronger or faster aggregation, favoring connections between regions that are both dense *and* stable. * **Analysis:** Visualize `S`, `P`, `w`. Compare with Exp 3 and Exp 4. **Experiment 6: Interaction with Resistance (`β`) and Context (`ε`)** * **Objective:** Explore how aggregation (dynamic weights) interacts with persistence resistance and context modulation. * **Network:** 2D grid. * **Parameters:** Choose effective values for `α_S`, `α_P`, `λ` based on previous experiments. Now introduce `β > 0` or `ε ≠ 0` (one at a time, then combined). Initial condition: Random noise or specific pattern (e.g., two separate clusters). * **Procedure:** Run simulation. * **Expected Outcome (Hypothesis):** * `β > 0`: Might slow down the aggregation process or stabilize the resulting clusters against further change. * `ε > 0`: Might accelerate dynamics within clusters or at boundaries. * `ε < 0`: Might slow dynamics or enhance segregation between clusters. * **Analysis:** Compare visualizations and metrics with the corresponding cases where `β=0` and `ε=0`. ## 5. Outputs and Analysis * Time series data for `S_i(t)`, `P_i(t)`, `w_ji(t)`. * Calculation of total `Σ S_i(t)` (for Exp 1). * Visualizations of `S`, `P`, `w` distributions on the 2D grid at different times `t`. * Quantitative metrics: Average `S`, `P`, `w`; spatial autocorrelation of `S`; cluster size distribution (if clusters form). * Comparison plots across different parameter regimes (`α_S`, `α_P`, `β`, `ε`). ## 6. Scope and Limitations * Focus on verifying conservation and exploring aggregation via dynamic weights on a fixed topology (2D grid). * Does not include edge creation/deletion. * Limited exploration of parameter space and initial conditions. * Does not aim to reproduce specific physical phenomena quantitatively. Results will indicate whether dynamic edge weights provide a viable mechanism for aggregation within the DCIN framework and how this interacts with other defined mechanisms. This will inform the next iteration (v0.6). **Next Step:** Implement the DCIN v0.5 model and execute these experiments. Create node `0240_PBRF_L2_NBM_v0.5_Initial_Sim_Results`.