SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.01680 · IJCAI · 2024

Physics-Informed Neural Networks: Minimizing Residual Loss with Wide Networks and Effective Activations

Boyu Wang, Charles Ling, Nima Hosseini Dashtbayaz, Ghazal Farhani

arXiv · PDF · Open in the Atlas

Code that ran

7 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2405.01680.json · badge: /api/ran/2405.01680.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
nimahsn/pinns_tf2 canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
FunctionStatusWhere it lives
create_dense_model Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
nimahsn/pinns_tf2/modules/models.py
code served (permissive licence) · get_code("99208346b28d260e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Functional. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf

ARGS = {
    "layers": [16, 32, 8],
    "activation": "relu",
    "initializer": "glorot_uniform",
    "n_inputs": 4,
    "n_outputs": 3,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Functional — a Functional output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Functional output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_train_plot_name Ran
ran; our contract draft was wrong, not the code
nimahsn/pinns_tf2/modules/utils.py
code served (permissive licence) · get_code("d05f6cd21794edca")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
from pathlib import Path
import tempfile

# Create a temporary directory for testing
temp_dir = tempfile.mkdtemp()

ARGS = {
    'id': 'model_v1',
    'directory': temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_mat_data Ran
ran; our contract draft was wrong, not the code
nimahsn/pinns_tf2/modules/utils.py
code served (permissive licence) · get_code("6e9b2fde08308631")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import scipy.io
import tempfile
import os
import numpy as np

# Create a temporary .mat file for testing
temp_dir = tempfile.mkdtemp()
temp_mat_path = os.path.join(temp_dir, "test_data.mat")

# Create sample data and save it as a .mat file
sample_data = {
    'array1': np.array([[1, 2, 3], [4, 5, 6]]),
    'array2': np.array([7, 8, 9, 10]),
    'scalar': np.array(42)
}
scipy.io.savemat(temp_mat_path, sample_data)

ARGS = {
    'path': temp_mat_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
plot_wave_model_slider Ran
ran; our contract draft was wrong, not the code
nimahsn/pinns_tf2/modules/plots.py
code served (permissive licence) · get_code("4f54163d268a0e14")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Slider. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import numpy as np

class SimpleWaveModel(nn.Module):
    """Minimal model that implements predict method for wave equation"""
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(2, 1)
    
    def predict(self, tx, batch_size=1000):
        """
        Args:
            tx: array of shape (N, 2) with [t, x] coordinates
            batch_size: batch size for prediction
        Returns:
            array of shape (N, 1) with predictions
        """
        tx_tensor = torch.from_numpy(tx).float()
        predictions = []
        
        for i in range(0, len(tx_tensor), batch_size):
            batch = tx_tensor[i:i+batch_size]
            with torch.no_grad():
                pred = self.linear(batch)
            predictions.append(pred.numpy())
        
        result = np.concatenate(predictions, axis=0)
        return result

model = SimpleWaveModel()

ARGS = {
    'model': model,
    'x_start': 0.0,
    'length': 10.0,
    'time': 5.0,
    'figsize': (10, 5),
    'show': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Slider — a Slider output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Slider output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
simulate_burgers Ran
ran; our contract draft was wrong, not the code
nimahsn/pinns_tf2/modules/data.py
code served (permissive licence) · get_code("35ff247081adb369")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf
import numpy as np

# Set random seeds for reproducibility
np.random.seed(42)
tf.random.set_seed(42)

# Define custom init function
def custom_init_function(tx):
    """Custom initial condition function"""
    return -tf.sin(np.pi * tx[:, 1:])

# Define custom boundary function
def custom_boundary_function(tx):
    """Custom boundary condition function"""
    return tf.zeros_like(tx[:, 1:])

# Construct ARGS dict with all parameters
ARGS = {
    "n_samples": 4,
    "init_function": custom_init_function,
    "boundary_function": custom_boundary_function,
    "n_init": 4,
    "n_bndry": 4,
    "random_seed": 42,
    "dtype": tf.float32
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
simulate_heat Ran
ran; our contract draft was wrong, not the code
nimahsn/pinns_tf2/modules/data.py
code served (permissive licence) · get_code("d4c418fa17abf950")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf
import numpy as np

def phi_function(tx):
    """Initial condition function for heat equation"""
    # tx has shape (n_init, 2) where first column is t, second is x
    # Return shape (n_init, 1)
    x = tx[:, 1:2]
    return tf.sin(x)

def boundary_function(tx):
    """Boundary condition function for heat equation"""
    # tx has shape (n_bndry, 2) where first column is t, second is x
    # Return shape (n_bndry, 1)
    t = tx[:, 0:1]
    x = tx[:, 1:2]
    return tf.exp(-t) * tf.sin(x)

ARGS = {
    'n_samples': 2,
    'phi_function': phi_function,
    'boundary_function': boundary_function,
    'length': 1.0,
    'time': 1.0,
    'n_init': 2,
    'n_bndry': 4,
    'random_seed': 2,
    'dtype': tf.float32
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
simulate_wave Ran
ran; our contract draft was wrong, not the code
nimahsn/pinns_tf2/modules/data.py
code served (permissive licence) · get_code("f0d83de3292aa3f2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf
import numpy as np

# Define simple callable functions for phi, psi, and boundary
def phi_function(x):
    """Initial condition for u"""
    return tf.sin(x[:, 1:2] * np.pi)

def psi_function(x):
    """Initial condition for u_t"""
    return tf.cos(x[:, 1:2] * np.pi)

def boundary_function(x):
    """Boundary condition for u"""
    return tf.zeros((tf.shape(x)[0], 1), dtype=tf.float32)

ARGS = {
    'n_samples': 2,
    'phi_function': phi_function,
    'psi_function': psi_function,
    'boundary_function': boundary_function,
    'x_start': 0.0,
    'length': 1.0,
    'time': 1.0,
    'n_init': 2,
    'n_bndry': 4,
    'random_seed': 42,
    'dtype': tf.float32,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_id Not yet run
unverified (harvested, no recorded run)
nimahsn/pinns_tf2/modules/utils.py
code served (permissive licence) · get_code("c63585033cb0f861")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 8 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

The residual loss in Physics-Informed Neural Networks (PINNs) alters the simple recursive relation of layers in a feed-forward neural network by applying a differential operator, resulting in a loss landscape that is inherently different from those of common supervised problems. Therefore, relying on the existing theory leads to unjustified design choices and suboptimal performance. In this work, we analyze the residual loss by studying its characteristics at critical points to find the conditions that result in effective training of PINNs. Specifically, we first show that under certain conditions, the residual loss of PINNs can be globally minimized by a wide neural network. Furthermore, our analysis also reveals that an activation function with well-behaved high-order derivatives plays a crucial role in minimizing the residual loss. In particular, to solve a k-th order PDE, the k-th derivative of the activation function should be bijective. The established theory paves the way for designing and choosing effective activation functions for PINNs and explains why periodic activations have shown promising performance in certain cases. Finally, we verify our findings by conducting a set of experiments on several PDEs. Our code is publicly available at https://github.com/nimahsn/pinns tf2.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2405.01680")
get_code_for_paper("2405.01680")
have("2405.01680")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2405.01680.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2405.01680.svg)](https://syntology.ai/paper/2405.01680)

Connect an agent — have() is free.