Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
5aedad3
Add PINN a posteriori estimator notebook for unit-square Poisson
pcpet Apr 9, 2026
d43e6ad
Merge pull request #111 from pcpet/codex/add-notebook-for-pinn-a-post…
pcpet Apr 9, 2026
dd01554
Add interval Hessian bounds and W22 sobolev norm support
pcpet Apr 10, 2026
f43f14e
Merge branch 'better-int' into codex/add-notebook-for-pinn-a-posterio…
pcpet Apr 10, 2026
a747a5d
Update docs to reflect Hessian and W2 Sobolev support
pcpet Apr 10, 2026
8d630f5
Merge pull request #112 from pcpet/codex/add-notebook-for-pinn-a-post…
pcpet Apr 10, 2026
d6fe9fa
Merge pull request #113 from pcpet/codex/add-notebook-for-pinn-a-post…
pcpet Apr 10, 2026
af17f7e
Add PINN solution/error/indicator visualizations to notebook
pcpet Apr 10, 2026
0e0041d
Merge branch 'better-int' into codex/add-notebook-for-pinn-a-posterio…
pcpet Apr 10, 2026
ba9160e
Merge pull request #114 from pcpet/codex/add-notebook-for-pinn-a-post…
pcpet Apr 10, 2026
ac2965d
Fix residual indicator map to use final adaptive partition values
pcpet Apr 10, 2026
372dbe4
Merge branch 'better-int' into codex/add-notebook-for-pinn-a-posterio…
pcpet Apr 10, 2026
ea1e8c0
Merge pull request #115 from pcpet/codex/add-notebook-for-pinn-a-post…
pcpet Apr 10, 2026
8c08f0c
ran experiment and changed some meta data
Viktoriaboldt Apr 10, 2026
cd1f8c8
Plot PDE residual in PINN Poisson notebook figure
pcpet Apr 10, 2026
413f983
Merge pull request #116 from pcpet/codex/plot-residual-instead-of-cur…
pcpet Apr 10, 2026
5d1f0bd
Cache interval Hessian bounds in residual certification
pcpet Apr 11, 2026
066f1b5
Merge branch 'better-int' into codex/plot-residual-instead-of-current…
pcpet Apr 11, 2026
6f96f28
Merge pull request #117 from pcpet/codex/plot-residual-instead-of-cur…
pcpet Apr 11, 2026
cfd996e
Speed up residual visualization with chunked no-graph eval
pcpet Apr 11, 2026
3d6e77f
Merge branch 'better-int' into codex/plot-residual-instead-of-current…
pcpet Apr 11, 2026
cf12d3b
Merge pull request #118 from pcpet/codex/plot-residual-instead-of-cur…
pcpet Apr 11, 2026
a91bc3a
Fix residual autograd for chunked visualization
pcpet Apr 11, 2026
b268439
Merge branch 'better-int' into codex/plot-residual-instead-of-current…
pcpet Apr 11, 2026
a9a045b
Merge pull request #119 from pcpet/codex/plot-residual-instead-of-cur…
pcpet Apr 11, 2026
f462952
Use multi-mode Poisson target and add Adam weight decay
pcpet Apr 12, 2026
d9da7d4
Merge pull request #120 from pcpet/codex/plot-residual-instead-of-cur…
pcpet Apr 12, 2026
d5a5039
new numerical experiments for pinns
Viktoriaboldt Apr 12, 2026
7c7bd30
new exp
Viktoriaboldt Apr 13, 2026
d85e09e
Update PINN notebook to use localized bump forcing
pcpet Apr 13, 2026
f9a1afc
Merge pull request #121 from pcpet/codex/update-experiment-in-pinns-i…
pcpet Apr 13, 2026
41d51f5
new exp
Viktoriaboldt Apr 14, 2026
6359045
Add PINN results figure and boundary-condition note to README
pcpet Apr 14, 2026
262c4df
Merge pull request #123 from pcpet/codex/add-pinns-computation-image-…
pcpet Apr 14, 2026
4dae57a
Move AffineTensor tests into a Jupyter notebook
MoritzMaibaum Apr 21, 2026
1dca72b
Merge pull request #124 from pcpet/codex/create-affine-arithmetic-con…
MoritzMaibaum Apr 21, 2026
cf9e5a1
Move affine test notebook to notebooks and fix import path
MoritzMaibaum Apr 21, 2026
581276e
Merge pull request #125 from pcpet/codex/move-jupyter-notebook-to-not…
MoritzMaibaum Apr 21, 2026
f342198
Move affine activation tests into test_affine notebook
MoritzMaibaum Apr 21, 2026
5b283a3
Merge pull request #126 from pcpet/codex/add-affine-domain-activation…
MoritzMaibaum Apr 21, 2026
dad0b2e
Add affine eval dispatch regression tests in pytest and notebook
MoritzMaibaum Apr 21, 2026
06d9553
Merge pull request #127 from pcpet/codex/update-functions-to-dispatch…
MoritzMaibaum Apr 21, 2026
3ad0378
Add affine parity checks to affine test notebook
MoritzMaibaum Apr 21, 2026
e16ec72
Merge pull request #128 from pcpet/codex/update-exports-and-documenta…
MoritzMaibaum Apr 21, 2026
2125496
Update affine notebook with new interval-eval affine tests
MoritzMaibaum Apr 21, 2026
0e88dc9
Merge pull request #129 from pcpet/codex/extend-enable_interval_eval-…
MoritzMaibaum Apr 21, 2026
1ca71bf
Add affine-domain reproduction notebook for Lp/W1p experiments
MoritzMaibaum Apr 21, 2026
95fa841
Merge pull request #130 from pcpet/codex/create-aa_reproduce_lp_w1p_e…
MoritzMaibaum Apr 21, 2026
a11f702
Add affine backend coverage checks to test notebook
MoritzMaibaum Apr 21, 2026
50f5075
Merge pull request #131 from pcpet/codex/update-_affine_forward-for-b…
MoritzMaibaum Apr 21, 2026
f10144a
Fix affine interval lifting backend selection for torch models
MoritzMaibaum Apr 21, 2026
3f0751b
Merge pull request #132 from pcpet/codex/refactor-interval-to-affine-…
MoritzMaibaum Apr 21, 2026
6fc5c29
Add files via upload
MoritzMaibaum Apr 22, 2026
f6dd25b
Add intervalNets-based IA/AA plot set to repro notebook
MoritzMaibaum Apr 22, 2026
799ef9c
Merge pull request #133 from pcpet/codex/add-plots-for-ia-and-aa-comp…
MoritzMaibaum Apr 22, 2026
55a2806
Add configurable affine tanh optimization modes
MoritzMaibaum Apr 22, 2026
545f898
Merge pull request #134 from pcpet/codex/enhance-affine_tanh_transfor…
MoritzMaibaum Apr 22, 2026
6edde05
Add intervalNets min-range and Chebyshev AA overlay plots
MoritzMaibaum Apr 22, 2026
8adf9e6
Merge pull request #135 from pcpet/codex/add-plots-for-tanh-affine-ap…
MoritzMaibaum Apr 22, 2026
89ee560
Use Chebyshev affine tanh approximation in reproduction notebook
MoritzMaibaum Apr 22, 2026
6c9d180
Merge pull request #136 from pcpet/codex/update-notebook-to-use-cheby…
MoritzMaibaum Apr 22, 2026
d0f0fe0
Use Chebyshev tanh mode consistently for affine norm workflows
MoritzMaibaum Apr 22, 2026
1e27025
Merge pull request #137 from pcpet/codex/enable-chebyshev-approximati…
MoritzMaibaum Apr 22, 2026
ad28ef6
Add IA/AA notebook config summaries and figure tags
MoritzMaibaum Apr 22, 2026
9b4f643
Merge pull request #138 from pcpet/codex/add-configuration-summary-an…
MoritzMaibaum Apr 22, 2026
61734d5
Use affine-aware Jacobian bounds in Sobolev order-1 path
MoritzMaibaum Apr 22, 2026
703001d
Merge pull request #139 from pcpet/codex/update-affine-sobolev-path-i…
MoritzMaibaum Apr 22, 2026
5c63f37
Add W1p bound-width component diagnostics for 2D tanh experiments
MoritzMaibaum Apr 22, 2026
abaa28d
Merge pull request #140 from pcpet/codex/extend-bound_gap_curve-diagn…
MoritzMaibaum Apr 22, 2026
2f6e863
Add adaptive quadrature surface plot notebook test
MoritzMaibaum May 7, 2026
b61eb77
Merge pull request #141 from pcpet/codex/add-adaptive-quadrature-surf…
MoritzMaibaum May 7, 2026
a702da9
Implement AdaQuad midpoint partition visualization in notebook
MoritzMaibaum May 7, 2026
04645dc
Merge branch 'better-int' into codex/add-adaptive-quadrature-surface-…
MoritzMaibaum May 7, 2026
86e4113
Merge pull request #142 from pcpet/codex/add-adaptive-quadrature-surf…
MoritzMaibaum May 7, 2026
70f02c4
Print certified integration interval and width in AdaQuad cell
MoritzMaibaum May 9, 2026
67a58d8
Merge branch 'better-int' into codex/add-adaptive-quadrature-surface-…
MoritzMaibaum May 9, 2026
cf1fdd4
Merge pull request #143 from pcpet/codex/add-adaptive-quadrature-surf…
MoritzMaibaum May 9, 2026
be91f9f
Create blueprint for Polynomial-Zonotope Two-Jet Enclosures
MoritzMaibaum Jun 16, 2026
803e5ae
Add Codex instructions for polynomial-zonotope task
MoritzMaibaum Jun 16, 2026
357dc53
Add polynomial zonotope core
MoritzMaibaum Jun 16, 2026
aa0544a
Merge pull request #144 from pcpet/codex/add-polynomialzonotope-module
MoritzMaibaum Jun 16, 2026
d184194
Add PZ two-jet initializer
MoritzMaibaum Jun 16, 2026
3dd5112
Merge pull request #145 from pcpet/codex/add-pztwojet-dataclass-and-i…
MoritzMaibaum Jun 16, 2026
fe50f13
Add polynomial zonotope linear layer propagation
MoritzMaibaum Jun 16, 2026
e5b330b
Merge pull request #146 from pcpet/codex/add-_pz_twojet_linear_forwar…
MoritzMaibaum Jun 16, 2026
4de0c90
Add certified tanh polynomial approximation scaffolding
MoritzMaibaum Jun 16, 2026
fef02ed
Merge pull request #147 from pcpet/codex/add-tanh-approximation-module
MoritzMaibaum Jun 16, 2026
5320f54
Add scalar PZ tanh approximation
MoritzMaibaum Jun 16, 2026
01235ef
Merge pull request #148 from pcpet/codex/add-polynomial-zonotope-feat…
MoritzMaibaum Jun 16, 2026
df268b6
Add polynomial-zonotope tanh two-jet propagation
MoritzMaibaum Jun 16, 2026
9ecb94a
Merge pull request #149 from pcpet/codex/add-_pz_twojet_tanh_forward-…
MoritzMaibaum Jun 16, 2026
42ee0c5
Add PyTorch PZ two-jet forward integration
MoritzMaibaum Jun 16, 2026
22303f7
Merge pull request #150 from pcpet/codex/add-pz_twojet_forward-integr…
MoritzMaibaum Jun 16, 2026
5b71daa
Add PZ two-jet test notebook
MoritzMaibaum Jun 16, 2026
1561b19
Merge pull request #151 from pcpet/codex/add-tests-for-pz-two-jet-fun…
MoritzMaibaum Jun 16, 2026
518c45e
Remove affine exports from package init
MoritzMaibaum Jul 8, 2026
8c687e0
Merge pull request #152 from pcpet/codex/update-init.py-to-remove-aff…
MoritzMaibaum Jul 8, 2026
6480b83
Remove legacy affine arithmetic modules
MoritzMaibaum Jul 8, 2026
22a04d9
Merge pull request #153 from pcpet/codex/remove-old-affine-arithmetic…
MoritzMaibaum Jul 8, 2026
59fead0
Remove DomainTensor alias from PyTorch interval helpers
MoritzMaibaum Jul 8, 2026
c36cc85
Merge pull request #154 from pcpet/codex/remove-affine-support-from-p…
MoritzMaibaum Jul 8, 2026
8c4de98
Update API docs after affine module removal
MoritzMaibaum Jul 8, 2026
aca58b3
Merge pull request #155 from pcpet/codex/refactor-_tanh_affine_parame…
MoritzMaibaum Jul 8, 2026
886cfa3
Remove old affine arithmetic docs
MoritzMaibaum Jul 8, 2026
eb6b184
Merge pull request #156 from pcpet/codex/update-documentation-to-remo…
MoritzMaibaum Jul 8, 2026
1ec88d5
Add polynomial zonotope noise metadata
MoritzMaibaum Jul 20, 2026
aaa7f1b
Merge pull request #157 from pcpet/codex/update-polynomialzonotope-wi…
MoritzMaibaum Jul 20, 2026
8654448
Add polynomial zonotope noise integration
MoritzMaibaum Jul 20, 2026
02a11a6
Merge pull request #158 from pcpet/codex/add-coefficient-level-integr…
MoritzMaibaum Jul 20, 2026
c1550dc
Add pointwise-safe PZ integration
MoritzMaibaum Jul 20, 2026
383a199
Merge pull request #159 from pcpet/codex/update-pz-integration-design…
MoritzMaibaum Jul 20, 2026
fa6be89
Add PZ integration cells
MoritzMaibaum Jul 20, 2026
bf291cd
Merge pull request #160 from pcpet/codex/erstelle-pzintegrationcell-u…
MoritzMaibaum Jul 20, 2026
fd89745
Add polynomial-zonotope norm helpers
MoritzMaibaum Jul 20, 2026
1b79c16
Merge pull request #161 from pcpet/codex/add-pz-norm-helper-functions
MoritzMaibaum Jul 20, 2026
79b5cf3
Add adaptive PZ norm integration
MoritzMaibaum Jul 20, 2026
d4479d5
Merge pull request #162 from pcpet/codex/add-pz-adaptive-integration-…
MoritzMaibaum Jul 20, 2026
90c9e7a
Expose PZ norm APIs for PyTorch modules
MoritzMaibaum Jul 20, 2026
9b93816
Merge pull request #163 from pcpet/codex/update-pz-norm-functions-and…
MoritzMaibaum Jul 20, 2026
e82a12b
Add PZ norm regression tests
MoritzMaibaum Jul 20, 2026
b4c9aef
Merge pull request #164 from pcpet/codex/add-unit-tests-for-pz-norms
MoritzMaibaum Jul 20, 2026
f3cf845
Add PZ adaptive quadrature comparison notebook
MoritzMaibaum Jul 20, 2026
3124041
Merge pull request #165 from pcpet/codex/add-notebook-for-adaptive-qu…
MoritzMaibaum Jul 20, 2026
08de05f
Add forward refine max cells to quadrature notebook
MoritzMaibaum Jul 20, 2026
c53fc3a
Merge pull request #166 from pcpet/codex/update-adaptive-quadrature-c…
MoritzMaibaum Jul 20, 2026
9ef7ee4
Fix PZ two-jet complexity accounting
MoritzMaibaum Jul 20, 2026
65b5c0f
Merge pull request #167 from pcpet/codex/edit-adaptive-quadrature-not…
MoritzMaibaum Jul 20, 2026
5cc8495
Rename tanh approximation degree option
MoritzMaibaum Jul 22, 2026
6855b1d
Merge pull request #168 from pcpet/codex/update-two-jet-tanh-approxim…
MoritzMaibaum Jul 22, 2026
61aabea
Refactor PZ adaptive quadrature traces
MoritzMaibaum Jul 22, 2026
70410a7
Merge pull request #169 from pcpet/codex/refactor-adaptive-refinement…
MoritzMaibaum Jul 22, 2026
1113c9d
Affine tanh enclosures
MoritzMaibaum Jul 22, 2026
6bc03ab
Certified polynomial zonotope integration
MoritzMaibaum Jul 22, 2026
853f958
Add affine tanh enclosure helpers
MoritzMaibaum Jul 22, 2026
fb73e29
Merge pull request #170 from pcpet/codex/add-affine-tanh-enclosure-ro…
MoritzMaibaum Jul 22, 2026
bf24989
Use affine tanh enclosures in PZ two-jet
MoritzMaibaum Jul 22, 2026
dfaf451
Merge pull request #171 from pcpet/codex/update-_pz_twojet_tanh_forwa…
MoritzMaibaum Jul 22, 2026
78eb462
Optimize PZ adaptive integration caching
MoritzMaibaum Jul 22, 2026
41b8ea4
Merge pull request #172 from pcpet/codex/enhance-adaquad-integration-…
MoritzMaibaum Jul 22, 2026
a21348c
Add affine PZ two-jet AdaQuad benchmark notebook
MoritzMaibaum Jul 22, 2026
8bdae7d
Merge pull request #173 from pcpet/codex/update-affine_pz_twojet_adaq…
MoritzMaibaum Jul 22, 2026
da313d1
Add affine tanh pointwise residual regression
MoritzMaibaum Jul 22, 2026
72707c3
Merge pull request #174 from pcpet/codex/add-regression-tests-for-aff…
MoritzMaibaum Jul 22, 2026
a941c00
Clean affine PZ benchmark controls
MoritzMaibaum Jul 22, 2026
7600a2a
Merge pull request #175 from pcpet/codex/implement-efficient-two-jet-…
MoritzMaibaum Jul 22, 2026
aa74c0b
Add PZ monomial growth diagnostics notebook section
MoritzMaibaum Jul 23, 2026
822af0f
Merge pull request #176 from pcpet/codex/add-monomial-growth-diagnost…
MoritzMaibaum Jul 23, 2026
06c96f9
Optimize symmetric PZ Hessian norm accumulation
MoritzMaibaum Jul 23, 2026
c6c9c0c
Merge pull request #177 from pcpet/codex/add-optimized-w22-hessian-sq…
MoritzMaibaum Jul 23, 2026
5fe59e4
Add PZ multiplication diagnostics
MoritzMaibaum Jul 23, 2026
2b79f60
Merge pull request #178 from pcpet/codex/add-diagnostic-utility-for-m…
MoritzMaibaum Jul 23, 2026
1f4ba66
Fix fallback polynomial zonotope tuple indexing
MoritzMaibaum Jul 23, 2026
f0e4e0c
Merge pull request #179 from pcpet/codex/update-polynomialzonotope-in…
MoritzMaibaum Jul 23, 2026
c56bec0
Cache PZ two-jet integrands in benchmark notebook
MoritzMaibaum Jul 23, 2026
93bab71
Merge pull request #180 from pcpet/codex/refactor-norm-calculations-i…
MoritzMaibaum Jul 23, 2026
0bcf8ae
Add symmetry-aware Hessian square helper
MoritzMaibaum Jul 23, 2026
2ee9d49
Merge pull request #181 from pcpet/codex/add-hessian-square-accumulat…
MoritzMaibaum Jul 23, 2026
7a12322
Add PZ two-jet tracing mode
MoritzMaibaum Jul 23, 2026
b8d7b4d
Merge pull request #182 from pcpet/codex/implement-opt-in-tracing-mod…
MoritzMaibaum Jul 23, 2026
0c6aca2
Add polynomial zonotope formatting helpers
MoritzMaibaum Jul 23, 2026
13d2038
Merge pull request #183 from pcpet/codex/add-latex/markdown-format-he…
MoritzMaibaum Jul 23, 2026
6f1b5f4
Expose PZ two-jet polynomial trace in notebook
MoritzMaibaum Jul 23, 2026
e991e22
Merge pull request #184 from pcpet/codex/update-pz-diagnostic-noteboo…
MoritzMaibaum Jul 23, 2026
016ad11
Add PZ two-jet norm diagnostics
MoritzMaibaum Jul 23, 2026
14e0863
Merge pull request #185 from pcpet/codex/add-diagnostic-layer-for-pz-…
MoritzMaibaum Jul 23, 2026
9e14407
Handle tuple-backed PZ trace components
MoritzMaibaum Jul 23, 2026
c262e2e
Merge pull request #186 from pcpet/codex/update-helper-for-pz-two-jet…
MoritzMaibaum Jul 23, 2026
e713eb5
Prune zero polynomial zonotope terms
MoritzMaibaum Jul 23, 2026
d316ad3
Merge pull request #187 from pcpet/codex/add-zero-term-pruning-to-pol…
MoritzMaibaum Jul 23, 2026
0ec216f
Clean up affine PZ two-jet notebook diagnostics
MoritzMaibaum Jul 24, 2026
de8ee05
Merge pull request #188 from pcpet/codex/update-affine_pz_twojet-note…
MoritzMaibaum Jul 24, 2026
40e3934
Accelerated L2, W12, W22 norm computation
MoritzMaibaum Jul 25, 2026
b1d34c0
Update Codex instructions for current PZ integration work
MoritzMaibaum Jul 25, 2026
d4d3dd7
Optimize direct PZ two-jet norm integration
MoritzMaibaum Jul 25, 2026
4377046
Merge pull request #189 from pcpet/codex/add-integrate_pz_twojet_squa…
MoritzMaibaum Jul 25, 2026
8b23948
Accelerate direct PZ Sobolev integration
MoritzMaibaum Jul 26, 2026
63c5e70
Add fast value-only PZ L2 path
MoritzMaibaum Jul 31, 2026
1962d02
Add certified polynomial one-jet PINN benchmarks
MoritzMaibaum Jul 31, 2026
aeb8cf6
Load saved PINN in certification benchmarks
MoritzMaibaum Jul 31, 2026
de46f58
Keep PZ norm integration symbolic and add PINN diagnostics
MoritzMaibaum Aug 1, 2026
20182cd
Add per-neuron activation error diagnostics
MoritzMaibaum Aug 1, 2026
49b832b
Update affine_tanh_enclosures.tex
MoritzMaibaum Aug 1, 2026
8baff25
Update certified_polynomial_zonotope_integration.tex
MoritzMaibaum Aug 1, 2026
3efb89a
Update direct_integrated_twojet_squares.tex
MoritzMaibaum Aug 1, 2026
22f505a
Add polynomial_zonotope_notation_and_terminology.tex
MoritzMaibaum Aug 1, 2026
31116f6
Add polynomial_zonotope_twojet_recurrence.tex
MoritzMaibaum Aug 1, 2026
9d13d8b
docs: link PZ notation and recurrence references
MoritzMaibaum Aug 1, 2026
814e8df
Benchmark certified polynomial support reductions
MoritzMaibaum Aug 2, 2026
fb576a5
Implement medium PINN diagnostics benchmark
MoritzMaibaum Aug 3, 2026
136323f
Add optimized uncompressed shallow PINN certification
MoritzMaibaum Aug 4, 2026
f8a22ad
Add refined deep hybrid norm certification
MoritzMaibaum Aug 10, 2026
b7f8c88
Add graph Hilbert norm certification
MoritzMaibaum Aug 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Codex repository instructions

## Repository state

`intervalNets` contains two certified enclosure pipelines:

- interval and derivative enclosures with adaptive norm integration;
- polynomial-zonotope (PZ) propagation of neural-network values, Jacobians, and Hessians.

The PZ core, `PZTwoJet`, affine and activation propagation, `model.eval_pz_twojet(...)`, PZ integration, and PZ norm routines already exist. A separate `model.eval_pz_value(...)` path propagates only function values and is the default for PZ \(L^2\) computation; do not reintroduce Jacobian or Hessian construction into that path. The scalable `model.eval_pz_onejet(...)` path is the default for PZ \(W^{1,2}\): it propagates a dependent Jacobian polynomial core plus a certified remainder for explicitly reduced terms, without constructing Hessians. Do not route order-one norms through `eval_pz_twojet(...)`. Do not treat the original two-jet blueprint as an unimplemented feature checklist.

## Read the relevant specification first

Inspect the existing implementation and tests before editing it. Use the document matching the task:

- `docs/polynomial_zonotope_notation_and_terminology.tex`: canonical notation and vocabulary for domain noise, approximation noise, sparse polynomial supports, network layers, and two-jets; consult this before introducing new mathematical notation or terminology;
- `docs/polynomial_zonotope_twojet_recurrence.tex`: ground-truth initialization and affine/activation recurrences for direct propagation of value, Jacobian, and Hessian enclosures through an input polynomial zonotope;
- `docs/blueprints/pz_twojet_blueprint.tex`: mathematical design and historical implementation blueprint for PZ two-jets;
- `docs/affine_tanh_enclosures.tex`: certified affine enclosures for `tanh`, `tanh'`, and `tanh''`;
- `docs/certified_polynomial_zonotope_integration.tex`: geometric PZ integration and approximation-noise semantics;
- `docs/direct_integrated_twojet_squares.tex`: direct certified integration of squared PZ two-jets without constructing the squared integrand.
- `docs/dependency_preserving_graph_hilbert_integration.tex`: immutable graph moments, certified Hilbert compression, reverse-triangle bounds, and Neumann dual witnesses for scalable positive lower certificates.
- `docs/diagnostics_and_metrics_glossary.tex`: ground-truth metric definitions, aggregation rules, canonical CSV/JSON schemas, and mandatory mini- and medium-benchmark outputs; consult this before adding or changing benchmark diagnostics or output columns.

The current source code and tests define the implemented public behavior. When a design document and the implementation differ, identify the discrepancy explicitly instead of silently changing semantics.

## Important implementation invariants

- Preserve rigorous enclosure guarantees and outward-rounding behavior.
- Preserve shared polynomial dependencies; do not silently replace them by intervals unless the relevant specification explicitly permits re-enclosure.
- Keep domain noise symbols \(\alpha\) distinct from approximation noise symbols \(\eta\), and use \(\varepsilon=(\alpha,\eta)\) for their combined vector.
- Use **approximation noise symbol** as the canonical term. Reserve **residual function** for the actual difference between a function and its approximation, and **approximation-error radius** for its certified coefficient \(\rho\).
- Under pointwise integration semantics, an approximation noise symbol may represent the residual function separately at each physical point; it is not one global symbolic value over the integration domain. Follow the semantics in `pz_integration.py`.
- Canonicalize equal exponent vectors and combine their coefficients before applying absolute values or interval collapse. This is required to preserve cancellations and reproduce the existing enclosure.
- Maintain tensor-valued coefficient support and the established shapes of `Y`, `J`, and `H`.
- Exploit Hessian symmetry only where the stored Hessian convention guarantees it. For a full symmetric Hessian, off-diagonal Frobenius contributions have weight two.
- Avoid changing public APIs or numerical semantics unless the task explicitly requires it.

## PZ norm and direct-integration work

For changes to certified PZ `L^2`, `W^{1,2}`, or `W^{2,2}` integration, read `docs/direct_integrated_twojet_squares.tex` in full and inspect:

- `src/intervalnets/polynomial_zonotope.py`;
- `src/intervalnets/pz_integration.py`;
- `src/intervalnets/pz_norms.py`;
- `tests/test_polynomial_zonotope.py`;
- `tests/test_pz_integration.py`;
- `tests/test_pz_norms.py`.

The direct-integration optimization must reproduce the current certified enclosure while avoiding materialization of the squared PZ integrand. Exploit unordered monomial-pair symmetry and Hessian symmetry, but still merge all contributions with the same retained pointwise-noise exponent before taking absolute values. Keep the existing explicit-square path available at least internally for regression comparisons until equivalence is well tested.

Benchmark enclosure construction, norm-integrand construction, and integration separately. Final monomial count alone is not an adequate performance measure because sparse polynomial multiplication processes intermediate term pairs before canonicalization.

All benchmark notebooks and reusable diagnostics must follow
`docs/diagnostics_and_metrics_glossary.tex`. Preserve its schema version,
exact canonical column orders, missing-value/status conventions, deterministic
row ordering, and distinction between absolute widths, local relative radii,
familywise global normalized radii, and relative norm widths. A medium
benchmark includes every mini-benchmark output plus the per-neuron activation
approximation table and `layer_normalized_radius_Y.csv`; do not silently omit
unimplemented required quantities.

For schema version 1.2 and later, preserve both local relative radius and local
relative width in the prescribed columns, and populate the physical domain
volume plus the domain-volume-normalized lower endpoint, upper endpoint, and
width for every implemented squared and unsquared norm row. Domain-volume
normalization is a scale metric; relative norm width is the tightness metric.

For value-only \(L^2\) performance work, use
`notebooks/pz_l2_value_benchmarks.ipynb`. The affine tanh enclosure keeps the
value support degree one, with one domain symbol per input coordinate and one approximation noise symbol per hidden neuron. Preserve this
independence when batching activation enclosures.

For one-jet \(W^{1,2}\) performance work, use
`notebooks/pz_w12_polynomial_reduction_benchmarks.ipynb`. The scalable one-jet
retains a dependent Jacobian polynomial core and propagates a separate,
certified pointwise box only for terms explicitly removed by a reduction
policy. Do not replace the whole Jacobian by intervals. Available experimental
policies are top-k generator retention, degree-capped top-k retention, and a
sound coefficient-space PCA reduction with an explicitly bounded projection
remainder. Treat runtime, retained support, polynomial degree, reduction
remainder, and final enclosure width as joint diagnostics.

## Development workflow

1. Inspect the relevant source, tests, and specification.
2. Make the smallest coherent change.
3. Add focused regression tests, including cancellation and noise-kind edge cases.
4. Run targeted tests first, then the full suite:

```bash
pytest -q tests/test_polynomial_zonotope.py tests/test_pz_integration.py tests/test_pz_norms.py
pytest -q
```

5. For performance work, report both correctness comparisons and timings on the same input.
6. Keep experimental notebook code thin; reusable logic belongs in `src/intervalnets/` and assertions belong in `tests/`.
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
1. an overloaded `model.eval(interval)` pathway (enabled via `enable_interval_eval(...)`) for interval
propagation through neural networks with outward-rounded arithmetic, including roundoff-aware bounds;
2. rigorous enclosure of Lebesgue/Lp norms over interval domains via `model.lpnorm(domain, p, iterations=...)`;
3. interval Jacobian enclosure via `model.eval_jacobian(domain)` and Sobolev-style norms via
`model.sobolev_norm(domain, p, iterations=...)`.
3. interval derivative enclosure via `model.eval_jacobian(domain)` / `model.eval_hessian(domain)` and Sobolev-style norms via
`model.sobolev_norm(domain, p, order=..., iterations=...)`.
The current implementation follows the same interval-enclosure + adaptive-refinement strategy outlined in
the preprint *Certified and accurate computation of function space norms of deep neural networks*
(arXiv:2603.06431).
Expand All @@ -31,14 +31,14 @@ always the tightest possible interval enclosure one could compute with more expe
- interval propagation currently supports `nn.Sequential`, `nn.Flatten`, `nn.Linear`, `nn.ReLU`, `nn.Sigmoid`, `nn.Tanh`, `nn.Softplus`, `nn.LeakyReLU`, `nn.Softmax`, `nn.Identity`, plus `IntervalAdd`/`IntervalCat` branch combinators,
- ReLU propagation preserves mathematically exact zero images (`[0, 0]`) for non-positive pre-activation intervals; only non-exact branches are outward-padded,
- linear and Jacobian propagation are implemented with midpoint-radius matrix formulas for speed; this favors runtime performance over globally minimal box tightness,
- `model.eval(interval)`, `model.eval_jacobian(...)`, `model.lpnorm(...)`, and `model.sobolev_norm(...)` are attached through a single opt-in monkey patch (`enable_interval_eval()`), and the selected `enclosure_mode` is reused for both `model.eval(interval)` and sequential pre-activation propagation inside `model.eval_jacobian(...)`,
- `model.eval(interval)`, `model.eval_jacobian(...)`, `model.eval_hessian(...)`, `model.lpnorm(...)`, and `model.sobolev_norm(...)` are attached through a single opt-in monkey patch (`enable_interval_eval()`), and the selected `enclosure_mode` is reused for both `model.eval(interval)` and sequential pre-activation propagation inside derivative enclosures,
- `enable_interval_eval(enclosure_mode="slope")` accepts `"box"` or `"slope"` (default: slope-aware affine relaxation for `nn.Sequential` chains of `nn.Linear` + `nn.ReLU`, with conservative fallback to `"box"` for unsupported layers),
- slope mode is particularly useful for dependency-heavy patterns such as `Linear(rotation) -> ReLU -> Linear(rotation^{-1})`: plain box propagation can overestimate strongly, while slope-aware relaxations keep substantially tighter certified bounds,
- for additional tightness, `interval_forward_refine(model, interval, enclosure_mode="slope", splits_per_dim=...)` subdivides the input box and hulls sub-box outputs (higher cost, tighter bounds),
- `model.lpnorm(domain, p, iterations, theta=0.5)` and
`model.sobolev_norm(domain, p, iterations, theta=0.5)` use
`model.sobolev_norm(domain, p, order, iterations, theta=0.5)` use
Dörfler-type bulk marking (with uncertainty indicators) and adaptive
bisection to return outward-rounded certified norm enclosures; rigorously constant boxes with zero Jacobian are skipped during Sobolev refinement.
bisection to return outward-rounded certified norm enclosures; rigorously constant boxes with zero Jacobian (and zero Hessian when `order=2`) are skipped during Sobolev refinement.
- both norm routines accept optional `forward_refine_splits` / `forward_refine_max_cells` arguments to tighten per-box forward enclosures during integration.

## Quick start
Expand Down Expand Up @@ -72,7 +72,8 @@ enable_interval_eval(enclosure_mode="slope")

domain = IntervalTensor.from_bounds([0.0, 0.0], [1.0, 1.0])
lp_bounds = model.lpnorm(domain, p=2.0, iterations=8)
w1p_bounds = model.sobolev_norm(domain, p=2.0, iterations=8)
w1p_bounds = model.sobolev_norm(domain, p=2.0, order=1, iterations=8)
w2p_bounds = model.sobolev_norm(domain, p=2.0, order=2, iterations=8)
```

### Option 2: run directly from the repo without installing
Expand All @@ -91,6 +92,7 @@ sys.path.insert(0, str(repo_root / "src"))

After that, `from intervalnets import ...` will work from the checkout as well.


## Installation notes

- the core `Interval` type uses only the Python standard library,
Expand All @@ -101,7 +103,8 @@ For worked examples, see:

- `notebooks/test_suite.ipynb` for quick feature checks and sanity tests,
- `notebooks/reproduce_lp_w1p_experiments.ipynb` for reproducible certified
`L^p` and `W^{1,p}` experiments aligned with arXiv:2603.06431 (intentionally excluding `W^{2,p}`).
`L^p` and `W^{1,p}` experiments aligned with arXiv:2603.06431.
- `notebooks/pinn_aposteriori_square_poisson.ipynb` for a Poisson PINN example with certified residual and boundary terms using Hessian bounds and `W^{2,2}`-compatible tooling.


## Numerical experiment figures
Expand All @@ -120,6 +123,14 @@ README.
![2D curves](notebooks/notebooks/artifacts/figure_cd_2d_curves.png)
![Local gap heatmaps](notebooks/notebooks/artifacts/figure_d_local_gap_heatmaps.png)

### PINN a-posteriori Poisson example

![PINN Poisson results](notebooks/notebooks/artifacts/figure_pinn_results.png)

Certified interval bounds can be propagated through the PINN residual and
boundary-condition terms, so the same pipeline can rigorously account for PDE
interior constraints **and** boundary conditions.

## Reference

- Johannes Gründler, Moritz Maibaum, Philipp Petersen,
Expand Down
Loading
Loading