SKG in Practice: OOD Generalization Cases Across FourDomains
Abstract
This paper presents the engineering implementation methods of the SKG inference framework and provides complete case studies across four domains. Case 1, 2D Dissipative Mechanical System: OOD MSE is 1.69 to 4.12 times lower than the best neural baseline; the state-dependent metric yields a 10^8-order improvement under controlled conditions. Case 2, Target Detection Sim-to-Real: Real-machine mAP increases from 0.2564 to 0.4964 (+24.00 points, single-run experiment, 32 images, point estimate), and AP75 increases from 0.1736 to 0.5765 (+40.29 points), with no real-machine retraining required. Case 3, Sequence Modeling sine to square: OOD MSE is 0.0296 versus Transformer 0.0641 (mean of 5 seeds, p=0.024). Case 4, Molecular Dynamics MD17: ID@100 ADE is 0.0285 versus ESTAG 0.1467; OOD@100 is 0.0316 versus 0.1411 (single seed). For each case, we present the objective, applied SKG theory, parameter settings, baseline comparison protocol, data results, and sources of advantage. Following the cases, we provide the complete methodology: pre-validation, task invariant construction, three-stage training, residual training, and the four theorems and one proposition supporting these methods. This paper not only demonstrates effective configurations of SKG across four domains but also honestly reports the variance of single-run experiments, limitations of single-seed results, negative updates caused by parameterization mismatch, and practical experience of using engineering thresholds as diagnostic signals rather than hard constraints.
Figures & tables
| Case | Domain | Key Results |
|---|---|---|
| 1 | 2D Dissipative Mechanical System | OOD MSE is 1.69–4.12 times lower than the best neural baseline; state-dependent metric yields a -order improvement under controlled conditions |
| 2 | Target Detection Sim-to-Real | Real-machine mAP 0.2564 0.4964 (+24.00 points, single-run experiment, 32 images, point estimate), AP75 0.1736 0.5765 (+40.29 points), no real-machine retraining required |
| 3 | Sequence Modeling sine square | OOD MSE 0.0296 vs Transformer 0.0641 (mean of 5 seeds, p=0.024) |
| 4 | Molecular Dynamics MD17 | ID@100 ADE 0.0285 vs ESTAG 0.1467; OOD@100 0.0316 vs 0.1411 (single seed) |
| Component | Configuration |
|---|---|
| Symplectic structure ( ) | Constant matrix |
| Mass ( ) | Unknown constant positive diagonal, calibrated from training data |
| Potential energy ( ) | Gaussian kernel Nyström, 96 centers |
| Dissipation ( ) | Full symmetric matrix field, Gaussian kernel Nyström, softplus |
| Training | Weak-form residual, LBFGS, 500 iterations |
| Regularization | Ridge + Nyström spectral truncation |
| Component | Configuration |
|---|---|
| Detector | Co-DETR (ResNet-50), with supervised angle branch and rotated width/height branch |
| Detector training | Fine-tuned only on the simulation training set (50-epoch budget, taking epoch 48), frozen and directly used for real-machine test |
| Local coordinates | normalized by detector angle rotation; core region , peripheral region |
| Contour extraction | Multi-channel local Otsu (grayscale/saturation/value) + RGB GMM-GrabCut fallback |
| State | |
| Energy ( ) | Conditional target energy, angular wrapped difference |
| Data Domain | Method | OBB mAP | AP50 | AP75 |
|---|---|---|---|---|
| Simulation Dev | Co-DETR Baseline | 0.6469 | 0.8914 | 0.7195 |
| + SKG 5D Flow | 0.7687 (+12.18) | 0.9600 | 0.8410 (+12.15) | |
| Real-Machine Test | Co-DETR Baseline | 0.2564 | 0.6730 | 0.1736 |
| + SKG 5D Flow | 0.4964 (+24.00) | 0.8432 | 0.5765 (+40.29) |
| Component | Form | Parameter Count |
|---|---|---|
| State | Encoder MLP(24 64 16) | 1.7K |
| Metric ( ) | , rank 4 | 1.8K |
| Energy ( ) | quad + bound + mlp + spec | 5.5K |
| Step size | 500 | |
| Evolution | 10-step explicit evolution + 3 backtracking | — |
| Decoder | Linear layer | 17 |
| Stage | Training Object | Loss | Epoch |
|---|---|---|---|
| A | encoder + metric + energy + decoder + | Trajectory loss | 100 |
| B | metric + energy + | Weak-form residual (Simpson) | 100 |
| C | decoder | Trajectory loss | 50 |
| Metric | SKG | Transformer |
|---|---|---|
| ID MSE | 0.003023 0.000223 | 0.003099 0.000296 |
| OOD MSE | 0.029577 0.008228 | 0.064096 0.018351 |
| OOD/ID | 9.953 3.251 | 21.036 6.893 |
| Component | Configuration |
|---|---|
| Baseline | MACE-OFF23 medium (frozen) |
| Residual network | Conservative Residual EGNN |
| Hidden dimension | 64 |
| Layers | 3 |
| RBF count | 32 |
| Cutoff radius | 5.0 Å |
| Method | Structure | Parameters | Training Objective |
|---|---|---|---|
| ESTAG-res | Temporal graph network + equivariant message passing | 478,622 | |
| ATOM-res | Global neural operator | 1M | Same as above |
| GSE-res | Velocity field integration | — | Same as above |
| Baseline | Parameters | Source |
|---|---|---|
| ESTAG [ 3 ] | 7,799 | NeurIPS 2023 |
| GSE-Flow [ 4 ] | 25,208 | ICML 2026 |
| GF-NODE [ 5 ] | 531,986 | TMLR 2025 |
| ATOM [ 6 ] | 3,557,830 | ICLR 2026 |
| MACE-Cart | 0 (frozen) | Reference baseline |
| Model | Parameters | @10 | @50 | @100 |
|---|---|---|---|---|
| SKG Potential Residual | 3K | 0.003853 | 0.017989 | 0.028546 |
| ESTAG | 7,799 | 0.006718 | 0.065849 | 0.146704 |
| MACE-Cart | 0 | 0.006710 | — | — |
| GF-NODE | 531,986 | 0.037661 | 0.145711 | 0.219097 |
| GSE-Flow | 25,208 | 0.037954 | 0.223124 | 2.761314 |
| ATOM | 3,557,830 | 0.068298 | 0.718328 | 1.152361 |
| Model | @10 | @50 | @100 |
|---|---|---|---|
| SKG Potential Residual | 0.004144 | 0.018740 | 0.031575 |
| ESTAG | 0.006977 | 0.063881 | 0.141094 |
| Method | Parameters | @10 | @50 | @100 | Relative to Potential @10 | @100 |
|---|---|---|---|---|---|---|
| Potential Residual | 3K | 0.003853 | 0.017989 | 0.028546 | — | — |
| ESTAG-res | 478,622 | 0.004567 | 0.024961 | 0.040293 | +18.5% | +41.2% |
| ATOM-res | 1M | 0.004591 | 0.025167 | 0.040385 | +19.2% | +41.5% |
| MACE-Cart | 0 | 0.006706 | 0.028402 | 0.043124 | +74.0% | +51.0% |
| Method | @10 | @50 | @100 |
|---|---|---|---|
| Potential Residual | 0.004144 | 0.018740 | 0.031575 |
| ESTAG-res | 0.005046 | 0.025979 | 0.042990 |
| ATOM-res | 0.005502 | 0.026796 | 0.043456 |
| MACE-Cart | 0.006763 | 0.029043 | 0.045503 |
| Dimension | Case 1 | Case 2 | Case 3 | Case 4 |
|---|---|---|---|---|
| Domain | Scientific ML | Industrial Vision Sim-to-Real | Sequence Modeling | Molecular Dynamics |
| Dynamics | Second-order dissipative | First-order dissipative | First-order gradient flow | Second-order Newtonian |
| Paradigm | Three-stage A/B/C | Unit metric + energy alignment | Three-stage A/B/C | Known metric (mass matrix) |
| Evidence Strength | Relatively Strong | Moderate | Weak | Moderate |
| Pre-validation | Three criteria passed | Physical contour driven | Passed | Implicit |
| Task Invariant ( ) | Gaussian kernel potential | Boundary energy (hierarchical contour) | Spectral prior | E(3) equivariant |
| Criterion | Test | Passing Standard |
|---|---|---|
| Truly invariant | Apply 24 transformations to the OOD transformation group, compute relative change rate | mean < 0.05, max < 0.10 |
| Non-trivial | Variance of each dimension | > |
| Non-redundant | Cov condition number, inter-dimensional correlation | Condition number < , correlation < 0.95 |
| Criterion | Test | Passing Standard |
|---|---|---|
| Condition number | < | |
| Directional stability | Direction cosine when metric changes | > 0.95 |
| Full rank | rank | = D_INV |
| Invariant Type | Function | Invariant To | Used For |
|---|---|---|---|
| Metric invariant ( ) | Construct metric | Geometric group action | |
| Task invariant ( ) | Construct energy | Task-related nuisance |
| Nuisance | Task Invariant |
|---|---|
| Brightness | Relative brightness, local contrast normalization |
| Contrast | Normalized gradient, structure tensor |
| Color | Lab chromaticity, chromaticity normalization |
| Texture | Low-frequency structure, multi-scale pyramid |
| Background | Center-surround contrast, saliency |
| Condition | Paradigm | Applicable Scenario |
|---|---|---|
| Metric objectively determinable | Stage 0/1/2 | Mass matrix known, Fisher estimable |
| Metric needs learning | Stage A/B/C | Nyström dissipation, sequence modeling G(z) |
| Metric uses unit/simplified engineering form | Unit metric + energy alignment | Case 2: Sim-to-Real, focus on energy target correctness |
| Stage | What to Do | Training Object | Frozen | Uses flow | Uses energy |
|---|---|---|---|---|---|
| 0 | Train invariant head | Detector/System | No | No | |
| 1 | Statistical estimation | None (statistical) | All | No | No |
| 2 | Train energy + decoder | energy, decoder | frozen | Yes | Yes |
| Stage | Training Object | Loss | Purpose |
|---|---|---|---|
| A | encoder + metric + energy + decoder + | Trajectory loss | Cold start |
| B | metric + energy + | Residual loss | Fine-tune metric and energy |
| C | decoder | Trajectory loss | Align to task metric |
| Loss | Jacobian | Contains state transition | Amplified by Lyapunov |
|---|---|---|---|
| Trajectory | Yes | Yes | |
| Strong-form residual | No | No | |
| Weak-form residual | No | No |
| Condition | Choice | Reason |
|---|---|---|
| Low observation noise | Strong form | Directly constrains residual, simple |
| High observation noise | Weak form | Avoids numerical differentiation error (Theorem 10.4) |
Scientific ML
Scientific machine learning combines data-driven models with scientific knowledge to analyze, predict, and simulate complex systems.
See all 125 papers