File size: 1,979 Bytes
1cc3b6f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | ---
license: mit
tags:
- pytorch
- safetensors
- threshold-logic
- neuromorphic
- canalizing
---
# threshold-canalizing
Canalizing Boolean function where one input can override all others.
## Function
y = NOT(x0) AND (x1 OR x2)
**Canalizing property:** If x0 = 1, then y = 0 regardless of x1 and x2.
- Canalizing input: x0
- Canalizing value: 1
- Canalized output: 0
When x0 = 0, the function reduces to y = x1 OR x2.
## Truth Table
| x2 | x1 | x0 | y | Note |
|----|----|----|---|------|
| 0 | 0 | 0 | 0 | |
| 0 | 0 | 1 | 0 | x0 canalizes |
| 0 | 1 | 0 | **1** | |
| 0 | 1 | 1 | 0 | x0 canalizes |
| 1 | 0 | 0 | **1** | |
| 1 | 0 | 1 | 0 | x0 canalizes |
| 1 | 1 | 0 | **1** | |
| 1 | 1 | 1 | 0 | x0 canalizes |
## Architecture
Not linearly separable; requires 2 layers:
```
x2 x1 x0
β β β
β β ββββββββ
β β β
ββββββ΄ββββ β
β β
βΌ βΌ
βββββββ βββββββ
β OR β β NOT β Layer 1
βx1,x2β β x0 β
βββββββ βββββββ
β β
βββββ¬ββββ
β
βΌ
βββββββ
β AND β Layer 2
βββββββ
β
βΌ
y
```
## Parameters
| | |
|---|---|
| Inputs | 3 |
| Outputs | 1 |
| Neurons | 3 |
| Layers | 2 |
| Parameters | 11 |
| Magnitude | 8 |
## Biological Significance
Canalizing functions are important in gene regulatory networks. A canalizing gene can suppress or activate a developmental pathway regardless of other genes' states, providing robustness to genetic variation.
## Usage
```python
from safetensors.torch import load_file
w = load_file('model.safetensors')
# When x0=1 (canalizing value), output is always 0
# When x0=0, output is x1 OR x2
```
## License
MIT
|