# dkconnect/kumo-no-su architecture

> Architecture diagram of the GitHub repository dkconnect/kumo-no-su, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dkconnect/kumo-no-su
- Repository: https://github.com/dkconnect/kumo-no-su

## Overview

Kumo No Su is a NumPy neural-network project whose distinguishing feature is learnable polynomial curves on connections, with nodes summing incoming edge outputs. The main demonstrated workflow trains a model on input/target data and extracts a symbolic formula; the repository also contains an MNIST training route and learned-edge visualization. The tree shows two implementations: the newer `learning-2` model used by the root example, and the separate `kumo` package. Some subsystem links are omitted because their source was not sampled.

Main entry points: [`main.py`](https://github.com/dkconnect/kumo-no-su/blob/main/main.py) (Formula demo), [`learning-2/kumo_network.py`](https://github.com/dkconnect/kumo-no-su/blob/main/learning-2/kumo_network.py) (Kumo network), [`learning-2/kumo_layer.py`](https://github.com/dkconnect/kumo-no-su/blob/main/learning-2/kumo_layer.py) (Polynomial layer), [`learning-2/mnist_main.py`](https://github.com/dkconnect/kumo-no-su/blob/main/learning-2/mnist_main.py) (MNIST entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_newmodel["Polynomial model"]
  node_model2["Kumo network<br/>[kumo_network.py]"]
  node_layer2["Polynomial layer<br/>[kumo_layer.py]"]
  node_basis["Polynomial basis<br/>[kumo_layer.py]"]
end

subgraph group_training["Training workflows"]
  node_main["Formula demo<br/>[main.py]"]
  node_mnist["MNIST entry<br/>[mnist_main.py]"]
  node_dataset["Dataset loading<br/>[dataset_loader.py]"]
  node_legacyexample["Pattern training example<br/>[train_network.py]"]
end

subgraph group_insight["Model inspection"]
  node_exporter["Formula extraction"]
  node_edges["Edge visualization<br/>[visualize_edges.py]"]
  node_mnistviz["MNIST visualization<br/>[visualize_mnist.py]"]
end

subgraph group_legacy["Earlier implementation"]
  node_network["Kumo network<br/>[network.py]"]
  node_layer["Polynomial layer<br/>[layer.py]"]
end

node_user(("Data / caller"))
node_formula["Predictions / formula"]

node_user -->|"supplies data"| node_main
node_main -->|"constructs and fits"| node_model2
node_model2 -->|"forwards / backpropagates"| node_layer2
node_layer2 -->|"expands inputs"| node_basis
node_main -->|"extracts formula"| node_exporter
node_main -->|"prints formula"| node_formula
node_model2 -->|"produces predictions"| node_formula
node_mnist -->|"loads data"| node_dataset
node_mnist -->|"trains model"| node_model2
node_edges -.->|"reads coefficients"| node_layer2
node_mnistviz -.->|"shows results"| node_user
node_user -->|"supplies data"| node_legacyexample
node_legacyexample -->|"trains / predicts"| node_network
node_network -->|"forwards / backpropagates"| node_layer

click node_main "https://github.com/dkconnect/kumo-no-su/blob/main/main.py"
click node_mnist "https://github.com/dkconnect/kumo-no-su/blob/main/learning-2/mnist_main.py"
click node_dataset "https://github.com/dkconnect/kumo-no-su/blob/main/learning-2/dataset_loader.py"
click node_model2 "https://github.com/dkconnect/kumo-no-su/blob/main/learning-2/kumo_network.py"
click node_layer2 "https://github.com/dkconnect/kumo-no-su/blob/main/learning-2/kumo_layer.py"
click node_basis "https://github.com/dkconnect/kumo-no-su/blob/main/learning-2/kumo_layer.py"
click node_exporter "https://github.com/dkconnect/kumo-no-su/blob/main/learning-2/symbolic_exporter.py"
click node_edges "https://github.com/dkconnect/kumo-no-su/blob/main/learning-2/visualize_edges.py"
click node_mnistviz "https://github.com/dkconnect/kumo-no-su/blob/main/learning-2/visualize_mnist.py"
click node_legacyexample "https://github.com/dkconnect/kumo-no-su/blob/main/experiments/train_network.py"
click node_network "https://github.com/dkconnect/kumo-no-su/blob/main/kumo/network.py"
click node_layer "https://github.com/dkconnect/kumo-no-su/blob/main/kumo/layer.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_model2,node_layer2,node_basis toneBlue
class node_main,node_mnist,node_dataset,node_legacyexample toneAmber
class node_exporter,node_edges,node_mnistviz toneMint
class node_network,node_layer toneRose
class node_user,node_formula toneIndigo
```

## Components

### Polynomial model

- [Kumo network](https://github.com/dkconnect/kumo-no-su/blob/main/learning-2/kumo_network.py): `learning-2/kumo_network.py`
- [Polynomial layer](https://github.com/dkconnect/kumo-no-su/blob/main/learning-2/kumo_layer.py): `learning-2/kumo_layer.py`
- [Polynomial basis](https://github.com/dkconnect/kumo-no-su/blob/main/learning-2/kumo_layer.py): `learning-2/kumo_layer.py`

### Training workflows

- [Formula demo](https://github.com/dkconnect/kumo-no-su/blob/main/main.py): `main.py`
- [MNIST entry](https://github.com/dkconnect/kumo-no-su/blob/main/learning-2/mnist_main.py): `learning-2/mnist_main.py`
- [Dataset loading](https://github.com/dkconnect/kumo-no-su/blob/main/learning-2/dataset_loader.py): `learning-2/dataset_loader.py`
- [Pattern training example](https://github.com/dkconnect/kumo-no-su/blob/main/experiments/train_network.py): `experiments/train_network.py`

### Model inspection

- [Formula extraction](https://github.com/dkconnect/kumo-no-su/blob/main/learning-2/symbolic_exporter.py): `learning-2/symbolic_exporter.py`
- [Edge visualization](https://github.com/dkconnect/kumo-no-su/blob/main/learning-2/visualize_edges.py): `learning-2/visualize_edges.py`
- [MNIST visualization](https://github.com/dkconnect/kumo-no-su/blob/main/learning-2/visualize_mnist.py): `learning-2/visualize_mnist.py`

### Earlier implementation

- [Kumo network](https://github.com/dkconnect/kumo-no-su/blob/main/kumo/network.py): `kumo/network.py`
- [Polynomial layer](https://github.com/dkconnect/kumo-no-su/blob/main/kumo/layer.py): `kumo/layer.py`

### Other components

- **Data / caller**
- **Predictions / formula**

## Connections

- Data / caller → Formula demo: supplies data
- Formula demo → Kumo network: constructs and fits
- Kumo network → Polynomial layer: forwards / backpropagates
- Polynomial layer → Polynomial basis: expands inputs
- Formula demo → Formula extraction: extracts formula
- Formula demo → Predictions / formula: prints formula
- Kumo network → Predictions / formula: produces predictions
- MNIST entry → Dataset loading: loads data
- MNIST entry → Kumo network: trains model
- Edge visualization → Polynomial layer: reads coefficients
- MNIST visualization → Data / caller: shows results
- Data / caller → Pattern training example: supplies data
- Pattern training example → Kumo network: trains / predicts
- Kumo network → Polynomial layer: forwards / backpropagates
