threshold-minority

Sparse activation detector. Fires when few inputs are active (3 or fewer of 8).

Circuit

  xβ‚€ x₁ xβ‚‚ x₃ xβ‚„ xβ‚… x₆ x₇
   β”‚  β”‚  β”‚  β”‚  β”‚  β”‚  β”‚  β”‚
   β””β”€β”€β”΄β”€β”€β”΄β”€β”€β”΄β”€β”€β”Όβ”€β”€β”΄β”€β”€β”΄β”€β”€β”΄β”€β”€β”˜
               β–Ό
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β”‚ w: all -1β”‚
          β”‚ b:  +3   β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
               β–Ό
           HW ≀ 3?

Mechanism

Negative weights flip the logic. Each active input subtracts from the sum:

  • Sum = -HW + 3 = 3 - (number of 1s)
  • Fires when HW ≀ 3
HW Sum Output
0 +3 1
1 +2 1
2 +1 1
3 0 1
4 -1 0
... ... 0

Duality with Majority

Circuit Weights Bias Fires when
Majority all +1 -5 HW β‰₯ 5
Minority all -1 +3 HW ≀ 3

These aren't complements. At HW=4, both are silent. This is the "tie zone" - neither majority nor minority.

Parameters

Weights [-1, -1, -1, -1, -1, -1, -1, -1]
Bias +3
Total 9 parameters

Usage

from safetensors.torch import load_file
import torch

w = load_file('model.safetensors')

def minority(bits):
    inputs = torch.tensor([float(b) for b in bits])
    return int((inputs * w['weight']).sum() + w['bias'] >= 0)

Files

threshold-minority/
β”œβ”€β”€ model.safetensors
β”œβ”€β”€ model.py
β”œβ”€β”€ config.json
└── README.md

License

MIT

Downloads last month
9
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Collection including phanerozoic/threshold-minority