Skip to content

Arbitrarily nested neuron groups with per-group iterator #3322

Open
@otcathatsya

Description

@otcathatsya

(Discussed during Bernstein conference with @babsey @heplesser @terhorstd @poojanbabu)
In the future it may be desirable to support creating arbitrary nested groups of populations in NEST the way it is currently proposed for NEST Desktop on a Python level by @babsey. This would allow applying connection rules and e.g. weight values on a per-group-item level via a group item aware iterator as opposed to strictly flattened across all neuron in a NodeCollection.

Syntax brainstorming:

pop1 = nest.Create("iaf_psc_exp", 100)
pop2 = nest.Create("iaf_psc_exp", 200)

group1 = nest.Group([pop1, pop2])
# Retrieve:
pop1 = group1[0] // same as pop1
pop1_neuron0 = group1[0][0] // same as pop1[0]

nest.Connect(g1, g1, "all_to_all", syn_spec={"weight":[23, 25]})
// Would apply weight 23.0 to all connections from n1-> nX and 25.0 to n2->nX
// However, this could also be taken to mean n1->n1: 23.0 and n2->n2: 25.0. Needs a clearer syntax!
  • Doing parameters purely as lists might get really messy and unclear, calls for named arg implementation.
  • Some of the functionality already exists as part of composite node collections on a C++ level, but these are currently not exposed to the user.
  • There might not be a need for an explicit nest.Group but some method or operator overload is needed to distinguish from the default n1 + n2 flattened collection addition.
  • While there's some similarities to pooling connections as done in exabrainprep this should be a conceptually independent change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    S: NormalHandle this with default priorityT: DiscussionStill searching for the right way to proceed / suggestions welcomeT: EnhancementNew functionality, model or documentationstaleAutomatic marker for inactivity, please have another look here

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions