← GUMP

Documentation

pip install begump

Everything is free. Every product works the same way: import, call, get results. All local. All deterministic.

Org X-Ray

Analyze any network of connections

from gump.orgxray import analyze

# Feed it connections as (node_a, node_b) tuples
result = analyze([
    ('CEO', 'VP_Eng'), ('CEO', 'VP_Sales'),
    ('VP_Eng', 'Dev1'), ('VP_Eng', 'Dev2'),
    ('VP_Sales', 'Sales1'),
])

print(result['K'])                # coupling density
print(result['R'])                # structural balance
print(result['hubs'])             # most connected nodes
print(result['bottlenecks'])      # single points of failure
print(result['hub_dependence'])   # over-reliance on key nodes
print(result['n_nodes'])          # total people/entities
print(result['n_edges'])          # total connections

Learn Engine

Track learning, detect understanding

from gump.learnengine import track

# Feed a sequence of correct (1) / incorrect (0) responses
result = track([1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1])

print(result['phase'])            # LEARNING / MEMORIZING / TRANSITIONING / UNDERSTANDING
print(result['accuracy'])         # current accuracy
print(result['trend'])            # improving or declining
print(result['K_consistency'])    # response consistency
print(result['n_responses'])      # total responses tracked
print(result['n_correct'])        # total correct

Fold Watch

Screen protein sequences for risk

from gump.foldwatch import foldwatch, analyze, fold
from gump.foldwatch_app import report

# One call — sequence analysis + 3D fold combined
result = foldwatch('DAEFRHDSGYEVHHQKLVFFAEDVGSNKGAIIGLMVGGVVIA', name='Amyloid-beta')
print(result['misfolding_risk'])       # low / medium / high
print(result['is_disordered'])         # True/False
print(result['radius_of_gyration'])    # Angstroms
print(result['secondary_structure'])   # H/E/C per residue
print(result['aggregation_regions'])   # hotspots

# Sequence analysis only
result = analyze('DAEFRHDSGYEVHHQKLVFFAEDVGSNKGAIIGLMVGGVVIA')
print(result['misfolding_risk'])       # low / medium / high
print(result['net_charge'])            # electrostatics
print(result['disulfide_candidates'])  # Cys-Cys bonds
print(result['has_hydrophobic_core'])  # True/False

# 3D structure prediction (spectral folding)
structure = fold('FVNQHLCGSHLVEALYLVCGERGFFYTPKT')
print(structure['radius_of_gyration']) # Angstroms
print(structure['coordinates'])        # Nx3 C-alpha positions
print(structure['burial_score'])       # hydrophobic core quality
print(structure['disulfide_distances'])# Cys-Cys 3D distances

# GPU batch folding — 11.5M/sec batch analysis on Apple Silicon (66K/sec full 3D fold)
from gump.foldwatch import water_fold_batch
sequences = ['FVNQHLCGSHLVEALYLVCGERGFFYTPKT'] * 10000
results = water_fold_batch(sequences)  # all fold simultaneously on GPU
print(results[0]['rg'])                # same result as CPU, 173x faster

# Interactive HTML report
html = report('FVNQHLCGSHLVEALYLVCGERGFFYTPKT', title='Insulin B')
with open('insulin.html', 'w') as f: f.write(html)

Chip Fast

Spectral placement + isolation

from gump.chipfast import place, isolate

# Minimize wire length (bring connected things close)
result = place(
    gates=['and', 'or', 'xor', 'buf', 'nand'],
    connections=[(0,1), (1,2), (2,3), (3,4), (0,4)]
)
print(result['total_wire'])       # minimized wire length

# Maximize isolation (push sensitive things apart)
result = isolate(
    components=['user_db', 'auth', 'api', 'cdn', 'analytics'],
    connections=[(0,1), (1,2), (2,3), (2,4)],
    isolate_pairs=[('user_db', 'cdn')],      # push apart
    couple_pairs=[('auth', 'user_db')]        # keep together
)
print(result['isolation'])        # spectral distance between sensitive pairs
print(result['fiedler_gap'])      # algebraic connectivity (higher = better split)

AI Trainer

Detect grokking — know when to stop training

from gump.aitrainer import detect_grokking

# Feed train and test loss curves
result = detect_grokking(
    train_loss=[0.9, 0.5, 0.2, 0.05, 0.01, 0.01, 0.01, 0.01,
                0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01,
                0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01,
                0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01,
                0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01],
    test_loss= [0.9, 0.8, 0.7, 0.6, 0.6, 0.6, 0.6, 0.6,
                0.6, 0.6, 0.5, 0.5, 0.4, 0.3, 0.2, 0.1,
                0.08, 0.05, 0.03, 0.02, 0.02, 0.02, 0.02, 0.02,
                0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02,
                0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02],
)

print(result['phase'])        # LEARNING / MEMORIZED / GROKKING / UNDERSTOOD
print(result['train_loss'])   # current train loss
print(result['test_loss'])    # current test loss
print(result['gap'])          # train-test gap
print(result['gap_trend'])    # is the gap closing?
print(result['grok_epoch'])   # when grokking started (if detected)

Knowledge Engine

Extract structure from text

from gump.knowledge import build_graph

text = """The hippocampus is essential for memory formation.
Long-term potentiation strengthens synapses.
Dopamine drives reward processing and motivation.
Memory consolidation requires hippocampal replay."""

result = build_graph(text)

print(result['nodes'])        # key concepts found
print(result['edges'])        # connections between concepts
print(result['gaps'])         # missing connections (knowledge gaps)
print(result['K'])            # coupling density
print(result['R'])            # structural balance
print(result['n_nodes'])      # total concepts
print(result['n_gaps'])       # total gaps found

Universal Sensor

Diagnose any time series

from gump.sensor import measure_kret, scan, detect_regime_change

# Measure K/R/E/T for any sequence of numbers
result = measure_kret([72, 71, 73, 75, 74, 120, 73, 72, 71])
print(result['K'])            # coupling strength
print(result['R'])            # order parameter
print(result['E_bits'])       # Shannon entropy (bits)
print(result['T'])            # tension (K - R)
print(result['verdict'])      # COUPLED / WEAK / RANDOM

# Sliding window scan across a longer series
windows = scan(data, window=100)
for w in windows:
    print(w['position'], w['K'], w['R'])

# Find where the regime changes
changes = detect_regime_change(data, window=100, threshold=0.3)
for c in changes:
    print(c['position'], c['delta_K'])

Turbo

K expression evaluator

from gump.turbo import compile_k, run

# Compile a K expression
compiled = compile_k('K(3) + R(5)')
print(compiled['compiled'])       # True if valid

# Evaluate it
result = run('K(3) + R(5)')
print(result['result'])           # computed value

# K, R, E, T are built-in functions
result = run('K(10) * R(7)')
print(result['result'])

Trace

Spectral forensics for financial data

from gump.trace import scan, scan_csv, visualize

# Scan transactions (list of dicts)
result = scan([
    {'from': 'A', 'to': 'B', 'amount': 100000},
    {'from': 'B', 'to': 'C', 'amount': 95000},
    {'from': 'C', 'to': 'A', 'amount': 90000},  # circular!
])

print(result['risk_score'])        # 0-100
print(result['circular_flows'])    # detected cycles
print(result['concentration'])     # single-entity dominance
print(result['flags'])             # what looks wrong
print(result['tensions'])          # hidden relationships
print(result['report'])            # human-readable summary

# Or from CSV (from,to,amount,date per line)
result = scan_csv('transactions.csv')
html = visualize(result)           # money flow visualization

Dissonance

Spectral anomaly detection

from gump.sensor import measure_kret, scan, detect_regime_change

# Monitor any system metric as a time series
cpu_readings = [20, 21, 19, 22, 20, 21, 85, 92, 88, 23, 20]

# Measure current state
state = measure_kret(cpu_readings)
print(state['K'])         # coupling — how stable
print(state['R'])         # order — how predictable
print(state['T'])         # tension — something changing?

# Detect where behavior shifted
changes = detect_regime_change(cpu_readings, window=4, threshold=0.2)
for c in changes:
    print(f"Regime change at position {c['position']}, delta_K={c['delta_K']}")

Oracle

Spectral prediction. Find the hidden frequencies.

from gump.oracle import extract, predict

data = [100, 102, 98, 105, 97, 110, 95, 112, 93, 115,
        90, 120, 88, 125, 85, 130, 82, 135, 80, 140]

# Extract dominant frequencies
modes = extract(data)
for m in modes:
    print(m['frequency'], m['amplitude'], m['phase'])

# Project forward
forecast = predict(data, steps=12)
print(forecast['values'])        # next 12 predicted values
print(forecast['confidence'])    # confidence per step (decays)
print(forecast['modes_used'])    # how many frequencies found

Accord

Compliance gap analysis

from gump.accord import scan_regulations

# Define rules and current business state
rules = [
    {'id': 'PRIV-1', 'requirement': 'Must encrypt data at rest', 'category': 'privacy'},
    {'id': 'PRIV-2', 'requirement': 'Must notify on breach within 72h', 'category': 'privacy'},
    {'id': 'FIN-1',  'requirement': 'Annual financial audit required', 'category': 'finance'},
]

business_state = [
    {'category': 'privacy', 'status': 'compliant'},
]

result = scan_regulations(rules, business_state)

print(result['K_compliance'])     # compliance ratio (0-1)
print(result['covered'])          # rules you satisfy
print(result['gaps'])             # rules you don't — with priority
print(result['n_gaps'])           # how many gaps

Tune

Universal coherence detector + predictive decoherence

from gump.tune import detect, coherence, anomaly_detect, decoherence

# Measure coherence of any signal
score = coherence(signal)
# 0 = incoherent, 1 = in tune

# Find the critical point of any system
result = detect(system_fn, param_range=(0, 10))
print(result['peak'])      # optimal parameter (best tuning)
print(result['onset'])     # where coherence begins

# Anomaly detection: detect when coherence drops
detections = anomaly_detect(signal, window=100)
print(detections['detections'])   # sample indices of anomalies

# Predictive decoherence (Anti-Tune): detect BEFORE failure
# Monitors BOTH directions: dropping = degradation, rising = critical sync
warn = decoherence(signal, window=100)
print(warn['direction'])   # 'stable', 'degrading', 'locking', or 'critical'
print(warn['deviation'])   # how far from baseline (in std units)
print(warn['rate'])        # coherence change rate

One function. One metric. No training data. Detects phase transitions, critical coupling, optimal parameters, and anomalies. Finds the minimum coupling that produces coherence — the way a drummer finds the tone by starting loose and listening. Kuramoto Kc to 2%, Ising Tc to 6%, anomaly in 5 samples.

Entropy

12 entropy features + coupling diagnosis

from gump.entropy import profile, diagnose, compare

# Full profile — 12 features + K/R/E/T + diagnosis
result = profile(signal, fs=256)
print(result['diagnosis'])   # "decoupling" / "coupled" / "phase-locked"
print(result['K'])           # coupling strength
print(result['features'])    # all 12 raw entropy features

# Individual entropy measures
from gump.entropy import dfa, hjorth_params, app_entropy
print(dfa(signal))                # detrended fluctuation analysis
print(hjorth_params(signal))      # (mobility, complexity)
print(app_entropy(signal, m=2))   # approximate entropy

# Compare two signals
diff = compare(before, after, fs=256)
print(diff['comparison'])
print(diff['delta_K'])       # +0.4 = gaining structure

Same math as antropy (117K/month). Same 12 features. Plus K/R/E/T on top and a diagnosis in plain English.

Couple

Four-axis coupling profile between two signals

from gump.couple import profile, quick

# Full 4-axis profile
result = profile(signal_a, signal_b, fs=256)
print(result['K_overall'])      # geometric mean of 3 axes
print(result['K_filter'])       # phase-amplitude coupling
print(result['K_bind'])         # temporal binding
print(result['K_hierarchy'])    # spectral slope ratio
print(result['K_direction'])    # who drives who (-1 to +1)
print(result['diagnosis'])      # "strongly coupled, A drives B"

# Quick — one-line verdict
print(quick(signal_a, signal_b, fs=256))
# "COUPLED (filter=0.84, bind=0.91, hier=0.79, dir=+0.32) K=0.87"

Diverge

Find where parallel outputs agree and split

from gump.diverge import diverge

responses = [
    "The answer is 42.",
    "The answer is 42.",
    "The answer is 37.",
]

result = diverge(responses)
print(result['divergence_score'])    # 0 = identical, 1 = total split
print(result['unique_content_ratio'])# novel material per response
print(result['consensus'])           # center of mass
print(result['splits'])              # where the fork happens
print(result['diagnosis'])           # "low divergence, 1 outlier"

The split IS the information. When 4 out of 5 agree but 1 says something different, that one is either wrong or seeing something the others missed.

Verify (Kill)

Anti-confirmation-bias tool. Test claims to 50-digit precision.

from gump.kill import kill, kill_sweep

# Test a single claim
result = kill("sqrt(2/pi)", 0.79891)
print(result['verdict'])     # "PASS" / "CLOSE" / "KILLED"
print(result['ppm'])         # parts per million off
print(result['digits_agree'])# how many significant figures match

# Sweep multiple candidates against one target
sweep = kill_sweep(0.7989, [
    ("sqrt(2/pi)", "sqrt(2/pi)"),
    ("4/5", "4/5"),
    ("ln(2)/e", "ln(2)/e"),
])
# Returns sorted by closeness. Kills what doesn't hold.

PASS = within 1 ppm. CLOSE = within 1000 ppm. KILLED = more than 1000 ppm off. If your formula matches to 3 digits, it might be coincidence. If it matches to 50, it is real.

Questions?

[email protected] — I answer every email.
Support GUMP — everything is free.