LAWFUL: Law-Aligned Witness for Faithful Use of Latents
When a neural network predicts the motion of a swinging pendulum or the flow of a fluid with high accuracy, it is tempting to assume that the model has internalized the underlying physical law. However, high prediction accuracy alone does not reveal whether the network truly represents the law as structured knowledge or merely exploits […]
When a neural network predicts the motion of a swinging pendulum or the flow of a fluid with high accuracy, it is tempting to assume that the model has internalized the underlying physical law. However, high prediction accuracy alone does not reveal whether the network truly represents the law as structured knowledge or merely exploits statistical correlations that happen to work on the training data. This paper introduces LAWFUL, a framework designed to probe whether a network’s internal computation faithfully uses a discovered law across its entire domain of validity.
What You Need to Know
The authors identify four interpretability gaps that hinder answers to the question of lawful use in continuous‑variable physics systems:
- No metric that evaluates causal consistency while accounting for the coverage of continuous counterfactuals.
- No systematic test to verify that the identified circuit operates correctly throughout the law’s domain of validity.
- No procedure to check whether the network respects the law’s invariants and avoids forbidden behaviors.
- No method to quantify how a derived physical quantity (e.g., energy, momentum) propagates through the network’s layers.
LAWFUL addresses the first two gaps by constructing a witness that couples a causal‑consistency score with a domain‑of‑validity check. The framework first extracts a candidate subcircuit believed to implement the law using intervention‑based probing and symbolic template matching. It then evaluates this subcircuit on a dense set of counterfactual interventions that span the continuous input space, weighting each intervention by its probability under a coverage distribution. Finally, it tests whether the subcircuit’s output remains within analytically derived bounds for all points in the domain, thereby providing a domain‑of‑validity certificate.
Why It Matters
Knowing whether a model truly encodes a physical law is critical for scientific discovery, safety‑critical control, and extrapolation beyond observed conditions. If a network only mimics the law on a narrow manifold, downstream tasks such as control design or sim‑to‑real transfer can fail catastrophically when the system encounters unseen states. LAWFUL offers a principled way to certify that the model’s internal computation aligns with the governing equations, increasing confidence that predictions will remain valid when the system is pushed to new regimes.
Beyond verification, the framework can guide model improvement. By highlighting where the causal‑consistency score drops or where the domain‑of‑validity test fails, practitioners can target additional data collection or architectural changes to strengthen the law‑aligned subcircuit. This bridges the gap between black‑box performance and interpretable, physics‑based reasoning in deep learning.
Key Details
- Coverage‑aware causal‑consistency metric: measures how well the subcircuit’s response matches the law’s predicted change under interventions, weighted by a user‑defined coverage density over continuous inputs.
- Domain‑of‑validity test: analytically derives admissible output ranges from the law and checks that the subcircuit never violates them across the entire input domain.
- Invariant and forbidden‑behavior checking: (planned extension) verifies conserved quantities and flags outputs that contradict known symmetries or impossibility constraints.
- Flow quantification of derived quantities: tracks how intermediate activations propagate a target physical quantity (e.g., total energy) from input to output.
- Evaluation on synthetic benchmarks: applied to a simulated pendulum and a 2‑D Navier‑Stokes flow, showing that LAWFUL correctly identifies law‑aligned subcircuits and rejects spurious correlations.
- Implementation: built on PyTorch with modular probes; the core algorithm runs in O(N·M) time where N is the number of counterfactual samples and M is the number of layers inspected.
What’s Next
The authors plan to extend LAWFUL to partially observed systems where only a subset of state variables is measurable, and to integrate the witness directly into the training loop as a regularizer that encourages law‑aligned representations. They also aim to test the framework on real‑world sensor data from robotics and climate modeling, where guaranteeing faithful use of physical laws can have immediate practical impact.
📌 Source: Arxiv Ml
Related Articles
Output-Aware Rotation for INT2 KV-Cache Quantization
When a language model processes long inputs, the key‑value (KV) cache that stores intermediate representations grows quickly and begins to
Learning Molecular Representations from Cellular Phenotypes with Structure Preservation
When scientists test thousands of compounds in cellular assays, they generate a wealth of phenotypic data that links chemical structure
Multimodal Auto-regressive Transformer Surrogate for Modeling Variable Operations and Quantifying Uncertainty in Geological Carbon Storage
Storing carbon dioxide underground is a key strategy for reducing atmospheric emissions, but the success of each project hinges on