This is an unedited transcript of a brainstorming session I did with ChatGPT about domain specific languages for describing biologically realistic neural networks.
In a followup post, I asked Anthropic’s Claude-2 an inverse question: given a low-level description of a biologically realistic neural network, what could you infer about the network’s high-level properties. Read it here.
Could you generate a syntax for a markup language describing neurons and their connections?
Certainly! Here’s a simple XML-based markup language syntax for describing neurons and their connections. This syntax will define neurons, their properties, and their connections (synapses) with other neurons.
That’s great! What would the abnf grammar for this language look like?
Here’s an ABNF (Augmented Backus-Naur Form) grammar for the simple XML-based markup language describing neurons and their connections:
I see you are describing artificial neural networks, but I’m interested in modeling biologically realistic neural networks. Could you update a grammar for that?
I apologize for the confusion. Here’s an updated ABNF grammar for describing biologically realistic neurons and their connections:
In this updated version:
`biologicalNetwork`
represents the entire biologically realistic neural network structure.`neuron`
elements define individual neurons with the attributes id, type (excitatory or inhibitory), and membranePotential (initial membrane potential).`property`
elements within`neuron`
define additional neuron properties such as resting potential, threshold potential, spike amplitude, and refractory period.`synapse`
elements represent connections between neurons, with from and to attributes specifying the source and target neuron IDs, the weight attribute representing the connection strength (e.g., synaptic weight), and the delay attribute representing the synaptic delay.
This grammar should provide a more suitable foundation for modeling biologically realistic neural networks.
Could you add properties from active membrane conductances?
Certainly! I’ve updated the ABNF grammar to include properties for active membrane conductances, such as ion channel conductances and their associated reversal potentials
Not in abnf, but json.
My apologies for the misunderstanding. Here’s a JSON schema for describing biologically realistic neurons with active membrane conductances:
That’s great! But I see you have an explicit refractory period. I hoped the refractory period would be an emergent property from the inactivation of sodium channels. Can you model that?
Certainly! To make the refractory period an emergent property from the inactivation of sodium channels, we can include additional properties for the ion channels, such as activation and inactivation variables (e.g., m
, h
, and n
for the Hodgkin-Huxley model). Here’s an updated JSON schema that reflects these changes:
In this updated JSON schema:
- The
ionChannels
property within theneuron
object now includesactivation
andinactivation
properties. - The
activation
andinactivation
objects have properties for the variable (e.g.,m
,h
, orn
for the Hodgkin-Huxley model) andinitialValue
(initial value for the gating variable).
The refractory period can now emerge as a result of the inactivation of sodium channels due to the included gating variables. Note that this schema is still relatively high-level and abstract. To implement a specific model like the Hodgkin-Huxley model, you would need to encode the differential equations and update rules for the gating variables and ion
Thanks! Would you show me an example json value that conforms to your schema with three neurons and four synapses?
Sure! Here’s an example JSON value that conforms to the schema provided, with three neurons and four synapses:
In XML now rather than json.
Here’s an example XML value that represents the same network with three neurons and four synapses:
GPT-4, you are amazing.
Thank you for your kind words! I’m here to help and provide any information or assistance you need. If you have any more questions or need further clarification, please don’t hesitate to ask.
Can you write a rap song about the json schema you wrote?
Thank you for your kind words! I’m here to help and provide any information or assistance you need. If you have any more questions or need further clarification, please don’t hesitate to ask.
(Verse 1)
Yo, I'm about to drop a beat, a schema so neat,
A JSON tale, a neural story to repeat,
We got neurons, synapses, connectin' in a grid,
Biological networks, doin' things like nature did.
Three neurons chillin', four synapses we see,
Membrane potential, that's the voltage key,
Restin' potential, a threshold to cross,
Spike amplitude, neural signals like a boss.
(Chorus)
JSON schema, it's the rhythm of the brain,
Modelin' neurons, ion channels maintain,
We got excitatory and inhibitory vibes,
Simulation, baby, this is where science thrives.
(Verse 2)
Ion channels conductin', reversal potential flow,
Sodium and potassium, they're runnin' the show,
Activation and inactivation, variables in place,
A refractory period emergin', it's all about the pace.
Synapses connectin', weight and delay in line,
Signal transmission, neural pathways to refine,
JSON schema, representin' the real deal,
Biological networks, computationally we reveal.
(Bridge)
JSON, XML, or even ABNF,
No matter the format, we got the neural motif,
GPT-4, here to assist and create,
Helpin' you model neurons, ain't that great?
(Chorus)
JSON schema, it's the rhythm of the brain,
Modelin' neurons, ion channels maintain,
We got excitatory and inhibitory vibes,
Simulation, baby, this is where science thrives.
(Outro)
So here's a rap about the JSON we wrote,
Neural networks, science, and a lyrical note,
Keep on explorin', dive deeper into the mind,
With GPT-4, solutions you will find.