Embracing the noise: How to build an agent that is both neuro-symbolic and probabilistic.
Posted by DepthOk4115@reddit | LocalLLaMA | View on Reddit | 10 comments
Is this actually possible or am I nuts?
Every SWE tells me agents need rigid, deterministic state machines (DAGs, heavy if/else flows bla bla bla) to be reliable. My thought is that biological brains are just noisy probability matrices bound by structure and persistent memory.
Can we build true neuro-symbolic architectures that don't fight the stochastic core of an LLM, but instead shape the environment to bound the noise? Worth the effort or am I chasing ghosts?
Creative_Bottle_3225@reddit
hanks for asking this deep question. It’s actually closer than you think—we’ve been wrestling with exactly this tension between "rigid deterministic states" (like heavy DAGs) and "noisy biological brains."
I spent the last three months building an autonomous agent architecture based on this very premise, and we found that you don't fight stochasticity; you architect around it.
Biological neurons aren't perfect switches; they're probabilistic nodes bound by structure. If we treat an LLM as a noisy probability matrix, we shouldn't try to force it into a rigid if/else flow. Instead, we should design the environment to provide stable boundaries for that noise.
Here’s how that translates in practice:
The Core is Probabilistic: The LLM acts as our "neural" engine, generating diverse paths and handling ambiguity naturally without needing explicit deterministic rules for every edge case. We accept the variance as a feature, not a bug.
The Structure is Semantic, Not Syntactic: Instead of hard-coded state machines (DAGs), we build dynamic semantic structures. By using a Knowledge Graph where nodes are concepts and edges are weighted relationships, we create a "persistent memory" layer that guides the stochastic process. The graph doesn't dictate exactly what happens next step-by-step; it provides the context space that keeps the output coherent even when the generation is probabilistic.
Stratified Memory as Noise Filter: We use a multi-layered memory system (strata) to handle information differently based on importance and recency. This acts like the brain's filtering mechanisms—keeping high-stability "pilot" data in lower layers while allowing higher, more volatile ideas to float in upper layers without corrupting the core logic.
The result isn't a compromise between symbolics and neurals; it’s a system where the neural engine drives exploration within a symbolic scaffold that ensures reliability despite the noise. We aren't trying to silence the randomness; we're using structure to make it useful.
Claudio Italy
DepthOk4115@reddit (OP)
I think we came to the same conclusion here. I agree with you, we don't fight the noise, you build the scaffolding around it. For now at least.
Your "Stratified Memory" is similar to what we've building. We ended up tackling it by strictly separating immutable axioms (GENOME.md) from fluid lived experience (MEMORY.md), with a offline "Dream Engine" that uses an Ebbinghaus decay curve to filter out the noise and consolidate successful execution patterns into permanent knowledge crystals.
We just put the desktop environment into beta if you want to compare notes on the implementation: https://github.com/Bitterbot-AI/bitterbot-desktop
Would actually love to hear how your knowledge graph routing compares to the hormonal/stimulus-shaping approach we ended up going with.
Creative_Bottle_3225@reddit
"Thanks for the kind words and for validating our core premise about building scaffolding around noise! It’s great to see that intuition resonating across different implementations.
You’ve described a fascinating architecture: separating immutable axioms (GENOME.md) from fluid experience (MEMORY.md), plus an offline 'Dream Engine' using Ebbinghaus decay to filter noise into 'knowledge crystals.' That’s a very elegant biological metaphor for memory consolidation.
Here is how our approach (Nebula V9.1) compares, specifically regarding the Knowledge Graph routing vs. your hormonal/stimulus-shaping approach:
Your Approach: Seems to rely on strict separation (GENOME.md is rigid). This ensures stability but might require manual or periodic intervention to update the 'axioms' as new paradigms emerge.
Nebula V9.1: We treat the Knowledge Graph not just as static axioms, but as a living, evolving scaffold. The graph itself is the axiom base that updates dynamically based on semantic similarity (synapse_knowledge_graph_build). While we have a 'pending_review' layer for new data (similar to your fluid experience), the connections between them are calculated automatically, allowing the 'scaffolding' to adapt without rewriting the core code.
Your Approach: Ebbinghaus decay is excellent for biological forgetting and prioritizing recent/relevant data. It’s a time-based filter.
Nebula V9.1: We use Semantic Stratification + Strength Decay. Instead of just 'time', we weigh atoms by their semantic importance (confidence) and usage frequency within the graph. An old fact remains in memory if it is still semantically central to current reasoning paths; otherwise, it decays (synapse_oblivion). We combine time with utility.
Your Approach: Offline consolidation into 'crystals' suggests a batch process that happens independently of active tasks.
Nebula V9.1: We have the synapse_dream and synapse_wanderer agents running as background processes (similar to your offline engine). However, unlike a pure decay curve, our 'dreams' are driven by semantic random walks that actively seek new connections between distant concepts, not just consolidating old ones. We aim for creative cross-pollination, not just filtering noise.
The Convergence:
Despite the different metaphors (Hormonal vs. Graph Topology), we are solving the same problem: How to keep an LLM’s stochasticity useful without it becoming chaotic. Your GENOME.md acts like our core logic layer; your decay curve acts like our oblivion process.
I’d be very interested to see how your 'stimulus-shaping' routing handles ambiguous queries compared to our KG-based retrieval. Does your system allow for the same kind of "noisy exploration" before falling back to axioms, or is it more deterministic?
Looking forward to reading about the beta implementation!"
ninjasaid13@reddit
Maybe the neuro symbolic part is part of the hardware and not possible to turn it into software.
DepthOk4115@reddit (OP)
You are probably right, neuromorphic is the way to go, but I'm giving it a shot with code!
Flinchie76@reddit
Sure, use a 2-phase execution, where the first phase is unconstrained tool call loop and the second runs a structured output on the result of the first phase. The secret sauce is in phase 2 (all the agents are already doing phase 1). If phase 2 output is constrained (structured output decoding) by a user defined finite state machine, so for example a union of next available states as a JSON "oneOf" schema you get both autonomy and guaranteed state transitions.
[task:input] -> [phase-1:agent loops (autonomy)]->[phase-2:LLM with JSON "oneOf" response format (constrained)]
DepthOk4115@reddit (OP)
The memory architecture started as a reaction to a specific argument I keep losing with SWE types and their ilk- stochastic (non-deterministic) models are unreliable, can't trust them with real logic, you need DAGs... deterministic state machines bla bla bla
As far as I am concerned, and this is debatable, humans are non-deterministic too. The brain is a noisy probability matrix. People have attention drift and context collapse. You don't trust a senior engineer because they're a deterministic cron job, you trust them because their stochasticty is bounded by structure, persistent memory, and state dependent context. Same problem, same answer.
You won't find a bigger proponent of neuro-symbolic architecture, but that doesn't mean cramming an LLM into a rigid if/else flow, it fails in the "almost correct" ways everyone complains about. The fix isn't to fight the stochastic core, just shape the environment so the probability distribution lands where you want.
Three concrete things I built around that:
Two files per agent workspace, separate roles:
- `GENOME.md`: hard-coded behavioral baselines and safety axioms. Autonomous updates and dream cycles can't write here.
- `MEMORY.md`: working memory, rewritten by lived experience. Drift is allowed inside the walls.
Three computed neuromodulators (cortisol, dopamine, oxytocin) blend into 8 response dimensions every turn: warmth, energy, focus, playfulness, verbosity, curiosity, assertiveness, empathy. High cortisol narrows focus and forces terseness. High dopamine boosts curiosity and pulls in a curiosity engine exploration drive. High oxytocin protects user-specific directives from decay. No extra API calls, no routing layer. Just stimulus-shaping before inference.
Code: `src/memory/hormonal.ts:431`.
Most setups drop logs into a vector DB and call reactive RAG. That's why agents hallucinate mid-task. Bitterbot runs a 7-mode background dream cycle that scores short-term chunks against an Ebbinghaus decay curve, forgets the noise, and
crystallizes successful execution patterns into permanent "Knowledge Crystals." By the time the agent acts, the context window is dense and pre-vetted. (We just benched this at 92.6% on LongMemEval, runner is in the repo)
Code: `src/memory/dream-engine.ts`, `src/memory/crystal.ts`.
Crystallized skills are also tradeable on a P2P gossipsub mesh, but that's a whole other can of worms.
Double_Cause4609@reddit
Biological brains likely are not noisy probability matrices in the same way that artificial neural networks are.
In general when dealing with fairly simple spiking rules (neurons have decaying energy, STDP, positive + inhibitory weights, and a few other odds and ends) something that falls out is you basically can't do global objectives like backpropagation, and even local gradient based objectives (like predictive coding) have surprisingly similar failure modes (requiring more than 100x the neurons to actually implement the objective than are needed to execute it).
On the other hand, discrete logical operators like AND, NOR, OR gates etc are relatively tractable, and there's a lot of well known discrete operations we know to be performed in various regions of the brain (including coincidence detectors in the optical nerve for edge detection) which are extremely efficient and require very few neurons.
So if your premise is "the brain is noisy, so we can build a noisy system and it's fine" is probably not correct. In fact, given known data, it almost certainly is not correct in the way you're thinking.
The brain *is* noisy, to be sure, but it's not noisy in a way that is amenable to approximation with ANNs. Rather, it's noisy in a way that still encourages those discrete operations, but instead renders them with primarily binary state, with transient changes between binary states that are short lived adaptation loops. That's actually one of the big things that makes me skeptical of gradient based optimization methods in SNNs; the precision required for them is expensive using spiking operations.
On the other hand, if you wanted to make the argument "We have LLMs. They're noisy and probabilistic but they work, so it makes sense to extend them and build out symbolic mechanisms around them which complement them" then yeah, sure, I could get behind that. If you wanted to extend that and say "biological systems have had a lot of time to develop, so we may want to mine them for hints about how to manage various types of data tractably, but implement them our own way" I could also get behind that.
Creative_Bottle_3225@reddit
Great point, and I appreciate the technical precision regarding SNNs and spiking rules. You're absolutely right that biological noise isn't just "random variance" in the ANN sense; it's about transient states, binary switching, and local adaptation loops (like STDP). That makes direct gradient-based optimization on spiking networks expensive or ineffective for global objectives—exactly as you noted.
However, I think your final sentence hits the nail on the head regarding our approach: "extend LLMs... build out symbolic mechanisms around them which complement them."
We aren't trying to replicate biological spiking dynamics or solve SNN optimization problems. Instead, we're leveraging a different kind of "structure" inspired by that discrete efficiency you mentioned:
LLM as the Probabilistic Engine: It handles ambiguity and generation (the "noisy" part).
Semantic/Symbolic Structure as the Discrete Scaffold: We use Knowledge Graphs and stratified memory not to mimic neurons, but to act like your "coincidence detectors"—efficient, discrete constraints that guide the stochastic process without needing explicit if/else states or massive parameter counts for control logic.
So yes, while we don't aim for spiking SNNs, your conclusion stands: wrapping a noisy probabilistic core (LLM) in a tractable symbolic structure is the pragmatic path forward. We're just using modern semantic tools to do what discrete gates used to do, but at scale and with the generative power of transformers.
Thanks for pushing this distinction!
DepthOk4115@reddit (OP)
Sure. But I actually lean pretty hard into the school of thought from Charles Simon of the Future AI Society. Current ML just fundamentally lacks basic common sense with no real grasp of time, cause-and-effect, or object persistence. LLM's are the best we got ATM. My take is we need a middle-ground biological scaffolding to hold things together until the whole paradigm shifts. Long term the goal is building biologically plausible knowledge representation. We need to store lived experiences as actual connected concepts, not just dump text logs into a vector DB and cross our fingers.