TensOpSciML: A Python Framework for Tensor-Based Differential Operators with Applications in Scientific Machine Learning
Please login to view abstract download link
Scientific Machine Learning aims to combine physical knowledge with data-driven models, in order to produce results that are robust, interpretable, and generalizable. These physical principles are typically expressed using precise mathematical formulations: differential operators, tensor fields, and higher-order multilinear structures. A key challenge is ensuring that such operations are compatible with Deep Learning frameworks, allowing for automatic differentiation and efficient execution on modern GPU hardware. In this work, we present TensOpSciML, a unified Python framework designed for tensor calculus and differential operations in data-driven applications. TensOpSciML provides a comprehensive set of convolution-based derivative operators, analogous to finite-difference schemes, enabling accurate, efficient, and fully differentiable approximations of spatial tensor fields; and it augments computational tensors with explicit mathematical metadata, transforming them from numerical arrays into structured mathematical objects incorporating the manifold geometry. This enriched representation allows TensOpSciML to support a wide range of algebraic and differential operations, such as tensor contractions, inner and outer products as well as gradients, divergence, and curl operators in computational mechanics. While currently implemented in PyTorch, the framework is backend-agnostic, making it adaptable to other Python scientific computing libraries such as TensorFlow or JAX. The overarching goal of TensOpSciML is to bridge rigorous mathematical formalism with modern Machine Learning, ensuring that computations fully respect the tensorial structure of the data. This guarantees correctness, interpretability, and mathematical rigor in Scientific Machine Learning applications.
