Skip to content

Menu

WorksComputer Science

Physics2Weight: Direct Neural Network Architecture and Weight Generation from Physical Laws Using Large Language Models

Download PDFView on arXiv

Ask your agent about this work

Your agent reads this work through Valency, with its citations and similar works. Paste this at the start of a chat.

Use the Valency MCP. Work: W_8mbgxwdb. Fetch it with get_paper_by_id, then find its nearest works with find_similar_papers and tell me what it adds.

Works with any MCP client. Not connected yet? Connect your agent

Abstract

Recent advances in large language models (LLMs) have enabled weight-space programming (WSP), which directly generates neural network weights without gradient-based optimization. However, extending WSP to physical problems remains challenging, particularly in achieving both solution accuracy and physical consistency. In this paper, we propose Physics2Weight (PtW), a framework that extends WSP to solving partial differential equations by directly generating neural network weights and editing architectures based on governing equations and initial and boundary conditions. PtW introduces physics-constrained prompting and physics-guided architecture editing, combined with iterative weight refinement from WSP, to improve solution accuracy and physical consistency without gradient-based optimization. Experiments on four PDEs, namely the heat, advection, Burgers', and Allen–Cahn equations, demonstrate lower solution errors than conventional physics-informed neural networks, while revealing limitations in satisfying the governing equations for nonlinear PDEs.

Introduction

Neural networks (NNs) have demonstrated strong performance across a wide range of tasks, including computer vision, natural language processing, and scientific computing [17, 12] (He et al. 2016). However, obtaining their weights typically relies on gradient-based optimization, often using large amounts of training data or task-specific loss functions.

Recent advances in large language models (LLMs) [17, 1] have opened up the possibility of weight-space programming (WSP) [15], in which LLMs directly generate NN weights without gradient-based optimization. This approach offers an alternative paradigm for constructing NNs by generating their parameters rather than learning them through conventional training.

Conceptual comparison between conventional physics-informed neural networks and the proposed Physics2Weight

Figure 1. Conceptual comparison between (a) conventional physics-informed neural networks (PINNs) and (b) the proposed Physics2Weight (PtW). PINNs optimize neural network weights by minimizing physics-informed loss functions, whereas PtW edits architectures and directly generates weights from governing equations and initial and boundary conditions using an LLM, without gradient-based optimization.

Solving partial differential equations (PDEs) is a potential application of WSP, as physical problems are often specified by governing equations and initial and boundary conditions. Physics-informed neural networks (PINNs) [12] incorporate these conditions into loss functions and optimize NN weights through gradient-based training. In contrast, whether WSP can directly generate NN weights that achieve both accurate solution approximation and physical consistency remains unclear.

In this paper, we propose Physics2Weight (PtW), a framework that extends WSP to solving PDEs by directly generating NN weights using LLMs (Fig. 1). PtW introduces two physics-guided strategies: (1) physics-constrained prompting, which explicitly specifies additional physical constraints to guide weight generation, and (2) physics-guided architecture editing, which incorporates mathematical structures of governing equations into NN architectures. These strategies are combined with an iterative weight refinement procedure based on WSP Takehi et al., [15] to improve the generated solutions without gradient-based optimization.

We evaluate PtW on four PDEs: heat, advection, Burgers’, and Allen–Cahn equations. Through comparisons with PINNs and WSP and ablation studies, we quantitatively assess solution accuracy and physical consistency. The results show that PtW achieves lower solution errors than PINNs and WSP across all four PDEs, although improvements in solution accuracy do not always correspond to lower PDE residuals.

Our contributions are summarized as follows:

  • We introduce PtW, a framework for solving PDEs through direct NN weight generation using LLMs, without gradient-based optimization.

  • We investigate physics-constrained prompting and physics-guided architecture editing, combined with iterative weight refinement, to improve solution accuracy and physical consistency.

  • We systematically evaluate PtW across four PDEs, demonstrating improved solution accuracy over PINNs and WSP while identifying limitations in physical consistency.

Related Work

Neural Network Weight Generation. NN weight generation aims to produce the parameters of target NNs without directly optimizing each target network. Hypernetworks (Ha et al., 2017) generate target NN weights using a separately trained network. Weight-space learning Navon et al., [11] further investigates the structure and representations of NN parameters, while recent generative approaches [18, 13, 7] explore the generation of NN weights from learned parameter distributions. Text-conditioned approaches extend this direction by generating weights from natural language descriptions Tian et al., [16]. More recently, WSP Takehi et al., [15] has reported that general-purpose LLMs can directly generate and refine NN weights without training a dedicated weight generator. Building on WSP, PtW introduces explicit physical constraints and physics-guided architecture editing to construct NN representations for solving PDEs.

Neural Architecture Search and Editing. Neural architecture search (NAS) aims to automatically identify effective NN architectures for a given task. Early NAS methods employ reinforcement learning Zoph & Le, [21] or gradient-based optimization Liu et al., [9] to explore architecture search spaces. Recent LLM-based approaches, such as GE-NIUS Zheng et al., [20] and LLMatic Nasir et al., [10], generate and iteratively refine NN architectures using performance feedback. RZ-NAS (Ji et al., 2025) further incorporates LLM-based reflection to guide architecture search. Unlike general-purpose NAS, PtW uses the mathematical structure of governing equations to guide architecture editing, explicitly incorporating physically motivated operations into NN computations.

Physics-Informed Neural Networks. PINNs incorporate governing equations and initial and boundary conditions into loss functions to approximate PDE solutions without requiring extensive labeled solution data Raissi et al., [12]. Earlier work enforced boundary conditions exactly through trial functions Lagaris et al., [8]. Subsequent studies have investigated adaptive loss balancing Wang et al., [19], domain decomposition Jagtap & Karniadakis, [4], and exact imposition of boundary conditions with distance functions Sukumar & Srivastava, [14] to improve training and constraint satisfaction. In particular, hard-constrained approaches incorporate analytical structures into NN representations to satisfy prescribed physical conditions. Unlike these methods, PtW uses LLMs to edit NN architectures based on governing equations and directly generate and refine their weights without gradient-based optimization.

Preliminaries

Problem Formulation

We consider an initial-boundary value problem governed by a PDE:

F[u](x,t)=0,(x,t)∈Ω×(0,T],I[u](x,0)=0,x∈Ω,B[u](x,t)=0,(x,t)∈∂Ω×(0,T].(1)\begin{aligned} \mathcal{F}[u](\mathbf{x},t) &= 0,\quad(\mathbf{x},t) \in\Omega\times(0,T],\\ \mathcal{I}[u](\mathbf{x},0) &= 0,\quad\mathbf{x} \in\Omega,\\ \mathcal{B}[u](\mathbf{x},t) &= 0,\quad(\mathbf{x},t) \in\partial\Omega\times(0,T]. \tag*{(1)} \end{aligned}

where u(x,t)u(\mathbf{x},t) denotes the unknown solution, x∈Ω\mathbf{x} \in\Omega is the spatial coordinate, t∈[0,T]t \in[0,T] is time, and F\mathcal{F}, I\mathcal{I}, and B\mathcal{B} represent the governing equation, initial condition, and boundary condition operators, respectively.

We approximate the solution using an NN uθ,A(x,t)u_{\theta,\mathcal{A}}(\mathbf{x},t), parameterized by weights θ\theta and architecture A\mathcal{A}:

u(x,t)≈uθ,A(x,t).(2)u(\mathbf{x},t) \approx u_{\theta,\mathcal{A}}(\mathbf{x},t). \tag*{(2)}

The objective is to construct an NN representation that accurately approximates the solution while satisfying the governing equation and initial and boundary conditions.

Gradient-based Weight Optimization

Given spatiotemporal coordinates (x,t)(\mathbf{x},t), PINNs predict the approximate solution uθ,A(x,t)u_{\theta,\mathcal{A}}(\mathbf{x},t) and minimize a physics-informed loss function consisting of governing equation residuals and initial and boundary condition errors:

L(θ;A)=λPDELPDE+λICLIC+λBCLBC,(3)\mathcal{L}(\theta;\mathcal{A}) = \lambda_{\mathrm{PDE}}\mathcal{L}_{\mathrm{PDE}} + \lambda_{\mathrm{IC}}\mathcal{L}_{\mathrm{IC}} + \lambda_{\mathrm{BC}}\mathcal{L}_{\mathrm{BC}}, \tag*{(3)}

where LPDE\mathcal{L}_{\mathrm{PDE}}, LIC\mathcal{L}_{\mathrm{IC}}, and LBC\mathcal{L}_{\mathrm{BC}} measure violations of the governing equation, initial condition, and boundary condition, respectively, and λPDE\lambda_{\mathrm{PDE}}, λIC\lambda_{\mathrm{IC}}, and λBC\lambda_{\mathrm{BC}} are their weighting coefficients.

Given a fixed architecture A\mathcal{A}, PINNs obtain NN weights by minimizing the physics-informed loss function through gradient-based optimization:

θ∗=arg⁡min⁡θ L(θ;A).(4)\theta^{*} = \underset{\theta}{\arg\min}\ \mathcal{L}(\theta;\mathcal{A}). \tag*{(4)}

This process iteratively updates the weights using gradients of the loss function with respect to θ\theta.

Weight-Space Programming

WSP enables pretrained LLMs to directly generate NN weights from a specification of the target network without gradient-based optimization [15]. Given an NN architecture A\mathcal{A} and a task specification S\mathcal{S}, the generated weights are expressed as

θ(0)=LLM⁡(S,A),(5)\theta^{(0)} = \operatorname{LLM}(\mathcal{S},\mathcal{A}), \tag*{(5)}

where S\mathcal{S} describes the target task and θ(0)\theta^{(0)} denotes the initially generated weights.

WSP also supports iterative weight refinement [15]. The LLM evaluates the generated network by executing forward passes and uses the resulting feedback to modify its weights. At iteration kk, this process can be expressed as

θ(k+1)=LLM⁡(S,A,θ(k),E(k)),(6)\theta^{(k+1)} = \operatorname{LLM}(\mathcal{S},\mathcal{A},\theta^{(k)},\mathcal{E}^{(k)}), \tag*{(6)}

where E(k)\mathcal{E}^{(k)} denotes the evaluation feedback obtained by the LLM. This process iteratively refines NN weights without computing gradients of the evaluation objective. In contrast, PtW adapts this refinement procedure to PDE solving by providing physics-based feedback from an external evaluator, without granting the LLM tool access.

Physics2Weight

Framework Overview

As illustrated in Figure 2, PtW constructs an NN for solving PDEs using a pretrained LLM without gradient-based optimization. Given the governing equation F\mathcal{F}, initial condition I\mathcal{I}, boundary condition B\mathcal{B}, physical constraints C\mathcal{C}, and an initial NN architecture A0\mathcal{A}_0, PtW generates an architecture A^\widehat{\mathcal{A}} and weights θ^\widehat{\theta}:

Overview of the proposed PtW framework

Figure 2. Overview of the proposed PtW framework. Given governing equations, initial and boundary conditions, and an initial NN architecture, an LLM edits the architecture and directly generates NN weights without gradient-based optimization. Physics-constrained prompting specifies additional physical constraints, while iterative weight refinement, adapted from WSP, updates the generated weights based on external evaluation feedback.

(A^,θ^)=PtW⁡(F,I,B,C,A0).(7)(\widehat{\mathcal{A}},\widehat{\theta}) = \operatorname{PtW}(\mathcal{F},\mathcal{I},\mathcal{B},\mathcal{C},\mathcal{A}_0). \tag*{(7)}

PtW combines three components: physics-constrained prompting (PC), physics-guided architecture editing (AE), and iterative weight refinement (WR). PC explicitly specifies physical constraints, while AE incorporates mathematical structures of governing equations into NN architectures. WR, adapted from WSP [15], iteratively refines the generated weights based on external evaluation feedback. The complete PtW framework combines all three components, while their individual effects are investigated through ablation studies.

Physics-Constrained Prompting

In standard WSP, the task specification S\mathcal{S} includes the governing equation, computational domain, initial and boundary conditions, NN architecture, and evaluation criteria. Physics-constrained prompting (PC) additionally specifies physical constraints that the exact solution is known to satisfy. These constraints include initial and boundary condition tolerances, maximum principles, conservation or dissipation properties, and problem-specific physical properties. We construct a physics-constrained prompt SPC\mathcal{S}_{\mathrm{PC}} by augmenting the original task specification with a set of constraints C\mathcal{C}:

θ(0)=LLM⁡(SPC,A0),SPC=(S,C).(8)\theta^{(0)} = \operatorname{LLM}(\mathcal{S}_{\mathrm{PC}},\mathcal{A}_0),\quad\mathcal{S}_{\mathrm{PC}} = (\mathcal{S},\mathcal{C}). \tag*{(8)}

The prompt states that a network violating any constraint is regarded as physically incorrect even if its solution error is small, and that solution accuracy and physical fidelity are evaluated together. During iterative weight refinement, constraint violations are evaluated without reference solutions and incorporated into the feedback and model selection. The physical constraints used for each PDE are detailed in Appendix § 13.

Physics-Guided Architecture Editing

Physics-guided architecture editing (AE) allows the LLM to modify the initial NN architecture based on the mathematical structure of the governing equation and its initial and boundary conditions. Rather than restricting weight generation to a predefined architecture A0A_0, the LLM incorporates analytical operations and physically motivated transformations into the NN representation. For example, exponential decay in the heat equation and characteristic coordinate transformations in the advection equation can be embedded into the forward computation. The edited architecture is expressed as

A^=LLM⁡(SPC,A0;R),(9)\widehat{A} = \operatorname{LLM}(S_{\mathrm{PC}}, A_0; \mathcal{R}), \tag*{(9)}

where R\mathcal{R} denotes architecture editing rules that restrict the available operations and parameter count while preserving trainable NN components.

The edited architecture consists of mathematical expressions and MLP blocks, allowing physical knowledge to be incorporated into the network structure. The generated architecture is validated against R\mathcal{R}, and any violations are returned to the LLM for correction. Given the edited architecture A^\widehat{A}, the LLM directly generates its weights:

θ(0)=LLM⁡(SPC,A^).(10)\theta^{(0)} = \operatorname{LLM}(S_{\mathrm{PC}}, \widehat{A}). \tag*{(10)}

This enables the NN to represent physical solutions through both its architecture and weights without gradient-based optimization. The architecture editing rules and supported operations are described in Appendix § 14.

Iterative Weight Refinement

WR follows the iterative refinement loop of WSP, but differs in its evaluation procedure: the LLM has no tool access and receives physics-based feedback from an external evaluator. Given the generated weights θ(k)\theta^{(k)}, the NN is evaluated using the physics-informed loss in Eq. (3), including PDE residuals and initial and boundary condition errors. The evaluation also provides spatial and temporal residual diagnostics and, when PC is enabled, the results of physical constraint checks. These evaluations are performed externally without providing reference solutions or solution errors to the LLM. At iteration kk, the LLM updates the weights as

θ(k+1)=LLM⁡(SPC,A^,θ(k),E(k)),(11)\theta^{(k+1)} = \operatorname{LLM}(\mathcal{S}_{\mathrm{PC}}, \widehat{\mathcal{A}}, \theta^{(k)}, \mathcal{E}^{(k)}), \tag*{(11)}

where E(k)\mathcal{E}^{(k)} denotes the evaluation feedback. The architecture remains fixed during refinement, and the weights are modified without gradient-based optimization.

The final weights are selected from the generated candidates based on physical constraint satisfaction and the physics-informed loss. Specifically, PtW prioritizes the number of violated constraints VV and uses the physics-informed loss L\mathcal{L} to distinguish candidates with the same number of violations:

θ^=θ(k∗),k∗=arg min⁡0≤k≤K(V(θ(k)),L(θ(k))),(12)\hat{\theta} = \theta^{(k^*)}, \qquad k^* = \underset{0 \leq k \leq K}{\operatorname{arg\,min}}\left(V(\theta^{(k)}), \mathcal{L}(\theta^{(k)})\right), \tag*{(12)}

where the minimization follows lexicographic ordering. Without PC, the final weights are selected solely by minimizing L\mathcal{L}. This selection strategy prioritizes physical constraint satisfaction rather than solution accuracy alone.

Experiments

Experimental Setup

We evaluate PtW on four time-dependent PDEs: heat, advection, Burgers’, and Allen–Cahn equations, covering diffusion, transport, nonlinear convection-diffusion, and reaction-diffusion. Their governing equations are given by

Heat:ut=αuxx,Advection:ut+βux=0,Burgers’:ut+uux=νuxx,Allen–Cahn:ut=duxx+κ(u−u3),(13)\begin{aligned} \text{Heat:}\quad&u_t = \alpha u_{xx},\\ \text{Advection:}\quad&u_t + \beta u_x = 0,\\ \text{Burgers’:}\quad&u_t + u u_x = \nu u_{xx},\\ \text{Allen–Cahn:}\quad&u_t = d u_{xx} + \kappa(u-u^3), \tag*{(13)} \end{aligned}

with α=0.1\alpha= 0.1, β=30\beta= 30, ν=0.01/π\nu= 0.01/\pi, d=10−3d = 10^{-3}, and κ=5\kappa= 5. We use K=5K = 5 refinement rounds, so the final weights are selected from K+1=6K + 1 = 6 candidates, including the initially generated weights. The corresponding physical parameters, computational domains, and initial and boundary conditions are provided in Appendix § 11.

We compare PtW with PINN and WSP as baseline methods. PINN obtains NN weights through gradient-based optimization, whereas WSP directly generates weights using an LLM. To investigate the effects of individual components, we evaluate PINN-WR, WSP-PC, WSP-WR, WSP-PC-WR, and WSP-PC-AE. The complete PtW framework combines PC, AE, and WR. Here, AE is evaluated together with PC, while WR can be applied independently of PC and AE.

We evaluate solution accuracy using the relative L2L_2 error between the predicted and reference solutions:

Erel=∥uθ,A−uref∥2∥uref∥2,(14)\mathcal{E}_{\mathrm{rel}} = \frac{\lVert u_{\theta,\mathcal{A}} - u_{\mathrm{ref}}\rVert_2}{\lVert u_{\mathrm{ref}}\rVert_2}, \tag*{(14)}

where urefu_{\mathrm{ref}} denotes the reference solution evaluated at the same points. Physical consistency is evaluated using the mean squared PDE residual and initial and boundary condition errors, denoted by EPDE\mathcal{E}_{\mathrm{PDE}}, EIC\mathcal{E}_{\mathrm{IC}}, and EBC\mathcal{E}_{\mathrm{BC}}, respectively. Reference solutions are used only for independent evaluation and are not provided to the LLM.

We use Claude Opus 5.5 for all LLM-based methods. The initial architecture is a fully connected NN with two hidden layers of 20 tanh units, which is also used for the PINN baseline. All LLM-based methods generate weights without gradient-based optimization. Each experiment is repeated three times, and the median performance is reported. Additional implementation details are provided in Appendix § 12.

Heat Equation

Table 1 presents the quantitative results on the heat equation. PtW achieves a relative L2L_2 error of 4.31×10−174.31 \times10^{-17}, substantially outperforming all baseline methods. The PDE residual and initial and boundary condition errors are also nearly zero. This high accuracy is primarily attributed to architecture editing, which incorporates the analytical structure of the heat equation into the NN representation.

MethodRel. L2L_2 ↓PDE Res. ↓IC ↓BC ↓
PINN2.28×10−42.28 \times10^{-4}6.45×10−76.45 \times10^{-7}2.49×10−42.49 \times10^{-4}2.15×10−42.15 \times10^{-4}
WSP1.10×10−51.10 \times10^{-5}6.02×10−76.02 \times10^{-7}7.78×10−67.78 \times10^{-6}7.10×10−67.10 \times10^{-6}
WSP-PC4.63×10−54.63 \times10^{-5}7.51×10−77.51 \times10^{-7}3.27×10−53.27 \times10^{-5}4.79×10−54.79 \times10^{-5}
PtW4.31×10−17\mathbf{4.31 \times10^{-17}}3.14×10−33\mathbf{3.14 \times10^{-33}}0\mathbf{0}5.73×10−17\mathbf{5.73 \times10^{-17}}

Table 1. Quantitative results on the heat equation. Values are medians over three runs.

Figure 3 compares the predicted spatiotemporal solutions and pointwise absolute errors. While all methods visually reproduce the reference solution, the baseline methods exhibit nonzero errors across the spatiotemporal domain. In contrast, PtW reproduces the reference solution with pointwise errors approaching machine precision, consistent with the quantitative results.

Comparison of spatiotemporal solutions and pointwise absolute errors for the heat, advection, and Burgers’ equations

Figure 3. Comparison of spatiotemporal solutions and pointwise absolute errors for the heat, advection, and Burgers’ equations. Reference solutions are compared with predictions from PINN, WSP, WSP-PC, and PtW. For each equation, the top row shows the predicted solutions, while the bottom row shows the pointwise absolute errors on a logarithmic color scale shared across all panels, with errors below 10−810^{-8} displayed using the lowest color. Black lines indicate u=0u = 0, and each method is represented by the run with the median relative L2L_2 error among three runs.

Advection Equation

Table 2 presents the quantitative results on the advection equation. PtW achieves a relative L2L_2 error of 2.00×10−172.00 \times10^{-17}, substantially outperforming all baseline methods. The PDE residual and initial and boundary condition errors are also nearly zero. This high accuracy is primarily attributed to architecture editing, which incorporates the characteristic coordinate transformation into the NN representation.

MethodRel. L2L_2 ↓PDE Res. ↓IC ↓BC ↓
PINN2.86×10−12.86 \times10^{-1}7.37×10−57.37 \times10^{-5}1.76×10−21.76 \times10^{-2}8.32×10−28.32 \times10^{-2}
WSP3.88×10−43.88 \times10^{-4}2.54×10−292.54 \times10^{-29}2.72×10−42.72 \times10^{-4}2.15×10−52.15 \times10^{-5}
WSP-PC3.88×10−43.88 \times10^{-4}2.55×10−292.55 \times10^{-29}2.72×10−42.72 \times10^{-4}2.15×10−52.15 \times10^{-5}
PtW2.00×10−17\mathbf{2.00 \times10^{-17}}0\mathbf{0}0\mathbf{0}1.75×10−16\mathbf{1.75 \times10^{-16}}

Table 2. Quantitative results on the advection equation. Values are medians over three runs.

Figure 3 compares the predicted spatiotemporal solutions and pointwise absolute errors. While PINN exhibits noticeable deviations from the reference solution, WSP and WSP-PC reproduce the traveling wave with smaller errors. PtW further reduces these errors to machine precision, accurately preserving the wave propagation throughout the spatiotemporal domain.

curately preserving the wave propagation throughout the spatiotemporal domain.

Burgers’ Equation

Table 3 presents the quantitative results on Burgers’ equation. PtW achieves the lowest relative L2L_2 error of 1.53×10−21.53 \times10^{-2} among the methods in Table 3. It also achieves the lowest initial and boundary condition errors. However, its PDE residual MSE is substantially higher than that of PINN. This discrepancy is caused by a few localized residual peaks: the median squared residual of PtW is lower than that of PINN (4.4×10−64.4 \times10^{-6} versus 1.9×10−51.9 \times10^{-5}), whereas its MSE increases by orders of magnitude on a finer spatial grid. For one PtW run, increasing the spatial resolution from 256 to 2001 points raises the MSE from 5.45×10−25.45 \times10^{-2} to 6.6×1096.6 \times10^{9}, while the PINN MSE changes by less than 20%.

MethodRel. L2L_2 ↓PDE Res. ↓IC ↓BC ↓
PINN4.69×10−24.69 \times10^{-2}4.44×10−3\mathbf{4.44 \times10^{-3}}1.29×10−21.29 \times10^{-2}9.44×10−49.44 \times10^{-4}
WSP2.21×10−22.21 \times10^{-2}3.66×10−13.66 \times10^{-1}9.96×10−39.96 \times10^{-3}2.45×10−42.45 \times10^{-4}
WSP-PC7.17×10−27.17 \times10^{-2}7.07×10−17.07 \times10^{-1}1.41×10−31.41 \times10^{-3}2.71×10−42.71 \times10^{-4}
PtW1.53×10−2\mathbf{1.53 \times10^{-2}}1.43×1011.43 \times10^{1}4.90×10−15\mathbf{4.90 \times10^{-15}}6.39×10−7\mathbf{6.39 \times10^{-7}}

Table 3. Quantitative results on Burgers’ equation. Values are medians over three runs. PDE residual MSE is evaluated on a 256×101256 \times101 grid and is sensitive to spatial resolution for PtW.

Figure 3 compares the predicted solutions and pointwise absolute errors. The errors of PINN concentrate along the shock at x=0x = 0 and persist after the shock has formed, whereas those of WSP and WSP-PC spread over the smooth region. PtW has the lowest error away from the shock (root-mean-square error 4.8×10−34.8 \times10^{-3} for ∣x∣≥0.05|x| \ge0.05, versus 8.0×10−38.0 \times10^{-3} for PINN) and at the shock after it has formed (1.3×10−21.3 \times10^{-2} for ∣x∣<0.05|x| < 0.05 and t≥0.4t \ge0.4, versus 1.6×10−11.6 \times10^{-1} for PINN). Its error concentrates near x=0x = 0 while the shock forms, where the maximum pointwise error of 0.19 occurs at t=0.33t = 0.33.

Allen–Cahn Equation

Table 4 presents the quantitative results on the Allen–Cahn equation. PtW achieves a relative L2 error of 3.53×10−23.53 \times10^{-2}, outperforming PINN, WSP, and WSP-PC. It also achieves near-zero initial and boundary condition errors. However, PINN achieves a lower PDE residual than PtW, indicating that improved solution accuracy does not necessarily correspond to better satisfaction of the governing equation.

MethodRel. L2L_2 ↓PDE Res. ↓IC ↓BC ↓
PINN5.20×10−15.20 \times10^{-1}1.44×10−3\mathbf{1.44 \times10^{-3}}5.87×10−25.87 \times10^{-2}2.53×10−32.53 \times10^{-3}
WSP7.45×10−27.45 \times10^{-2}1.44×10−11.44 \times10^{-1}3.30×10−23.30 \times10^{-2}1.71×10−21.71 \times10^{-2}
WSP-PC2.29×10−12.29 \times10^{-1}2.86×10−12.86 \times10^{-1}1.85×10−21.85 \times10^{-2}7.63×10−57.63 \times10^{-5}
PtW3.53×10−2\mathbf{3.53 \times10^{-2}}1.67×10−21.67 \times10^{-2}8.13×10−17\mathbf{8.13 \times10^{-17}}4.88×10−16\mathbf{4.88 \times10^{-16}}

Table 4. Quantitative results on the Allen–Cahn equation. Values are medians over three runs.

Figure 4 compares the predicted spatiotemporal solutions. Both PtW and WSP-PC reproduce the interface annihilation observed in the reference solution. However, PtW achieves lower solution and energy errors than WSP-PC, indicating a more accurate approximation of the overall interface dynamics.

Comparison of spatiotemporal solutions for the Allen–Cahn equation

Figure 4. Comparison of spatiotemporal solutions for the Allen–Cahn equation. The bottom panels provide enlarged views of the interface dynamics, highlighting differences in interface evolution and annihilation timing between the reference solution and the evaluated methods. Each method is represented by the run with the median relative L2L_2 error among three runs. The dotted line indicates the reference annihilation time (t=0.28t = 0.28), and the enlarged panels use a color range of [−0.03,0.03][-0.03, 0.03].

Analysis of Generated Weights and Architectures

To investigate how PtW represents PDE solutions, we analyze the generated NN architectures and weights, as shown in Figure 5 and Table 5. The edited networks contain substantially fewer parameters than the initial architecture with 501 parameters. Specifically, the generated networks have 4–33 parameters for the heat equation, 4–17 for advection, 104–342 for Burgers’, and 36–52 for Allen–Cahn.

Structures inside the networks generated by PtW

Figure 5. Structures inside the networks generated by PtW (median runs). (a) Heat: relative error of the decay rate λ(t)\lambda(t) of the fundamental mode; the network computes u=u0(x)e−tsoftplus⁡(N(t))u=u_0(x)e^{-t\operatorname{softplus}(N(t))}. (b) Advection: uu against the characteristic coordinate ξ=x−βt\xi=x-\beta t; the network computes u=N(sin⁡ξ,cos⁡ξ)u=N(\sin\xi,\cos\xi) and collapses onto sin⁡ξ\sin\xi, unlike PINN. (c) Burgers’ equation at t=0.5t=0.5: two chains of MLPs, AA and BB, iterate the characteristic relation for the two sides of the shock, and a tanh switch TT combines them into u=A+B2+TA−B2u=\frac{A+B}{2}+T\frac{A-B}{2}; where a chain switches roots, uxxu_{xx} has local spikes. (d) Allen–Cahn: the network computes u=tanh⁡(z)u=\tanh(z) from v=u0(x)+tD(x)v=u_0(x)+tD(x) with a sine-activated MLP DD, where zz is a monotone function of vv, so the interfaces are the zeros of vv; colored curves show vv at t=0t=0–0.30.3 and black ticks the reference interfaces.

MethodLLM callsHeat paramsHeat time [s]Advection paramsAdvection time [s]Burgers’ paramsBurgers’ time [s]Allen–Cahn paramsAllen–Cahn time [s]
PINN0501186501136501187501247
WSP15012905011215011009501705
WSP-PC150126950114450159095012037
PtW7–84–33764–1770104–342106636–52588

Table 5. Network size and computational cost (medians over three runs). Time is the wall-clock time per network, including PINN training (PINN, PINN-WR) and all LLM calls; LLM times depend on server load. For WSP-PC on Burgers’ equation, two of the three runs include a first call that exceeded the output-token limit after 82 and 92 minutes before a successful retry.

For the heat and advection equations, the LLM incorporates analytical solution structures into the NN architectures. For the heat equation, the generated network represents exponential decay using u=u0(x)exp⁡(−tsoftplus⁡(N(t)))u=u_0(x)\exp(-t\operatorname{softplus}(N(t))), where the MLP NN produces a constant decay rate corresponding to π2\pi^2 (Figure 5a). For advection, the network uses the characteristic coordinate ξ=x−βt\xi=x-\beta t and represents the traveling wave through an MLP applied to (sin⁡ξ,cos⁡ξ)(\sin\xi,\cos\xi) (Figure 5b). These analytical structures contribute substantially to the near-machine-precision solution accuracy.

For Burgers’ equation, the generated networks approximate the characteristic relation u=u0(x−ut)u=u_0(x-ut) through unrolled iterative computations using multiple small MLPs. The median network combines two iterative branches with a tanh-based transition function to represent the nonlinear solution structure (Figure 5c). However, abrupt root switches within the unrolled iterations produce isolated points with very large second derivatives (Figure 5c), which dominate the PDE residual despite the low solution error. For Allen–Cahn, the generated network represents the evolving spatial field using a nonlinear MLP and applies a tanh transformation to model the interfaces (Figure 5d). The nonlinear MLP structure is important for representing the interface dynamics, as replacing it with affine transformations increases the solution error.

These results suggest that physics-guided architecture editing is particularly effective when analytical solution structures can be incorporated into the NN representation. For nonlinear PDEs, the generated architectures can achieve accurate global solution approximations, although local violations of the governing equations remain a challenge.

Ablation Study

Table 6 presents the ablation results for PC, AE, and WR. We first evaluate the effect of PC by comparing WSP and WSP-PC. PC does not improve the relative L2L_2 error across the four PDEs. However, it reduces the median number of violated physical constraints from 3 to 1 for Burgers’ equation and from 2 to 0 for the Allen–Cahn equation (Table 7). These results indicate that PC improves physical constraint satisfaction rather than solution accuracy.

MethodHeat L2Heat PDEHeat ICHeat BCAdvection L2Advection PDEAdvection ICAdvection BCBurgers’ L2Burgers’ PDEBurgers’ ICBurgers’ BCAllen–Cahn L2Allen–Cahn PDEAllen–Cahn ICAllen–Cahn BC
PINN2.28e-46.45e-72.49e-42.15e-42.86e-17.37e-51.76e-28.32e-24.69e-24.44e-31.29e-29.44e-45.20e-11.44e-35.87e-22.53e-3
PINN-WR2.28e-46.45e-72.49e-42.15e-42.38e-72.45e-291.64e-71.60e-84.69e-24.44e-31.29e-29.44e-45.20e-11.44e-35.87e-22.53e-3
WSP1.10e-56.02e-77.78e-67.10e-63.88e-42.54e-292.72e-42.15e-52.21e-23.66e-19.96e-32.45e-47.45e-21.44e-13.30e-21.71e-2
WSP-PC4.63e-57.51e-73.27e-54.79e-53.88e-42.55e-292.72e-42.15e-57.17e-27.07e-11.41e-32.71e-42.29e-12.86e-11.85e-27.63e-5
WSP-WR2.55e-72.77e-131.19e-71.14e-71.14e-92.44e-295.18e-102.63e-92.17e-21.60e-19.94e-32.45e-41.29e-13.24e-24.11e-22.63e-4
WSP-PC-WR4.58e-74.99e-131.92e-72.18e-71.61e-72.48e-291.14e-73.19e-99.62e-24.68e-11.41e-32.65e-41.39e-17.47e-23.29e-21.00e-4
WSP-PC-AE1.21e-141.70e-2805.73e-172.64e-901.86e-91.86e-161.17e-29.24e+11.65e-163.00e-123.49e-23.31e-28.13e-175.03e-16
PtW4.31e-173.14e-3305.73e-172.00e-17001.75e-161.53e-21.43e+14.90e-156.39e-73.53e-21.67e-28.13e-174.88e-16

Table 6. Ablation study of physics-constrained prompting (PC), architecture editing (AE), and weight refinement (WR). Values are medians over three runs. The best result for each metric and PDE is shown in bold.

MethodHeat VHeat Phys.Advection VAdvection Phys.Burgers’ VBurgers’ Phys.Allen–Cahn VAllen–Cahn Phys.
PINN0 (3/3)3/34 (0/3)0/33 (0/3)3/33 (0/3)1/3
PINN-WR0 (3/3)3/30 (3/3)3/33 (0/3)3/33 (0/3)1/3
WSP0 (3/3)3/30 (3/3)3/33 (0/3)3/32 (0/3)0/3
WSP-PC0 (3/3)3/30 (3/3)3/31 (0/3)1/30 (3/3)3/3
WSP-WR0 (3/3)3/30 (3/3)3/33 (0/3)3/31 (0/3)0/3
WSP-PC-WR0 (3/3)3/30 (3/3)3/30 (3/3)1/30 (3/3)3/3
WSP-PC-AE0 (3/3)3/30 (3/3)3/30 (2/3)3/31 (1/3)3/3
PtW0 (3/3)3/30 (3/3)3/30 (3/3)2/30 (3/3)3/3

Table 7. Physical constraint violations. VV: median number of violated constraints among C1–C5 (Appendix § 13) over three runs, with the number of runs with V=0V = 0 in parentheses. Phys.: number of runs whose problem-specific physical metric (Table 9) is within tolerance.

We next investigate the effect of AE, which is combined with PC in our experiments. Compared with WSP-PC, WSP-PC-AE substantially reduces the relative L2L_2 error across all four PDEs. The improvements are particularly significant for the heat and advection equations, where analytical solution structures can be incorporated into the NN architectures. For Burgers’ and Allen–Cahn equations, AE also improves solution accuracy, demonstrating its effectiveness for nonlinear PDEs.

Finally, we evaluate the effect of WR. When applied to WSP, WR improves solution accuracy for the heat and advection equations, while providing limited or negative improvements for Burgers’ and Allen–Cahn equations. When applied to trained PINN weights, WR improves only the advection equation, reducing the relative L2L_2 error from 2.86×10−12.86 \times10^{-1} to 2.38×10−72.38 \times10^{-7}. In all three runs, the LLM discarded the PINN weights in the first refinement round and replaced them with an analytical construction. For the other three PDEs, PINN-WR produces the same results as PINN. When combined with PC and AE, WR increases the number of runs satisfying all physical constraints from 2/3 to 3/3 for Burgers’ equation and from 1/3 to 3/3 for the Allen–Cahn equation. However, these improvements do not necessarily reduce the relative L2L_2 error, as the final model is selected by prioritizing physical constraint satisfaction.

Overall, AE provides the largest improvements in solution accuracy, particularly for PDEs with known analytical structures. PC mainly improves constraint satisfaction, while WR improves accuracy for heat and advection and, combined with PC, constraint satisfaction.

Limitations

For the heat and advection equations, PtW achieves near-machine-precision accuracy by incorporating known analytical solution structures into the NN architectures. Therefore, these results do not necessarily demonstrate the ability to generate highly accurate weights for PDEs without known analytical solutions. For Burgers’ equation, the generated networks exhibit large local derivatives, resulting in high PDE residuals despite relatively accurate solution approximations. These residuals are highly sensitive to spatial grid resolution and should not be interpreted as grid-converged estimates. Furthermore, our evaluation is limited to one-dimensional PDEs, a single LLM, and three runs per method. Future work will investigate more complex PDEs without known analytical solutions, improve the physical consistency of generated networks, and explore the integration of LLM-generated architectures with gradient-based optimization.

Conclusion

We proposed PtW, a framework for solving PDEs by directly generating NN architectures and weights using an LLM without gradient-based optimization. Experiments on four PDEs demonstrated that PtW achieves lower solution errors than conventional PINNs and WSP, while satisfying the specified physical constraints. Ablation studies showed that architecture editing is the primary contributor to solution accuracy, whereas physics-constrained prompting and weight refinement mainly improve constraint satisfaction. However, relatively large PDE residuals remain for nonlinear PDEs, indicating limitations in physical consistency.

PDE Settings

All problems are one-dimensional in space with t∈[0,1]t \in[0,1]. The physical constraints used for each problem are summarized in Table 8.

PDEPhysical constraints
HeatC1: Initial condition (maximum error ≤0.01\le0.01). C2: Dirichlet boundary conditions (maximum error ≤0.01\le0.01). C3: Maximum principle 0≤u≤10 \le u \le1 (tolerance 0.01). C4: Non-increasing energy E(t)=∫−11u2 dxE(t) = \int_{-1}^{1} u^2\,dx (increase ≤10−3E(0)\le10^{-3}E(0)). C5: Symmetry u(x,t)=u(1−x,t)u(x,t) = u(1-x,t) (maximum error ≤0.01\le0.01).
AdvectionC1: Initial condition (maximum error ≤0.01\le0.01). C2: Periodic boundary condition (maximum error ≤0.01\le0.01). C3: Maximum amplitude ∣u∣≤1|u| \le1 (tolerance 0.01). C4: Conservation of mass (absolute tolerance 0.04) and ∫u2 dx\int u^2\,dx (relative tolerance 1%). C5: Transport speed of the first Fourier mode (relative tolerance 1%), with amplitude ratio ≥0.1\ge0.1.
Burgers’C1: Initial condition (maximum error ≤0.01\le0.01). C2: Dirichlet boundary conditions (maximum error ≤0.01\le0.01). C3: Maximum amplitude ∣u∣≤1|u| \le1 (tolerance 0.01). C4: Non-increasing energy E(t)=∫−11u2 dxE(t) = \int_{-1}^{1} u^2\,dx (increase ≤10−3E(0)\le10^{-3}E(0)). C5: Odd symmetry u(−x,t)=−u(x,t)u(-x,t) = -u(x,t) (maximum error ≤0.01\le0.01).
Allen–CahnC1: Initial condition, including interface positions (position tolerance 0.01). C2: Non-increasing number of interfaces. C3: Maximum amplitude ∣u∣≤1.01|u| \le1.01. C4: Non-increasing energy E(t)=∫−11[12ux2+κ4(1−u2)2] dxE(t) = \int_{-1}^{1} [\frac{1}{2}u_x^2 + \frac{\kappa}{4}(1-u^2)^2]\,dx (increase ≤10−3E(0)\le10^{-3}E(0)). C5: Interface slopes at t=1t = 1 within [0.75,1.25][0.75, 1.25] times the stationary kink slope.

Table 8. Physical constraints used in PC. Each PDE is evaluated using five constraints (C1–C5) with specified tolerances.

Heat Equation

We consider ut=αuxxu_t = \alpha u_{xx} with α=0.1\alpha= 0.1 on x∈[0,1]x \in[0,1], subject to u(x,0)=sin⁡(πx)u(x,0) = \sin(\pi x) and u(0,t)=u(1,t)=0u(0,t) = u(1,t) = 0. The reference solution is given by u(x,t)=e−απ2tsin⁡(πx)u(x,t) = e^{-\alpha\pi^2 t}\sin(\pi x).

Advection Equation

We consider ut+βux=0u_t + \beta u_x = 0 with β=30\beta= 30 on x∈[0,2π]x \in[0,2\pi], subject to u(x,0)=sin⁡xu(x,0) = \sin x and periodic boundary conditions. The reference solution is given by u(x,t)=sin⁡(x−βt)u(x,t) = \sin(x-\beta t).

Burgers’ Equation

We consider ut+uux=νuxxu_t + u u_x = \nu u_{xx} with ν=0.01/π\nu= 0.01/\pi on x∈[−1,1]x \in[-1,1], subject to u(x,0)=−sin⁡(πx)u(x,0) = -\sin(\pi x) and u(±1,t)=0u(\pm1,t) = 0. The solution develops a steep viscous shock near x=0x = 0. The reference solution is computed using the Cole–Hopf transformation with numerical quadrature.

Allen–Cahn Equation

We consider ut=d uxx+κ(u−u3)u_t = d\,u_{xx} + \kappa(u-u^3) with d=10−3d = 10^{-3} and κ=5\kappa= 5 on x∈[−1,1]x \in[-1,1], subject to periodic boundary conditions for uu and uxu_x. The initial condition is defined as

u(x,0)=∑k=15Aksin⁡(kπx+ϕk),(15)u(x,0) = \sum_{k=1}^{5} A_k \sin(k\pi x+\phi_k), \tag*{(15)}

where A=(−0.3337,−0.1499,0.1401,0.0331,−0.1462)A = (-0.3337,-0.1499,0.1401,0.0331,-0.1462) and ϕ=(2.7214,3.0100,1.0037,4.6155,0.7142)\phi= (2.7214,3.0100,1.0037,4.6155,0.7142). The initial field contains six interfaces, which evolve and undergo annihilation during the simulation. The reference solution is computed using a Fourier pseudo-spectral method with 2048 spatial grid points and fourth-order exponential time differencing (ETDRK4) [6] with a time step of 5×10−45 \times10^{-4}.

Implementation Details

LLM. All LLM-based methods use Claude Opus 5.5 (claude-opus-5-5) with high reasoning effort. The model is accessed through Claude Code in non-interactive mode without tool access. Architecture editing, weight generation, and iterative refinement are performed within a single LLM session. The LLM generates architectures and weights without executing code or performing numerical optimization. Each run consists of a single generation step (preceded by architecture editing for AE) and, for methods with WR, K=5K = 5 refinement rounds; each LLM call has a time limit of one or two hours.

Prompts. All LLM-based methods receive the governing equation, computational domain, initial and boundary conditions, NN architecture, and evaluation criteria. PC additionally specifies physical constraints, while AE provides architecture editing rules and supported operations. The LLM outputs the generated weights in JSON format. Reference solutions and solution errors are not provided to the LLM.

Initial architecture. The initial architecture A0\mathcal{A}_0 is a fully connected NN with two hidden layers of 20 tanh units:

uθ,A0(x,t)=W3tanh⁡(W2tanh⁡(W1[x,t]T+b1)+b2)+b3.(16)u_{\theta,\mathcal{A}_0}(x,t) = W_3 \tanh\left(W_2 \tanh\left(W_1[x,t]^\mathsf{T}+b_1\right)+b_2\right)+b_3. \tag*{(16)}

The network contains 501 parameters and is evaluated in double precision without coordinate normalization.

Physics-informed loss and feedback. The physics-informed loss is defined as L=LPDE+LIC+LBC\mathcal{L} = \mathcal{L}_{\mathrm{PDE}}+\mathcal{L}_{\mathrm{IC}}+\mathcal{L}_{\mathrm{BC}}, using 4096 PDE collocation points, 256 initial points, and 128 boundary times. All sampling points are fixed within each run, and derivatives are computed using automatic differentiation. For periodic boundary conditions, the loss penalizes mismatches between the two boundaries, including first-order derivatives for Allen–Cahn. During WR, the LLM receives the loss components, PDE residual diagnostics, initial and boundary condition errors, and coarse-grid predictions. When PC is enabled, physical constraint evaluations are also included in the feedback.

Baselines. PINN is trained using Adam with a learning rate of 10−310^{-3} for 10,000 steps, followed by L-BFGS with a maximum of 10,000 iterations. The PINN baseline uses the same initial architecture and collocation points as the LLM-based methods. PINN-WR applies iterative weight refinement to pretrained PINN weights without gradient-based optimization during refinement.

Evaluation. All methods are evaluated on a uniform 256×101256 \times101 spatiotemporal grid. Solution accuracy is measured using the relative L2L_2 error. Physical consistency is evaluated using the mean squared PDE residual and the root-mean-square initial and boundary condition errors. Each method is evaluated over three independent runs, and the median of each metric is reported. The visualizations correspond to the run with the median relative L2L_2 error.

Physical Constraints

Physics-constrained prompting (PC) introduces five physical constraints for each PDE, as summarized in Table 8. These constraints are derived from the governing equations and their initial and boundary conditions. Each constraint is evaluated independently from the generated NN without using reference solutions. A constraint is regarded as satisfied when its evaluation falls within the specified tolerance.

For each generated network, we define the number of violated constraints as

V(θ)=∑i=15I[Ci(θ) is violated],(17)V(\theta) = \sum_{i=1}^{5} \mathbb{I}[C_i(\theta)\text{ is violated}], \tag*{(17)}

where I[⋅]\mathbb{I}[\cdot] is the indicator function. During WR, the evaluation results are provided to the LLM as feedback, and VV is used to prioritize physical constraint satisfaction in the final model selection.

Architecture Editing Rules

Physics-guided architecture editing (AE) allows the LLM to construct NN architectures by combining mathematical expressions and MLP blocks. The architecture is represented as a sequence of named layers, followed by an output expression. Each layer either evaluates a mathematical expression or applies an MLP to the outputs of preceding layers.

Expression layers support arithmetic operations, integer powers, and elementary functions, including sin, cos, exp, log, tanh, and softplus. Additional supported functions include sinh, cosh, sigmoid, ⋅\sqrt{\cdot}, erf, and artanh. Expressions can use spatial and temporal coordinates, PDE coefficients, the initial condition u0(x)u_0(x), and outputs of preceding layers. Numerical constants are restricted to integers between −20-20 and 2020, 0.50.5, and π\pi. The coefficients of the initial condition cannot be directly introduced as numerical constants.

To preserve the NN representation, all trainable parameters must be weights or biases of MLP blocks. Each MLP supports tanh, sin, sigmoid, or softplus activations, with at most four hidden layers and 64 units per hidden layer. The output must depend on at least one MLP containing a hidden layer. The total number of trainable parameters is limited to 501, matching the initial architecture A0A_0.

The architecture contains at most 40 layers, with at most 32 inputs per MLP. Each MLP input expression is limited to 24 symbols, while the combined expression layers and output expression are limited to 40 symbols. The output must be finite, twice differentiable in space, and once differentiable in time. Non-differentiable operations such as comparisons, conditionals, absolute values, minimum, and maximum are not permitted. The generated architecture is validated against these rules, and violations are returned to the LLM for correction, with at most two correction attempts.

Additional Results

We further evaluate problem-specific physical properties of the generated solutions, as summarized in Table 9. For the heat equation, we measure the relative error of the decay rate of the fundamental mode. For advection, we evaluate the propagation speed and amplitude of the first Fourier mode. For Burgers’ equation, we measure the shock formation time and the maximum spatial gradient. For Allen–Cahn, we evaluate the interface annihilation time and the relative energy error.

MethodHeatHeatAdvectionAdvectionBurgers’Burgers’Allen–CahnAllen–Cahn
Decay err.Speed err.Amplitude err.tshockt_{\mathrm{shock}}G(1)/Gref(1)G(1)/G_{\mathrm{ref}}(1)tannt_{\mathrm{ann}}Energy err.
Reference (tol.)0 (≤0.01\le0.01)0 (≤0.01\le0.01)0 (≤0.05\le0.05)0.23 (±0.05\pm0.05)1 ([0.5,2][0.5, 2])0.28 (±0.05\pm0.05)0
PINN5.80×10−55.80 \times10^{-5}3.68×10−33.68 \times10^{-3}0.4450.210.990.50/0.28/–0.216
WSP6.89×10−76.89 \times10^{-7}1.77×10−71.77 \times10^{-7}2.21×10−52.21 \times10^{-5}0.221.13–/–/–0.0204
WSP-PC1.96×10−61.96 \times10^{-6}2.20×10−72.20 \times10^{-7}3.28×10−53.28 \times10^{-5}0.291.050.29/0.26/0.250.133
PtW2.22×10−162.22 \times10^{-16}2.22×10−162.22 \times10^{-16}4.44×10−164.44 \times10^{-16}0.221.010.28/0.30/0.278.78×10−38.78 \times10^{-3}

Table 9. Problem-specific physical metrics. Values are medians over three runs, except for Allen–Cahn annihilation times, which are reported for individual runs. The reference row includes the corresponding tolerances.

For the heat and advection equations, PtW achieves errors near machine precision in the decay rate, propagation speed, and amplitude. These results are consistent with the analytical structures incorporated through architecture editing.

For Burgers’ equation, PtW reproduces the shock formation time and final gradient magnitude close to the reference values. For Allen–Cahn, PtW reproduces interface annihilation in all three runs, with annihilation times between 0.27 and 0.30, compared with 0.28 for the reference. PtW also achieves a lower relative energy error than the baseline methods. These results demonstrate that the generated networks can reproduce important physical dynamics, although low PDE residuals are not guaranteed.

References

  1. [1]Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. Language models are few-shot learners. NeurIPS, 33:1877–1901, 2020.arxiv.org/abs/2005.14165
  2. [4]Jagtap, A. D. and Karniadakis, G. E. Extended physics-informed neural networks (xpinns): A generalized space-time domain decomposition based deep learning framework for nonlinear partial differential equations. Communications in Computational Physics, 28(5), 2020.
  3. [6]Kassam, A.-K. and Trefethen, L. N. Fourth-order time-stepping for stiff pdes. SIAM Journal on Scientific Computing, 26(4):1214–1233, 2005.DOI
  4. [7]Kim, J., Mehta, S., Hsu, H.-L., Ryu, H., Liu, Y., and Pajic, M. Nnit: Width-agnostic neural network generation with structurally aligned weight spaces. arXiv preprint arXiv:2603.00180, 2026.arxiv.org/abs/2603.00180
  5. [8]Lagaris, I. E., Likas, A., and Fotiadis, D. I. Artificial neural networks for solving ordinary and partial differential equations. IEEE transactions on neural networks, 9(5):987–1000, 1998.DOI
  6. [9]Liu, H., Simonyan, K., and Yang, Y. Darts: Differentiable architecture search. arXiv preprint arXiv:1806.09055, 2018.arxiv.org/abs/1806.09055
  7. [10]Nasir, M. U., Earle, S., Togelius, J., James, S., and Cleghorn, C. CLImatic: neural architecture search via large language models and quality diversity optimization. In proceedings of the Genetic and Evolutionary Computation Conference, pp. 1110–1118, 2024.DOI
  8. [11]Navon, A., Shamsian, A., Achituve, I., Fetaya, E., Chechik, G., and Maron, H. Equivariant architectures for learning in deep weight spaces. In ICML, pp. 25790–25816, 2023.arxiv.org/abs/2301.12780
  9. [12]Raissi, M., Perdikaris, P., and Karniadakis, G. E. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. Journal of Computational physics, 378:686–707, 2019.DOI
  10. [13]Soro, B., Andreis, B., Lee, H., Jeong, W., Chong, S., Hutter, F., and Hwang, S. J. Diffusion-based neural network weights generation. In ICLR, volume 2025, pp. 99644–99675, 2025.arxiv.org/abs/2402.18153
  11. [14]Sukumar, N. and Srivastava, A. Exact imposition of boundary conditions with distance functions in physics-informed deep neural networks. Computer Methods in Applied Mechanics and Engineering, 389:114333, 2022.DOI
  12. [15]Takehi, R., Teoh, J., Zhang, A., and Khattab, O. Sparks of Weight-Space Programming: LLMs can natively read & write neural network weights. https://rikiyaqt.github.io/blog/weight-space-programming/, November 2026. Blog post.
  13. [16]Tian, B., Chen, W., Li, Z., Lai, S., Wu, J., and Yue, Y. Text2weight: Bridging natural language and neural network weight spaces. In ACM MM, pp. 10152–10160, 2025.arxiv.org/abs/2508.13633
  14. [17]Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., and Polosukhin, I. Attention is all you need. NeurIPS, 30, 2017.arxiv.org/abs/1706.03762
  15. [18]Wang, K., Tang, D., Zeng, B., Yin, Y., Xu, Z., Zhou, Y., Zang, Z., Darrell, T., Liu, Z., and You, Y. Neural network diffusion. arXiv preprint arXiv:2402.13144, 2024.arxiv.org/abs/2402.13144
  16. [19]Wang, S., Teng, Y., and Perdikaris, P. Understanding and mitigating gradient flow pathologies in physics-informed neural networks. SIAM Journal on Scientific Computing, 43(5):A3055–A3081, 2021.
  17. [20]Zheng, M., Su, X., You, S., Wang, F., Qian, C., Xu, C., and Albanie, S. Can gpt-4 perform neural architecture search? arXiv preprint arXiv:2304.10970, 2023.arxiv.org/abs/2304.10970
  18. [21]Zoph, B. and Le, Q. V. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016.arxiv.org/abs/1611.01578

Machine contribution statement

No AI-use declaration is available for this version in Valency.

The available record does not establish whether AI systems or models contributed to this work.

How machine contributions are recorded

Paper details

Citation

Cite
Published
Version
Latest

Data & code

No code, data or supplementary files were declared for this version.

Contents

Pick where to look, or just type