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

ACM Transactions on Graphics (SIGGRAPH 2026)
Hanting Niu1,2, Junkai Deng3, Fei Hou1,2, Wencheng Wang1,2, Ying He3
1Institute of Software, Chinese Academy of Sciences, 2University of Chinese Academy of Sciences, 3College of Computing and Data Science, Nanyang Technological University

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 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 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.

BibTeX

@article{niu2026sharpnet,
    author = {Niu, Hanting and Deng, Junkai and Hou, Fei and Wang, Wencheng and He, Ying},
    title = {{SharpNet}: Enhancing {MLP}s to Represent Functions with Controlled Non-differentiability},
    year = {2026},
    issue_date = {July 2026},
    publisher = {Association for Computing Machinery},
    address = {New York, NY, USA},
    volume = {45},
    number = {4},
    issn = {0730-0301},
    url = {https://doi.org/10.1145/3811330},
    doi = {10.1145/3811330},
    journal = {ACM Transactions on Graphics},
    month = jul,
    articleno = {113},
    numpages = {19},
    keywords = {MLP, Sharp features, Poisson's equation, Jump Neumann boundary condition, Green's function, CAD},
}