Skip to content

Commit ccadcf9

Browse files
committed
Clarify backend connectivity guarantees
Update backend documentation to state that masks constrain trainable edge weights, while bias terms are node-level offsets rather than graph edges. Document that bias=True allows graph-independent target-node offsets and that bias=False gives the stricter graph-only weighted update behavior.
1 parent 4cd5b1e commit ccadcf9

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

docs/backends.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,17 @@ Across all backends, input and output nodes are inferred from graph structure:
3535
- output nodes are nodes with no outgoing edges
3636

3737
The current implementation enforces sparse graph-derived connectivity with
38-
masked dense PyTorch layers. This guarantees that compiled models respect the
39-
edgelist connectivity, but it should not be interpreted as sparse tensor
40-
acceleration (which is planned as a future addition).
38+
masked dense PyTorch layers. These masks constrain trainable edge weights: a
39+
source-to-target weighted connection can contribute only where the compiled
40+
graph contains the corresponding directed edge.
41+
42+
Compiled layers include bias terms by default. Biases are node-level offsets,
43+
not graph edges, and are not constrained by the edge mask. Set `bias=False` in
44+
`compile_graph()` to remove these offsets so node updates depend only on
45+
graph-defined weighted inputs.
46+
47+
The use of masked dense layers should not be interpreted as sparse tensor
48+
acceleration, which is planned as a future addition.
4149

4250
## Common input format
4351

@@ -97,7 +105,9 @@ perceptron whose connectivity pattern is derived from the edgelist.
97105

98106
The compiled model contains one computation block per adjacent layer pair.
99107
Each block applies a masked linear transformation so that only graph-defined
100-
connections contribute to the forward pass.
108+
weighted connections contribute through edge weights. If `bias=True`, target
109+
nodes may also have learned node-level offsets. Set `bias=False` to remove
110+
these offsets.
101111

102112
### Pseudo nodes
103113

0 commit comments

Comments
 (0)