Skip to content
Merged
330 changes: 312 additions & 18 deletions GNN_LLM.py

Large diffs are not rendered by default.

Empty file added cluster/experiment.sh
Empty file.
13 changes: 9 additions & 4 deletions cluster/experiment1.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/bin/bash

#cd /the/place/where/everything/happens
conda run -n neural-graph \
python /somewhere/do_thework.py
echo "Some success message"
cd /groups/saalfeld/home/allierc/Graph/NeuralGraph

# Activate conda environment
source /groups/saalfeld/home/allierc/miniforge3/etc/profile.d/conda.sh
conda activate neural-graph

python GNN_LLM.py

echo "Experiment completed"

72 changes: 72 additions & 0 deletions config/signal/signal_fig_2 copy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
description: "Figure 2 baseline - 1000 neurons, 4 types, no noise, no external inputs"
dataset: "signal_fig_2"

simulation:
connectivity_type: "Lorentz"
connectivity_init: [0, 0.1]
# params: [g, s, c]
# du = -c * u + s * torch.tanh(u) + g * msg
params:
[[10.0, 1.0, 1.0], [10.0, 2.0, 1.0], [10.0, 1.0, 2.0], [10.0, 2.0, 2.0]]
phi: "tanh"
n_neurons: 1000
n_neuron_types: 4
n_frames: 100000
delta_t: 0.01
dpos_init: 0
boundary: "no"
start_frame: -1000

graph_model:
signal_model_name: "PDE_N2"
particle_model_name: ""
mesh_model_name: ""
prediction: "first_derivative"

input_size: 1
output_size: 1
hidden_dim: 64
n_layers: 3

input_size_update: 3
n_layers_update: 3
hidden_dim_update: 64

aggr_type: "add"
embedding_dim: 2
update_type: "none"

plotting:
colormap: "tab10"
arrow_length: 1
xlim: [-4, 4]
ylim: [-8, 8]
label_style: "greek"
mlp0_xlim: [-5, 5]
mlp0_ylim: [-8, 8]
mlp1_xlim: [-5, 5]
mlp1_ylim: [-1.1, 1.1]

training:
n_epochs: 10
n_runs: 1
device: "auto"

batch_size: 8
small_init_batch_size: False

seed: 16

data_augmentation_loop: 50

sparsity: "replace_embedding_function"
sparsity_freq: 4
cluster_method: "distance_plot"
cluster_distance_threshold: 0.1
fix_cluster_embedding: True

learning_rate_W_start: 1.0E-3
learning_rate_start: 5.0E-4
learning_rate_embedding_start: 7.50E-4

coeff_lin_phi_zero: 1.0
96 changes: 96 additions & 0 deletions config/signal/signal_fig_3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
description: "test neuro-neuron dependent structure matrix modulation noise_model_level: 1 batch_size: 8"
dataset: "signal_fig_3"

simulation:
connectivity_type: "Lorentz"
connectivity_init: [0, 0.1]
external_input_type: "visual"
external_input_mode: "multiplicative"
# params: [a, b, g, s, w, h]
# a: decay, b: offset, g: gain, s: self-recurrence, w: width, h: threshold MLP1((u-h)/w)
params:
[
[1.0, 0.0, 10.0, 1.0, 1.0, 0.0],
[1.0, 0.0, 10.0, 2.0, 2.0, 0.0],
[2.0, 0.0, 10.0, 1.0, 4.0, 0.0],
[2.0, 0.0, 10.0, 2.0, 8.0, 0.0],
]
phi: "tanh"
n_neurons: 2048
n_input_neurons: 1024
n_neuron_types: 4
n_frames: 50000
delta_t: 0.01
dpos_init: 0
boundary: "no"
start_frame: -10000
node_value_map: "video_bisons_32.tif"
noise_model_level: 1

graph_model:
signal_model_name: "PDE_N4"
particle_model_name: ""
mesh_model_name: ""
prediction: "first_derivative"

input_size: 3
output_size: 1
hidden_dim: 64
n_layers: 5

input_size_update: 3
n_layers_update: 3
hidden_dim_update: 64

input_size_nnr_f: 3
n_layers_nnr_f: 5
hidden_dim_nnr_f: 128
output_size_nnr_f: 1
outermost_linear_nnr_f: True
omega_f: 30

aggr_type: "add"
embedding_dim: 2
update_type: "none"

plotting:
colormap: "tab10"
arrow_length: 1
xlim: [-5, 5]
ylim: [0, 0.3]
label_style: "greek"

claude:
n_epochs: 5
data_augmentation_loop: 10
n_iter_block: 1024

training:
n_epochs: 10
n_runs: 1
device: "auto"

batch_size: 1
small_init_batch_size: True

data_augmentation_loop: 50

learn_external_input: True

sparsity: "replace_embedding_function"
sparsity_freq: 4
cluster_method: "distance_plot"
cluster_distance_threshold: 0.1
fix_cluster_embedding: True

coeff_W_L1: 1.0E-12
coeff_edge_diff: 10
coeff_update_diff: 5
coeff_lin_phi_zero: 1.0

learning_rate_W_start: 2.0E-3
learning_rate_start: 5.0E-4
learning_rate_embedding_start: 5.0E-3

learning_rate_NNR_f: 1.0E-5

73 changes: 73 additions & 0 deletions config/signal/signal_fig_supp_10 copy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
description: "Figure supp 10 Noise test - 1000 neurons, 4 types, no noise, no external inputs"
dataset: "signal_fig_supp_10"

simulation:
connectivity_type: "Lorentz"
connectivity_init: [0, 0.1]
# params: [g, s, c]
# du = -c * u + s * torch.tanh(u) + g * msg
params:
[[10.0, 1.0, 1.0], [10.0, 2.0, 1.0], [10.0, 1.0, 2.0], [10.0, 2.0, 2.0]]
phi: "tanh"
n_neurons: 1000
n_neuron_types: 4
n_frames: 100000
delta_t: 0.01
dpos_init: 0
boundary: "no"
start_frame: -1000
noise_model_level: 7.2

graph_model:
signal_model_name: "PDE_N2"
particle_model_name: ""
mesh_model_name: ""
prediction: "first_derivative"

input_size: 1
output_size: 1
hidden_dim: 64
n_layers: 3

input_size_update: 3
n_layers_update: 3
hidden_dim_update: 64

aggr_type: "add"
embedding_dim: 2
update_type: "none"

plotting:
colormap: "tab10"
arrow_length: 1
xlim: [-4, 4]
ylim: [-8, 8]
label_style: "greek"
mlp0_xlim: [-5, 5]
mlp0_ylim: [-8, 8]
mlp1_xlim: [-5, 5]
mlp1_ylim: [-1.1, 1.1]

training:
n_epochs: 10
n_runs: 1
device: "auto"

batch_size: 1
small_init_batch_size: False

seed: 16

data_augmentation_loop: 50

sparsity: "replace_embedding_function"
sparsity_freq: 4
cluster_method: "distance_plot"
cluster_distance_threshold: 0.1
fix_cluster_embedding: True

learning_rate_W_start: 1.0E-4
learning_rate_start: 5.0E-5
learning_rate_embedding_start: 5.0E-4

coeff_lin_phi_zero: 1.0
75 changes: 75 additions & 0 deletions config/signal/signal_fig_supp_11.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
description: "Figure supp 11 - 8000 neurons, 4 types, little noise, no external inputs"
dataset: "signal_fig_supp_11"

simulation:
connectivity_type: "Lorentz"
connectivity_init: [0, 0.1]
# params: [g, s, c]
# du = -c * u + s * torch.tanh(u) + g * msg
params:
[[10.0, 1.0, 1.0], [10.0, 2.0, 1.0], [10.0, 1.0, 2.0], [10.0, 2.0, 2.0]]
phi: "tanh"
n_neurons: 8000
n_neuron_types: 4
n_frames: 100000
delta_t: 0.01
dpos_init: 0
boundary: "no"
start_frame: -1000
noise_model_level: 1

graph_model:
signal_model_name: "PDE_N2"
particle_model_name: ""
mesh_model_name: ""
prediction: "first_derivative"

input_size: 1
output_size: 1
hidden_dim: 64
n_layers: 3

input_size_update: 3
n_layers_update: 3
hidden_dim_update: 64

aggr_type: "add"
embedding_dim: 2
update_type: "none"

plotting:
colormap: "tab10"
arrow_length: 1
xlim: [-4, 4]
ylim: [-8, 8]
label_style: "greek"
mlp0_xlim: [-5, 5]
mlp0_ylim: [-8, 8]
mlp1_xlim: [-5, 5]
mlp1_ylim: [-1.1, 1.1]

training:
n_epochs: 10
n_runs: 1
device: "auto"

batch_size: 1
small_init_batch_size: False

seed: 16

data_augmentation_loop: 15

sparsity: "replace_embedding_function"
sparsity_freq: 4
cluster_method: "distance_plot"
cluster_distance_threshold: 0.1
fix_cluster_embedding: True

learning_rate_W_start: 1.0E-3
learning_rate_start: 5.0E-5
learning_rate_embedding_start: 5.0E-4


coeff_lin_phi_zero: 1.0
coeff_edge_diff: 100
Loading
Loading