Skip to main content

Connectivity Rules

Connectivity Rules define the shape and structure of neural connections between cortical areas. They determine how neurons in one area connect to neurons in another, creating the pathways for information flow.

What is a Connectivity Rule?​

A connectivity rule is a template that specifies:

  • Connection Pattern: Which neurons connect to which
  • Spatial Arrangement: How connections are organized in 3D space
  • Density: How many connections are created
  • Plasticity: How connections change over time

Think of connectivity rules as the "wiring diagrams" that define how cortical areas communicate.

Why Connectivity Rules Matter​

Different connection patterns serve different purposes:

  • One-to-One: Direct correspondence (e.g., pixel to neuron)
  • Divergent: One source neuron to many targets (broadcasting)
  • Convergent: Many sources to one target (integration)
  • Lateral: Neighborhood connections (spatial relationships)
  • All-to-All: Fully connected (complete mixing)

Choosing the right connectivity rule is crucial for your genome's function.

Types of Connectivity Rules​

Composite Rule​

Purpose: Combines multiple simpler connectivity rules

Characteristics:

  • A seed position, a list of source offsets, and a second rule that maps from there
  • Fields: source seed, source pattern, mapper rule

Use Cases:

  • Combining feedforward and lateral connections
  • Multiple connection types in one mapping
  • Hierarchical connection structures

Function Connectivity Rule​

Purpose: Connections defined by a built-in algorithm

Characteristics:

  • Chosen by name from the built-in functions
  • Has no editable parameters

Use Cases:

  • Gaussian receptive fields
  • Distance-based connectivity
  • Custom mathematical patterns

Vectors Connectivity Rule​

Purpose: Per-neuron destination offset [dx, dy, dz]

Characteristics:

  • Each source neuron connects to dest at (src_x + dx, src_y + dy, src_z + dz)
  • [0, 0, 0] is identity (same as core block_to_block)
  • Out-of-bounds destinations produce no synapse

Use Cases:

  • Uniform shifts (one voxel right, one layer forward)
  • Identity maps
  • Small sets of regular offsets

See Vector Connectivity for the editor format and examples.

Patterns Connectivity Rule​

Purpose: Per-axis source filter and destination expansion (*, N, N..M, ?, ?+N)

See Pattern Connectivity for the full syntax table.

Characteristics:

  • Built-in templates
  • Easy to use
  • Optimized implementations

Common Patterns:

  • All-to-All
  • One-to-One
  • Grid patterns
  • Lateral patterns

Pattern Connectivity Rule Syntax​

Pattern connectivity is the primary mechanism for defining how neurons in a source cortical area connect to neurons in a destination cortical area. Each rule is a pair of 3D patterns: one describing which source neurons participate, and one describing which destination neurons each qualifying source neuron connects to.

How Patterns Work​

Every neuron occupies a position in a 3D voxel grid: (x, y, z). A pattern connectivity rule specifies, for each axis independently, which coordinates are selected.

A rule is written as:

[src_x, src_y, src_z] -> [dst_x, dst_y, dst_z]

The source pattern filters which source neurons participate. The destination pattern expands into a set of target coordinates for each participating source neuron. A synapse is created for every expanded destination where a neuron actually exists.

Pattern Elements​

Absolute Patterns​

These do not depend on the source neuron's position.

  • * (wildcard) — all coordinates on this axis (0 to dimension-1)
  • 5 (exact) — only coordinate 5
  • N..M (absolute range) — all coordinates from N to M inclusive (for example 1..98)

Source-Relative Patterns​

These resolve relative to the source neuron's coordinate on the same axis.

  • ? (pass-through) — same coordinate as the source neuron
  • ! (exclude) — all coordinates except the source's
  • ?+ (direction positive) — all coordinates strictly greater than source
  • ?- (direction negative) — all coordinates strictly less than source
  • ?+= (direction positive inclusive) — all coordinates greater than or equal to source
  • ?-= (direction negative inclusive) — all coordinates less than or equal to source
  • ?+N (offset positive) — single coordinate at source + N
  • ?-N (offset negative) — single coordinate at source - N
  • ?-A:?+B (range) — all coordinates from source-A to source+B (inclusive)

Pattern Examples​

All examples assume a 10x10x10 destination area unless noted otherwise.

Every neuron connects to the single neuron at (0,0,0)​

[["*", "*", "*"], [0, 0, 0]]

Source: every neuron qualifies (wildcard on all axes). Destination: always the fixed point (0,0,0).

Neuron at (0,0,0) connects to every neuron​

[[0, 0, 0], ["*", "*", "*"]]

Source: only the neuron at (0,0,0) qualifies. Destination: every coordinate in the destination area.

One-to-one mapping (identity)​

[["*", "*", "*"], ["?", "?", "?"]]

Source: all neurons. Destination: the neuron at the same (x,y,z) coordinate. This creates a topographic 1:1 map between areas of the same dimensions.

Lateral inhibition (connect to all except self)​

[["*", "*", "*"], ["!", "!", "!"]]

Each neuron connects to every other neuron in the destination (all positions except its own coordinate on each axis).

Every neuron connects to all neurons to its right​

[["*", "*", "*"], ["?+", "?", "?"]]

Source: all neurons. Destination: on the X axis, all coordinates greater than the source's X. Y and Z pass through.

For a source at (3, 2, 0): destinations are (4,2,0), (5,2,0), ..., (9,2,0).

A neuron at the rightmost edge (9, y, z) has no destinations (nothing to its right).

Every neuron connects to all neurons below it​

[["*", "*", "*"], ["?", "?-", "?"]]

On the Y axis, all coordinates strictly less than the source. X and Z pass through.

Every neuron connects to its immediate neighbor one step to the right​

[["*", "*", "*"], ["?+1", "?", "?"]]

Single offset: destination X = source X + 1. Boundary neurons at X=max produce no connection (offset lands outside the area).

Every neuron connects to a 3x3 local patch on XY​

[["*", "*", "*"], ["?-1:?+1", "?-1:?+1", "?"]]

Range: X spans [src_x - 1, src_x + 1], Y spans [src_y - 1, src_y + 1]. Z passes through. This produces up to 9 connections per neuron (fewer at boundaries where the range gets clamped to valid coordinates).

Every neuron connects to the 5 neighbors ahead on X​

[["*", "*", "*"], ["?+1:?+5", "?", "?"]]

Range from src+1 to src+5. A neuron at X=7 in a 10-wide area would connect to X=8 and X=9 only (clamped).

Contiguous source channels map topographically to dest Z=0​

[["1..98", "*", "*"], ["?", "?", 0]]

Source: X in 1 through 98, any Y and Z. Destination: same X and Y, Z fixed at 0. One rule replaces 98 exact-X rows. N..M is an absolute filter. It is not the same as ?-A:?+B, which is a source-relative destination span.

In the pattern editor, click the guide icon for the full syntax table.

Column 0 fans out to all positions in the positive X direction​

[[0, "*", "*"], ["?+", "*", "*"]]

Source: only neurons with X=0 qualify. Destination: full fan-out across all Y and Z, but only X coordinates > 0.

Feedforward layer-to-layer (Z layers)​

[["*", "*", 0], ["?", "?", 1]]

Source: only neurons at Z=0. Destination: same X and Y, but at Z=1. Connects one layer to the next while preserving spatial topology.

Connect each neuron to everything to its left AND right (but not self)​

Combine two rules:

[
[["*", "*", "*"], ["?+", "?", "?"]],
[["*", "*", "*"], ["?-", "?", "?"]]
]

The pattern system processes all rules and unions the results (duplicates removed).

Boundary Behavior​

All relative patterns are automatically clamped to valid coordinates [0, dimension). This means:

  • A neuron at X=0 with destination "?-" produces no connections on the X axis.
  • A neuron at X=max with destination "?+" produces no connections on the X axis.
  • A range "?-3:?+3" at X=1 in a 10-wide area produces X values [0, 1, 2, 3, 4] (the -3 clamps to 0).

Boundary neurons naturally have fewer connections. No special handling is needed.

Axis Independence​

Each axis is expanded independently, then combined via Cartesian product. The destination pattern ["?+", "?-1:?+1", "*"] means:

  • X: all coordinates > source X
  • Y: source Y - 1 to source Y + 1
  • Z: all coordinates

The total destinations = (count of X values) x (count of Y values) x (count of Z values).

Visual Editor: Hover Mode​

When using the visual pattern editor, if the source pattern matches multiple neurons (any axis uses *, N..M, or a non-exact pattern) and the destination uses relative patterns, the destination grid will be blank initially. Hover your mouse over individual source cells to preview the destination connections for that specific source position.

Viewing Connectivity Rules​

Connectivity Rule Manager​

Access via top toolbar:

  1. Hover Connectivity Rules on the root scene top bar
  2. The list is the same set of rules as the left side of the Connectivity Rules Manager
  3. Select a rule to open the manager with that rule shown
  4. See details:
    • Name
    • Type
    • Usage count (how many mappings use it)
    • Parameters

Connectivity Rule Details​

Click a connectivity rule to view:

  • Type: Composite, Function, Vectors, Patterns
  • Parameters: Specific configuration
  • Usage: Which mappings use this connectivity rule
  • Preview: Visual representation (if available)

Creating Connectivity Rules​

Method 1: From the root scene top bar​

  1. Click + beside Connectivity Rules
  2. Choose the connectivity rule type

Method 2: Via Connectivity Rule Manager​

  1. Hover Connectivity Rules and select any rule to open the manager
  2. Click + Create New
  3. Choose connectivity rule type
  4. Configure parameters
  5. Name the connectivity rule
  6. Click Create

Method 3: During Mapping Creation​

When connecting cortical areas:

  1. Open Mapping Editor
  2. Click Create New Connectivity Rule
  3. Configure and create inline
  4. Apply to the mapping

Method 4: Clone Existing​

Duplicate and modify:

  1. Open Connectivity Rule Manager
  2. Right-click connectivity rule
  3. Select Clone
  4. Modify parameters
  5. Save with new name

Configuring Connectivity Rules​

Composite Connectivity Rule​

Fields:

  • Source seed: the starting position (X, Y, Z)
  • Source pattern: a list of source offsets
  • Mapper rule: the connectivity rule that maps from there

Function Connectivity Rule​

A function rule is a built-in algorithm picked by name. It has no formula or parameters to edit.

Patterns Connectivity Rule​

Pattern Selection:

  • Choose from library of patterns
  • Configure pattern-specific options
  • Adjust density and spacing

Common Patterns:

All-to-All:

![All-to-All Pattern](/docs/img/bv/Connectivity RuleIcons/all_to_all.png)

  • Every source connects to every target
  • Dense connectivity
  • High synapse count

One-to-One:

  • Direct correspondence between positions
  • Preserves spatial relationships
  • Requires matching dimensions

Block-to-Block:

![Block-to-Block Pattern](/docs/img/bv/Connectivity RuleIcons/block_to_block.png)

  • Regions connect to regions
  • Reduced connection count
  • Structured connectivity

Lateral Connections:

![Lateral Pattern](/docs/img/bv/Connectivity RuleIcons/lateral_+x.png)

  • Connections within neighborhood
  • Spatial proximity matters
  • Local integration

Vectors Connectivity Rule​

Connection Specification:

  • A list of offsets [dx, dy, dz]
  • Each source neuron connects to the neuron at its own position plus the offset
  • Not a list of source → target coordinate pairs, and it has no weight column

Editing Connectivity Rules​

Modifying Existing Connectivity Rule​

Caution: Changes affect all mappings using this connectivity rule.

  1. Open Connectivity Rule Manager
  2. Click connectivity rule to edit
  3. Click Edit button
  4. Modify parameters
  5. Click Save
  6. All mappings using it will update

Safe Editing (Clone First)​

To avoid affecting existing mappings:

  1. Clone the connectivity rule
  2. Edit the clone
  3. Manually update specific mappings to use the clone

Connectivity Rule Parameters​

Type-Specific Parameters​

Each connectivity rule type has unique parameters. Consult the parameter descriptions in the creation/editing interface for details.

Using Connectivity Rules in Mappings​

When creating a connection between cortical areas:

  1. Source area → Target area
  2. Select connectivity rule from list OR create new
  3. Connectivity Rule defines connection structure
  4. Multiple mappings can share one connectivity rule

See Mapping Connections for complete details.

Connectivity Rule Best Practices​

Naming​

Use descriptive names:

  • Good: "Gaussian_5x5_Receptive_Field"
  • Good: "Lateral_Inhibition_3_Neighbor"
  • Avoid: "Connectivity Rule_001", "Test"

Reusability​

Create general-purpose connectivity rules:

  • Design for reuse across multiple mappings
  • Parameterize instead of hardcoding
  • Document the purpose in the name

Start Simple​

Begin with standard patterns:

  1. Try built-in patterns first
  2. Understand behavior before customizing
  3. Gradually introduce complexity
  4. Test incremental changes

Test Incrementally​

When creating custom connectivity rules:

  1. Start with small cortical areas
  2. Verify connection pattern is correct
  3. Check synapse count is reasonable
  4. Scale up once confirmed

Visualizing Connectivity Rules​

In Mapping Editor​

When viewing a mapping:

  • Connection pattern preview (if available)
  • Parameter visualization
  • Synapse count estimate

In Brain Monitor​

When cortical areas are connected:

  • Hover to see connection lines
  • Observe activity flow
  • Verify expected patterns

Connection Analysis​

Check the mapping to verify:

  • Source neurons have appropriate connections
  • Target neurons receive expected inputs
  • Connection density is reasonable
  • Pattern matches intent

Common Connectivity Rule Patterns​

Feedforward Processing​

All-to-All:

  • Complete mixing of inputs
  • Pattern recognition
  • Feature extraction

One-to-One:

  • Spatial preservation
  • Topographic mapping
  • Direct transformation

Lateral Integration​

Neighbor Connections:

  • Local context awareness
  • Edge detection
  • Spatial smoothing

Distance-Based:

  • Proximity-weighted connections
  • Gaussian receptive fields
  • Attentional mechanisms

Feedback and Modulation​

Sparse Long-Range:

  • Top-down modulation
  • Attention signals
  • Context information

Divergent Broadcast:

  • Global signals
  • Neuromodulation
  • State information

Managing Many Connectivity Rules​

Organization​

For large genomes:

  • Naming Conventions: Prefix by type or purpose
  • Documentation: Describe in detail
  • Cleanup: Delete unused connectivity rules

Finding Usage​

To find where a connectivity rule is used:

  1. Open Connectivity Rule Manager
  2. Click connectivity rule
  3. View "Usage" section
  4. Lists all mappings

Updating​

To update connectivity rule across all uses:

  1. Edit the connectivity rule directly
  2. Changes propagate to all mappings
  3. Or clone and manually update specific mappings

Connectivity Rule and Performance​

Synapse Count​

Connectivity Rules determine synapse count:

  • All-to-All: Highest count (M × N)
  • Sparse Patterns: Lower count
  • One-to-One: Minimal count (min(M, N))

Check genome synapse limits before creating.

Connection Density​

Balance connectivity with performance:

  • Dense connections: More computation
  • Sparse connections: Less computation
  • Choose appropriate for task

Memory Usage​

More complex connectivity rules:

  • Use more memory
  • Take longer to compute
  • May slow visualization

Optimize for efficiency.

Advanced Topics​

Dynamic Connectivity Rules​

Some connectivity rules adapt over time:

  • Plasticity rules modify connections
  • Learning strengthens/weakens synapses
  • Structural changes possible

Conditional Connectivity Rules​

Connections based on neuron properties:

  • Activity-dependent wiring
  • Type-specific connections
  • State-dependent patterns

Multi-Scale Connectivity Rules​

Combine patterns at different scales:

  • Local + Global connections
  • Short-range + Long-range
  • Different patterns per layer

Troubleshooting​

"Too many synapses"

  • Reduce connection density
  • Use sparser connectivity rule patterns
  • Limit max connections per neuron
  • Check cortical area dimensions

"Connections don't appear"

  • Verify connectivity rule is applied to mapping
  • Check connection parameters aren't zero
  • Ensure source and target dimensions are compatible
  • View in Mapping Editor for details

"Wrong connection pattern"

  • Review connectivity rule parameters
  • Check offset and scale settings
  • Verify pattern type is correct
  • Test with smaller areas first

"Performance is slow"

  • Reduce synapse count
  • Simplify connectivity rules
  • Use optimized patterns
  • Consider dimension reduction

"Can't delete connectivity rule"

  • Check if it's in use by mappings
  • Remove from all mappings first
  • Or force delete (breaks mappings)

Back to Overview