Downloads · 30 days
0
1990two/liquid_bayes
liquid_bayes is a machine learning model from 1990two. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for pytorch. The card lists the license as apache-2.0.
Probabilistic Control of Continuous Dynamics with Bayesian Feedback
Downloads · 30 days
0
Access
Public
Updated Aug 20, 2025
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py45.4 KB · 89%
From the Hugging Face model README
Probabilistic Control of Continuous Dynamics with Bayesian Feedback
Experimental Research Code - Functional but unoptimized, expect rough edges
Liquid Bayes Chain combines liquid neural networks with Bayesian inference to create a system where probabilistic confidence directly modulates continuous dynamics. The network's liquid state evolves based on Bayesian uncertainty, creating adaptive exploration-exploitation behavior.
Core Innovation: Bayesian confidence estimates control liquid time constants and dynamics, creating a feedback loop between probabilistic reasoning and continuous neural evolution.
from liquid_bayes import LiquidBayesChain
# Create liquid-Bayesian system
model = LiquidBayesChain(
input_dim=32,
state_dim=64,
output_dim=10,
num_chain_steps=4
)
# Process input with uncertainty quantification
input_signal = torch.randn(batch_size, input_dim)
output = model(input_signal, return_chain_states=True)
# Get uncertainty information
uncertainty_info = model.predict_with_uncertainty(input_signal)
print(f"Confidence: {uncertainty_info['confidence'].mean():.3f}")
The liquid dynamics evolve according to:
dx/dt = -x/τ(confidence) + W_rec·σ(x) + W_in·u + noise(1-confidence)
Bayesian confidence estimation uses:
P(belief|evidence) ∝ P(evidence|belief) × P(belief)
confidence = 1 - H(P(belief|evidence))
Where H is Shannon entropy. High confidence leads to stable dynamics (large τ), while low confidence increases exploration through noise injection and faster adaptation.
The chain processes through multiple steps:
x_{t+1} = LiquidEvolution(x_t, u, confidence_t)
confidence_{t+1} = BayesianUpdate(x_{t+1})
pip install torch numpy scipy
# Download liquid_bayes.py from this repo
Liquid Bayes Chain is part of a larger exploration of foundational algorithms enhanced with modern neural techniques:
@misc{liquidbayes2025,
title={Liquid Bayes Chain: Probabilistic Control of Continuous Dynamics},
author={Jae Parker 𓅸 1990two},
year={2025},
note={Part of The Classics Revival Collection}
}