<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Val Huang</title>
    <description>The latest articles on DEV Community by Val Huang (@valhuang).</description>
    <link>https://dev.to/valhuang</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3843523%2F0138e4f5-5a5e-47dc-95ee-0db6352ab660.png</url>
      <title>DEV Community: Val Huang</title>
      <link>https://dev.to/valhuang</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/valhuang"/>
    <language>en</language>
    <item>
      <title>WLBS + MoE: Finally, an AI that learns where the bug really lives</title>
      <dc:creator>Val Huang</dc:creator>
      <pubDate>Wed, 25 Mar 2026 17:13:51 +0000</pubDate>
      <link>https://dev.to/valhuang/wlbs-moe-finally-an-ai-that-learns-where-the-bug-really-lives-2ick</link>
      <guid>https://dev.to/valhuang/wlbs-moe-finally-an-ai-that-learns-where-the-bug-really-lives-2ick</guid>
      <description>&lt;p&gt;You’ve seen this happen.&lt;/p&gt;

&lt;p&gt;An AI coding agent tries to fix an ImportError in rbac.py. It edits the file three times, five times, ten times. Nothing works.&lt;/p&gt;

&lt;p&gt;The real bug is in roles.py—the file that rbac.py imports. The error shows downstream, but the cause lives upstream.&lt;/p&gt;

&lt;p&gt;The AI keeps banging on the wrong file because its memory is temporal, not spatial. It remembers “I failed here” but not “this file depends on that one.”&lt;/p&gt;

&lt;p&gt;We built a system that fixes this gap—and it works.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The core idea: keep information in its original shape&lt;/strong&gt;&lt;br&gt;
Most AI agents today store experience as text: rules extracted from logs, reflections written in natural language. Every translation discards structure. The call graph, the dependency chain, the propagation path—all flattened into words.&lt;/p&gt;

&lt;p&gt;WLBS (World-Line Behavior Space) does the opposite.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdj56l8dzr1c59qi592l4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdj56l8dzr1c59qi592l4.png" alt=" " width="800" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every function, module, or service node keeps a world-line—an append‑only log of every event that ever touched it. Task ID, action, result, reasoning, whether that reasoning was correct—all stored on the node itself.&lt;/li&gt;
&lt;li&gt;When a test fails, a curvature increment propagates backward along the call graph. Nodes closer to the root cause get larger increments; after repeated failures, the upstream root cause accumulates the highest curvature.&lt;/li&gt;
&lt;li&gt;A singularity flag appears on that node—no natural language, no parsing, just a typed attribute the decision layer reads directly.&lt;/li&gt;
&lt;li&gt;Resolution decay (inspired by the biological fovea) feeds the LLM only what it needs: full history for nearby nodes, key events for the neighbourhood, just identifiers and curvature for distant parts. Context stays small—about 375 tokens for a real cross‑file bug.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No translation, no retrieval, no guesswork. The geometry of the dependency graph itself points to the root cause.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwxiba5raqbfia20bw36t.png" alt=" " width="800" height="560"&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;MoE meets WLBS: each node gets its own expert&lt;/strong&gt;&lt;br&gt;
WLBS gives the system structural memory. MoE (Mixture of Experts) gives it specialised intelligence.&lt;/p&gt;

&lt;p&gt;We map every node in the behavior graph to a lightweight expert (a LoRA adapter). A tiny router reads the node’s curvature and world‑line summary, then activates the relevant experts—often the current node plus high‑curvature upstream nodes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8cfvjf9zxlfgkoikisil.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8cfvjf9zxlfgkoikisil.png" alt=" " width="800" height="540"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;The loop:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A test fails at node rbac.py.&lt;/li&gt;
&lt;li&gt;Curvature propagates upstream; roles.py gets a high curvature increment.&lt;/li&gt;
&lt;li&gt;Router sees the high curvature upstream and activates both the roles.py expert and the rbac.py expert.&lt;/li&gt;
&lt;li&gt;Experts produce a decision: modify roles.py (not rbac.py).&lt;/li&gt;
&lt;li&gt;Action is executed, feedback is written back to the world‑lines.&lt;/li&gt;
&lt;li&gt;Success → curvature decays for rbac.py and increments for roles.py are already there.&lt;/li&gt;
&lt;li&gt;Offline, high‑curvature nodes are fine‑tuned (LoRA) using their world‑line data—only the nodes that actually matter get updated.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The result: continuous improvement without full retraining. The system gets better at diagnosing similar issues every time it encounters them, and the learning is isolated to the nodes that actually need it.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmqmgkjt9mvejg7m0cioc.png" alt=" " width="800" height="540"&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Real numbers from a real bug&lt;/strong&gt;&lt;br&gt;
We tested on a cross‑file repair task (b‑16: roles.py → rbac.py).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Behavioral distance correctly identified as 1 hop.&lt;/li&gt;
&lt;li&gt;Context assembly took 5–22 ms.&lt;/li&gt;
&lt;li&gt;Gate prompt size ~375 tokens.&lt;/li&gt;
&lt;li&gt;First effective write target was roles.py—the correct upstream file.&lt;/li&gt;
&lt;li&gt;Passing tests went from 34/44 → 42/44.&lt;/li&gt;
&lt;li&gt;Gate failure rate 4.76%.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And the improvement came without parameter updates—just from world‑line accumulation and curvature propagation.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Why this matters for developers&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;**No more chasing symptoms. **You get spatial root‑cause attribution without hand‑coded rules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low overhead.&lt;/strong&gt; The routing prompt is tiny; the curvature propagation is pure arithmetic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Works with existing LLMs.&lt;/strong&gt; Gate is a standard LLM, fed structured data (graph + curvature + world‑line excerpts). You don’t need to retrain the model.&lt;/li&gt;
&lt;li&gt;**Scales. **Resolution decay keeps context bounded; experts are updated only when their curvature spikes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Opens the door to other domains.&lt;/strong&gt; The same pattern works for microservices, supply chains, even clinical diagnosis—anywhere there’s a dependency graph and repeatable failures.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What’s next&lt;/strong&gt;&lt;br&gt;
We’ve filed two Chinese patents (CN 2026103746505 and CN 2026103756225) and are releasing the core implementation open‑source (repo to be announced). A preprint is on arXiv (cs.SE / cs.AI, March 25, 2026).&lt;/p&gt;

&lt;p&gt;We’re actively looking for:&lt;/p&gt;

&lt;p&gt;Early adopters to try WLBS on their own codebases or microservice topologies.&lt;/p&gt;

&lt;p&gt;Contributors to help with runtime dependency tracking, large‑graph performance, and parameter auto‑tuning.&lt;/p&gt;

&lt;p&gt;Researchers to extend the framework to new domains and formalise the curvature propagation theory.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Get involved&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Watch the GitHub repo ：&lt;a href="https://github.com/val1813/wlbs-cli" rel="noopener noreferrer"&gt;https://github.com/val1813/wlbs-cli&lt;/a&gt;&lt;br&gt;
Try the CLI prototype: pip install wlbs-scan &lt;/p&gt;

&lt;p&gt;If you’ve ever spent hours chasing a bug that was upstream, or wished your AI agent had a sense of space, this is for you.&lt;/p&gt;

&lt;p&gt;Let’s give AI a map—not just a timeline.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
