SharpNet: Enhancing MLPs to Represent Functions with Controlled Non-differentiability

Read full text
Authors: Hanting Niu, Deng Junkai, Fei Hou, W. J. Wang, Ying He
Cited by: 1

Abstract

Multi-layer perceptrons (MLPs) are a standard tool for learning and function approximation, but they inherently produce globally smooth outputs. Consequently, they struggle to represent functions that are continuous yet intentionally non-differentiable (i.e., functions with prescribed $C^0$ sharp features) without ad hoc post-processing. We present SharpNet, a modified MLP architecture that encodes user-specified sharp features by augmenting the network with an auxiliary feature function defined as the solution to Poisson's equation with jump Neumann boundary conditions. This feature function is evaluated via an efficient local integral and is fully differentiable with respect to the feature locations, allowing us to jointly optimize both the feature locations and the MLP parameters to recover the target function or geometry. This construction provides precise control over where non-differentiability occurs, enforcing the desired $C^0$ behavior at feature locations while preserving smoothness elsewhere. We validate SharpNet on 2D problems and 3D CAD reconstruction, and compare it with several state-of-the-art baselines. In both settings, SharpNet accurately recovers sharp edges and corners while remaining smooth away from them, whereas existing methods tend to blur gradient discontinuities. Qualitative and quantitative results demonstrate the effectiveness of our approach. Our project page, code and models are publicly available at https://sharpnettech.github.io.

Fields of Study & Subjects

3D Shape Modeling and Analysis Model Reduction and Neural Networks Advanced Neural Network Applications

Publication details

Journal / source
arXiv (Cornell University)
Publication date
27 January 2026
Document type
Preprint