A scientific model may be easy to write down and difficult to train. For an Euler–Bernoulli beam, the residual contains a fourth spatial derivative. That derivative must be correct, compatible with the network architecture, and differentiable with respect to the parameters being optimized.
Begin with the physical contract
Our worked example solves a nondimensional clamped beam on the unit interval with constant flexural rigidity. Deflection and slope vanish at both endpoints. A manufactured nonuniform load gives us a known solution, so we can inspect error independently of the training loss.
The trial model multiplies a tanh network by x²(1−x)². The polynomial's double zeros enforce the four boundary conditions for every network parameter value. That exact boundary behaviour comes from the model construction; it is separate from the derivative library.
Choose the derivative representation
omnibias carries directional Taylor coefficients through the supported MLP. Converting those coefficients to ordinary derivatives and applying the product rule gives the beam residual. Ordinary PyTorch parameter autodiff then trains the weights and biases through that result.
Before training, the notebook checks its fourth derivative against nested autograd at independent probe points. It asserts finite gradients into every model parameter and evaluates the trained deflection on a separate grid. Solution error, residual error, and boundary checks remain separate measurements.
What this opens up
This is a practical starting point for investigating higher-order physics in a trainable model. Extending it to variable stiffness, other boundary conditions, multiple spatial dimensions, or measured loading requires an explicit operator contract and new validation. A successful manufactured problem is evidence for that workflow, not proof of convergence for every beam.
Where Derivon contributes
Derivon's scientific ML engineering connects problem formulation, constrained parameterizations, derivative representations, and numerical evaluation. We can help assess whether a neural formulation fits a proposed mechanics problem and establish a checkable path from a prototype to an application-specific implementation.
Reproduce the result
The recorded notebook reports relative solution error of < 0.001%. Inspect the conditions and raw data before comparing it with another method.
Read and run the complete notebook · Discuss a scientific ML project