Table of Contents
Fetching ...

Knob: A Physics-Inspired Gating Interface for Interpretable and Controllable Neural Dynamics

Siyu Jiang, Sanshuai Cui, Hui Zeng

TL;DR

Knob is proposed, a framework that connects deep learning with classical control theory by mapping neural gating dynamics to a second-order mechanical system, and allows operators to tune stability and sensitivity through familiar physical analogues through familiar physical analogues.

Abstract

Existing neural network calibration methods often treat calibration as a static, post-hoc optimization task. However, this neglects the dynamic and temporal nature of real-world inference. Moreover, existing methods do not provide an intuitive interface enabling human operators to dynamically adjust model behavior under shifting conditions. In this work, we propose Knob, a framework that connects deep learning with classical control theory by mapping neural gating dynamics to a second-order mechanical system. By establishing correspondences between physical parameters -- damping ratio ($ζ$) and natural frequency ($ω_n$) -- and neural gating, we create a tunable "safety valve". The core mechanism employs a logit-level convex fusion, functioning as an input-adaptive temperature scaling. It tends to reduce model confidence particularly when model branches produce conflicting predictions. Furthermore, by imposing second-order dynamics (Knob-ODE), we enable a \textit{dual-mode} inference: standard i.i.d. processing for static tasks, and state-preserving processing for continuous streams. Our framework allows operators to tune "stability" and "sensitivity" through familiar physical analogues. This paper presents an exploratory architectural interface; we focus on demonstrating the concept and validating its control-theoretic properties rather than claiming state-of-the-art calibration performance. Experiments on CIFAR-10-C validate the calibration mechanism and demonstrate that, in Continuous Mode, the gate responses are consistent with standard second-order control signatures (step settling and low-pass attenuation), paving the way for predictable human-in-the-loop tuning.

Knob: A Physics-Inspired Gating Interface for Interpretable and Controllable Neural Dynamics

TL;DR

Knob is proposed, a framework that connects deep learning with classical control theory by mapping neural gating dynamics to a second-order mechanical system, and allows operators to tune stability and sensitivity through familiar physical analogues through familiar physical analogues.

Abstract

Existing neural network calibration methods often treat calibration as a static, post-hoc optimization task. However, this neglects the dynamic and temporal nature of real-world inference. Moreover, existing methods do not provide an intuitive interface enabling human operators to dynamically adjust model behavior under shifting conditions. In this work, we propose Knob, a framework that connects deep learning with classical control theory by mapping neural gating dynamics to a second-order mechanical system. By establishing correspondences between physical parameters -- damping ratio () and natural frequency () -- and neural gating, we create a tunable "safety valve". The core mechanism employs a logit-level convex fusion, functioning as an input-adaptive temperature scaling. It tends to reduce model confidence particularly when model branches produce conflicting predictions. Furthermore, by imposing second-order dynamics (Knob-ODE), we enable a \textit{dual-mode} inference: standard i.i.d. processing for static tasks, and state-preserving processing for continuous streams. Our framework allows operators to tune "stability" and "sensitivity" through familiar physical analogues. This paper presents an exploratory architectural interface; we focus on demonstrating the concept and validating its control-theoretic properties rather than claiming state-of-the-art calibration performance. Experiments on CIFAR-10-C validate the calibration mechanism and demonstrate that, in Continuous Mode, the gate responses are consistent with standard second-order control signatures (step settling and low-pass attenuation), paving the way for predictable human-in-the-loop tuning.
Paper Structure (46 sections, 4 theorems, 10 equations, 5 figures, 3 tables)

This paper contains 46 sections, 4 theorems, 10 equations, 5 figures, 3 tables.

Key Result

Proposition 1

If the continuous-time system parameters satisfy $\zeta>0$ and $\omega_n>0$, then the eigenvalues of the discretized matrix $A_d$ obtained via the Tustin transform obey $|\lambda_i|<1$ for all $\Delta t>0$. Hence the resulting discrete-time system is stable independently of the step size (see Append

Figures (5)

  • Figure 1: The Knob framework as a physics-inspired interface.Left (Dual-Stream Backbone): A shared encoder feeds two lightweight projection heads, producing a robust "Static" branch and a more sensitive "Dynamic" branch, yielding complementary logit vectors $\bm{z}_{\mathrm{static}}$ and $\bm{z}_{\mathrm{dyn}}$. Center (Physics Engine): The gating mechanism is modeled as a mass-spring-damper system (normalized to unit mass). A network-predicted reference input $u^*(x)$ drives the system; its response is governed by two interpretable control parameters---Natural Frequency ($\omega_n$), controlling sensitivity/bandwidth, and Damping Ratio ($\zeta$), controlling stability/conservativeness---which act as tunable "knobs" for the operator. Right (Convex Fusion): The gate value $g(x) \in [0,1]$, determined by the mass displacement, performs a convex combination of two logit branches, naturally limiting model overconfidence.
  • Figure 2: Cost--calibration Pareto frontiers. Left: ECE$_{\mathrm{deb}}$ vs. GFLOPs. Right: ECE$_{\mathrm{deb}}$ vs. latency. ODE-Lite lies near the frontier in both views, indicating a favorable calibration--cost trade-off.
  • Figure 3: E-1: Static equivalence evidence (Knob-IA). (a) CSR for the overall, disagreement, and agreement subsets stays below $1$ and decreases with corruption severity. (b) $\widehat{T}(x)\!\ge\!1$ and increases with severity (Spearman's $\rho=0.6$). (c) Reliability diagram comparing disagreement and agreement subsets. (d) Per-bin ECE by confidence bins.
  • Figure 4: E-2: Learning-level probe---gate "taking sides." Treating $g(x)$ as a "dynamic-preferred" score, we plot AUC for Oracle Advantage (OA, solid lines) and Gradient-Consistent Advantage (GCA, dashed lines) across different sample subsets (overall, top-1 disagreement, margin sign). The polarization index $\Pi=\mathbb{E}[\,|g-0.5|\,]$ is shown on the right axis (gray triangles). AUC steadily increases during training, with overall $\mathrm{AUC}_{\mathrm{OA}} \approx 0.79$ and $\mathrm{AUC}_{\mathrm{GCA}} \approx 0.74$ by epoch 50, while $\Pi$ remains low ($\approx 0.10$), indicating the gate learns to discriminate without saturating.
  • Figure 5: E-3: Dynamics-level probe (Continuous Mode). (a) Step Response: Under a shot-noise severity schedule ($1 \to 5 \to 1$), the gate $g(t)$ (blue) exhibits a smooth, damped transition rather than an instantaneous jump. Shaded bands indicate the inter-quartile range (IQR) over stochastic corruption realizations. (b) Empirical Bode Plot: The magnitude response relative to DC (0 dB) shows a downward trend as frequency increases, consistent with soft low-pass filtering behavior. Error bars represent standard error of the mean (SEM).

Theorems & Definitions (6)

  • Proposition 1: Step-size--independent stability of Tustin discretization
  • Proposition 2: Convex Fusion Contracts the Top-2 Margin
  • Proposition 3: Margin Contraction under Convex Fusion
  • proof
  • Lemma 1
  • proof