{"id":"8f0086f4-41a2-4d43-825d-2b44761f52dd","arxiv_id":"2507.17126","paper_version":1,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":4.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":0,"one_line_summary":"A PyTorch implementation of the Okada model that makes displacements, strains, and their derivatives automatically differentiable.","lead":"OkadaTorch translates the standard Okada fault-deformation formulas into PyTorch so that displacements, strains, and their gradients and Hessians can be computed automatically through differentiation. It gives seismologists a ready-made tool for gradient-based fault inversion and integration with machine learning models.","discovery_kind":"new_application","skeptic_critique":{"model":"deepseek-v4-flash","headline":"The paper never quantitatively validates OkadaTorch against the original FORTRAN or finite differences, so the central differentiability/correctness claim is unsupported at branch and edge cases.","rationale":"I read OkadaTorch as a software-contribution paper whose central claim is that a faithful, differentiable translation of the Okada model is available and that its derivatives are trustworthy. The code structure and wrapper design are plausible, and the authors are transparent about the inversion demonstration being illustrative rather than a robust method. However, the paper's own text contains no verification section, no numerical comparisons, and no benchmark references; Figures 1-3 are qualitative. The Section 3.4 inversion is an internal consistency check, not an external validation, because the synthetic data come from the same forward model. This is precisely the load-bearing gap: the central claim would be true only if the direct translation is exact in every branch, but the evidence provided does not establish that. I do not see an internal contradiction or a clear factual error in the manuscript; the issue is missing quantitative support. The reader's weakest_assumption identifies the same gap, and the appropriate verdict remains CONDITIONAL pending the cross-validation and derivative check described above. I am not proposing rejection because the code is publicly available and the comparison is straightforward to perform.","tokens_in":9365,"tokens_out":4492,"duration_ms":49245,"concrete_test":"Run a cross-validation suite that compiles the original NIED FORTRAN DC3D, DC3D0, SPOINT, and SRECTF and feeds identical scalar inputs to OkadaTorch across all branch regimes: z=0 and z<0, dip=90, strike and rake near 0, 90, 180, 270, and 360 degrees, stations near fault corners and edges, and the model-10 parameter set of [32]. Compare all 3 displacement and 9 strain outputs with relative tolerance 1e-8. Then verify the wrapper's gradient and Hessian outputs against central finite differences at h=1e-4 and h=1e-5 for several parameters (depth, strike, dip, slip, x, y) and report the maximum relative error per case. If any case exceeds 1e-6, the central claim is not established.","verdict_should_be":"UNCHANGED","load_bearing_attack":"The central claim is that OkadaTorch is a differentiable PyTorch implementation of the Okada model whose gradients and Hessians are correct and easy to compute. That claim depends on the direct translation in Section 2 preserving the numerical behavior of the original FORTRAN subroutines in every branch, coordinate transform, and singular limit. The manuscript provides no quantitative comparison against the original FORTRAN [11], any independent Okada implementation [12-19], finite differences, or published benchmark values. Figures 1 and 2 are qualitative physical-plausibility checks, and Figure 3 only visualizes derivative fields without reference values. Section 3.4 is self-referential: the synthetic observations are generated with the same OkadaTorch forward model, so the successful inversion in Table 1 can detect optimizer bugs but cannot detect a systematic translation error shared by the forward and inverse calculations. This matters because AD derivatives are exact only for the implemented program, not for the intended physical model; if a branch is mistranslated, the coordinate transform has a sign error, or degree-to-radian handling is inconsistent, then displacement, strain, and every AD derivative and Hessian derived from them are wrong. The absence of edge-case testing is especially pertinent because the original Okada subroutines use scalar conditional branches for dip=90, strike boundaries, z=0, and fault-edge singularities, and the vectorized PyTorch rewrite may handle those branches differently.","agreement_with_reader":"agree"},"referee_report":{"model":"deepseek-v4-flash","summary":"The paper presents OkadaTorch, a PyTorch implementation of Okada's analytical solutions for displacements and strains caused by point and rectangular dislocation sources in an elastic half-space. The core is a direct translation of the original FORTRAN subroutines SPOINT, SRECTF, DC3D0, and DC3D into vectorized PyTorch tensor operations, together with a wrapper class OkadaWrapper that exposes compute, gradient, and hessian methods. The authors demonstrate forward modeling, derivative fields, diagonal Hessians, and a synthetic fault-parameter inversion using Adam. The central claim is that the entire code is differentiable, so gradients and Hessians with respect to station coordinates or fault parameters can be obtained by automatic differentiation without hand-derived formulas.","tokens_in":9585,"tokens_out":3705,"duration_ms":43559,"significance":"If the implementation is numerically faithful to the original Okada solution, this is a genuinely useful software contribution: it removes the need to derive and code gradients by hand, enables GPU-accelerated vectorized forward modeling, and plugs directly into PyTorch-based optimization, Bayesian inference, and scientific machine learning workflows. The public repository, the explicit permission from NIED to publish the translated code, and the clean wrapper interface are concrete strengths. However, the significance is contingent on correctness of the translation, and the manuscript currently offers no quantitative evidence for that correctness: the central claim is unsupported by numerical validation.","major_comments":[{"comment":"The central claim that OkadaTorch is a direct translation of the original Okada subroutines is not quantitatively validated. Figures 1 and 2 are described only as 'physically consistent deformation patterns' from visual inspection, and no comparison is made against the original FORTRAN code [11], an independent implementation [13-19], or published benchmark values. Because the paper's core value proposition is exactness of the translation, a quantitative comparison table is load-bearing: for a set of representative configurations, report maximum absolute and relative errors for all displacement components and all nine strain components, and the IRET status, comparing OkadaTorch against the original FORTRAN or a trusted reference over both surface (z=0) and subsurface (z<0) points. Without this, a translation error in any branch would invalidate the computed displacements, strains, and all derived gradients.","section":null},{"comment":"Gradients and Hessians are never checked against finite differences or analytic derivatives. The code uses PyTorch's jacfwd, so the returned derivatives are exact derivatives of the implemented program, but they are exact derivatives of the physical model only if the program itself is correct. The manuscript should include a finite-difference convergence test, for example comparing gradient and hessian outputs to central differences with decreasing epsilon for at least one rectangular-fault configuration, and report the achieved agreement for derivatives with respect to both coordinates and fault parameters. This is particularly important because the is_degree flag changes derivative scaling, and because the second derivative with respect to slip being zero (Figure 4) is a trivial linearity property that does not test the implementation.","section":null},{"comment":"The inversion example is self-referential as a validation: the synthetic observations are produced by the same OkadaTorch forward model, so the successful recovery of parameters can detect optimizer or gradient bugs, but it cannot detect a systematic error shared by the forward and inverse calculations. The manuscript should explicitly state this limitation. In addition, the final parameters in Table 1 are not particularly close to the true values: depth is recovered as 0.604 km versus 0.100 km and slip as 6.14 m versus 5.62 m, and no convergence criterion or uncertainty measure is given, so the statement that 'all estimated fault parameters are reasonably close to their true values' is overstated. This example is fine as a software demonstration, but it should not be presented as evidence of physical correctness.","section":null},{"comment":"The manuscript does not address how vectorized tensor operations handle the scalar conditional branches and singular limits present in the original FORTRAN subroutines. Specific edge cases that need explicit tests include dip=90 degrees, strike at 0 or 180 degrees, stations on the free surface z=0, stations near fault edges and corners, negative z, and the point-source limit with potency-based slip. The difference between scalar control flow and PyTorch tensor operations can change behavior in exactly these branches, so a dedicated set of edge-case validation tests, with numerical comparisons to the original implementation or known analytical limits, is required to support the claim that the translation preserves exact numerical behavior in every branch.","section":null}],"minor_comments":[{"comment":"The affiliation contains a typo: 'Earthquake Reseach Institute' should be 'Earthquake Research Institute'.","section":null},{"comment":"The units of strain are given as 'm/km' in Figure 2, while displacements are in m and station coordinates are not assigned explicit units in the text. Please state the assumed unit convention for coordinates and clarify how the strain components scale if coordinates are provided in kilometers or meters.","section":null},{"comment":"When is_degree=True (the default), gradients with respect to strike, dip, and rake are per degree rather than per radian, and Hessians inherit the corresponding mixed scaling. This should be documented explicitly, because it affects numerical values used in optimization and uncertainty quantification.","section":null},{"comment":"The manuscript says that IRET has the same shape as the input coordinate tensors, but the original subroutines return a scalar status flag. Please clarify how the per-element IRET is defined for vectorized calls and which values indicate failure in the tensor case.","section":null},{"comment":"For point sources, the parameter 'slip' is said to represent potency, but potency is never defined and its units are not given. Please define it and state the expected units to avoid confusion with the rectangular-fault slip.","section":null},{"comment":"The caption 'Units are km from x_fault to width' is confusing; it should be rephrased to list the units for each column separately. Also, the source of the true parameters, 'model 10 of Table S1 in [32]', is not self-contained in the manuscript; please provide the values in a way the reader can verify.","section":null}],"recommendation":"major_revision","confidential_remarks":"This is a software paper whose contribution is a differentiable Okada implementation. The manuscript is clearly written and the code is public, but the absence of quantitative validation against the original FORTRAN, independent implementations, or finite differences is a load-bearing gap. I recommend major revision: the authors should add numerical validation tables, derivative convergence checks, and edge-case tests. If those tests confirm the translation, the paper would likely be acceptable for publication."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"Short version: this is a tidy, potentially useful software contribution—the first PyTorch Okada with automatic differentiation among the cited implementations—and the code is public. The main gap is that correctness is never quantitatively demonstrated, so the claim of exact gradients and Hessians is only as trustworthy as the translation, which is untested at branches and edge cases.\n\nWhat's genuinely new: translating the four FORTRAN subroutines into vectorized PyTorch, adding an OkadaWrapper with compute/gradient/hessian methods, and letting users drop AD into Adam or HMC workflows. The examples are clear, the repo has scripts and notebooks, and the authors got NIED's permission to publish the translation. The synthetic inversion in Section 3.4 converges, and the authors are honest that it is illustrative, not a robust inversion framework; they also note trade-offs and sensitivity to initial values.\n\nSoft spots: the paper never checks displacements or strains against the original FORTRAN, an independent implementation, finite differences, or published benchmark values. Figures 1–4 are visual plausibility checks. The Section 3.4 inversion generates synthetic data with the same forward model, so it can catch optimizer bugs but cannot detect a systematic translation error shared by forward and inverse calculations. The tricky branches—dip=90, z=0, fault-edge singularities, degree/radian conversion—are exactly where a vectorized rewrite can drift from the scalar FORTRAN, and none of those are validated. This is a real gap but a fixable one; nothing in the paper suggests the code is wrong, only that we can't tell yet.\n\nProportion: for a paper whose selling point is exact derivatives, this missing validation is the load-bearing issue. For readers who just want a straightforward differentiable Okada, this is nonetheless the most complete public option I know of, and the wrapper design is sensible.\n\nRecommendation: send it to review. A referee can ask for a short validation section: point comparisons to DC3D0/DC3D outputs at surface and subsurface, finite-difference checks on gradients and Hessians, and a couple of edge cases. That would make the paper solid. I'd bring it to a reading group for anyone thinking about gradient-based fault inversion.","headline":"A useful, well-engineered PyTorch AD port of Okada's model with public code, but the central correctness claim rests on qualitative checks and a self-referential inversion; add quantitative validation before relying on it.","tokens_in":10107,"tokens_out":2536,"would_cite":false,"duration_ms":29797,"reading_group":"maybe","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":[],"pacs":[],"model":"deepseek-v4-flash","headline":"OkadaTorch makes the Okada dislocation model differentiable, with exact gradients and Hessians of displacements and strains available by automatic differentiation.","keywords":["Okada model","automatic differentiation","fault parameter inversion","coseismic deformation","elastic half-space dislocation","strain computation","differentiable programming"],"falsifier":"Run the translated routines on parameter sets that exercise each branch—point source and rectangular fault, surface and subsurface stations, dip angles of 0, 45, and 90 degrees, and stations near fault edges—and compare the displacements, strains, first derivatives, and second derivatives against the original program's outputs and against high-precision finite differences; any mismatch beyond floating-point round-off in any branch would falsify the claim.","tokens_in":9141,"feed_emoji":"🌏","tokens_out":9143,"duration_ms":85291,"temperature":0.7,"pith_summary":"OkadaTorch gives the standard Okada dislocation solution for earthquake displacements and strains a differentiable form: every subroutine is written as tensor operations in an automatic-differentiation library, so a single forward call returns not only displacements and strains but also exact gradients and Hessians with respect to any station coordinate or fault parameter. The authors' claim is that this removes the need to derive, symbolically or by hand, the sensitivity formulas that fault-parameter inversion has traditionally required. If the claim holds, gradient-based inversion, Bayesian sampling, and physics-informed machine-learning models can all use the same forward program and get their derivatives for free. The paper demonstrates the idea with a synthetic inversion in which nine fault parameters are recovered from noisy surface displacements by minimizing a misfit loss with a standard gradient-based optimizer.","feed_headline":"Okada fault-model gradients come straight from the forward pass","feed_subtitle":"No hand-derived formulas: exact first and second derivatives of displacements and strains follow automatically.","key_machinery":"The machinery is automatic differentiation applied to a line-by-line translation of Okada's four subroutines. SPOINT and SRECTF handle surface deformation for point and rectangular sources, DC3D0 and DC3D handle internal deformation; the translation turns the original scalar arithmetic into tensor operations while keeping its structure, including the return flag that reports whether a computation succeeded. On top of that, the OkadaWrapper class provides compute, gradient, and hessian methods, using forward-mode Jacobian evaluation to differentiate outputs with respect to any single argument or pair of arguments from the same category. Two added flags, compute_strain and is_degree, control whether the nine strain components are evaluated and whether angular parameters are read in degrees.","core_discovery":"The central claim is that the Okada model—point and rectangular dislocation sources in a 3D elastic half-space, at the surface and below—survives direct translation into a differentiable tensor program without losing its analytical character. The package translates the four core routines, SPOINT, SRECTF, DC3D0, and DC3D, into vectorized tensor form, and wraps them in an OkadaWrapper class whose three methods compute forward displacements and strains, first derivatives with respect to a chosen coordinate or fault parameter, and second derivatives with respect to two inputs. Because the forward program records every elementary operation, the chain rule supplies exact derivatives automatically, which the authors argue makes hand-coded gradients obsolete. The accompanying synthetic experiment shows the resulting derivatives are ready for off-the-shelf gradient-based parameter estimation.","pith_inferences":["If the translation is exact in every branch, then existing hand-derived or symbolically generated gradient code for the Okada model becomes redundant, and future modifications to the forward model would update all derivatives automatically.","The paper does not quantitatively validate its outputs or derivatives against the original program, finite differences, or published benchmarks; adding such tests would convert the correctness claim from a structural one into a verified one.","Automatic differentiation through the original branch structure gives derivatives only where the forward function is smooth; near fault-edge singularities and at the free surface the gradients may be undefined or unstable, so users should treat derivative values in those regions with caution.","The same translation recipe could be applied to other analytical geophysical Green's-function solutions, such as layered half-space or viscoelastic dislocation models, to give each one an automatically differentiable version."],"forward_implications":["Fault-parameter inversion becomes a standard gradient loop: define a misfit loss on the computed displacements, call the automatic backward pass, and update parameters with an off-the-shelf optimizer.","Exact first and second derivatives with respect to coordinates or fault parameters are available on demand, enabling sensitivity analysis and curvature-based uncertainty estimation.","All observation stations are processed in one vectorized call rather than a loop, which the paper argues improves efficiency and allows GPU acceleration.","Because the whole model is differentiable, it can be composed with other differentiable components, such as tsunami solvers or neural-network models, to build end-to-end differentiable chains from fault mechanics to surface deformation.","The same forward code supports gradient-informed Bayesian inference, since exact model derivatives replace finite-difference approximations inside sampling algorithms."],"supporting_citations":[{"why":"Defines the analytical surface-deformation solution and the SPOINT/SRECTF routines that the translation implements.","marker":"[1]"},{"why":"Defines the internal-deformation solution and the DC3D0/DC3D routines used for subsurface stations.","marker":"[2]"},{"why":"The original program whose subroutines are directly translated; it is the structural reference for correctness.","marker":"[11]"},{"why":"Supply the automatic-differentiation and Jacobian machinery that the gradient and hessian methods rely on.","marker":"[23, 24]"},{"why":"Represent the traditional hand-derived analytical gradients that the paper's approach is meant to replace.","marker":"[20]"},{"why":"Represent symbolic differentiation with a computer algebra system, the other alternative that AD supersedes.","marker":"[22]"},{"why":"Provides the model-10 fault parameters used in the demonstration figures and the synthetic inversion experiment.","marker":"[32]"},{"why":"Target integrations for physics-informed deep learning of crustal deformation, which the differentiable forward model is designed to support.","marker":"[36, 37]"}],"fun_headline_variants":["Okada model goes differentiable: exact fault gradients, no hand-coding","PyTorch Okada: exact derivatives of fault displacements, automatically","Fault inversions get automatic gradients from differentiable Okada","OkadaTorch: exact first and second derivatives straight from code","Differentiable Okada: hand-coded gradients are obsolete"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"The load-bearing premise is that the step-by-step rewrite of the original subroutines preserves their exact numerical behavior in every branch—surface and subsurface, point and rectangular source—so that the displacements, strains, and all automatic derivatives are correct wherever the original code is correct.","fun_headline_variants_meta":{"raw":{"variants":["Okada model goes differentiable: exact fault gradients, no hand-coding","PyTorch Okada: exact derivatives of fault displacements, automatically","Fault inversions get automatic gradients from differentiable Okada","OkadaTorch: exact first and second derivatives straight from code","Differentiable Okada: hand-coded gradients are obsolete"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000164,"raw_usage":{"total_tokens":1199,"prompt_tokens":848,"completion_tokens":351,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":464,"completion_tokens_details":{"reasoning_tokens":264}},"tokens_in":464,"tokens_out":351,"duration_ms":3998,"temperature":1.0,"reasoning_tokens":264,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-06T14:55:23.724225+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Run the translated routines on parameter sets that exercise each branch—point source and rectangular fault, surface and subsurface stations, dip angles of 0, 45, and 90 degrees, and stations near fault edges—and compare the displacements, strains, first derivatives, and second derivatives against the original program's outputs and against high-precision finite differences; any mismatch beyond floating-point round-off in any branch would falsify the claim.","supporting_citations":[{"cited_title":"Okada, Surface deformation due to shear and tensile faults in a half-space, Bulletin of the seismological society of America 75 (4) (1985) 1135–1154","cited_arxiv_id":null,"evidence_quote":"Defines the analytical surface-deformation solution and the SPOINT/SRECTF routines that the translation implements."},{"cited_title":"Okada, Internal deformation due to shear and tensile faults in a half-space, Bulletin of the seismological society of America 82 (2) (1992) 1018–1040","cited_arxiv_id":null,"evidence_quote":"Defines the internal-deformation solution and the DC3D0/DC3D routines used for subsurface stations."},{"cited_title":"Okada, National Research Institute for Earth Science and Disaster Resilience, Program to calculate deforma- tion due to a fault model DC3D0 / DC3D, (last visit on 2025/07/01)","cited_arxiv_id":null,"evidence_quote":"The original program whose subroutines are directly translated; it is the structural reference for correctness."},{"cited_title":"Matsu’ura, Inversion of geodetic data Part I","cited_arxiv_id":null,"evidence_quote":"Represent the traditional hand-derived analytical gradients that the paper's approach is meant to replace."},{"cited_title":"Pires, P","cited_arxiv_id":null,"evidence_quote":"Represent symbolic differentiation with a computer algebra system, the other alternative that AD supersedes."},{"cited_title":null,"cited_arxiv_id":null,"evidence_quote":"Provides the model-10 fault parameters used in the demonstration figures and the synthetic inversion experiment."}],"review_version":1}